/[LeafOK_CVS]/fenglin/bbs/themes/default/search_user.view.php
ViewVC logotype

Annotation of /fenglin/bbs/themes/default/search_user.view.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Fri Apr 18 05:12:24 2025 UTC (10 months, 4 weeks ago) by sysadm
Branch: MAIN
Refact search_user

1 sysadm 1.1 <?
2     // Prevent load standalone
3     if (!isset($result_set))
4     {
5     exit();
6     }
7     ?>
8     <html>
9     <head>
10     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
11     <title>用户查找结果</title>
12     <link rel="stylesheet" href="<? echo get_theme_file('css/default'); ?>" type="text/css">
13     <style type="text/css">
14     TD.head,TD.level,TD.login_dt,TD.dark,TD.username
15     {
16     border-right: #d0d3F0 1px solid;
17     border-left: #d0d3F0 1px solid;
18     border-bottom: #d0d3F0 1px solid;
19     }
20     TD.head
21     {
22     font-family: 楷体;
23     color: #909090;
24     }
25     TD.login_dt,TD.level,TD.dark,TD.username
26     {
27     text-align: center;
28     }
29     TD.login_dt,TD.dark
30     {
31     color: #909090;
32     background-color: #eaf0Fa;
33     }
34     TD.head,TD.level
35     {
36     background-color: #fafbfc;
37     }
38     TD.level
39     {
40     color: orange;
41     }
42     TD.username
43     {
44     background-color: #fafbfc;
45     }
46     TD.username:hover
47     {
48     background-color: #eaf0Fa;
49     }
50     </style>
51    
52     <script type="text/javascript" src="../js/nw_open.js"></script>
53     <script type="text/javascript">
54     function ch_page(page)
55     {
56     document.change_page.page.value = page;
57     document.change_page.submit();
58     return false;
59     }
60    
61     function ch_rpp()
62     {
63     document.change_page.page.value = Math.floor((document.change_page.page.value - 1) * <? echo $result_set["data"]["rpp"]; ?> / document.change_page.rpp.value) + 1;
64     document.change_page.submit();
65     return false;
66     }
67     </script>
68     </head>
69     <body>
70     <center>
71     <table cols="2" border="0" cellpadding="0" cellspacing="0" width="1050">
72     <tr>
73     <td colspan="2" style="color:green;">
74     <a class="s2" href="main.php"><? echo $BBS_name; ?></a>&gt;&gt;查找<? echo ($result_set["data"]["online"] ? "在线" : ""); ?><? echo ($result_set["data"]["friend"] ? "好友" : "用户"); ?>
75     </td>
76     </tr>
77     <tr bgcolor="#d0d3F0" height="2">
78     <td colspan="2"></td></tr>
79     <tr>
80     <td class="dark" width="3%"></td>
81     <td class="head" width="97%">
82     <?
83     if ($result_set["data"]["toa"] == 0)
84     {
85     ?>未找到指定用户<?
86     }
87     else
88     {
89     ?>用户查找结果(共<? echo $result_set["data"]["toa"]; ?>位)
90     <?
91     }
92     ?>(当前在线注册用户<? echo $result_set["data"]["user_online"]; ?>位,游客<? echo $result_set["data"]["guest_online"]; ?>位)
93     </td>
94     </tr>
95     </table>
96     <table border="0" cellpadding="1" cellspacing="0" width="1050">
97     <tr height="10">
98     <td>
99     </td>
100     </tr>
101     </table>
102     <table bgcolor="#f0F3Fa" border="0" cellpadding="0" cellspacing="0" width="1050">
103     <tr bgcolor="#d0d3F0" height="20">
104     <td class="title" width="4%"></td>
105     <td class="title" width="15%">用户ID</td>
106     <td class="title" width="20%">昵称</td>
107     <td class="title" width="12%">等级</td>
108     <td class="title" width="18%">最后登陆时间</td>
109     <td class="title" width="27%"></td>
110     <td class="title" width="4%"></td>
111     </tr>
112     <?
113     foreach ($result_set["data"]["users"] as $user)
114     {
115     ?>
116     <tr height="25">
117     <td class="dark">
118     <?
119     if ($user["gender_pub"])
120     {
121     if ($user["gender"] == 'M')
122     {
123     echo ("<font color=blue>♂</font>");
124     }
125     else
126     {
127     echo ("<font color=red>♀</font>");
128     }
129     }
130     else
131     {
132     echo ("<font color=green>?</font>");
133     }
134     ?>
135     </td>
136     <td class="username">
137     <a class="s2" href="show_profile.php?uid=<? echo $user["uid"]; ?>" target=_blank><? echo $user["username"]; ?></a>
138     </td>
139     <td class="dark">
140     <? echo $user["nickname"]; ?>
141     </td>
142     <td class="level">
143     <? echo user_level($user["exp"]); ?>
144     </td>
145     <td class="login_dt">
146     <? echo $user["last_login_dt"]->format("Y-m-d H:i:s"); ?>
147     </td>
148     <td class="level">
149     <?
150     if ($_SESSION["BBS_priv"]->checkpriv(0, S_MSG))
151     {
152     ?>
153     <a class="s2" href="read_msg.php?sent=1&uid=<? echo $user["uid"]; ?>" target=_blank>发送消息</a>
154     <?
155     }
156     ?>
157     </td>
158     <td align="center">
159     </td>
160     </tr>
161     <?
162     }
163     ?>
164     </table>
165     <table cols="3" border="0" cellpadding="5" cellspacing="0" width="1050">
166     <tr bgcolor="#d0d3F0" height="10">
167     <td colspan="3" >
168     </td>
169     </tr>
170     <tr height="10">
171     <td colspan="3" >
172     </td>
173     </tr>
174     <tr>
175     <form action="search_user.php" method="get" id="change_page" name="change_page">
176     <td width="30%" style="color: #909090">
177     每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();">
178     <?
179     foreach ($BBS_list_rpp_options as $v)
180     {
181     echo ("<option value=\"$v\"" . ($v == $result_set["data"]["rpp"] ? " selected" : "") . ">$v</option>");
182     }
183     ?>
184     </select>人
185     <?
186     if ($result_set["data"]["page"] > 1)
187     {
188     ?>
189     <a class="s8" title="首页" href="" onclick="return ch_page(1);">|◀</a>
190     <a class="s8" title="上一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] - 1); ?>);">◀</a>
191     <?
192     }
193     else
194     {
195     ?>
196     |◀ ◀
197     <?
198     }
199     ?>
200     第<input id="page" name="page" value="<? echo ($result_set["data"]["page"]) ; ?>" style="width: 30px;">/<? echo $result_set["data"]["page_total"]; ?>页
201     <?
202     if ($result_set["data"]["page"] < $result_set["data"]["page_total"])
203     {
204     ?>
205     <a class="s8" title="下一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] + 1); ?>);">▶</a>
206     <a class="s8" title="尾页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page_total"]); ?>);">▶|</a>
207     <?
208     }
209     else
210     {
211     ?>
212     ▶ ▶|
213     <?
214     }
215     ?>
216     </td>
217     <td width="50%">
218     <select name="type">
219     <option value="0" <? if ($result_set["data"]["type"] == 0) echo "selected"; ?> >按用户名</option>
220     <option value="1" <? if ($result_set["data"]["type"] == 1) echo "selected"; ?> >按昵称</option>
221     </select>
222     <input type="text" id="search_text" name="search_text" size="15" value="<? echo $result_set["data"]["search_text"];?>">
223     <input type="checkbox" id="online" name="online" value="1" <? echo ($result_set["data"]["online"] ? "checked" : "");?>><font color=#909090>在线</font>
224     <input type="checkbox" id="friend" name="friend" value="1" <? echo ($result_set["data"]["friend"] ? "checked" : "");?>><font color=#909090>好友</font>
225     <input type=image src="images/search.gif" alt="查找用户" border="0" name="image"></a>
226     </td>
227     <td width="10%">
228     </td>
229     </form>
230     </tr>
231     </table>
232     </center>
233     <?
234     include "./foot.inc.php";
235     ?>
236     </body>
237     </html>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1