403Webshell
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/public_html/administrator/modules/manu_supply/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/coloflew/domains/fulltion.com/public_html/administrator/modules/manu_supply//supplyupdate.php
 
<?php
@$linkurlNew = "index.php?name=manu_supply&file=supplyupdate&BusXRouteID=".@$_GET['BusXRouteID']."&SSUpdateBusProduct=".$_GET['SSUpdateBusProduct'];
@$linkurl = "index.php?name=manu_supply&file=supplyupdate";
@$link1 = "index.php?name=manu_supply&file=supplytobus";
@$link2 = "index.php?name=manu_supply&file=supplyfrombus";
if(isset($fullsc)){
@$linkurlNew .= "&fullsc=fullsc";
@$linkurl .= "&fullsc=fullsc";
@$link1 .= "&fullsc=fullsc";
@$link2 .= "&fullsc=fullsc";
}

//echo "<pre>"; print_r(@$_SESSION['SSEnd']);
///////////////////////////////////////////////////////////////////////////////////add
if(@$_GET['act']=="updateData"){

	@$arrData = array();
	@$arrDataInvoice = array();
	@$arrDataHist = array();
	if(count(@$_POST['pagedel']) > 0){
		foreach($_POST['pagedel'] as $key => $val){
			@$arrData['status'] = 2;
			@$arrData['BusXRouteID'] = @$_GET['BusXRouteID'];
			@$arrData['EmpSendID'] = @$_SESSION['member']['userid'];
			@$arrData['EmpReviceID'] = '0';
			@$db->updateData("invoicedetail",@$arrData," InvoiceDetailID='".@$val."'");
			
			@$getiddetail = @$db->getOne("invoicedetail","*","InvoiceDetailID='".@$val."'","","");
			@$getend = @$db->getOne("invoice","*","InvoiceID='".@$getiddetail['InvoiceID']."'","","");
			
			@$getcode = @$db->getOne("busxroute","*"," BusXRouteID='".@$_GET['BusXRouteID']."'");
			
			@$getbusxemp = @$db->getAll( "busxemp", "*"," BusID = '".@$getcode['BusID']."'","" );
			
			@$logtext = json_encode(@$getbusxemp);

			@$arrDataHist['InvoiceDetailID'] = @$getiddetail['InvoiceDetailID'];
			@$arrDataHist['InvoiceID'] 		= @$getiddetail['InvoiceID'];
			@$arrDataHist['LastPoint'] 		= @$getiddetail['LastPoint'];
			@$arrDataHist['BusXRouteID'] 	= @$_GET['BusXRouteID'];
			@$arrDataHist['EmpSendID'] 		= @$_SESSION['member']['userid'];
			@$arrDataHist['StartPoint']		= @$getiddetail['LastPoint'];
			@$arrDataHist['EndPoint']		= @$getend['InvoiceEndPoint'];
			@$arrDataHist['status'] 			= '2';
			@$arrDataHist['HistDatetime'] 	= date("Y-m-d H:i:s");
			@$arrDataHist['Detaillog'] 		= @$logtext;

			@$db->insertData("hist",@$arrDataHist);
			
			
			@$getinvoice = @$db->getOne( "invoicedetail", "*"," InvoiceDetailID = ".@$val,"" );
			
			@$arrDataInvoice['InvoiceStatus'] = 2;
			@$db->updateData("invoice",@$arrDataInvoice," InvoiceID='".@$getinvoice['InvoiceID']."'");
		}
	}
	
	@$msg = "update Data complete.";
	@$res = true;
}
if(isset($_GET['SSUpdateBusProduct'])){
	//unset(@$_SESSION['SSUpdateBusProduct']);
	//@$_SESSION['SSUpdateBusProduct'] = @$_GET['SSUpdateBusProduct'];
	@$setpoint = @$_GET['SSUpdateBusProduct'];
}

//@$setpoint = @$_SESSION['SSUpdateBusProduct'];
//unset(@$_SESSION['SSUpdateBusProduct']);

