| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/(Del)gepgroup.hk/member/ |
Upload File : |
<?php
include_once("common.php");
if (!isset($_SESSION['member']))
{
header("Location: login.php");
exit;
}
include_once('default_values.php');
$defaultValues = getDefaultValues();
$podate = isset($_GET['podate']) ? $_GET['podate'] : "";
$pono = isset($_GET['pono']) ? $_GET['pono'] : "";
$orderdate = isset($_GET['orderdate']) ? $_GET['orderdate'] : "";
$orderno = isset($_GET['orderno']) ? $_GET['orderno'] : "";
$productno = isset($_GET['productno']) ? $_GET['productno'] : "";
require_once('../webadmin/configure.php');
$sql_cno = mysql_real_escape_string($_SESSION['member']['cno']);
$sql = "SELECT * FROM order_status WHERE cno = '$sql_cno' AND recordstatus = '1'";
$sql .= strlen($pono) ? " AND po_no LIKE '%" . mysql_real_escape_string($pono) . "%'" : "";
$sql .= strlen($podate) ? " AND po_date = '" . mysql_real_escape_string($podate) . "'" : "";
$sql .= strlen($orderno) ? " AND order_no LIKE '%" . mysql_real_escape_string($orderno) . "%'" : "";
$sql .= strlen($orderdate) ? " AND order_date = '" . mysql_real_escape_string($orderdate) . "'" : "";
$sql .= strlen($productno) ? " AND product_detail LIKE '%" . mysql_real_escape_string($productno) . "%'" : "";
$sql .= " ORDER BY id ASC";
$result = mysql_query($sql);
function tmp_show_desc2($desc2, $cut_pos = 100) {
$output = 'Sorry, no details.';
if (!empty($desc2)) {
$output = '';
$len = strlen($desc2);
for ($i = 0; $i <= $len; $i += $cut_pos) {
$output .= substr($desc2, $i, $cut_pos);
$output .= PHP_EOL;
}
}
return $output;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Glorious Company</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!-- Select Calendar -->
<link type="text/css" href="css/smoothness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<!-- <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> -->
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.sparkline.min.js"></script>
<script type="text/javascript">
$(function() {
$( "#orderdate,#podate" ).datepicker( { dateFormat: 'yy-mm-dd'} );
// $('.button').button();
// $(".sparkbullet").sparkline('html', {
// type: 'bullet',
// width: '80px',
// height: '12px',
// chartRangeMin: 0,
// chartRangeMax: 100,
// targetWidth: 0,
// targetColor: '#D8B33E',
// performanceColor: '#000000',
// rangeColors: ['#231F20','#D8B33E','#7f94ff'],
// tooltipFormat: ''
// });
});
function showDialog(title, $target) {
var html = $target.html();
var htmlLength = html == null ? 0 : html.length;
$('#msg_dialog')
.empty()
.html(html)
.dialog({
modal: true,
width: htmlLength >= 80 ? 800 : 200,
resizable: false,
title: title,
buttons: {
Close: function() {
$(this).dialog('close');
}
}
});
return false;
}
</script>
<style type="text/css">
.list-txt a {
text-decoration:none;
color: white;
}
.list-txt {
line-height: 20px;
}
input.ui-button {
padding: 0.2em 0.5em;
}
.packing-width {
width: 50px;
max-width: 50px;
}
.desc-width {
width: 160px;
max-width: 160px;
}
@media print {
input[type=submit] {
display: none;
}
}
.bg1 {
background-color: rgba(0, 0, 0, 0.5);
background-image: none;
}
</style>
<!--[if lt IE 9]>
<style type="text/css">
.bg1 {
/* background-color: #403F42; */
background-color: transparent;
background-image: url(images/bg1.png);
background-repeat: repeat;
}
</style>
<![endif]-->
<!-- End Select Calendar -->
</head>
<body>
<div id="msg_dialog">
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!-- Header -->
<tr>
<td height="73"><table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="220"><a href="../" target="_blank"><img src="images/logo.png" width="263" height="80" border="0"/></a></td>
<td align="right"><span class="header">Welcome [<?=$_SESSION['member']['ccontactp']?>]</span> <!-- <span class="login"><a href="change_password.php">Change password</a></span> --><a href="logout.php"><img src="images/btn_logout.png" border="0" align="absmiddle"/></a></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="1024" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><a href="order_history.php"><img src="images/menu_orderhistory.png" width="200" height="35" border="0" /></a><a href="payment.php"><img src="images/menu_paymenthistory.png" width="200" height="35" border="0" /></a><a href="order_status.php"><img src="images/menu_orderstatus.png" width="200" height="35" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="5" class="headerline"></td>
</tr>
<!-- End Header -->
<tr>
<td height="450" align="center" valign="top"><table width="1024" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50" class="bg1 text-left top"><table width="600" border="0" cellspacing="0" cellpadding="0" style="float:left;border-right: 1px solid #58585A;">
<tr>
<td class="title text-left top"><b>Company Info</b></td>
</tr>
<tr>
<td class="txt text-left top"><strong>Customer No.: <?=$_SESSION['member']['cno']?></strong></td>
</tr>
<tr>
<td class="company text-left top"><strong><?=$_SESSION['member']['ccompany']?></strong></td>
</tr>
<tr>
<td height="60" class="txt text-left top"><?=$_SESSION['member']['caddress']?></td>
</tr>
</table>
<table width="400" border="0" cellspacing="0" cellpadding="0" style="float:right;">
<tr>
<td class="title"><b>Contact Person</b></td>
</tr>
<tr>
<td class="txt"><strong><?=$_SESSION['member']['ccontactp']?></strong></td>
</tr>
<tr>
<td class="txt">Tel: <?=$_SESSION['member']['ctel']?></td>
</tr>
<tr>
<td class="txt">Fax: <?=$_SESSION['member']['cfax']?></td>
</tr>
<tr>
<td class="txt">Mail: <?=$_SESSION['member']['cmail']?></td>
</tr>
</table></td>
</tr>
<tr>
<td height="50" class="text-left top"><?=htmlentities($_GET['msg'])?> </td>
</tr>
<tr>
<td height="40" class="text-left top"><div style="float:left"><img src="images/icon_title.png" width="25" height="20" align="top" /><span class="title">ORDER STATUS</span></div>
<div style="float:right"><form action="order_status.php" method="get">
P.O. Date
<input id="podate" name="podate" type="text" class="searchinput" value="<?=$podate?>" />
P.O. No.
<input name="pono" type="text" class="searchinput" value="<?=$pono?>" />
O.C. Date
<input id="orderdate" name="orderdate" type="text" class="searchinput" value="<?=$orderdate?>" />
O.C. No.
<input name="orderno" type="text" class="searchinput" value="<?=$orderno?>" />
Product No.
<input name="productno" type="text" class="searchinput" value="<?=$productno?>" />
<input name="submit" type="submit" value="" style="background-image: url(images/btn_search.png); background-color: transparent; width: 20px; height: 20px; border: 0px; vertical-align: middle" />
</form></div></td>
</tr>
<tr>
<td class="text-left top"><table width="1024" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="list-titleborder border-right list-bg1 text-left top" style="min-width:60px">P.O. No.</td>
<td class="list-titleborder border-right list-bg1 text-left top" style="min-width:70px">P.O. Date</td>
<td class="list-titleborder border-right list-bg1 text-left top" style="min-width:60px">O.C. No.</td>
<td class="list-titleborder border-right list-bg1 text-left top" style="min-width:70px">O.C. Date</td>
<td class="list-titleborder border-right list-bg1 text-left top" style="min-width:80px">Product No.</td>
<td class="list-titleborder border-right list-bg1 text-left top packing-width">Packing</td>
<td class="list-titleborder list-bg1 text-left top desc-width" style="padding-right:0">Description</td>
<td class="list-titleborder border-right list-bg1 text-left top" style="padding:0"></td>
<td class="list-titleborder border-right list-bg1 text-left top" style="min-width:60px">Order Qty</td>
<td class="list-titleborder border-right list-bg1 text-left top">Shipped</td>
<td class="list-titleborder border-right list-bg1 text-left top">Outstanding</td>
<?php //<td class="list-titleborder border-right list-bg1 text-left top">Progress Rate</td> ?>
<td class="list-titleborder border-right list-bg1 text-left top">Currency</td>
<td class="list-titleborder border-right list-bg1 text-left top">Price</td>
<td class="list-titleborder border-right list-bg1 text-left top">Status</td>
<td class="list-titleborder list-bg1 text-left top desc-width" style="padding-right:0; min-width:70px">Arrival Date</td>
<td class="list-titleborder list-bg1 text-left top" style="padding:0"></td>
</tr>
<?php
$i = 0;
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
//$rowColor = $i++ % 2 == 0 ? 'list-bg2' : 'list-bg1';
$rowColor = 'list-bg1';
?>
<tr>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=strlen($row['po_no']) <= 15 ? $row['po_no'] : substr($row['po_no'], 0, 15) . '<br />' . substr($row['po_no'], 15)?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['po_date']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['order_no']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['order_date']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['product_detail']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top packing-width"><?=$row['packing']?></td>
<td class="list-txt border-bottom <?=$rowColor?> text-left top desc-width" style="padding-right:0"><?=$row['desc']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top" style="padding:5px 1px">
<?php if (!empty($row['desc2'])): ?>
<input type="button" class="button ui-button ui-widget ui-state-default ui-corner-all" role="button" aria-disabled="false" value="..."
onclick="showDialog('<?=str_replace(array("'", '"'), array("\\'", '\\x22'), html_entity_decode('[' . $row['order_no'] . '] Product no. ' . $row['product_detail'] . ' (' . $row['packing'] . ') ' . $row['desc'], ENT_QUOTES))?>', $('#desc2_<?=$row['id']?>', $(this).parent().parent()))" />
<?php endif; ?>
</td>
<td class="list-txt border-bottom border-right <?=$rowColor?> top tdalignright"><?=$row['quantity']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> top tdalignright"><?=$row['shipped']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> top tdalignright"><?=$row['outstand']?></td>
<?php /* <td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><span class="sparkbullet">0, 0, 100, <?=floatval($row['progress_rate'])?>, 0</span></td> */ ?>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['currency']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> top tdalignright"><?=$row['total_amount']?></td>
<td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['status_str']; //$defaultValues['order_status']['status'][$row['status']]?></td>
<td class="list-txt border-bottom <?=$rowColor?> text-left top desc-width" style="padding-right:0"><?=$row['arrival_date']?></td>
<td class="list-txt border-bottom <?=$rowColor?> text-left top" style="padding:5px 1px">
<?php if (!empty($row['arrival_desc'])): ?>
<input type="button" class="button ui-button ui-widget ui-state-default ui-corner-all" role="button" aria-disabled="false" value="..."
onclick="showDialog('<?=str_replace(array("'", '"'), array("\\'", '\\x22'), html_entity_decode('[' . $row['order_no'] . '] Product no. ' . $row['product_detail'] . ' (' . $row['packing'] . ') ' . $row['desc'], ENT_QUOTES))?>', $('#arrival_desc_<?=$row['id']?>', $(this).parent().parent()))" />
<?php endif; ?>
<div id="desc2_<?=$row['id']?>" style="display:none"><pre><?=tmp_show_desc2($row['desc2'])?></pre></div>
<div id="arrival_desc_<?=$row['id']?>" style="display:none"><pre><?php
if (!empty($row['arrival_desc'])) {
echo 'Shipment Vessel Shipment Arrival ' . PHP_EOL;
echo ' qty name date date ' . PHP_EOL;
echo '======= ======================================== ============ ============ ' . PHP_EOL;
}
echo tmp_show_desc2($row['arrival_desc'], 80);
?></pre></div>
</td>
</tr>
<?php
}
?>
</table></td>
</tr>
</table></td>
</tr>
<!-- Footer -->
<tr>
<td class="footer">COPYRIGHT © 2012 GLORIOUS COMPANY. ALL RIGHTS RESERVED</td>
</tr>
</table>
</body>
</html>