<%@ Page Language="C#" MasterPageFile="Admin.Master" AutoEventWireup="true" CodeBehind="Editionedit.aspx.cs" Inherits="Mvcb2b.admin.Editionedit" Title="用户修改" ValidateRequest="false" %>
<%@ MasterType VirtualPath="Admin.Master" %>
<%@ Register src="controls/Uponenopostpic.ascx" tagname="Uponenopostpic" tagprefix="uc1" %>
<%@ Register src="controls/Upmappic.ascx" tagname="Upmappic" tagprefix="uc2" %>
<%--@ Register src="controls/news/Eachqiselect.ascx" tagname="Eachqiselect" tagprefix="uc3" --%>
<%@ Register src="controls/Pageclass.ascx" tagname="Pageclass" tagprefix="uc4" %>
<%@ Register src="controls/Date_Qi.ascx" tagname="Date_Qi" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
    $(document).ready(function () {
        var $dt = $('#banmianpic .dt');
        var $dd = $('#banmianpic .dd');
        $dt.each(function (n) {
            $(this).click(function () { /*点击时运行的函数*/
                if ($(this)[0].checked) {
                    var nowobj = $(this)[0];
                    $dt.each(function (j) {
                        if ($(this)[0] != nowobj) {
                            $(this)[0].checked = false;
                        }
                    });
                    $dd.slideUp(); /*全部关闭*/
                    $($dd[n]).slideDown();
                }
            });
        });

        $("#<%=ismany_txt.ClientID%>").click(function () {
            if (document.getElementById("<%=ismany_txt.ClientID%>").checked)
                window.frames['ifrmap'].document.getElementById("pictype").value = "many";
            else
                window.frames['ifrmap'].document.getElementById("pictype").value = "jpg";
        });

    });
    function Win_open(link) {
        window.open(link, '', 'top=200,left=450,width=550,height=380,scrollbars=yes,resizable=yes');
    }
    function checkform() {
        if (typeof (Page_ClientValidate) == 'function') {
            if (Page_ClientValidate())    //(Page_ClientValidate())
            {
                if (document.getElementById("qi_sel").value == "" || document.getElementById("qi_sel").value == null) {
                    alert("刊期不能为空！");
                    return false;
                }
                if (document.getElementById("selpage0").value == "" || document.getElementById("selpage0").value == null) {
                    alert("-版面不能为空！");
                    return false;
                }
            }
        }
    }
</script>
<div class="path">当前位置： <%=Data.Bkname %> >>  <%=Mvcbll.Share.BkType.Pagename%>修改</div>
<h3><asp:Literal  ID="Literal1" runat="server"></asp:Literal></h3>
<table width="92%" border="0" class="editor" align="center" style="background-color:#f5f5f5;" cellpadding="3" cellspacing="1">     
<tr><td width="120" align="right">选择期号：</td><td><uc1:Date_Qi ID="Date_Qi1" runat="server" />&nbsp; <span style="color:#ccc;">&nbsp; *为必填</span> </td></tr>   
<tr><td align="right">选择<%=Mvcbll.Share.BkType.Pagename%>：</td><td><uc4:Pageclass ID="Pageclass1"   runat="server" /></td></tr>
<tr><td align="right"></td><td>本期第<asp:TextBox ID="numberid_txt" runat="server" Text="" Width="30px"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="版面编号不能为空" Display="None" ControlToValidate="numberid_txt"></asp:RequiredFieldValidator>
             <asp:comparevalidator id="comparevalidator2" runat="server" ErrorMessage="本期第多少版只能为数字!" ControlToValidate="numberid_txt" Display="None" Type="Integer" Operator="DataTypeCheck"></asp:comparevalidator><%=Mvcbll.Share.BkType.Pgname%>  &nbsp;<span style="color:#ccc;">前台按此编号排序</span>  <span style="color:red;font-size:13px;"> * </span></td></tr>
<tr><td align="right"><span style="color: Red">*</span>版面标题：</td><td><asp:TextBox ID="pagetitle_txt" runat="server" Text="" Width="120px"></asp:TextBox> <span style="color:red;font-size:13px;"> *  导读与索引 如：激光专栏</span></td></tr>
<%
    string css = "";
    if (Data.ProductType <3)
        css = "style=\"display:none;\""; %>
