Example #1
0
function displayMenu($config)
{
    //Menu Items
    echo '<h2>Main Menu</h2>';
    echo '<ul>';
    echo '<li><a href="' . $_SERVER['PHP_SELF'] . '" >Home</a></li>';
    echo '<li><a href="https://mail.mahoningcountyoh.gov" target="_blank">County E-Mail</a></li>';
    echo '<li><a href="https://mcso-training.mahoningsheriff.com" target="_blank">Sheriff Training</a></li>';
    echo '<li><a href="http://mcso-techsupport.mahoningcountyoh.gov/portal" target="_blank">Technical Support</a></li>';
    echo '<li><a href="http://connect.mahoningcountyoh.gov" target="_blank">Remote Support</a></li>';
    echo '<li><a href="https://aii.mahoningcountyoh.gov" target="_blank">Agency View Website</a></li>';
    echo '<li><a href="http://lodge141.com" target="_blank">Lodge141 Website</a></li>';
    echo '</ul>';
    if (isValidUser($config)) {
        echo '<h2>User Menu</h2>';
        echo '<ul>';
        echo '<li><a href="?updateProfile=true">Update Profile</a></li>';
        if ($_SESSION['isLDAP'] == false) {
            echo '<li><a href="?usermenu=true&ChangeBtn=true">Change Your Password</a><br /><br />';
        }
        echo '<li><a href="?secLog=true">Secondary Logs</a></li>';
        //if($config->adminLvl >= 25)
        echo '<li><a href="?radioLog=true">Inventory Checkout Logs</a></li>';
        //echo '<li><a href="?leave=true">Request Form</a></li>';
        echo '<li><a href="?isTimeRequestForm=true">Time Request Form</a></li>';
        echo '<li><a href="?myReq=true">My Submitted Requests</a></li>';
        echo '<li><a href="?myInv=true">My Inventory</a></li>';
    }
    echo '</ul>';
    displaySupv($config);
    displayAcct($config);
    displayAdmin($config);
}
displayHeader();
displayMenu();
if (isset($_GET['error'])) {
    displayError($_GET['error']);
}
if (isset($_GET["page"])) {
    $p = $_GET["page"];
    if ($p == 'movie') {
        if (isset($_GET["id"]) && !empty($_GET["id"])) {
            displayMovie($_GET["id"]);
        } else {
            displayErrorId();
        }
    } else {
        if ($p == 'admin') {
            displayAdmin();
        } else {
            if ($p == 'edit') {
                if (isset($_GET["id"]) && !empty($_GET["id"])) {
                    displayEditMovie($_GET["id"]);
                } else {
                    if (isset($_GET["login"]) && !empty($_GET["login"])) {
                        displayEditUser($_GET["login"]);
                    } else {
                        displayErrorId();
                    }
                }
            } else {
                if ($p == 'insert') {
                    displayInsertMovie();
                } else {