607A Yorktown Place, Statesboro, GA 30461
http://www.chrissterling.me — chris@chrissterling.me

Return to Resume

//tell the auth script to include the mysql connection
$useMysql = true;
require ('../globals/template/auth.inc.php');
//get an int incase a student tried to be funny and pass a string
$injPage = (int)$_POST['injection_id'];

// Query to remove injection page, gets the PIDM (student ID) from the auth.inc file
$myDeleteQuery = "DELETE FROM MYGSIJPG WHERE IJPG_PIDM = " . $userData->PIDM . " AND IJPG_PGID = ".$injPage;
if(!$result = $db->query($myDeleteQuery)){
   	$_SESSION['mysql_error'] = true;
	header("Location: ../error.php");
//does the injection page owner want us to track how long the student viewed the page
if(isset($_POST['track_view']) && $_POST['track_view'] == true){
	//get some data to keep our table fairly filled out
	$pidm = $userData->PIDM;
	$eagleID = $userData->EagleID;
	$general_value = $_POST['track_code'];
	$totalTime = time() - $_POST['view_start'];
	$general_comments = 'Student has dismissed the injection page. ('.$totalTime.' seconds)';
	$general_code = "INJ_PAGE";
	$trackQuery = "INSERT INTO `GENERAL` (`general_pidm`,`general_eid`,`general_code`,`general_value`,`general_comments`) VALUES ('$pidm','$eagleID','$general_code','$general_value','$general_comments')";
    if(!$result = $db->query($trackQuery)){
    	$_SESSION['mysql_error'] = true;
		header("Location: ../error.php");
//close the database connection and send them along
header("Location: ../portal.php");
Return to Resume