403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.156
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  E:/Inetpub/www/news/datatable/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/news/datatable//fetch.php
<?php
/* Database connection start */
$db=new SQLite3('datacenter.db') or die("Unable to open database!");
$table='TEACHER';
/* Database connection end */
 
$requestData= $_REQUEST;
$columns = array( 
	0 =>'ACADEMIC_YEAR',
	1 =>'PERSON_ID', 
	2 => 'FIRST_NAME',
	3=> 'LAST_NAME'
);


if( !empty($requestData['search']['value']) ) {
	//ค้นหาฟิลด์  title , views
	$query = $db->query("SELECT * FROM $table WHERE 1=1 AND PERSON_ID LIKE '%".$requestData['search']['value']."%' OR FIRST_NAME LIKE '%".$requestData['search']['value']."%' ORDER BY ". $columns[$requestData['order'][0]['column']]." ".$requestData['order'][0]['dir']." LIMIT ".$requestData['start']." ,".$requestData['length']."");
	//จำนวนข้อมูล
	$totalData = $db->querySingle("SELECT COUNT(*) as count FROM $table WHERE 1=1 AND PERSON_ID LIKE '%".$requestData['search']['value']."%' OR FIRST_NAME LIKE '%".$requestData['search']['value']."%'");
	$totalFiltered = $totalData; 	
}else{
//แสดงข้อมูลปกติ
$query = $db->query("SELECT * FROM $table ORDER BY ". $columns[$requestData['order'][0]['column']]." ".$requestData['order'][0]['dir']." LIMIT ".$requestData['start']." ,".$requestData['length']."");
$totalData = $db->querySingle("SELECT COUNT(*) as count FROM $table ");
$totalFiltered = $totalData; 
}
function stringEncryption($action, $string){
	$output = false;
	$encrypt_method = 'AES-256-CBC';
	$secret_key = '@comhacker_key#$';  // ตั้งค่า key 16, 24, or 32 byte
	$secret_iv = '!@_$2';  // เปลี่ยนตามใจชอบเอาไว้ถอดรหัส
	$key = hash('sha256', $secret_key);
	$iv = substr(hash('sha256', $secret_iv), 0, 16);

	if( $action == 'encrypt' ) {
		$output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
		$output = base64_encode($output);
	}
	else if( $action == 'decrypt' ){
		$output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
	}
	return $output;
}

$data = array();
$i=1+$requestData['start'];
while( $row=$query->fetchArray() ) {
	$nestedData=array();
	
	$nestedData[] = '<center>'.number_format($i).'</center>';
//$encrypted = stringEncryption('encrypt', $text);	
	$nestedData[] = stringEncryption('encrypt',$row["PERSON_ID"]);	
	$nestedData[] = $row["FIRST_NAME"];
	$nestedData[] = $row["LAST_NAME"];
	
	$data[] = $nestedData;
	$i++;
}



$json_data = array(
			"draw"            => intval( $requestData['draw'] ), 
			"recordsTotal"    => intval( $totalData ), 
			"recordsFiltered" => intval( $totalFiltered ), 
			"data"            => $data
			);

echo json_encode($json_data);

?>

Youez - 2016 - github.com/yon3zu
LinuXploit