CasperSecurity

Current Path : /var/www/atraket.uiet.co.in/v1.0/api/request/asset_transfered/
Upload File :
Current File : /var/www/atraket.uiet.co.in/v1.0/api/request/asset_transfered/asset_transfered_display_api.php

<?php
   
session_start();


include '../../connection/connection.php';


echo $asset_id = $_REQUEST['asset_id'];




$db_handle= new DBController();
$select=$db_handle->runQuery("SELECT * FROM ((asset_request 
INNER JOIN asset ON asset_request.asset_id = asset.asset_id)
INNER JOIN asset_item ON asset.asset_id = asset_item.asset_id)



 WHERE asset_request.asset_maintenance_request_id='$asset_id' ");

$db_handle = new DBController();

$selecthnum=$db_handle-> numRows("SELECT * FROM ((asset_request 
INNER JOIN asset ON asset_request.asset_id = asset.asset_id)
INNER JOIN asset_item ON asset.asset_id = asset_item.asset_id)


 WHERE asset_request.asset_maintenance_request_id ='$asset_id'");
 $last_row = $selecthnum - 1;

	

	
	
	if($selecthnum >= 1){

		
		
		echo '{"status": "1",
		
	
		"data":[';
	 $i =1;
		
         foreach($select as $resulth){
			 $asset_item_id = $resulth['asset_item_id'];
			 
			 $db_handle= new DBController();
$sel=$db_handle->runQuery("SELECT * FROM asset_item_location WHERE asset_item_id = '$asset_item_id' ");
	foreach($sel as $res){
	}
		
	$a1 = $resulth['asset_no'];
	$a2 = $resulth['asset_name'];
	$a3 = $res['location_id'];		 
	$asset_unit_id = $res['asset_unit_id'];		 
	$a4 = $resulth['in_asset_unit'];		 
	$usage = $resulth['usage'];		 
	$asset_maintenance_request_id = $resulth['asset_maintenance_request_id'];		 
	$asset_item_location_id = $resulth['asset_item_location_id'];		 
	$employee_id = $res['employee_id'];		 
	
	$db_handle= new DBController();
$selectloc=$db_handle->runQuery("SELECT * FROM location 

 WHERE location_id='$a3' ");
 foreach($selectloc as $selectlocr){
	 $location_name = $selectlocr['location_name'];
 }
 
 $db_handle= new DBController();
$selectasu=$db_handle->runQuery("SELECT * FROM asset_unit 

 WHERE asset_unit_id='$asset_unit_id' ");
 foreach($selectasu as $selectasur){
	 $asset_unit_name = $selectasur['asset_unit_name'];
 }
 
 $db_handle= new DBController();
$selemp=$db_handle->runQuery("SELECT * FROM employee 

 WHERE employee_id='$employee_id' ");
 foreach($selemp as $selempp){
	 $employee_name = $selempp['employee_name'];
 }
	
		echo'
		{
			
			"asset_no":"'.$a1.'",
			"asset_name":"'.$a2.'",
			"location_name":"'.$location_name.'",
			"location_id":"'.$a3.'",
			"in_asset_unit":"'.$a4.'",
			"asset_unit_name":"'.$asset_unit_name.'",
			"asset_unit_id":"'.$asset_unit_id.'",
			"usage":"'.$usage.'",
			"employee_name":"'.$employee_name.'",
			"employee_id":"'.$employee_id.'",
			"asset_maintenance_request_id":"'.$asset_maintenance_request_id.'"
			"asset_item_location_id":"'.$asset_item_location_id.'"
			
			
		}';
			
		 
			if($i <= $last_row){
						echo ',';
					}
			 $i++;
		
		 }
		echo'
			]}';
		
	}else{
		
		echo '{"status": "0",
			"message":"Page Not found"
			}';
	
}

Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY