<%@ Page Language="C#" AutoEventWireup="true" Inherits="Sys_Template_AddReview, QianboCMS" EnableEventValidation="false" %>
<%@ Import Namespace="Qianbo.Common" %>
<%@ Import Namespace="Qianbo.Model" %>
<%@ Import Namespace="Qianbo.BLL" %>
<script language="javascript" type="text/javascript" src="<%=Param.ApplicationRootPath %>/Js/Common.js"></script>
<script type="text/javascript" language="javascript">
function validate()
{
    $("isValidate").value="login";
}
function FunLoginEnabled()
{
    if($("chkNoName").checked==false)
    {
        $("UserName").disabled=false;
        $("userPwd").disabled=false;
        $("btnSubmit").disabled=false;
    }
    else
    {
        $("UserName").disabled=true;
        $("userPwd").disabled=true;
        $("btnSubmit").disabled=true;
    }
    $("isValidate").value="nologin";
}
function CheckLogin()
{
    try
    {
        if($("isValidate").value=="login")
        {
            if($("UserName").value=="")
            {
                alert("用户名不能为空！");
                $("UserName").focus();
                $("isValidate").value="nologin";
                return false;
            }
        }
        if($("isValidate").value=="login")
        {
            if($("userPwd").value=="")
            {
                alert("密码不能为空！");
                $("userPwd").focus();
                $("isValidate").value="nologin";
                return false;
            }
        }
    }
    catch(e)
    {}
    var inputValue = $('txtContent').value.trim();
    if(inputValue.length==0)
    {
        try
        {
            if($("isValidate").value=="login")
            {
                return true;
            }
        }
        catch(e)
        {}
        alert('评论内容不能为空！');
        return false;
    }
    if($("txtValidatec").value.trim().length==0)
    {
        try
        {
            if($("isValidate").value=="login")
            {
                return true;
            }
        }
        catch(e)
        {}
       alert('验证码不能为空！');
       $("txtValidatec").focus();
       return false;
    }
    return true;
}
function myfun()
{
    document.write($("txtContent2").value);
}
function setico(values)
{
    $('txtContent').focus();
    if (document.selection)
    {
        var range= document.selection.createRange();
        range.text = "["+values+"]";
    }
}
var clickCount = 0;
function clearCommentContent(oObject) {
    clickCount++;
    if (clickCount == 1) {
        oObject.value = "";
    }
}
</script>
<form name="form1" action="<%=Param.ApplicationRootPath %>/Common/AddReView.aspx" method="post" onSubmit="return CheckLogin()">
  <table align="center" width="90%" cellspacing="0" cellpadding="0">
    <tr>
      <td><table width="100%" cellpadding="0" cellspacing="0">
<%
if (!isLogin)
{
%>
          <tr id="loginRow">
            <td>用 户 名：<input type="text" maxlength="20" name="UserName" id="UserName" size="10" disabled="disabled" />
              密 码：<input type="password" maxlength="20" name="userPwd" id="userPwd" size="10" disabled="disabled" />
              <input type="submit" name="btnSubmit" id="btnSubmit" value="登录" disabled="disabled" onClick="validate()" />
              匿名发表：<input type="checkbox" value="chkNoName" name="chkNoName" checked="checked" onClick="FunLoginEnabled()" />
              <input type="hidden" name="txtIsLogin" value="<%=isLogin%>" />
              <input type="hidden" value="nologin" id="isValidate" /></td>
          </tr>
<%
}
%>
          <tr>
            <td>
