CasperSecurity

Current Path : /var/www/acasv2.uiet.co.in/v.2.0/api/request/stores___purchase/adjustment/
Upload File :
Current File : /var/www/acasv2.uiet.co.in/v.2.0/api/request/stores___purchase/adjustment/add_adjustment.php

<?php

	session_start();
	
	include '../../../../web/connection/connection.php';
	
	
	// adjustment variables
	$adjustment_id = $_REQUEST['adjustment_id'];
	$adjust_no = $_REQUEST['adjust_no'];
	$adjust_dt = $_REQUEST['adjust_dt'];
	$project_id = $_REQUEST['project_id'];
	$created_on = date('Y-m-d');
	$created_by = $_SESSION['USER_ID'];
	$is_active = 'yes';
	
	
	// new adjustment item variables
	$adjustment_item_id = $_REQUEST['adjustment_item_id'];
	$adjustment_id = $_REQUEST['adjustment_id'];
	$item_id = $_REQUEST['item_id'];
	$brand_id = $_REQUEST['brand_id'];
	$adjust_qty = $_REQUEST['adjust_qty'];
	$adjust_value = $_REQUEST['adjust_value'];
	
	
	// inserting data into adjustment table
        $db_handle = new DBController();
		
		$newInsert = $db_handle->tableinsert("INSERT INTO adjustment(adjustment_id,adjust_no,adjust_dt,project_id,created_on,created_by,is_active)
		VALUES('$adjustment_id','$adjust_no','$adjust_dt','$project_id','$created_on','$created_by','$is_active')");
				
		if($newInsert == TRUE){
		  
		  echo 'Data Inserted Successfully in table 1';
		  
		//if insertion is successful in adjustment table then fetch a particular primary key needed
		$db_handle = new DBController();
		$select = $db_handle->runQuery("SELECT adjustment_id FROM adjustment  WHERE adjust_no = '$adjust_no' ");
		foreach ($select as $v){
			$adjustment_id = $v['adjustment_id']; // unique primary key needed as a data for the nested table
		}
		
		// insert data into adjustment item table
		 $db_handle = new DBController();
		
		$newInsert2 = $db_handle->tableinsert("INSERT INTO adjustment_item(adjustment_item_id,adjustment_id,item_id,brand_id,adjust_qty,adjust_value)
		VALUES('$adjustment_item_id','$adjustment_id','$item_id','$brand_id','$adjust_qty','$adjust_value')");
				
		if($newInsert2 == TRUE){
		  
		  echo 'Data Inserted Successfully in table 2';
		  
		}else{
		  
		  echo 'Not Inserted in 2' ;
		  
		}
		
		}else{
		  
		  echo 'Not Inserted in 1' ;
		  
		}
?>
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