<!--<?php print <<<EOT
-->
<script>
	var charset = '$db_charset';
	var imgpath   = '$imgpath';
	var stylepath = '$stylepath';
	var db_urlcheck = "$db_urlcheck";
	var db_bbsurl = '$db_bbsurl';
	function addsmile(NewCode){
	    document.FORM.atc_content.value += ' [s:'+NewCode+'] ';
	}
	
	if (is_ie6) {
		window.onerror = function () {return true;}
	}
</script>
<script type="text/javascript" src="js/pw_lwd.js"></script>
<script src="$db_htmdir/js/face.js"></script>
<div id="menu_show" style="display:none;"></div>
<div id="menu_face" class="menu" style="display:none;"></div>
<script type="text/javascript" src="js/post.js"></script>
<div id="comment_container">
<form method="POST" name="FORM" action="" onsubmit="return false;">
    <div class="minieitor_pw cc">
        <ul class="miniUl">
            <li><a href="javascript:" title="插入url链接" class="milink_pw" onClick="createLinkBox();" id="createlinkid">插入url链接</a></li>
            <li><a href="javascript:" title="添加表情" class="mishow_pw" id="td_face" onClick="showDefault();" unselectable="on">添加表情</a></li>
        </ul>
        <div class="minitextarea">
            <textarea maxlength="200" id="comm_input_{$comment_type}_{$comment_typeid}_0" name="atc_content"></textarea>
        <div class="c"></div>
        </div>
        <div class="c"></div>
    </div>
    <span class="btn" style="margin:0 15px 0 0;"><span><button type="submit" onclick="PW_Comment.sendComment('$comment_type',$comment_typeid,0,2);">提 交</button></span></span>
<div id="linkbox" style="display:none;"></div>
</form>
		<div class="mb10 c">&nbsp;</div>
						<div class="dlA">
						<div id="createcommentbox"></div>
<!--
EOT;
foreach ($commentdb as $key => $comment) {print <<<EOT
-->
								<dl class="cc dl" id="comment_{$comment[id]}">
									<dt class="dt"><a href="{$db_userurl}$comment[uid]" class="img_50"><img src="$comment[face]" width="44" height="44" /></a></dt>
									<dd class="dd">
<!--
EOT;
if ($comment[uid]==$winduid || $winduid==$uid || $groupid==3) { print <<<EOT
-->
									<a style="cursor: pointer;" onclick="pwConfirm('是否确定删除本条评论',this,function(){ajax.send('apps.php?q=ajax&a=commdel','id=$comment[id]',PW_Comment.delOneCommentResponse);});" title="删除" class="adel">删除</a>
<!--
EOT;
} print <<<EOT
-->
									<p class="title"><a href="{$db_userurl}$comment[uid]" class="mr5">$comment[username]</a>： $comment[title] </p>
									<cite class="gray">$comment[postdate]</cite> - 
<!--
EOT;
if ($comment[uid]==$winduid || $winduid==$uid || $groupid==3) { print <<<EOT
-->
									<a style="cursor:pointer;" class="reA" onclick="PW_Comment.createCommentInput('$comment_type',$comment_typeid,$comment[id])">回复</a>
<!--
EOT;
} print <<<EOT
-->
											<div id="commentbox_{$comment_typeid}_{$comment[id]}">
											<div id="subcommentlist_{$comment_type}_{$comment[id]}">
<!--
EOT;
foreach ($subcommentdb[$comment['id']] as $k => $subcomment) {print <<<EOT
-->
											<dl class="cc dl2" id="comment_{$subcomment[id]}">
												<dt><a href="{$db_userurl}$subcomment[uid]"><img src="$subcomment[face]" width="30" height="30" /></a></dt>
												<dd>
<!--
EOT;
if ($subcomment['uid'] == $winduid || $groupid == 3) {print <<<EOT
-->
<a href="javascript:;" class="adel" onclick="pwConfirm('是否确定删除本条评论',this,function(){ajax.send('apps.php?q=ajax&a=commdel','id=$k',PW_Comment.delOneCommentResponse);});" >删除</a>
<!--
EOT;
}print <<<EOT
-->
											<p class="mb5 f14"><a href="{$db_userurl}$subcomment[uid]" class="mr5">$subcomment[username]</a>：$subcomment[title]</p>
											<cite class="gray">$subcomment[postdate]</cite>
											</dd>
											</dl>	
<!--
EOT;
}print <<<EOT
-->
											</div>
											<div id="comment_input_{$comment_type}_{$comment_typeid}_{$comment[id]}" style="display:none;">
												<dl class="cc dl2">
													<dd style="padding-left:0;"><input type="text" id="comm_input_{$comment_type}_{$comment_typeid}_{$comment[id]}" class="input input_wb" name="title" maxlength="200"><span class="btn2"><span><button  type="button" onclick="PW_Comment.sendComment('$comment_type','$comment_typeid','$comment[id]','3');">回复</button></span></span>
													</dd>
												</dl>
											</div>
										</div>
									</dd>

								</dl>
<!--
EOT;
}print <<<EOT
-->
						</div>
<div class="mt10 cc">$pages</div>
</div>
<!--
EOT;
?>