<?php 
include('inc/public.inc.php');
//获取网站配置
$sql="SELECT `key`,`value` FROM #@__config";
$db->Query('info_q',$sql);
while($info_a=$db->GetArray("info_q")){
	$info[$info_a['key']]=$info_a['value'];
}
$scriptname = basename($_SERVER['SCRIPT_NAME'],'.php');
$Agent = new Browser();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Cache-Control" content="no-transform" /> 
<meta http-equiv="Cache-Control" content="no-siteapp" /> 
<title><?php echo $info['key_name'];?></title>
<meta name="Keywords" content="<?php echo $info['web_keywords']?>">
<meta name="Description" content="<?php echo $info['web_description']?>">
<link rel="apple-touch-icon-precomposed" href="logo_icon.png">
<link rel="icon" href="favicon.ico" mce_href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/TouchSlide.1.1.js"></script>
<base target="_self" >
</head>
<body >
<?php include('header.php');
$id = (int)$_GET['id'];
$newsinfo = $db->GetOne("SELECT * FROM #@__article WHERE `id`='".$id."'");

$typeid=$newsinfo['pid'];

$pre_info= $db->GetOne("SELECT * FROM #@__article WHERE  pid = $typeid  and  `id`<'".$id."' order by id desc");

$next_info= $db->GetOne("SELECT * FROM #@__article WHERE pid = $typeid and `id` > '".$id."' ");
?>
<div id="warmp" class="warmp">

    <div class="path"> <a href='index.php'>网站首页</a> &gt; <a href='#' onClick='javascript :history.back(-1);'>资讯详情</a></div>

    <article class="topic-con article">
	<h1 class="hd" style="font-size:16px; line-height:30px;"><?php echo $newsinfo['title'];?></h1>
	<aside class="meta">发布时间:<?=cn_substr_utf8($newsinfo['time'],10)?>　　浏览  <font color=red><?php echo $newsinfo['click'];?></font>次</aside>
	<div class="article-con content_news" style=" font-size:14px;">
         <?php echo $newsinfo['content'];?>	 　
    </div>
   <div class="article-con content_news" style=" font-size:14px;">
         <?php echo $newsinfo['content1'];?>  　
    </div>
   </article>
<div class="xiayitiao">
                 
                 <?php 
         if($pre_info)
         {
          ?>     
        <a href='newsInfo.php?id=<?php echo $pre_info['id'] ?>'>上一篇:<?php echo $pre_info['title'] ?></a>
         <?php }
         else
         {
         ?> 

           <a href=''>没有文章了</a>
           
        <?php  
           }
        ?>
          
           <?php 
         if($next_info)
         {
          ?>     
        <a href='newsInfo.php?id=<?php echo $next_info['id'] ?>' 
        ">下一篇:<?php echo $next_info['title'] ?></a>
         <?php }
         else
         {
         ?> 
           <a href=''>没有文章了</a>
           
        <?php  
           }
        ?>
        


                </div>


</div>
<?php include('footer.php');?>
</body>
</html>