<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="MediaAlbumsList.aspx.vb" Inherits="Dingtai.Website.MediaAlbumsList" %>

<%@ Register src="../../App_Data/Controls/PageControl.ascx" tagname="PageControl" tagprefix="uc1" %>
<!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 id="Head1" runat="server">
    <title>鼎太播客 &gt; 后台管理 &gt; 高清专辑管理列表</title>
</head>
<body onload="setTableBg();">
    <form id="form1" runat="server">
        <div id="body">
            <div id="title">                
                <h5>您现在的位置：<a href="#" target="_self">后台管理</a> &gt; 专辑管理列表</h5>
            </div>  
            <div id="box">
                <div id="an_box">
                    <ul>
                        <li ><a href ="AddMediaAlbums.aspx"><img alt="" src="/Skins/default/images/an_d0.gif" /></a></li>
                        <li><a href ="#" ><div class="qx" onclick ="SelectAll();" alt="全选"  /></a> </li>
                        <li><a href ="#" ><div class="fx" onclick ="Inverse();" alt="反选"  /></a> </li>
                        <li><a href ="#" ><div class="dels" onclick ="DelHDs();" alt="批量删除"  /></a> </li>
                    </ul>                
                    <div class="search_box"> 
                        <asp:DropDownList ID="selectWhere" runat="server" style="border:solid 1px #589210;">
                            <asp:ListItem Value="0">全部</asp:ListItem>
                            <asp:ListItem Value="1">按名称</asp:ListItem>
                            <asp:ListItem Value="2">按用户</asp:ListItem>
                        </asp:DropDownList>
                        <asp:TextBox ID="txtWhere" runat="server" Width="212px" CssClass ="txt"></asp:TextBox>
                        <asp:ImageButton ID="ImageButton1" runat="server" 
                            ImageUrl="/Skins/default/images/yl_an.gif"/>
                    </div>                     
                </div>
                <div class="body_box" id="body_box">
                    <asp:Repeater ID="Repeater1" runat="server">
                       <HeaderTemplate >
                            <table id="t" class="table_bg" onclick="clickto()" onmousemove="fmove()" onmouseout="fout()" >
                                <tr class="table_border">
                                <th>选择</th>
                                <th>专辑名称</th>
                                <th>所属频道</th>
                                <th>发布时间</th>
                                <th>播放次数</th>
                                <th>视频数</th>                               
                                <th>操作</th>
                                </tr>
                       </HeaderTemplate>
                       <ItemTemplate>                                  
                                <tr class="table_border2">
                                <td align ="center"><input type="checkbox" name="checkboxid"  id="checkboxid" value="<%#Eval("ID") %>" /></td>
                                <td align ="center"><%#Eval("Name")%></td>
                                <td align ="center"><%#Dingtai.BLL.MediaChannels.Provider.MediaChannelsService.GetChannelNameByID(Eval("ChannelID").ToString())%></td>                
                                <td align ="center"><%#Eval("CreateDate")%></td>
                                <td align ="center"><%#Eval("TotalView")%></td>
                                <td align ="center"><%#Eval("FileCount")%></td> 
                                <td><a href="UpdateMediaAlbums.aspx?id=<%# Eval("ID") %>" ><img alt="编辑" src="/Skins/default/images/box_an9.gif"/></a>
                                    <asp:ImageButton ID="imgDel" CommandName ="myDel" OnClientClick ="return confirm('确定删除吗？')" CommandArgument ='<%#Eval("ID")%>' runat="server" ImageUrl ="/Skins/default/images/box_an6.gif" />
                                    <asp:HyperLink ID="hlLock" NavigateUrl="#" runat="server"></asp:HyperLink>
                                    <asp:HyperLink ID="hlAuthent" NavigateUrl="#" runat="server"></asp:HyperLink>    
                                </td>
                            </tr>
                       </ItemTemplate>
                       <FooterTemplate>
                           </table>
                       </FooterTemplate>
                   </asp:Repeater>
                   <uc1:PageControl ID="Page2" runat="server" ShowFirstLast="true" ShowPrevNext="true" 
                    FirstPageText="首 页" LastPageText="末 页" PrevPageText="上一页" NextPageText="下一页" AlwaysShow="true" 
                    ShowCustomInfoSec="left" NumericButtonCount="5" PagingButtonSpacing="25px" 
                    CustomInfoHTML="当前 %CurrentPageIndex% 页 共 %PageCount% 页" />
                </div>            
            </div>
        </div>   
    </form>
</body>
<script type = "text/javascript" language = "javascript">
function SelectAll()
{   
    var chk=document .getElementsByName ("checkboxid")
    for (var i=0;i<chk.length ;i++)
    {
        chk[i].checked=true;        
    }     
}
function DelHDs()
{
    var allId= new Array ()
    var chk=document .getElementsByName ("checkboxid")
    for (var i=0;i<chk.length ;i++)
    {    
        if (chk[i].checked==true)
        {             
            allId.push(chk[i].value);            
        }
    }    
    var ret = MediaAlbumsList.Dels(allId).value; 
         if (ret == true)
        {
            M1("操作成功!");
            refreshPage(0);  
        }
}
</script>
</html>
