Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

 

 
กระดานสนทนา
<?php //(1) #1@'%2C+I#1@'%2@!7-D" #55H server -"9H5H@!7-- B"'2!*31-"9H5H1'A# $hour A%0 $min $hour = 0; //#1C+I#2!I-2# $min = 10; //#1C+I#2!I-2# $Year = date("Y")+543; $thaiweekFull=array("'1-24"L 5H","'11#L 5H","'1-12# 5H","'18 5H","'1$+1*5 5H","'1(8#L 5H","'1@*2#L 5H"); $thaimonthFull=array("!#2!","8! 21L","!52!","@!)2"","$) 2!","!482"","#2!","*4+2!","1"2"","8%2!", "$(42"","1'2!"); $thaimonth=array("!..","..","!5..","@!.".","..","!4.".","..","*..",".".","..", ".".",".."); //8*2!2#@%7-C I2DI 3 -"H27-.. $mdate +#7- $ThaiDate +#7- $ThaiDateFull // 3 *.. 2544 $mdate = date("j ",mktime( date("H")+$hour, date("i")+$min )). $thaimonth[date("m")-1]." ".$Year; // 3 *.. 2544 @'%2 12:36 . $ThaiDate = date("j ").$thaimonth[date("m")-1]." ".$Year.date(" @'%2 H:i .",mktime( date("H")+$hour, date("i")+$min )); // '1(8#L5H 3 *.. 2544 @'%2 12:36 . $ThaiDateFull = $thaiweekFull[date("w")]. date(" j "). $thaimonthFull[date("m")-1]. " ". $Year . date(" @'%2 H:i .",mktime( date("H")+$hour, date("i")+$min )); // DIH2@G '425 125 .(.1900 $Logtime = date("U",mktime( date("H")+$hour, date("i")+$min )); //(2) 1L 1H13+"2 6H*2!2#@4H!35HI-2#1DI function CheckRude($temp){ $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","!6","!6 ","! 6 ","! 6","!6","!6.","!6_","!6-","!6+","9","'""," ' "",".'."","- '- "-","--'--"-","5I","@+5I"","D-I@+5I"","@.5I""," 24+!2"," 2+!2","  2  + ! 2"," .2..+.!.2","  2 4 + ! 2"," .2.4.+.!.2","*1+!2","*1","@"G","+5","*12","A!H","#0"3","*I5","A") ; $wordchange = ("<font color=red>+++</font>") ; for ( $i=0 ; $i<sizeof($wordrude) ; $i++ ){ $temp = eregi_replace ($wordrude[$i] ,$wordchange ,$temp); } return ( $temp ) ; } //(3) 1L 1HA##9 2*2!2#@4H!#9DI function CheckSmile($temp){ global $url; $text = array( ":sad:",":red:", ":big:", ":ent:", ":shy:", ":sleepy:", ":sun:", ":sg:", ":embarass:", ":dead:", ":cool:", ":clown:", ":pukey:", ":eek:", ":roll:", ":smoke:", ":angry:", ":confused:", ":cry:", ":lol:", ":yawn:", ":devil:", ":tongue:", ":alien:",":tasty:",":crazy:",":agree:",":disagree:",":bawling:", ":crap:",":crying1:",":dunce:",":error:",":evil:",":lookaroundb:",":laugh:",":pimp:",":spiny:",":wavey:",":smash:",":angry:", ":brain:",":phone:",":zip:",":download:",":beer:",":censore:",":nolove:",":cranium:"); $pic =array( "frown.gif","redface.gif","biggrin.gif","blue.gif","shy.gif","sleepy.gif","sunglasses.gif", "supergrin.gif","embarass.gif", "dead.gif","cool.gif","clown.gif","pukey.gif","eek.gif","sarcblink.gif","smokin.gif","reallymad.gif","confused.gif","crying.gif", "lol.gif","yawn.gif","devil.gif","tongue.gif","aysmile.gif","tasty.gif","grazy.gif","agree.gif","disagree.gif","bawling.gif", "crap.gif","crying1.gif","dunce.gif","error.gif","evil.gif","lookaroundb.gif","laugh.gif","pimp.gif","spiny.gif","wavey.gif","smash.gif","angry.gif", "brain.gif","phone.gif","zip.gif","download.gif","beer.gif","censore.gif","nolove.gif","cranium.gif"); for ($i=0 ; $i<sizeof($text) ; $i++) { $temp = eregi_replace($text[$i],"<img src=\"./pic/$pic[$i]\">",$temp); } return($temp); } //(4) 1L 1H#'*-2#A# Link A%0 Tag function CheckTag($temp){ global $url; $temp = stripslashes(htmlspecialchars($temp)); $temp = eregi_replace ( "<" , "&lt;" , $temp ) ; $temp = eregi_replace ( ">" , "&gt;" , $temp ) ; $temp = eregi_replace ( "\n", "<br>" , $temp ) ; //*3+#1@%5H"-1#05H3+ C+I@GA html H2F $temp = eregi_replace ( "\[b\]", "<b>" , $temp ) ; $temp = eregi_replace ( "\[/b\]", "</b>" , $temp ) ; $temp = eregi_replace ( "\[i\]", "<i>" , $temp ) ; $temp = eregi_replace ( "\[/i\]", "</i>" , $temp ) ; $temp = eregi_replace ( "\[u\]", "<u>" , $temp ) ; $temp = eregi_replace ( "\[/u\]", "</u>" , $temp ) ; $temp = eregi_replace ( "\[\-\-\-\]", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" , $temp ) ; $temp = eregi_replace ( "\[color=red\]", "<font color=red>" , $temp ) ; $temp = eregi_replace ( "\[color=green\]", "<font color=green>" , $temp ) ; $temp = eregi_replace ( "\[color=blue\]", "<font color=blue>" , $temp ) ; $temp = eregi_replace ( "\[color=orange\]", "<font color=FF6600>" , $temp ) ; $temp = eregi_replace ( "\[color=pink\]", "<font color=FF00FF>" , $temp ) ; $temp = eregi_replace ( "\[color=gray\]", "<font color=999999>" , $temp ) ; $temp = eregi_replace ( "\[/color\]", "</font>" , $temp ) ; // 3*1HA*#95HA#3*1H@I2!2 $temp = eregi_replace ("\[img\]([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]])\[/img\]", "<img src=\"\\1://\\2\\3\">",$temp ) ; // *#I2%4L URL 5HA#3*1H@I2!2 (#5C+I3*1H url @I2!2) $temp = eregi_replace ("\[url\]([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])\[/url\]","<a href=\"\\1://\\2\\3\" target=\"_blank\">\\1://\\2\\3</a>",$temp ) ; // *#I2%4L URL 5HA#3*1H@I2!2 (H215H2#@'I H-'H2+I2+%1) $temp = eregi_replace (" ([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=]) "," <a href=\"\\1://\\2\\3\" target=\"_blank\">\\1://\\2\\3</a> ",$temp ) ; // *#I2%4L URL 5HA#3*1H@I2!2 (H215H2#@'I H-'H2+%1-"H2@5"') $temp = eregi_replace ("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=]) "," <a href=\"\\1://\\2\\3\" target=\"_blank\">\\1://\\2\\3</a> ",$temp ) ; //*#I2%4L-5@!%L $temp = eregi_replace ("([^[:space:]]*)@([^[:space:]]*)([[:alnum:]])","<a href=\"./mail2me/mail2me.php?wemail=\\1@\\2\\3&name=\\1@\\2\\3\" target=\"_blank\">\\1@\\2\\3</a>",$temp ) ; return ( $temp ) ; } //(5) 1L 1HA*I-'2! %2##032# function Message($Size,$Color,$Message,$Comment,$Link){ $temp = "<br><center>\n"; $temp .= "<table width=$Size% border=0 cellspacing=0 cellpadding=0 bgcolor=#000000>\n"; $temp .= "<tr><td><table width=100% border=0 cellpadding=2 cellspacing=1>\n"; $temp .= "<tr bgcolor=#FFFF99>\n"; $temp .= "<td align=center><br>\n"; $temp .= "<font color=$Color class=size3><b>$Message</b></font>\n"; $temp .= "<br><br>$Comment<br><br>\n"; $temp .= "</td></tr></table></td></tr></table><br>\n"; if(strlen($Link)>0) $temp .= "[ $Link ]\n"; $temp .= "</center>\n"; return ( $temp ) ; } //(7) 1L 1H#'*-2#B*.. C+IB*41DI!2*8 3 #09I function CheckFlood($IP) { include("./config.php"); //1IH2H2F-@'-#L echo "<body bgcolor=#FFFFE0 background='pic/background.jpg'>\n\n"; $fileLastIP = "lastip.txt"; if(file_exists($fileLastIP)) { $FILE=fopen($fileLastIP,"rt"); $last_ip = fgets($FILE,20); fclose($FILE); $last_ip = Chop($last_ip); list ($ipx, $xnum,) = split ('[,]', $last_ip); } if($ipx == $IP) { if ($xnum>=$config[flood]){ $check='no'; } else { $check='yes'; } }else{ $check='yes'; $xnum=0; } if ($check=='no'){ echo Message(55,"red","-- 1"#1!! -82C+IB*41DI@5" $config[flood] #09I","#82%1!2B*C+!HC#2'+I2","<a href='javascript:history.back(1)'>%1DAID</a>"); exit(); } else { $xnum++; $FILE = fopen ( $fileLastIP , "w+" ); fputs ($FILE , "$IP,$xnum"); fclose( $FILE); } return (1); } //(8) 1L 1H#'*-2#B*#09I I3.. function CheckRepeated($QTitle) { include("./config.php"); //1IH2H2F-@'-#L echo "<body bgcolor=#FFFFE0 background='pic/background.jpg'>\n\n"; if(file_exists($config[fileQuestion])) { $question = file($config[fileQuestion]); // A"I-!9%CAH%0##1 --@G4%L"H-" $question[0] 7-#09I%H2*8 $split = explode("|X|",$question[0]); $topic = $split[1]; if ($QTitle == $topic){ echo Message(40,"red","-- 1"#1!! 8B*#09I I3","#82#'*-","<a href='javascript:history.back(1)'>%1DAID</a>"); exit(); } } return (1); } //(9) 1L 1H+23'9I-32! function CountReply($numQuestion) { include("./config.php"); //1IH2H2F-@'-#L // '%9-H2I-!9% -3- A%I'+23'3-1I+! $fileReply = $config[dataDir]."R$numQuestion.txt"; $countR=0; // @G1'-'H2!53'-5H if(file_exists($fileReply)) { $Reply = file($fileReply); for ($j=0 ; $j<sizeof($Reply) ; $j++) { // A"I-!9%CAH%0##1 --@G4%L"H-" $chk = explode("||",$Reply[$j]); // I24%L5H 0 -I-!9%5HAH--!2 @H21 "IS_reply" (1'AH+!2"@%32!) C+I@4H!H2 $countR if(substr($chk[0],0,8) == "IS_reply"){ $countR++; } }// end for j }//end if return $countR; } //(9) 1L 1H#'*-'H2C#09I!5 2#A#D%L !2+#7-@%H2 // function CheckInsertFile($category, $wb_id) { function CheckImage($No) { include("./config.php"); //1IH2H2F-@'-#L $fileOK=array(); $fileOK[0] = 0; $fileOK[1] = 0; // I+2D%L#95H-"9HC32! $fileQImg=$config[dataDir]."imagefiles/$No"; if(file_exists("$fileQImg.jpg")) $fileOK[1]=1; //!52#A#D%L#9 else if(file_exists("$fileQImg.gif")) $fileOK[1]=1; //!52#A#D%L#9 else if(file_exists("$fileQImg.swf")) $fileOK[0]=1; //!52#A#D%L flash // I+2D%L#95H-"9HC3- $fileNumImgR=$config[dataDir]."imagefiles/Img$No.txt"; $fileImgR=$config[dataDir]."imagefiles/R$No"; if(file_exists($fileNumImgR)) { // -H23'-#92D%L if(file_exists($fileNumImgR)) { $FILE=fopen($fileNumImgR,"rt"); $numImg=fgets($FILE,10); fclose($FILE); } for ($i=1 ; $i<=$numImg ; $i++){ if(file_exists("$fileImgR-$i.jpg")) $fileOK[1]=1; //!52#A#D%L#9 else if(file_exists("$fileImgR-$i.gif")) $fileOK[1]=1; //!52#A#D%L#9 else if(file_exists("$fileImgR-$i.swf")) $fileOK[0]=1; //!52#A#D%L flash } } return $fileOK; } //(7) 1L 1H#'*-2#*H#9 A%0 copy #9D'ICD@#-#5H function Send_Img($type, $No, $category, $fileupload){ include("./config.php"); //1IH2H2F-@'G-#L echo "<link href='./style.css' rel=stylesheet type='text/css'>\n"; echo "<body bgcolor=#FFFFE0 background='pic/background.jpg'>\n\n"; if($fileupload[name]!=$config[chkimg]) { // I2!52#*H#9!2I'" $imgtype=0; for($i=0;$i<sizeof($config[upfile]);$i++) { if($fileupload[type]==$config[upfile][$i]) { $imgfiles=$config[typeof][$i]; $imgtype=1; } } if($imgtype==0) { echo Message(60,"red","D!HC HD%L#9 2 .gif .jpg .png +#7-D%L Flash","#82#'*-H-*H","<a href='javascript:history.back(1)'> %1DAID </a>"); exit(); } if($fileupload[type]=="application/x-shockwave-flash"){ // *H flash DID!H@4 5H3+ (@%5H"DI5H config.php) if($fileupload[size]>$config[flashSize_limit]) { echo Message(45,"red","2'2!8- Flash @4'H25H3+","I-!5'2!8D!H@4 ".($config[flashSize_limit]/1024)."Kb #82#'*-H-*H","<a href='javascript:history.back(1)'> %1DAID </a>"); exit(); } // #'*-'2!'I2-D%L Flash $size = getimagesize($fileupload[tmp_name]); if($size[0] > $config[flashWidth]) { //I2'2!'I2!2'H2 600 pixels (AIDDI5H config) echo Message(45,"red","'2!'I2- Flash !2'H2 $config[flashWidth] pixels","#82#'*-A%0AID","<a href='javascript:history.back(1)'>%1DAID</a>"); exit(); } } else{ // *H#9DID!H@4 5H3+ (@%5H"DI5H config.php) if($fileupload[size]>$config[imgSize_limit]) { echo Message(45,"red","2'2!8-#9@4'H25H3+","I-!5'2!8D!H@4 ".($config[imgSize_limit]/1024)."Kb #82#'*-H-*H","<a href='javascript:history.back(1)'> %1DAID </a>"); exit(); } // #'*-'2!'I2-#9 $size = getimagesize($fileupload[tmp_name]); if($size[0] > $config[imgWidth]) { //I2'2!'I2!2'H2 600 pixels (AIDDI5H config) echo Message(45,"red","'2!'I2-#9!2'H2 $config[imgWidth] pixels","#82#'*-A%0AID","<a href='javascript:history.back(1)'>%1DAID</a>"); exit(); } } // #'*-'H2!5D@#-#5H 7H- imagefiles -"9H+#7-D!H I2D!H!5C+I*#I26IC+!H $DirOK = 0; $DIR = opendir($config[dataDir]); while ($text = readdir($DIR)){ if($text == "imagefiles") $DirOK = 1; } if(!$DirOK) mkdir($config[dataDir]."imagefiles/",0777); // I2@G2#*H#922#- (@7H-22#-0-DI+%2"A%0-20*H!2+%2"#9) if($type){ // -H23'-#92D%L $filename = $config[dataDir]."imagefiles/Img$No.txt"; if(file_exists($filename)) { $FILE=fopen($filename,"rt"); $num=fgets($FILE,10); fclose($FILE); } else{ $num=0; } $num++; //@4H!H26I 1 // 16H23'#9%CD%L1@4! I'"H2C+!H $FILE=fopen($filename,"w"); flock($FILE,2); fputs($FILE,$num); flock($FILE,3); fclose($FILE); $ImgName = "R$No-$num$imgfiles"; } else { $ImgName = "$No$imgfiles"; } // copy D%L#9D@GD'ICD@#-#5H5H#08D'I copy($fileupload[tmp_name],$config[dataDir]."imagefiles/$ImgName"); return ($ImgName); } // 2##'*- 'H2*H#9!2+#7-@%H2 else { return (0); } } // 1L 1H ?> องค์การบริหารส่วนตำบลตะพง


เว็บบอร์ด องค์การบริหารส่วนตำบลตะพง
เพื่อแลกเปลี่ยนความรู้, ถาม-ตอบปัญหาคาใจ, แนะนำ, ประกาศ, หรือทุกสิ่งตามต้องการ

[ Home | กลับหน้าหลักเว็บบอร์ด | ตั้งกระทู้ใหม่ ] [ ลบคำถาม - คำตอบ ]


ยังไม่มีกระทู้ในฐานข้อมูล



[ ตั้งกระทู้ใหม่ ]

<< กรุณาใช้ถ้อยคำสุภาพ >>


 
Home About me Board Contact Us