Commit 9bde68211d67af848223272cb9f10c772c5cd953
1 parent
d86f256e
【留言板】检索页面修改
Showing
2 changed files
with
32 additions
and
16 deletions
trunk/www/apidocassets/javascript/mess_admin.js
trunk/www/mess_admin/list.php
1 | 1 | <?php |
2 | + error_reporting(0); | |
2 | 3 | $page = isset($_GET['page']) ? $_GET['page'] : 0 ; |
4 | + $str = 'name='.$_GET['name']; | |
5 | + $str .= '&sex='.$_GET['sex']; | |
6 | + $str .= '&tel='.$_GET['tel']; | |
7 | + $str .= '&mail='.$_GET['mail']; | |
8 | + $str .= '&title='.$_GET['title']; | |
9 | + | |
3 | 10 | $prePage = ($page - 1)<0 ? 0 : ($page - 1); |
4 | 11 | $nextPage = ($page + 1); |
5 | 12 | $mess_list = []; |
6 | - $mess_res = file_get_contents("http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessList/getList/?page={$page}"); | |
13 | + $url = "http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessList/getList/?page={$page}&{$str}"; | |
14 | + $mess_res = file_get_contents($url); | |
15 | + | |
7 | 16 | if ($mess_res) { |
8 | 17 | $mess_list = json_decode($mess_res,true)['result']; |
9 | 18 | } |
10 | 19 | |
11 | - | |
12 | - | |
13 | 20 | ?> |
14 | 21 | |
15 | 22 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
... | ... | @@ -53,29 +60,29 @@ |
53 | 60 | <tr></tr> |
54 | 61 | <tr> |
55 | 62 | <td colspan="6"> |
56 | - <form class="frm_search" id="frm_search" > | |
63 | + <form action="list.php" method="get" class="frm_search" id="frm_search" > | |
57 | 64 | <label> |
58 | - 用户名:<input type="text" id="name" value="" > | |
65 | + 用户名:<input type="text" name="name" id="name" value="" > | |
59 | 66 | </label> |
60 | 67 | <label> |
61 | - 性别:<select id="sex"> | |
62 | - <option value="0">选择性别</option> | |
63 | - <option value="1">男</option> | |
64 | - <option value="2">女</option> | |
68 | + 性别:<select id="sex" name="sex"> | |
69 | + <option value="">选择性别</option> | |
70 | + <option value="0">男</option> | |
71 | + <option value="1">女</option> | |
65 | 72 | </select> |
66 | 73 | </label> |
67 | 74 | <label> |
68 | - 手机号:<input type="text" id="tel" value="" > | |
75 | + 手机号:<input type="text" id="tel" name="tel" value="" > | |
69 | 76 | </label> |
70 | 77 | <label> |
71 | - 邮箱:<input type="email" id="email" value="" > | |
78 | + 邮箱:<input type="email" id="mail" name="mail" value="" > | |
72 | 79 | </label> |
73 | 80 | <label> |
74 | - 标题:<input type="text" id="title" value="" > | |
81 | + 标题:<input type="text" id="title" name="title" value="" > | |
75 | 82 | </label> |
76 | 83 | <label> |
77 | - <button type="submit">检索</button> | |
78 | - <button type="reset">清空</button> | |
84 | + <input type="submit" value="检索" > | |
85 | + <input type="reset" value="清空" > | |
79 | 86 | </label> |
80 | 87 | </form> |
81 | 88 | </td> |
... | ... | @@ -140,8 +147,8 @@ |
140 | 147 | </label>--> |
141 | 148 | <span style="width: 300px; display: inline-block;"></span> |
142 | 149 | <label> |
143 | - <a href="?page=<?php echo $prePage; ?>">上一页</a> | |
144 | - <a href="?page=<?php echo $nextPage; ?>" >下一页</a> | |
150 | + <a href="?page=<?php echo $prePage; ?><?php echo $str; ?>" >上一页</a> | |
151 | + <a href="?page=<?php echo $nextPage; ?><?php echo $str; ?>" >下一页</a> | |
145 | 152 | </label> |
146 | 153 | </td> |
147 | 154 | </tr> | ... | ... |