Ejemplo n.º 1
0
<?php

$pagearray = array("home", "help", "about", "newpatient", "viewpatient", "account", "select", "messages");
$which = $_SERVER["QUERY_STRING"];
include "../../class.login.php";
$log = new logmein();
//Instentiate the class
$log->dbconnect();
//Connect to the database
$log->encrypt = true;
//set to true if password is md5 encrypted. Default is false.
if ($log->logincheck($_SESSION['loggedin']) == false || $_SESSION['userlevel'] != 1) {
    //do something if NOT logged in. For example, redirect to login page or display message.
    echo "Restricted Access: You are not logged in!";
} else {
    //do something if timeout occurs.
    if (isset($_SESSION['start'])) {
        $session_life = time() - $_SESSION['start'];
        if ($session_life > $inactive) {
            $log->timeout();
        }
    }
    $_SESSION['start'] = time();
    ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Physician | Home</title>
    <meta name="Author" content="Ryan Kane" />