| Server IP : 27.254.152.13 / Your IP : 216.73.217.38 Web Server : Apache/2 System : Linux ns1-252017.dragonhispeed.com 5.2.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64 User : coloflew ( 1072) PHP Version : 5.6.40 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 : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/coloflew/.trash/files/fulltion.co.th/public_html/parcel/administrator/ |
Upload File : |
<?php
require_once('../lib/sys_config.php');
require_once('../lib/class/SC_Query.php');
require_once('../lib/class/SC_Mysql.php');
require_once('../lib/class/SC_Master.php');
require_once('../lib/class/SC_Email.php');
require_once('../lib/class/SC_Function.php');
$db = new SC_Query();
$objMaster = new SC_Master();
$objFun = new SC_Function();
if(isset($_SESSION['lang_code']) && @$_GET['lang']){
//$la = $_GET['lang'] ? $_GET['lang'] : "En";
$_SESSION['lang_code'] = $_GET['lang'];
$lang_code = $_SESSION['lang_code'];
}elseif(isset($_SESSION['lang_code'])){
$lang_code = $_SESSION['lang_code'];
}else{
$lang_code = "En";
$_SESSION['lang_code'] = $lang_code;
}
$lang_value = $db->getAll('language_value','*',"lang_code='".$lang_code."'");
//echo "<pre>"; print_r($lang_value);
if($lang_value){
$lang_set = array();
foreach($lang_value as $ke => $va){
$lang_set[$va['name']] = $va['value'];
//echo $lang_set[$va['name']];
//$lang = $lang_f;
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<!-- Scrip Java-->
<?PHP
$setpoint = $_GET['SSUpdateBusProduct'];
$getstartname = $db->getOne("deliverypoint","*","DeliveryPointID = '".$setpoint."'");
$getcode = $db->getOne("busxroute","*"," BusXRouteID='".$_GET['BusXRouteID']."'");
$getbusxroute = $db->getOne( "busxroute", "*"," BusXRouteID = '".$_GET['BusXRouteID']."'","" );
$getroute = $db->getOne( "route", "*"," RouteID = '".$getcode['RouteID']."'","" );
$getbus = $db->getOne( "bus", "*"," BusID = '".$getbusxroute['BusID']."'","" );
$getbustype = $db->getOne( "bustype", "*"," BusTypeID = '".$getbus['BusType']."'","" );
$getrouteid = $getcode['RouteID'];
$getbusid = $getcode['BusID'];
$gettime = $db->getJoin("a.*,b.BusXRouteID,b.SetDate,b.SetTime,b.BusID","tasoft_routexpoint a
LEFT OUTER JOIN tasoft_busxroute b ON a.RouteID = b.RouteID"," b.BusXRouteID = '".$getbusxroute['BusXRouteID']."' and a.DeliveryPointID = '".$setpoint."'","","");
if($gettime){
foreach($gettime as $key => $val){
$getstop = $db->gettest("SELECT ADDTIME( ADDTIME( '".$val['SetDate']." ".$val['SetTime']."', '".$val['PointTime']."' ) , '".$val['PointStop']."' ) AS PointTime");
$getstopsuccess = explode(" ",$getstop['PointTime']);
}
}
$getcountproduct = $db->getOne( "hist", "count(*) as max"," BusXRouteID = '".$_GET['BusXRouteID']."' and status = '2' and HistDatetime between '".$getbusxroute['SetDate']." 00:00:00'and '".$getbusxroute['SetDate']." 23:59:59'","" );
$getsumproduct = $db->getOne( "hist a inner join ".DB_PREFIX."invoicedetail b on a.invoicedetailID = b.invoicedetailID", "sum(ProductWeight) as sum"," a.BusXRouteID = '".$_GET['BusXRouteID']."' and a.status = '2' and a.HistDatetime between '".$getbusxroute['SetDate']." 00:00:00'and '".$getbusxroute['SetDate']." 23:59:59'","" );
$getbusemp = $db->getOne( "hist", "*"," BusXRouteID = '".$_GET['BusXRouteID']."' and status = '2' and HistDatetime between '".$getbusxroute['SetDate']." 00:00:00'and '".$getbusxroute['SetDate']." 23:59:59'","" );
$getbusempname = json_decode($getbusemp['Detaillog'],true);
$getroutename = $db->getOne("route","*"," RouteID='".$getrouteid."'");
$getbusname = $db->getOne("bus","*"," BusID='".$getbusid."'");
$where_f = " a.BusXRouteID = '".$_GET['BusXRouteID']."' and a.status = '2' and a.HistDatetime between '".$getbusxroute['SetDate']." 00:00:00'and '".$getbusxroute['SetDate']." 23:59:59'";
$page = @$_GET['page'] ? @$_GET['page'] : 1;
$arrpageP = $db->getAll( "hist a inner join ".DB_PREFIX."invoicedetail b on a.invoicedetailID = b.invoicedetailID", "Distinct b.*",$where_f,"" );
$arrPage = $objMaster->viewPages($page, $arrpageP, "15");
$getPage = $db->getAll("hist a inner join ".DB_PREFIX."invoicedetail b on a.invoicedetailID = b.invoicedetailID","Distinct b.*",$where_f,"",$arrPage["offset"]);
?>
<div style="width:100%; height:100%">
<table width="100%">
<tr>
<td>
<img id="logo" src="resources/images/Logo/Header2.png" alt="Simpla Admin logo" width="100%"/>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td>
<label style="font-size:20px; color:#00FF00">รายละเอียด</label>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td width="10%" style="text-align:right">
<label><?php echo $lang_set['route_code']; ?>:</label><br />
<?php echo $getroute['RouteCode']; ?>
</td>
<td width="30%">
<label><?php echo $lang_set['route_name']; ?>:</label><br />
<?php echo $getroute['RouteName']; ?>
</td>
<td width="30%">
<label><?php echo $lang_set['planbuspoint_stopdate']; ?>:</label> <br />
<?php echo $objMaster->getreportformat($objMaster->getdbdateformat($getstopsuccess[0])); ?>
</td>
<td width="30%">
<label><?php echo $lang_set['planbuspoint_stoptime']; ?>:</label><br />
<?php echo $getstopsuccess[1]; ?>
</td>
<tr>
</table>
<table width="100%">
<tr>
<td width="10%" style="text-align:right">
<label><?php echo $lang_set['bus_plate']; ?>:</label><br />
<?php echo $getbus['BusPlate']; ?>
</td>
<td width="30%">
<label><?php echo $lang_set['bus_name']; ?>:</label><br />
<?php echo $getbus['BusName']; ?>
</td>
<td width="30%">
<label><?php echo $lang_set['bus_type']; ?>:</label><br />
<?php echo $getbustype['BusTypeName']; ?>
</td>
<td width="30%">
<label><?php echo $lang_set['bus_seat']; ?>:</label><br />
<?php echo $getbus['BusSeat']; ?>
</td>
<tr>
</table>
<table width="100%">
<tr>
<td width="10%" style="text-align:right">
<label><?php echo $lang_set['count_product']; ?>:</label>
</td>
<td width="15%" style="text-align:left" >
<span id="countproduct"><?php echo $getcountproduct['max']; ?></span>
<input type="hidden" id="hdcountproduct" value="<?php echo $getcountproduct['max']; ?>" >
</td>
<td width="10%" style="text-align:right">
<label><?php echo $lang_set['volume_total']; ?>:</label>
</td>
<td width="15%" style="text-align:left">
<span id="sumproduct"><?php echo $getsumproduct['sum']; ?></span>
<input type="hidden" id="hdsumproduct" value="<?php echo $getsumproduct['sum']; ?>" >
</td>
<td width="10%" style="text-align:right">
<label><?php echo $lang_set['volume_check']; ?>:</label>
</td>
<td width="20%" style="text-align:left">
<span id="checkcomplate"><?php echo $getbus['BusSeat'] - $getsumproduct['sum']; ?></span>
</td>
<tr>
</table>
<!-- //-------------------------------พนักงานในรถ------------------------------------//-------->
<table width="100%">
<tr>
<td>
<label style="font-size:20px; color:#00FF00">รายชื่อพนักงานประจำรถ</label>
</td>
</tr>
</table>
<table width="100%">
<tr>
<?PHP if($getbusempname){
foreach($getbusempname as $key => $v){
$getnameemp = $db->getOne("admin","*","EmpID = '".$v['EmpID']."'","");
if($v['BusXEmpType']=="u0e04u0e19u0e02u0e31u0e1au0e2bu0e25u0e31u0e01"){ $data = "คนขับหลัก";}
elseif($v['BusXEmpType']=="u0e04u0e19u0e02u0e31u0e1au0e23u0e2du0e07"){ $data = "คนขับรอง";}
elseif($v['BusXEmpType']=="u0e1cu0e39u0e49u0e0au0e48u0e27u0e22u0e2bu0e25u0e31u0e01"){ $data = "ผู้ช่วยหลัก";}
elseif($v['BusXEmpType']=="u0e1cu0e39u0e49u0e0au0e48u0e27u0e22u0e23u0e2du0e07"){ $data = "ผู้ช่วยรอง";}
?>
<td width="25%">
<label><?PHP echo $data;?>:</label><br />
<?php echo $getnameemp['EmpName']." ".$getnameemp['EmpSurName']; ?>
</td>
<?PHP }}?>
<tr>
</table>
<!-- //-------------------------------ของ------------------------------------//-------->
<table width="100%">
<tr>
<td>
<label style="font-size:20px; color:#00FF00">รายการพัสดุ</label>
</td>
</tr>
</table>
<table width="80%" border="1">
<tr bgcolor="#3399FF">
<th align="center">ปลายทาง</th>
<th align="center">รหัสพัสดุ</th>
<th align="center">ประเภทพัสดุ</th>
<th align="center">ขนาด</th>
<th align="center">น้ำหนัก(กก.)</th>
</tr>
<?PHP if($getPage){
foreach($getPage as $key => $va){
$getnamesize = $db->getOne("setupsize","*","SetupSizeID = '".$va['ProductSize']."'","");
$getinvoice = $db->getOne( "invoice", "*"," InvoiceID = '".$va['InvoiceID']."'","" );
$getendname = $db->getOne("deliverypoint","*","DeliveryPointID = '".$getinvoice['InvoiceEndPoint']."'");?>
<tr>
<td><?php echo $getendname['DeliveryPointName'];?></td>
<td><?PHP echo $va['ProductCode'];?></td>
<td><?PHP echo $va['ProductName'];?></td>
<td align="center"><?PHP echo $getnamesize['SetupSizeSize'];?></td>
<td align="center"><?PHP echo $va['ProductWeight'];?></td>
</tr>
<?PHP }
}?>
</table>
</div>
</body>
<?PHP echo "<script>t = 3*1000;
window.print();
</script>";?>
<?PHP //setTimeout('window.close()',t); ?>