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_master/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/coloflew/domains/fulltion.com/public_html/administrator/modules/manu_master/deliverypoint.php
<?php 
$linkUrl = "index.php?name=manu_master&file=deliverypoint";
if(@$_GET['act']=="add"){
	
	@$Ck = @$db->getOne("deliverypoint","*"," DeliveryPointCode='".@$_POST['DeliveryPointCode']."'");
	if(@$Ck){
	@$msg = "มีรหัสนี้อยู่ในระบบแล้ว";	
	@$error = true;
	}else{
	
	@$arrData = array();
	@$arrRun = array();
	@$idarr = @$db->getOne("deliverypoint","*","","order by DeliveryPointID desc","limit 1");
	@$id = @$idarr['DeliveryPointID'];
	@$autoid = @$id+1;
	
	@$lang = @$db->getAll("language","*","","","");
	if(@$lang){
		foreach(@$lang as $key => $value ){
				@$arrData['DeliveryPointID']			= @$autoid;
				@$arrData['DeliveryPointCode']		= @$_POST['DeliveryPointCode'];
				@$arrData['DeliveryPointName']		= @$_POST['DeliveryPointName'];
				@$arrData['DeliveryPointName_EN']		= @$_POST['DeliveryPointName_EN'];
				@$arrData['DeliveryPointAddress']	= @$_POST['DeliveryPointAddress'];
				@$arrData['DeliveryPointProvince']	= @$_POST['DeliveryPointProvince'];
				@$arrData['DeliveryPointDistrict']	= @$_POST['DeliveryPointDistrict'];
				@$arrData['DeliveryPointTambon']		= @$_POST['DeliveryPointTambon'];
				@$arrData['DeliveryPointPostCode']	= @$_POST['DeliveryPointPostCode'];
				@$arrData['DeliveryPointPhone']		= @$_POST['DeliveryPointPhone'];
				@$arrData['DeliveryPointStatus']		= @$_POST['DeliveryPointStatus'];
				@$arrData['DeliveryPointPrice']		= @$_POST['DeliveryPointPrice'];
				@$arrData['lang_code']				= @$value['lang_code'];
				foreach(@$arrData as $k => $v ){
					@$arrData[@$k] = str_replace("'", "\'", @$v); 
				}
				//echo "<pre>"; print_r(@$arrData);
				//exit;
				@$db->insertData("deliverypoint",@$arrData);
		}
	}
	
	@$coun = @$db->getOne("invoiceruning","count(*) as coun"," DeliveryPointID = ".@$autoid,"","");
	@$check = @$coun['coun'];
	if(@$check == '0'){
		@$arrRun['DeliveryPointID']		= @$autoid;
		@$arrRun['RunText']		= "";
		@$arrRun['RunNum']		= "0000";
		@$db->insertData("invoiceruning",@$arrRun);
	}
	//exit;
	@$msg = "Save Data complete.";
	}
	@$res = true;
}elseif(@$_GET['act']=="editdata"){
	@$arrData = array();
	
	@$arrData['DeliveryPointCode']		= @$_POST['DeliveryPointCode'];
	@$arrData['DeliveryPointName']		= @$_POST['DeliveryPointName'];
	@$arrData['DeliveryPointName_EN']		= @$_POST['DeliveryPointName_EN'];
	@$arrData['DeliveryPointAddress']	= @$_POST['DeliveryPointAddress'];
	@$arrData['DeliveryPointProvince']	= @$_POST['DeliveryPointProvince'];
	@$arrData['DeliveryPointDistrict']	= @$_POST['DeliveryPointDistrict'];
	@$arrData['DeliveryPointTambon']		= @$_POST['DeliveryPointTambon'];
	@$arrData['DeliveryPointPostCode']	= @$_POST['DeliveryPointPostCode'];
	@$arrData['DeliveryPointPhone']		= @$_POST['DeliveryPointPhone'];
	@$arrData['DeliveryPointStatus']		= @$_POST['DeliveryPointStatus'];
	@$arrData['DeliveryPointPrice']		= @$_POST['DeliveryPointPrice'];
	
	foreach(@$arrData as $k => $v ){
		@$arrData[@$k] = str_replace("'", "\'", @$v); 
	}

	@$db->updateData("deliverypoint",@$arrData," DeliveryPointID='".@$_POST['DeliveryPointID']."' and lang_code='".@$lang_code."'");
	
	@$msg = "Edit Data complete.";
	@$res = true;
}elseif(@$_GET['act']=="edit"){
	@$arrRes = @$db->getOne("deliverypoint","*"," DeliveryPointID='".@$_GET['DeliveryPointID']."' and lang_code='".@$lang_code."'");
	
}elseif(@$_GET['act']=="deletedata"){
	
	@$db->deleteData("deliverypoint"," DeliveryPointID='".@$_GET['DeliveryPointID']."'");
	@$db->deleteData("invoiceruning"," DeliveryPointID='".@$_GET['DeliveryPointID']."'");
	
	@$msg = "Delete Data complete.";
	@$res = true;
}elseif(@$_GET['act']=="deleteAll"){
	//echo "<pre>"; print_r(@$_POST);
	if(count(@$_POST['pagedel']) > 0){
		foreach(@$_POST['pagedel'] as $key => $val){
			@$db->deleteData("deliverypoint"," DeliveryPointID='".@$val."'");
			@$db->deleteData("invoiceruning"," DeliveryPointID='".@$val."'");
		}
	}
	@$msg = "Delete Data complete.";
	@$res = true;
}
@$where_f = "lang_code='".@$lang_code."'";
@$where_province = "lang_code='".@$lang_code."' and status='1'";
@$where_district = "lang_code='".@$lang_code."' and status='1'";

