<!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=<?php echo SYS_CHARSET ?>" />
<title><?php echo $sys_title ?></title>
<meta name="keywords" content="<?php echo $sys_title ?>" />
<meta name="description" content="<?php echo $sys_title ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo SYS_FRONT_STYLE_PATH?>style/style.css" />
<link rel="stylesheet" type="text/css" href="<?php echo SYS_FRONT_STYLE_PATH?>style/s3Slider.css" />
<script type="text/javascript" src="<?php echo SYS_FRONT_STYLE_PATH?>js/jquery.js"></script>
<script type="text/javascript" src="<?php echo SYS_FRONT_STYLE_PATH?>js/s3Slider.js"></script>
<script>
	function setTab(area,id)
	{
	var tabArea=document.getElementById(area);

	var contents=tabArea.childNodes;
	for(i=0; i<contents.length; i++)
	{
		if(contents[i].className=='tabcontent'){contents[i].style.display='none';}
	}
	document.getElementById('view_'+id).style.display='';

	var tabs=document.getElementById(area+'tabs').getElementsByTagName('span');
	for(i=0; i<tabs.length; i++) { tabs[i].className=''; }
	document.getElementById('tab_'+id).className='active';
}

$(document).ready(function() {
	$('#slider').s3Slider({
		timeOut: 5000
	});
});
	
</script>
<base target="_self" />
</head>

<body>
<?php include("inc_topbar.tpl.html"); ?>
<div id="wrap">
<!--Content, Left, Right, Middle, Outer, Advertisement--> 
<!--Header-->
<div id="header">
<?php 
include("inc_pagetitle.tpl.html"); 
include("inc_mainmenu.tpl.html"); 
$channel_parentid = '00';
include("inc_submenu.tpl.html"); 
include("inc_navigation.tpl.html"); 
?>
</div>
<!--/Header-->

<!--Content-->
 
<!--C1 layout-->
<div class="content" style="background: none;">
<!--C1-R layout-->
<div class="sideR">
<div id="announcement" class="sideblock">
<h3><?php echo $layout_title_array['announcement'] ?></h3>
<ul class="msgtitlelist" style="height:120px;">
<?php
$announcement_array=getLayoutn('announcement');
foreach($announcement_array as $row){
?>
<li><a href='article.php?id=<?php echo $row['id'] ?>' target='_self'><?php echo $row['title'] ?></a></li>
<?php } ?>
</ul>
</div>
<div id="polls" class="sideblock" style="height:170px;">
<?php
$poll_array = getLayout1('polls');
$poll_title = '投票';
if ($poll_array) {
    $poll_title = $poll_array['title'];
    $poll_id = $poll_array['id'];
    $poll_list_array = getPoll($poll_id);
}
?>  
<h3><?php echo $poll_title ?></h3>
<?php if ($poll_array): ?>
<form id="pollform" action="article.php?act=savepoll" method="post"  style="padding:6px;">
<ul class="msgtitlelist">
<?php
foreach($poll_list_array as $row){
?>
<li><input type='<?php echo $row['eifr_type'] ?>' name='<?php echo $row['eifr_name'] ?>' value='<?php echo $row['id'] ?>' /><label for='ratevalue'><?php echo $row['title'] ?></label></li>
<?php } ?>
</ul>
<input type="hidden" name="id" value="<?php echo $poll_id ?>" />
<input type="hidden" name="act" value="savepoll" />
<center>
<button id="dovote" name="pollbtn" type="submit" value="true">投票</button>
&nbsp;<button type="button" onclick="location.href='article.php?id=<?php echo $poll_id ?>&act=show'">查看结果</button>
</center>
</form>
<?php endif; ?>
</div> <!-- /polls -->

<div id="ad_h2" class="sideblock" style="height:105px; overflow: hidden;">
	<?php if(isset($layout_ad_array['ad_h2'])) echo $layout_ad_array['ad_h2']; ?>
</div>

</div>
<!--/C1-R layout-->

<!--C1-L layout-->
<div class="sideL">
<!--C1-L1 layout-->	
<div id="slideimg" class="sideblock"  style="height:202px; padding:1px;">
    <div id="slider">
      <ul id="sliderContent">
<?php
foreach (getLayoutn('slideimg') as $row) :
    $tourl='article.php?id='. $row['id'];
    $picurl = Common::getImageByFileurl($row['fileurl'], SYS_FRONT_STYLE_PATH.'images/noneimg.gif', 0);
?>	
            <li style="display: none;" class="sliderImage">
                <a href="<?php echo $tourl ?>"><img src="<?php echo $picurl ?>"></a>
                <span style="display: none;" class="bottom"><strong><?php echo $row['title'] ?></strong><br><?php echo utfSubstr(stripTags($row['intro']), 70) ?></span>
            </li>
<?php endforeach; ?>
            <div class="clear sliderImage"></div>
        </ul>
    </div>
    <!-- // slider -->
</div>
<!--/C1-L1 layout-->

