include "../config.inc.php";
$thai_month_arr=array(
"0"=>"",
"1"=>"มกราคม",
"2"=>"กุมภาพันธ์",
"3"=>"มีนาคม",
"4"=>"เมษายน",
"5"=>"พฤษภาคม",
"6"=>"มิถุนายน",
"7"=>"กรกฎาคม",
"8"=>"สิงหาคม",
"9"=>"กันยายน",
"10"=>"ตุลาคม",
"11"=>"พฤศจิกายน",
"12"=>"ธันวาคม"
);
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[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];
$stuid_check = substr($stuid,0,2);
/* exit(""); */
if ($stuid_check <> 60)
{
exit("");
}
if ($d_check > 18 ) // If date more than 10th of this month cannot register CEPT //
{
exit("");
}
if ($d_check < 1 ) // 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 //////////////////////////////////////////////////////////////////////////////////////////
//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)
{
exit("");
}
else
{
//set graduate value for use in next conditions
$s = "grad";
}
//////////-------------------------------------------------------------------------------------//////////
//Check Student Status
if( $array['status'] <> "10" and $array['status'] <> "11" and $array['status'] <> "12")
{
exit("");
}
//////////-------------------------------------------------------------------------------------//////////
//find Result from Roster by Student ID if more than B2 can not register
$sql_level_2 = "select * from testing_roster_nuset where stuid = '$stuid' ";
$sqlquery2 = mysql_db_query($dbname,$sql_level_2);
$chk02= @mysql_num_rows($sqlquery2);
if ($chk02 == 0 )
{
}else{
while ($array2 = mysql_fetch_array($sqlquery2))
{ //echo $array2['result']." ";
exit("");
}
}
////////////////// 1st End //////////////////////////////////////////////////////////////////////////////////////////
?>
mysql_close();
}
?>
|
|
|
|
|