| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/hkosl.com/innoutstorage/webadmin/ |
Upload File : |
<?php
require_once('check_login.php');
$id = (int)$_GET["id"];
$discount_type = (int)$_GET["discount_type"];
if($discount_type == 1){ //預繳優惠
$title = "預繳";
$sql = "select * from master_type_code where typeid = ? and code != ? and deleted = ? order by sort ASC";
$parameters = array("PAYMENT_TERM", "SPECIFIC_SIZE", 0);
$discount_option_info = bind_pdo($sql, $parameters, "selectall");
}
if($discount_type == 2){ //指定單位優惠
$title = "指定單位";
$sql = "select * from master_type_code where typeid = ? and code = ? and deleted = ? order by sort ASC";
$parameters = array("PAYMENT_TERM", "SPECIFIC_SIZE", 0);
$discount_option_info = bind_pdo($sql, $parameters, "selectall");
}
$master_room_info = get_master_room();
$sql = "SELECT *, discount.lastupdate as discount_lastupdate, discount.lastupby as discount_lastupby FROM master_room_discount discount INNER JOIN master_room master_room ON discount.master_room_id = master_room.id WHERE discount.id=? ";
$parameters = array($id);
$master_room_discount = bind_pdo($sql, $parameters, "selectone");
$check_if_f12_has_this_size = false;
if($master_room_discount["location_id"] > 1){
$check_if_f12_has_this_size = check_if_f12_has_this_size($master_room_discount["master_room_id"]);
}
$sql99 = "SELECT * FROM sys_cms_login WHERE cmsloginid=?";
$parameters99 = array((int)$master_room_discount{'discount_lastupby'});
$row99 = bind_pdo($sql99, $parameters99, "selectone");
?>
<!DOCTYPE html>
<html>
<head>
<?php require_once('html_head.php'); ?>
<script type="text/javascript">
$(function () {
$("#effectivedate_from").datepicker({dateFormat: 'yy-mm-dd', minDate : '0'});
$("#effectivedate_to").datepicker({dateFormat: 'yy-mm-dd', minDate : '0'});
<?php if($check_if_f12_has_this_size){ ?>
$("input").attr("disabled", true).attr("readonly", true).css("cursor", "not-allowed");
$('form').submit(function () {
$("input").attr("disabled", false);
});
<?php } ?>
});
</script>
<!--- End Select Calendar Date --->
</head>
<body>
<form action="discount_modify.php" method="post" name="modifyform" enctype="multipart/form-data">
<input type="hidden" name="discount_type" value="<?= (int)$_GET{'discount_type'}; ?>">
<input type="hidden" name="discount_id" value="<?= (int)$_GET{'id'}; ?>">
<input type="hidden" name="location_id" value="<?= (int)$_GET{'location_id'}; ?>">
<input type="hidden" name="payment_term" value="<?= $master_room_discount["payment_term"]; ?>">
<input type="hidden" name="master_room_id" value="<?= $master_room_discount["master_room_id"]; ?>">
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="70" align="right" valign="middle" class="icontxt">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50" align="center" style="font-size: 12px;">
<?php if(!$check_if_f12_has_this_size){ ?>
<input type="image" alt="submit" src="images/iconSave.png" width="32" height="32" border="0"><br>
儲存
<?php } ?>
</td>
<td width="50" align="center">
<a href="discount_index.php?discount_type=<?=(int)$_GET["discount_type"]?>&msg=取消&location_id=<?=(int)$_GET["location_id"]?>"><img src="images/iconCancel.png" alt="Cancel" width="32" height="32" border="0"><br>
取消 </a></td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<span style="float:left;" class="pagetitletxt"> <b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/>
修改 優惠設定(<?=$title?>)
</b></span><span style="float:right;" class="msg">最近更新: <?= $row99{'cmsusername'} . ' ' . $master_room_discount{'discount_lastupdate'}; ?></span>
</td>
</tr>
<tr>
<td align="left" valign="middle"><!-- Content -->
<table border="0" cellpadding="0" cellspacing="0">
<?php if($check_if_f12_has_this_size) { ?>
<tr>
<td width="150" align="right" valign="top" class='content'></td>
<td width="5" valign="top" class='content'></td>
<td class='content'>
<span class='msg' style='font-size: 15px;'>請前往12樓修改優惠設定。</span>
<br><br>
</td>
</tr>
<?php } ?>
<tr>
<td width="150" align="right" valign="top" class='content'>倉庫尺寸</td>
<td width="5" valign="top" class='content'>: </td>
<td class='content'>
<?=$master_room_discount["length"]." X ".$master_room_discount["width"]." X ".$master_room_discount["height"]; ?>
<br><br>
</td>
</tr>
<tr>
<td width="150" align="right" valign="top" class='content'>優惠類型</td>
<td width="5" valign="top" class='content'>: </td>
<td class='content'>
<?php
$master_type_code_info = get_master_type_code("PAYMENT_TERM", $master_room_discount["payment_term"]);
echo $master_type_code_info["name_tc"];
?>
<br><br>
</td>
</tr>
<tr>
<td width="150" align="right" valign="top" class='content'>優惠折扣</td>
<td width="5" valign="top" class='content'>: </td>
<td class='content'>
<input type="text" name="discount" value="<?=$master_room_discount["discount"]?>" class="content" required="required"/> % (eg: 20% -> 8折)
<br><br>
</td>
</tr>
<?php if($_GET["discount_type"] == 1){ ?>
<tr>
<td width="150" align="right" valign="top" class='content'>最後折扣(不可折上折)</td>
<td width="5" valign="top" class='content'>: </td>
<td class='content'>
<input type="checkbox" class="content" name="is_final_discount" id="is_final_discount" value="1" <?php if($master_room_discount["is_final_discount"] == 1) echo "checked";?>>
<br>
<span class="msg">折扣順序: 先進行預繳折扣,然後進行指定尺寸折扣。</span>
<br><br>
</td>
</tr>
<?php } ?>
<tr>
<td width="150" align="right" valign="top" class='content'>開始日期</td>
<td width="5" valign="top" class='content'>: </td>
<td class='content'>
<input type="text" class="content" name="effectivedate_from" value="<?=$master_room_discount["effectivedate_from"]?>" id="effectivedate_from" required="required">
<br><br>
</td>
</tr>
<tr>
<td width="150" align="right" valign="top" class='content'>完結日期</td>
<td width="5" valign="top" class='content'>: </td>
<td class='content'>
<input type="text" class="content" name="effectivedate_to" value="<?=$master_room_discount["effectivedate_to"]?>" id="effectivedate_to" required="required">
<br><br>
</td>
</tr>
<tr>
<td width="150" align="right" valign="top" class='content'>前台顯示優惠</td>
<td width="5" valign="top" class='content'>: </td>
<td class='content'>
<input type="radio" class="content" name="show_frontend" id="show_frontend" value="1" <?=$master_room_discount["show_frontend"]==1?"checked":"";?>> 顯示
<input type="radio" class="content" name="show_frontend" id="show_frontend" value="0" <?=$master_room_discount["show_frontend"]==0?"checked":"";?>> 不顯示
<br>
<span class="msg">同尺寸的優惠最多在前台顯示2個,按預付月份較大排序。</span>
<br><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>