<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo $title?>-<?php echo $webtitle?></title>
<meta name="keywords" content="<?php echo $title?>,微头条,微信公众平台,微信内容,公众账号,微信聚合，微信头条,微精选，微信精选，推荐公众账号"/>
<meta name="description" content=""/>
<link href="<?=TY_SKIN?>/images/base.css" rel="stylesheet" type="text/css" />
<link href="<?=TY_SKIN?>/images/style.css" rel="stylesheet" type="text/css" />
<script src="<?=TY_SKIN?>/images/common_tpl.js" type="text/javascript"></script>
<script src="<?=TY_SKIN?>/images/jquery-1.7.1.js" type="text/javascript"></script>
<script type="text/javascript" src="<?=TY_SKIN?>/images/script.js"></script>
<script type="text/javascript" src="<?=TY_URL?>/ad.js"></script>
</head>
<body>
<div class="wrapper-outer">

<?php require_once('header.pl');?>
<!--navbar end-->  <!--wrapper begin-->
<div class="wrapper clearfix pt10">
  <div class="con-left">
    
    <!--articleList begin-->
    <div class="articleList">
      <h1 class="main-tit2"><span class="black f20 fb"><?php echo $title?></span></h1>
    </div>
    <p class="icogroup" style="padding-bottom:10px; margin-bottom:10px; border-bottom:1px dashed #eee;"><span class="ico-list"><span class="ico-list"><?php $day=date("Y年m月d日H:i",$data['time']);?>
				   来自&nbsp;<span><a href="<?=$authorpath.$data['author_id'].$hzm?>" title="查看<?php echo "{$data['author']}"?>更多微信"><?php echo "{$data['author']}"?></a></span>&nbsp;发表于&nbsp;<?php echo "{$day}"?>的微信文章</span></span></p>
    
<!--分享按开始钮-->
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>  
<!--分享按钮束结束-->
<div class="art-content pt10 f16 lh200">
 <center><script type="text/javascript" src="<?=TY_SKIN?>/ad/a_top.js"></script></center>
				<?=content_txt($content)?><script type="text/javascript" src="<?=TY_SKIN?>/ad/a_foot.js"></script>
<? if($pinglun=='1'){ ?>
       <!-- UY BEGIN -->
<div id="SOHUCS"></div>
<script>
  (function(){
    var appid = '<?=$appid?>',
    conf = '<?=$conf?>';
    var doc = document,
    s = doc.createElement('script'),
    h = doc.getElementsByTagName('head')[0] || doc.head || doc.documentElement;
    s.type = 'text/javascript';
    s.charset = 'utf-8';
    s.src =  'http://assets.changyan.sohu.com/upload/changyan.js?conf='+ conf +'&appid=' + appid;
    h.insertBefore(s,h.firstChild);
    window.SCS_NO_IFRAME = true;
  })()
</script>

<!-- UY END --><? }else{}?>
<?php 
				$sql_former = "select * from `".$BIAOTOU."content` where id<$id order by id desc "; //上一篇文章sql语句。注意是倒序，因为返回结果集时只用了第一篇文章，而不是最后一篇文章 
$sql_later = "select * from `".$BIAOTOU."content` where id>$id "; //下一篇文章sql语句 
$queryset_former = mysql_query($sql_former); //执行sql语句 
if(mysql_num_rows($queryset_former)){ //返回记录数，并判断是否为真，以此为依据显示结果 
$result = mysql_fetch_array($queryset_former); 
echo "上一篇<a href='".$htmlpath.$result[id].$hzm."'> ". $result[title]." </a><br>"; 
} else {echo "上一篇 没有了<br>";} 

$queryset_later = mysql_query($sql_later); 
if(mysql_num_rows($queryset_later)){ 
$result = mysql_fetch_array($queryset_later); 
echo "下一篇 <a href='".$htmlpath.$result[id].$hzm."'> ". $result['title']."</a><br>"; 
} else {echo "下一篇 没有了<br>";} 
?>
</div>
<!--内容结束-->
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

	<div class="tip-bar mt20 clearfix"><span class="tit">温馨提示</span>如有转载或引用以上内容之必要，敬请将<a href="" target="_blank" style="color:#00AA98;">本文链接</a>作为出处标注，谢谢合作！</div>
        
   
    
    <!--articleList end-->
  </div>
  <!--con-left end-->
  <div class="con-right">
