session_start(); require("../../php/functions.php"); require("../../php/sharedFunctions.php"); //get wanted page if( isset($_GET['id']) ){ $myid = mysql_escape_string($_GET['id']); if(!is_numeric($myid)){ header('Location: '.$_SESSION['DEFINES']['PATH'].'index.php', false); exit; } $sql = mysql_query("SELECT * FROM ".DB_PREFIX."pages WHERE id = '$myid' LIMIT 1"); $result = mysql_fetch_assoc($sql); } @mysql_free_result($sql); //test for invalid id num if(empty($result)){ $title = "There is no page here."; }else{ $title = $result['title']; } if($result['secure'] == 'yes'){ include_once('../../../phpCAS/CAS.php'); // initialize phpCAS phpCAS::client(CAS_VERSION_2_0,'login.gatech.edu',443,'cas',FALSE); // no SSL validation for the CAS server phpCAS::setNoCasServerValidation(); phpCAS::forceAuthentication(); $CASauthed = phpCAS::checkAuthentication(); if(!$CASauthed){ $user= phpCAS::getUser(); header('Location: noaccess.php'); exit; }//if cas authed } /* ini_set("display_errors","1"); ERROR_REPORTING(E_ALL);*/ ?>