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

Contents of /fenglin/www/search.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations)
Sat Apr 12 05:06:36 2025 UTC (11 months ago) by sysadm
Branch: MAIN
Changes since 1.12: +2 -38 lines
Refact

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

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