<tr <%=css%>><td align="right">属性：</td><td><asp:CheckBox ID="ismany_txt" runat="server" />复合版面（连版）  <span style="color:Gray;">(如果为复合版面，请先选择此属性，再上传版面图片)</span></td></tr>
<tr>
<td align="right"><%=Mvcbll.Share.BkType.Pagename%>图片：</td><td><uc2:Upmappic ID="Upmappic1"  runat="server" />
<div style="color:#333;padding-bottom:3px;">图片大小限制：宽<=<%=pwidth%>px*高<=<%=pheight%>px，小于或等于此规格图片程序将不再压缩处理；<br />
为保证图片质量，请先处理后再上传。</div>
</td></tr>
<tr><td align="right">&nbsp;</td><td><span style="color:red">如果已更新<%=Mvcbll.Share.BkType.Pagename%>图片，请手动及时更新图片热点编辑，并重新检查绘画热点是否越界或移位。</span></td></tr>
<tr><td align="right"><%=Mvcbll.Share.BkType.Pagename%>PDF：
<br /> （可为jpg格式） </td>
<td class="uprelative">

<%
    string _s1 = "";
    string _s3 = "";
    string _check1=" checked=\"checked\" ";
    string _check3 = " checked=\"checked\" ";
    if (isurl == true)
    {
        _check1 = "";
        _s1 = "seeno";
    }
    else
    {
        _check3 = "";
        _s3 = "seeno";
    }
        
     %>
<table width="100%" border="0" id="banmianpic" cellspacing="0" cellpadding="0">
  <tr>
    <td><input name="forpdf" id="forpdf1" type="checkbox" class="dt" <%=_check1 %> value="0" /> 直接上传</td>
  </tr>
  <tr id="forup1"  class="<%=_s1 %> dd">
    <td><uc1:Uponenopostpic ID="Uponenopostpic1"  runat="server" /></td>
  </tr>
  <tr>
    <td><input name="forpdf" id="forpdf2" type="checkbox" class="dt" value="1" /> 浏览已上传PDF文件
    <span style="color:Gray;">(可浏览用FTP软件批量上传的文件 如：Img/2011/10/a1.pdf)</span>
    </td>
  </tr>
  <tr id="forup2" class="seeno dd">
    <td>
    <div style="width:100%;height:24px;line-height:24px;">
    <div style="width:258px;float:left;"><input type="text" value="" name="pagepdf_txt2" style="width:250px;" id="pagepdf_txt2"  /></div>
    <div style="width:51px;float:left;"> <a class="browse" href="javascript:Win_open('FileBrowse.aspx');" title="点击此处浏览已上传到服务器文件.."><span>浏览</span></a></div>
    </div>
    <div id="pagepdf_txt2_img"></div>
    </td>
  </tr>
  <tr >
    <td><input name="forpdf" id="forpdf3" type="checkbox" <%=_check3 %> class="dt" value="2" /> 直接输入PDF文件网址</td>
  </tr>
  <tr id="forup3" class="<%=_s3 %> dd">
    <td><input type="text" value="<%=pdfurl %>" style="width:250px;" name="pdfurl_txt" id="pdfurl_txt"  /></td>
  </tr>
</table>

</td></tr>
<tr><td colspan="2" align="center"><asp:HiddenField ID="action_txt" runat="server" />
<asp:HiddenField ID="id_txt" runat="server" />
<asp:HiddenField ID="fromrefer" runat="server" />
<asp:HiddenField ID="old_qiid" runat="server" />
    <asp:Button ID="Add" runat="server" Text="修改" Width="58px"   onclick="Edit_Click" /> &nbsp;<asp:validationsummary id="ValidationSummary1"  runat="server" ShowMessageBox="True" ShowSummary="False"  ></asp:validationsummary> <input type="button" value="返回" name="go" style="width:58px;" onclick="javascript:history.go(-1);"  /></td></tr>
</table>
</asp:Content>
