<?php
ini_set("display_errors", 0);
session_start();
$seconds = '3'; 
$refresh = '2'; 
$cur_time = time();
if(isset($_SESSION['last_time'])){
$_SESSION['refresh_times'] += 1;
}else{
$_SESSION['refresh_times'] = 1;
$_SESSION['last_time'] = $cur_time;
}
if($cur_time - $_SESSION['last_time'] < $seconds){
if($_SESSION['refresh_times'] >= $refresh){
exit('<font color=red size=100%>你是打算刷排行榜吗？！</font>');
}
}else{
$_SESSION['refresh_times'] = 0;
$_SESSION['last_time'] = $cur_time;
}
	require ('./inc/lang.php');
	require ('./module.php');
	if(empty($row_list['id'])){echo "<script language='javascript'>window.location.href='../404.html';</script>";};
	mysql_query("set names utf8");
    $id = $_GET['id'];
    $alias = $_GET['alias'];
	if(empty($alias)){ 
$date = date("Y-m-d",time());
$datem = date("Y-m",time());
$zero1=strtotime($date);
$zero2=strtotime($datem);
if($row_list != 0){
$rdate=$row_list['date'];
$datey=$row_list['datem'];
$zero11=strtotime($rdate);
$zero22=strtotime($datey);
if($zero1==$zero11 and $zero2==$zero22 ){
mysql_query("update zzdh_list set view = view+1 , hits = hits+1 , rhits = rhits+1 where id='$id' ");
}
elseif($zero11 < $zero1 and $zero2==$zero22 ){
mysql_query("update zzdh_list set view = view+1 , hits = hits+1 , rhits = 1 , date = '$date' where id='$id' ");
}
elseif($zero2 > $zero22 ){
mysql_query("update zzdh_list set view = view+1 , hits = 1 , rhits = 1  , date = '$date' , datem = '$datem' where id='$id' ");
}
else{
mysql_query("update zzdh_list set view = view+1 where id='$id' ");
} 
} 
    }else{
		$sql = "update zzdh_list set view = view+1 where alias = '$alias'";
		$result = mysql_query($sql);
    }
	preg_match("/^(http:\/\/|https:\/\/)?([^\/]+)/i", $row_list['url'], $matches); 
	$domain = $matches[2]; 
?>

<!DOCTYPE html>
<html>
    <head>
	    <meta charset="UTF-8">
	    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=no">
        <title><?php echo $row_list['name'];?>_<?php echo $conf['name'];?></title>
        <meta name="keywords" content="<?php echo $row_list['gjz'];?>">
        <meta name="description" content="<?php 
$introduce=$row_list["introduce"];
if(strlen($introduce) > 240)
echo mb_substr( $introduce, 0, 80, "utf-8")."..";
else
echo $introduce;
?>">
	    <link rel="shortcut icon" type="images/x-icon" href="./favicon.ico"/>
	    <link rel="stylesheet" type="text/css" href="./assets/css/font-awesome-4.7.0/css/font-awesome.css"/>
	    <link rel="stylesheet" type="text/css" href="./assets/css/ozui.min.css"/>
	    <link rel="stylesheet" type="text/css" href="./templates/antidote/css/style.css"/>
    </head>
    <body>
<header class="header fixed">
	<div class="container">
		<div class="nav-bar">
			<span></span>
		</div>
		<a class="logo" href="./">
			<img src="./assets/images/logo.png" alt="<?php echo $conf['name'];?>">
		</a>
		<ul class="nav">
			<?php echo nav();?></ul>
	</div>
</header><div class="banner" data-src="./assets/images/banner.jpg">
    <ul class="search-type">
        <span class="title">搜索</span>
        <li data-type="this" class="active">本站</li>
        <li data-type="baidu">百度</li>
        <li data-type="sogou">搜狗</li>
        <li data-type="360">360</li>
        <li data-type="bing">必应</li>
    </ul>
    <form class="search-main" action="./search.html" method="get">
        <input class="search-input" placeholder="请输入关键词..." name="keyword" required="required">
        <button type="submit" class="search-btn">本站搜索</button>
    </form>
</div>
<div class="container">
    <ul class="sort">
        <li><a href="./"><span>返回首页</span> <i class="fa fa-reply fa-fw"></i></a></li>
