Index of /home/htscrtms/newcrm.htshah.com/hslider
<?php
include('lib/db_connect.php');
include('lib/auth.php');
if(isset($_POST['submit']))
{
if ($_REQUEST['tdate'] != '') {
$tdate = date('Y-m-d', strtotime($_REQUEST['tdate']));
}
if ($_REQUEST['rdate'] != '') {
$rdate = date('Y-m-d', strtotime($_REQUEST['rdate']));
}
if ($_REQUEST['appldate'] != '') {
$appldate = date('Y-m-d', strtotime($_REQUEST['appldate']));
}
if ($_REQUEST['defdate'] != '') {
$defdate = date('Y-m-d', strtotime($_REQUEST['defdate']));
}
if ($_REQUEST['defrplydate'] != '') {
$defrplydate = date('Y-m-d', strtotime($_REQUEST['defrplydate']));
}
if ($_REQUEST['advrecdate'] != '') {
$advrecdate = date('Y-m-d', strtotime($_REQUEST['advrecdate']));
}
if ($_REQUEST['yearlydatetriger'] != '') {
$yearlydatetriger = date('Y-m-d', strtotime($_REQUEST['yearlydatetriger']));
}
$file=$_FILES['applupld'];
$name=$file['name'];
$type=$file['type'];
$size=$file['size'];
$tmppath=$file['tmp_name'];
$filedef=$_FILES['defupld'];
$namedef=$filedef['name'];
$typedef=$filedef['type'];
$sizedef=$filedef['size'];
$tmppathdef=$filedef['tmp_name'];
$filedefrply=$_FILES['defrplyupld'];
$namedefrply=$filedefrply['name'];
$typedefrply=$filedefrply['type'];
$sizedefrply=$filedefrply['size'];
$tmppathdefrply=$filedefrply['tmp_name'];
$selt="select * from `tabl_exportconsultancy` where id='".$_REQUEST['id']."'";
$qryt=mysqli_query($con,$selt);
$fetcharrd=mysqli_fetch_array($qryt);
if($name!='')
{
@unlink('applupld/'.$fetcharrd['applupld']);
$upload = move_uploaded_file($tmppath,'applupld/'.$name);
}
else
{
$name = $fetcharrd['applupld'];
}
if($namedef!='')
{
@unlink('defupld/'.$fetcharrd['defupld']);
$uploaddef = move_uploaded_file($tmppathdef,'defupld/'.$namedef);
}
else
{
$namedef = $fetcharrd['defupld'];
}
if($namedefrply!='')
{
@unlink('defrplyupld/'.$fetcharrd['defrplyupld']);
$uploaddefrply = move_uploaded_file($tmppathdefrply,'defrplyupld/'.$namedefrply);
}
else
{
$namedefrply = $fetcharrd['defrplyupld'];
}
for($i=1;$i<=5;$i++)
{
if($_REQUEST['up_id_'.$i.'']!="")
{
$up="update `tabl_papersreqd` set jobno='".$fetcharrd['jobno']."',papersreq='".$_REQUEST['papersreq_'.$i.'']."' where id='".$_REQUEST['up_id_'.$i.'']."'";
$qry=mysqli_query($con,$up) or die(mysqli_error($con));
}
}
$insert="update `tabl_exportconsultancy` set clientnm='".$_REQUEST['clientnm']."',tdate='".$tdate."',rdate='".$rdate."',descp='".$_REQUEST['descp']."',appldate='".$appldate."',applupld='".$name."',defdate='".$defdate."',defupld='".$namedef."',defrplydate='".$defrplydate."',defrplyupld='".$namedefrply."',advrecdate='".$advrecdate."',advamt='".$_REQUEST['advamt']."',billno='".$_REQUEST['billno']."',yearlydatetriger='".$yearlydatetriger."',trigeremail='".$_REQUEST['trigeremail']."' where id='".$_REQUEST['id']."'";
$query=mysqli_query($con,$insert) or die(mysqli_error($con));
if ($_REQUEST['yearlydatetriger'] != '' && $_REQUEST['trigeremail'] != '') {
$ToEmail2 = $_REQUEST['trigeremail'];
$EmailSubject2 = 'Yearly Export Renewal Registration.';
$mailheader2 = "MIME-Version: 1.0\r\n";
$mailheader2 .= "Content-type: text/html; charset=iso-8859-1\r\n";
$mailheader2 .= "X-Priority: 3\r\n";
$mailheader2 .= "X-Mailer: PHP". phpversion() ."\r\n" ;
//define the message to be sent. Each line should be separated with \n
$message = "<b>Your registration is due for yearly submission of information Pl. get in touch with our team at the earliest.</b><br><br>";
$message .= "<b>Warm Regards</b><br>";
$message .= "<b>Team HT Shah</b><br>";
$message .= "<a href='http://www.htshah.com/' target='_blank'>www.htshah.com/</a> <br>";
if(@mail($ToEmail2, $EmailSubject2, $message, $mailheader2))
{
}
else{
echo "Please Try Again !";
}
}
echo "<script>alert('Export Consultancy Details Updated Successfully')</script>";
// header('Location: viewexportconsultancy.php');
echo "<script>window.location.href='viewexportconsultancy.php';</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no">
<title>HT Shah</title>
<link rel="icon" type="image/x-icon" href="assets/img/favicon.ico"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="https://fonts.googleapis.com/css?family=Nunito:400,600,700" rel="stylesheet">
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/plugins.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("header.php"); ?>
<!-- BEGIN NAVBAR -->
<div class="sub-header-container">
<header class="header navbar navbar-expand-sm">
<a href="javascript:void(0);" class="sidebarCollapse" data-placement="bottom"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></a>
<ul class="navbar-nav flex-row">
<li>
<div class="page-header">
<nav class="breadcrumb-one" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">Consignments</a></li>
<li class="breadcrumb-item active" aria-current="page"><span>Add Export Consultancy Module</span></li>
</ol>
</nav>
</div>
</li>
</ul>
</header>
</div>
<!-- END NAVBAR -->
<!-- BEGIN MAIN CONTAINER -->
<div class="main-container" id="container">
<?php include("sidebar-wrapper.php"); ?>
<!-- BEGIN CONTENT AREA -->
<div id="content" class="main-content">
<div class="container">
<div class="row">
<div id="flFormsGrid" class="col-lg-12 layout-spacing layout-top-spacing">
<div class="statbox widget box box-shadow">
<div class="widget-header">
<div class="row">
<div class="col-xl-12 col-md-12 col-sm-12 col-12">
<h4>Add Export Consultancy Module</h4>
</div>
</div>
</div>
<?php
$sel="select * from `tabl_exportconsultancy` where id='".$_REQUEST['id']."'";
$qry=mysqli_query($con,$sel) or die(mysqli_error($con));
$row=mysqli_fetch_array($qry);
?>
<div class="widget-content widget-content-area">
<form name="exportconsultancysForm" method="POST" enctype="multipart/form-data">
<table class="datatable" width="100%" cellspacing="1" cellpadding="5" border="0">
<tbody>
<tr>
<td width="150">
Client Name:<span class="mandatory">*</span></td>
<td width="350">
<input type="text" name="clientnm" value="<?php echo $row['clientnm']; ?>" required class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Job No:<span class="mandatory">*</span></td>
<td><input type="text" name="jobno" maxlength="5" size="10" value="<?php echo $row['jobno']; ?>" readonly class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Date:<span class="mandatory">*</span></td>
<td><input type="date" name="tdate" size="10" value="<?php echo date('Y-m-d', strtotime($row['tdate'])); ?>" id="tdate" class="form-control"></td>
<td></td>
</tr>
<?php
$selim="select * from `tabl_papersreqd` where jobno='".$row['jobno']."'";
$qryim=mysqli_query($con,$selim) or die(mysqli_error($con));
$iqs = 1;
while($s = mysqli_fetch_array($qryim))
{ ?>
<tr>
<td>Papers Required:</td>
<td><input type="text" name="papersreq_<?php echo $iqs; ?>" id="papersreq_<?php echo $iqs; ?>" maxlength="100" size="40" value="<?php echo $s['papersreq']; ?>" class="form-control"><input type="hidden" name="up_id_<?php echo $iqs;?>" id="up_id_<?php echo $iqs;?>" value="<?php echo $s['id']?>"></td>
<td></td>
</tr>
<?php
$iqs++;
}
?>
<tr>
<td>Request Date:</td>
<td><input type="date" name="rdate" size="10" value="<?php echo date('Y-m-d', strtotime($row['rdate'])); ?>" id="rdate" class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Description:</td>
<td>
<select name="descp" class="form-control">
<option value="">-- Select --</option>
<option value="LMPC"<?php if($row['descp']=="LMPC"){echo 'selected="selected"';}?>>LMPC</option>
<option value="Ewaste"<?php if($row['descp']=="Ewaste"){echo 'selected="selected"';}?>>Ewaste</option>
<option value="LM for W & M"<?php if($row['descp']=="LM for W & M"){echo 'selected="selected"';}?>>LM for W & M</option>
<option value="DPD"<?php if($row['descp']=="DPD"){echo 'selected="selected"';}?>>DPD</option>
<option value="AEO Tier 1"<?php if($row['descp']=="AEO Tier 1"){echo 'selected="selected"';}?>>AEO Tier 1</option>
<option value="PWMR 2022"<?php if($row['descp']=="PWMR 2022"){echo 'selected="selected"';}?>>PWMR 2022</option>
<option value="BWM 2022"<?php if($row['descp']=="BWM 2022"){echo 'selected="selected"';}?>>BWM 2022</option>
<option value="MOOWR"<?php if($row['descp']=="MOOWR"){echo 'selected="selected"';}?>>MOOWR</option>
<option value="IGCR"<?php if($row['descp']=="IGCR"){echo 'selected="selected"';}?>>IGCR</option>
<option value="AA -EPCG"<?php if($row['descp']=="AA -EPCG"){echo 'selected="selected"';}?>>AA -EPCG</option>
<option value="Restricted items DGF"<?php if($row['descp']=="Restricted items DGF"){echo 'selected="selected"';}?>>Restricted items DGF</option>
<option value="SVB"<?php if($row['descp']=="SVB"){echo 'selected="selected"';}?>>SVB</option>
<option value="IEC Activation and Update"<?php if($row['descp']=="IEC Activation and Update"){echo 'selected="selected"';}?>>IEC Activation and Update</option>
<option value="Icegate Registration"<?php if($row['descp']=="Icegate Registration"){echo 'selected="selected"';}?>>Icegate Registration</option>
<option value="WPC-ETA"<?php if($row['descp']=="WPC-ETA"){echo 'selected="selected"';}?>>WPC-ETA</option>
<option value="AAR"<?php if($row['descp']=="AAR"){echo 'selected="selected"';}?>>AAR</option>
<option value="FSSSAI Central"<?php if($row['descp']=="FSSSAI Central"){echo 'selected="selected"';}?>>FSSSAI Central</option>
<option value="FSSAI State"<?php if($row['descp']=="FSSAI State"){echo 'selected="selected"';}?>>FSSAI State</option>
<option value="Drug & Cosmetic"<?php if($row['descp']=="Drug & Cosmetic"){echo 'selected="selected"';}?>>Drug & Cosmetic</option>
<option value="Others"<?php if($row['descp']=="Others"){echo 'selected="selected"';}?>>Others</option>
</select>
</td>
<td></td>
</tr>
<tr>
<td>Application Date:</td>
<td><input type="date" name="appldate" size="10" value="<?php echo date('Y-m-d', strtotime($row['appldate'])); ?>" id="appldate" class="form-control"></td>
<td><input type="file" name="applupld" class="form-control">
<?php if($row['applupld']!="")
{ ?><a href="applupld/<?php echo $row['applupld']; ?>" target="_blank"><?php echo $row['applupld']; ?></a>
<?php }
?>
</td>
</tr>
<tr>
<td>Deficiency Date:</td>
<td><input type="date" name="defdate" size="10" value="<?php echo date('Y-m-d', strtotime($row['defdate'])); ?>" id="defdate" class="form-control"></td>
<td><input type="file" name="defupld" class="form-control">
<?php if($row['defupld']!="")
{ ?><a href="defupld/<?php echo $row['defupld']; ?>" target="_blank"><?php echo $row['defupld']; ?></a>
<?php }
?>
</td>
</tr>
<tr>
<td>Deficiency Reply Date:</td>
<td><input type="date" name="defrplydate" size="10" value="<?php echo date('Y-m-d', strtotime($row['defrplydate'])); ?>" id="defrplydate" class="form-control"></td>
<td><input type="file" name="defrplyupld" class="form-control">
<?php if($row['defrplyupld']!="")
{ ?><a href="defrplyupld/<?php echo $row['defrplyupld']; ?>" target="_blank"><?php echo $row['defrplyupld']; ?></a>
<?php }
?>
</td>
</tr>
<tr>
<td>Advane Received Date:</td>
<td><input type="date" name="advrecdate" size="10" value="<?php echo date('Y-m-d', strtotime($row['advrecdate'])); ?>" id="advrecdate" class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Advance Amount:</td>
<td><input type="text" name="advamt" maxlength="10" size="10" value="<?php echo $row['advamt']; ?>" class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Bill No.:</td>
<td><input type="text" name="billno" maxlength="10" size="10" value="<?php echo $row['billno']; ?>" class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Yearly Date Triger:</td>
<td><input type="date" name="yearlydatetriger" size="10" value="<?php echo date('Y-m-d', strtotime($row['yearlydatetriger'])); ?>" id="yearlydatetriger" class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Triger Email Id:</td>
<td><input type="email" name="trigeremail" size="10" value="<?php echo $row['trigeremail']; ?>" class="form-control"></td>
<td></td>
</tr>
<tr>
<td colspan="3">
<input name="submit" type="submit" class="btn btn-primary" value="Save">
<a href="viewexportconsultancy.php"><button type="button" class="btn btn-danger ml-2">Cancel</button></a></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include("footer.php"); ?>
</div>
<!-- END CONTENT AREA -->
</div>
<!-- END MAIN CONTAINER -->
<!-- BEGIN GLOBAL MANDATORY SCRIPTS -->
<script src="assets/js/libs/jquery-3.1.1.min.js"></script>
<script src="bootstrap/js/popper.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
<script src="assets/js/app.js"></script>
<script>
$(document).ready(function() {
App.init();
});
</script>
<script src="assets/js/custom.js"></script>
</body>
</html>