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

Annotation of /fenglin/www/search.php

Parent Directory Parent Directory | Revision Log Revision Log


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

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