Server IP : 202.29.229.35 / Your IP : 18.119.120.88 Web Server : Apache System : Linux aapanel2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 User : www ( 1001) PHP Version : 5.5.38 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/www.ivecr2.ac.th/connect/ |
Upload File : |
<?php include("connect.php"); // ฟังก์ชันแปลงวันเดือนปีเป็นรูปแบบไทยแบบเต็ม function displaydate($date){ $thai_m=array("มกราคม", "กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"); $date_array=explode("-",$date); $y=$date_array[0]; $m=$date_array[1]-1; $d=$date_array[2]; $m=$thai_m[$m]; $y=$y+543; $displaydate="$d $m $y"; return $displaydate; } function displaydatethai($date){ $thai_m=array("มกราคม", "กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"); $date_array=explode("-",$date); $y=$date_array[0]; $m=$date_array[1]-1; $d=$date_array[2]; $m=$thai_m[$m]; $y=$y; $displaydatethai="$d $m $y"; return $displaydatethai; } function displaydatekru($date){ $thai_m1=array("ม.ค.", "ก.พ.","มี.ค.","เม.ย","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."); $date_array1=explode("-",$date); $y1=$date_array1[0]; $m1=$date_array1[1]-1; $d1=$date_array1[2]; $m1=$thai_m1[$m1]; $y1=$y1+543; $displaydatekru="$d1 $m1 $y1"; return $displaydatekru; } function rude($word){ $word_cut = array("ไอ้","อี","มึง","กู"); $ban = "***"; for ($i=0 ; $i<sizeof($word_cut) ; $i++) { $word = eregi_replace($word_cut[$i],$ban,$word); } return $word; } //ตรวจสอบนามสกุลไฟล์ต่างๆ function checklanfile($txt,$photo_size){ if($txt=="jpg" or $txt=="jpeg" or $txt=="gif" or $txt=="png"){ $photo_size/=1024; return $photo_size; }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง')</script>"; echo '<meta http-equiv="refresh"content="0;url=index1.php">'; exit(); } } //ตรวจสอบนามสกุลไฟล์ต่างๆ function checkdownfile($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="jpg"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง ไฟล์ต้องเป็น .jpg เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=visanu_from">'; exit(); } } function checkdownfilepdf($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=Procure">'; exit(); } } function checkfilepdfsar($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=ad_sar-amantarana">'; exit(); } } function checkfilepdfsarsc($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=ad_sar-class">'; exit(); } } function checkfilepdfsarTecher($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=ad_sar-Techer">'; exit(); } } function checkfilepdfsarDpm($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=ad_sar-department">'; exit(); } } function checkfilepdfsarGol($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=ad_sar-Golrayut">'; exit(); } } function checkfilepdfsarplan($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=ad_sar-plan">'; exit(); } } function checkfilepdfsarStd($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=ad_sar-Standard">'; exit(); } } function echoDepartmentName($rsdpm1){ if($rsdpm1==1){ echo "ช่างยนต์"; }else if($rsdpm1==2){ echo "ช่างกลโรงงาน"; }else if($rsdpm1==3){ echo "ช่างเชื่อมโลหะ"; }else if($rsdpm1==4){ echo "ช่างไฟฟ้ากำลัง"; }else if($rsdpm1==5){ echo "ช่างอิเล็กทรอนิกส์"; }else if($rsdpm1==6){ echo "เทคโนโลยีคอมพิวเตอร์"; }else if($rsdpm1==7){ echo "ช่างก่อสร้าง"; }else if($rsdpm1==8){ echo "เทคนิคอุตสาหกรรม"; }else if($rsdpm1==9){ echo "เทคโนโลยีสารสนเทศ"; }else if($rsdpm1==10){ echo "ศิลปกรรม"; }else if($rsdpm1==11){ echo "คหกรรมศาสตร์"; }else if($rsdpm1==12){ echo "อาหารและโภชนาการ"; }else if($rsdpm1==13){ echo "การบัญชี"; }else if($rsdpm1==14){ echo "การขายและการตลาด"; }else if($rsdpm1==15){ echo "คอมพิวเตอร์ธุรกิจ"; }else if($rsdpm1==16){ echo "การจัดการโลจิสติกส์"; }else if($rsdpm1==17){ echo "เทคนิคพื้นฐาน"; }else if($rsdpm1==18){ echo "สามัญสัมพันธ์"; } } function checkdownfilepdfper($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=personnel_from">'; exit(); } } function checkdownfilepdfNewEducation($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ไม่ถูกต้อง เอกสาร ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=newEducation">'; exit(); } } function checkdownfilepdfpro($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf" || $txt=="zip" || $txt=="rar"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ เอกสาร ไม่ถูกต้อง ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=projecTec">'; exit(); } } function checkdownfilepdfSchool($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ เอกสาร ไม่ถูกต้อง ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=Scholarship">'; exit(); } } function checkdownfilecal($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ เอกสาร ไม่ถูกต้อง ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=dp_calendarForm">'; exit(); } } function checkdownfiledpNews($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf" or $txt=="rar" or $txt=="zip" or $txt=="doc" or $txt=="docx" or $txt=="xls" or $txt=="xlsx"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ เอกสาร ไม่ถูกต้อง ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=pdNews">'; exit(); } } //ตรวจสอบขนาดไฟล์ function checksizefile($txt){ if($txt>500){ echo "<script language='javascript'>alert('ไฟล์มีขนาดใหญ่เกินไป')</script>"; echo '<meta http-equiv="refresh"content="0;url=index1.php">'; exit(); } } //ตรวจสอบรูปแบบอีเมล์ function checkemail($checkemail){ if(ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-]",$checkemail)){ return true; }else{ return false; } } //ตรวจสอบเบอร์โทรศัพท์ว่าใช่ตัวเลขหรือไม่ function checknumerice($checknumerice){ if(ereg("[0-9]",$checknumerice)){ return true; }else{ return false; } } // ตรวจสอบคำหยาบ function checkrude ($check_ment){ $filerude='checkrude.txt'; $fopen=fopen($filerude,'r'); $date=fread($fopen,filesize($filerude)); fclose($fopen); $rude_word=explode("\n",trim($date)); $replace='<font color="PINK">*****</font>'; for($i=0;$i<count($rude_word);$i++){ $check_ment=str_replace(trim($rude_word[$i]),$replace,$check_ment); } return $check_ment; } function checkfilepdfsubdata($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ เอกสาร ไม่ถูกต้อง ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=subject_dataall">'; exit(); } } function checkdownfilecouse($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ เอกสาร ไม่ถูกต้อง ไฟล์ต้องเป็น .pdf เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=subject_couseFrom">'; exit(); } } function checkdownfilestdk($txt){ //if($txt=="rar" or $txt=="pdf" or $txt=="doc" or $txt=="docx" or $txt=="zip" or $txt=="xls" or $txt=="ppt" or $txt=="jpg"){ if($txt=="pdf" or $txt=="jpg" or $txt=="zip" or $txt=="rar" or $txt=="gif"){ }else{ echo "<script language='javascript'>alert('นามสกุลไฟล์ เอกสาร ไม่ถูกต้อง ไฟล์ต้องเป็น .pdf .jpg .zip .rar .gif เท่านั้น')</script>"; echo '<meta http-equiv="refresh"content="0;url=index.php?i=stdjob_Frm">'; exit(); } } ?>