<!--C1-L2 layout-->
<div id="commendread" class="sideblock">
<h3><?php echo $layout_title_array['commendread'] ?></h3>
<ul class="msgtitlelist" style="height:210px;">
<?php
$commendread_array=getLayoutn('commendread');
foreach($commendread_array as $row){
?>
<li><a href='article.php?id=<?php echo $row['id'] ?>' target='_self'><?php echo $row['title'] ?></a></li>
<?php } ?>
</ul>
</div>
<!--/C1-L2 layout-->
</div>

<!--/C1-L layout-->

<!--C1-M layout-->
<div class="mainarea" >
<div id="headline" class="cleanblock">
<?php
$headline_array=getLayout1('headline');
if($headline_array){
?>	
<strong><a href='article.php?id=<?php echo $headline_array['id'] ?>' target='_self'><?php echo $headline_array['title'] ?></a></strong><p><?php echo $headline_array['intro'] ?></p>
<?php } ?>
</div>

<!--focus news-->
<div id="focus" style="height:390px;">
<ul class="msgtitlelist" >
<?php
$focus_array=getLayoutn('focus');
foreach($focus_array as $row){
$issuetime = getDateTimeMk_MD($row['issuetime']);
?>
<li><cite><?php echo $issuetime ?></cite>[<a href='channel.php?id=<?php echo $row['channel_id'] ?>' target='_self'><?php echo $row['channel_title'] ?></a>]<a href='article.php?id=<?php echo $row['id'] ?>' target='_self' style='<?php echo $row['title_style'] ?>'><?php echo $row['title'] ?></a></li>
<?php } ?>
</ul>
</div>
<!--/focus news-->


</div>
<!--/C1-M layout-->

</div>
<!--/C1 layout-->

<!--C2 layout-->
<div class="content">
<!--C2-R layout--->
<div class="sideR">
<!--C2-R1-->
<div id="hotcomment" class="sideblock">
<h3><?php echo $layout_title_array['hotcomment'] ?></h3>
<ul class="msgtitlelist" style="height:220px;">
<?php
$hotcomment_array=getHotComment();
foreach($hotcomment_array as $row){
?>
<li><a href='article.php?id=<?php echo $row['id'] ?>' target='_self'><?php echo $row['title'] ?></a></li>
<?php } ?>
</ul>
</div>
 
<!--/C2-R1-->
</div>
 
<!--/C2-R layout--->

<!--C2-L layout--->
<div class="sideL">
<!--C2-L1 layout-->
<div id="hotarticle" class="sideblock">
<h3><?php echo $layout_title_array['hotarticle'] ?></h3>
<ul class="msgtitlelist" style="height:220px;">
<?php
$hotarticle_array=getHotArticle();
foreach($hotarticle_array as $row){
?>
<li><a href='article.php?id=<?php echo $row['id'] ?>' target='_self'><?php echo $row['title'] ?></a></li>
<?php } ?>
</ul>
</div>
 
<!--/C2-L1 layout-->
</div>
 
<!--/C2-L layout--->

<!--C2-M layout-->
<div class="mainarea">
 
<!--C2-M1 layout-->	
<div id="tabarticle">
<p id="tabarticletabs"><span id="tab_3" onclick="setTab('tabarticle','3')">一月</span> <span id="tab_2" onclick="setTab('tabarticle','2')">一周</span> <span id="tab_1" class="active" onclick="setTab('tabarticle','1')">最近</span></p>
<h3>最新文章</h3>
<ul id="view_1" class="tabcontent" style="height:220px;">
<?php
$newarticle_array=getTabViewTime(360);
foreach($newarticle_array as $row){
?>
<li><a href='article.php?id=<?php echo $row['id'] ?>' target='_self'><?php echo $row['title'] ?></a></li>	
<?php } ?>
</ul>
<ul id="view_2" class="tabcontent" style="display: none; height:220px;">
<?php
$newarticle_array=getTabViewTime(7);
foreach($newarticle_array as $row){
?>
<li><a href='article.php?id=<?php echo $row['id'] ?>' target='_self'><?php echo $row['title'] ?></a></li>	
<?php } ?>
</ul>
<ul id="view_3" class="tabcontent" style="display: none; height:220px;">
<?php
$newarticle_array=getTabViewTime(30);
foreach($newarticle_array as $row){
?>
<li><a href='article.php?id=<?php echo $row['id'] ?>' target='_self'><?php echo $row['title'] ?></a></li>	
<?php } ?>
</ul>
</div>
 
<!--/C2-M1 layout-->	
</div>
 
<!--/C2-M layout-->
</div>
 
<!--/C2 layout-->

<!-- Link -->
<?php
$link_array=$layout_link_array['friendlink'];
if($link_array){
?>
<div id="friendlink" >
<a href="link.php" target="_self">友情链接</a>
<ul>
<?php
foreach($link_array as $row){
?>
<li><a href='<?php echo $row['weburl'] ?>' target='_blank' title='<?php echo $row['webname'] ?>'><?php echo $row['webname'] ?></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
<!-- /Link -->
<!-- /Content -->

<?php include("inc_footer.tpl.html"); ?>
</div>
</body>
</html>