Exemplo n.º 1
0
// by Clinton Fong
//
/*
    ini_set('display_errors', 1);
    ini_set('log_errors', 1);
    ini_set('log_errors_max_length', 0);
    ini_set('error_log', './error_log.txt');
*/
session_start();
//----------------------------------------------
// check if logged in, otherwise throw them out.
//----------------------------------------------
require_once 'include/lib/class.loginController.inc.php';
$idUser = isset($_SESSION['icaweb505a-user-id']) ? $_SESSION['icaweb505a-user-id'] : "-1";
$objLoginController = new c_loginController();
if (!$objLoginController->isUserLoggedIn($idUser)) {
    header("Location: login.php");
    // redirect to login page
}
$isLoggedIn = true;
$currentPage = "index.php";
?>

<!DOCTYPE html>

<html>

<head>
    <meta charset='utf-8' />
    <meta name='description' content='Online Diary' />
    <meta name='keywords' content='Online Diary' />
<?php

//
// adminUsers.php
//
// by Clinton Fong
//
session_start();
//----------------------------------------------
// check if logged in, otherwise throw them out.
//----------------------------------------------
require_once 'include/class.loginController.inc.php';
$employeeID = isset($_SESSION['icaict515a-employee-id']) ? $_SESSION['icaict515a-employee-id'] : "-1";
$objLoginController = new c_loginController();
if (!$objLoginController->isUserLoggedIn($employeeID) || $objLoginController->accessLevel < AL_ADMIN) {
    header("Location: login.php");
    // redirect to login page
}
//--------------------------------------------
// general house keeping for header and menus
//--------------------------------------------
require_once 'include/class.generalHouseKeeping.inc.php';
$objGeneralHouseKeeping = new c_generalHouseKeeping($objLoginController->firstname);
//--------------------------------------------
$frmName = isset($_POST['frmName']) ? $_POST['frmName'] : '';
$actionTaken = isset($_POST['actionTaken']) ? $_POST['actionTaken'] : '';
$firstname = isset($_POST['firstname']) ? $_POST['firstname'] : '';
$lastname = isset($_POST['lastname']) ? $_POST['lastname'] : '';
$email = isset($_POST['email']) ? $_POST['email'] : '';
$phone = isset($_POST['phone']) ? $_POST['phone'] : '';
$accessLevel = isset($_POST['accessLevel']) ? $_POST['accessLevel'] : '';
<?php

session_start();
//----------------------------------------------
// check if logged in, otherwise throw them out.
//----------------------------------------------
require_once 'include/class.loginController.inc.php';
$employeeID = isset($_SESSION['icaict515a-employee-id']) ? $_SESSION['icaict515a-employee-id'] : "-1";
$objLoginController = new c_loginController();
if (!$objLoginController->isUserLoggedIn($employeeID)) {
    header("Location: login.php");
    // redirect to login page
}
//--------------------------------------------
// general house keeping for header and menus
//--------------------------------------------
require_once 'include/class.generalHouseKeeping.inc.php';
$objGeneralHouseKeeping = new c_generalHouseKeeping($objLoginController->firstname);
//--------------------------------------------
?>
<!DOCTYPE html>

<html lang='en'>
    <head>
        <meta charset='utf-8' />
        <meta name='description' content='Aussie Computer Corporation' />
        <meta name='keywords' content='Aussie Computer Corporation' />
        <meta name='author' content='Clinton Fong' />

        <title>Aussie Computer Corporation</title>