<?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();

$admin_roll = $_SESSION['user_sesroll'];
$datetime = DATE('Y-m-d H:i:s');

$BLOCKMSG = "";
$stu_roll = $val->ValidateString($_REQUEST["stu_roll"]);
$fee_OK = $val->ValidateString($_REQUEST["fee_OK"]);
$cgpa_OK = $val->ValidateString($_REQUEST["cgpa_OK"]);
$attn_OK = $val->ValidateString($_REQUEST["attn_OK"]);

$datetime = date("Y-m-d H:i:s");

$query="UPDATE isr_stu_main_tbl SET fee_OK = '$fee_OK', cgpa_OK = '$cgpa_OK', attn_OK = '$attn_OK' WHERE roll = '$stu_roll'";
$ObjDB->sproc_name = $query;
$ObjDB->ExecuteQuery();

$BLOCKMSG = "Fee Status and CGPA Status of $stu_roll has been changed to <Big>$fee_OK</Big> and <Big>$cgpa_OK</Big> respectively";

$activity = " For $stu_roll: Fee: $fee_OK :: CGPA: $cgpa_OK :: Attn: $attn_OK";
$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">Block Status</h5>
                </div>
                <div class="card-body">
                    <div class="row">
                        <div class="col-lg-12">
                            <span style="color: green;"><?php echo $BLOCKMSG; ?></span>
                        </div>
                        <div class="col-lg-12">
                            <a href="control-block-unblock.php">Return Block/Unblock</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php
$pagemaincontent = ob_get_contents();
ob_clean();
$PAGENAME = 'control-new-block-save';
$HTMLTITLE = '';
$HTMLDESCRIPTION = '';
$HTMLKEYWORDS = '';
include("admin-master.php");
?>