1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
<?php require_once('check_login.php');
$master_room_info = get_master_room((int)$_GET["id"], (int)$_GET["location_id"]);
$check_if_f12_has_this_size = false; if($master_room_info["location_id"] > 1){ $check_if_f12_has_this_size = check_if_f12_has_this_size($master_room_info["id"]); }
$location = get_location((int)$_GET["location_id"]); ?> <!DOCTYPE html> <html> <head> <?php require_once('html_head.php'); ?>
<script type="text/javascript"> $(function () { $("#datefrom").datepicker({dateFormat: 'yy-mm-dd', minDate: '0'}); $("#dateto").datepicker({dateFormat: 'yy-mm-dd', minDate: '0'});
$("input[name='is_onlinesales']").on("click", function () { if ($("input[name='is_onlinesales']:checked").val() == 1) { $("#remain_room").show(); } else { $("#remain_room").hide(); $("#remain_room input").val(0); } });
if ($("input[name='is_onlinesales']:checked").val() == 1) { $("#remain_room").show(); } else { $("#remain_room").hide(); $("#remain_room input").val(0); }
$("input[name='has_discounted_price']:checked").click();
<?php /*if($check_if_f12_has_this_size){ ?> $(".control_1 input").attr("disabled", true).attr("readonly", true).css("cursor", "not-allowed");
$('form').submit(function () { $(".control_1 input").attr("disabled", false); }); <?php } */?> }); </script>
<style> .discounted_price_content { display: none; } </style> </head> <body> <form action="master_room_modify.php" method="post" name="modifyform" id="modifyform" enctype="multipart/form-data"> <input type="hidden" name="master_room_id" value="<?= (int)$_GET["id"] ?>"/> <input type="hidden" name="total_room" value="<?= $master_room_info["total_room"] ?>"> <input type="hidden" name="location_id" value="<?= (int)$_GET["location_id"] ?>">
<table width="1100" 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="master_room_index.php?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 class="pagetitletxt"> <b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/>修改 倉庫管理設定(尺寸)</b> </td> </tr> <tr> <td align="left" valign="middle"><!-- Content --> <table border="0" cellpadding="0" cellspacing="0">
<tr> <td width="120" align="right" valign="top" class='content'>樓層</td> <td class='content' valign="top">: </td> <td class='content'> <?= $location["location_name_tc"] ?> <br><br> </td> </tr>
<tr> <td width="120" align="right" valign="top" class='content'>網上預訂</td> <td class='content' valign="top">: </td> <td class='content'> <input type="radio" class="content" name="is_onlinesales" value="1" required <?php if ($master_room_info["is_onlinesales"] == 1) echo "checked"; ?> /> 可以 <input type="radio" class="content" name="is_onlinesales" value="0" required <?php if ($master_room_info["is_onlinesales"] == 0) echo "checked"; ?> /> 不可以 <br><br>
<div id="remain_room" style="display: <?php if ($master_room_info["is_onlinesales"] == 1) echo "block"; else echo "none"; ?> ;margin-bottom: 20px;"> 保留 <input type="text" name="remain_room" value="<?= $master_room_info["remain_room"] ?>" style="width: 30px;"> 個單位不被租出, 單位總數 <?= $master_room_info["total_room"] ?> </div> </td> </tr>
<tr> <td width="120" align="right" valign="top" class='content'>尺寸數值</td> <td class='content' valign="top">: </td> <td class='content'> 長度: <?= $master_room_info["length"]; ?> 闊度: <?= $master_room_info["width"]; ?> 高度: <?= $master_room_info["height"]; ?>
<!--長度: <input type="text" name="length" value="<? /*=$master_room_info["length"]*/ ?>"/> 闊度: <input type="text" name="width" value="<? /*=$master_room_info["width"]*/ ?>"/> 高度: <input type="text" name="height" value="<? /*=$master_room_info["height"]*/ ?>"/>-->
<br><br> </td> </tr>
<tr> <td width="120" align="right" valign="top" class='content'>前台顯示尺寸</td> <td class='content' valign="top">: </td> <td class='content'> <?= $master_room_info["display_size"] ?> <br><br> </td> </tr>
<tr class="control_1"> <td width="120" align="right" valign="top" class='content'>原價</td> <td class='content' valign="top">: </td> <td class='content'> $<input type="text" class="content" name="retail_price" value="<?= ($master_room_info["retail_price"]) ?>" required/> <?php if($check_if_f12_has_this_size) { //echo "<a href='master_room_modifyform.php?id=".$check_if_f12_has_this_size["id"]."&location_id=1'><span class='msg'>按此前往12樓修改倉庫資料。</span></a>"; echo "<span class='msg'>請確保價格與12樓相同</span>"; }?> <br><br> </td> </tr>
<tr class="control_1"> <td width="120" align="right" valign="top" class='content'>有否優惠價?</td> <td class='content' valign="top">: </td> <td class='content'> <input type="radio" class="content" name="has_discounted_price" value="1" required <?php if ($master_room_info["has_discounted_price"] == 1) echo "checked"; ?> onclick="$('.discounted_price_content').show();"/> 有 <input type="radio" class="content" name="has_discounted_price" value="0" required <?php if ($master_room_info["has_discounted_price"] == 0) echo "checked"; ?> onclick="$('.discounted_price_content').hide();"/> 沒有 <br><br> </td> </tr>
<tr class="discounted_price_content control_1"> <td width="120" align="right" valign="top" class='content'>優惠價</td> <td class='content' valign="top">: </td> <td class='content'> $<input type="text" class="content" name="discounted_price" value="<?= numberformat($master_room_info["discounted_price"]) ?>" required/> <br><br> </td> </tr>
<tr class="discounted_price_content control_1"> <td width="120" 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" id="datefrom" value="<?= $master_room_info["effectivedate_from"] ?>"> <br><br> </td> </tr>
<tr class="discounted_price_content control_1"> <td width="120" 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" id="dateto" value="<?= $master_room_info["effectivedate_to"] ?>"> <br><br> </td> </tr>
</table> <!-- End Content --></td> </tr> <tr> <td align="left" valign="middle"> </td> </tr> </table> </form> </body> </html>
|