<?php
include_once '../session/admin-session.php';
include_once '../classes/class_admin.php';
include_once '../classes/validation.php';
include_once '../classes/common.php';
include_once 'read-configration.php';

ob_start();

$ObjDB = new class_db();
$log = new common();
$objadm = new class_admin();
$val = new validation();

$LATEMSG = "";
$stu_roll = $val->ValidateString($_REQUEST["stu_roll"]);
$admin_roll = $_SESSION['user_sesroll'];
$datetime = DATE('Y-m-d H:i:s');

$xx = strtotime(DATE('Y-m-d H:i:s')) + 86400;
$last_date = date("Y-m-d H:i:s", $xx);

$query="UPDATE isr_stu_main_tbl SET late_upto = '$xx' WHERE roll = '$stu_roll'";
$ObjDB->sproc_name=$query;
$ObjDB->ExecuteQuery();

$LATEMSG = "$stu_roll reg opened $last_date";
 	
$activity = "$stu_roll reg opened $last_date";
$query1="INSERT INTO actions (roll, activity, datetime) VALUES('".$admin_roll."','".$activity."','".$datetime."')";
$ObjDB->sproc_name=$query1;
$ObjDB->ExecuteQuery();

?>
<div class="container-fluid">
    <div class="row">
        <div class="col-xl-12 col-xxl-12 col-sm-12">
            <div class="card">
                <div class="card-header">
                    <h5 class="card-title">Late Registration Status</h5>
                </div>
                <div class="card-body">
                    <div class="row">
                        <div class="col-lg-12">
                            <span style="color: green;"><?php echo $LATEMSG; ?></span>
                        </div>
                        <div class="col-lg-12">
                            <a href="control-permit-late-reg.php">Return To Permit Late Reg</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php
$pagemaincontent = ob_get_contents();
ob_clean();
$PAGENAME = 'control-permit-late-reg';
$HTMLTITLE = '';
$HTMLDESCRIPTION = '';
$HTMLKEYWORDS = '';
include("admin-master.php");
?>