| Server IP : 92.204.40.98 / Your IP : 216.73.216.201 Web Server : LiteSpeed System : Linux amster.dnsfors.com 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : tmksyste ( 2190) PHP Version : 8.3.31 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/tmksyste/domains/tmksystems.in/public_html/crmapp/ |
Upload File : |
<?php
include('connection.php');
$order_no=$_POST['order_no'];
$address=$_POST['address'];
$munci=$_POST['munci'];
$thaluk=$_POST['thaluk'];
$customer=$_POST['customer'];
$contact=$_POST['contact'];
$city=$_POST['city'];
$district=$_POST['district'];
$state=$_POST['state'];
$pin=$_POST['pin'];
$gst=$_POST['gst'];
$program=$_POST['program'];
$program_date=$_POST['program_date'];
if(empty($program_date))
$program_date="0000-00-00";
$totalamount=$_POST['totalamount'];
$famount=$_POST['famount'];
$remarks=$_POST['remarks'];
$product=$_POST['product'];
$p_capacity=$_POST['p_capacity'];
$lid=$_REQUEST['id'];
$gmap = mysqli_real_escape_string($con,$_POST['gmap']);
$doi=$_POST['doi'];
$company=$_POST['company'];
$uploads_dir = 'uploads';
$tmp_name = $_FILES["doc1"]["tmp_name"];
$name = basename($_FILES["doc1"]["name"]);
$random_digit=rand(0000,9999);
$doc1=$random_digit.$name;
move_uploaded_file($tmp_name, "$uploads_dir/$doc1");
$tmp_name = $_FILES["doc2"]["tmp_name"];
$name = basename($_FILES["doc2"]["name"]);
$random_digit=rand(0000,9999);
$doc2=$random_digit.$name;
move_uploaded_file($tmp_name, "$uploads_dir/$doc2");
$tmp_name = $_FILES["doc3"]["tmp_name"];
$name = basename($_FILES["doc3"]["name"]);
$random_digit=rand(0000,9999);
$doc3=$random_digit.$name;
move_uploaded_file($tmp_name, "$uploads_dir/$doc3");
$tmp_name = $_FILES["doc4"]["tmp_name"];
$name = basename($_FILES["doc4"]["name"]);
$random_digit=rand(0000,9999);
$doc4=$random_digit.$name;
move_uploaded_file($tmp_name, "$uploads_dir/$doc4");
if(isset($_REQUEST['submit']))
{
$sqlc="SELECT * FROM `customer_details` WHERE `lid`='$lid'";
$resultc=mysqli_query($con,$sqlc);
if(mysqli_num_rows($resultc)=="0"){
if(empty($lid))
{
$sql="insert into customer_details(customer,phone,order_no,address,city,state,pin,gst,program,pdate,total_amount,famount,remarks,product,district,p_capacity,doc1,doc2,doc3,doc4,munci,thaluk,gmap,doi,company) values('$customer','$contact','$order_no','$address','$city','$state','$pin','$gst','$program','$program_date','$totalamount','$famount','$remarks','$product','$district','$p_capacity','$doc1','$doc2','$doc3','$doc4','$munci','$thaluk','$gmap','$doi','$company')";
}
else
{
$sql="insert into customer_details(lid,order_no,address,city,state,pin,gst,program,pdate,total_amount,famount,remarks,product,district,p_capacity,doc1,doc2,doc3,doc4,munci,thaluk,gmap,doi,company) values('$lid','$order_no','$address','$city','$state','$pin','$gst','$program','$program_date','$totalamount','$famount','$remarks','$product','$district','$p_capacity','$doc1','$doc2','$doc3','$doc4','$munci','$thaluk','$gmap','$doi','$company')";
}
mysqli_query($con,$sql);
}
else{
$sqlcc="update customer_details set lid='$lid',order_no='$order_no',address='$address',city='$city',state='$state',pin='$pin',gst='$gst',program='$program',pdate='$program_date',total_amount='$totalamount',famount='$famount',remarks='$remarks',product='$product',district='$district',p_capacity='$p_capacity',doc1='$doc1',doc2='$doc2',doc3='$doc3',doc4='$doc4',munci='$munci',thaluk='$thaluk',gmap='$gmap' ,doi='$doi',company='$company' where lid='$lid'";
mysqli_query($con,$sqlcc);
}
//echo $sql;
header('location:customer_management.php?log=insert');
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=customer_management.php?log=insert">';
}
?>