@$search = @$_POST['keyword'] ? @$_POST['keyword'] : @$_GET['keyword'];

if(@$search){
	@$searchnew = str_replace("'", "\'", @$search); 
	if(@$where_f){
		@$where_f .= " and (DeliveryPointName like '%".@$searchnew."%' or DeliveryPointCode like '%".@$searchnew."%')";
	}else{
		@$where_f = "  (DeliveryPointName like '%".@$searchnew."%' or DeliveryPointCode like '%".@$searchnew."%' )";
	}	
}

@$page = @$_GET['page'] ? @$_GET['page'] : 1;
@$arrpageP = @$db->getAll( "deliverypoint", "*",@$where_f,"" );
@$arrPage = @$objMaster->viewPages(@$page, @$arrpageP, "15");
@$getPage = @$db->getAll("deliverypoint","*",@$where_f,"",@$arrPage["offset"]);

@$getProvince = @$db->getAll( "province", "*",@$where_province,"" );
@$getDistrict = @$db->getAll( "district", "*",@$where_district,"" );

//echo "<pre>"; print_r(@$getPage);
?>
<!-- Start Content Box -->
<div class="content-box">
	<!-- Start Content Box Header-->
	<div class="content-box-header">
					
			<h3><?php echo @$lang_set['deliverypoint_title']; ?></h3>
					
			<ul class="content-box-tabs">
				<li><a href="#list" <?php echo (@$_GET['act']=="" ? 'class="default-tab"' : '');?>><?php echo @$lang_set['list_deliverypoint']; ?></a></li> <!-- href must be unique and match the id of target div -->
				<li><a href="#add" <?php echo (@$_GET['act']=="edit" ? 'class="default-tab"' : '');?>><?php echo @$lang_set['add_deliverypoint']; ?></a></li>
			</ul>	
			<div class="clear"></div>	
	</div>		
    <!-- End Content Box Header-->
    
    <!-- Start Content Box Content-->
    <div class="content-box-content">
    	<?php if(@$res){?>
			<?php if(@$error){?>
          <div class="notification error 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 }else{?> 
			 <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 }?> 
        <?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'];?> :&nbsp;
            <input type="text" class="text" value="<?PHP echo @$search;?>" name="keyword" />&nbsp;
            <input type="submit" class="button" value="ค้นหา"/>
        </form>
        
        <form action="<?php echo $linkUrl;?>&amp;act=deleteAll" method="post" onsubmit="return confirmDelete(this);">
        <table cellpadding="0" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th><input type="checkbox" class="check_all" /></th>
                    <th><?php echo @$lang_set['deliverypoint_code']; ?></th>
                    <th><?php echo @$lang_set['deliverypoint_name']; ?></th>
                    <th><?php echo @$lang_set['deliverypoint_name_en']; ?></th>
                    <th><?php echo @$lang_set['deliverypoint_province']; ?></th>
                    <th><?php echo @$lang_set['deliverypoint_distrinct']; ?></th>
                    <th><?php echo @$lang_set['deliverypoint_phone']; ?></th>
                    <th><?php echo @$lang_set['deliverypoint_price']; ?></th>
                    <th><?php echo @$lang_set['deliverypoint_status']; ?></th>
                    <th style="text-align:right;"><?php echo @$lang_set['action']; ?></th>
                </tr>
            </thead>            
            <?php 
            if(@$getPage){
                foreach(@$getPage as $key => $val){
				@$getprovince = @$db->getOne("province","*"," PROVINCE_ID='".@$val['DeliveryPointProvince']."' and lang_code='".@$lang_code."'");
				@$getdistrinct = @$db->getOne("district","*"," AMPHUR_ID='".@$val['DeliveryPointDistrict']."' and lang_code='".@$lang_code."'");
            ?>
            <tr>
                <th><input type="checkbox" name="pagedel[]" value="<?php echo @$val['DeliveryPointID'];?>"/></th>
                <th><?php echo @$val['DeliveryPointCode'];?></th>
                <th><?php echo @$val['DeliveryPointName'];?></th>
                <th><?php echo @$val['DeliveryPointName_EN'];?></th>
                <th><?php echo @$getprovince['PROVINCE_NAME'];?></th>
                <th><?php echo @$getdistrinct['AMPHUR_NAME'];?></th>
                <th><?php echo @$val['DeliveryPointPhone'];?></th>
                <th style="text-align:right;"><?php echo @$val['DeliveryPointPrice'];?></th>
                <th>
				
				<select name="DeliveryPointStatus" onchange="AJAX_Update_status('deliverypoint','DeliveryPointStatus',this.options[this.selectedIndex].value,'<?php echo @$val['DeliveryPointID']?>','DeliveryPointID');">
                	<option value="1" <?php echo (@$val['DeliveryPointStatus']=="1" ? "selected" : "");?>><?php echo @$lang_set['show']; ?></option>
                    <option value="0" <?php echo (@$val['DeliveryPointStatus']=="0" ? "selected" : "");?>><?php echo @$lang_set['hide']; ?></option>
                </select>
                
                </th>
                <th style="text-align:right;">
                <a href="<?php echo $linkUrl;?>&act=edit&DeliveryPointID=<?php echo @$val['DeliveryPointID']?>#add" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> |
                <a href="javascript:void();" title="Delete" onclick="chkConfirm('<?php echo $linkUrl;?>&act=deletedata&DeliveryPointID=<?php echo @$val['DeliveryPointID']?>','ยืนยันการลบข้อมูล');"><img src="resources/images/icons/cross.png" alt="Delete" /></a>
                </th>
            </tr>
                
            <?php
                }
            }else{
            ?>
            <tr>
                <th colspan="11" style="text-align:center"><?php echo @$lang_set['not_data']; ?></th>
            </tr>
            <?php 
            }
            ?>
            
            <tfoot>
                <tr>
                    <td colspan="11">
                        <div class="bulk-actions align-left">
                            <select name="actdel">
                                <option value="del"><?php echo @$lang_set['delete']; ?></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;?>&page=1&keyword=<?PHP echo @$search;?>" title="หน้าแรก">&laquo; หน้าแรก</a><a href="<?php echo $linkUrl;?>&page=<?php echo (1==$page ? $page : @$page-1);?>&keyword=<?PHP echo @$search;?>" title="ก่อนหน้า">&laquo; ก่อนหน้า</a>
                             <?php if( @$arrPage["startPage"]!="" && @$arrPage["endPage"] !="" ){?>       
                                        <?php 
                                        for($i = @$arrPage["startPage"]; $i <= @$arrPage["endPage"]; ++$i) {
                                            echo'<a href="'. $linkUrl.'&keyword='.@$search.'&page='.@$i.'" '.(@$page == @$i ? 'class="number current"' : '').'>'.(@$i).'</a>';
                                        }?>
                             <?php }?>
                            <a href="<?php echo $linkUrl;?>&page=<?php echo ($page==$arrPage["allpage"] ? $page : $page+1);?>&keyword=<?PHP echo @$search;?>" title="ถัดไป">ถัดไป &raquo;</a><a href="<?php echo $linkUrl;?>&page=<?php echo @$arrPage["allpage"];?>&keyword=<?PHP echo @$search;?>" title="หน้าสุดท้าย">หน้าสุดท้าย &raquo;</a>
                        <?php }?>
                        </div> 
                        <!-- End .pagination -->
                        <div class="clear"></div>
                    </td>
                </tr>
            </tfoot>
        </table>	
        </form>
        </div>		
        <!-- End Tab Content id="list"-->
        <!-- Start Tab Content id="add"-->
    	<div class="tab-content <?php echo (@$_GET['act']=="edit" ? 'default-tab' : '');?>" id="add">
     		<form action="<?php echo $linkUrl;?>&act=<?php echo (@$_GET['act']=="edit" ? "editdata" : "add");?>#add" method="post" enctype="multipart/form-data" onsubmit="return checkpagedeliverypoint();"><!--onsubmit="return checkdelivery();"-->
            	<fieldset>
                      <input type="hidden" name="DeliveryPointID" value="<?php echo  @$_GET['DeliveryPointID'];?>">
                      <table>
                      	<tr>
                        	<td width="75px">
                            	<label><?php echo @$lang_set['deliverypoint_code']; ?>:</label>
                            </td><td>
                            	<input type="text" class="text-input medium-input" name="DeliveryPointCode" id="DeliveryPointCode" value="<?php echo @$arrRes['DeliveryPointCode'];?>" />
                            </td><td width="75px">
                            	 <label><?php echo @$lang_set['deliverypoint_name']; ?>:</label>
                            </td><td>	
                            	<input type="text" class="text-input large-input" name="DeliveryPointName" id="DeliveryPointName" value="<?php echo @$arrRes['DeliveryPointName'];?>" />
                            </td><td width="100px">
                            	 <label><?php echo @$lang_set['deliverypoint_name_en']; ?>:</label>
                            </td><td>	
                            	<input type="text" class="text-input large-input" name="DeliveryPointName_EN" id="DeliveryPointName_EN" value="<?php echo @$arrRes['DeliveryPointName_EN'];?>" />
                            </td><td width="25%">
                            </td>
                        <tr>
                      </table>
                      <table>
                      	<tr>
                        	<td width="75px">
                            	<label><?php echo @$lang_set['deliverypoint_address']; ?>:</label>
                            </td><td>
                            	<input type="text" class="text-input large-input" name="DeliveryPointAddress" id="DeliveryPointAddress" value="<?php echo @$arrRes['DeliveryPointAddress'];?>" />
                            </td>
                        <tr>
                      </table>
                      <table>
                      	<tr>
                        	<td width="75px">
                            	<label><?php echo @$lang_set['deliverypoint_province']; ?>:</label>
                            </td><td>
                            	<select name="DeliveryPointProvince" id="DeliveryPointProvince" onchange="SelectProvince('<?PHP echo @$lang_code;?>','DeliveryPoint','0')">
								<?php 
                                if(@$getProvince){foreach(@$getProvince as $key => $val){
                                ?>
                                <option value="<?php echo @$val['PROVINCE_ID'];?>" <?php echo (@$val['PROVINCE_ID']=='' || @$val['PROVINCE_ID']==@$arrRes['DeliveryPointProvince'] ? "selected" : "")?>><?php echo @$val['PROVINCE_NAME'];?></option>
                                <?php }
                                }
                                ?>						
                              </select>
                            </td><td width="50px">
                            	<label><?php echo @$lang_set['deliverypoint_district']; ?>:</label>
                            </td><td>
                            	 <select name="DeliveryPointDistrict" id="DeliveryPointDistrict" >
									<?php 
                                    if(@$getDistrict){foreach(@$getDistrict as $key => $val){
                                    ?>
                                    <option value="<?php echo @$val['AMPHUR_ID'];?>" <?php echo (@$val['AMPHUR_ID']=='' || @$val['AMPHUR_ID']==@$arrRes['DeliveryPointDistrict'] ? "selected" : "")?>><?php echo @$val['AMPHUR_NAME'];?></option>
                                    <?php }
                                    }
                                    ?>						
                                  </select>
                            </td><td width="50px">
                            	<label><?php echo @$lang_set['deliverypoint_tambon']; ?>:</label>
                            </td><td>
                            	<input type="text" class="text-input large-input" name="DeliveryPointTambon" id="DeliveryPointTambon" value="<?php echo @$arrRes['DeliveryPointTambon'];?>"/>
                            </td><td width="100px">
                            	<label><?php echo @$lang_set['deliverypoint_postcode']; ?>:</label>
                            </td><td>
                            	<input type="text" class="text-input medium-input" name="DeliveryPointPostCode" id="DeliveryPointPostCode" value="<?php echo @$arrRes['DeliveryPointPostCode'];?>" maxlength="5"/>
                            </td>
                        <tr>
                      </table>
                      <table>
                      	<tr>
                        	<td width="75px">
                            	<label><?php echo @$lang_set['deliverypoint_phone']; ?>:</label>
                            </td><td>
                            	<input type="text" class="text-input smail-input" name="DeliveryPointPhone" id="DeliveryPointPhone" value="<?php echo @$arrRes['DeliveryPointPhone'];?>" maxlength="15"/>
                            </td>
                            <td width="75px">
                            	<label><?php echo @$lang_set['deliverypoint_price']; ?>:</label>
                            </td><td>
                            	<input type="text" class="text-input smail-input" name="DeliveryPointPrice" id="DeliveryPointPrice" value="<?php echo (@$arrRes['DeliveryPointStatus']=="" ? '100' : @$arrRes['DeliveryPointPrice']); ?>" maxlength="15"/>
                            </td>
                        <tr>
                      </table>
                      <table>
                      	<tr>
                        	<td>
                            	 <input type="radio" name="DeliveryPointStatus" value="1" <?php echo (@$arrRes['DeliveryPointStatus']=="1" ? "checked" : "" ); ?> /> <?php echo @$lang_set['show']; ?>
                      			<input type="radio" name="DeliveryPointStatus" value="0"  <?php echo ( !@$arrRes['DeliveryPointStatus'] || @$arrRes['DeliveryPointStatus']=="0" ? "checked" : "" ); ?>/><?php echo @$lang_set['hide']; ?>
                            </td>
                        <tr>
                      </table>
                    <p>
                        <input type="submit" class="button" value="<?php echo @$lang_set['submit']; ?>" />
                    </p>
        		</fieldset>
        	</form>				
        </div>
        <!-- End Tab Content id="add"-->
</div>

Youez - 2016 - github.com/yon3zu
LinuXploit