@$getbusxroute = @$db->getOne( "busxroute", "*"," BusXRouteID = '".@$_GET['BusXRouteID']."'","" );
@$getroute = @$db->getOne( "route", "*"," RouteID = '".@$getbusxroute['RouteID']."'","" );
@$getroutepoint = @$db->getAll( "routexpoint", "*"," RouteID = '".@$getroute['RouteID']."'","" );
@$getsequence = @$db->getOne( "routexpoint", "*"," RouteID = '".@$getroute['RouteID']."' and DeliveryPointID = '".@$setpoint."'","" );

@$getbus = @$db->getOne( "bus", "*"," BusID = '".@$getbusxroute['BusID']."'","" );
@$getbustype = @$db->getOne( "bustype", "*"," BusTypeID = '".@$getbus['BusType']."'","" );

@$gettime = @$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"," 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( "invoicedetail", "count(*) as max"," BusXRouteID = '".@$_GET['BusXRouteID']."'","" );

@$getsumproduct = @$db->getOne( "invoicedetail", "sum(ProductWeight) as sum"," BusXRouteID = '".@$_GET['BusXRouteID']."'","" );

if(!isset($getsumproduct['sum']))
{
	@$getsumproduct['sum'] = 0;
}

@$where_lang = "lang_code='".@$lang_code."'";
@$page = @$_GET['page'] ? @$_GET['page'] : 1;

