/var/www/hkosl.com/innoutstorage2019/webadmin/output_deposit_report_index.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
<?php
    
require_once("check_login.php");

?>

<!DOCTYPE HTML>
<html>
<head>
    <?php require_once("html_head.php"); ?>

    <script type="text/javascript">

        function isValidDate(date) {
            var matches = /^(\d{4})[-\/](\d{2})[-\/](\d{2})$/.exec(date);
            if (matches == null) return false;
            var d = matches[3];
            var m = matches[2] - 1;
            var y = matches[1];
            var composedDate = new Date(y, m, d);
            return composedDate.getDate() == d &&
                composedDate.getMonth() == m &&
                composedDate.getFullYear() == y;
        }

        function output_deposit_report() {
            var startdate = $("#startdate").val();
            var enddate = $("#enddate").val();

            if (isValidDate(startdate) && isValidDate(enddate)) {
                location.href = "output_deposit_report.php?startdate=" + startdate + "&enddate=" + enddate;
            } else {
                alert("請輸入正確的開始日期和完結日期。");
            }
        }

        $(function () {
            $("#startdate").datepicker({dateFormat: 'yy-mm-dd'});
            $("#enddate").datepicker({dateFormat: 'yy-mm-dd'});
        });
    </script>

</head>

<body>

<table width="1000" height="600" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="200" align="left" valign="top">
            <table width="200" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td height="70" align="left" valign="middle">&nbsp;</td>
                </tr>
                <tr>
                    <td width="200" align="left" valign="top"><!-- Main Menu -->
                        <?php require("menu.php"); ?><!-- End Main Menu --></td>
                </tr>
            </table>
        </td>
        <td width="800" align="left" valign="top">

            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td height="70" align="right" valign="middle" class="icontxt">

                    </td>
                </tr>

                <tr>
                    <td>
                        <span style="float:left;" class="pagetitletxt">&nbsp;&nbsp;
                            <b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/>按金報表</b> </span>

                    </td>
                </tr>
                <tr>
                    <td height="25" align="left" valign="middle" class="msg"><?php if (isset($_GET["msg"])) echo $_GET['msg']; ?></td>
                </tr>
                <tr>
                    <td align="left" valign="middle"><!-- Content -->
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">

                            <tr>
                                <td width="120" align="right" valign="top" class='content'>開始日期</td>
                                <td class='content' valign="top">:&nbsp;</td>
                                <td class='content'>
                                    <input type="text" class="content" name="startdate" id="startdate" style="width: 100px;"/>
                                    <br/><br/></td>
                            </tr>

                            <tr>
                                <td width="100" align="right" valign="top" class='content'>完結日期</td>
                                <td class='content' valign="top">:&nbsp;</td>
                                <td class='content'>
                                    <input type="text" class="content" name="enddate" id="enddate" style="width: 100px;"/>
                                    <br/><br/></td>
                            </tr>

                            <tr>
                                <td width="100" align="right" valign="top" class='content'></td>
                                <td class='content' valign="top">&nbsp;</td>
                                <td class='content'>
                                    <button type="button" onclick="output_deposit_report();">匯出</button>
                                    <br/><br/></td>
                            </tr>

                        </table>
                        <!-- End Content --></td>
                </tr>
                <tr>
                    <td align="left" valign="middle">&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
</table>
</body>
</html>