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

Annotation of /fenglin/www/search.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (hide 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 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    
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 sysadm 1.11 <td><? echo $BBS_name; ?> &gt;&gt; <a href="search.php">搜索</a> &gt;&gt; <? echo $title; ?></td>
44 sysadm 1.1 <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 sysadm 1.7 <td align="center">- 论坛搜索 -</td>
62 sysadm 1.1 </tr>
63     <tr height=5>
64     <td></td>
65     </tr>
66     <tr height=20>
67 sysadm 1.7 <td align="center"><a href="search.php?type=journal">精品导读</a></td>
68 sysadm 1.1 </tr>
69     <tr height=20>
70 sysadm 1.7 <td align="center"><a href="search.php?type=doc">文档搜索</a></td>
71 sysadm 1.1 </tr>
72     <tr height=20>
73 sysadm 1.7 <td align="center"><a href="search.php?type=author">作者搜索</a></td>
74 sysadm 1.1 </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 sysadm 1.7 <option value="0">--请选择发布时间--</option>
99 sysadm 1.1 <?
100     $rs=mysql_query("select * from journal_index where enable order by dt");
101     while($row=mysql_fetch_array($rs))
102     {
103 sysadm 1.6 ?><option value="<? echo $row["JID"]; ?>"><? echo date("Y-m-d",strtotime($row["dt"]));?></option>
104 sysadm 1.1 <?
105     }
106     mysql_free_result($rs);
107     ?>
108     </select>
109 sysadm 1.7 <input type="submit" value="浏览" onclick="return (jid.value!='0');">
110 sysadm 1.1 </form>
111     <?
112     break;
113     case "doc":
114     ?>
115 sysadm 1.7 请选择版块,并输入查找内容,"%"为通配符。
116 sysadm 1.12 <form action="/bbs/list.php" method="get" target="_blank" onsubmit="return (sid.value != 0);">
117 sysadm 1.1 <select name="sid" value="0">
118     <?
119 sysadm 1.13 require_once "../bbs/section_list_dst.inc.php";
120 sysadm 1.10
121 sysadm 1.13 echo section_list_dst($db_conn);
122 sysadm 1.1 ?>
123     </select>
124     <input name="search_text" value="">
125 sysadm 1.10 <input type="submit" value="搜索">
126 sysadm 1.1 </form>
127     <?
128     break;
129     case "author":
130     ?>
131 sysadm 1.7 请输入查找内容,"%"为通配符。
132 sysadm 1.1 <form action="/bbs/search_user.php" method="get" target="_blank">
133     <input name="search_text" value="">
134 sysadm 1.7 <input type="submit" value="搜索">
135 sysadm 1.1 </form>
136     <?
137     break;
138     default:
139     ?>
140 sysadm 1.7 请从左侧列表选择查找类型。
141 sysadm 1.1 <?
142     }
143     ?>
144     </div>
145     </td>
146     </tr>
147     </table>
148     </td>
149     </tr>
150    
151     </table>
152     <?
153 sysadm 1.8 mysql_close($db_conn);
154    
155 sysadm 1.1 include "./foot.inc.php";
156     ?>
157     </center>
158     </body>
159     </html>

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