<?php
if(!isset($c))
{
	exit;
}
#前一页,后一页
if($ID-1 > 1)
{
	$prev = url('id',$ID-1);
}
else
{
	$prev = url('id',1);
}

$next = url('id',$ID+1);
#HTML输出

#截入随机美女图片开始
$pic_list = file(DIRNAME(__FILE__)."/newsgirl.txt");
if($ID)
{
	$key = $ID % count($pic_list);
	$pic_path = trim($pic_list[$key]);
}
else
{
	$key = array_rand($pic_list);
	$pic_path = trim($pic_list[$key]);
}
#本地图
#$pic_path = "http://www.hxcq.info".$u_p . "upload/{$pic_path}";
$pic_path = "http://www.hxcq.info/upload/{$pic_path}";
unset($pic_list);
#截入随机美女图片结束

?>
<?php
#页面输出
print <<<EOT
<!DOCTYPE html>
<html>
  <head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />		
	<title>{$TITLE}</title>
	<meta name="keywords" content="{$KEYWORD}" />
	<meta name="description" content="{$DESC}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="{$tpl}css/bootstrap.min.css" rel="stylesheet" media="screen">
	{$EXPORT_LINK}

	<style>
	.fdsanavbar{
	background:#000;
	}
	#footer{
		text-align:center;
		margin-top:30px;
		line-height:30px;
	}
	.list li{
		line-height:25px;
	}
	.title{
		line-height:50px;
		height:50px;
		text-align:center;
		border-bottom:2px solid #666;
		overflow:hidden;
	}
	.content{
		margin-top:30px;
		line-height:25px;
	}
	.desc{
		border:1px solid #A6B8DC;
		background:#A6B8DC;
		padding:5px;
	}
	</style>
  </head>


	
  <body class="container">
<div class="logo">
	<h2>{$c['site_name']}<sub></sub></h2>
</div>
<div class="navbar">
			<ul class="nav nav-tabs" style="width:100%">
				
EOT;

			#注释:输出导航
			if(!$N)
			{
				echo "<li class='active'><a href='{$u_p}index.php' title='{$c['site_name']}'>首页</a></li>";
			}
			else
			{
				echo "<li ><a href='{$u_p}index.php' title='{$c['site_name']}'>首页</a></li>";
			}
			foreach($c['navs'] as $k => $v)
			{
				if($N == $v['tag'])
				{
					
					echo "<li class='active'><a href='".url('nav',$v['tag'])."'  title='{$v['name']}'>{$v['name']}</a></li>";
				}
				else
				{					
					echo "<li><a href='".url('nav',$v['tag'])."'  title='{$v['name']}'>{$v['name']}</a></li>";
				}
			}


print <<<EOT

							</ul>
</div>

<!--广告-->
<div id="ad_banner"></div>

	<div class="row">
		<div class="span12" style="margin-top:10px;">您的位置:{$WHERE}</div>
	</div>
<p class="row" style="height:10px;"></p>

<div class="row">
	  <div class="span7">		
		 <div id="ad_top"></div>

<div class="title"><strong>{$title}</strong></div>
<p></p>
<!--分享代码-->
<div class="share row text-center">
<!-- Baidu Button BEGIN -->
<div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
<a class="bds_tsina"></a>
<a class="bds_qzone"></a>
<a class="bds_tqq"></a>
<a class="bds_renren"></a>
<a class="bds_t163"></a>
<a class="bds_mshare"></a>
<a class="bds_bdxc"></a>
<a class="bds_tsohu"></a>
<a class="bds_sqq"></a>
<a class="bds_thx"></a>
<a class="bds_taobao"></a>
<span class="bds_more"></span>
<a class="shareCount"></a>
</div>

<!-- Baidu Button END --></div>
<!--分享代码-->

<div class="desc"><strong class="btn btn-success">内容预览</strong>{$DESC}</div>
<div class="content" style='text-indent:30px;'><div class='row'><img src='{$pic_path}' title="{$title}相关图片" style='width:480px;'></div>{$CONTENT}</div>
<div class="about row text-center">
	<a href='{$prev}'>上一篇</a>
	<a href='{$next}'>下一篇</a>
</div>

		
	  </div>
	  <div class="span5">
	  <h4>最近更新</h4>
	  <ol class="nav-list list">
EOT;
$rs = randTitle(20);
foreach($rs as $k => $v)
{
	echo "<li><a href='".url()."'  title='{$v}'>{$v}</a></li>";
}

print <<<EOT
	</ol>


EOT;
$mem = memory();
print <<<EOT

	  </div>
</div>
	<div id="ad_bottom"></div>


		
<div class="clear"></div>
	<div id="footer">
		Copyright©2013-2014 {$_SERVER['SERVER_NAME']} All Rights Reserved <a href='http://{$_SERVER['SERVER_NAME']}'>{$c['site_name']}</a> <br>
程序BY:中国蓝途 , Ver:{$VERSION} mem:{$mem} {$c['cnzz']}
	</div>

</div>


    <!--<script src="http://code.jquery.com/jquery.js"></script>
    <script src="template/default/js/bootstrap.min.js"></script>-->

<script src="{$u_p}ad.php?id=banner,top,bottom&tpl={$c['tpl']}&html_id=ad_banner,ad_top,ad_bottom"></script>

<!--BAIDU-->
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;mini=1&amp;uid=0" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>




  </body>
</html>

EOT;
?>