include "../config.inc.php";
$thai_month_arr=array(
"0"=>"",
"1"=>"January",
"2"=>"February",
"3"=>"March",
"4"=>"April",
"5"=>"May",
"6"=>"June",
"7"=>"July",
"8"=>"August",
"9"=>"September",
"10"=>"October",
"11"=>"November",
"12"=>"December"
);
function thai_date($time){
global $thai_day_arr,$thai_month_arr;
//$thai_date_return="วัน".$thai_day_arr[date("w",$time)];
$thai_date_return.= date("j",$time);
$thai_date_return.= " ".$thai_month_arr[date("n",$time)];
$thai_date_return.= " ".(date("Y",$time)+543);
//$thai_date_return.= " ".date("H:i",$time)." น.";
return $thai_date_return;
}
?>
 |
|
 |
|
|
 |
|
if($_POST[per_id] == "")
{
$today = getdate();
$y_check = $today[year];
$m_check = $today[mon];
$d_check = $today[mday];
//$time_check = date("h");
$tmpid = date("His");
?>
}else{
$per_id = $_POST['per_id'];
$today = getdate();
$y_check = $today[year];
$m_check = $today[mon];
$d_check = $today[mday];
$m_word = $thai_month_arr[$m_check];
$time_check = date("h");
$date_set0 = '29/04/2021'; $time_set0 = "13:30";
$date_set1 = '29/04/2021'; $time_set1 = "15:00";
$date_set2 = '30/04/2021'; $time_set2 = "13:30";
$date_set3 = '30/04/2021'; $time_set3 = "15:00";
$date_txt0 = 'April 29, 2021'; $time_txt0 = "01:30 P.M - 02:30 P.M.";
$date_txt1 = 'April 29, 2021'; $time_txt1 = "03:00 P.M.- 04:00 P.M.";
$date_txt2 = 'April 30, 2021'; $time_txt2 = "01:30 P.M - 02:30 P.M.";
$date_txt3 = 'April 30, 2021'; $time_txt3 = "03:00 P.M.- 04:00 P.M.";
/* $date_set4 = '27/09/2018'; $time_set4 = "09:00";
$date_set5 = '27/09/2018'; $time_set5 = "10:30";
$date_set6 = '28/09/2018'; $time_set6 = "09:00";
$date_set7 = '28/09/2018'; $time_set7 = "10:30";
$date_txt4 = 'October 27, 2018'; $time_txt4 = "09:00 A.M - 10:00 A.M.";
$date_txt5 = 'October 27, 2018'; $time_txt5 = "10:30 A.M.- 11:30 A.M.";
$date_txt6 = 'October 28, 2018'; $time_txt6 = "09:00 A.M - 10:00 A.M.";
$date_txt7 = 'October 28, 2018'; $time_txt7 = "10:30 A.M.- 11:30 A.M.";*/
if ($per_id <> '1659900041677')
{
if ($d_check > 15 ) // If date more than 10th of this month cannot register CEPT //
{
exit("");
}
}
if ($d_check < 2 ) // If date less than 2nd of any month cannot registe CEPT //
{
exit("");
}
$date_check = date("d");
$time_check = date("H");
if($date_check == 2 and $time_check < 10)
//Server time more than Real Time 1 Hour
// Real Time 9:00 == Server Time 10:00
{
exit("");
/*exit("");*/
}
// End Check Date //---------------------------/////////////////////////////////
////////////////// 1st Start //////////////////////////////////////////////////////////////////////////////////////////
//Find Student Info from graduate_info
$sql = "SELECT * FROM testing_staff_info WHERE per_id = '$per_id'";
$sqlquery = mysql_db_query($dbname, $sql);
$numrow = mysql_num_rows($sqlquery);
$array = mysql_fetch_array($sqlquery);
if($numrow == 0)
{
//not found show alert message
exit("");
}
////////////////// 1st End //////////////////////////////////////////////////////////////////////////////////////////
?>
mysql_close();
}
?>
|
 |
|
|
|
|