CasperSecurity

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

<?php
   
session_start();


include '../../connection/connection.php';
include '../../connection/con.php';
include '../../../web/connection/functions/encryption.php';

 ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

 $asset_code = $_REQUEST['asset_code'];
   $asgid = $_REQUEST['asgid'];
$asset_group_id=amebi_crypt($asgid,'e');

 $assetn = $_REQUEST['asset'];
 $to_be_insured = $_REQUEST['tobeinsured'];
 $amc_to_be_done = $_REQUEST['amctobedone'];
  $movable = $_REQUEST['movable'];
 $pmtobedone = $_REQUEST['prevmain'];
 $max_lifetime = $_REQUEST['maxlife'];
 $usage = $_REQUEST['usage'];

 $in_asset_unit = 'No';
 //$company = $_REQUEST['company'];
 //$vendor = $_REQUEST['vendor'];
 //$dimension = $_REQUEST['dimension'];
// $prowner = $_REQUEST['prowner'];
 //$user_id = $_SESSION['USER_ID'];
  $user_id = '1';
 //$user_id = (int)$_SESSION['USER_ID'];
$date = date("Y-m-d");
$is_active = 'yes';
  
if(!empty($asset_code)){
			

 
$db_handle = new DBController();
$newInsertt = $db_handle->numRows("SELECT * FROM  asset WHERE asset_name = '$assetn'");


if($newInsertt >= '1'){
	$_SESSION['ERROR_MSG'] = "Asset Already Exist";
		  $_SESSION['MSG_ALRT'] = "FALSE";
		  header('location:../../../web/home/modules/setup/Assetsacqisition/add_asset.php?asset_group_id='.$asset_group_id);
	}else{    

		$db_handle = new DBController();
		/*$newInsert = $db_handle->tableinsert("INSERT INTO asset (asset_group_id,asset_code,asset_name,to_be_insured,amc_to_be_done,movable,pmtobedone,max_lifetime,usagee,in_asset_unit,comapny_id,vendor_id,dimension,created_on,created_by,is_active)
		VALUES ('$asgid','$asset_code','$assetn','$to_be_insured','$amc_to_be_done','$movable','$pmtobedone','$max_lifetime','$usage','$in_asset_unit','$company','$vendor','$dimension','$date','$user_id','$is_active')");*/
    $newInsert = $db_handle->tableinsert("INSERT INTO asset (asset_group_id,asset_code,asset_name,to_be_insured,amc_to_be_done,movable,pmtobedone,max_lifetime,usagee,in_asset_unit,created_on,created_by,is_active) 
    VALUES ('$asgid','$asset_code','$assetn','$to_be_insured','$amc_to_be_done','$movable','$pmtobedone','$max_lifetime','$usage','$in_asset_unit','$date','$user_id','$is_active')");
		$newint = amebi_crypt($assetn,'e');
		if($newInsert == TRUE){ 
			
			$_SESSION['ERROR_MSG'] = "Success";
		  $_SESSION['MSG_ALRT'] = "TRUE";
		 // header('location:../../../web/home/modules/setup/Assetsacqisition/manage.php?ast='.$newint);
            header('location:../../../web/home/modules/setup/Assetsacqisition/add_asset.php?asset_group_id='.$asset_group_id);
		}else{
			 $_SESSION['ERROR_MSG'] = "Unsuccess";
		  $_SESSION['MSG_ALRT'] = "FALSE";
		  header('location:../../../web/home/modules/setup/Assetsacqisition/add_asset.php?asset_group_id='.$asset_group_id);
		}
		
		
	}
}


		
?>
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