<%
if (!IsAddCommentEditor)
{
%>
              <textarea id="Content" name="txtContent" style="width: 98%;" rows="8" onClick="clearCommentContent(this)"></textarea>
<% }
else
{
%>
              <textarea id="txtContent" name="txtContent" style="width: 98%;" rows="8" onClick="clearCommentContent(this)"></textarea>
              <table cellpadding="0" cellspacing="0" border="0">
                <tr style="cursor: hand;">
                  <td><img src="<%=Param.ApplicationRootPath %>/Images/Post/em01.gif" onClick="setico('em01')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em02.gif" onClick="setico('em02')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em03.gif" onClick="setico('em03')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em04.gif" onClick="setico('em04')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em05.gif" onClick="setico('em05')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em06.gif" onClick="setico('em06')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em07.gif" onClick="setico('em07')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em08.gif" onClick="setico('em08')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em09.gif" onClick="setico('em09')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em10.gif" onClick="setico('em10')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em11.gif" onClick="setico('em11')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em12.gif" onClick="setico('em12')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em13.gif" onClick="setico('em13')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em14.gif" onClick="setico('em14')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em15.gif" onClick="setico('em15')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em16.gif" onClick="setico('em16')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em17.gif" onClick="setico('em17')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em18.gif" onClick="setico('em18')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em19.gif" onClick="setico('em19')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em20.gif" onClick="setico('em20')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em21.gif" onClick="setico('em21')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em22.gif" onClick="setico('em22')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em23.gif" onClick="setico('em23')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em24.gif" onClick="setico('em24')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em25.gif" onClick="setico('em25')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em26.gif" onClick="setico('em26')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em27.gif" onClick="setico('em27')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em28.gif" onClick="setico('em28')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em29.gif" onClick="setico('em29')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em30.gif" onClick="setico('em30')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em31.gif" onClick="setico('em31')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em32.gif" onClick="setico('em32')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em33.gif" onClick="setico('em33')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em34.gif" onClick="setico('em34')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em35.gif" onClick="setico('em35')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em36.gif" onClick="setico('em36')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em37.gif" onClick="setico('em37')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em38.gif" onClick="setico('em38')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em39.gif" onClick="setico('em39')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em40.gif" onClick="setico('em40')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em41.gif" onClick="setico('em41')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em42.gif" onClick="setico('em42')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em43.gif" onClick="setico('em43')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em44.gif" onClick="setico('em44')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em45.gif" onClick="setico('em45')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em46.gif" onClick="setico('em46')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em47.gif" onClick="setico('em47')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em48.gif" onClick="setico('em48')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em49.gif" onClick="setico('em49')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em50.gif" onClick="setico('em50')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em51.gif" onClick="setico('em51')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em52.gif" onClick="setico('em52')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em53.gif" onClick="setico('em53')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em54.gif" onClick="setico('em54')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em55.gif" onClick="setico('em55')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em56.gif" onClick="setico('em56')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em57.gif" onClick="setico('em57')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em58.gif" onClick="setico('em58')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em59.gif" onClick="setico('em59')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em60.gif" onClick="setico('em60')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em61.gif" onClick="setico('em61')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em62.gif" onClick="setico('em62')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em63.gif" onClick="setico('em63')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em64.gif" onClick="setico('em64')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em65.gif" onClick="setico('em65')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em66.gif" onClick="setico('em66')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em67.gif" onClick="setico('em67')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em68.gif" onClick="setico('em68')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em69.gif" onClick="setico('em69')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em70.gif" onClick="setico('em70')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em71.gif" onClick="setico('em71')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em72.gif" onClick="setico('em72')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em73.gif" onClick="setico('em73')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em74.gif" onClick="setico('em74')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em75.gif" onClick="setico('em75')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em76.gif" onClick="setico('em76')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em77.gif" onClick="setico('em77')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em78.gif" onClick="setico('em78')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em79.gif" onClick="setico('em79')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em80.gif" onClick="setico('em80')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em81.gif" onClick="setico('em81')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em82.gif" onClick="setico('em82')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em83.gif" onClick="setico('em83')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em84.gif" onClick="setico('em84')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em85.gif" onClick="setico('em85')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em86.gif" onClick="setico('em86')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em87.gif" onClick="setico('em87')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em88.gif" onClick="setico('em88')">
                    <img src="<%=Param.ApplicationRootPath %>/Images/Post/em89.gif" onClick="setico('em89')"></td>
                </tr>
              </table>
<%
}
%></td>
          </tr>
          <tr>
            <td>
<%
if (IsCommentValidate)
{
    validate = true;
%>
              验证码：<input id="txtValidatec" type="text" name="txtValidate" size="10" maxlength="6" />
              <img src="<%=Param.ApplicationRootPath %>/Common/Code.aspx" id="img1" onClick="this.src=this.src+'?'+Math.random();" alt="换个验证码" align="absmiddle" />
              <input type="hidden" value="nologin" id="Hidden1" />
<%
}
%>
              <input id="Submit1" type="submit" value="发表评论" /></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <input id="Button1" type="hidden" name="hidModeType" value="<%=modelId %>" />
  <input id="Button2" type="hidden" name="hidNewsId" value="<%=id %>" />
  <input id="Hidden2" type="hidden" name="hidValidate" value="<%=validate %>" />
  <input id="Hidden3" type="hidden" name="hidNoName" value="<%=IsAllowCommentNoName %>" />
  <input id="Hidden4" type="hidden" name="hidColCommentSet" value="<%=isColCheckComment %>" />
</form>