<%@ Control Language="C#" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Config" %>
<%@ Import Namespace="Kesion.Components" %>
<%@ Import Namespace="Kesion.HtmlTags" %>
<%@ Import Namespace="Kesion.XML" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="Kesion.Controls" %>
<script runat="server" type="text/C#">

    dynamic __user = HttpContext.Current.Items["user"];                //初始化用户信息
    bool isLoadPage = true;  //定义页面是否加载

    public int ChannelID=0;
    public int ClassID = 0;
    private int infoID = 0;
    private string fieldsxml = string.Empty;
    private ModelInfo __modelinfo = null;
    public string JSStr = string.Empty;

    private int Verify = 0;
    private float ReadPoint = 0;
    protected void Page_Load(object sender, EventArgs e)
    { 
        ClassID = Utils.StrToInt(KSCMS.S("classId"));
        infoID = Utils.StrToInt(KSCMS.S("InfoID"));

        if (ClassID != 0)
        {
            ChannelID = Utils.StrToInt(MyCache.GetCacheClass(ClassID, 12));
            __modelinfo = ModelManage.GetModelInfo(ChannelID);
            //！--栏目发表数量限制数量
            string ClassBasicInfo = MyCache.GetCacheClassMore(ClassID, 1);  //获取ClassBasicInfo中的值
            string[] C_B_I_Arr = System.Text.RegularExpressions.Regex.Split(ClassBasicInfo+"$$$$", @"[$]{4}");
            int playcount = Utils.StrToInt(C_B_I_Arr[4].ToString());        //该栏目下允许发表的数量限制
            if ( playcount> 0)
            {
                int nowcount = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) from ks_infolist where inputer='" + __user.UserName + "' and classid=" + ClassID));
                if (playcount <= nowcount)
                {
                    Msg.AlertDoFun("您发表的数量已达到该栏目允许发表的数量暂时无法继续发表相关内容！您可以联系管理员解决问题！", "history.back()"); 
                    isLoadPage = false;
                    return;
                }
            }
            //--！栏目发表数量限制数量
            fieldsxml = __modelinfo.FieldsXML;
            if (infoID != 0)
            {
                fieldsxml = GetEditXML(fieldsxml, infoID);
            }
            else
            {
                #region 检查投稿权限
                int classPostNum = Utils.StrToInt(UserGroupManage.GetGroupSettings(11));
                if (classPostNum == 0)
                {
                    Msg.AlertDoFun(Utils.GetLanguageNode("//language/node[@name='user']/contribute/noauthority"),"history.back()");
                    isLoadPage = false;
                    return;
                }
                else if (classPostNum > 0)
                {
                    int hasPostNum = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From " + __modelinfo.ModelTable + " where inputer='" + UserManage.GetUserInfo().UserName + "' and year(adddate)=" + DateTime.Now.Year + " and month(adddate)=" + DateTime.Now.Month + " and day(adddate)=" + DateTime.Now.Day));
                    if (hasPostNum >= classPostNum)
                    {
                        Msg.AlertDoFun(string.Format(Utils.GetLanguageNode("//language/node[@name='user']/contribute/postlimitperday"), classPostNum),"history.back()");
                        isLoadPage = false;
                        return;
                    }
                }
                int allPostNum = Utils.StrToInt(UserGroupManage.GetGroupSettings(12));
                if (allPostNum == 0)
                {
                    Msg.AlertDoFun(Utils.GetLanguageNode("//language/node[@name='user']/contribute/noauthority"),"history.back()");
                    isLoadPage = false;
                    return;
                }
                else if (allPostNum > 0)
                {
                    int hasPostNum = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_InfoList where inputer='" + UserManage.GetUserInfo().UserName + "' and year(adddate)=" + DateTime.Now.Year + " and month(adddate)=" + DateTime.Now.Month + " and day(adddate)=" + DateTime.Now.Day));
                    if (hasPostNum >= allPostNum)
                    {
                        Msg.AlertDoFun(string.Format(Utils.GetLanguageNode("//language/node[@name='user']/contribute/postlimitallperday"), allPostNum),"history.back()");
                        isLoadPage = false;
                        return;
                    }
                }
                int score = Utils.StrToInt(MyCache.GetCacheClass(ClassID, 33)) * Utils.StrToInt(UserGroupManage.GetGroupSettings(UserManage.GetUserInfo().GroupID, 13));
                double point = Utils.StrToFloat(MyCache.GetCacheClass(ClassID, 32)) * Utils.StrToInt(UserGroupManage.GetGroupSettings(UserManage.GetUserInfo().GroupID, 14));
                if (score < 0)
                {
                    int kyScore = UserManage.GetUserInfo().Score - UserManage.GetUserInfo().ScoreHasUse;
                    if (kyScore < -(score))
                    {
                        Msg.AlertDoFun(string.Format(Utils.GetLanguageNode("//language/node[@name='user']/contribute/postconsumptionscore"), -score, kyScore),"history.back()");
                        isLoadPage = false;
                        return;
                    }
                }
                if (point < 0)
                {
                    double kyPoint = UserManage.GetUserInfo().Point;
                    if (kyPoint < -point)
                    {
                        Msg.AlertDoFun(string.Format(Utils.GetLanguageNode("//language/node[@name='user']/contribute/postconsumptionpoint"), MyCache.GetCacheConfig(49) + Kesion.APPCode.Public.ReturnShopPrice(-point) + MyCache.GetCacheConfig(50), MyCache.GetCacheConfig(49) + Kesion.APPCode.Public.ReturnShopPrice(kyPoint) + MyCache.GetCacheConfig(50)), "history.back()");
                        isLoadPage = false;
                        return;
                    }
                }


                #endregion
            }

            this.ModelJS1.FieldXML = fieldsxml;
            this.ModelJS1.ModelID = ChannelID.ToString();
            this.ModelJS1.InputItemName = "ContributionItem";
        }

        if (KSCMS.S("action") == "dosave")
        {
            isLoadPage = false;
            DoSave();
            return;
        }
    }

    private string GetEditXML(string fieldsxml, int id)
    {
        DataTable dt = DataFactory.GetDataTable(string.Format("SELECT TOP 1 * FROM {0} WHERE infoid={1} and inputer='{2}'", MyCache.GetCacheModel(ChannelID, 3), id,UserManage.GetUserInfo().UserName));
        string newxml = fieldsxml;
        if (dt.Rows.Count > 0)
        {
            ReadPoint = Utils.StrToFloat(dt.Rows[0]["readpoint"].ToString());
            Verify = Utils.StrToInt(dt.Rows[0]["verify"].ToString());

            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(fieldsxml);
            XmlNodeList xn = xmlDoc.DocumentElement.SelectNodes("//Model/Field");
            foreach (XmlNode xf in xn)
            {
                XmlElement xe = (XmlElement)xf;
                string FieldName = xe.GetAttribute("Name").ToString();
                if (FieldName.ToLower() == "verify")
                {
                    //   this.RdbVerify.SelectedValue = dt.Rows[0][FieldName].ToString();
                    //   this.hidVerify.Value = dt.Rows[0][FieldName].ToString();
                }
                else if (FieldName.ToLower() == "area")
                {
                    xe.GetElementsByTagName("DefaultValue").Item(0).InnerText = dt.Rows[0]["ProvinceID"].ToString() + "|" + dt.Rows[0]["CityID"].ToString() + "|" + dt.Rows[0]["CountyID"].ToString();
                }
                else if (__modelinfo.BasicType > 1 && FieldName.ToLower()=="intro")
                {
                    xe.GetElementsByTagName("DefaultValue").Item(0).InnerText = dt.Rows[0]["Details"].ToString();
                }
                else if (xe.SelectSingleNode("FieldType").InnerText == "3" || FieldName.ToLower() == "content")
                {
                    xe.GetElementsByTagName("DefaultValue").Item(0).InnerText = dt.Rows[0][FieldName].ToString();
                }
                else
                {
                    xe.GetElementsByTagName("DefaultValue").Item(0).InnerText = dt.Rows[0][FieldName].ToString().Replace(@"""", "&#34;");
                }

                #region 联动菜单
                if (xe.GetAttribute("ParentFieldID").ToString() != "0" && xe.GetAttribute("ParentFieldID").ToString() != string.Empty)
                {
                    if (!string.IsNullOrEmpty(dt.Rows[0][FieldName].ToString()))
                    {
                        JSStr +="<sc"+"ript>"+ string.Format(@"jQuery(document).ready(function(){{fill{0}(jQuery('select[name={0}] option:selected').val());jQuery('#{1}').val('{2}');}});", xe.GetAttribute("ParentFieldID").ToString(), FieldName, dt.Rows[0][FieldName].ToString());
                        JSStr+="</"+"script>";
                    }

                }
                #endregion

            }
            if (!(dt.Rows[0]["turnurl"].ToString().Equals("http://")) && dt.Rows[0]["turnurl"].ToString() != "")
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "page", "<script>$('#ContentArea').hide();$('#TurnUrl').attr('disabled',false);</sc"+"ript>");
            }

            return XmlObject.XMLToString(ref xmlDoc);
        }

        return fieldsxml;
    }

    private void DoSave()
    {
        #region 保存
        ContentItem __iteminfo = new ContentItem();
        __iteminfo.ChannelID = ChannelID;
        __iteminfo.ClassID = ClassID;
        __iteminfo.Title = Utils.RemoveXss(KSCMS.S("title",false));
        if (__modelinfo.BasicType > 1)
        {
            __iteminfo.Intro = Utils.ClearHtml(KSCMS.S("Intro"));
        }
        else
        {
            __iteminfo.Intro = Utils.RemoveXss(KSCMS.S("Intro"));
        }


        string ats = string.Empty;
        for (int ii = 1; ii <= 7; ii++)
        {
            ats += Utils.StrToInt(KSCMS.S("attribute" + ii), 0);
        }
        __iteminfo.Attribute = ats;
        __iteminfo.DefaultPic = Utils.RemoveXss(KSCMS.S("defaultpic"));

        __iteminfo.KeyTags = Utils.RemoveXss(KSCMS.S("KeyTags"));
        __iteminfo.Hits = Utils.StrToInt(KSCMS.S("hits"));
        __iteminfo.CopyFrom =Utils.RemoveXss(KSCMS.S("copyfrom"));

        __iteminfo.Author = Utils.RemoveXss(KSCMS.S("author"));
        __iteminfo.Inputer = KSCMS.GetCookie("User", "UserName");
        try
        {
            __iteminfo.AddDate = Convert.ToDateTime(KSCMS.S("adddate"));
        }
        catch
        {
            __iteminfo.AddDate = DateTime.Now;
        }



        int verify = Utils.StrToInt(KSCMS.S("Verify"));
        if (MyCache.GetCacheModel(ChannelID, 26) == "1" && verify == 0) verify = 1;
        if (infoID != 0)
        {
            if (MyCache.GetCacheModel(ChannelID, 28) == "1")
                verify = 0;
            else
                verify = Utils.StrToInt(KSCMS.S("Verify"));
        }
        if (Utils.StrToInt(UserGroupManage.GetGroupSettings(15)) == 1 && verify==0) //用户组设置不需要审核
        {
            verify = 1;
        }
        __iteminfo.Verify = verify;
        __iteminfo.RefreshTF = Utils.StrToInt(KSCMS.S("RefreshTF"));

        __iteminfo.TemplateFile = MyCache.GetCacheClass(ClassID, 11);
        __iteminfo.Template3GFile = MyCache.GetCacheClass(ClassID, 34);



        if (KSCMS.S("TurnUrlTF") == "1")
        {
            __iteminfo.TurnUrl = KSCMS.S("TurnUrl");
        }
        else
        {
            __iteminfo.TurnUrl = "";
        }
        __iteminfo.ProvinceID = Utils.StrToInt(KSCMS.S("ProvinceID"));
        __iteminfo.CityID = Utils.StrToInt(KSCMS.S("CityID"));
        __iteminfo.CountyID = Utils.StrToInt(KSCMS.S("CountyID"));
        __iteminfo.Priority = 0;
        __iteminfo.InfoPurView = 0;
        __iteminfo.ArrGroupID = "0";
        __iteminfo.ReadPoint = Utils.StrToInt(KSCMS.S("ReadPoint"));
        __iteminfo.ChargeType = 0;
        __iteminfo.PitchTime = 0;
        __iteminfo.ReadTimes = 0;
        __iteminfo.DividePercent = 0;
        __iteminfo.InfoID = infoID;

        if (infoID == 0)
        {
            int NewInfoID = 0;
            string rastr = ContentItemManage.CreateContentItem(ref __iteminfo, ref NewInfoID);

            switch (rastr)
            {
                case "success":

                    #region 写入信息数据库操作
                    ContentManage.CreateContent(NewInfoID, __modelinfo,__iteminfo);
                    Kesion.APPCode.Public.UserGroupUpdate(new TemporaryVar().UserID);
                    #endregion

                    #region 下载模型
                    if (__modelinfo.BasicType.Equals(3))
                    {
                        DownParamInfo _downparaminfo = new DownParamInfo();
                        _downparaminfo.InfoID = NewInfoID;
                        _downparaminfo.Category = KSCMS.S("Category");
                        _downparaminfo.Language = KSCMS.S("Language");
                        _downparaminfo.Authorization = KSCMS.S("authorization");
                        // _downparaminfo.FileSize = this.FileSize.Text;
                        //_downparaminfo.PlatForm = this.PlatForm.Text;
                        DownParamManage.CreateDownParam(ChannelID, _downparaminfo);
                    }
                    #endregion



                    int score = Utils.StrToInt(MyCache.GetCacheClass(ClassID, 33)) * Utils.StrToInt(UserGroupManage.GetGroupSettings(UserManage.GetUserInfo().GroupID, 13));
                    double point = Utils.StrToFloat(MyCache.GetCacheClass(ClassID, 32)) * Utils.StrToInt(UserGroupManage.GetGroupSettings(UserManage.GetUserInfo().GroupID, 14));

                    if (score < 0)  //消费积分
                    {
                        if (DataFactory.Exists("KS_Admin", "userid=" + new TemporaryVar().UserID + "") == false)  //非管理员发的稿件才赠送积分
                        {
                            Charge.ScoreInOrOut(ChannelID, NewInfoID, new TemporaryVar().UserID, 2, -score, "system", "发表稿件[" + __iteminfo.Title + "]消费!");
                        }
                    }
                    if (point < 0)
                    {
                        if (DataFactory.Exists("KS_Admin", "userid=" + new TemporaryVar().UserID+ "") == false)  //非管理员发的稿件才赠送积分
                        {
                            Charge.PointInOrOut(ChannelID, NewInfoID, new TemporaryVar().UserID, 2, -point, "system", "发表稿件[" + __iteminfo.Title + "]消费!");
                        }
                    }


                    if (__iteminfo.Verify == 1)
                    {
                        DoRefresh(__iteminfo.ClassID,NewInfoID);
                        BaseFun.CountClassInfoNum(ClassID);
                        Kesion.APPCode.Public.SignUserInfoOK(ClassID, NewInfoID, ChannelID, __iteminfo.Inputer, __iteminfo.Title);
                    }

                    Msg.Confirm("恭喜,添加成功,继续添加吗？", "top.location.href='"+BasicField.GetUserUrl("content/PostInfo","ClassID-" + ClassID)+"';", "top.location.href='"+BasicField.GetUserUrl("content/PostManage")+"';");
                    //success(NewInfoID);

                    break;
                case "failadddate":
                    Msg.Alert("日期格式不正确！");
                    break;
            }
        }
        else
        {
            string restr = ContentItemManage.UpdateContentItem(__iteminfo);
            if (restr.Equals("success"))
            {


                #region 进行写数据库操作
                ContentManage.UpdateContent(__modelinfo,infoID,__iteminfo);
                #endregion


                #region 下载模型
                if (__modelinfo.BasicType.Equals(3))
                {
                    DownParamInfo _downparaminfo = new DownParamInfo();
                    _downparaminfo.InfoID = infoID;
                    _downparaminfo.Category = KSCMS.S("Category");
                    _downparaminfo.Language = KSCMS.S("Language");
                    //_downparaminfo.Authorization = KSCMS.S("authorization");
                    //_downparaminfo.FileSize = this.FileSize.Text;
                    //_downparaminfo.PlatForm = this.PlatForm.Text;
                    DownParamManage.CreateDownParam(ChannelID, _downparaminfo);
                }
                #endregion

                if (__iteminfo.Verify == 1)
                {
                    DoRefresh(__iteminfo.ClassID, infoID);
                }
                else
                {
                    DataFactory.ExecuteNonQuery("Update KS_InfoList Set IsTips=0 Where InfoID=" + infoID);
                }

                Msg.Alert("恭喜修改成功！", BasicField.GetUserUrl("content/postmanage"));

            }

        }
        #endregion
    }

    /// <summary>
    /// 如果审核通过，则自动生成HTML
    /// </summary>
    /// <param name="classID"></param>
    /// <param name="infoId"></param>
    private void DoRefresh(int classID,int infoId)
    {
        #region 生成HTML
        if (MyCache.GetCacheClass(classID, 6) == "1")
        {
        }
        else
        {

            Kesion.RefreshHtml.RefreshProcess rp = new Kesion.RefreshHtml.RefreshProcess();
            rp.RefreshType = Kesion.RefreshHtml.RefreshProcess.RefreshTypes.RefreshContent;
            rp.RefreshOrder = Kesion.RefreshHtml.RefreshProcess.RefreshOrders.RefeshBySingleID;
            rp.ModelID = ChannelID;
            rp.InfoID = infoId;
            rp.StartRefresh();
        }
        #endregion
    }

</script>
<%
    if (!isLoadPage) return;
%>
 <div class="r_tybox nomar">
<%if (ClassID == 0)
    { %>
<input type="hidden" id="classid" name="classid" value="0"/>
       <div class="r_title r_title_color">选择发布栏目</div>
    <table class="border" cellspacing="2" cellpadding="1" width="96%" align="center" border=0>
    
      <tr>
          <td style="padding-left:5px;height:320px;border-bottom:0px;">
             <style>
                  #loadclass li.select_list{width:190px; background:#fff; text-align:left;margin-left:20px; float:left;height:300px; overflow-x:hidden; overflow-y:auto;border:1px solid #d0d6dc}
				  #loadclass li.select_list li{ cursor:pointer; padding-left:20px;height:30px; line-height:30px;}
				  #loadclass li.select_list li.curr{ background:#E6F2FB}
				  #loadclass li.select_list li:hover{ background:#f4f7f9;}
				  .hover_tips_cont{ padding-left:10px;}
              </style>
            <div>
                <ul id="loadclass"></ul>
            </div>
          </td>
      </tr>
      <tr>
          <td style="padding-left:15px;">
             <div style="margin-top:10px;display: block; clear:both;" class="tips_choice">
                    <span class="tips_zt"></span>
                    <dl class="hover_tips_cont">
                        <dt id="commodityspan">
                            <span style="color:#F00;">请选择栏目</span>
                        </dt>
                        <dt class="current_sort" style="font-weight:bold;display: none;" id="commoditydt">您当前选择的栏目是：</dt>
                        <dd id="commoditydd"></dd>
                    </dl>
                </div>
          </td>
      </tr>
 
      <tr>
          <td style="height:50px;padding-left:25px;border-bottom:0"><input type="button" onclick="return(checknext())"class="button" value=" 下一步 " /></td>
      </tr>
    </table>

       

    <script>
        $(document).ready(function () {
            loadClass(0,1);
        });
        function loadClass(id, depth) {
            jQuery.get("/plus/ajaxs.ashx", { a: "getinputclass", rnd:Math.random(),classid: id },
				  function (data) {
				      $("#loadclass").find("li").each(function () {
				          if ($(this).attr("depth")> depth) {
				              $(this).remove();
				          }
				      });
				      if (data != '') {
				          $("#loadclass").append(data);
				        //  autoIframeHeight();
				      }
				  });
        }
        function changeclass(id, parentid, depth) {
            $("#commodityspan").hide();
            $("#commoditydt").show();
            $("#commoditydd").show();

            $("#classid").val(id);
            $("#loadclass").find("li[depth=" + depth + "]").removeClass("curr");
            $("#loadclass").find("li[value=" + id + "]").addClass("curr");
            loadClass(id, depth);
            var tips = '';
            $("#loadclass").find("li.curr").each(function () {
                if (tips == '') {
                    tips = $(this).html();
                } else {
                    tips +=" -> "+ $(this).html();
                }
            });
            $("#commoditydd").html(tips);
        }
        function checknext() {
            var classid = $("#classid").val();
            if ($("#m" + classid)[0] != undefined) {
                KesionJS.Alert("请选择您好要发布分类！");
                return false;
            }
             var postUrl = '<%=BasicField.GetUserUrl("content/postinfo")%>';
             postUrl += ",classId-" + classid;
            location.href = postUrl;
        }
    </script>
<%}
    else
    {

        Kesion.APPCode.EditorAPI.EchoHead();
        %>
            <script type="text/javascript" src="<%=ResolveUrl("~/ks_inc/DatePicker/WdatePicker.js") %>"></script>
       <script>
        function GetKeyTags() {
            var text = escape(jQuery('#Title').val());
            if (text != '') {
                jQuery('#KeyTags').val('请稍等,系统正在自动获取tags...').attr("disabled", true);
                jQuery.get("/plus/ajaxs.ashx", { a: "GetTags", text: text },
				  function(data) { jQuery('#KeyTags').val(unescape(data)).attr("disabled", false); });
            } else { KesionJS.Alert('对不起,请先输入标题!',"jQuery('#Title').focus();"); }
        }
        //加载文档
        function LoadItemInfo(objId, classID, channelId, infoId) {
            $.ajax({
                type: "POST",
                url: "/plus/Ajaxs.ashx",
                data: "classid=" + classID + "&a=LoadItemInfo&channelid=" + channelId + "&infoid=" + infoId,
                success: function (data) {
                    $("#" + objId).empty().append(unescape(data));
                }
            });
        }
   
    </script>
      <KS:ModelJS ID="ModelJS1" runat="server" />
       <%if (ChannelID >= 2)
      {%>
             <script>
                 var post_params = { "username": "<%=Kesion.Publics.KSCMS.GetCookie("User","username") %>", "password": "<%=Kesion.Publics.KSCMS.GetCookie("User","password") %>", "CreateThumbs": 1, "ChannelID": 2, "AutoRename": 4, "addwatermark": "1", "fieldid": "-1", "upbyswf": 1 };
             </script>
             <%}%>
         <%=JSStr %>
        <iframe src="about:blank" name="hidframe" style="display:none;width:0px;height:0px"></iframe>
       <form name="myform" action="{$GetCurrUrl}" method="post" id="myform" target="hidframe">
        <input type="hidden" name="action" value="dosave"/>

     <%
        using (DataTable dt = MyCache.GetCacheFieldGroupTable())
        {
            DataView dv = dt.DefaultView;
            dv.RowFilter = "channelid =" + ChannelID;
            DataTable newDt = dv.ToTable();
            if (newDt.Rows.Count<=0)
            {
                Msg.Alert("加载出错啦！请联系管理员！");
                return;
            }else
            {
                foreach(DataRow dr in newDt.Rows)
                {
                    %>
                    <table class="border" width="98%" align=center border=0>
                      <tr class="title">
                         <td align="left " colspan="2"><%=dr["GroupName"].ToString() %></td>
                       </tr>

                    <%
                                    string GroupId = Convert.ToString(dr["ID"].ToString());


                                    DataSet ds = XmlObject.StringToDataSet(fieldsxml);

                                    DataTable dtf = ds.Tables[0];
                                    DataView dvf = dtf.DefaultView;
                                    dvf.RowFilter = "groupid=" + GroupId;
                                    DataTable dtt = dvf.ToTable();
                                    foreach(DataRow drr in dtt.Rows)
                                    {
                                        MyUserFields field = new MyUserFields();
                                        field.ModelID = ChannelID.ToString();
                                        field.ClassID = ClassID.ToString();
                                        field.FieldID = drr["name"].ToString();
                                        field.ParentFieldID = drr["ParentFieldID"].ToString();
                                        field.FieldAlias = drr["FieldAlias"].ToString();
                                        field.FieldType = drr["FieldType"].ToString();
                                        field.Disabled = drr["Disabled"].ToString();
                                        field.FieldWidth = drr["FieldWidth"].ToString();
                                        field.FieldHeight = drr["FieldHeight"].ToString();
                                        field.Options = drr["Options"].ToString();
                                        field.Tips = drr["Tips"].ToString();
                                        field.DefaultValue = drr["DefaultValue"].ToString();
                                        field.ToolBar = drr["ToolBar"].ToString();
                                        field.ContributionItem = drr["ContributionItem"].ToString();
                                        field.MustFillItem = drr["MustFillItem"].ToString();
                                        KSCMS.W(field.Render());
                                    }

                                }

                            }
                        }


        %>

               <tr class="tdbg">
	                <td class="lefttd" style="text-align:right;">售 价：</td>
	                <td class="list_right_box">
                      <input type="text" name="ReadPoint" class="textbox" value="<%=ReadPoint %>" style="text-align:center;width:50px;" />
                        <%=Kesion.Cache.MyCache.GetCacheConfig(50) %> <span class="tips">免费阅读请设为 "<span style="color:red">0</span>"。</span>
	                 </td>
                </tr>
         
              <tr class="tdbg">
	                <td class="lefttd" style="text-align:right;">状 态：</td>
	                <td class="list_right_box">
                           <input type="radio" value="0" name="Verify"<%=Verify==0?" checked":string.Empty %> />投搞
                           <input type="radio" value="2" name="Verify" <%=Verify==1?" checked":string.Empty %>/>草稿

	                 </td>
                </tr>
         </table>
      <div class="cz_btn t-a-center" align="center" style="padding-bottom:20px;">
                 <input type="submit" ID="BtPostInfo" class="green-bt d-inline-block"  value="确定发布" onclick="return (CheckForm())"/>
             
         </div>
         
         <style>
		     table.border td[width="11%"]{ white-space:nowrap}
			 table.border .lefttd {width: 18% !important;}	 
			 .thumbshow{float:left}
			 .thumbshow img{width:250px;height:360px;overflow: hidden}	
		 </style>
  </form>

<%} %>
</div>
<script>
    var box1 = '';
</script>