if (!isset($_SESSION["UserData"])) { print "You must login to access this resource"; exit(); } include("../autoload2.php"); include("easyDB.php"); include("easyDBConn2.php"); /* $DBProvider="sqlite"; $connections["sqlite"]=array( ''=>array('dbFile'=>dirname(__FILE__)."/../data/data.db",'persist'=>true) );*/ $db = easyDB(''); $headers = true; $query = ""; foreach($_REQUEST as $key=>$value) { if (isset($_COOKIE[$key])) { break; } if (substr($key,0,1) == '_') { } else { switch($key) { case "rnd":/*this should be _rnd*/ case "datasource":/*this should be _datasource*/ case "Id":
* Monitor Login Times.... */ session_start(); if (isset($_SESSION["SESSION_DBID"])) { $logID = $_SESSION["SESSION_DBID"]; print "{"; print "sessionLogId:'{$logID}'"; //see if the app has been updated... if (file_exists("../data/modified.js")) { $s = file_get_contents("../data/modified.js"); print ",dUp:" . $s; } print ",AppUpdate:" . filemtime('../index.php'); print "}"; include "easyDB.php"; include "easyDBConn2.php"; $db = easyDB('log'); $sql = "UPDATE Login SET LastContact = DATETIME('NOW') Where ID = {$logID}"; //$result = sqlite_query($db,$sql); $db->Query($sql); } else { print "{"; print "sessionLogId:'0',message:'No Session Log Id'"; //see if the app has been updated... if (file_exists("../data/modified.js")) { $s = file_get_contents("../data/modified.js"); print ",dUp:" . $s; } print ",AppUpdate:'" . filemtime('../index.php') . "'"; print "}"; }