<div class="ad-box mb20" align="center" style="background:#00AA98;"><script type="text/javascript" src="<?=TY_SKIN?>/ad/a_right.js"></script></div>
<ul id="sidebar">
	<li style="display:none">
	<h3><span>搜索</span></h3>
	<ul id="logsearch">
	
	
	</form>
	</ul>
	</li>
	<li class="box-b mb20">
    <span class="arrow-right"></span>
    <h3 class="title pt10 pl10"><span>微信扫一扫  关注该公众号</span></h3>
	<div style="text-align: center;position: relative;"><img height="250" width="250" src="http://open.weixin.qq.com/qr/code/?username=<?=$data['author_id']?>" rel="nofollow" title="<?php echo $data['author']?>的微信二维码" />
					</div>
					
	<ul class="ullist2">
		           <h3 class="title pt10 pl10">公众号：<?php echo "{$data['author']}"?></h3>
					<h3 class="title pt10 pl10">微信号：<?php echo "{$data['author_id']}"?></h3>
		</ul>
	</li>
	<li class="box-b mb20">
    <span class="arrow-right"></span>
    <h3 class="title pt10 pl10"><span>Ta的最新微信文章</span></h3>
	<ul class="ullist2">
		<?php
						$new_rows=$mysql->query("select * from `".$BIAOTOU."content` where author_id='".$data['author_id']."' order by `time` desc limit 0,20");
						
						for($i=0;$i<=20;$i++){
						//$new_rows[$i]['id']=alphaID($new_rows[$i]['id']);
							if($i>6){
							//$new_rows[$i]['title']=cutstr( $new_rows[$i]['title'],10);
								echo "<li style='display: none;'><a href='{$htmlpath}{$new_rows[$i]['id']}{$hzm}' aid='{$new_rows[$i]['id']}' title='{$new_rows[$i]['title']}'>{$new_rows[$i]['title']}</a></li>";
							}else{
								echo "<li><a href='{$htmlpath}{$new_rows[$i]['id']}{$hzm}' aid='{$new_rows[$i]['id']}' title='{$new_rows[$i]['title']}'>{$new_rows[$i]['title']}</a></li>";
							}				
						}
						?>
		</ul>
	</li>
	<li class="box-b mb20">
    <span class="arrow-right"></span>
    <h3 class="title pt10 pl10"><span>最新文章</span></h3>
	<ul class="ullist2"><?php
						$new_rows=$mysql->query("select * from `".$BIAOTOU."content` order by `id` desc limit 0,500");
						for($i=0;$i<=200;$i++){
						//$new_rows[$i]['id']=alphaID($new_rows[$i]['id']);
						$new_rows[$i]['id']=$new_rows[$i]['id'];
						$new_rows[$i]['title']=csubstr(trim($new_rows[$i]['title']),0,20);
							if($i>10){
								echo "<li style='display: none;'><a href='{$htmlpath}{$new_rows[$i]['id']}{$hzm}' aid='{$new_rows[$i]['id']}' title='{$new_rows[$i]['title']}'>{$new_rows[$i]['title']}</a></li>";
							}else{
								echo "<li><a href='{$htmlpath}{$new_rows[$i]['id']}{$hzm}' aid='{$new_rows[$i]['id']}' title='{$new_rows[$i]['title']}'>{$new_rows[$i]['title']}</a></li>";
							}				
						}
						?>
		</ul>
	</li>
	<div id="sidebar-follow">
				<script type="text/javascript" src="<?=TY_SKIN?>/ad/a_right1.js"></script>
			</div>
	
</ul>

   </div>
  <!--con-left end-->
</div>
<!--wrapper end-->
<script src="<?=TY_SKIN?>/images/sidebar-follow-jquery.js"></script>
  <script>
		$(function() {
			//缩放文章内容页中的图片
			$('.box-view').autoIMG();
		});
        /* <![CDATA[ */
        (new SidebarFollow()).init({
            element: jQuery('#sidebar-follow'),
            distanceToTop: 0
        });
        /* ]]> */
		</script>  
</div>
<div style="height:20px; clear:both;"></div>
<!--footer begin-->
<?php require_once('footer.pl');?>
<div id="code"></div>
<div id="code_img"><img src="<?=TY_SKIN?>/images/ewqrcode.png" width="230" /><p class="lh180 pt10">欢迎使用手机扫描访问本站，还可以关注微信哦~</p></div>
<a id="gotop" href="javascript:void(0)"></a>
</body>
</html>