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

Annotation of /fenglin/www/search.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations)
Sun Apr 13 03:29:02 2025 UTC (11 months ago) by sysadm
Branch: MAIN
Changes since 1.13: +0 -1 lines
Refact

1 sysadm 1.1 <?
2 sysadm 1.11 require_once "../lib/common.inc.php";
3 sysadm 1.8 require_once "../lib/db_open.inc.php";
4 sysadm 1.12 require_once "../bbs/session_init.inc.php";
5 sysadm 1.1 ?>
6     <?
7     if (isset($_GET["type"]))
8     $type=$_GET["type"];
9     else
10     $type="";
11    
12     switch($type)
13     {
14     case "journal":
15 sysadm 1.7 $title="精品导读";
16 sysadm 1.1 break;
17     case "doc":
18 sysadm 1.7 $title="文档搜索";
19 sysadm 1.1 break;
20     case "author":
21 sysadm 1.7 $title="作者搜索";
22 sysadm 1.1 break;
23     default:
24 sysadm 1.7 $title="选择类别";
25 sysadm 1.1 break;
26     }
27     ?>
28     <html>
29     <head>
30 sysadm 1.7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
31 sysadm 1.11 <title><? echo $BBS_name; ?> - 搜索</title>
32 sysadm 1.1 <link rel="stylesheet" href="css/default.css" type="text/css">
33     </head>
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 sysadm 1.11 <td><? echo $BBS_name; ?> &gt;&gt; <a href="search.php">搜索</a> &gt;&gt; <? echo $title; ?></td>
43 sysadm 1.1 <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 sysadm 1.7 <td align="center">- 论坛搜索 -</td>
61 sysadm 1.1 </tr>
62     <tr height=5>
63     <td></td>
64     </tr>
65     <tr height=20>
66 sysadm 1.7 <td align="center"><a href="search.php?type=journal">精品导读</a></td>
67 sysadm 1.1 </tr>
68     <tr height=20>
69 sysadm 1.7 <td align="center"><a href="search.php?type=doc">文档搜索</a></td>
70 sysadm 1.1 </tr>
71     <tr height=20>
72 sysadm 1.7 <td align="center"><a href="search.php?type=author">作者搜索</a></td>
73 sysadm 1.1 </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 sysadm 1.7 <option value="0">--请选择发布时间--</option>
98 sysadm 1.1 <?
99     $rs=mysql_query("select * from journal_index where enable order by dt");
100     while($row=mysql_fetch_array($rs))
101     {
102 sysadm 1.6 ?><option value="<? echo $row["JID"]; ?>"><? echo date("Y-m-d",strtotime($row["dt"]));?></option>
103 sysadm 1.1 <?
104     }
105     mysql_free_result($rs);
106     ?>
107     </select>
108 sysadm 1.7 <input type="submit" value="浏览" onclick="return (jid.value!='0');">
109 sysadm 1.1 </form>
110     <?
111     break;
112     case "doc":
113     ?>
114 sysadm 1.7 请选择版块,并输入查找内容,"%"为通配符。
115 sysadm 1.12 <form action="/bbs/list.php" method="get" target="_blank" onsubmit="return (sid.value != 0);">
116 sysadm 1.1 <select name="sid" value="0">
117     <?
118 sysadm 1.13 require_once "../bbs/section_list_dst.inc.php";
119 sysadm 1.10
120 sysadm 1.13 echo section_list_dst($db_conn);
121 sysadm 1.1 ?>
122     </select>
123     <input name="search_text" value="">
124 sysadm 1.10 <input type="submit" value="搜索">
125 sysadm 1.1 </form>
126     <?
127     break;
128     case "author":
129     ?>
130 sysadm 1.7 请输入查找内容,"%"为通配符。
131 sysadm 1.1 <form action="/bbs/search_user.php" method="get" target="_blank">
132     <input name="search_text" value="">
133 sysadm 1.7 <input type="submit" value="搜索">
134 sysadm 1.1 </form>
135     <?
136     break;
137     default:
138     ?>
139 sysadm 1.7 请从左侧列表选择查找类型。
140 sysadm 1.1 <?
141     }
142     ?>
143     </div>
144     </td>
145     </tr>
146     </table>
147     </td>
148     </tr>
149    
150     </table>
151     <?
152 sysadm 1.8 mysql_close($db_conn);
153    
154 sysadm 1.1 include "./foot.inc.php";
155     ?>
156     </center>
157     </body>
158     </html>

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