จองคิวเข้าเยียมชมอุทยานวิทยาศาสตร์พระจอมเกล้า ณ หว้ากอ

จังหวัดประจวบคีรีขันธ์

','',''); ?>
'; echo $exday1.'
'; echo $exday2.'
'; echo $exday3.'
'; echo $exday4.'
'; echo $exday5.'
'; echo $exday6.'
'; echo $exday7.'
'; echo $type.'
'; echo $org.'
'; echo $resercount.'
'; echo $province.'
'; echo $resername.'
'; echo $tel.'
'; echo $email.'
'; echo $uploadday.'
'; echo $uploadtime.'
'; if ($exday1 == "18"){ } $strSQL = "INSERT INTO ".$tablename." (ID,exday18,exday19,exday20,exday21,exday22,exday23,exday24,resertype,reserorg,resercount,reserprovince,resername,resertel,reseremail,uploadday,uploadtime)"; $strSQL = $strSQL."VALUES('','$exday1','$exday2','$exday3','$exday4','$exday5','$exday6','$exday7','$type','$org','$resercount','$province','$resername','$tel','$email','$uploadday','$uploadtime')"; if (! mysql_query($strSQL)){ $dberr="mysql_errer"; return false; } mysql_close(); return true; }//จบinsertdata function resercount($tablename,$year,$month,$day){ //$month_array=array("01"=>"มกราคม","02"=>"กุมภาพันธ์","03"=>"มีนาคม","04"=>"เมษายน","05"=>"พฤษภาคม","06"=>"มิถุนายน","07"=>"กรกฎาคม","08"=>"สิงหาคม","09"=>"กันยายน","10"=>"ตุลาคม","11"=>"พฤษจิกายน","12"=>"ธันวาคม"); $month_array=array("1"=>"มกราคม","2"=>"กุมภาพันธ์","3"=>"มีนาคม","4"=>"เมษายน","5"=>"พฤษภาคม","6"=>"มิถุนายน","7"=>"กรกฎาคม","8"=>"สิงหาคม","9"=>"กันยายน","10"=>"ตุลาคม","11"=>"พฤษจิกายน","12"=>"ธันวาคม"); $day_array=array(0 => "อาทิตย์", 1 => "จันทร์", 2 => "อังคาร", 3 => "พุทธ", 4 => "พฤหัสบดี", 5 => "ศุกร์", 6 => "เสาร์"); $shortday_array=array(0 => "อา", 1 => "จ", 2 => "อ", 3 => "พ", 4 => "พฤ", 5 => "ศ", 6 => "ส"); echo '

'; echo 'วันที่ '.$day.' '; echo 'เดือน '.$month_array[$month].' '; echo 'ปี '.($year+543).'
'; $strSQL = "SELECT * FROM ".$tablename." WHERE bookDate LIKE '%$day/$month/$year%' ORDER BY ID"; $result = mysql_query($strSQL); //echo 'ฟังก์ชั่น resercount'.$strSQL.'
'; //echo $strSQL.'
'; $Num_Rows = mysql_num_rows($result); echo 'มีการจองคิว '.$Num_Rows.' รายการ
'; $daycount = 0; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; if ($_SESSION['login_true'] == "adminwaghor"){ echo ''; echo ''; }else{ echo ''; } echo ''; $numcount = 1; while ($row = mysql_fetch_array($result)){ $resertype = stripslashes($row["resertype"]); $reserorg = stripslashes($row["reserorg"]); $resercount = stripslashes($row["resercount"]); $reserprovince = stripslashes($row["reserprovince"]); $resername = stripslashes($row["resername"]); $resertel = stripslashes($row["resertel"]); $reseremail = stripslashes($row["reseremail"]); $uploadday = stripslashes($row["uploadday"]); $uploadtime = stripslashes($row["uploadtime"]); $daycount = $daycount + $resercount; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; if ($_SESSION['login_true'] == "adminwaghor"){ echo ''; echo ''; }else{ echo ''; } echo ''; $numcount++; } echo 'วันนี้มีผู้จอง จำนวน '.$daycount.' คน

'; //return $daycount.'
'; echo '
ลำดับที่ชื่อผู้จองหน่วยงานจังหวัดจำนวนผู้เข้าชมเบอร์โทรศัพท์e-mail
'.$numcount.''.$resername.''.$reserorg.''.$reserprovince.''.$resercount.''.$resertel.''.$reseremail.'
'; } function Showdatabase() { global $tablename; $day = mysql_real_escape_string($_GET['day']); $month =(int)mysql_real_escape_string($_GET['month']); $year = mysql_real_escape_string($_GET['year']); resercount($tablename,$year,$month,$day); } if ($tablename == "booking"){ if ((($exday1)or($exday2)or($exday3)or($exday4)or($exday5)or($exday6)or($exday7))and $resercount and $resername and $tel){ $result=insertData($exday1,$exday2,$exday3,$exday4,$exday5,$exday6,$exday7,$type,$org,$resercount,$province,$resername,$tel,$email); if (! $result){ echo "ไม่สามารถเพิ่มข้อมูลการจองได้"; }else{ echo"เพิ่มข้อมูลเรียบร้อยแล้ว"; if ($tablename == "booking"){ echo ""; } } }else{ Showdatabase(); //Showdatabase2(); } }else{ echo''; } ?>