| 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/domains/fulltion.com/private_html/administrator/modules/manu_report/ |
Upload File : |
<?php
@$linkurl = "index.php?name=manu_report&file=report_tobus";
@$where_lang = " lang_code = '".@$lang_code."'";
if(@$_POST['keyword']){
@$_POST['keyword'] = str_replace("'", "\'", @$_POST['keyword']);
if(@$where_f){
@$where_f .= " and b.SetDate = '".@$objMaster->getdateformat(@$_POST['keyword'])."' and a.DeliveryPointID = '".@$_POST['DeliveryPointID']."'";
}else{
@$where_f = " b.SetDate = '".@$objMaster->getdateformat(@$_POST['keyword'])."' and a.DeliveryPointID = '".@$_POST['DeliveryPointID']."'";
}
@$setpoint = @$_POST['DeliveryPointID'];
}else{
/*if(@$_SESSION['member']['permistion'] != 4)
{
@$setpoint = @$_SESSION['member']['point'];
//unset(@$_SESSION['SSUpdateBusProduct']);
//@$_SESSION['SSUpdateBusProduct'] = @$setpoint;
@$where_f = " b.SetDate = '".@$objMaster->getdateformat(date("d M Y",time()))."' and a.DeliveryPointID = '".@$_SESSION['member']['point']."'";
}else
{
@$setpoint = 1;
//unset(@$_SESSION['SSUpdateBusProduct']);
//@$_SESSION['SSUpdateBusProduct'] = @$setpoint;
@$where_f = " b.SetDate = '".@$objMaster->getdateformat(date("d M Y",time()))."' and a.DeliveryPointID = '1'";
}*/
@$setpoint = @$_SESSION['member']['point'];
@$where_f = " b.SetDate = '".date("Y-m-d")."' and a.DeliveryPointID = '".@$_SESSION['member']['point']."'";
}
@$page = @$_GET['page'] ? @$_GET['page'] : 1;
@$arrpageP = @$db->getJoin("a.*,b.BusXRouteID,b.SetDate,b.SetTime,b.BusID","better_routexpoint a
LEFT OUTER JOIN better_busxroute b ON a.RouteID = b.RouteID ",@$where_f,"","");
@$arrPage = @$objMaster->viewPages(@$page, @$arrpageP, "50");
@$getPage = @$db->getJoin("a.*,b.BusXRouteID,b.SetDate,b.SetTime,b.BusID","better_routexpoint a
LEFT OUTER JOIN better_busxroute b ON a.RouteID = b.RouteID",@$where_f,"",@$arrPage["offset"]);
@$getPoint = @$db->getAll( "deliverypoint", "*",@$where_lang." and DeliveryPointStatus = '1'","" );
//echo "<pre>"; print_r(@$getPage);
@$getreport = @$db->getJoin("InvoiceEndPoint , count(InvoiceEndPoint) as countpro"," better_invoicedetail a left outer join
better_invoice b on a.InvoiceID = b.InvoiceID "
," a.LastPoint = '".@$setpoint."' and (a.status = '1' or a.status = '7')"," group by InvoiceEndPoint");
?>
<!-- Start Content Box -->
<div class="content-box">
<!-- Start Content Box Header-->
<div class="content-box-header">
<h3><?php echo @$lang_set['report_tobus']; ?></h3>
<ul class="content-box-tabs">
<li><a href="#list" <?php echo (@$_GET['act']=="" ? 'class="default-tab"' : '');?>><?php echo @$lang_set['list_busout']; ?></a></li> <!-- href must be unique and match the id of target div -->
</ul>
<div class="clear"></div>
</div>
<!-- End Content Box Header-->
<!-- Start Content Box Content-->
<div class="content-box-content">
<?php if(@$res){?>
<div class="notification success png_bg">
<a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
<div>
<?php echo @$msg;?>
</div>
</div>
<meta http-equiv="refresh" content="1;URL=<?PHP echo @$linkurl;?>">
<?php }?>
<!-- Start Tab Content id="list"-->
<div class="tab-content <?php echo (@$_GET['act']=="" ? 'default-tab' : '');?>" id="list">
<form action="<?PHP echo @$linkurl;?>" method="post" name="form_search">
<?php echo @$lang_set['input_search'];?> :
<?php if(@$_SESSION['member']['permistion'] == "4"){?>
<select name="DeliveryPointID" id="DeliveryPointID" onchange="SelectSS();">
<?php
if(@$getPoint){foreach($getPoint as $key => $val){
?>
<option value="<?php echo @$val['DeliveryPointID'];?>" <?php echo (@$val['DeliveryPointID']=='' || @$val['DeliveryPointID']==@$setpoint ? "selected" : "")?>><?php echo @$val['DeliveryPointName'];?></option>
<?php }
}
?>
</select>
<?PHP }else{
@$getpointname = @$db->getOne("deliverypoint","*",@$where_lang." and DeliveryPointID='".@$setpoint."'");
?>
<a><?PHP echo @$getpointname['DeliveryPointName']?></a>
<input type="hidden" name="DeliveryPointID" value="<?PHP echo @$setpoint;?>" />
<?PHP }?>
<input type="text" class="text date_picker" name="keyword" value="<?php echo @$search == ''? @$objMaster->getdbdateformat(date("Y-m-d")) : @$search ;?>"/>
<input type="submit" class="button" value="ค้นหา"/>
</form>
<form action="<?PHP echo @$linkurl;?>&act=deleteAll" method="post">
<table cellpadding="0" cellspacing="0" width="100%">
<thead>
<tr>
<th><?php echo @$lang_set['route_code']; ?></th>
<th><?php echo @$lang_set['route_name']; ?></th>
<th><?php echo @$lang_set['deliverypoint_name']; ?></th>
<th><?php echo @$lang_set['bus_name']; ?></th>
<th><?php echo @$lang_set['bustype_name']; ?></th>
<th><?php echo @$lang_set['planbuspoint_stopdate']; ?></th>
<th><?php echo @$lang_set['planbuspoint_stoptime']; ?></th>
<th><?php echo @$lang_set['action']; ?></th>
</tr>
</thead>
<?php
@$checkmax = 0;
@$check = 0;
//echo '<pre>';print_r(@$getPage);
if(@$getPage){
foreach(@$getPage as $key => $val){
@$getpoint = @$db->getOne("deliverypoint","*",@$where_lang." and DeliveryPointID='".@$val['DeliveryPointID']."'");
@$getroute = @$db->getOne("route","*",@$where_lang." and RouteID='".@$val['RouteID']."'");
@$getbus = @$db->getOne("bus","*",@$where_lang." and BusID='".@$val['BusID']."'");
@$getbustype = @$db->getOne("bustype","*",@$where_lang." and BusTypeID='".@$getbus['BusType']."'");
@$getstop = @$db->gettest("SELECT ADDTIME( ADDTIME( '".@$val['SetDate']." ".@$val['SetTime']."', '".@$val['PointTime']."' ) , '".@$val['PointStop']."' ) AS PointTime");
@$getstopsuccess = explode(" ",@$getstop['PointTime']);
@$getmax = @$db->getOne("routexpoint","max(PointSequence) as max"," RouteID='".@$val['RouteID']."'");
if(@$getmax['max'] != @$val['PointSequence']){
?>
<tr>
<th><?php echo @$getroute['RouteCode'];?></th>
<th><?php echo @$getroute['RouteName'];?></th>
<th><?php echo @$getpoint['DeliveryPointName'];?></th>
<th><?php echo @$getbus['BusName'];?></th>
<th><?php echo @$getbustype['BusTypeName'];?></th>
<th><?php echo @$objMaster->getdbdateformat(@$getstopsuccess[0]);?></th>
<th><?php echo @$getstopsuccess[1];?></th>
<th style="text-align: center;">
<a href="coreprintpreview.php?BusXRouteID=<?php echo @$val['BusXRouteID'];?>&SSUpdateBusProduct=<?php echo @$setpoint;?>&type=hist" target="_blank"><img src="resources/images/printer-icon.png" alt="Print" width="20px" height="20px" /></a>
</th>
</tr>
<?php
}else{@$checkmax++;}
@$check++;
}
?>
<?PHP if(@$check == @$checkmax){?>
<tr>
<th colspan="11" style="text-align:center"><?php echo @$lang_set['not_data']; ?></th>
</tr>
<?PHP }?>
<?PHP
}else{
?>
<tr>
<th colspan="11" style="text-align:center"><?php echo @$lang_set['not_data']; ?></th>
</tr>
<?php
}
?>
<tfoot>
<tr>
<td colspan="11">
<!-- Start .pagination -->
<div class="pagination">
<?php if($arrPage['allpage']>1){?>
<a href="<?php echo $linkurl;?>&page=1" title="หน้าแรก">« หน้าแรก</a><a href="<?php echo $linkurl;?>&page=<?php echo (1==$page ? $page : @$page-1);?>" title="ก่อนหน้า">« ก่อนหน้า</a>
<?php if( @$arrPage["startPage"]!="" && @$arrPage["endPage"] !="" ){?>
<?php
for($i = @$arrPage["startPage"]; $i <= @$arrPage["endPage"]; ++$i) {
echo'<a href="'.$linkurl.'&page='.@$i.'" '.(@$page == @$i ? 'class="number current"' : '').'>'.(@$i).'</a>';
}?>
<?php }?>
<a href="<?php echo $linkurl;?>&page=<?php echo ($page==$arrPage["allpage"] ? $page : $page+1);?>" title="ถัดไป">ถัดไป »</a><a href="<?php echo $linkurl;?>&page=<?php echo @$arrPage["allpage"];?>" title="หน้าสุดท้าย">หน้าสุดท้าย »</a>
<?php }?>
</div>
<!-- End .pagination -->
<div class="clear"></div>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<!-- End Tab Content id="list"-->
</div>