/[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.9 by sysadm, Fri Mar 28 11:27:52 2025 UTC Revision 1.11 by sysadm, Sat Mar 29 07:06:57 2025 UTC
# Line 1  Line 1 
1  <?  <?
2            require_once "../lib/common.inc.php";
3          require_once "../lib/db_open.inc.php";          require_once "../lib/db_open.inc.php";
4  ?>  ?>
5  <?  <?
# Line 26  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 38  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 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                          $rs_class=mysql_query("select CID,title from section_class where enable order by sort_order");                          $sql = "SELECT section_config.SID, section_config.CID,
120                          while($row_class=mysql_fetch_array($rs_class))                                          section_config.title AS s_title, section_class.title AS c_title
121                                            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                            }
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;


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

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