<!--<?php print <<<EOT
-->
<link rel="stylesheet" href="$pwModeImg/style.css?{$GLOBALS['wind_repair']}" />
<style type="text/css">
.cmsForumlist{padding:7px;}
.cmsForumlist li{height:30px;}
.cmsForumlist li a{display:block;border:1px solid $tdcolor;background:$forumcolorone;margin:3px;line-height:22px;height:22px;overflow:hidden;}
.cmsForumlist li a:hover,.cmsForumlist .current a{border:1px solid $tablecolor; font-weight:700;background:$forumcolortwo; text-decoration:none;}
</style>
<div id="breadCrumb">
<!--
EOT;
if(checkEditPurview($windid,$articleModule->columnId)){
print <<<EOT
-->
	<a href="{$cmsBaseUrl}q=post&cid={$articleModule->columnId}" class="s2 b fr" target="_blank">[发表文章]</a>
	<!--span class="bts fr pr"><span><button type="button" onClick="location.href='{$cmsBaseUrl}q=post&cid={$articleModule->columnId}';">发表文章</button></span></span-->
<!--
EOT;
} if (!checkEditPurview($windid,$articleModule->columnId) && getPostPurview($windid,$_G)){
print <<<EOT
-->
	<a href="{$cmsBaseUrl}q=post&cid={$articleModule->columnId}" class="s2 b fr" target="_blank">[我要投稿]</a>
	<!--span class="bts fr pr"><span><button type="button" onClick="location.href='{$cmsBaseUrl}q=post&cid={$articleModule->columnId}';">我要投稿</button></span></span-->
<!--
EOT;
} 
$articleModule->subject  = S::htmlEscape($articleModule->subject);
print <<<EOT
-->
	<img align="absmiddle" src="images/wind/thread/home.gif" alt="forumlist" class="breadHome" /><em class="breadEm"></em>$pagePosition
</div>
<div class="cms_main cc">
	<div class="cms_cm">
		<div class="cms_cw">
			<div class="t">
				<table width="100%" style="table-layout:fixed;"><tr><td class="vt" height="400" style="padding:20px;">
				<div class="mb10"><h1 class="tac f24 b" style="font-family:Arial,Microsoft Yahei,Simsun;">{$articleModule->subject}</h1></div>
				<div class="cmsTips tac mb20">
<!--
EOT;
if($articleModule->user){
print <<<EOT
-->
					<span class="mr10">作者：<a href="{$db_userurl}{$articleModule->userId}" target="_blank">{$articleModule->user}</a></span>
<!--
EOT;
}if($articleModule->author){
print <<<EOT
-->					
					<span class="mr10">原创作者：{$articleModule->author}</span>
<!--
EOT;
}if(isURL($articleModule->fromUrl)){
print <<<EOT
-->					
					<span class="mr10">来源：<a href="{$articleModule->fromUrl}" target="_blank">{$articleModule->fromInfo}</a></span>
<!--
EOT;
}elseif($articleModule->fromInfo){print <<<EOT
-->
					<span class="mr10">来源：{$articleModule->fromInfo}</span>
<!--
EOT;
}print <<<EOT
-->
					<span class="mr10 f10">$postdate</span>
<!--
EOT;
if (checkEditPurview($windid,$articleModule->columnId)  || $articleModule->userId == $winduid) {
print <<<EOT
-->					
					<a href="{$basename}q=post&action=edit&id=$id&page=$page" class="mr5">[编辑]</a>
<!--
EOT;
}if(checkEditPurview($windid,$articleModule->columnId)){print <<<EOT
-->
					<a href="javascript:;" onclick="deleteArticle('$id','$articleModule->columnId');return false;">[删除]</a>
<!--
EOT;
}print <<<EOT
-->
				</div>
				<div class="summary mb10">
				{$articleModule->descrip}
				</div>
				<div class="cmsContent" id="cmsContent">
					{$content}
				</div>
				<div class="cc mb20">$pages</div>
				<!--<div class="mb20">关键词：<a href="#" class="mr10 s2">汽车</a><a href="#" class="mr10 s2">宝马</a><a href="#" class="mr10 s2">北京车展</a></div>-->
			</td></tr></table>
			<div class="p20 cc">
				<div class="cmsTips mb10">
					<div class="fr">
						<a href="apps.php?q=collection&a=favor&type=cms&ajax=1&id=$id" class="mr20 allCollect" onclick="return ajaxurl(this);">收藏</a><a href="javascript:;" onclick="sendmsg('operate.php?action=toweibo&ajax=1&type=cms&id=$id','',this.id);" class="allForward">新鲜事</a>
					</div>
					<span class="mr10">已有<span class="s2">{$articleModule->hits}</span>人阅读</span>
