CasperSecurity

Current Path : /var/www/acasv2.uiet.co.in/v.2.0/api/request/Finance/journal/
Upload File :
Current File : /var/www/acasv2.uiet.co.in/v.2.0/api/request/Finance/journal/add_financial_transactions.php

<?php

	session_start();

	include '../../../../web/connection/connection.php';
	
	//financial transaction variables
	$voucher_date = $_REQUEST['voucher_date'];
	$voucher_particulars = $_REQUEST['voucher_particulars'];
	$created_on = date("Y-m-d");
	$created_by = $_SESSION['USER_ID'];
	$is_active = 'yes';
	
	//financial transaction ledger head variables
	$ledger_head_id = $_REQUEST['ledger_head_id'];
	$type = $_REQUEST['type'];
	$amount = $_REQUEST['amount'];
	
	//inserting data into financial transaction table
	$db_handle = new DBController();
	
	$newInsert = $db_handle->tableinsert("INSERT INTO financial_transactions(voucher_date,voucher_particulars,created_on,created_by,is_active) 
		VALUES ('$voucher_date','$voucher_particulars','$created_on','$created_by','$is_active')");
	
	
	 if($newInsert == TRUE){
	  
	  echo 'Data Inserted in table 1 Successfully';
	  
	  //if insertion is successful in financial transaction table then fetch a particular primary key needed
	  $db_handle = new DBController();
	  $select = $db_handle->runQuery("SELECT finance_transaction_id FROM financial_transactions  WHERE voucher_date = '$voucher_date' ");
	  foreach ($select as $v){
			$finance_transaction_id = $v['finance_transaction_id']; // unique primary key needed as a data for the nested table
		}
		
		 //inserting data into financial transaction ledger head table
		$db_handle = new DBController();
	
		$newInsert2 = $db_handle->tableinsert("INSERT INTO financial_transaction_ledger_head(finance_transaction_id,ledger_head_id,type,amount)
			VALUES ('$finance_transaction_id','$ledger_head_id','$type','$amount')");
				
		if($newInsert2 == TRUE){
			
		 echo 'Data Inserted in table 2 Successfully';
		  
		}else{
		  
		 echo 'Not Inserted 2' ;
		  
		}
	  
	}else{
	  
	  echo 'Not Inserted 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