/var/www/hkosl.com/innoutstorage2019/tc/confirm_rent.php


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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<?php
    
require_once ('../webadmin/basic_info.php');

    
$master_room_info get_master_room($_SESSION["warehousing_web"]["master_room_id"]);

    
$product_info get_product();

    
$customer_type get_master_type_code("CUSTOMER_TYPE");

    if(empty(
$_SESSION["warehousing_web"]["room_id"])){
        echo 
"<script>alert('找不到可租用單位資料。請重新嘗試。'); location.href='rent.php?id=".$_SESSION["warehousing_web"]["master_room_id"]."'</script>";
    }
?>

<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>

    <?php require_once ("html_head.php"?>

    <?php
        
if(isset($_GET["error"]) && $_GET["error"] == 1){
            echo 
"<script>alert('Error occur when processing Paypal payment. Please try again.');</script>";
        }
    
?>

</head>

<body class="stretched no-transition">

<?php require_once ("google_analysis.php"); ?>

<!-- Document Wrapper
============================================= -->
<div id="wrapper" class="clearfix">

    <!-- Header
    ============================================= -->
    <?php require_once ("html_header.php"?>

    <!-- Content
    ============================================= -->
    <section id="content">

        <div class="content-wrap">

            <div class="container clearfix">

                <div class="heading-block center">
                    <h1>租用倉儲</h1>
                </div>

                <form class="nobottommargin" id="billing-form" name="billing-form" action="../paypal/ReviewOrder.php?online=1&langcode=tc" method="post">

                <div class="col-md-12 reserve">
                    <div class="table-responsive clearfix">
                        <h4>你的詳細</h4>
                        <table class="table cart">
                            <thead>
                            <tr>
                                <th class="cart-product-name">項目</th>
                                <th class="cart-product-subtotal">小計</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr class="cart_item">
                                <td class="cart-product-name">
                                    <h1>單位尺碼(長x闊x高): <?=$master_room_info["display_size"]?></h1>
                                    單位費用: HK$<?=$_SESSION["warehousing_web"]["discounted_price"]?> / 月<br />
                                    租月期: <?=$_SESSION["warehousing_web"]["rent_month"]?> 月<br />
                                    預繳所有費用:
                                    <?php
                                        
if($_SESSION["warehousing_web"]["prepaid"] == 1){
                                            echo 
"是<br />";
                                        }else{
                                            echo 
"否<br />";
                                        }

                                        if(
$_SESSION["warehousing_web"]["first_month_half_price"] > 0){
                                            echo 
"首月費用: -HK$".numberformat($_SESSION["warehousing_web"]["first_month_half_price"])."<br />";
                                        }
                                    
?>

                                </td>

                                <td class="cart-product-subtotal">
                                    <span class="amount">HK$<?=numberformat($_SESSION["warehousing_web"]["discounted_price"]*$_SESSION["warehousing_web"]["rent_month"]-$_SESSION["warehousing_web"]["first_month_half_price"])?></span>
                                </td>
                            </tr>
                            <tr class="cart_item">
                                <td class="cart-product-name">
                                    <h1>按金</h1>
                                    HK$<?=numberformat($_SESSION["warehousing_web"]["retail_price"])?> x 2
                                </td>

                                <td class="cart-product-subtotal">
                                    <span class="amount">HK$<?=numberformat($_SESSION["warehousing_web"]["deposit"])?></span>
                                </td>
                            </tr>

                            <?php
                                $product_total 
0;
                                if (!empty(
$_SESSION["warehousing_web"]["order_product"])) {

                                    foreach (
$_SESSION["warehousing_web"]["order_product"] as $product) {
                                        
$product_info  get_product($product["product_id"]);
                                        
$product_total += ($product["price"] * $product["qty"]);
                                        echo 
'<tr class="cart_item">';
                                        echo 
'<td class="cart-product-name">
                                                <h1>' 
$product_info["name_" $langcode] . '</h1>
                                                數量: ' 
$product["qty"] . '
                                            </td>

                                            <td class="cart-product-subtotal">
                                                <span class="amount">HK$' 
.numberformat(numberformat($product["price"] * $product["qty"])) . '</span>
                                            </td>'
;
                                        echo 
'</tr>';
                                    }
                                }
                            
?>

                            </tbody>
                        </table>
                    </div>
                    <div class="center"><h4>總金額:&nbsp;&nbsp;&nbsp;HK$<?=numberformat($_SESSION["warehousing_web"]["discounted_price"]*$_SESSION["warehousing_web"]["rent_month"]-$_SESSION["warehousing_web"]["first_month_half_price"]+$product_total+$_SESSION["warehousing_web"]["deposit"])?></h4></div>
                    <div class="line"></div>
                    <h4>帳單資料</h4>

                    <p></p>



                        <div class="form-process"></div>

                        <div class="col_one_third">
                            <b>頭銜:</b><br />
                            <?php
                                
if($_SESSION["warehousing_web"]["title"] == "Mr")
                                    echo 
"先生";
                                else if(
$_SESSION["warehousing_web"]["title"] == "Mrs")
                                    echo 
"女士";
                                else if(
$_SESSION["warehousing_web"]["title"] == "Ms")
                                    echo 
"小姐";
                            
?>
                        </div>
                        <div class="col_one_third">
                            <b>姓氏:</b><br />
                            <?=$_SESSION["warehousing_web"]["lastname"]?></div>

                        <div class="col_one_third col_last">
                            <b>名字:</b><br />
                            <?=$_SESSION["warehousing_web"]["firstname"]?></div>


                        <?php if($_SESSION["warehousing_web"]["customer_type"] == "BUSINESS"){    ?>

                            <div class="col_one_third">
                                <b>客戶類型:</b><br />
                                <?php
                                    $type_info 
get_master_type_code("CUSTOMER_TYPE"$_SESSION["warehousing_web"]["customer_type"]);

                                    echo 
$type_info["name_".$langcode];
                                
?></div>

                            <div class="col_two_third col_last">
                                <b>公司名稱:</b><br />
                                <?=$_SESSION["warehousing_web"]["companyname"]?></div>
                        <?php }else{ ?>
                            <div class="col_full">
                                <b>客戶類型:</b><br />
                                <?php
                                    $type_info 
get_master_type_code("CUSTOMER_TYPE"$_SESSION["warehousing_web"]["customer_type"]);

                                    echo 
$type_info["name_".$langcode];
                                
?></div>
                        <?php ?>


                        <div class="col_one_third">
                            <b>聯絡電話:</b><br />
                            <?=$_SESSION["warehousing_web"]["tel"]?></div>

                        <div class="col_one_third">
                            <b>電郵:</b><br />
                            <?=$_SESSION["warehousing_web"]["email"]?></div>

                        <div class="col_one_third col_last">
                            <b>帳單地址:</b><br />
                            <?=$_SESSION["warehousing_web"]["address"]?></div>
                        <div class="col_one_third">
                            <b>搬入日期:</b><br />
                            <?=$_SESSION["warehousing_web"]["warehousing_date"]?></div>

                        <?php if($_SESSION["warehousing_web"]["transervice"] == 1){ ?>
                        <div class="col_full">
                            如你需要運輸安排服務,請按如下<br />
                            <label for="billing-form-transervice"><input id="billing-form-transervice" name="billing-form-transervice" type="checkbox" value="1" checked="checked" disabled="disabled" /> <span style="font-size:18px;">運輸服務</span></label>
                        </div>

                            <div class="col_one_third">
                                <b>運輸日期:</b><br />
                                <?=$_SESSION["warehousing_web"]["service_date"]?></div>

                            <div class="col_one_third">
                                <b>運輸地址:</b><br />
                                <?=$_SESSION["warehousing_web"]["delivery_from"]?></div>

                            <div class="col_one_third col_last">
                                <b>運輸目的地:</b><br />
                                <?=$_SESSION["warehousing_web"]["delivery_to"]?></div>

                        <?php ?>

                        <?php /*if($_SESSION["warehousing_web"]["auto_paid"] == 1){ */?><!--
                            <div class="col_full">
                                如果你想使用PayPal定期自動付款服務,請按如下<br />
                                <label for="billing-form-recurring-payment"><input id="billing-form-recurring-payment" name="billing-form-recurring-payment" type="checkbox" value="1" checked="checked" disabled="disabled" /> <span style="font-size:18px;">定期自動付款服務</span></label>
                            </div>
                        --><?php /*} */?>

                        <div class="col_full">
                            <b>租用條款:</b><br />
                            您在此同意條款與細則。您清楚知道您有責任準時支付所有相關費用,並提供有效的付款方式給出入易迷你倉。<br /><br />
                            您的結算日為您開始搬入迷你倉的那天。您同意繳付兩個月按金及至少一個月租用費才能使用出入易迷你倉服務。通過線上繳付系統,您將會在每月的結算日自動支付儲存月費。
                        </div>

                        <div class="col_full">
                            <label for="billing-form-agree"><input id="billing-form-agree" name="billing-form-agree" type="checkbox" checked="checked" value="1" class="required"  disabled="disabled"/> <span style="font-size:18px;">我同意租用條款與細則</span></label>
                        </div>

                        <div class="col_full">
                            <b>付款方式:</b><br /> <img src="../images/visa_mastercard_logo_<?=$langcode?>.png" height="30"></div>

                        <div class="col_full center">
                            <a href="rent.php?id=<?=$_SESSION["warehousing_web"]["master_room_id"]?>" class="button button-light">返回</a>
                            <button class="button nomargin" type="submit" id="billing-form-submit" name="billing-form-submit" value="submit">確認</button>
                        </div>


                    <script type="text/javascript">

                        $("#billing-form").validate({

                        });

                    </script>

                </div>
                </form>
            </div>

        </div>

    </section><!-- #content end -->

    <!-- Footer
    ============================================= -->
    <?php require_once ("html_footer.php"); ?>


</div><!-- #wrapper end -->

<!-- Go To Top
============================================= -->
<div id="gotoTop" class="icon-angle-up"></div>

<!-- Footer Scripts
============================================= -->
<script type="text/javascript" src="../js/functions.js"></script>

</body>
</html>