| 1 |
<? |
<? |
| 2 |
require_once "./whereis.inc.php"; |
require_once "../lib/common.inc.php"; |
| 3 |
include "./log.inc.php"; |
require_once "../lib/db_open.inc.php"; |
| 4 |
|
require_once "../bbs/session_init.inc.php"; |
| 5 |
?> |
?> |
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
| 6 |
<? |
<? |
| 7 |
if (isset($_GET["type"])) |
if (isset($_GET["type"])) |
| 8 |
$type=$_GET["type"]; |
$type=$_GET["type"]; |
| 12 |
switch($type) |
switch($type) |
| 13 |
{ |
{ |
| 14 |
case "journal": |
case "journal": |
| 15 |
$title="精品导读"; |
$title="绮惧搧瀵艰"; |
| 16 |
break; |
break; |
| 17 |
case "doc": |
case "doc": |
| 18 |
$title="文档搜索"; |
$title="鏂囨。鎼滅储"; |
| 19 |
break; |
break; |
| 20 |
case "author": |
case "author": |
| 21 |
$title="作者搜索"; |
$title="浣滆呮悳绱"; |
|
break; |
|
|
case "fulltext": |
|
|
$title="全文检索"; |
|
|
break; |
|
|
case "s_e": |
|
|
$title="资源搜索"; |
|
|
break; |
|
|
case "whereis": |
|
|
$title="地址搜索"; |
|
|
break; |
|
|
case "google": |
|
|
$title="搜索引擎"; |
|
|
break; |
|
|
case "site_reg": |
|
|
$title="网站登录"; |
|
| 22 |
break; |
break; |
| 23 |
default: |
default: |
| 24 |
$title="选择类别"; |
$title="閫夋嫨绫诲埆"; |
| 25 |
break; |
break; |
| 26 |
} |
} |
| 27 |
?> |
?> |
| 28 |
<html> |
<html> |
| 29 |
<head> |
<head> |
| 30 |
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 31 |
<title>枫林在线 - 搜索</title> |
<title><? echo $BBS_name; ?> - 鎼滅储</title> |
| 32 |
<link rel="stylesheet" href="css/default.css" type="text/css"> |
<link rel="stylesheet" href="css/default.css" type="text/css"> |
| 33 |
</head> |
</head> |
|
|
|
| 34 |
<body> |
<body> |
| 35 |
<center> |
<center> |
| 36 |
<? |
<? |
| 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"> </td> |
<td width="20"> </td> |
| 42 |
<td>枫林在线 >> <a href="search.php">搜索</a> >> <? echo $title; ?></td> |
<td><? echo $BBS_name; ?> >> <a href="search.php">鎼滅储</a> >> <? echo $title; ?></td> |
| 43 |
<td width="20"> </td> |
<td width="20"> </td> |
| 44 |
</tr> |
</tr> |
| 45 |
<tr> |
<tr> |
| 57 |
<td></td> |
<td></td> |
| 58 |
</tr> |
</tr> |
| 59 |
<tr height=30 class="title_bar_5"> |
<tr height=30 class="title_bar_5"> |
| 60 |
<td align="center">- 论坛搜索 -</td> |
<td align="center">- 璁哄潧鎼滅储 -</td> |
| 61 |
</tr> |
</tr> |
| 62 |
<tr height=5> |
<tr height=5> |
| 63 |
<td></td> |
<td></td> |
| 64 |
</tr> |
</tr> |
| 65 |
<tr height=20> |
<tr height=20> |
| 66 |
<td align="center"><a href="search.php?type=journal">精品导读</a></td> |
<td align="center"><a href="search.php?type=journal">绮惧搧瀵艰</a></td> |
|
</tr> |
|
|
<tr height=20> |
|
|
<td align="center"><a href="search.php?type=doc">文档搜索</a></td> |
|
| 67 |
</tr> |
</tr> |
| 68 |
<tr height=20> |
<tr height=20> |
| 69 |
<td align="center"><a href="search.php?type=author">作者搜索</a></td> |
<td align="center"><a href="search.php?type=doc">鏂囨。鎼滅储</a></td> |
| 70 |
</tr> |
</tr> |
| 71 |
<tr height=20> |
<tr height=20> |
| 72 |
<td align="center"><a href="search.php?type=fulltext">全文检索</a></td> |
<td align="center"><a href="search.php?type=author">浣滆呮悳绱</a></td> |
|
</tr> |
|
|
<tr height=20> |
|
|
<td></td> |
|
|
</tr> |
|
|
<tr height=30 class="title_bar_5"> |
|
|
<td align="center">- 网络搜索 -</td> |
|
|
</tr> |
|
|
<tr height=5> |
|
|
<td></td> |
|
|
</tr> |
|
|
<tr height=20> |
|
|
<td align="center"><a href="search.php?type=s_e">资源搜索</a></td> |
|
|
</tr> |
|
|
<tr height=20> |
|
|
<td align="center"><a href="search.php?type=whereis">地址搜索</a></td> |
|
|
</tr> |
|
|
<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> |
|
|
<td></td> |
|
|
</tr> |
|
|
<tr height=30 class="title_bar_5"> |
|
|
<td align="center">- 统计搜索 -</td> |
|
|
</tr> |
|
|
<tr height=20> |
|
|
<td align="center"><a href="view_daily_stat.php">发文统计</a></td> |
|
| 73 |
</tr> |
</tr> |
| 74 |
<tr height=20> |
<tr height=20> |
| 75 |
<td></td> |
<td></td> |
| 94 |
?> |
?> |
| 95 |
<form action="journal.php" method="get" target="_blank"> |
<form action="journal.php" method="get" target="_blank"> |
| 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 |
{ |
{ |
| 102 |
?><option value="<? echo $row["JID"]; ?>"><? echo strftime("%Y-%m-%d",strtotime($row["dt"]));?></option> |
?><option value="<? echo $row["JID"]; ?>"><? echo date("Y-m-d",strtotime($row["dt"]));?></option> |
| 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');"> |
| 109 |
</form> |
</form> |
| 110 |
<? |
<? |
| 111 |
break; |
break; |
| 112 |
case "doc": |
case "doc": |
| 113 |
?> |
?> |
| 114 |
请选择版块,并输入查找内容,"%"为通配符。 |
璇烽夋嫨鐗堝潡锛屽苟杈撳叆鏌ユ壘鍐呭锛"%"涓洪氶厤绗︺ |
| 115 |
<form action="/bbs/bbs.php" method="get" target="_blank"> |
<form action="/bbs/list.php" method="get" target="_blank" onsubmit="return (sid.value != 0);"> |
| 116 |
<select name="sid" value="0"> |
<select name="sid" value="0"> |
|
<option value="0">--请选择版块--</option> |
|
| 117 |
<? |
<? |
| 118 |
$db_conn=include "./db_open.inc.php"; |
require_once "../bbs/section_list_dst.inc.php"; |
| 119 |
$rs_class=mysql_query("select CID,title from section_class where enable order by sort_order"); |
|
| 120 |
while($row_class=mysql_fetch_array($rs_class)) |
echo section_list_dst($db_conn); |
|
{ |
|
|
?><option value="0">==<? echo $row_class["title"];?>==</option> |
|
|
<? |
|
|
$rs_section=mysql_query("select SID,title from section_config where CID=". |
|
|
$row_class["CID"]." and enable and read_user_level<=11 order by sort_order"); |
|
|
while($row_section=mysql_fetch_array($rs_section)) |
|
|
{ |
|
|
?><option value="<? echo $row_section['SID'];?>"> ├<? echo $row_section["title"]; ?></option> |
|
|
<? |
|
|
} |
|
|
mysql_free_result($rs_section); |
|
|
} |
|
|
mysql_free_result($rs_class); |
|
|
mysql_close($db_conn); |
|
| 121 |
?> |
?> |
| 122 |
</select> |
</select> |
| 123 |
<input name="search_text" value=""> |
<input name="search_text" value=""> |
| 124 |
<input type="submit" value="搜索" onclick="return (sid.value!='0');"> |
<input type="submit" value="鎼滅储"> |
| 125 |
</form> |
</form> |
| 126 |
<? |
<? |
| 127 |
break; |
break; |
| 128 |
case "author": |
case "author": |
| 129 |
?> |
?> |
| 130 |
请输入查找内容,"%"为通配符。 |
璇疯緭鍏ユ煡鎵惧唴瀹癸紝"%"涓洪氶厤绗︺ |
| 131 |
<form action="/bbs/search_user.php" method="get" target="_blank"> |
<form action="/bbs/search_user.php" method="get" target="_blank"> |
| 132 |
<input name="search_text" value=""> |
<input name="search_text" value=""> |
| 133 |
<input type="submit" value="搜索"> |
<input type="submit" value="鎼滅储"> |
| 134 |
</form> |
</form> |
| 135 |
<? |
<? |
| 136 |
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; |
|
|
case "whereis": |
|
|
if (isset($_GET["ip"])) |
|
|
$ip_str=trim($_GET["ip"]); |
|
|
else |
|
|
$ip_str=""; |
|
|
|
|
|
if (strlen($ip_str)>0) |
|
|
{ |
|
|
$ip_str=gethostbyname($ip_str); |
|
|
|
|
|
if (!(ereg("^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$",$ip_str,$ips))) |
|
|
{ |
|
|
echo "<p>Invalid IP address!</p>"; |
|
|
} |
|
|
|
|
|
// if (ereg("^10.",$ip_str) || ereg("^192.168.",$ip_str)) |
|
|
if (false) |
|
|
{ |
|
|
$xml_parser = xml_parser_create(); |
|
|
xml_set_element_handler($xml_parser, "startElement", "endElement"); |
|
|
$fp = fsockopen ("127.0.0.1", 80, $errno, $errstr, 30); |
|
|
if (!$fp) { |
|
|
die("could not open XML input"); |
|
|
} |
|
|
fputs ($fp, "GET /ip=$ip_str HTTP/1.0\r\n\r\n"); |
|
|
while ($data = fgets($fp, 4096)) { |
|
|
if (!xml_parse($xml_parser, $data, feof($fp))) { |
|
|
die(sprintf("XML error: %s at line %d", |
|
|
xml_error_string(xml_get_error_code($xml_parser)), |
|
|
xml_get_current_line_number($xml_parser))); |
|
|
} |
|
|
} |
|
|
fclose ($fp); |
|
|
xml_parser_free($xml_parser); |
|
|
|
|
|
echo ("<table width=80% border=0>\n". |
|
|
"<tr>\n". |
|
|
"<th width=25% align=center>IP</td>\n". |
|
|
"<th width=25% align=center>区域</td>\n". |
|
|
"<th width=50% align=center>位置</td>\n". |
|
|
"</tr>\n"); |
|
|
|
|
|
echo ("<tr>\n". |
|
|
"<td align=center>".$ret["address"]."</td>\n". |
|
|
"<td align=center>".$ret["country"]."</td>\n". |
|
|
"<td align=center>".$ret["area"]."</td>\n". |
|
|
"</tr>\n"); |
|
|
|
|
|
echo ("</table><br>\n"); |
|
|
} |
|
|
else |
|
|
{ |
|
|
$ip_str=""; |
|
|
for($i=1;$i<=4;$i++) |
|
|
$ip_str.=(str_repeat("0",3 - strlen($ips[$i])).$ips[$i].($i<4?".":"")); |
|
|
|
|
|
$db_conn=include "./db_open.inc.php"; |
|
|
|
|
|
$rs=mysql_query("select begin_ip,end_ip,address,area from ip_list where ". |
|
|
"begin_ip<='$ip_str' and end_ip>='$ip_str' order by ". |
|
|
"begin_ip desc, end_ip") |
|
|
or die("Search address error!"); |
|
|
|
|
|
echo ("<table width=80% border=0>\n". |
|
|
"<tr>\n". |
|
|
"<th width=25% align=center>起始IP</td>\n". |
|
|
"<th width=25% align=center>结束IP</td>\n". |
|
|
"<th width=50% align=center>地理位置</td>\n". |
|
|
"</tr>\n"); |
|
|
while($row=mysql_fetch_array($rs)) |
|
|
{ |
|
|
echo ("<tr>\n". |
|
|
"<td align=center>".$row["begin_ip"]."</td>\n". |
|
|
"<td align=center>".$row["end_ip"]."</td>\n". |
|
|
"<td align=center>".$row["address"]." ".$row["area"]."</td>\n". |
|
|
"</tr>\n"); |
|
|
} |
|
|
echo ("</table><br>\n"); |
|
|
|
|
|
mysql_free_result($rs); |
|
|
mysql_close($db_conn); |
|
|
} |
|
|
} |
|
|
?> |
|
|
请输入查找内容。 |
|
|
<form action="search.php" method="get"> |
|
|
<input type="hidden" name="type" value="whereis"> |
|
|
<input name="ip"> |
|
|
<input type="submit" value="搜索"> |
|
|
</form> |
|
|
<? |
|
|
break; |
|
|
case "google": |
|
|
?> |
|
|
<!-- Search Google --> |
|
|
<center> |
|
|
<form method="get" action="http://www.google.cn/custom" target="google_window"> |
|
|
<table bgcolor="#ffffff"> |
|
|
<tr><td nowrap="nowrap" valign="top" align="left" height="32"> |
|
|
|
|
|
<input type="text" name="q" size="31" maxlength="255" value=""></input> |
|
|
<input type="submit" name="sa" value="Google 搜索"></input> |
|
|
<input type="hidden" name="client" value="pub-3013347141025996"></input> |
|
|
<input type="hidden" name="forid" value="1"></input> |
|
|
<input type="hidden" name="ie" value="GB2312"></input> |
|
|
<input type="hidden" name="oe" value="GB2312"></input> |
|
|
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input> |
|
|
<input type="hidden" name="hl" value="zh-CN"></input> |
|
|
</td></tr></table> |
|
|
</form> |
|
|
</center> |
|
|
<!-- Search Google --> |
|
|
<? |
|
|
break; |
|
| 137 |
default: |
default: |
| 138 |
?> |
?> |
| 139 |
请从左侧列表选择查找类型。 |
璇蜂粠宸︿晶鍒楄〃閫夋嫨鏌ユ壘绫诲瀷銆 |
| 140 |
<? |
<? |
| 141 |
} |
} |
| 142 |
?> |
?> |
| 149 |
|
|
| 150 |
</table> |
</table> |
| 151 |
<? |
<? |
| 152 |
|
mysql_close($db_conn); |
| 153 |
|
|
| 154 |
include "./foot.inc.php"; |
include "./foot.inc.php"; |
| 155 |
?> |
?> |
| 156 |
</center> |
</center> |