CasperSecurity

Current Path : /var/www/mvc360.ucnms.co.in/purchase_order/
Upload File :
Current File : /var/www/mvc360.ucnms.co.in/purchase_order/supplier_insert_api.php

 <?php
session_start();
include '../../../web/connection/connection.php';
include '../../../web/connection/con.php';
include '../../../web/connection/functions/encryption.php';

 //$purchase_invoice_noe = $_REQUEST['purchase_invoice_no'];
$purchase_order_datee = $_REQUEST['purchase_order_date'];
$organisation_unit_id = '1';
$supplier_name = $_REQUEST['supplier_name'];
//$supplier_code = $_REQUEST['supplier_code'];
$supplier_address = $_REQUEST['supplier_address'];
$supplier_tele_phone = $_REQUEST['supplier_tele_phone'];
$supplier_mobile_no = $_REQUEST['supplier_mobile_no'];
$supplier_mail_id = $_REQUEST['supplier_mail_id'];
$supplier_gst_no = $_REQUEST['supplier_gst_no'];
$supplier_pan_no = $_REQUEST['supplier_pan_no'];
$supplier_bank_name = $_REQUEST['supplier_bank_name'];
$supplier_branch_name = $_REQUEST['supplier_branch_name'];
$account_no = $_REQUEST['account_no'];
$ifsc_code = $_REQUEST['ifsc_code'];
$micr_code = $_REQUEST['micr_code'];
$other_state = $_REQUEST['other_state'];


$date = date("Y-m-d");
$active = 'yes';
$userId   = $_SESSION['USER_ID'];
 if(!empty($supplier_name)){

$selecttr = "SELECT * FROM supplier ORDER BY supplier_id DESC";
 $querytr = mysqli_query($con,$selecttr);
 $supplier=mysqli_fetch_assoc($querytr);
 $supplier_id = $supplier['supplier_id']+1;
 
	
	$supplier_name_flat = $supplier_name[0];
	$supplier_name_flatcap = ucfirst($supplier_name_flat);
    $supplier_code = $supplier_name_flatcap.'000'.$supplier_id;
 
$zero = 0;

 $supplier_codeyy = $supplier_name_flatcap.'-'.$zero.''.$zero.''.$zero.''.$zero.''.$supplier_id;
if(($supplier_id >= '10') && ($supplier_id < '100')){
$supplier_code = $supplier_name_flatcap.'-'.$zero.''.$zero.''.$zero.''.$supplier_id;
}elseif(($supplier_id >= '100')&&($supplier_id < '1000')){
$supplier_code = $supplier_name_flatcap.'-'.$zero.''.$zero.''.$supplier_id;	
}elseif($supplier_id >= '1000'){
	$supplier_code = $supplier_id;
}else{
	$supplier_code = $supplier_codeyy;
}
		
	
   
	$db_handle = new DBController();
	$newInsert = $db_handle->tableinsert("INSERT INTO supplier(organisation_unit_id,supplier_name,supplier_code,supplier_address,supplier_tele_phone,supplier_mobile_no,supplier_mail_id,supplier_gst_no,supplier_pan_no,supplier_bank_name,supplier_branch_name,account_no,ifsc_code,micr_code,other_state,created_on,created_by,is_active) 
	VALUES ('$organisation_unit_id','$supplier_name','$supplier_code','$supplier_address','$supplier_tele_phone','$supplier_mobile_no','$supplier_mail_id','$supplier_gst_no','$supplier_pan_no','$supplier_bank_name','$supplier_branch_name','$account_no','$ifsc_code','$micr_code','$other_state','$date','$userId','$active')");


$purchase_order_date =amebi_crypt($purchase_order_datee,e);
 //$purchase_invoice_no =amebi_crypt($purchase_invoice_noe,e);
$supplier_nam =amebi_crypt($supplier_name,e);	
if($newInsert == TRUE){ 
			
			
			 $_SESSION['ERROR_MSG'] = "Success";
		     $_SESSION['MSG_ALRT'] = "TRUE";
		    header('location:../../../web/home/modules/stock/purchase_order/purchase_order.php?purchase_order_date='.$purchase_order_date.'&supnam='.$supplier_nam);
		 }else{
			 $_SESSION['ERROR_MSG'] = "Unsuccess";
		     $_SESSION['MSG_ALRT'] = "FALSE";
		    header('location:../../../web/home/modules/stock/purchase_order/purchase_order.php?purchase_order_date='.$purchase_order_date.'&supnam='.$supplier_nam);
		}
	}
	
?>
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