checkLogin($username,$password)) { $_SESSION['session_user_id'] = $dbf->getUserID($username,$password); $auth = $dbf->idToField($cfg_tableprefix.'users','type',$_SESSION['session_user_id']); if($auth=="Sales Clerk" && !$dbf->idToField($cfg_tableprefix.'users','customerID',$_SESSION['session_user_id'])){ header("location: users/user_customer_link.php"); exit(); } if($auth=="Sales Clerk"){ $tablename="$cfg_tableprefix".'visits'; $tdin = date('Y-m-d H:i:s'); $field_names=array('userID','intime','activity'); $adminID = $dbf->idToField($cfg_tableprefix.'users','customerID',$_SESSION['session_user_id']); //$field_data=array("$adminID", "$tdin", "Administrator"); //$dbf->insert($field_names, $field_data, $tablename, ""); $sec->signinMember($adminID, $tdin, "Administrator"); } header("location: index.php"); } else { echo "