<%@ page language="C#" autoeventwireup="true" inherits="admin_ad_Setad, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Import Namespace="D.Common" %>
<%@ Import Namespace="D.BLL" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link id="CssName" rel="stylesheet" type="text/css" runat="server" />

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

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

    <script src="../../js/lhgdialog/lhgcore.lhgdialog.min.js?self=true&skin=<%=Function.GetCssNameColor()%>" type="text/javascript"></script>

    <script>
        function SelType() {
            var TypeCount = document.getElementsByName("RadioShowType");
            var p = 0;
            if (navigator.appName == "Microsoft Internet Explorer") {
                p = 1;
            }
            for (var i = p; i < TypeCount.length; i++) {
                var DivType = eval("Div" + TypeCount[i].value);
                if (TypeCount[i].checked) {
                    DivType.style.display = "";
                }
                else {
                    DivType.style.display = "none";
                }
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> <a href="adzoneList.aspx">广告位列表</a> >> <a href="adList.aspx?ParentId=<%=Request.QueryString["ParentId"] %>">广告列表</a> >> 设置广告
            </td>
        </tr>
    </table>
    <table class="border" cellspacing="1" cellpadding="0" width="99%" border="0" align="center">
        <tr>
            <td class="bqleft">
                所属广告位：
            </td>
            <td class="bqright">
                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                广告名称：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtName" runat="server" CssClass="in1" Columns="35"></asp:TextBox><asp:TextBox
                    ID="FilePicPath" runat="server" Style="display: none">ad|0</asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                展现方式：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="RadioShowType" runat="server" RepeatDirection="Horizontal" onclick="SelType()">
                    <asp:ListItem Value="1" Selected="True">图片</asp:ListItem>
                    <asp:ListItem Value="2">Flash</asp:ListItem>
                    <asp:ListItem Value="3">文字</asp:ListItem>
                    <asp:ListItem Value="4">代码</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tbody id="Div1">
            <tr>
                <td class="bqleft">
                    广告内容：
                </td>
                <td class="bqright">
                    <table cellpadding="2" cellspacing="0" border="0" width="99%">
                        <tr>
                            <td class="bqleft">
                                图片地址：
                            </td>
                            <td class="bqright">
                                <asp:TextBox ID="txtImage" Columns="40" runat="server" CssClass="in1" style="float:left"></asp:TextBox><input
                                    type="button" value="上传图片" class="btn" onclick="WinOpenLhgDialog('上传图片','../common/uploadpic.aspx?ControlId=txtImage',620,280,'')"  style="float:left"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="bqleft">
                                图片链接：
                            </td>
                            <td class="bqright">
                                <asp:TextBox ID="txtImageUrl" Columns="50" runat="server" CssClass="in1" Text="http://"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="bqleft">
                                图片大小：
                            </td>
                            <td class="bqright">
                                宽度：<asp:TextBox ID="txtImageWidth" runat="server" CssClass="in1" Columns="5"></asp:TextBox>px
                                高度：<asp:TextBox ID="txtImageHeight" runat="server" CssClass="in1" Columns="5"></asp:TextBox>px
                            </td>
                        </tr>
                        <tr>
                            <td class="bqleft">
                                图片描述：
                            </td>
                            <td class="bqright">
                                <asp:TextBox ID="txtImageMemo" Columns="50" runat="server" CssClass="in1" MaxLength="200"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </tbody>
        <tbody id="Div2" style="display: none">
            <tr>
                <td class="bqleft">
                    广告内容：
                </td>
                <td class="bqright">
                    <table cellpadding="2" cellspacing="0" border="0" width="99%">
                        <tr>
                            <td class="bqleft">
                                Flash地址：
                            </td>
                            <td class="bqright">
                                <asp:TextBox ID="txtFlash" Columns="40" runat="server" CssClass="in1" style="float:left"></asp:TextBox><input
                                    type="button" value="上传Flash" class="btn" onclick="WinOpenLhgDialog('上传Flash文件','../common/uploadfile.aspx?ControlId=txtFlash',500,180,'')" style="float:left" />
                            </td>
                        </tr>
                        <tr>
                            <td class="bqleft">
                                Flash大小：
                            </td>
                            <td class="bqright">
                                宽度：<asp:TextBox ID="txtFlashWidth" runat="server" CssClass="in1" Columns="5"></asp:TextBox>px
                                高度：<asp:TextBox ID="txtFlashHeight" runat="server" CssClass="in1" Columns="5"></asp:TextBox>px
                            </td>
                        </tr>
                        <tr>
                            <td class="bqleft">
                                设为透明：
                            </td>
                            <td class="bqright">
                                <asp:RadioButtonList ID="RadioTransparent" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td class="bqleft">
                                右键菜单：
                            </td>
                            <td class="bqright">
                                <asp:RadioButtonList ID="RadioMenu" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="1" Selected="True">取消</asp:ListItem>
                                    <asp:ListItem Value="0">保留</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </tbody>
        <tbody id="Div3" style="display: none">
            <tr>
                <td class="bqleft">
                    广告内容：
                </td>
                <td class="bqright">
                    <table cellpadding="2" cellspacing="0" border="0" width="99%">
                        <tr>
                            <td class="bqleft">
                                文字内容：
                            </td>
                            <td class="bqright">
                                <asp:TextBox ID="txtText" Columns="40" runat="server" CssClass="in1"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="bqleft">
                                文字链接：
                            </td>
                            <td class="bqright">
                                <asp:TextBox ID="txtTextUrl" runat="server" CssClass="in1" Columns="45" Text="http://"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="bqleft">
                                链接样式：
                            </td>
                            <td class="bqright">
                                <asp:TextBox ID="txtTextClass" runat="server" CssClass="in1" Columns="15"></asp:TextBox>此处填写创建好的样式名称
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </tbody>
        <tbody id="Div4" style="display: none">
            <tr>
                <td class="bqleft">
                    广告内容：
                </td>
                <td class="bqright">
                    <asp:TextBox ID="txtCode" runat="server" Rows="10" TextMode="MultiLine" Columns="50"></asp:TextBox><br />
                    请填写广告代码，支持html代码
                </td>
            </tr>
        </tbody>
        <tr>
            <td class="bqleft">
                广告权重：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtPriority" runat="server" CssClass="in1" Text="1" Columns="5"></asp:TextBox>
                此处设置的权重越大，该广告显示的机会就越多
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                时间限制：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="IsTimeLimit" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="False" Selected="True">关闭时间限制</asp:ListItem>
                    <asp:ListItem Value="True">开启时间限制</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                开始时间：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtStartTime" MaxLength="50" runat="server" onClick="date({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})"
                    CssClass="in1"></asp:TextBox><font color="#ff0066">*</font>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                结束时间：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtEndTime" MaxLength="50" runat="server" onClick="date({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})"
                    CssClass="in1"></asp:TextBox><font color="#ff0066">*</font>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                展现次数：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtShowNum" runat="server" Text="0" CssClass="in1" Columns="5"></asp:TextBox> 次
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                审核状态：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="RadioAuditing" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="1" Selected="True">等待审核</asp:ListItem>
                    <asp:ListItem Value="2">审核通过</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
            </td>
            <td class="bqright" height="50">
                <asp:Button ID="Button1" runat="server" Text=" 确认 " CssClass="btn radius30 pad_0_30" OnClick="Button1_Click" />
            </td>
        </tr>
    </table>
    <asp:Literal ID="LitMsg" runat="server"></asp:Literal>
    </form>
</body>
</html>
