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

Contents of /fenglin/www/search.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations)
Fri Mar 28 05:50:18 2025 UTC (11 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.7: +3 -6 lines
Refine

1 <?
2 require_once "../lib/db_open.inc.php";
3 ?>
4 <?
5 if (isset($_GET["type"]))
6 $type=$_GET["type"];
7 else
8 $type="";
9
10 switch($type)
11 {
12 case "journal":
13 $title="精品导读";
14 break;
15 case "doc":
16 $title="文档搜索";
17 break;
18 case "author":
19 $title="作者搜索";
20 break;
21 case "fulltext":
22 $title="全文检索";
23 break;
24 case "s_e":
25 $title="资源搜索";
26 break;
27 case "whereis":
28 $title="地址搜索";
29 break;
30 case "google":
31 $title="搜索引擎";
32 break;
33 case "site_reg":
34 $title="网站登录";
35 break;
36 default:
37 $title="选择类别";
38 break;
39 }
40 ?>
41 <html>
42 <head>
43 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>枫林在线 - 搜索</title>
45 <link rel="stylesheet" href="css/default.css" type="text/css">
46 </head>
47
48 <body>
49 <center>
50 <?
51 include "./head.inc.php";
52 ?>
53 <table width="760" border="0" cellpadding="0" cellspacing="0">
54 <tr height=20 bgcolor=#F3F9FC>
55 <td width="20">&nbsp;</td>
56 <td>枫林在线 &gt;&gt; <a href="search.php">搜索</a> &gt;&gt; <? echo $title; ?></td>
57 <td width="20">&nbsp;</td>
58 </tr>
59 <tr>
60 <td colspan=3 height=1 bgcolor=gray></td>
61 </tr>
62 <tr height=5>
63 <td>&nbsp;</td>
64 </tr>
65 </table>
66 <table width="760" border="0" cellpadding="0" cellspacing="0">
67 <tr>
68 <td width="20%" align="center" valign="top" class="td2">
69 <table width="80%" border="0" cellpadding="0" cellspacing="0">
70 <tr height=20>
71 <td></td>
72 </tr>
73 <tr height=30 class="title_bar_5">
74 <td align="center">- 论坛搜索 -</td>
75 </tr>
76 <tr height=5>
77 <td></td>
78 </tr>
79 <tr height=20>
80 <td align="center"><a href="search.php?type=journal">精品导读</a></td>
81 </tr>
82 <tr height=20>
83 <td align="center"><a href="search.php?type=doc">文档搜索</a></td>
84 </tr>
85 <tr height=20>
86 <td align="center"><a href="search.php?type=author">作者搜索</a></td>
87 </tr>
88 <tr height=20>
89 <td></td>
90 </tr>
91 </table>
92 </td>
93 <td width="80%" align="center" valign="top">
94 <table width="80%" border="0" cellpadding="0" cellspacing="0">
95 <tr height="20">
96 <td></td>
97 </tr>
98 <tr height="30" class="title_bar_6">
99 <td><? echo $title; ?></td>
100 </tr>
101 <tr>
102 <td class="td4">
103 <div style="margin:10px;" align="center">
104 <?
105 switch($type)
106 {
107 case "journal":
108 ?>
109 <form action="journal.php" method="get" target="_blank">
110 <select name="jid" value="0">
111 <option value="0">--请选择发布时间--</option>
112 <?
113 $rs=mysql_query("select * from journal_index where enable order by dt");
114 while($row=mysql_fetch_array($rs))
115 {
116 ?><option value="<? echo $row["JID"]; ?>"><? echo date("Y-m-d",strtotime($row["dt"]));?></option>
117 <?
118 }
119 mysql_free_result($rs);
120 ?>
121 </select>
122 <input type="submit" value="浏览" onclick="return (jid.value!='0');">
123 </form>
124 <?
125 break;
126 case "doc":
127 ?>
128 请选择版块,并输入查找内容,"%"为通配符。
129 <form action="/bbs/bbs.php" method="get" target="_blank">
130 <select name="sid" value="0">
131 <option value="0">--请选择版块--</option>
132 <?
133 $rs_class=mysql_query("select CID,title from section_class where enable order by sort_order");
134 while($row_class=mysql_fetch_array($rs_class))
135 {
136 ?><option value="0">==<? echo $row_class["title"];?>==</option>
137 <?
138 $rs_section=mysql_query("select SID,title from section_config where CID=".
139 $row_class["CID"]." and enable and read_user_level<=11 order by sort_order");
140 while($row_section=mysql_fetch_array($rs_section))
141 {
142 ?><option value="<? echo $row_section['SID'];?>">&nbsp;&nbsp;├<? echo $row_section["title"]; ?></option>
143 <?
144 }
145 mysql_free_result($rs_section);
146 }
147 mysql_free_result($rs_class);
148 ?>
149 </select>
150 <input name="search_text" value="">
151 <input type="submit" value="搜索" onclick="return (sid.value!='0');">
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