Your IP : 3.141.193.189
<?php
session_start(); ob_start();
include('lib/controller.php');
if(array_key_exists('UpdateSchoolData', $_POST)){
// echo json_encode($_POST);
$conn = $db;
// Sanitize and assign form values
$website = mysqli_real_escape_string($conn, $_POST['website']);
$contactperson = mysqli_real_escape_string($conn, $_POST['contactperson']);
$contactemail = mysqli_real_escape_string($conn, $_POST['contactemail']);
$contactphone = mysqli_real_escape_string($conn, $_POST['contactphone']);
$whyjoinus = mysqli_real_escape_string($conn, $_POST['whyjoinus']);
$address = mysqli_real_escape_string($conn, $_POST['address']);
$aboutschool = mysqli_real_escape_string($conn, $_POST['aboutschool']);
$sid = sqLx('user','id',$uid,'sid');
$db->query("UPDATE school SET
website = '$website',
contactperson = '$contactperson',
contactemail = '$contactemail',
contactphone = '$contactphone',
whyjoinus = '$whyjoinus',
aboutschool = '$aboutschool',
address = '$address'
WHERE id = '$sid'");
// Update query
$sql = "UPDATE user SET
website = '$website',
contactperson = '$contactperson',
contactemail = '$contactemail',
contactphone = '$contactphone',
whyjoinus = '$whyjoinus',
aboutschool = '$aboutschool',
address = '$address'
WHERE id = '$uid'";
if (mysqli_query($conn, $sql)) {
$_SESSION['success_message'] = 'School information updated successfully!';
} else {
echo "Error: " . mysqli_error($conn);
}
}
$sql = dbSelect('user',['id'=>$uid]);
$row = mysqli_fetch_assoc($sql);
extract($row);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Dashboard</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="robots" content="index, follow">
<?php include('style.php') ?>
<style type="text/css">
.badge1 {
font-size: 15px;
letter-spacing: 1px;
font-weight: 700;
padding: 8px 20px;
margin: 5px;
background: color-mix(in srgb, var(--accent-color), transparent 90%);
color: var(--accent-color);
display: inline-block;
border-radius: 50px;
font-family: var(--default-font);
}
</style>
</head>
<body class="service-details-page">
<?php include('header.php');
?>
<main class="main">
<!-- Page Title -->
<div class="page-title dark-background" data-aos="fade">
<div class="heading">
<div class="container">
<div class="row d-flex justify-content-center text-center">
<div class="col-lg-8">
<h1><?=$school?></h1>
<p class="mb-0">Keep track of all your job applications</p>
</div>
</div>
</div>
</div>
<nav class="breadcrumbs">
<div class="container">
<ol>
<li class="current">My Job Applications</li>
<li class="current"><?=$school?></li>
</ol>
</div>
</nav>
</div><!-- End Page Title -->
<!-- Service Details Section -->
<section id="service-details" class="service-details section">
<div class="container">
<div class="row gy-4">
<div class="col-lg-4">
<?php include('menux.php') ?>
</div>
<div class="col-lg-8 services pt-0">
<div class="row gy-4">
<div class="col-lg-12 col-md-12" data-aos="fade-up" data-aos-delay="200">
<div class="services-list table-responsive" style="border-radius: 10px;">
<h5>Personal Information</h5>
<form method="post" class="">
<div class="row">
<div class="col-lg-6">
<div class="form-group mt-3"><label for="">Firstname</label>
<input value="<?=$firstname?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3">
<label for="">Lastname</label>
<input value="<?=$lastname?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3">
<label for="">Email</label>
<input value="<?=$email?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <label for="">Mobile number</label>
<input value="<?=$phone?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-12">
<h5>School Information</h5>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <small for="school">School Name</small>
<input value="<?=$school?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3">
<small for="school_department">School Service Type</small>
<input value="<?=$schooltype?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"><small for="employees"> Number of Employees</small>
<input value="<?=$employees?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"><small for="">Type of Employer</small>
<input value="<?=$employertype?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <small for="infosource">Where did you hear about us</small><input value="<?=$infosource?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <small for="notify">Country</small>
<input value="<?=$countr[$country]?>" disabled class="form-control" >
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <small for="notify">State/Province</small>
<input value="<?=$state?>" disabled class="form-control" >
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3" id="lgdiv">
<small for="notify">LGA</small>
<input value="<?=$lga?>" disabled class="form-control">
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <small for="website">Website</small>
<input type="text" name="website" value="<?=$website?>" class="form-control" placeholder="yoursite.com">
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <small for="contact">Contact Person</small>
<input type="text" name="contactperson" value="<?=$contactperson?>" class="form-control" placeholder="contact person" required>
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <small for="notify">Contact Email</small>
<input type="text" name="contactemail" value="<?=$contactemail?>" class="form-control" placeholder="Contact Email" required>
</div>
</div>
<div class="col-lg-6">
<div class="form-group mt-3"> <small for="notify">Contact Phone</small>
<input type="text" name="contactphone" value="<?=$contactphone?>" class="form-control" placeholder="Contact Phone" required>
</div>
</div>
<div class="col-lg-12">
<div class="form-group mt-3"> <small for="address">Detailed Address</small>
<input type="text" name="address" class="form-control" value="<?=$address?>" placeholder="Address" required>
</div>
</div>
<div class="col-lg-12">
<div class="form-group mt-3"> <small for="address">School Profile</small>
<textarea name="aboutschool" rows="5" class="form-control" placeholder="About the school" required><?=$aboutschool?></textarea>
</div>
</div>
<div class="col-lg-12">
<div class="form-group mt-3"> <small for="address">Why join <?=$school?>?</small>
<textarea name="whyjoinus" class="form-control" placeholder="Your unique selling points" ><?=$whyjoinus?></textarea>
</div>
</div>
<div>
<br>
</div>
<div class="col-lg-12 mt-3">
<div class="text-center">
<button type="submit" class="btn btn-primary" name="UpdateSchoolData">Update School Information</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section><!-- /Service Details Section -->
</main>
<?php include('footer.php');
include('country.php') ?>
<!-- Vendor JS Files -->
<script data-cfasync="false" src="assets/email-decode.min.js"></script>
<script src="assets/bootstrap.bundle.min.js"></script>
<script src="assets/validate.js"></script>
<script src="assets/aos.js"></script>
<script src="assets/purecounter_vanilla.js"></script>
<script src="assets/swiper-bundle.min.js"></script>
<!-- Main JS File -->
<script src="assets/main.js"></script>
<script type="text/javascript">
fetch('nigerian-states.json')
.then(res => res.json())
.then(nigerianStates => {
for (let state in nigerianStates) {
const option = document.createElement('option');
option.value = state;
option.textContent = state;
document.getElementById('state').appendChild(option);
}
document.getElementById('state').addEventListener('change', function () {
const lgas = nigerianStates[this.value] || [];
const lgaSelect = document.getElementById('lga');
lgaSelect.innerHTML = '<option value="">Select LGA</option>';
lgas.forEach(lga => {
const option = document.createElement('option');
option.value = lga;
option.textContent = lga;
lgaSelect.appendChild(option);
});
});
});
</script>
</body>
</html>