<%@ Page Title="" Language="VB" MasterPageFile="~/App_MasterPage/mpManager.master" AutoEventWireup="false" CodeFile="Adv.aspx.vb" Inherits="Manager_Adv_Adv" %>
<%@ Register assembly="ControlPageing" namespace="ControlPageing" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="chpPageTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="chpHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="chpScript" Runat="Server">
<script type="text/javascript" src="/App_Themes/ManagerTheme/Js/jquery.min.js"></script> 
<script type="text/javascript" src="/App_Themes/ManagerTheme/js/lhgdialog.min.js"></script>
<script language="javascript" type="text/javascript">
    function OpenClass() {
        $.dialog({
            lock: false,
            title: '广告分类',
            content: 'url:/Manager/Adv/AdvClass.aspx',
            min: false,
            max: false,
            width: 700,
            height: 450
        });
    }
</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="chpTitle" Runat="Server">
广告管理
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="chpContent" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View_Edit" runat="server">
        <script language="javascript" type="text/jscript">
            var txtID = '';
            function ShowFileDilag(ShowTxt) {
                if (ShowTxt != null && ShowTxt != '') {
                    $.dialog({
                        lock: true,
                        title: '选择文件',
                        content: 'url:/Manager/FileExplorer.aspx?Path=/Sites/Site<%=BaseFunction.PublicMethod.GetApplication("SiteID") %>/Template<%=BaseFunction.PublicMethod.GetApplication("DefaultGroup") %>/',
                        width: '800px',
                        height: '500px',
                        max: false,
                        min: false
                    });
                    txtID = ShowTxt;
                }
            }
            function callBack(FilePath) {
                if (txtID != null && txtID != '') {
                    document.getElementById(txtID).value = FilePath;
                }
            }
</script>
    	    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
	    	<tr>
                    <td align="right" width="20%">链接分类：</td>
                    <td width="30%" colspan="2">
                        <asp:DropDownList ID="dplSiteClassID" runat="server">
                        </asp:DropDownList>      
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>	    		<tr>
                    <td align="right" width="20%">链接名称：</td>
                    <td width="30%" colspan="2">
                        <asp:TextBox ID="txtSiteName" runat="server"  Width="80%" ></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>	    	<tr>
                    <td align="right" width="20%">链接地址：</td>
                    <td width="30%" colspan="2">
                        <asp:TextBox ID="txtSiteUrl" runat="server"  Width="80%" ></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>	    	<tr>
                    <td align="right" width="20%">链接图片：</td>
                    <td width="30%" colspan="2">
                       <asp:TextBox ID="txtPicName" runat="server"  Width="80%" ></asp:TextBox><a style="line-height:30px; margin-left:20px;" href="javascript:ShowFileDilag('<%=txtPicName.ClientID %>');">浏览</a>
                    </td>
                    <td width="50%">&nbsp;</td>
                </tr>   
                <tr>
                    <td align="right" width="20%">排序：</td>
                    <td width="30%" colspan="2">
                        <asp:TextBox ID="txtOrderID" runat="server"  Width="80%" >1</asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>	    	                                                                                          	            
	    </table>   
<div style=" text-align:center"><asp:ImageButton ID="imgSave" runat="server" ImageUrl="~/App_Themes/ManagerTheme/Images/tj.jpg" style="height: 22px" ToolTip="添加" /></div>     
        </asp:View>
        <asp:View ID="View_List" runat="server">
    	    <div style="text-align: right;" class="edittd">
    	    <asp:DropDownList ID="dplClass" runat="server" AutoPostBack="True">
                </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="#" onclick="javascript:OpenClass();"><img src="/App_Themes/ManagerTheme/Images/QuickMenu.gif" alt="广告分类" /> 广告分类</a>&nbsp;&nbsp;
        	<asp:CheckBox ID="cbSelectAll" runat="server" AutoPostBack="True" Text="全部" />&nbsp;
        	<asp:LinkButton ID="lnkBtnDel" runat="server"><img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px"/>&nbsp;删除选中</asp:LinkButton>&nbsp;&nbsp;
        	<a href="Adv.aspx?Action=Add"><img src="/App_Themes/ManagerTheme/Images/add.gif" style=" border:0px" />&nbsp;添加</a>
    	    </div>       
            <asp:Repeater ID="rptList" runat="server">
                <HeaderTemplate>
                    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
			<tr>
			    <td width="10%" align="center" class="left_bt2">选择</td>
			    <td width="10%" align="center" class="left_bt2">排序</td>
			    <td width="20%" align="center" class="left_bt2">链接名称</td>
			    <td width="30%" align="center" class="left_bt2">链接地址</td>
			    <td align="center" width="30%" class="left_bt2">操作</td>
			</tr>
	        </HeaderTemplate>
                <ItemTemplate>
                    <tr class="menuout"   onMouseOver="this.className='menuin'" onMouseOut="this.className='menuout'">
			<td width="10%" align="center"><asp:CheckBox ID="CheckOn" runat="server" ToolTip='<%#Eval("ID")%>' /></td>
			<td width="10%" align="center"><%#Eval("OrderID")%></td>
			<td width="20%" align="center"><%#Eval("Name")%></td>
			<td width="30%" align="center"><%#Eval("Url")%></td>
			<td width="30%" align="center"><a href="Adv.aspx?Action=Edit&ID=<%#Eval("ID") %>">
				<img src="/App_Themes/ManagerTheme/Images/Edit.gif" style=" border:0px" />&nbsp;编辑</a>&nbsp;&nbsp;&nbsp;<a href="Adv.aspx?Action=Del&ID=<%#Eval("ID") %>">
				<img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px" />&nbsp;删除</a></td>
			        </tr>
                </ItemTemplate>
                <FooterTemplate></table></FooterTemplate>
            </asp:Repeater>
            <div style="text-align:center"> <cc1:iPaging ID="ListPaging" runat="server" /></div>        
        </asp:View>        
    </asp:MultiView>
</asp:Content>


