Пример #1
0
<?php

session_start();
if (!isset($_SESSION['faculty'])) {
    exit(header("location:index.php"));
}
$u = $_SESSION['faculty'];
$pos = "Faculty";
include "conn.php";
include "helper/class_record.php";
//   $checker=mysqli_query($conn,"select *from tbl_school where school_id='$_SESSION[school_id]'") or die(mysqli_error($conn));
// $school_status=mysqli_query($conn,"select *from tbl_school where principal='$_SESSION[principal]'") or die(mysqli_error($conn));
if (get_school_status() == 0) {
    exit(header("location:register_school.php"));
}
$sy = mysqli_real_escape_string($conn, $_POST['sy']);
$g_period = mysqli_real_escape_string($conn, $_POST['g_period']);
$subject = mysqli_real_escape_string($conn, $_POST['subject']);
$grade = mysqli_real_escape_string($conn, $_POST['grade']);
$section = mysqli_real_escape_string($conn, $_POST['section']);
$number = mysqli_real_escape_string($conn, $_POST['number']);
if (isset($_POST['advisory'])) {
    $advisory = mysqli_real_escape_string($conn, $_POST['advisory']);
}
//checker
$counter = checkerClassRecord($g_period, $grade, $section, $subject, $sy);
if ($counter > 0) {
    $_SESSION['x'] = 2;
    exit(header("location:class_record.php"));
}
include "head.php";
Пример #2
0
    $school_status = mysqli_query($conn, "select *from tbl_school where principal='{$_SESSION['principal']}' and banned='1'") or die(mysqli_error($conn));
    if (mysqli_num_rows($school_status) > 0) {
        echo "<script>window.location.replace('denied.php?block=1&school={$ssc}')</script>";
        // echo"<script> alert('Warning  $ssc School \\n has been Blocked by the Admin\\nYou may Message the Administrator for this Event')</script>";
    }
} elseif (isset($_SESSION['faculty'])) {
    $u = $_SESSION['faculty'];
    $pos = "Faculty Member";
    $pic = "select pic,fname,mname,surname,school_id from tbl_faculty where username='******' and school_id='{$_SESSION['school_id']}'";
    $rpic = mysqli_query($conn, $pic) or die(mysqli_error($conn));
    while ($rowpic = mysqli_fetch_array($rpic)) {
        list($pict, $f, $m, $s, $ssc) = $rowpic;
    }
    $_SESSION['pict'] = $pict;
    $_SESSION['principal_name'] = "{$f} {$s}";
    echo "<nav id='bt-menu' class='bt-menu'> ";
    if (!file_exists($pict)) {
        $_SESSION['pict'] = 'images/bsulogo.png';
        echo "<a href='#' class='bt-menu-trigger'><img src='images/bsulogo.png' width='90px'height='75px'\r\n\t\t\t\tstyle='margin:-13px 0px 0px -5px;border:2px solid #ccc;border-bottom-left-radius:10px;border-bottom-right-radius:10px;box-shadow:0px 0px 5px 1px #333;'/></a>\r\n\t\t\t";
    } else {
        echo "<a href='#' class='bt-menu-trigger'><img src='{$pict}' width='90px'height='75px'\r\n\t\t\t\tstyle='margin:-13px 0px 0px -5px;border:2px solid #ccc;border-bottom-left-radius:10px;border-bottom-right-radius:10px;box-shadow:0px 0px 5px 1px #333;'/></a>\r\n\t\t\t";
    }
    echo "<ul>\r\n\t\t\t\t\t<li><a href id='title' href='account_settings.php'>{$f} {$m} {$s}</a>\t</li>\r\n\t\t\t\t\t<li><a href='official_account_settings.php' id='desc'>" . $pos . "</a></li>";
    echo "<li><a href='principal_message.php'>Messages</a></li>\r\n\t\t\t\t\t<li><a href='principal_pass.php'>Security</a></li>\r\n\t\t\t\t\t<li><a href='principal_secretq.php'>Secret Question</a></li>\r\n\t\t\t\t\t<li><a title='Update Account'href='principal_accnt_setting.php'>Account Settings</a></li>\r\n\t\t\t\t\t<li><a href='drop_accnts.php'>Blocked Accounts</a></li>\r\n\t\t\t\t\t<li><a href='verify_faculty.php'>Verify Accounts</a></li>\r\n\t\t\t\t\t<li><a href='univ_logs.php'>Logs</a></li>\r\n\t\t\t\t\t<li><a class='md-trigger' data-modal='modal-7' style='text-decoration:none;'href='#'>Logout</a></div></li>\r\n\t\t\t\t</ul>\r\n\t\t\t</nav>\r\n\t\t";
    $school_status = get_school_status();
    if ($school_status == 0) {
        echo "<script>window.location.replace('denied.php?block=1&school={$ssc}')</script>";
        echo "<script> alert('Warning  {$ssc} School \\n has been Blocked by the Admin\\nYou may Message the Administrator for this Event')</script>";
    }
}
echo "<div class='md-modal md-effect-19' id='modal-9'>\r\n\t\t\t<div class='md-content'>\r\n\t\t\t\t<h3>Are you Sure You want to Logout?</h3>\r\n\t\t\t\t<table>\r\n\t\t\t\t\t\t<div id='toclear'>\r\n\t\t\t\t\t\t\t<tr><td>&nbsp;</td></tr>\r\n\r\n\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td align='center'><a class='b' style='text-decoration:none;padding:0px;'href='logout.php'/>Confirm</a></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<tr><td><button class='md-close' onClick='clear1()'>Close</button></td></tr>\r\n\t\t\t\t\t\t\t<tr><td><div id='accesscode_availability_result'></div></td></tr>\r\n\t\t\t\t\t\t\t<tr><td>&nbsp;</td></tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t</div>\r\n\t\t\t<!-- for the blur effect -->\r\n\t\t<div class='md-overlay' onclick='clear1()'></div><!-- the overlay element -->\r\n\t\t<div class='md-modal md-effect-19' id='modal-5'>\r\n\t\t\t<div class='md-content'>\r\n\t\t\t\t<h3>Are you Sure You want to Logout?</h3>\r\n\t\t\t\t<table>\r\n\t\t\t\t\t\t<div id='toclear'>\r\n\t\t\t\t\t\t\t<tr><td>&nbsp;</td></tr>\r\n\r\n\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td align='center'><a class='b' style='text-decoration:none;padding:0px;'href='admin_logout.php'/>Confirm</a></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<tr><td><button class='md-close' onClick='clear1()'>Close</button></td></tr>\r\n\t\t\t\t\t\t\t<tr><td><div id='accesscode_availability_result'></div></td></tr>\r\n\t\t\t\t\t\t\t<tr><td>&nbsp;</td></tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class='md-modal md-effect-19' id='modal-7'>\r\n\t\t\t<div class='md-content'>\r\n\t\t\t\t<h3>Are you Sure You want to Logout?</h3>\r\n\t\t\t\t<table>\r\n\t\t\t\t\t\t<div id='toclear'>\r\n\t\t\t\t\t\t\t<tr><td>&nbsp;</td></tr>\r\n\r\n\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td align='center'><a class='b' style='text-decoration:none;padding:0px;'href='parent_logout.php'/>Confirm</a></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<tr><td><button class='md-close' onClick='clear1()'>Close</button></td></tr>\r\n\t\t\t\t\t\t\t<tr><td><div id='accesscode_availability_result'></div></td></tr>\r\n\t\t\t\t\t\t\t<tr><td>&nbsp;</td></tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t</div>\r\n\t\t\t<!-- for the blur effect -->\r\n\t\t<div class='md-overlay' onclick='clear1()'></div><!-- the overlay element -->\r\n\r\n\r\n\t\t<script src='modaljs/classie.js'></script>\r\n\t\t<script src='modaljs/modalEffects.js'></script>\r\n\t\t<script>\r\n\t\t\t// this is important for IEs\r\n\t\t\tvar polyfilter_scriptpath = '/modaljs/';\r\n\t\t</script>\r\n\t\t<script src='modaljs/cssParser.js'></script>\r\n\t\t<script src='modaljs/css-filters-polyfill.js'></script>";