/[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.1 by sysadm, Fri Sep 9 13:35:20 2005 UTC Revision 1.5 by sysadm, Thu Jan 7 01:37:22 2010 UTC
# Line 88  Line 88 
88                                          <td align="center"><a href="search.php?type=author">作者搜索</a></td>                                          <td align="center"><a href="search.php?type=author">作者搜索</a></td>
89                                  </tr>                                  </tr>
90                                  <tr height=20>                                  <tr height=20>
                                         <td align="center"><a href="search.php?type=fulltext">全文检索</a></td>  
                                 </tr>  
                                 <tr height=20>  
91                                          <td></td>                                          <td></td>
92                                  </tr>                                  </tr>
93                                  <tr height=30 class="title_bar_5">                                  <tr height=30 class="title_bar_5">
# Line 100  Line 97 
97                                          <td></td>                                          <td></td>
98                                  </tr>                                  </tr>
99                                  <tr height=20>                                  <tr height=20>
                                         <td align="center"><a href="search.php?type=s_e">资源搜索</a></td>  
                                 </tr>  
                                 <tr height=20>  
100                                          <td align="center"><a href="search.php?type=whereis">地址搜索</a></td>                                          <td align="center"><a href="search.php?type=whereis">地址搜索</a></td>
101                                  </tr>                                  </tr>
102                                  <tr height=20>                                  <tr height=20>
                                         <td align="center"><a href="search.php?type=google">搜索引擎</a></td>  
                                 </tr>  
                                 <tr height=20>  
                                         <td align="center"><a href="search.php?type=site_reg">网站登录</a></td>  
                                 </tr>  
                                 <tr height=20>  
103                                          <td></td>                                          <td></td>
104                                  </tr>                                  </tr>
105                                  <tr height=30 class="title_bar_5">                                  <tr height=30 class="title_bar_5">
# Line 200  Line 188 
188                                                          </form>                                                          </form>
189  <?  <?
190                          break;                          break;
                 case "fulltext":  
 ?>  
                                                         请进入论坛<a href="/bbs/search_form.php" target="_blank">高级搜索功能区</a>。  
 <?  
                         break;  
                 case "s_e":  
 ?>  
                                                         请输入查找内容,并选择资源类型和位置,"%"为通配符。  
                                                         <form action="s_e.php" method="get">  
                                                                 <p align="left">  
                                                                         查找内容:  
                                                                         <input name="text" value=""><br>  
                                                                         类型:  
                                                                         <input type="radio" name="class" value="WWW" checked>WWW  
                                                                         <input type="radio" name="class" value="FTP">FTP  
                                                                         <input type="radio" name="class" value="TELNET">TELNET  
                                                                         <input type="radio" name="class" value="BC">网络广播  
                                                                         <input type="radio" name="class" value="MMS">媒体流<br>  
                                                                         位置:  
                                                                         <input type="radio" name="location" value="INTERNET" checked>Internet  
                                                                         <input type="radio" name="location" value="LAN">校园网  
                                                                 </p>  
                                                                 <p>  
                                                                         <input type="submit" value="开始搜索">  
                                                                 </p>  
                                                         </form>  
 <?  
                         break;  
                 case "site_reg":  
 ?>  
                                                         请输入网站名称、描述等内容,并选择合适资源类型和位置。  
                                                         <form action="site_reg.php" method="post">  
                                                                 <p align="left">  
                                                                         名称:  
                                                                         <input name="sitename" value="" size=40> 40个字符以内<br>  
                                                                         网址:  
                                                                         <input name="url" value="" size=40> 255个字符以内<br>  
                                                                         类型:  
                                                                         <input type="radio" name="class" value="WWW" checked>WWW  
                                                                         <input type="radio" name="class" value="FTP">FTP  
                                                                         <input type="radio" name="class" value="TELNET">TELNET  
                                                                         <input type="radio" name="class" value="BC">网络广播  
                                                                         <input type="radio" name="class" value="MMS">媒体流<br>  
                                                                         位置:  
                                                                         <input type="radio" name="location" value="INTERNET" checked>Internet  
                                                                         <input type="radio" name="location" value="LAN">校园网<br>  
                                                                         内容简介:<br>  
                                                                         <textarea name="description" cols=50 rows=4></textarea> 255个字符以内<br>  
                                                                 </p>  
                                                                 <hr size=1 color=black>  
                                                                 <p align="left">  
                                                                         联系人姓名:  
                                                                         <input name="name" value=""> 10个字符以内<br>  
                                                                         联系人E-mail:  
                                                                         <input name="email" value=""> 30个字符以内  
                                                                 </p>  
                                                                 <p>  
                                                                         <input type="submit" value="提交">  
                                                                         <input type="reset" value="清空">  
                                                                 </p>  
                                                         </form>  
 <?  
                         break;  
191                  case "whereis":                  case "whereis":
192                          if (isset($_GET["ip"]))                          if (isset($_GET["ip"]))
193                                  $ip_str=trim($_GET["ip"]);                                  $ip_str=trim($_GET["ip"]);
# Line 273  Line 198 
198                          {                          {
199                                  $ip_str=gethostbyname($ip_str);                                  $ip_str=gethostbyname($ip_str);
200    
201                                  if (!(ereg("^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$",$ip_str,$ips)))                                  if (!(preg_match("/^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$/",$ip_str,$ips)))
202                                  {                                  {
203                                          echo "<p>Invalid IP address!</p>";                                          echo "<p>Invalid IP address!</p>";
204                                  }                                  }
205    
206                                  if (ereg("^10.",$ip_str) || ereg("^192.168.",$ip_str))  //                              if (preg_match("/^10./",$ip_str) || preg_match("/^192.168./",$ip_str))
207                                    if (false)
208                                  {                                  {
209                                          $xml_parser = xml_parser_create();                                          $xml_parser = xml_parser_create();
210                                          xml_set_element_handler($xml_parser, "startElement", "endElement");                                          xml_set_element_handler($xml_parser, "startElement", "endElement");
# Line 354  Line 280 
280                                                          </form>                                                          </form>
281  <?  <?
282                          break;                          break;
283                  case "google":  
 ?>  
                                                         请输入查找内容。  
                                                         <form action="http://www.google.com/search" method="get" target="_blank">  
                                                                 <input name="q" value="">  
                                                                 <input type="submit" value="Google搜索">  
                                                         </form>  
 <?  
                         break;  
284                  default:                  default:
285  ?>  ?>
286                                                          请从左侧列表选择查找类型。                                                          请从左侧列表选择查找类型。


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

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