conn,$cfg_theme,$cfg_currency_symbol,$lang); if(!$sec->isLoggedIn()) { header ("location: ../login.php"); exit(); } echo "Processing..."; //check to make sure it's a number if(!strval(floatval($_POST[openCount])) == strval($_POST[openCount])){ echo ""; exit(); } //check to make sure it was the administrator who counted if(!$_POST[counter]){ echo ""; exit(); } //$tablename = $cfg_tableprefix.'users'; $userLoginName = $dbf->idToField($cfg_tableprefix.'users','username',$_SESSION['session_user_id']); $tablename="$cfg_tableprefix".'books'; $field_names=null; $field_data=null; $today = date('Y-m-d'); $adminID = $_SESSION['session_user_id']; $field_names=array('date','event','user','ammount','data'); $field_data=array("$today", "open", "$adminID","$_POST[openCount]","$_POST[mechID]"); $dbf->insert($field_names,$field_data,$tablename,""); $tablename="$cfg_tableprefix".'visits'; $tdin = date('Y-m-d H:i:s'); $field_names=array('userID','intime','activity'); $field_data=array("$_POST[mechID]", "$tdin", "Mechanic"); $dbf->insert($field_names, $field_data, $tablename, ""); $adminID = $dbf->idToField($cfg_tableprefix.'users','customerID',$_SESSION['session_user_id']); $field_data=array("$adminID", "$tdin", "Administrator"); $dbf->insert($field_names, $field_data, $tablename, ""); //$query = "INSERT INTO 'visits' ('userID' ,'intime' ,'activity') VALUES ('$_POST[mechID]', '$tdin', '\"using\"')"; //mysql_query($query); echo ""; $dbf->closeDBlink(); ?>