<!--
<?php
print <<<EOT
-->
<div class="showcomment">
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write('<span id="comment_show">$Load_Msg</span>');
document.write('<div style="display:none;"><iframe src="$Mdomain/comment_ajax.php?fid=$fid&aid=$id&iframeID=comment_show" width=0 height=0 name="comment_show"></iframe></div>');
//-->
</SCRIPT>
</div>
<div id="commentTable">
	<div class="head">
    	<div class="tag">我来说两句</div>
        <div class="more">已有<span>{$rsdb[comments]}</span>评论 <a href="$Mdomain/comment.php?fid=$fid&id=$id" target=_blank>点击全部查看</a></div>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
	<form name="form_comment" id="form_comment" method="post" target="comment_show" action="$Mdomain/comment_ajax.php?fid=$fid&aid=$id&iframeID=comment_show">
<!--
EOT;
if($lfjdb){$comment_username_tr='none;';}
print <<<EOT
-->
		<tr style="display:$comment_username_tr" id="comment_username_tr"> 
          <td class="tdl">帐号:</td>
          <td class="tdr">
          	<input type="text" name="username" id="comment_username" size="12">
            密码:<input type="password" name="password" id="comment_password" size="12">
            (<a href="$webdb[www_url]/do/reg.php" target="_blank">新用户注册</a>)
          </td>
        </tr>
<!--
EOT;
if($web_admin || !$groupdb[CommentArticleYzImg]){$comment_yzimg_tr='none;';}
print <<<EOT
-->
        <tr style="display:$comment_yzimg_tr" id="comment_yzimg_tr"> 
          <td class="tdl">验证码:</td>
          <td class="tdr">
              <input id="yzImgNum" type="text" name="yzimg" size="8">
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write('<img border="0" id="yz_Img" name="imageField" onclick="this.src=this.src+Math.random();" src="$webdb[www_url]/do/yzimg.php?'+Math.random()+'">');
//-->
</SCRIPT> </td>
        </tr> 
        <tr> 
          <td class="tdl">表情:</td>
          <td class="tdr">
<style type="text/css">
<!--
.selected {filter:Alpha(opacity=100);border:1px solid #FF9900}
.unselected {filter:Alpha(opacity=50);border:1px solid #EDF8DD}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
 <!--
 var prevIcon;
function icon(num){
num.className="selected";
if(typeof(prevIcon)!="undefined"){
prevIcon.className="unselected";
}else{
document.all.firstface.className="unselected";
}
if(num.className=="unselected"){
num.className="selected";
}
prevIcon=num;
document.getElementById("commentface").value=num.childNodes(0).id ;
}
 //-->
 </SCRIPT>
            <table border=0 cellspacing=0 cellpadding=0>
              <tr> 
                <td class="selected" onClick="icon(this)" id="firstface" style="cursor:hand"><img src="$webdb[www_url]/images/default/faceicon/1.gif" width="20" height="20" id="1"></td>
<!--
EOT;
for($i=2;$i<15;$i++){
print <<<EOT
-->
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="$webdb[www_url]/images/default/faceicon/$i.gif" width="20" height="20" id="$i"></td>
<!--
EOT;
}
print <<<EOT
-->
                <td align="center" valign="top"> 
                  <input name="commentface" type="hidden" value="1">
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td class="tdl">内容:</td>
          <td class="tdr"><textarea name="content" cols="50" rows="5" id="comment_content" onKeyDown="quickpost(event)"></textarea></td>
        </tr>
        <tr> 
          <td class="tdl">
<script language="JavaScript">
<!--
cnt = 0;
function quickpost(event){
	if((event.ctrlKey && event.keyCode == 13)||(event.altKey && event.keyCode == 83)){
		cnt++;
		if (cnt==1){
			post_comment();
		}else{
			alert('内容正在提交...');
		}
	}	
}
function post_comment(){
	if(document.getElementById("comment_yzimg_tr").style.display==''){
		if(document.getElementById("yzImgNum").value==''){
			alert('验证码不能为空!');
			return false;
		}
	}
	if(document.getElementById("comment_content").value==''){
		alert('内容不能为空!');
		return false;
	}
	document.getElementById("form_comment").submit();
	document.getElementById("comment_content").value='';
	if(document.getElementById("yzImgNum")!=null){
		document.getElementById("yzImgNum").value='';
		document.getElementById("yz_Img").src="$webdb[www_url]/do/yzimg.php?"+Math.random();;
	}
	limitTime=parseInt('$webdb[CommentTime]');
	limitComment();
	
}
//-->
</script>
          </td>
          <td class="tdr">
              <span id="comment_submit" onclick="post_comment()"><img src="$Mdomain/images/blue/commentbut.gif"></span>
              <input type="hidden" name="action" value="post">
          </td>
        </tr>
    </form>
    </table>
</div>
<!--
EOT;
?>
-->
