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

Diff of /fenglin/www/search.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.7 by sysadm, Sat Mar 1 09:08:07 2025 UTC Revision 1.11 by sysadm, Sat Mar 29 07:06:57 2025 UTC
# Line 1  Line 1 
1  <?  <?
2          require_once "./whereis.inc.php";          require_once "../lib/common.inc.php";
3            require_once "../lib/db_open.inc.php";
4  ?>  ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  
5  <?  <?
6          if (isset($_GET["type"]))          if (isset($_GET["type"]))
7                  $type=$_GET["type"];                  $type=$_GET["type"];
# Line 19  Line 19 
19                  case "author":                  case "author":
20                          $title="作者搜索";                          $title="作者搜索";
21                          break;                          break;
                 case "fulltext":  
                         $title="全文检索";  
                         break;  
                 case "s_e":  
                         $title="资源搜索";  
                         break;  
                 case "whereis":  
                         $title="地址搜索";  
                         break;  
                 case "google":  
                         $title="搜索引擎";  
                         break;  
                 case "site_reg":  
                         $title="网站登录";  
                         break;  
22                  default:                  default:
23                          $title="选择类别";                          $title="选择类别";
24                          break;                          break;
# Line 42  Line 27 
27  <html>  <html>
28  <head>  <head>
29  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
30  <title>枫林在线 - 搜索</title>  <title><? echo $BBS_name; ?> - 搜索</title>
31  <link rel="stylesheet" href="css/default.css" type="text/css">  <link rel="stylesheet" href="css/default.css" type="text/css">
32  </head>  </head>
33    
# Line 54  Line 39 
39  <table width="760" border="0" cellpadding="0" cellspacing="0">  <table width="760" border="0" cellpadding="0" cellspacing="0">
40          <tr height=20 bgcolor=#F3F9FC>          <tr height=20 bgcolor=#F3F9FC>
41                  <td width="20">&nbsp;</td>                  <td width="20">&nbsp;</td>
42                  <td>枫林在线 &gt;&gt; <a href="search.php">搜索</a> &gt;&gt; <? echo $title; ?></td>                  <td><? echo $BBS_name; ?> &gt;&gt; <a href="search.php">搜索</a> &gt;&gt; <? echo $title; ?></td>
43                  <td width="20">&nbsp;</td>                  <td width="20">&nbsp;</td>
44          </tr>          </tr>
45          <tr>          <tr>
# Line 111  Line 96 
96                                                                  <select name="jid" value="0">                                                                  <select name="jid" value="0">
97                                                                  <option value="0">--请选择发布时间--</option>                                                                  <option value="0">--请选择发布时间--</option>
98  <?  <?
                         $db_conn=include "./db_open.inc.php";  
99                          $rs=mysql_query("select * from journal_index where enable order by dt");                          $rs=mysql_query("select * from journal_index where enable order by dt");
100                          while($row=mysql_fetch_array($rs))                          while($row=mysql_fetch_array($rs))
101                          {                          {
# Line 119  Line 103 
103  <?  <?
104                          }                          }
105                          mysql_free_result($rs);                          mysql_free_result($rs);
                         mysql_close($db_conn);  
106  ?>  ?>
107                                                                  </select>                                                                  </select>
108                                                                  <input type="submit" value="浏览" onclick="return (jid.value!='0');">                                                                  <input type="submit" value="浏览" onclick="return (jid.value!='0');">
# Line 129  Line 112 
112                  case "doc":                  case "doc":
113  ?>  ?>
114                                                          请选择版块,并输入查找内容,"%"为通配符。                                                          请选择版块,并输入查找内容,"%"为通配符。
115                                                          <form action="/bbs/bbs.php" method="get" target="_blank">                                                          <form action="/bbs/bbs.php" method="get" target="_blank" onsubmit="return (sid.value != 0);">
116                                                                  <select name="sid" value="0">                                                                  <select name="sid" value="0">
117                                                                  <option value="0">--请选择版块--</option>                                                                  <option value="0">--请选择版块--</option>
118  <?  <?
119                          $db_conn=include "./db_open.inc.php";                          $sql = "SELECT section_config.SID, section_config.CID,
120                          $rs_class=mysql_query("select CID,title from section_class where enable order by sort_order");                                          section_config.title AS s_title, section_class.title AS c_title
121                          while($row_class=mysql_fetch_array($rs_class))                                          FROM section_config INNER JOIN section_class ON section_config.CID = section_class.CID
122                                            WHERE section_config.enable AND section_class.enable AND read_user_level = 0
123                                            ORDER BY section_class.sort_order, section_config.sort_order";
124    
125                            $rs = mysqli_query($db_conn, $sql);
126    
127                            if ($rs == false)
128                          {                          {
129  ?><option value="0">==<? echo $row_class["title"];?>==</option>                                  echo mysqli_error($db_conn);
130  <?                                  exit();
131                                  $rs_section=mysql_query("select SID,title from section_config where CID=".                          }
132                                          $row_class["CID"]." and enable and read_user_level<=11 order by sort_order");    
133                                  while($row_section=mysql_fetch_array($rs_section))                          $last_cid = -1;
134                            while ($rs != false && $row = mysqli_fetch_array($rs))
135                            {
136                                    if ($row["CID"] != $last_cid)
137                                  {                                  {
138  ?><option value="<? echo $row_section['SID'];?>">&nbsp;&nbsp;├<? echo $row_section["title"]; ?></option>                                          $last_cid = $row["CID"];
139    ?>
140                                                                    <option value="0">==<? echo $row["c_title"]; ?>==</option>
141  <?  <?
142                                  }                                  }
143                                  mysql_free_result($rs_section);  ?>
144                          }                                                                  <option value="<? echo $row["SID"];?>">&nbsp;&nbsp;├<? echo $row["s_title"]; ?></option>
145                          mysql_free_result($rs_class);  <?
146                          mysql_close($db_conn);                          }
147                            mysqli_free_result($rs);
148  ?>  ?>
149                                                                  </select>                                                                  </select>
150                                                                  <input name="search_text" value="">                                                                  <input name="search_text" value="">
151                                                                  <input type="submit" value="搜索" onclick="return (sid.value!='0');">                                                                  <input type="submit" value="搜索">
152                                                          </form>                                                          </form>
153  <?  <?
154                          break;                          break;
# Line 181  Line 176 
176    
177  </table>  </table>
178  <?  <?
179            mysql_close($db_conn);
180    
181          include "./foot.inc.php";          include "./foot.inc.php";
182  ?>  ?>
183  </center>  </center>


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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