<?php
	mysql_query("set names utf8");
	$result = mysql_query("SELECT * FROM zzdh_sort order by sid asc");
	while($row = mysql_fetch_array($result))
    {
?>
<li><a href="sort<?php echo $row['id'];?>.html" class="<?php if($row_list['sortname']==$row['sortname']){echo "active";}else{echo "";};?>"><span><?php echo $row['sortname'];?></span> <i class="fa <?php echo $row['icon'];?> fa-fw"></i></a></li>
<?php  }?>
                </ul>
        <div class="card board">
            <span class="icon"><i class="fa fa-map-signs fa-fw"></i></span>
            <a href="./">导航首页</a>&nbsp;»&nbsp;<a title="<?php echo $row_list['sortname'];?>" href="<?php if(empty($rows_sort['alias'])){echo "../sort{$rows_sort['id']}.html";}else{echo "../sort{$rows_sort['alias']}.html";};?>"><?php echo $row_list['sortname'];?></a>&nbsp;»&nbsp;<span><?php echo $row_list['name'];?></span>        </div>
        <div class="card">
            <div class="card-body">
                <div class="part-main">
                    <span class="site-name"><?php echo $row_list['name'];?></span>
                    <span class="oz-xs-12 oz-sm-6 oz-lg-4">站点域名：<?php echo $domain;?></span>
                    <span class="oz-xs-12 oz-sm-6 oz-lg-4">站点星级：<img class="lazy-load" src="templates/antidote/images/star/<?php $dj=$row_list['dj'];if($dj==1){echo "1";}elseif($dj==2){echo "2";}elseif($dj==3){echo "3";}elseif($dj==4){echo "4";}else{echo "5";};?>.png"></span>
                    <span class="oz-xs-12 oz-sm-6 oz-lg-4">是否推荐：<?php $tui=$row_list['tui'];if($tui==1){echo "<font color=red>是</font>";}else{echo "否";};?></span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">日浏览数：<?php echo $row_list['rhits'];?> 次</span>
					<span class="oz-xs-6 oz-sm-6 oz-lg-4">月浏览数：<?php echo $row_list['hits'];?> 次</span>
					<span class="oz-xs-6 oz-sm-6 oz-lg-4">总浏览数：<?php echo $row_list['view'];?> 次</span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">所属分类：<a title="<?php echo $row_list['sortname'];?>" href="<?php if(empty($rows_sort['alias'])){echo "../sort{$rows_sort['id']}.html";}else{echo "../sort{$rows_sort['alias']}.html";};?>"><?php echo $row_list['sortname'];?></a></span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">百度权重：<img class="lazy-load" src="https://baidurank.aizhan.com/api/br?domain=<?php echo $domain;?>&style=images"></span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">移动权重：<img class="lazy-load" src="https://baidurank.aizhan.com/api/mbr?domain=<?php echo $domain;?>&style=images"></span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">搜狗权重：<img class="lazy-load" src="https://sogourank.aizhan.com/api/br?domain=<?php echo $domain;?>&style=images"></span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">移动权重：<img class="lazy-load" src="https://sogourank.aizhan.com/api/mbr?domain=<?php echo $domain;?>&style=images"></span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">头条权重：<img class="lazy-load" src="https://toutiaorank.aizhan.com/api/br?domain=<?php echo $domain;?>&style=images"></span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">360权重：<img class="lazy-load" src="https://sorank.aizhan.com/api/br?domain=<?php echo $domain;?>&style=images"></span>
                    <span class="oz-xs-6 oz-sm-6 oz-lg-4">神马权重：<img class="lazy-load" src="https://smrank.aizhan.com/api/br?domain=<?php echo $domain;?>&style=images"></span>
					<span class="oz-xs-12 oz-sm-6 oz-lg-4">收录日期：<?php echo $row_list['time'];?></span>
                </div>
                <div class="part-side">
                    <div class="site-img">
                        <img class="lazy-load" src="assets/images/loading.gif" data-src="<?php echo $conf['api'];?><?php echo $row_list['url'];?>">
                    </div>
                    <a title="<?php echo $domain;?>" href="go.php?url=<?php echo $row_list['url'];?>" target="_blank" data-id="1" class="oz-btn oz-btn-lg oz-btn-block oz-bg-orange">
                        <i class="fa fa-telegram fa-fw" aria-hidden="true"></i> 网站快速直达
                    </a>
<button class="oz-btn oz-btn-lg oz-btn-block oz-bg-blue love-btn" rel="<?php echo $row_list['id'];?>"><i class="fa fa-heart-o fa-fw" aria-hidden="true"></i> 点赞支持 [<?php if(empty($row_list['love'])){echo "0";}else{echo "{$row_list['love']}";};?>]</button>
 <a href="http://seo.chinaz.com/<?php echo $row_list['url'];?>" target="_blank" data-id="1" class="oz-btn oz-btn-lg oz-btn-block oz-bg-green">
                        <i class="fa fa-external-link fa-fw" aria-hidden="true"></i> 综合SEO查询
                    </a>
                </div>
            </div>
        </div>
        <div class="card">
            <div class="card-head">
                <i class="fa fa-feed fa-fw" aria-hidden="true"></i> 站点信息
            </div>
            <div class="card-body">
                <div class="content">
                    <p><b>描述：</b></p>
					<center><img class="lazy-load" src="assets/images/loading.gif" data-src="<?php echo $conf['api'];?><?php echo $row_list['url'];?>"></center><br>
					<?php echo $row_list['introduce'];?><br><br><br>
                </div>
            </div>
        </div>

                    <div class="card">
            <div class="card-head">
                <i class="fa fa-magnet fa-fw" aria-hidden="true"></i> 相关站点
            </div>
            <div class="card-body">
			<?php
				mysql_query("set names utf8");
				$results = mysql_query("SELECT * FROM zzdh_list where sortname = '".$row_list['sortname']."' order by lid asc limit 14");
				while($rows = mysql_fetch_array($results))
				{
		    ?>
                                            <a href="<?php if(empty($rows['alias'])){echo "../site_{$rows['id']}.html";}else{echo "../{$rows['alias']}.html";};?>" class="item" title="<?php echo $rows['name'];?>" data-id="<?php echo $rrows['id'];?>">
                            <span class="icon"><img class="lazy-load" src="assets/images/loading.gif" data-src="<?php echo $rows['img'];?>"></span>
                            <span class="name"><?php echo $rows['name'];?></span>
                        </a><?php }?>
                                       
                                </div>
        </div>
    </div>
<div style="display:none;"><script type="text/javascript" src="https://s95.cnzz.com/z_stat.php?id=147429&web_id=147429"></script></div>﻿
<?php
	require ('./footer.php');
?>