<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../Global.Master" CodeBehind="Ad.aspx.cs" Inherits="Web.AdminManager.Setting.Ad" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/Setting.Ad.js"></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <ul class="ui-nav-tabs clearfix">
            <%foreach (System.Data.DataRow ap in AdPlace)
              { %>
            <li <%=AdPlaceId==(int)ap["id"]?"class='active'":"" %>><a href="ad.aspx?p=<%=ap["Id"] %>"><%=ap["PlaceName"] %>(<%=ap["PlaceIndex"] %>)</a></li>
            <%} %>
        </ul>
    </div>
    <div class="h8"></div>
    <div id="UI_Edit" runat="server" visible="false">
        <form action="" method="post" enctype="multipart/form-data" class="ui-form ui-form-vertical">
            <div class="ui-form-group">
                <label class="ui-form-label">位置信息</label><div class="ui-form-ctrls">
                    <%=AdPlace[0]["PlaceName"] %>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">图片</label><div class="ui-form-ctrls">
                    <input type="file" name="PicUrl" /><span
                        class="PicUrl ui-help-inline">建议尺寸：<%=AdPlace[0]["PicSizeInfo"] %></span>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">链接地址</label><div class="ui-form-ctrls">
                    <input type="text" value="<%=ma.Link %>" name="Link"
                        id="Link" class="text ui-widget-content ui-corner-all" /><span class="Link ui-help-inline">图片链接地址</span>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">广告介绍</label><div class="ui-form-ctrls">
                    <input type="text" value="<%=ma.AdInfo %>" name="AdInfo" id="AdInfo"
                        class="text ui-widget-content ui-corner-all" /><span class="AdInfo ui-help-inline">图片的文字介绍内容</span>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">&nbsp;</label><div class="ui-form-ctrls">
                    <button class="ui-btn ui-btn-primary" type="submit">保存设置</button>
                    <button class="ui-btn" type="button" onclick="history.back();">返回</button>
                </div>
            </div>
        </form>
    </div>

    <div id="UI_List" runat="server" visible="false">

        <form action="" method="post">
            <table class="ui-table ui-table-bordered">
                <thead>
                    <tr>
                        <td colspan="5">
                            <a href="?Action=Add&p=<%=AdPlaceId %>" class="ui-btn ui-btn-primary">添加广告</a>&nbsp; &nbsp; 当前模版《<%=SettingTemplate.TempName %>》，<a href="Template.aspx">点击切换模版</a>，<span class="red">上面菜单中括号内为位置标识符，<a href="Template.aspx?Action=Detial&id=<%=ms.TemplateId %>">点击这里</a>查看该模版广告位置列表</span>
                        </td>
                    </tr>
                    <tr class="ui-widget-header p5 talc">
                        <th>广告图片</th>
                        <th>排序</th>
                        <th>链接地址</th>
                        <th>描述</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <%=ShowList%>
                <tr>
                    <td colspan="5">
                        <button type="submit" class="ui-btn ui-btn-primary">保存排序</button>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</asp:Content>
