format("m/d/Y"); $toTime =Explode(":", date('H:i:s')); $tDate = explode("/",$toDate); $mycDay=$tDate[1]; $mycMonth=$tDate[0]; $mycYear=$tDate[2]; $myTime = $toTime[0]; $myMinute = $toTime[1]; $mySecond = $toTime[2]; $currentTime = $myTime . ':' . $myMinute . ':' . $mySecond; $date = new DateTime($toDate); $week = $date->format("W"); //echo $week; ///*onfocus="this.value=''"> */ //error if other account is not activated all accounts cannot log in if (logged_in() === true){ $session_user_id = $_SESSION['u_id']; $user_data = user_data($session_user_id,'u_id','u_password2','u_password','u_name','u_position','u_fname','u_lname','u_status','u_locked', 'u_locked_count','account_type','u_password'); if(user_active($user_data['u_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!

"; } function secalert_new(){ echo "


Security Alert!

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

Thank you!

"; } function labalert(){ echo "


Security Alert!

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

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