Index of /home/htscrtms/newcrm.htshah.com/hslider
<?php
include('lib/db_connect.php');
include('lib/auth.php');
if(isset($_POST['submit']))
{
if ($_REQUEST['htshah_dt'] != '') {
$htshah_dt = date('Y-m-d', strtotime($_REQUEST['htshah_dt']));
}
if ($_REQUEST['edi_dt'] != '') {
$edi_dt = date('Y-m-d', strtotime($_REQUEST['edi_dt']));
}
if ($_REQUEST['thoka_dt'] != '') {
$thoka_dt = date('Y-m-d', strtotime($_REQUEST['thoka_dt']));
}
if ($_REQUEST['empty_doc_recd_dt'] != '') {
$empty_doc_recd_dt = date('Y-m-d', strtotime($_REQUEST['empty_doc_recd_dt']));
}
if ($_REQUEST['empty_despatch_dt'] != '') {
$empty_despatch_dt = date('Y-m-d', strtotime($_REQUEST['empty_despatch_dt']));
}
if ($_REQUEST['factory_stuffing_datetime'] != '') {
$factory_stuffing_datetime = date('Y-m-d', strtotime($_REQUEST['factory_stuffing_datetime']));
}
if ($_REQUEST['container_gate_in_datetime'] != '') {
$container_gate_in_datetime = date('Y-m-d', strtotime($_REQUEST['container_gate_in_datetime']));
}
if ($_REQUEST['cutoff_cont_no'] != '') {
$cutoff_cont_no = date('Y-m-d', strtotime($_REQUEST['cutoff_cont_no']));
}
if ($_REQUEST['carting'] != '') {
$carting = date('Y-m-d', strtotime($_REQUEST['carting']));
}
if ($_REQUEST['exam'] != '') {
$exam = date('Y-m-d', strtotime($_REQUEST['exam']));
}
if ($_REQUEST['stuffing'] != '') {
$stuffing = date('Y-m-d', strtotime($_REQUEST['stuffing']));
}
if ($_REQUEST['handover_of_sb'] != '') {
$handover_of_sb = date('Y-m-d', strtotime($_REQUEST['handover_of_sb']));
}
if ($_REQUEST['sailing'] != '') {
$sailing = date('Y-m-d', strtotime($_REQUEST['sailing']));
}
if ($_REQUEST['shipping_bill_release_dt'] != '') {
$shipping_bill_release_dt = date('Y-m-d', strtotime($_REQUEST['shipping_bill_release_dt']));
}
if ($_REQUEST['frtChqRequestedDate'] != '') {
$frtChqRequestedDate = date('Y-m-d', strtotime($_REQUEST['frtChqRequestedDate']));
}
if ($_REQUEST['frtChqRecievedDate'] != '') {
$frtChqRecievedDate = date('Y-m-d', strtotime($_REQUEST['frtChqRecievedDate']));
}
if ($_REQUEST['acdDeclFiled_dt'] != '') {
$acdDeclFiled_dt = date('Y-m-d', strtotime($_REQUEST['acdDeclFiled_dt']));
}
$UPDATED_DT = date('Y-m-d h:i:s');
$insert="update `tabl_exportentry` set htshah_dt='".$htshah_dt."',htshah_no_Col='".$_REQUEST['htshah_no_Col']."',edi_no='".$_REQUEST['edi_no']."',edi_dt='".$edi_dt."',thoka_no='".$_REQUEST['thoka_no']."',thoka_dt='".$thoka_dt."',supplier='".$_REQUEST['supplier']."',supplier_col='".$_REQUEST['supplier_col']."',pkgs='".$_REQUEST['pkgs']."',pkgs_col='".$_REQUEST['pkgs_col']."',invoice='".$_REQUEST['invoice']."',frt_amt='".$_REQUEST['frt_amt']."',vessel='".$_REQUEST['vessel']."',vessel_col='".$_REQUEST['vessel_col']."',empty_doc_recd_dt='".$empty_doc_recd_dt."',empty_doc_recd_dt_col='".$_REQUEST['empty_doc_recd_dt_col']."',empty_despatch_dt='".$empty_despatch_dt."',factory_stuffing_datetime='".$factory_stuffing_datetime."',factory_stuffing_datetime_col='".$_REQUEST['factory_stuffing_datetime_col']."',container_gate_in_datetime='".$container_gate_in_datetime."',cutoff_cont_no='".$cutoff_cont_no."',cutoff_cont_no_col='".$_REQUEST['cutoff_cont_no_col']."',carting='".$carting."',carting_col='".$_REQUEST['carting_col']."',exam='".$exam."',exam_col='".$_REQUEST['exam_col']."',stuffing='".$stuffing."',stuffing_col='".$_REQUEST['stuffing_col']."',handover_of_sb='".$handover_of_sb."',handover_of_sb_col='".$_REQUEST['handover_of_sb_col']."',sailing='".$sailing."',sailing_col='".$_REQUEST['sailing_col']."',shipping_bill_release_dt='".$shipping_bill_release_dt."',shipping_bill_release_dt_col='".$_REQUEST['shipping_bill_release_dt_col']."',inspection_report='".$_REQUEST['inspection_report']."',billOfLading='".$_REQUEST['billOfLading']."',leo='".$_REQUEST['leo']."',frtChqRequestedDate='".$frtChqRequestedDate."',frtChqRecievedDate='".$frtChqRecievedDate."',acdDeclFiled_dt='".$acdDeclFiled_dt."',acdDeclFiled_dt_col='".$_REQUEST['acdDeclFiled_dt_col']."',etaOfVessel='".$_REQUEST['etaOfVessel']."',remark='".$_REQUEST['remark']."',remark_Col='".$_REQUEST['remark_Col']."',UPDATED_BY='".$_SESSION["name"]."',UPDATED_DT='".$UPDATED_DT."' where id='".$_REQUEST['id']."'";
$query=mysqli_query($con,$insert) or die(mysqli_error($con));
for($i=1;$i<=3;$i++)
{
if($_REQUEST['up_id_'.$i.'']!="")
{
$up="update tabl_expagent set export_id='".$_REQUEST['id']."',
agentName='".$_REQUEST['agentName_'.$i.'']."',
agentDate='".$_REQUEST['agentDate_'.$i.'']."',
agentQuote='".$_REQUEST['agentQuote_'.$i.'']."' where id='".$_REQUEST['up_id_'.$i.'']."'";
$qry=mysqli_query($con,$up) or die(mysqli_error($con));
}
else{
$upi="insert into tabl_expagent set export_id='".$_REQUEST['id']."',
agentName='".$_REQUEST['agentName_'.$i.'']."',
agentDate='".$_REQUEST['agentDate_'.$i.'']."',
agentQuote='".$_REQUEST['agentQuote_'.$i.'']."'";
$qry=mysqli_query($con,$upi) or die(mysqli_error($con));
}
if($_REQUEST['tup_id_'.$i.'']!="")
{
$up="update tabl_exptransagent set export_id='".$_REQUEST['id']."',
transName='".$_REQUEST['transName_'.$i.'']."',
transDate='".$_REQUEST['transDate_'.$i.'']."',
transQuote='".$_REQUEST['transQuote_'.$i.'']."' where id='".$_REQUEST['tup_id_'.$i.'']."'";
$qry=mysqli_query($con,$up) or die(mysqli_error($con));
}
else{
$upi="insert into tabl_exptransagent set export_id='".$_REQUEST['id']."',
transName='".$_REQUEST['transName_'.$i.'']."',
transDate='".$_REQUEST['transDate_'.$i.'']."',
transQuote='".$_REQUEST['transQuote_'.$i.'']."'";
$qry=mysqli_query($con,$upi) or die(mysqli_error($con));
}
}
echo "<script>alert('Export Entry Updated Successfully')</script>";
// header('Location: viewexports.php');
echo "<script>window.location.href='viewexports.php';</script>";
}
if(isset($_POST['upload']))
{
$file=$_FILES['uploadFile'];
$name=$file['name'];
$type=$file['type'];
$size=$file['size'];
$tmppath=$file['tmp_name'];
move_uploaded_file($tmppath,'expuploadfile/'.$name);
$query ="insert into `tabl_expuploadpdf` set export_id='".$_REQUEST['id']."',uploadFile='".$name."'";
$qry = mysqli_query($con,$query) or die(mysqli_error($con));
echo "<script>alert('File Added Successfully');</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>Update Export Entry</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>Update Export Entry</h4>
</div>
</div>
</div>
<?php
$sel="select * from `tabl_exportentry` where htshah_no='".$_REQUEST['htshahNo']."'";
$qry=mysqli_query($con,$sel) or die(mysqli_error($con));
$row=mysqli_fetch_array($qry);
?>
<div class="widget-content widget-content-area">
<form id="comp_form" method="post">
<div class="table-responsive">
<table id="example" class="table dataTable" style="width: 100%;" role="grid" aria-describedby="example_info">
<tbody><tr>
<td>HTSHAH Job Number:<span class="mandatory">*</span></td>
<td width="500"><input type="text" name="htshah_no" maxlength="5" size="10" value="<?php echo $row['htshah_no']; ?>" readonly class="form-control"></td>
<td><input type="date" name="htshah_dt" size="10" value="<?php echo date('Y-m-d', strtotime($row['htshah_dt'])); ?>" id="htshah_dt" class="form-control"></td>
<td><input type="checkbox" name="htshah_no_col" value="#FFFF99"<?php if($row['htshah_no_Col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>EDI Job Number:</td>
<td><input type="text" name="edi_no" maxlength="4" size="10" value="<?php echo $row['edi_no']; ?>" class="form-control"></td>
<td><input type="date" name="edi_dt" size="10" value="<?php echo date('Y-m-d', strtotime($row['edi_dt'])); ?>" id="edi_dt" class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Shipping bill number:</td>
<td><input type="text" name="thoka_no" maxlength="10" size="10" value="<?php echo $row['thoka_no']; ?>" class="form-control"></td>
<td><input type="date" name="thoka_dt" size="10" value="<?php echo date('Y-m-d', strtotime($row['thoka_dt'])); ?>" id="thoka_dt" class="form-control"></td>
<td></td>
</tr>
<tr>
<td>Supplier:</td>
<td><input type="text" name="supplier" maxlength="50" size="20" value="<?php echo $row['supplier']; ?>" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="supplier_col" value="#FFFF99"<?php if($row['supplier_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Packages:</td>
<td><input type="text" name="pkgs" maxlength="50" size="20" value="<?php echo $row['pkgs']; ?>" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="pkgs_col" value="#FFFF99"<?php if($row['pkgs_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Shipping Agent Quotes</td>
<td colspan="3"><div class="table-responsive">
<table id="example" class="table dataTable" style="width: 100%;" role="grid" aria-describedby="example_info">
<tbody><tr>
<td width="60%">Agent Name</td>
<td width="20%">Date</td>
<td width="20%">Frieght Quote</td>
</tr>
<?php
$selim="select * from `tabl_expagent` where export_id='".$row['id']."'";
$qryim=mysqli_query($con,$selim) or die(mysqli_error($con));
if(mysqli_num_rows($qryim) > 0){ $iqs = 1;
while($s = mysqli_fetch_array($qryim))
{ ?>
<tr>
<td><input type="text" name="agentName_<?php echo $iqs; ?>" id="agentName_<?php echo $iqs; ?>" maxlength="100" size="40" value="<?php echo $s['agentName']; ?>" 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><input type="text" name="agentDate_<?php echo $iqs; ?>" id="agentDate_<?php echo $iqs; ?>" maxlength="20" size="10" value="<?php echo $s['agentDate']; ?>" 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><input type="text" name="agentQuote_<?php echo $iqs; ?>" id="agentQuote_<?php echo $iqs; ?>" maxlength="20" size="10" value="<?php echo $s['agentQuote']; ?>" class="form-control"><input type="hidden" name="up_id_<?php echo $iqs;?>" id="up_id_<?php echo $iqs;?>" value="<?php echo $s['id']?>"></td>
</tr>
<?php $iqs++; }
}else{ ?>
<?php
for($iqs=1;$iqs<=3;$iqs++)
{
?>
<tr>
<td><input type="text" name="agentName_<?php echo $iqs; ?>" id="agentName_<?php echo $iqs; ?>" maxlength="100" size="40" class="form-control"></td>
<td><input type="text" name="agentDate_<?php echo $iqs; ?>" id="agentDate_<?php echo $iqs; ?>" maxlength="20" size="10" class="form-control"></td>
<td><input type="text" name="agentQuote_<?php echo $iqs; ?>" id="agentQuote_<?php echo $iqs; ?>" maxlength="20" size="10" class="form-control"></td>
</tr>
<?php
}}
?>
</tbody></table></div></td>
</tr>
<tr>
<td>Invoice Number:</td>
<td><input type="text" name="invoice" maxlength="50" size="20" value="<?php echo $row['invoice']; ?>" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Freight Amount:</td>
<td><input type="text" name="frt_amt" maxlength="20" size="20" value="<?php echo $row['frt_amt']; ?>" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Shipping Co. and Container No.:</td>
<td><input type="text" name="vessel" maxlength="50" size="20" value="<?php echo $row['vessel']; ?>" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="vessel_col" value="#FFFF99"<?php if($row['vessel_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Empty D.o Recieved Date:</td>
<td><input type="date" name="empty_doc_recd_dt" size="10" value="<?php echo date('Y-m-d', strtotime($row['empty_doc_recd_dt'])); ?>" id="empty_doc_recd_dt" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="empty_doc_recd_dt_col" value="#FFFF99"<?php if($row['empty_doc_recd_dt_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Empty Dispatch Date:</td>
<td><input type="date" name="empty_despatch_dt" size="10" value="<?php echo date('Y-m-d', strtotime($row['empty_despatch_dt'])); ?>" id="empty_despatch_dt" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Factory Stuffing Date:</td>
<td><input type="date" name="factory_stuffing_datetime" size="10" value="<?php echo date('Y-m-d', strtotime($row['factory_stuffing_datetime'])); ?>" id="factory_stuffing_datetime" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="factory_stuffing_datetime_col" value="#FFFF99"<?php if($row['factory_stuffing_datetime_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Container gate in Date:</td>
<td><input type="date" name="container_gate_in_datetime" size="10" value="<?php echo date('Y-m-d', strtotime($row['container_gate_in_datetime'])); ?>" id="container_gate_in_datetime" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>
Transport Agent Quotes
</td>
<td colspan="3"><div class="table-responsive">
<table id="example" class="table dataTable" style="width: 100%;" role="grid" aria-describedby="example_info">
<tbody><tr>
<td width="60%">Transport Agent Name</td>
<td width="20%">Date</td>
<td width="20%">Quote</td>
</tr>
<?php
$selimt="select * from `tabl_exptransagent` where export_id='".$row['id']."'";
$qryimt=mysqli_query($con,$selimt) or die(mysqli_error($con));
if(mysqli_num_rows($qryimt) > 0){ $iqst = 1;
while($st = mysqli_fetch_array($qryimt))
{ ?>
<tr>
<td><input type="text" name="transName_<?php echo $iqst; ?>" id="transName_<?php echo $iqst; ?>" maxlength="100" size="40" value="<?php echo $st['transName']; ?>" class="form-control"><input type="hidden" name="tup_id_<?php echo $iqst;?>" id="tup_id_<?php echo $iqst;?>" value="<?php echo $st['id']?>"></td>
<td><input type="text" name="transDate_<?php echo $iqst; ?>" id="transDate_<?php echo $iqst; ?>" maxlength="20" size="10" value="<?php echo $st['transDate']; ?>" class="form-control"><input type="hidden" name="tup_id_<?php echo $iqst;?>" id="tup_id_<?php echo $iqst;?>" value="<?php echo $st['id']?>"></td>
<td><input type="text" name="transQuote_<?php echo $iqst; ?>" id="transQuote_<?php echo $iqst; ?>" maxlength="20" size="10" value="<?php echo $st['transQuote']; ?>" class="form-control"><input type="hidden" name="tup_id_<?php echo $iqst;?>" id="tup_id_<?php echo $iqst;?>" value="<?php echo $st['id']?>"></td>
</tr>
<?php $iqst++; }
}else{ ?>
<?php
for($iqst=1;$iqst<=3;$iqst++)
{
?>
<tr>
<td><input type="text" name="transName_<?php echo $iqst; ?>" id="transName_<?php echo $iqst; ?>" maxlength="100" size="40" class="form-control"></td>
<td><input type="text" name="transDate_<?php echo $iqst; ?>" id="transDate_<?php echo $iqst; ?>" maxlength="20" size="10" class="form-control"></td>
<td><input type="text" name="transQuote_<?php echo $iqst; ?>" id="transQuote_<?php echo $iqst; ?>" maxlength="20" size="10" class="form-control"></td>
</tr>
<?php
}}
?>
</tbody></table></div>
</td>
</tr>
<tr>
<td>Cut off Date:</td>
<td><input type="date" name="cutoff_cont_no" size="10" value="<?php echo date('Y-m-d', strtotime($row['cutoff_cont_no'])); ?>" id="cutoff_cont_no" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="cutoff_cont_no_col" value="#FFFF99"<?php if($row['cutoff_cont_no_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Carting:</td>
<td><input type="date" name="carting" size="10" value="<?php echo date('Y-m-d', strtotime($row['carting'])); ?>" id="carting" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="carting_col" value="#FFFF99"<?php if($row['carting_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Exam:</td>
<td><input type="date" name="exam" size="10" value="<?php echo date('Y-m-d', strtotime($row['exam'])); ?>" id="exam" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="exam_col" value="#FFFF99"<?php if($row['exam_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Stuffing:</td>
<td><input type="date" name="stuffing" size="10" value="<?php echo date('Y-m-d', strtotime($row['stuffing'])); ?>" id="stuffing" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="stuffing_col" value="#FFFF99"<?php if($row['stuffing_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Handover of S/Bill</td>
<td><input type="date" name="handover_of_sb" size="10" value="<?php echo date('Y-m-d', strtotime($row['handover_of_sb'])); ?>" id="handover_of_sb" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="handover_of_sb_col" value="#FFFF99"<?php if($row['handover_of_sb_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Sailing:</td>
<td><input type="date" name="sailing" size="10" value="<?php echo date('Y-m-d', strtotime($row['sailing'])); ?>" id="sailing" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="sailing_col" value="#FFFF99"<?php if($row['sailing_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Shipping Bill Release Date:</td>
<td><input type="date" name="shipping_bill_release_dt" size="10" value="<?php echo date('Y-m-d', strtotime($row['shipping_bill_release_dt'])); ?>" id="shipping_bill_release_dt" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="shipping_bill_release_dt_col" value="#FFFF99"<?php if($row['shipping_bill_release_dt_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>Inspection Report:</td>
<td><input type="text" name="inspection_report" maxlength="200" size="20" value="<?php echo $row['inspection_report']; ?>" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Bill of Lading Number & Date: </td>
<td><input type="text" name="billOfLading" maxlength="50" size="20" value="<?php echo $row['billOfLading']; ?>" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Leo Number & Date:</td>
<td><input type="text" name="leo" maxlength="50" size="20" value="<?php echo $row['leo']; ?>" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Frt. Cheque Requested Date:</td>
<td><input type="date" name="frtChqRequestedDate" size="10" value="<?php echo date('Y-m-d', strtotime($row['frtChqRequestedDate'])); ?>" id="frtChqRequestedDate" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Frt. Cheque Recieved Date:</td>
<td><input type="date" name="frtChqRecievedDate" size="10" value="<?php echo date('Y-m-d', strtotime($row['frtChqRecievedDate'])); ?>" id="frtChqRecievedDate" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>ETD required by client:</td>
<td><input type="date" name="acdDeclFiled_dt" size="10" value="<?php echo date('Y-m-d', strtotime($row['acdDeclFiled_dt'])); ?>" id="acdDeclFiled_dt" class="form-control"></td>
<td></td>
<td><input type="checkbox" name="acdDeclFiled_dt_col" value="#FFFF99"<?php if($row['acdDeclFiled_dt_col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td>ETA of vessel at destination:</td>
<td><input type="text" name="etaOfVessel" maxlength="50" size="20" value="<?php echo $row['etaOfVessel']; ?>" class="form-control"></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Remarks:</td>
<td><textarea name="remark" cols="50" rows="3" onKeyPress="return IsAlphaNumeric(event);" value="<?php echo $row['remark']; ?>" class="form-control"><?php echo $row['remark']; ?></textarea></td>
<td></td>
<td><input type="checkbox" name="remark_Col" value="#FFFF99"<?php if($row['remark_Col']=="#FFFF99"){echo 'checked';}?>> Color</td>
</tr>
<tr>
<td colspan="4">
<input name="id" type="hidden" class="form-control" value="<?php echo $row['id']; ?>">
<input name="submit" type="submit" class="btn btn-primary" value="Save">
<a href="viewexports.php"><button type="button" class="btn btn-danger ml-2">Cancel</button></a></td>
</tr>
</tbody>
</table>
</div>
</form>
<br>
<?php if(isset($_SESSION['seln']) && $_SESSION['seln']!="Client"){ ?>
<form id="comp_formfile" method="post" enctype="multipart/form-data">
<table class="datatable" width="100%" cellspacing="1" cellpadding="5" border="0">
<tbody><tr>
<td colspan="4">File Upload</td>
</tr>
<tr>
<td>Select a File to upload:</td>
<td colspan="2">
<input name="id" type="hidden" class="form-control" value="<?php echo $row['id']; ?>">
<input type="file" name="uploadFile" size="30" value="">
<input name="upload" type="submit" class="btn btn-primary" value="Upload"></td>
</tr>
</tbody>
</table>
</form>
<br>
<?php } ?>
<table class="datatable" width="100%" cellspacing="1" cellpadding="5" border="0">
<tbody><tr>
<td colspan="4">Uploaded Files</td>
</tr>
<?php
$selip="select * from `tabl_expuploadpdf` where export_id='".$row['id']."'";
$qryip=mysqli_query($con,$selip) or die(mysqli_error($con));
$count = 0;
while($sp = mysqli_fetch_array($qryip))
{ $count++; ?>
<tr>
<td width="50"><?php echo $count;?></td>
<td><a href="expuploadfile/<?php echo $sp['uploadFile'];?>" target="_blank"><?php echo $sp['uploadFile'];?></a></td>
<?php if(isset($_SESSION['seln']) && $_SESSION['seln']!="Client"){ ?><td width="100"><a onClick="delete_expuploadpdf(<?php echo $sp['id']?>)">Delete</a></td><?php } ?>
</tr>
<?php } ?>
</tbody></table>
</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();
<?php if(isset($_SESSION['seln']) && $_SESSION['seln']=="Client"){ ?>
$('#comp_form input[type=text]').attr('readonly', 'readonly');
$('#comp_form input[type=date]').attr('readonly', 'readonly');
$('#comp_form option:not(:selected)').attr('disabled', true);
$('#comp_form input[type=checkbox]').attr('disabled', 'disabled');
<?php } ?>
});
</script>
<script src="assets/js/custom.js"></script>
<script>
function delete_expuploadpdf(id){
var retVal = confirm("Are you sure want to delete ?");
if( retVal == true ){
$.ajax({
url:'ajax/delete_expuploadpdf.php',
type:'post',
data:{'id':id},
success:function(data){
//alert(data);
if(data==1){
alert('File Deleted Successfully');
location.reload();
}
},
});
}else{
return false;
}
}
</script>
</body>
</html>