หน้าหลัก | กำหนดการเรียน | ประมวลวิชา | เข้าห้องเรียน | แหล่งค้นคว้า | ถาม-ตอบ | ห้องสนทนา | ข้อมูลผู้เรียน | ข้อมูลผู้สอน | ติดต่อ |
//Username,Password สำหรับลบ Guestbook****(ควรจะเปลี่ยน)
$username="admin";
$password="nok123";
$listpage=10;//จำนวนที่จะแสดงต่อ1หน้า
$question="ผลการเรียนที่ท่านคาดหวังในรายวิชานี้ อยู่ในระดับใด";
$Choice=array("ดีมาก","ดี","พอใช้","ต้องปรับปรุง");
//ตั้งค่าความต่างของเวลา Server กับ ประเทศไทย
$hour = 0; //ปรับให้ตรงตามต้องการ
$min = 0; //ปรับให้ตรงตามต้องการ
$Year = date("y")+43;
$thaimonth=array("ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.", "พ.ย.","ธ.ค.");
//3 ต.ค.45
$mdate = date("j ").$thaimonth[date("m")-1]."".$Year.date(" - H:i ",mktime( date("H")+$hour, date("i")+$min ));
$power=" ",$text); $text = eregi_replace ( "<","<",$text); $text = eregi_replace ( ">",">",$text); return ($text); } //ฟังก์ชั่นตัดคำหยาบซึ่งสามารถเพิ่มคำที่ต้องการตัดได้ function CheckRude($text){ $wordrude = array( "ashole","a s h o l e","a.s.h.o.l.e","bitch","b i t c h","b.i.t.c.h","shit","s h i t","s.h.i.t","fuck", "dick","f u c k","d i c k","f.u.c.k","d.i.c.k","มึง","มึ ง","กู","ควย","ค ว ย","ค.ว.ย", "คอ วอ ยอ","คอ-วอ-ยอ","ปี้","เหี้ย","เฮี้ย","ชาติหมา","ชาดหมา","ช า ด ห ม า","ช.า.ด.ห.ม.า","ช า ติ ห ม า", "ช.า.ติ.ห.ม.า","ไอ้","สัดหมา","สัด","เย็ด","หี","สันดาน","แม่ง","ระยำ","ส้นตีน","แตด") ; $wordchange = ("+++") ; for ( $i=0 ; $i
ลงทเบียนก่อนเข้าชั้นเรียนนะคะ "; $totalfile=fopen("total.txt","r"); $total=fread($totalfile,filesize("total.txt")); echo"มีผู้เข้าเรียนทั้งหมด $total คน "; fclose($totalfile); if(empty($action)) echo"$power"; if($action=="sign") { Formguest(); } if($sign) { $total=$total+1; $listfile="./list/user$total.txt"; if($homepage=="") $homepage="nohomepage"; $openlistfile=fopen($listfile,"w"); $name=Check($name); $email=Check($email); $name=CheckRude($name); $email=CheckRude($email); if(fputs($openlistfile,"$name\n$email\n$homepage\n$list_choice\n$comment\n$mdate")) echo" ****ได้รับข้อมูลแล้วครับ****"; else echo" !!!!ไม่สามารถบันทึกข้อมูลได้!!!!"; fclose($openlistfile); $totalfile=fopen("total.txt","w"); fputs($totalfile,$total); fclose($totalfile); } if($action=="view") { $font="cc9933"; if(isset($nextpage)) $nextpage=$nextpage; else $nextpage=1; for($i=$nextpage;$i<$nextpage+$listpage;$i++) { $listfile="./list/user$i.txt"; if(file_exists($listfile)) { echo"
"; } else echo" "; if($i==$total) break; } $over=$total%$listpage; if($over!=0) $totalpage=floor($total/$listpage)+1; else $totalpage=floor($total/$listpage); if($total>$listpage) { echo"หน้าที่"; for($i=1;$i<=$totalpage;$i++) { $nextpage=($i-1)*$listpage; $nextpage=$nextpage+1; echo"$i "; } } } if($action=="delete") { if(!$loggin) { AdminLogin($no); } else { if(($uname==$username) and ($pword==$password)) { if(!$confirm) { $font="cc9933"; $listfile="./list/user$no.txt"; $listarr=file($listfile); echo" คุณต้องการลบไช่หรือไม่"; echo""; echo" "; } else { $file="./list/user$no.txt"; if(unlink($file)) echo" ****ลบไฟล์สำเร็จ****"; else echo" !!!!ลบไฟล์ไม่สำเร็จ!!!!!"; } } else { echo" |
ต.ขุนกระทิง อ.เมือง จ.ชุมพร 86190 โทร. 0-7753-4279 โทรสาร. 0-7753-4277 |