<?php
	ini_set("display_errors", 0);
	require ('./inc/lang.php');
	require ('./module.php');
?>
<!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 $conf['title'];?></title>
	    <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=""><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;<span>文章信息</span>	</div>
     <div class="card">
      <div class="card-head">推荐文章</div>
        <div class="card-body">
<div class="content">
				<ul class="oz-timeline">
<?php $result=mysql_query("select * from zzdh_wz where tui=1 order by time desc limit 4");
while($row=mysql_fetch_array($result)) {
?>   
                            <li class="oz-timeline-item">
								<div class="oz-timeline-time"><?php echo $row['time'];?></div>
								<div class="oz-timeline-main"><a href="<?php echo "../wzshow_{$row['id']}.html";?>" target="_blank"><?php echo $row['name'];?></a></div>
							</li><?php }?>
										</ul>
</div>
 </div>
    </div>


	<?php
		mysql_query("set names utf8");
		$result = mysql_query("SELECT * FROM zzdh_sortwz order by sid asc");
		while($row = mysql_fetch_array($result))
		{
	?>
<div class="card">
 <div class="card-head">
  <i class="fa <?php echo $row['icon'];?>"></i><?php echo $row['sortname'];?> 
   <a href="wz<?php echo $row['id'];?>.html" class="more"><i class="fa fa-ellipsis-h fa-fw"></i></a>
      </div>
 <div class="card-body">
			<?php
				mysql_query("set names utf8");
				$results = mysql_query("SELECT * FROM zzdh_wz where sortname = '".$row['sortname']."' order by time desc limit 4");
				while($rows = mysql_fetch_array($results))
 {preg_match_all("|<img[^>]+src=\"([^>\"]+)\"?[^>]*>|is", $rows['introduce'], $img);
					$imgsrc = !empty($img[1]) ? $img[1][0] : '';
					if(!$imgsrc)$imgsrc = '../assets/images/no.png';?>
 <a href="../wzshow_<?php echo $rows['id'];?>.html" target="_blank" class="post">
<div class="pic"><img class="lazy-load" src="../assets/images/loading.gif" data-src="<?php echo $imgsrc;?>"></div>
<div class="text"><div class="title"><?php echo $rows['name'];?></div>
<div class="info"><span><i class="fa fa-eye fa-fw"></i><?php echo $rows['view'];?></span>
<span><i class="fa fa-clock-o fa-fw"></i><?php echo $rows['time'];?></span>
  </div></div>
</a><?php }?></div>  	
  </div>
<?php }?>  </div>
<?php
	require ('./footer.php');
?>