/[LeafOK_CVS]/fenglin/www/search.php
ViewVC logotype

Contents of /fenglin/www/search.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations)
Sat Mar 29 07:06:57 2025 UTC (11 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.10: +3 -2 lines
Add site name and domain to common.inc.php

1 <?
2 require_once "../lib/common.inc.php";
3 require_once "../lib/db_open.inc.php";
4 ?>
5 <?
6 if (isset($_GET["type"]))
7 $type=$_GET["type"];
8 else
9 $type="";
10
11 switch($type)
12 {
13 case "journal":
14 $title="精品导读";
15 break;
16 case "doc":
17 $title="文档搜索";
18 break;
19 case "author":
20 $title="作者搜索";
21 break;
22 default:
23 $title="选择类别";
24 break;
25 }
26 ?>
27 <html>
28 <head>
29 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
30 <title><? echo $BBS_name; ?> - 搜索</title>
31 <link rel="stylesheet" href="css/default.css" type="text/css">
32 </head>
33
34 <body>
35 <center>
36 <?
37 include "./head.inc.php";
38 ?>
39 <table width="760" border="0" cellpadding="0" cellspacing="0">
40 <tr height=20 bgcolor=#F3F9FC>
41 <td width="20">&nbsp;</td>
42 <td><? echo $BBS_name; ?> &gt;&gt; <a href="search.php">搜索</a> &gt;&gt; <? echo $title; ?></td>
43 <td width="20">&nbsp;</td>
44 </tr>
45 <tr>
46 <td colspan=3 height=1 bgcolor=gray></td>
47 </tr>
48 <tr height=5>
49 <td>&nbsp;</td>
50 </tr>
51 </table>
52 <table width="760" border="0" cellpadding="0" cellspacing="0">
53 <tr>
54 <td width="20%" align="center" valign="top" class="td2">
55 <table width="80%" border="0" cellpadding="0" cellspacing="0">
56 <tr height=20>
57 <td></td>
58 </tr>
59 <tr height=30 class="title_bar_5">
60 <td align="center">- 论坛搜索 -</td>
61 </tr>
62 <tr height=5>
63 <td></td>
64 </tr>
65 <tr height=20>
66 <td align="center"><a href="search.php?type=journal">精品导读</a></td>
67 </tr>
68 <tr height=20>
69 <td align="center"><a href="search.php?type=doc">文档搜索</a></td>
70 </tr>
71 <tr height=20>
72 <td align="center"><a href="search.php?type=author">作者搜索</a></td>
73 </tr>
74 <tr height=20>
75 <td></td>
76 </tr>
77 </table>
78 </td>
79 <td width="80%" align="center" valign="top">
80 <table width="80%" border="0" cellpadding="0" cellspacing="0">
81 <tr height="20">
82 <td></td>
83 </tr>
84 <tr height="30" class="title_bar_6">
85 <td><? echo $title; ?></td>
86 </tr>
87 <tr>
88 <td class="td4">
89 <div style="margin:10px;" align="center">
90 <?
91 switch($type)
92 {
93 case "journal":
94 ?>
95 <form action="journal.php" method="get" target="_blank">
96 <select name="jid" value="0">
97 <option value="0">--请选择发布时间--</option>
98 <?
99 $rs=mysql_query("select * from journal_index where enable order by dt");
100 while($row=mysql_fetch_array($rs))
101 {
102 ?><option value="<? echo $row["JID"]; ?>"><? echo date("Y-m-d",strtotime($row["dt"]));?></option>
103 <?
104 }
105 mysql_free_result($rs);
106 ?>
107 </select>
108 <input type="submit" value="浏览" onclick="return (jid.value!='0');">
109 </form>
110 <?
111 break;
112 case "doc":
113 ?>
114 请选择版块,并输入查找内容,"%"为通配符。
115 <form action="/bbs/bbs.php" method="get" target="_blank" onsubmit="return (sid.value != 0);">
116 <select name="sid" value="0">
117 <option value="0">--请选择版块--</option>
118 <?
119 $sql = "SELECT section_config.SID, section_config.CID,
120 section_config.title AS s_title, section_class.title AS c_title
121 FROM section_config INNER JOIN section_class ON section_config.CID = section_class.CID
122 WHERE section_config.enable AND section_class.enable AND read_user_level = 0
123 ORDER BY section_class.sort_order, section_config.sort_order";
124
125 $rs = mysqli_query($db_conn, $sql);
126
127 if ($rs == false)
128 {
129 echo mysqli_error($db_conn);
130 exit();
131 }
132
133 $last_cid = -1;
134 while ($rs != false && $row = mysqli_fetch_array($rs))
135 {
136 if ($row["CID"] != $last_cid)
137 {
138 $last_cid = $row["CID"];
139 ?>
140 <option value="0">==<? echo $row["c_title"]; ?>==</option>
141 <?
142 }
143 ?>
144 <option value="<? echo $row["SID"];?>">&nbsp;&nbsp;├<? echo $row["s_title"]; ?></option>
145 <?
146 }
147 mysqli_free_result($rs);
148 ?>
149 </select>
150 <input name="search_text" value="">
151 <input type="submit" value="搜索">
152 </form>
153 <?
154 break;
155 case "author":
156 ?>
157 请输入查找内容,"%"为通配符。
158 <form action="/bbs/search_user.php" method="get" target="_blank">
159 <input name="search_text" value="">
160 <input type="submit" value="搜索">
161 </form>
162 <?
163 break;
164 default:
165 ?>
166 请从左侧列表选择查找类型。
167 <?
168 }
169 ?>
170 </div>
171 </td>
172 </tr>
173 </table>
174 </td>
175 </tr>
176
177 </table>
178 <?
179 mysql_close($db_conn);
180
181 include "./foot.inc.php";
182 ?>
183 </center>
184 </body>
185 </html>

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