<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeBehind="Modify.aspx.cs" Inherits="Maticsoft.Web.paperName.Modify" Title="修改新闻"
    ValidateRequest="false" %>

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

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

    <script language="javascript" type="text/javascript">
       var checkPaperName={
   
     change:function()
    {      
       
       
        Ajaxs.GET("ajax/updatepaperName.aspx?paperName="+escape(document.getElementById("<%=txtpName.ClientID %>").value)+"&id="+document.getElementById("ctl00$ContentPlaceHolder1$HiddenField1").value,checkPaperName.show);
    },
    show:function (req)
    { 
        var str=req.responseText;
  
    checkPaperName.get(str);
    },
    get:function(str)
    {
    if(str!="")
    {
    document.getElementById("pName").innerHTML=str;
    document.getElementById("<%=txtpName.ClientID %>").value="";
    document.getElementById("<%=txtpName.ClientID %>").focus();
    }
    else
    {
     document.getElementById("pName").innerHTML="该名称可用";
    }
    }
    }
function Reset1_onclick() {

document.getElementById("<%=txtpEName.ClientID %>").value="";
document.getElementById("txtpRemark1").value="";

document.getElementById("<%=txtpLocation.ClientID %>").value="";
document.getElementById("<%=txtpArea.ClientID %>").value="";
document.getElementById("<%=txtpProperties.ClientID %>").value="";
document.getElementById("<%=txtpUrl.ClientID %>").value="";
document.getElementById("<%=txtpSubscriptionNUM.ClientID %>").value="";
document.getElementById("<%=txtpPublishNUM.ClientID %>").value="";

document.getElementById("<%=txtpCopName.ClientID %>").value="";
document.getElementById("<%=txtpCopPhone.ClientID %>").value="";
document.getElementById("<%=txtpAdPhone.ClientID %>").value="";
document.getElementById("<%=txtpPostCode.ClientID %>").value="";
document.getElementById("<%=txtpAddress.ClientID %>").value="";
document.getElementById("<%=txtpPrice.ClientID %>").value="";
}
function check()
{
if(document.getElementById("<%=txtpName.ClientID %>").value=="")
{
alert("请填写报纸名称!");
return false;
}
if(document.getElementById("<%=txtpEName.ClientID %>").value=="")
{
alert("请填写报纸英文名称!");
return false;
}
if(document.getElementById("<%=txtpLocation.ClientID %>").value=="")
{
alert("请填写报纸所属地!");
return false;
}

if(document.getElementById("<%=txtpPrice.ClientID %>").value!="")
{
if(isNaN( document.getElementById("<%=txtpPrice.ClientID %>").value)){

alert("零售价无效!");
return false;
}
}
}
function getTem(tem)
{
document.getElementById("<%=HiddenField_tem.ClientID %>").value=tem;
}
    </script>

    <style type="text/css">
        BODY
        {
            margin: 0px;
        }
    </style>
    <table cellspacing="0" cellpadding="0" width="99%" align="center" border="0">
        <tbody>
            <tr>
                <td>
                    <fieldset>
                        <legend class="tt1">报纸修改</legend>
                        <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#a4b6d7">
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    报纸名称：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpName" runat="server" Width="200px" Enabled="false"></asp:TextBox>
                                    <div id="pName">
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    英文名称：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpEName" runat="server" Width="200px" onblur="checkPaperName.change(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    简介：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <input type="hidden" name="txtpRemark1" id="txtpRemark1" value="" />
                                    <iframe id="myiframe" src="Edit/editor.htm?id=txtpRemark1&ReadCookie=0" frameborder="0"
                                        scrolling="no" width="640" height="460"></iframe>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    &nbsp;报纸类别：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                     <asp:DropDownList ID="drpType" runat="server">
                                          <asp:ListItem Selected="True">投资理财</asp:ListItem>
                                        <asp:ListItem>IT数码</asp:ListItem>
                                        <asp:ListItem>汽车旅游</asp:ListItem>
                                        <asp:ListItem>精英地带</asp:ListItem>
                                        <asp:ListItem>体育娱乐</asp:ListItem>
                                        <asp:ListItem>时尚生活</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    所属地：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpLocation" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    发行地：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpArea" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    报纸属性：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpProperties" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    是否是报纸：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Selected="True" Value="true">是</asp:ListItem>
                                        <asp:ListItem Value="false">否</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    前台浏览方式：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:RadioButtonList ID="radScan" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Selected="True" Value="普通">普通</asp:ListItem>
                                        <asp:ListItem Value="flash">flash</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td width="35%" height="25" align="right" bgcolor="#ecf5ff">
                                    应用模板:
                                </td>
                                <td height="25" align="left" bgcolor="#FFFFFF">
                                    <table>
                                        <tr>
                                            <td>
                                                <img src="../../Images/模板一.jpg" width="150px" height="100px" />
                                                <br />
                                                <asp:RadioButton ID="RadioButton1" runat="server" GroupName="radTemplt" Text="模板一"
                                                    Checked="True" onclick="getTem('show.aspx')" />
                                            </td>
                                            <td>
                                                <img src="../../Images/模板二.jpg" width="150px" height="100px" />
                                                <br />
                                                <asp:RadioButton ID="RadioButton2" runat="server" GroupName="radTemplt" Text="模板二"
                                                    onclick="getTem('SimpleShow.aspx')" />
                                            </td>
                                            <td>
                                                <img src="../../Images/模板三.jpg" width="150px" height="100px" />
                                                <br />
                                                <asp:RadioButton ID="RadioButton3" runat="server" GroupName="radTemplt" Text="模板三"
                                                    onclick="getTem('BlackShow.aspx')" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <img src="../../Images/模板四.jpg" width="150px" height="100px" />
                                                <br />
                                                <asp:RadioButton ID="RadioButton4" runat="server" GroupName="radTemplt" Text="模板四"
                                                    onclick="getTem('red_show.aspx')" />
                                            </td>
                                            <td>
                                                <img src="../../Images/模板五.jpg" width="150px" height="100px" />
                                                <br />
                                                <asp:RadioButton ID="RadioButton5" runat="server" GroupName="radTemplt" Text="模板五"
                                                    onclick="getTem('blue_show.aspx')" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td width="35%" height="25" align="right" bgcolor="#ecf5ff">
                                    显示顺序:
                                </td>
                                <td height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtorderNum" runat="server">50</asp:TextBox><span style="color: Red;">请填写数字,数字越小,表示显示的顺序越靠前</span>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    是否开通打分和评论：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:RadioButtonList ID="RadioButtonList2" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Selected="True" Value="true">是</asp:ListItem>
                                        <asp:ListItem Value="false">否</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    官方网站：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpUrl" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    邮局订阅代号：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpSubscriptionNUM" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    出版编号：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpPublishNUM" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    出版单位：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpCopName" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    联系电话：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpCopPhone" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    广告电话：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpAdPhone" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    邮政编码：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpPostCode" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    报刊地址：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpAddress" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    零售价：
                                </td>
                                <td width="*" height="25" align="left" bgcolor="#FFFFFF">
                                    <asp:TextBox ID="txtpPrice" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="30%" height="25" align="right" bgcolor="#ecf5ff">
                                    添加人：
                                </td>
                                <td width="*" 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" OnClientClick="check()" Text="提交" OnClick="btnAdd_Click"
                                            CssClass="button2"></asp:Button>
                                        <input id="Reset1" type="button" value="重填" class="button2" onclick="return Reset1_onclick()" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
        </tbody>
    </table>
    <asp:HiddenField ID="HiddenField1" runat="server" />
    <asp:HiddenField ID="HiddenField2" runat="server" />
    <asp:HiddenField ID="HiddenField_tem" runat="server" />

    <script language="javascript" type="text/javascript">
    document.getElementById("txtpRemark1").value=document.getElementById("<%=HiddenField2.ClientID %>").value
    </script>

</asp:Content>
