<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeBehind="Modify.aspx.cs" Inherits="Maticsoft.Web.B.Modify" Title="修改期刊" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script src="../../js/Common.js" type="text/javascript"></script>

    <style type="text/css">
        BODY
        {
            margin: 0px;
        }
    </style>

    <script language="javascript" type="text/javascript">
   function showMap()
   {
 
    window.open("map.aspx?pic="+escape(document.getElementById("<%=HiddenField2.ClientID %>").value)+"&paperName="+escape(document.getElementById("<%=DropDownList1.ClientID %>").value)+"&qnum="+document.getElementById("<%=txtQnum.ClientID %>").value+"&pageNum="+document.getElementById("<%=txtPageNum.ClientID %>").value);
 
   }
   
   	function showBtype()
	{
	
	var strUrl="ajax/getBtype.aspx?paperName="+escape(document.getElementById("<%=DropDownList1.ClientID %>").value);
		Ajaxs.GET(strUrl,showtypeexist);
		
	}
	function showtypeexist(req)
	{
	
		var text = req.responseText;
		var text1=text.split("|");
		
		
	
		document.getElementById("<%=HiddenField3.ClientID %>").value=text1[1];
		document.getElementById("<%=HiddenField_scan.ClientID %>").value=text1[2];
		var d = text1[0].split(',');
		
		document.getElementById("<%=DropDownList2.ClientID %>").options.length=0;
$("<%=DropDownList2.ClientID %>").options.add(new Option( "",""));
		
		for (i=0;i<d.length;i++)
		{
		if(d[i]!=""){
		$("<%=DropDownList2.ClientID %>").options.add(new Option( d[i],d[i]));
		}
		}
		document.getElementById("<%=HiddenField2.ClientID %>").value=document.getElementById("<%=DropDownList2.ClientID %>").value;
		
		
		
	
	
	}
   function showDiv(type1)
   {
  
     var type=type1.value;
    
     if(type=="true")
     {
     document.getElementById("<%=adDiv.ClientID %>").style.display="";
     }else
     {
      document.getElementById("<%=adDiv.ClientID %>").style.display="none";
     }
   }
   
   var flag=false; 