<!--
EOT;
if ($sourceUrl) {print <<<EOT
-->	
					<a href="$sourceUrl">看看大家怎么评论&gt;&gt;</a>
<!--
EOT;
}print <<<EOT
-->
				</div>
<!--
EOT;
if ($articleModule->relate) {print <<<EOT
-->	
				<div class="reReading mb10">
					<h2 class="f14 b">相关阅读</h2>
					<div class="cmsListA cmsIconA">
						<ul>
<!--
EOT;
foreach ($articleModule->relate as $value) {print <<<EOT
-->	
							<li><a href="$value[url]" target="_blank">$value[subject]</a></li>
<!--
EOT;
}print <<<EOT
-->
						</ul>
					</div>
				</div>
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
if ($sourceUrl) {
print <<<EOT
-->	
				<div class="gotoForum tac f14 b mb10">
					<a href="$sourceUrl" target="_blank">进入{$articleModule->fromInfo}讨论</a>
				</div>
<!--
EOT;
}if (checkReplyPurview()) {
print <<<EOT
-->					
			<form method="post" id="mainForm" name="FORM" onsubmit="addcmscomment(document.FORM)" action="pw_ajax.php?action=cmsreply&type=addcomment" >
			<input type="hidden" name="article_id" value="{$id}">
			<div class="mb10">
<!--
EOT;
require_once PrintEot('wysiwyg_editor_cmsreply');
print <<<EOT
-->
			</div>
			<div class="mb20">
				<span class="btn" style="margin:0;"><span><button id="cmsSubmit" type="submit" >评论</button></span></span>
			</div>	
			</form>
<script type="text/javascript">
onReady(function(){
	//fix firefox
	getObj("cmsSubmit").disabled=false;
})
function addcmscomment(form){
	var e=getEvent();
	if(e.preventDefault){
		e.preventDefault();	
	}else{
		e.returnValue=false;	
	}
	getObj("cmsSubmit").disabled=true;
	var atc_content = editor.getUBB();
	if(atc_content.replace(/\s*/g,'') == ''){
		showDialog("error","内容不能为空!","","","");
		getObj("cmsSubmit").disabled=false;
		return false;
	}else{
		ajax.submit(form, function() {
			getObj("cmsSubmit").disabled=false;
			var gotText = ajax.request.responseText;
			if ('success' == gotText) {
				location.reload();
			} else {
				ajax.guide();
			}
			
		})
		return false;
	}
}
function addReply(form){
	var content = form.content.value;
	if(content==''){
		showDialog("error","内容不能为空!",2);
		return false;
	}
	ajax.submit(form, function() {
		var gotText = ajax.request.responseText;
		if ('success' == gotText) {
			var commentnum = getObj('commentnum_'+form.commentid.value);
			if(commentnum){
				var regExp = /\(([0-9]+)\)/;
				if(regExp.test(commentnum.innerHTML)){
					var num = RegExp.$1;
				}
				if(isNaN(num)){
					str = '(1)';
				}else{
					str = '('+(++num)+')';
				}
				commentnum.innerHTML = str;
			}
			statusObj = 0;
			getReplyList(form.commentid.value);
			form.content.value = '';
		} else {
			ajax.guide();
		}
	})
	return false;
}
</script>
<!--
EOT;
} if ($cmsReplyList) {
	require_once PrintEot('cmsreply');
	}
print <<<EOT
-->
<script>
function delcmscomment(commentid){
	ajax.send('pw_ajax.php?action=cmsreply&type=delcomment','commentid='+commentid,function(){
		var rText = ajax.request.responseText;
		if (rText=='success') {
			delElement('comment_'+commentid);
		} else {
			ajax.guide();
		}
	});
}

function getCommentList(href){
	ajax.send(href,'',function(){
		getObj('listcomments').innerHTML = ajax.runscript(ajax.request.responseText);
	});
	scroll(0,0);
	return false;
}

if (typeof statusObj == 'undefined') var statusObj = 0;
function getReplyList(commentid){
	statusObj = (statusObj == 1) ? 0 : 1;
	if (statusObj == 1) {
		ajax.send('pw_ajax.php?action=cmsreply&type=listreply','commentid='+commentid,function(){
			getObj('listreplys_'+commentid).innerHTML = ajax.runscript(ajax.request.responseText);
			getObj('getreplys_'+commentid).style.display = 'block';
		});
	} else {
		getObj('getreplys_'+commentid).style.display = 'none';
	}
}

function replycomment(username,form){
	form.content.value = '回复@'+username+' : ';
}

function delreply(replyid,commentid){
	ajax.send('pw_ajax.php?action=cmsreply&type=delreply','replyid='+replyid+'&commentid='+commentid,function(){
		var rText = ajax.request.responseText;
		if (rText=='success') {
			var commentnum = getObj('commentnum_'+commentid);
			if(commentnum){
				var regExp = /\(([0-9]+)\)/;
				if(regExp.test(commentnum.innerHTML)){
					var num = RegExp.$1;
				}
				if(isNaN(num) || num<=0){
					str = '';
				}else{
					str = '('+(--num)+')';
				}
				commentnum.innerHTML = str;
			}
			delElement('reply_'+replyid);
		} else {
			ajax.guide();
		}
	});
}
</script>
				</div>
			</div>
		</div>
	</div>
	<div class="cms_sd">
		<div class="t">
			<div class="cmsBoxB">
<!--
EOT;
$_columnName = $column && $columns['parent'][name] ? $columns['parent'][name] : '栏目';
print <<<EOT
-->
				<h2 class="h" style="border-top:0;">$_columnName</h2>
				<ul class="cmsForumlist cc cmslistB">
<!--
EOT;
foreach($columns['sub'] as $var){
$_current = $var['column_id'] == $articleModule->columnId ? 'class="current"' : '' ;
$url = getColumnUrl($var[column_id]);
print <<<EOT
-->
					<li {$_current}><a href="$url">{$var[name]}</a></li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
				<h2 class="h">24小时人气排行</h2>
				<div class="cmsListA cmsIconB">
					<ul>
<!--
EOT;
foreach ((array)$hotArticle as $value) {
$value[subject]  = S::htmlEscape($value[subject]);
print <<<EOT
-->
						<li><a href="{$value[url]}" target="_blank">{$value[subject]}</a></li>
<!--
EOT;
}print <<<EOT
-->
					</ul>
				</div>
				<h2 class="h">最新文章</h2>
				<div class="cmsListA cmsIconA">
					<ul>		
<!--
EOT;
$i = 0;
foreach ($pageCache->getData('newArticle') as $value) {
$value[subject]  = S::htmlEscape($value[subject]);
$i++;
print <<<EOT
-->

						<li><a href="{$value[url]}" target="_blank">{$value[subject]}</a></li>
<!--
EOT;
if ($i==5) {print <<<EOT
-->
					</ul>
					<div class="cmsHr">&nbsp;</div>
					<ul>
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
}print <<<EOT
-->
					</ul>
				</div>
				<h2 class="h">热门帖子</h2>
				<div class="cmsListA cmsIconA">
					<ul>		
<!--
EOT;
$i = 0;
foreach ($pageCache->getData('hotSubject') as $value) {
$value[title]  = S::htmlEscape($value[title]);
$i++;
print <<<EOT
-->

						<li><a href="{$value[url]}" target="_blank">{$value[title]}</a></li>
<!--
EOT;
if ($i==5) {print <<<EOT
-->
					</ul>
					<div class="cmsHr">&nbsp;</div>
					<ul>
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
}print <<<EOT
-->
				</ul>
				</div>
				<h2 class="h">最新帖子</h2>
				<div class="cmsListA cmsIconA">
					<ul>		
<!--
EOT;
$i = 0;
foreach ($pageCache->getData('newSubject') as $value) {
$value[title]  = S::htmlEscape($value[title]);
$i++;
print <<<EOT
-->

						<li><a href="{$value[url]}" target="_blank">{$value[title]}</a></li>
<!--
EOT;
if ($i==5) {print <<<EOT
-->
					</ul>
					<div class="cmsHr">&nbsp;</div>
						<ul>
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
}print <<<EOT
-->
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="$pwModeJs/cms.js" ></script>
<script type="text/javascript">
var images = getObj('cmsContent').getElementsByTagName('img');
var imgLoader = setTimeout(imgLoad,200);
function imgLoad(){
	var l = images.length,maxWidth=550,n=false;
	for(var i = 0; i < l; i++){
		if(images[i].width > maxWidth){
			images[i].width = maxWidth;
		}
		if(images[i].width == 0){
			n=true;
		}
		if(n){
			imgLoader = setTimeout(imgLoad, 200);
		}
	}
}
window.onReady(function(){
	//控制多媒体播放
	var videos=getElementsByClassName("video");
	for(var i=0,len=videos.length;i<len;i++){
(function(elem){
toggleVideo(elem);
})(videos[i])
	}
});
</script>
<!--
EOT;
?>-->