format("Y-m-d"); $toTime =Explode(":", date('H:i:s')); $tDate = explode("-",$toDate); $mycDay=$tDate[2]; $mycMonth=$tDate[1]; $mycYear=$tDate[0]; $myTime = $toTime[0]; $myMinute = $toTime[1]; $mySecond = $toTime[2]; $currentTime = $myTime . ':' . $myMinute . ':' . $mySecond; ///*onfocus="this.value=''"> */ //error if other account is not activated all accounts cannot log in if (logged_in() === true){ $session_user_id = $_SESSION['user_id']; $user_data = user_data($session_user_id,'talent_id','token','expired_date','link','fname','lname'); if(user_active($user_data['user_name']) == false) { session_destroy(); Header('Location: logout.php'); } } //if (user_active($username) $errors = array(); $err_count; function secalert(){ echo "


Security Alert!

Sorry, You are not allowed to access this page. Please contact your System Administrator for assistance. Thank you!

"; exit; } function login_update(){ $user=$user_data['user_name']; $login="INSERT INTO `log_history` (`log_id`,`username`,`type`,`date`,`time`) VALUES('','$user','IN','$toDate','$currentTime')"; if(!mysql_query($login)) { die('Error: ' . mysql_error()); } } function logout_update(){ $user=$user_data['user_name']; $login="INSERT INTO `log_history` (`log_id`,`username`,`type`,`date`,`time`) VALUES('','$user','OUT','$toDate','$currentTime')"; if(!mysql_query($login)) { die('Error: ' . mysql_error()); } } ?>