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

Contents of /fenglin/www/search.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations)
Fri Mar 28 11:27:52 2025 UTC (11 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.8: +0 -15 lines
Remove legacy code

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

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