function DrawImage(ImgD){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
flag=true; 
if(image.width/image.height>= 360/220){ 
if(image.width>360){ 
ImgD.width=360; 
ImgD.height=(image.height*220)/image.width; 
}else{ 
ImgD.width=image.width; 
ImgD.height=image.height; 
} 
/*ImgD.alt="bigpic" */ 
} 
else{ 
if(image.height>220){ 
ImgD.height=220; 
ImgD.width=(image.width*220)/image.height; 
}else{ 
ImgD.width=image.width; 
ImgD.height=image.height; 
} 
/*ImgD.alt="bigpic" */ 
} 
} 
} 

    </script>

    <table cellspacing="0" cellpadding="0" width="99%" align="center" border="0">
        <tbody>
            <tr>
                <td>
                    <fieldset>
                        <legend class="tt1">期刊修改</legend>
                        <table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#a4b6d7">
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    所属报纸：
                                </td>
                                <td height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:DropDownList ID="DropDownList1" runat="server" onchange="showBtype()">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    版面名称：
                                </td>
                                <td height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:DropDownList ID="DropDownList2" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    期号：
                                </td>
                                <td height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtQnum" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    版面号码：
                                </td>
                                <td height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtPageNum" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="25" width="25%" align="right" bgcolor="#ecf5ff">
                                    是否是首页：
                                </td>
                                <td align="left" valign="middle" bgcolor="#FFFFFF">
                                    <asp:RadioButtonList Height="20" BorderWidth="0" CellPadding="0" CellSpacing="0"
                                        ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Selected="True" Value="true" Text="是"></asp:ListItem>
                                        <asp:ListItem Value="false" Text="否"></asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    &nbsp;
                                </td>
                                <td height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:Image ID="Image1" runat="server" ImageAlign="Baseline" />
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    热点图片：
                                </td>
                                <td height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:Label ID="lblinfo" runat="server">
                                        <asp:FileUpload ID="uploadfile" runat="server" />
                                        <asp:Button ID="ButUpload" runat="server" OnClick="Button1_Click" Text="上传" OnClientClick="parent.document.all('divProcessing').style.display='';" />
                                        <asp:Label ID="info" runat="server"></asp:Label></asp:Label>
                                    (图片大小:800*1078)
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" bgcolor="#FFFFFF" valign="top">
                                    <div id="adDiv1" runat="server">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#a4b6d7">
                                            <tr>
                                                <td width="25%" height="25" align="right" bgcolor="#ECF5FF">
                                                    是否是广告：
                                                </td>
                                                <td height="25" width="75%" align="left" bgcolor="#FFFFFF">
                                                    <%--  <asp:RadioButtonList ID="radIsad" runat="server" RepeatDirection="Horizontal" onClick="showDiv()">
                                        	<asp:ListItem Value="true" Text="是"></asp:ListItem>
                                        	<asp:ListItem Value="false" Text="否" Selected="True"></asp:ListItem>
                                    		</asp:RadioButtonList>--%>
                                                    <input type="radio" id="rad1" name="rad" value="true" runat="server" onclick="showDiv(this)" />是<input
                                                        type="radio" id="rad2" name="rad" value="false" runat="server" onclick="showDiv(this)" />否
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" bgcolor="#FFFFFF">
                                    <div id="adDiv" runat="server" style="display: none;">
                                        <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4b6d7">
                                            <tr>
                                                <td height="25" width="25%" align="right" bgcolor="#ecf5ff">
                                                    &nbsp;
                                                </td>
                                                <td height="25" align="left" bgcolor="#FFFFFF">
                                                    <asp:Image ID="Image2" runat="server" ImageAlign="Baseline" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td height="25" width="25%" align="right" bgcolor="#ecf5ff">
                                                    广告图片：
                                                </td>
                                                <td height="25" align="left" bgcolor="#FFFFFF">
                                                    <asp:Label ID="Label1" runat="server">
                                                        <asp:FileUpload ID="FileUpload1" runat="server" />
                                                        <asp:Button ID="Button1" runat="server" OnClick="Button3_Click" Text="上传" />
                                                        <asp:Label ID="Label2" runat="server"></asp:Label></asp:Label>
                                                    (图片大小:133*50)
                                                </td>
                                            </tr>
                                            <tr>
                                                <td height="25" width="25%" align="right" bgcolor="#ecf5ff">
                                                    文章名称：
                                                </td>
                                                <td height="25" align="left" bgcolor="#FFFFFF">
                                                    <asp:TextBox ID="title" runat="server" Width="200px"></asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    PDF文件地址：
                                </td>
                                <td width="75%" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtscoreNum" runat="server" Width="200px" ReadOnly="true"></asp:TextBox>
                                    <input id="Button2" type="button" value="上传" 
                                        class="button2"   disabled="disabled"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    关键字：
                                </td>
                                <td width="75%" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtkeyWords" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    发行日期：
                                </td>
                                <td width="75%" height="25" align="left" bgcolor="#FFFFFF">
                                    <input name="b_name" id="txtreferDate" size="12" onfocus="calendar();" type="text"
                                        runat="server">
                                </td>
                            </tr>
                            <tr>
                                <td width="25%" height="25" align="right" bgcolor="#ecf5ff">
                                    添加人：
                                </td>
                                <td width="75%" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtaddName" runat="server" Width="200px" ReadOnly="True"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="35" colspan="2" bgcolor="#FFFFFF">
                                    <div align="center">
                                        <asp:Button ID="btnAdd" runat="server" Text="提交" OnClick="btnAdd_Click" CssClass="button2">
                                        </asp:Button>
                                        <input id="Reset1" type="reset" value="重填" runat="server" class="button2" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
        </tbody>
    </table>
    <asp:HiddenField ID="HiddenField1" runat="server" />
    <asp:HiddenField ID="HiddenField2" runat="server" />
    <asp:HiddenField ID="HiddenField4" runat="server" />
    <asp:HiddenField ID="HiddenField3" runat="server" />
    <asp:HiddenField ID="HiddenField5" runat="server" />
    <asp:HiddenField ID="HiddenField6" runat="server" />
    <asp:HiddenField ID="HiddenField_largerPic" runat="server" />
    <asp:HiddenField ID="HiddenField_smallPic" runat="server" />
    <asp:HiddenField ID="HiddenField_scan" runat="server" />
    <asp:HiddenField ID="HiddenField_specialRole" runat="server" />
    <asp:HiddenField ID="HiddenField_qnum" runat="server" />
</asp:Content>
