| 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 : |
<?php
$linkUrl = "index.php?name=manu_master&file=setupsize";
if(@$_GET['act']=="add"){
@$arrData = array();
@$arrData['SetupSizeMin'] = @$_POST['SetupSizeMin'];
@$arrData['SetupSizeMax'] = @$_POST['SetupSizeMax'];
@$arrData['SetupSizeSize'] = @$_POST['SetupSizeSize'];
@$arrData['SetupSizePrice'] = @$_POST['SetupSizePrice'];
@$arrData['unit'] = @$_POST['unit'];
foreach(@$arrData as $k => $v ){
@$arrData[@$k] = str_replace("'", "\'", @$v);
}
//echo "<pre>"; print_r(@$arrData);
//exit;
@$db->insertData("setupsize",@$arrData);
//exit;
@$msg = "Save Data complete.";
@$res = true;
}elseif(@$_GET['act']=="editdata"){
@$arrData = array();
@$arrData['SetupSizeMin'] = @$_POST['SetupSizeMin'];
@$arrData['SetupSizeMax'] = @$_POST['SetupSizeMax'];
@$arrData['SetupSizeSize'] = @$_POST['SetupSizeSize'];
@$arrData['SetupSizePrice'] = @$_POST['SetupSizePrice'];
@$arrData['unit'] = @$_POST['unit'];
foreach(@$arrData as $k => $v ){
@$arrData[@$k] = str_replace("'", "\'", @$v);
}
@$db->updateData("setupsize",@$arrData," SetupSizeID='".@$_POST['SetupSizeID']."'");
@$msg = "Edit Data complete.";
@$res = true;
}elseif(@$_GET['act']=="edit"){
@$arrRes = @$db->getOne("setupsize","*"," SetupSizeID='".@$_GET['SetupSizeID']."'");
}elseif(@$_GET['act']=="deletedata"){
@$db->deleteData("setupsize"," SetupSizeID='".@$_GET['SetupSizeID']."'");
@$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("setupsize"," SetupSizeID='".@$val."'");
}
}
@$msg = "Delete Data complete.";
@$res = true;
}
@$where_f = "";
if(@$_POST['keyword']){
@$_POST['keyword'] = str_replace("'", "\'", @$_POST['keyword']);
if(@$where_f){
@$where_f .= " and (SetupSizeMin like '%".@$_POST['keyword']."%' or SetupSizeMax like '%".@$_POST['keyword']."%' or SetupSizeSize like '%".@$_POST['keyword']."%')";
}else{
@$where_f = " (SetupSizeMin like '%".@$_POST['keyword']."%' or SetupSizeMax like '%".@$_POST['keyword']."%' or SetupSizeSize like '%".@$_POST['keyword']."%')";
}
}
@$page = @$_GET['page'] ? @$_GET['page'] : 1;
@$arrpageP = @$db->getAll( "setupsize", "*",@$where_f,"" );
@$arrPage = @$objMaster->viewPages(@$page, @$arrpageP, "15");
@$getPage = @$db->getAll("setupsize","*",@$where_f,"",@$arrPage["offset"]);
//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['setupsize_title']; ?></h3>
<ul class="content-box-tabs">
<li><a href="#list" <?php echo (@$_GET['act']=="" ? 'class="default-tab"' : '');?>><?php echo @$lang_set['list_setupsize']; ?></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_setupsize']; ?></a></li>
</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'];?> :
<input type="text" class="text" value="" name="keyword" />
<input type="submit" class="button" value="ค้นหา"/>
</form>
<form action="<?php echo $linkUrl;?>&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['setupsize_min']; ?></th>
<th><?php echo @$lang_set['setupsize_max']; ?></th>
<th><?php echo @$lang_set['setupsize_size']; ?></th>
<th><?php echo @$lang_set['setupsize_price']; ?></th>
<th><?php echo @$lang_set['setupsize_unit']; ?></th>
<th style="text-align:right;"><?php echo @$lang_set['action']; ?></th>
</tr>
</thead>
<?php
if(@$getPage){
foreach(@$getPage as $key => $val){
?>
<tr>
<td><input type="checkbox" name="pagedel[]" value="<?php echo @$val['SetupSizeID'];?>"/></td>
<td><?php echo @$val['SetupSizeMin'];?></td>
<td><?php echo @$val['SetupSizeMax'];?></td>
<td><?php echo @$val['SetupSizeSize'];?></td>
<td><?php echo @$val['SetupSizePrice'];?></td>
<td><?php echo @$val['unit'];?></td>
<td style="text-align:right;">
<a href="<?php echo $linkUrl;?>&act=edit&SetupSizeID=<?php echo @$val['SetupSizeID']?>#add" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> |
<a href="javascript:void();" onclick="chkConfirm('<?php echo $linkUrl;?>&act=deletedata&SetupSizeID=<?php echo @$val['SetupSizeID']?>','ยืนยันการลบข้อมูล');" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a>
</td>
</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="หน้าแรก">« หน้าแรก</a><a href="<?php echo $linkUrl;?>&page=<?php echo (1==$page ? $page : @$page-1);?>&keyword=<?PHP echo @$search;?>" title="ก่อนหน้า">« ก่อนหน้า</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="ถัดไป">ถัดไป »</a><a href="<?php echo $linkUrl;?>&page=<?php echo @$arrPage["allpage"];?>&keyword=<?PHP echo @$search;?>" title="หน้าสุดท้าย">หน้าสุดท้าย »</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 checkpagesutupsize();"><!--onsubmit="return checkdelivery();"-->
<fieldset>
<input type="hidden" name="SetupSizeID" value="<?php echo @$_GET['SetupSizeID'];?>">
<p>
<label><?php echo @$lang_set['setupsize_min']; ?>:</label>
<input type="text" class="text-input small-input" name="SetupSizeMin" id="SetupSizeMin" value="<?php echo @$arrRes['SetupSizeMin'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></p>
<p>
<label><?php echo @$lang_set['setupsize_max']; ?>:</label>
<input type="text" class="text-input small-input" name="SetupSizeMax" id="SetupSizeMax" value="<?php echo @$arrRes['SetupSizeMax'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></p>
<p>
<label><?php echo @$lang_set['setupsize_size']; ?>:</label>
<input type="text" class="text-input medium-input" name="SetupSizeSize" id="SetupSizeSize" value="<?php echo @$arrRes['SetupSizeSize'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></p>
<p>
<label><?php echo @$lang_set['setupsize_price']; ?>:</label>
<input type="text" class="text-input small-input" name="SetupSizePrice" id="SetupSizePrice" value="<?php echo number_format(@$arrRes['SetupSizePrice']);?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></p>
<p>
<label><?php echo @$lang_set['setupsize_unit']; ?>:</label>
<input type="text" class="text-input small-input" name="unit" id="unit" value="<?php echo @$arrRes['unit'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></p>
<p>
<input type="submit" class="button" value="<?php echo @$lang_set['submit']; ?>" />
</p>
</fieldset>
</form>
</div>
<!-- End Tab Content id="add"-->
</div>