<?php
date_default_timezone_set('PRC');
require('function.php');

$url = trim($_GET['url']);

if (!empty($url)) {
	$url = getShortUrl($url);
	$domain = getDomain($url);
}

if (!file_exists($filename)) {
	$fp_1 = fopen($filename, "a");
	fwrite($fp_1, $url);
	fwrite($fp_1, "|");
	fclose($fp_1);
} else {
	$fp_2 = fopen($filename, "r");
	$file_content = fread($fp_2, filesize($filename));
	fclose($fp_2);

	$file_arr = explode('|', $file_content, -1);
	$count = count($file_arr);
	if (!in_array($url, $file_arr)) {
		$fp_3 = fopen($filename, "a");
		fwrite($fp_3, $url);
		fwrite($fp_3, "|");
		fclose($fp_3);
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
if (empty($url)) {
?>
<title>站长工具|收录查询 - Axingweb axingweb.cn</title>
<meta name="Keywords" content="站长,虚拟主机,服务器,VPS,域名,站长工具,收录查询" />
<meta name="Description" content="网站综合信息查询包括（IP及地理位置，服务器状态，Alexa世界排名，Google PageRank，搜狗(Sogou)评级，网站收录，搜索引擎收录，反向链接）。网站收录/反向链接查询结果包括：谷歌(Google)、百度(baidu)、必应(Bing)、雅虎(Yahoo)、搜搜(Soso)、搜狗(Sogou)、有道(Youdao)、AltaVista、AlltheWeb等搜索引擎）。" />
<?php
} else {
?>
<title><?php echo $url;?>站长工具|收录查询 - Axingweb axingweb.cn</title>
<meta name="Keywords" content="<?php echo $url;?>，IP及地理位置，服务器状态，Alexa世界排名，Google PageRank，搜狗(Sogou)评级，网站收录，搜索引擎收录，反向链接" />
<meta name="Description" content="<?php echo $url;?>的网站综合信息查询结果包括（IP及地理位置，服务器状态，Alexa世界排名，Google PageRank，搜狗(Sogou)评级，网站收录，搜索引擎收录，反向链接）。<?php echo $url;?>的网站收录/反向链接查询结果包括：谷歌(Google)、百度(baidu)、必应(Bing)、雅虎(Yahoo)、搜搜(Soso)、搜狗(Sogou)、有道(Youdao)、AltaVista、AlltheWeb等搜索引擎）。" />
<?php
}
?>
<meta name="Copyright" content="Powered By axingweb.cn" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache" />
<script type="text/javascript" src="jquery.js"></script>
<?php
if (!empty($url)) {
?>
<script type="text/javascript">
$(document).ready(function() {
	var url = "<?php echo $url;?>";
	var domain = "<?php echo $domain?>";
	var queryurl = "query.php";
	var loading = "<img src='skin/loading.gif' align='absmiddle' />";
	
	var ip_info = function() {$("#ip_info").html(loading); $.ajax({type: "GET", url: queryurl, data: "type=ip&url=" + url, cache: false, success: function(data) {$("#ip_info").html(data);}});} ();
		
	var status_info = function() {$("#status_info").html(loading); $.ajax({type: "GET", url: queryurl, data: "type=status&url=" + url, cache: false, success: function(data) {$("#status_info").html(data);}});} ();
	
	var pr_info = function() {$("#pr_info").html(loading); $.ajax({type: "GET", url: queryurl, data: "type=pr&url=" + url, cache: false, success: function(data) {$("#pr_info").html(data);}});} ();
	
	var alexa_info = function() {$("#alexa_info").html(loading); $.ajax({type: "GET", url: queryurl, data: "type=alexa&url=" + url, cache: false, success: function(data) {$("#alexa_info").html(data);}});} ();
	
	var srank_info = function() {$("#srank_info").html(loading); $.ajax({type: "GET", url: queryurl, data: "type=srank&url=" + url, cache: false, success: function(data) {$("#srank_info").html(data);}});} ();
	
	var crank_info = function() {$("#crank_info").html(loading); $.ajax({type: "GET", url: queryurl, data: "type=crank&url=" + url, cache: false, success: function(data) {$("#crank_info").html(data);}});} ();
	
    $('#sobody tr[name]').each(function(i, n) {var name = $(n).attr('name'); if (name == '') {return false;} $(n).children('td[rel]').each(function(j, m) {var rel = $(m).attr('rel'); $.ajax({type: "GET", url: queryurl, data: "type=" + rel + "&name=" + name + "&url=" + url, success: function(data) {var num_box = $(m).find('a'); if(data.state != 1) {data.number = '-';} num_box.html(data);}});});});
	
})
</script>
<?php
}
?>
<link href="skin/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="topbar">网站导航：<a href="http://www.axingweb.cn/" >域名综合信息</a> | <a href="http://www.axingweb.cn/<?php echo $domain?>.whois.htm" target="_blank">域名Whois信息</a> | <a href="http://www.axingweb.cn/<?php echo $domain?>.meta.htm" target="_blank">域名Meta信息</a> | <a href="http://www.axingweb.cn/<?php echo $domain?>.domaindel.htm" target="_blank">域名删除时间</a></div>
<div id="container">
	<div id="header">
	  <div id="search">
			<div id="adbox">
			</div>
        	<form name="myso" method="get" action="">
           	  <span style="font: bold 16px normal;">http://</span> <input name="url" id="url" type="text" size="55" class="sipt" value="<?php echo $url;?>" />
                <input type="submit" class="sbtn" value="查 询" />
              	<div class="tips">示例：<a href="javascript: void(0);" onclick="$('#url').attr('value', 'axingweb.cn')">axingweb.cn</a>，<a href="javascript: void(0);" onclick="$('#url').attr('value', 'www.axingweb.cn')">www.axingweb.cn</a>，带"www"与不带"www"的查询结果不同</div>
                <div class="domain_info"><a href="http://www.axingweb.cn/" target="_blank">今天删除域名</a>　　<a href="http://www.axingweb.cn/" target="_blank">明天拟删除域名</a>　　<a href="http://www.axingweb.cn/" target="_blank">昨天删除域名</a>　　<a href="http://www.axingweb.cn/" target="_blank">前天删除域名</a>　　<a href="http://www.axingweb.cn/" target="_blank">后天拟删除域名</a>　　<a href="" target="_blank" style="color: #FF0000;"><sup></sup></a></div>
          </form>
        </div>
	</div>
	<?php
    if (!empty($url)) {
	?>
	<div id="mainer">
      <div class="ip_status"><div class="ip_status_left"><span id="ip_info"></span> - <a href="http:///baidu/?url=<?php echo $url;?>" target="_blank"></a> - <a href="http:///whois/?url=<?php echo $url;?>" target="_blank"></a></div><div class="ip_status_right"><span id="status_info"></span></div></div>
	  <table width="100%" border="0" cellspacing="1" cellpadding="0" class="table_bg mag" id="sobody">
        <tr class="syndata">
          <td colspan="10">&nbsp;访问：<a href="<?php echo getFullUrl($url);?>" target="_blank"><?php echo $url;?></a>　　国内排名：<span id="crank_info" class="red"></span> - <a href="http://www.chinarank.org.cn/overview/Info.do?url=<?php echo $url;?>" target="_blank">[官方数据]</a>　　搜狗评级：<span class="gre" id="srank_info"></span> / 100 - <a href="http://www.sogou.com/web?query=<?php echo $url;?>" target="_blank">[官方数据]</a>　　PageRank：<span class="gre" id="pr_info"></span>　　AlexaRank：<span class="gre" id="alexa_info"></span> - <a href="http://www.alexa.com/siteinfo/<?php echo $domain;?>" target="_blank">[官方数据]</a></td>
        </tr>
        <tr class="table_th">
          <td width="10%"><strong>&nbsp;搜索引擎</strong></td>
          <td width="10%"><a href="http://www.google.com.hk/" target="_blank"><img src="skin/google.gif" alt="Google" border="0" /></a></td>
          <td width="10%"><a href="http://www.baidu.com/" target="_blank"><img src="skin/baidu.gif" alt="百度" border="0" /></a></td>
          <td width="10%"><a href="http://cn.bing.com/" target="_blank"><img src="skin/bing.gif" alt="必应" border="0" /></a></td>
          <td width="10%"><a href="http://www.yahoo.cn/" target="_blank"><img src="skin/yahoo.gif" alt="雅虎" border="0" /></a></td>
          <td width="10%"><a href="http://www.soso.com/" target="_blank"><img src="skin/soso.gif" alt="搜搜" border="0" /></a></td>
          <td width="10%"><a href="http://www.sogou.com/" target="_blank"><img src="skin/sogou.gif" alt="搜狗" border="0" /></a></td>
          <td width="10%"><a href="http://www.youdao.com/" target="_blank"><img src="skin/youdao.gif" alt="有道" border="0" /></a></td>
        </tr>
        <tr name="site" class="table_tr">
          <td class="table_td"><strong>&nbsp;收录情况</strong></td>
          <td rel="google"><a href="http://www.google.com.hk/search?hl=zh-CN&amp;source=hp&amp;q=site:<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="baidu"><a href="http://www.baidu.com/s?wd=site:<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="bing"><a href="http://cn.bing.com/search?q=site:<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="yahoo"><a href="http://sitemap.cn.yahoo.com/search?p=<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="soso"><a href="http://www.soso.com/q?w=site:<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="sogou"><a href="http://www.sogou.com/web?query=site:<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="youdao"><a href="http://www.youdao.com/search?q=site:<?php echo $url;?>" target="_blank">-</a></td>
        </tr>
        <tr name="link" class="table_tr">
          <td class="table_td"><strong>&nbsp;反向链接</strong></td>
          <td rel="google"><a href="http://www.google.com.hk/search?hl=zh-CN&amp;source=hp&amp;q=link:<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="baidu"><a href="http://www.baidu.com/s?wd=link:<?php echo $url;?>" target="_blank">-</a></td>
          <td>-</td>
          <td rel="yahoo"><a href="http://sitemap.cn.yahoo.com/search?bwm=i&amp;p=<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="soso"><a href="http://www.soso.com/q?w=link:<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="sogou"><a href="http://www.sogou.com/web?query=link:<?php echo $url;?>" target="_blank">-</a></td>
          <td rel="youdao"><a href="http://www.youdao.com/search?q=link:<?php echo $url;?>" target="_blank">-</a></td>
        </tr>
      </table>
    </div>
	<?php
	}
	?>

	<div style="margin-top: 15px;">
	<div class="ip_status">友情链接：<a href="http://www.axingweb.cn/" target="_blank">站长工具</a> | <a href="http://www.axingweb.cn/" target="_blank">收录查询</a></div></div>
	
<div id="footer" class="clear">

</div>

    <div id="footer" class="clear">Copyright &copy; 2006-2010 <a href="http://www.axingweb.cn/" target="_blank" style="color: #FF0000; font-weight: bold;">axingweb.cn</a> All Rights Reserved<br />
	</div>
</div>
</body>
</html>