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,'user_password1', 'inquiry','reports_access','billing_access','level','mt','edit','qa','isLocked','report_list','profile_access','user_id', 'user_name','first_name','middle_name','email','contact_info','last_name','delete','voice_upload','voice_download','report_upload','mtfile_access','active','doctors_data','mt_charging'); 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()); } } ?>