@$arrpageP = @$db->getJoin("*","`better_invoicedetail` a
LEFT OUTER JOIN `better_invoice` b ON a.InvoiceID = b.InvoiceID
LEFT OUTER JOIN `better_routexpoint` c ON a.LastPoint = c.DeliveryPointID
LEFT OUTER JOIN `better_routexpoint` d ON b.InvoiceEndPoint = d.DeliveryPointID
LEFT OUTER JOIN `better_productreturn` e ON a.ProductCode = e.ProductCode"," c.RouteID = '".@$getbusxroute['RouteID']."' 
AND d.RouteID = '".@$getbusxroute['RouteID']."'
AND c.PointSequence < d.PointSequence 
AND d.PointSequence >= '".@$getsequence['PointSequence']."' 
AND (a.status = 1 or a.status = 7)
And a.LastPoint = '".@$setpoint."'","","");

@$arrPage = @$objMaster->viewPages(@$page, @$arrpageP, "15");

@$getproduct = @$db->getJoin("a.*,
d.DeliveryPointID as EndPoint","`better_invoicedetail` a
LEFT OUTER JOIN `better_invoice` b ON a.InvoiceID = b.InvoiceID
LEFT OUTER JOIN `better_routexpoint` c ON a.LastPoint = c.DeliveryPointID
LEFT OUTER JOIN `better_routexpoint` d ON b.InvoiceEndPoint = d.DeliveryPointID
LEFT OUTER JOIN `better_productreturn` e ON a.ProductCode = e.ProductCode"," c.RouteID = '".@$getbusxroute['RouteID']."' 
AND d.RouteID = '".@$getbusxroute['RouteID']."'
AND c.PointSequence < d.PointSequence 
AND d.PointSequence >= '".@$getsequence['PointSequence']."' 
AND (a.status = 1 or a.status = 7)
And a.LastPoint = '".@$setpoint."' 
or (e.ProductCode <> '' 

AND a.status = 5 
And a.LastPoint = '".@$setpoint."') group by a.ProductCode"
,"",@$arrPage["offset"]);

//echo "<pre>";print_r(@$getproduct);
?>

<h3> < <a href="<?PHP echo @$link1;?>" ><?php echo @$lang_set['backtobus']; ?></a>  |  <a href="<?PHP echo @$link2;?>" ><?php echo @$lang_set['backfrombus']; ?></a> > </h3>	
<!-- Scrip Java-->
<div class="content-box">
    <div class="content-box-header">
    <?PHP if(isset($fullsc)){ ?>
			<label><a href="index.php?name=manu_main&hk=login"><img src="resources/images/home.png" alt="Edit" /></a></label>
        <?PHP }?>
		<h3><?php echo @$lang_set['busdetailtitle']; ?></h3>					
			<ul class="content-box-tabs">
				<li><a href="#list" class="default-tab"><?php echo @$lang_set['list_busdetail']; ?></a></li>
            </ul>
         <div class="clear"></div>            	
    </div>
    
    <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 @$linkurlNew;?>">
        <?php }?>
      
      		
              
              <!--#########################Body######################################################################-->
    <form action="<?PHP echo @$linkurl;?>&BusXRouteID=<?php echo @$_GET["BusXRouteID"];?>&SSUpdateBusProduct=<?php echo @$setpoint;?>&amp;act=updateData" method="post" >
			
    	<div class="content-box-header">
        	<h3 style="color:#FF0000"><?php echo @$lang_set['list_busdetail']; ?></h3>	
        </div>
        <div class="content-box-content">
        <table>
        	<tr>
            	<td width="10%" style="text-align:right">
                	<label><?php echo @$lang_set['route_code']; ?>:</label>
                    <?php echo @$getroute['RouteCode']; ?>                  
                </td>
                <td width="30%">
                	<label><?php echo @$lang_set['route_name']; ?>:</label>
                    <?php echo @$getroute['RouteName']; ?>
               </td>
               <td width="30%">
               		<label><?php echo @$lang_set['planbuspoint_stopdate']; ?>:</label>
                    <?php echo @$objMaster->getdbdateformat(@$getstopsuccess[0]); ?>
               </td>
               <td width="30%">
               		<label><?php echo @$lang_set['planbuspoint_stoptime']; ?>:</label>
                    <?php echo @$getstopsuccess[1]; ?>
               </td>
            <tr>
        </table>
        <table>
        	<tr>
            	<td width="10%" style="text-align:right">
                	<label><?php echo @$lang_set['bus_plate']; ?>:</label>
                    <?php echo @$getbus['BusPlate']; ?>
                </td>
                <td width="30%">
                	<label><?php echo @$lang_set['bus_name']; ?>:</label>
                    <?php echo @$getbus['BusName']; ?>
                </td>
                <td width="30%">
                	<label><?php echo @$lang_set['bus_type']; ?>:</label>
                    <?php echo @$getbustype['BusTypeName']; ?>
                </td>
                <td width="30%">
                	<label><?php echo @$lang_set['bus_seat']; ?>:</label>
                    <?php echo @$getbus['BusSeat']; ?>
                </td>
            <tr>
        </table>
        <table>
        	<tr>
            	<td width="15%" 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="15%" 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="20%" 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>
        
       </div>
   
   		<div class="content-box-header">
        	<h3 style="color:#FF0000"><?php echo @$lang_set['recvdetailproduct']; ?></h3>	
        </div>
        <div class="content-box-content">
        <table>
        	<thead>
            	<tr>
                	<th><input type="checkbox" class="check_all" /></th>
                	<th><?php echo @$lang_set['CodeProduct']; ?></th>
                    <th><?php echo @$lang_set['NameProduct']; ?></th>
                    <th><?php echo @$lang_set['WeightProduct']; ?></th>
                    <th><?php echo @$lang_set['SizeProducr']; ?></th>
                    <th><?php echo @$lang_set['totalmoney']; ?></th>
                    <th><?php echo @$lang_set['endpoint']; ?></th>
                </tr>
             </thead>
             <tbody>
             <?PHP 
				@$i = 1;

			//	echo "<pre>";
			//	print_r($getproduct );
				if(@$getproduct){
                	foreach($getproduct as $key => $va){
					
					@$getpoint = @$db->getOne("deliverypoint","*",@$where_lang." and DeliveryPointID='".@$va['EndPoint']."'");
					@$getnamesize = @$db->getOne("setupsize","*","SetupSizeID = ".@$va['ProductSize']);
			?>
                <tr>
                	<td><div id="chkbarcode_<?php echo @$va['ProductCode'];?>"><input type="checkbox" name="pagedel[]" value="<?php echo @$va['InvoiceDetailID'];?>" onchange="CheckboxUpdateCountProduct(<?php echo @$i;?>);"/></div>
                    <input type="hidden" id="page_<?PHP echo @$i;?>" value="0" />
                    </td>
                    <td><?php echo @$va['ProductCode'];?></td>
                    <td><?php echo @$va['ProductName'];?></td>
                    <td><?php echo @$va['ProductWeight'];?></td>
                    <td><?php echo @$getnamesize['SetupSizeSize'];?></td>
                    <td><?php echo @$va['totalmoney'];?></td>
                    <td><?php echo @$getpoint['DeliveryPointName'];?></td>
                </tr>
            <?php 	@$i++;}
			}else{
			?>
				<tr>
					<th colspan="11" style="text-align:center"><?php echo @$lang_set['not_data']; ?></th>
				</tr>
			<?php 
			}
			?>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="11">
                        <div class="bulk-actions align-left">
                            <select name="actdel">
                                <option value="del">ของขึ้นรถ</option>
                            </select>
                        <input class="button" type="submit" value="<?php echo @$lang_set['selected']; ?>" />
                        </div>
                        <!-- Start .pagination -->	
                        <div class="pagination">
                         <?php //if($arrPage['allpage']>1){?>
                            <a href="<?PHP echo @$linkurl;?>&BusXRouteID=<?php echo @$_GET["BusXRouteID"];?>&SSUpdateBusProduct=<?php echo @$setpoint;?>&page=1" title="หน้าแรก">&laquo; หน้าแรก</a><a href="<?PHP echo @$linkurl;?>&BusXRouteID=<?php echo @$_GET["BusXRouteID"];?>&SSUpdateBusProduct=<?php echo @$setpoint;?>&page=<?php echo ($page==1 ? $page : @$page-1);?>" title="ก่อนหน้า">&laquo; ก่อนหน้า</a>
                             <?php if( @$arrPage["startPage"]!="" && @$arrPage["endPage"] !="" ){?>       
                                        <?php 
                                        for($i = @$arrPage["startPage"]; $i <= @$arrPage["endPage"]; ++$i) {
                                            echo'<a href="'.@$linkurl.'&BusXRouteID='.@$_GET["BusXRouteID"].'&SSUpdateBusProduct='.@$setpoint.'&page='.@$i.'" '.(@$page == @$i ? 'class="number current"' : '').'>'.(@$i).'</a>';
                                        }?>
                             <?php }?>
                            <a href="<?PHP echo @$linkurl;?>&BusXRouteID=<?php echo @$_GET["BusXRouteID"];?>&SSUpdateBusProduct=<?php echo @$setpoint;?>&page=<?php echo ($page==$arrPage["allpage"] ? $page : $page+1);?>" title="ถัดไป">ถัดไป &raquo;</a><a href="<?PHP echo @$linkurl;?>&BusXRouteID=<?php echo @$_GET["BusXRouteID"];?>&SSUpdateBusProduct=<?php echo @$setpoint;?>&page=<?php echo @$arrPage["allpage"];?>" title="หน้าสุดท้าย">หน้าสุดท้าย &raquo;</a>
                         <?php //}?>
                        </div> 
                        <!-- End .pagination -->
                        <div class="clear"></div>
                    </td>
                </tr>
            </tfoot>
        </table>
       </div>
	</form>
    	<div class="content-box-content">
         	<form onsubmit="javascript:UpdateStatusTrackToBus(<?PHP echo @$setpoint;?>,<?PHP echo @$_GET['BusXRouteID'];?>);return false;">
        	<fieldset>
            	<p>
                	 <label><?php echo @$lang_set['CodeTrack']; ?>:</label>
                      <input type="text" class="text-input medium-input" name="InvoiceDetailCode" id="InvoiceDetailCode" />
                      <input type="button" class="button" onclick="javascript:UpdateStatusTrackToBus(<?PHP echo @$setpoint;?>,<?PHP echo @$_GET['BusXRouteID'];?>);" style="width:50px;" value="<?php echo @$lang_set['submit']; ?>" >
                </p>
            </fieldset>
            </form>
         </div>

Youez - 2016 - github.com/yon3zu
LinuXploit