|
|
|
|
if($_POST[stuid] == "")
{
$today = getdate();
$y_check = $today[year];
$m_check = $today[mon];
$d_check = $today[mday];
//$time_check = date("h");
$tmpid = date("His");
?>
}else{
$stuid = $_POST['stuid'];
$today = getdate();
$y_check = $today[year];
$m_check = $today[mon];
$d_check = $today[mday];
$m_word = $thai_month_arr[$m_check];
if ($d_check > 28 and $_POST['stuid'] <> "55074266") // If date more than 10th of this month cannot register CEPT //
{
//exit("");
exit("");
}
if ($d_check < 1 and $_POST['stuid'] <> "55074266") // If date less than 2nd of any month cannot register CEPT //
{
exit("");
}
$date_check = date("d");
$time_check = date("H");
if($date_check == 1 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 //////////////////////////////////////////////////////////////////////////////////////////
/*$sql = "SELECT * FROM testing_reg_cambridge WHERE stuid = '$stuid' and date_test = '28/03/2020'";
$sqlquery = mysql_db_query($dbname, $sql);
$numrow = mysql_num_rows($sqlquery);
$array = mysql_fetch_array($sqlquery);
if($numrow == 0)
//Find Student Info from graduate_info
$sql = "SELECT * FROM testing_graduate_student_info WHERE stuid = '$stuid'";
$sqlquery = mysql_db_query($dbname, $sql);
$numrow = mysql_num_rows($sqlquery);
$array = mysql_fetch_array($sqlquery);
if($numrow == 0)
{*/
//not found in graduate_info go to find in bachelor_info
/* $sql = "SELECT * FROM testing_bachelor_student_info WHERE stuid = '$stuid'";
$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("");
}*/
$class_year = substr($stuid, 0, 2);
$class = 64-$class_year;
if( $class == 0 )
{
$class = 1;
}
//////////-------------------------------------------------------------------------------------//////////
if( $stuid=='60032162' or $stuid=='62030593' or $stuid=='59032699')
{
exit("");
}
//$sql_allow = "SELECT * FROM testing_temp_2562_allow WHERE stuid = '$stuid'";
$sql_allow = "SELECT * FROM testing_reg_cambridge WHERE stuid = '$stuid' and date_test = '29/08/2020' and (test_time = '09:00' or test_time = '10:30') ";
$sqlquery_allow = mysql_db_query($dbname, $sql_allow);
$numrow_allow = mysql_num_rows($sqlquery_allow);
$array = mysql_fetch_array($sqlquery_allow);
if($numrow_allow == 1)
{
}else{
exit("");
}
$s = "bachelor";
////////////////// 1st End //////////////////////////////////////////////////////////////////////////////////////////
?>
mysql_close();
}
?>
|
|
|
|