|
![](img/topic/topic_upcoming.jpg) |
![](img/icon/annouce.gif) |
นิสิตคณะวิศวกรรมศาสตร์ ที่จะลงทะเบียนอบรมภาษาอังกฤษ (กรณีฝึกงาน)
ให้นิสิตติดต่อลงชื่อที่สำนักงานคณะวิศวะฯ เท่านั้น !!! |
![](img/title_table/month.png) |
![](img/title_table/title.png) |
![](img/title_table/content.png) |
![](img/title_table/limit.png) |
![](img/title_table/register.png) |
![](img/title_table/namelist.png) |
include "../config.inc.php";
$sql = "SELECT * FROM training_courses_new where status = 'open' ORDER by id desc";
$regist_result = mysql_db_query($dbname,$sql);
$numrow = mysql_num_rows($regist_result);
if($numrow != 0)
{
$i=1;
while($array = mysql_fetch_array($regist_result))
{
if($bg == "#EFEBFE") { //ส่วนของการ สลับสี
$bg = "#FEFEF1";
} else {
$bg = "#EFEBFE";
}
$course = $array['title'];
$group = $array['num'];
$course_year = $array['course_year'];
$month= substr($course_year, 4, 5);
$year= substr($course_year, 0, 4);
$thai_month_arr=array(
"0"=>"",
"01"=>"มกราคม",
"02"=>"กุมภาพันธ์",
"03"=>"มีนาคม",
"04"=>"เมษายน",
"05"=>"พฤษภาคม",
"06"=>"มิถุนายน",
"07"=>"กรกฎาคม",
"08"=>"สิงหาคม",
"09"=>"กันยายน",
"10"=>"ตุลาคม",
"11"=>"พฤศจิกายน",
"12"=>"ธันวาคม"
);
$thai_month = $thai_month_arr[$month];
$thai_year = $year+543;
if($array['num']== 0)
{ $group = "-";
}
$sql_chk = "SELECT * FROM training_reg WHERE course = '$course' and groups = '$group'";
$sqlquery_chk = mysql_db_query($dbname, $sql_chk);
$numrow_chk = mysql_num_rows($sqlquery_chk);
?>
|
if($i <= 15) //number of new_icon
{
echo " ";
}
?>
|
รายละเอียด
|
/ |
////////////////////////////////////////////////////////////////////
//Check Date
$today = getdate();
$y_check = $today['year']+0;
$m_check = $today['mon']+0;
$d_check = $today['mday']+0;
$date_test = $array['date_add'];
$y_add = substr($date_test, -4)+1; //Full Date Test = dd/mm/yyyy, 10 Digits
$m_add = substr($date_test,3,2)+0;
$d_add = substr($date_test,0,2)+0;
//echo "Today is ===> $d_check/$m_check/$y_check ";
//echo "Add Date is ===> $y_add/$m_add/$d_add ";
//if($y_check == $y_add and $m_check == $m_add and $d_check >= 1 )
if( is_numeric($y_check) )
{
$regis_check = "Yes";
}elseif($y_check == $y_add and $m_check > $m_add)
{
$regis_check = "Yes";
}else
{
$regis_check = "No";
}
//echo "$regis_check ";
// End Check Date ///////////////////////////////////////////////////
//if($numrow_chk < $array[capacity]){ // Old Check Capacity from Database
if($numrow_chk < $array['capacity'])
{ // New Check Capacity from 200 peoples
if($regis_check == "Yes" and $course != "CEPT Preparation Level 1" and $course != "CEPT Preparation Level 2" and $course != "CEPT Preparation Level 3")
{
?>
}else if($course == "CEPT Preparation Level 1" or $course == "CEPT Preparation Level 2" or $course == "CEPT Preparation Level 3")
{
?>
}
else
{
echo " ";
}
}else
{
echo " ";
}
?>
|
![](img/icon/namelist.png) |
$i++;
}
}else
{
echo ":::: ยังไม่มีหลักสูตรเปิดใหม่ในขณะนี้ ::::";
}
mysql_close();
?>
|
![](img/icon/spacer.gif) |
|
|