<%@ page language="C#" masterpagefile="~/Admin/MasterPage/Main.master" autoeventwireup="true" inherits="admin_ad_ad, App_Web_wohu-ltx" title="无标题页" %>
<%@ Register Src="~/Admin/Controls/CurrTool_Panel.ascx" TagName="CurrTool" TagPrefix="html" %>
<%@ Register Src="~/Admin/Controls/CurrImage_Panel.ascx" TagName="CurrImage" TagPrefix="html" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <div class="divTools">
    <div class="tool-nav">
      <div class="title"> 导航栏</div>
      <%--<asp:HyperLink ID="hy_add" Text="[添加后台用户]" runat="server"/>  
            <asp:HyperLink ID="hy_list" Text="[后台用户列表]" runat="server"/> --%>
    </div>
    <div class="clear"> </div>
    <html:CurrTool ID="CurrTool1" Title="广告系统管理" Version="120402" runat="server"/>
    <html:CurrImage ID="CurrImage1" Title="编辑或新增广告位" 
            Tips="在这里新增或修改广告位属性" runat="server" />
  </div>
  <div class="clear"> </div>
  <div class="divContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="content-table">
          <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trBaseType">
            <td >广告位置编号</td>
            <td>&nbsp;
              <asp:TextBox ID="txtadNo" runat="server" onkeyup="Onlynumber(this)" MaxLength="2"></asp:TextBox>
              如：1;2;98;86等为数字</td>
          </tr>
          <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trTypeName">
            <td>广告位置名称</td>
            <td>&nbsp;
              <asp:TextBox ID="txtadName" runat="server" MaxLength="20"></asp:TextBox>如：首页轮换广告
            </td>
          </tr>
          <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
            <td width="15%">上传图片</td>
            <td class="BotDas" align="left" width="85%">&nbsp;
              <asp:Literal runat="server" ID="LitLxImg"></asp:Literal><br />
              <asp:Literal runat="server" ID="LitimgUrl" Visible="false"></asp:Literal>
              <input type="file" runat="server" id="fileimgUrl" /></td>
          </tr>
          <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
            <td>图片大小</td>
            <td class="BotDas" align="left">&nbsp;
              <asp:TextBox ID="txtWh1" runat="server" onkeyup="Onlynumber(this)" Width="60px"></asp:TextBox>
              <asp:TextBox ID="txtWh2" runat="server" onkeyup="Onlynumber(this)" Width="60px"></asp:TextBox>
              <asp:TextBox ID="txtWh3" runat="server" onkeyup="Onlynumber(this)" Width="60px"></asp:TextBox>
              <asp:TextBox ID="txtWh4" runat="server" onkeyup="Onlynumber(this)" Width="60px"></asp:TextBox>
              <span class="spanTipsRed">分别为：缩略图长、缩略图高、大图长、大图高;缩略图长高为0时，刚无需生成缩略图</span>
            </td>
          </tr>
          <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
            <td>链接地址</td>
            <td class="BotDas" align="left">&nbsp;
              <asp:TextBox ID="txtLinkUrl" runat="server" MaxLength="50"></asp:TextBox>为空时图片没链接；绝对路径请加http://</td>
          </tr>
          <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
            <td>变量代码</td>
            <td class="BotDas" align="left">&nbsp;
              <asp:TextBox ID="txtadDim" runat="server" MaxLength="10"></asp:TextBox></td>
          </tr>          
          <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
            <td align="center" colspan="2"><asp:Button ID="BtnInsert" Text="新 增" runat="server" CssClass="button" OnClick="BtnInsert_Click" />
              <asp:Button ID="BtnEdit" Text="修 改" runat="server" CssClass="button" OnClick="BtnEdit_Click" />
              <asp:Button ID="BtnDelete" Text="删 除" runat="server" CssClass="button" OnClick="BtnDelete_Click" />
              <font color="red">注：非轮换广告，前台是以‘变量代码’来显示广告图片与链接的；请勿随意‘变量代码’，否则前台得修改代码</font>
           </td>
          </tr>
          <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
            <td colspan="2">请选择类别：
              <asp:DropDownList ID="DropBaseType" runat="server" AutoPostBack="true" DataTextField="adName" DataValueField="adNo"
                              onselectedindexchanged="DropBaseType_SelectedIndexChanged"></asp:DropDownList></td>
          </tr>
          <tr>
            <td colspan="2">
            <asp:DataGrid ID="DataGrid1" runat="server" AutoGenerateColumns="False" CssClass="content-table"
                    CellPadding="0" GridLines="None" Width="100%" OnSelectedIndexChanged="DataGrid1_SelectedIndexChanged">
                <SelectedItemStyle CssClass="linkDown" />
                <ItemStyle CssClass="BotDas" />
                <Columns>
                <asp:TemplateColumn HeaderText=" " ItemStyle-Width="2px">
                  <ItemTemplate> &nbsp; </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="选择">
                  <ItemTemplate>
                    <asp:LinkButton runat="server" CommandName="Select" CausesValidation="False" Text="选择"></asp:LinkButton>
                  </ItemTemplate>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="adNo" HeaderText="广告位置编号" />
                <asp:BoundColumn DataField="adName" HeaderText="广告位置名称" />
                <asp:BoundColumn DataField="LinkUrl" HeaderText="链接地址" />
                <asp:BoundColumn DataField="adDim" HeaderText="变量代码" />
                <asp:TemplateColumn HeaderText="变量" ItemStyle-Width="2px"
                            HeaderStyle-Width="2px" Visible="false">
                  <ItemTemplate>
                    <asp:Literal runat="server" Visible="false" ID="Uid" Text='<%#DataBinder.Eval(Container.DataItem,"Uid") %>'></asp:Literal>
                    <asp:Literal runat="server" Visible="false" ID="imgUrl" Text='<%#DataBinder.Eval(Container.DataItem,"imgUrl") %>'></asp:Literal>
                    <asp:Literal runat="server" Visible="false" ID="ImgWh" Text='<%#DataBinder.Eval(Container.DataItem,"ImgWh") %>'></asp:Literal>
                  </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText=" " ItemStyle-Width="2px">
                  <ItemTemplate> &nbsp; </ItemTemplate>
                </asp:TemplateColumn>
                </Columns>
                <HeaderStyle CssClass="tableTitle" />
              </asp:DataGrid></td>
          </tr>
        </table>
  </div>
</asp:Content>
