| 1 |
<? |
<? |
| 2 |
require_once "./whereis.inc.php"; |
require_once "./whereis.inc.php"; |
|
include "./log.inc.php"; |
|
| 3 |
?> |
?> |
| 4 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 5 |
<? |
<? |
| 11 |
switch($type) |
switch($type) |
| 12 |
{ |
{ |
| 13 |
case "journal": |
case "journal": |
| 14 |
$title="精品导读"; |
$title="绮惧搧瀵艰"; |
| 15 |
break; |
break; |
| 16 |
case "doc": |
case "doc": |
| 17 |
$title="文档搜索"; |
$title="鏂囨。鎼滅储"; |
| 18 |
break; |
break; |
| 19 |
case "author": |
case "author": |
| 20 |
$title="作者搜索"; |
$title="浣滆呮悳绱"; |
| 21 |
break; |
break; |
| 22 |
case "fulltext": |
case "fulltext": |
| 23 |
$title="全文检索"; |
$title="鍏ㄦ枃妫绱"; |
| 24 |
break; |
break; |
| 25 |
case "s_e": |
case "s_e": |
| 26 |
$title="资源搜索"; |
$title="璧勬簮鎼滅储"; |
| 27 |
break; |
break; |
| 28 |
case "whereis": |
case "whereis": |
| 29 |
$title="地址搜索"; |
$title="鍦板潃鎼滅储"; |
| 30 |
break; |
break; |
| 31 |
case "google": |
case "google": |
| 32 |
$title="搜索引擎"; |
$title="鎼滅储寮曟搸"; |
| 33 |
break; |
break; |
| 34 |
case "site_reg": |
case "site_reg": |
| 35 |
$title="网站登录"; |
$title="缃戠珯鐧诲綍"; |
| 36 |
break; |
break; |
| 37 |
default: |
default: |
| 38 |
$title="选择类别"; |
$title="閫夋嫨绫诲埆"; |
| 39 |
break; |
break; |
| 40 |
} |
} |
| 41 |
?> |
?> |
| 42 |
<html> |
<html> |
| 43 |
<head> |
<head> |
| 44 |
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 45 |
<title>枫林在线 - 搜索</title> |
<title>鏋灄鍦ㄧ嚎 - 鎼滅储</title> |
| 46 |
<link rel="stylesheet" href="css/default.css" type="text/css"> |
<link rel="stylesheet" href="css/default.css" type="text/css"> |
| 47 |
</head> |
</head> |
| 48 |
|
|
| 54 |
<table width="760" border="0" cellpadding="0" cellspacing="0"> |
<table width="760" border="0" cellpadding="0" cellspacing="0"> |
| 55 |
<tr height=20 bgcolor=#F3F9FC> |
<tr height=20 bgcolor=#F3F9FC> |
| 56 |
<td width="20"> </td> |
<td width="20"> </td> |
| 57 |
<td>枫林在线 >> <a href="search.php">搜索</a> >> <? echo $title; ?></td> |
<td>鏋灄鍦ㄧ嚎 >> <a href="search.php">鎼滅储</a> >> <? echo $title; ?></td> |
| 58 |
<td width="20"> </td> |
<td width="20"> </td> |
| 59 |
</tr> |
</tr> |
| 60 |
<tr> |
<tr> |
| 72 |
<td></td> |
<td></td> |
| 73 |
</tr> |
</tr> |
| 74 |
<tr height=30 class="title_bar_5"> |
<tr height=30 class="title_bar_5"> |
| 75 |
<td align="center">- 论坛搜索 -</td> |
<td align="center">- 璁哄潧鎼滅储 -</td> |
| 76 |
</tr> |
</tr> |
| 77 |
<tr height=5> |
<tr height=5> |
| 78 |
<td></td> |
<td></td> |
| 79 |
</tr> |
</tr> |
| 80 |
<tr height=20> |
<tr height=20> |
| 81 |
<td align="center"><a href="search.php?type=journal">精品导读</a></td> |
<td align="center"><a href="search.php?type=journal">绮惧搧瀵艰</a></td> |
| 82 |
</tr> |
</tr> |
| 83 |
<tr height=20> |
<tr height=20> |
| 84 |
<td align="center"><a href="search.php?type=doc">文档搜索</a></td> |
<td align="center"><a href="search.php?type=doc">鏂囨。鎼滅储</a></td> |
| 85 |
</tr> |
</tr> |
| 86 |
<tr height=20> |
<tr height=20> |
| 87 |
<td align="center"><a href="search.php?type=author">作者搜索</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=whereis">地址搜索</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> |
|
| 88 |
</tr> |
</tr> |
| 89 |
<tr height=20> |
<tr height=20> |
| 90 |
<td></td> |
<td></td> |
| 109 |
?> |
?> |
| 110 |
<form action="journal.php" method="get" target="_blank"> |
<form action="journal.php" method="get" target="_blank"> |
| 111 |
<select name="jid" value="0"> |
<select name="jid" value="0"> |
| 112 |
<option value="0">--请选择发布时间--</option> |
<option value="0">--璇烽夋嫨鍙戝竷鏃堕棿--</option> |
| 113 |
<? |
<? |
| 114 |
$db_conn=include "./db_open.inc.php"; |
$db_conn=include "./db_open.inc.php"; |
| 115 |
$rs=mysql_query("select * from journal_index where enable order by dt"); |
$rs=mysql_query("select * from journal_index where enable order by dt"); |
| 116 |
while($row=mysql_fetch_array($rs)) |
while($row=mysql_fetch_array($rs)) |
| 117 |
{ |
{ |
| 118 |
?><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> |
| 119 |
<? |
<? |
| 120 |
} |
} |
| 121 |
mysql_free_result($rs); |
mysql_free_result($rs); |
| 122 |
mysql_close($db_conn); |
mysql_close($db_conn); |
| 123 |
?> |
?> |
| 124 |
</select> |
</select> |
| 125 |
<input type="submit" value="浏览" onclick="return (jid.value!='0');"> |
<input type="submit" value="娴忚" onclick="return (jid.value!='0');"> |
| 126 |
</form> |
</form> |
| 127 |
<? |
<? |
| 128 |
break; |
break; |
| 129 |
case "doc": |
case "doc": |
| 130 |
?> |
?> |
| 131 |
请选择版块,并输入查找内容,"%"为通配符。 |
璇烽夋嫨鐗堝潡锛屽苟杈撳叆鏌ユ壘鍐呭锛"%"涓洪氶厤绗︺ |
| 132 |
<form action="/bbs/bbs.php" method="get" target="_blank"> |
<form action="/bbs/bbs.php" method="get" target="_blank"> |
| 133 |
<select name="sid" value="0"> |
<select name="sid" value="0"> |
| 134 |
<option value="0">--请选择版块--</option> |
<option value="0">--璇烽夋嫨鐗堝潡--</option> |
| 135 |
<? |
<? |
| 136 |
$db_conn=include "./db_open.inc.php"; |
$db_conn=include "./db_open.inc.php"; |
| 137 |
$rs_class=mysql_query("select CID,title from section_class where enable order by sort_order"); |
$rs_class=mysql_query("select CID,title from section_class where enable order by sort_order"); |
| 143 |
$row_class["CID"]." and enable and read_user_level<=11 order by sort_order"); |
$row_class["CID"]." and enable and read_user_level<=11 order by sort_order"); |
| 144 |
while($row_section=mysql_fetch_array($rs_section)) |
while($row_section=mysql_fetch_array($rs_section)) |
| 145 |
{ |
{ |
| 146 |
?><option value="<? echo $row_section['SID'];?>"> ├<? echo $row_section["title"]; ?></option> |
?><option value="<? echo $row_section['SID'];?>"> 鈹<? echo $row_section["title"]; ?></option> |
| 147 |
<? |
<? |
| 148 |
} |
} |
| 149 |
mysql_free_result($rs_section); |
mysql_free_result($rs_section); |
| 153 |
?> |
?> |
| 154 |
</select> |
</select> |
| 155 |
<input name="search_text" value=""> |
<input name="search_text" value=""> |
| 156 |
<input type="submit" value="搜索" onclick="return (sid.value!='0');"> |
<input type="submit" value="鎼滅储" onclick="return (sid.value!='0');"> |
| 157 |
</form> |
</form> |
| 158 |
<? |
<? |
| 159 |
break; |
break; |
| 160 |
case "author": |
case "author": |
| 161 |
?> |
?> |
| 162 |
请输入查找内容,"%"为通配符。 |
璇疯緭鍏ユ煡鎵惧唴瀹癸紝"%"涓洪氶厤绗︺ |
| 163 |
<form action="/bbs/search_user.php" method="get" target="_blank"> |
<form action="/bbs/search_user.php" method="get" target="_blank"> |
| 164 |
<input name="search_text" value=""> |
<input name="search_text" value=""> |
| 165 |
<input type="submit" value="搜索"> |
<input type="submit" value="鎼滅储"> |
| 166 |
</form> |
</form> |
| 167 |
<? |
<? |
| 168 |
break; |
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; |
|
|
|
|
| 169 |
default: |
default: |
| 170 |
?> |
?> |
| 171 |
请从左侧列表选择查找类型。 |
璇蜂粠宸︿晶鍒楄〃閫夋嫨鏌ユ壘绫诲瀷銆 |
| 172 |
<? |
<? |
| 173 |
} |
} |
| 174 |
?> |
?> |