<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_radio_manage.aspx.cs" Inherits="HteamDd.Web.Admin.Admin_radio_manage" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!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>用户上传视频管理</title>
 <link href="/css/style.css" rel="stylesheet" type="text/css" />
    <script src="/jscript/jquery-1.4.2.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function Checkdatetime() {
            var formdrop = document.forms[0].DropSelect;
            var index = formdrop.selectedIndex;
            if (index == 4) {
                var starttime = document.getElementById('selectstart').value;
                var endtime = document.getElementById('selectend').value;
                if (starttime != "" && endtime != "") {
                    var splitstart, newstarttime, newstartdate;
                    var splitend, newendtime, newenddate;
                    splitstart = starttime.split("-");

                    newstarttime = new Date(splitstart[0], splitstart[1], splitstart[2]);

                    newstartdate = newstarttime.getTime();
                    splitend = endtime.split("-");
                    newendtime = new Date(splitend[0], splitend[1], splitend[2]);
                    newenddate = newendtime.getTime();
                    if (newstarttime.getTime() > newendtime.getTime()) {
                        alert("结束日期不能小于开始日期");
                        return false;
                    }
                } else if (starttime == "" && endtime == "") {
                    alert("请输入您要搜索的开始日期和结束日期");
                    return false;
                }
            }
            return true;
        }
  </script>
<!-- 全选操作 -->
    <script type="text/javascript">
        function checkall(obj, name) {
            var boxs = document.getElementsByName(name);
            for (var i = boxs.length; i--; ) {
                boxs[i].checked = obj.checked;
            }
        }
</script>
    <%--aspnetpage分页无刷新--%>
 <script type="text/javascript">
     //物品类别ID
     var classID = null;
     $(function () { Init(); });
     function Init() {
         //处理分页控件
         $("#pagelist").children("a").each(function (index, element) {
             $(element).unbind("click");
             if (element.href != "") {
                 //获取分页按钮的超链接
                 var link = element.href;
                 //alert(classID);
                 //分页点击事件用ajax将连接提交
                 $(element).bind("click", function () {
                     $.ajax({
                         type: "get",
                         cache: false,
                         url: link,
                         dataType: "html",
                         success: function (msg) {
                             $('#form1').html($(msg).filter('#form1').html())
                             //$(document).unbind( "click" ) ;
                             //对新加载的数据 再次进行处理
                             Init();
                         }
                     });
                 });
             }
             //让超链接不发生跳转
             element.href = "#";
         });
     }
</script>
   <!-- 控制层的显示和隐藏 -->
<script type="text/javascript">
    function getdis() {
        var formdrop = document.forms[0].DropSelect;
        var index = formdrop.selectedIndex;
        if (index == 4) {
            document.getElementById('divstart').style.display = 'block';
            document.getElementById('divtext').style.display = 'none';
        }

        else {

            document.getElementById('divstart').style.display = 'none';
            document.getElementById('divtext').style.display = 'block';
        }
    }

    function txtSearch_onclick() {

    }

</script>
       
    <style type="text/css">
        .style1
        {
            height: 24px;
        }
    </style>
       
</head>
<body>
    
    <form id="form1" runat="server">
    <div >
    <table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0" ID="Table2">
<tr ><th colspan="4">信息搜索</th></tr>
             <tr>
            
    <td   align="left" >信息搜索:</td>
      <td width="10%">
       
        <asp:DropDownList ID="DropSelect" runat="server"  onchange="getdis();" onselectedindexchanged="DropSelect_SelectedIndexChanged" 
             >
              <asp:ListItem Value="video_id">编号</asp:ListItem>
            <asp:ListItem Value="user_id">用户</asp:ListItem>
            <asp:ListItem Value="video_description">视频描述</asp:ListItem>
              <asp:ListItem Value="video_tag">标签</asp:ListItem>
              <asp:ListItem Value="video_datetime">日期</asp:ListItem>
        </asp:DropDownList>
       
    </td>
   <td  width="40%">
       <div  id="divtext" runat="server" style=" display:block" ><input id="txtSearch" 
               type="text"  runat="server" onclick="return txtSearch_onclick()" /><span class="explain">输入关键字实现模糊查询</span></div>
         <div id="divstart"  runat="server" style="display:none"> 开始日期: <input id="selectstart" type="text"  runat="server" onfocus="WdatePicker()" class="Wdate" />
           --<input id="selectend"  type="text" runat="server" onfocus="WdatePicker()" class="Wdate"  /></div></td>  
   <td><asp:Button ID="btnSearch" runat="server" Text="搜  索" 
           OnClientClick=" return Checkdatetime();" onclick="btnSearch_Click"   /></td>
</tr>
</table>
<br />
     <table border=0 cellpadding=0 cellspacing=1 class="maintable">
    <tr><th colspan="10"  style="text-align:left;"><a href="Admin_radio_manage.aspx">视频管理</a>|<a href="Admin_radio_recycle.aspx">视频回收站</a></th></tr>
<tr align="center"><td width="5%" align="left">
<input name='chkall' type='checkbox' id='Checkbox1' value='select' onclick="checkall(this,'primarykey');" style='border:0'/></td>
<td width="10%">编号</td>
<td scope="col" width="10%" >用户</td>
<td scope="col" width="10%">视频地址</td>
<td scope="col" width="15%" >视频描述</td>
<td scope="col" width="15%" >标签</td>
<td scope="col" width="10%" >创建日期</td>
<td scope="col" width="10%" >审核</td>
<td scope="col" width="30%" >操作</td>
</tr>
  <asp:Repeater ID="rplist" runat="server">
    <ItemTemplate>
<tr><td><input type="checkbox" name="primarykey" style="border:0px" class="checkbox_list" value="<%#Eval("video_id").ToString().Trim()%>"/></td>
<td nowrap="nowrap" align="center"> <%#Eval("video_id")%></td>
<td nowrap="nowrap" align="center"> <%#GetNameByID(Eval("user_id").ToString())%></td>
<td nowrap="nowrap" align="center"> <%#Substring(Eval("video_address").ToString())%></td>
<td nowrap="nowrap" align="center"> <%#Substring(Eval("video_description").ToString())%></td>
<td nowrap="nowrap" align="center"> <%#Substring(Eval("video_tag").ToString())%></td>
<td nowrap="nowrap" align ="center"><%#Eval("video_datetime","{0:yyyy-MM-dd}")%></td>
 <td align="center" nowrap="nowrap">
                            <%#(Eval("video_verify").ToString()) == "0" ? "未审" : "<font color='red'>已审</font>"%>
                        </td>
<td align ="center">
[<a id="edit" href="Admin_radio_edit.aspx?action=edit&video_id=<%#Eval("video_id")%>&user_name=<%#GetNameByID(Eval("user_id").ToString())%>">编辑</a>]                         
</td></tr>
 </ItemTemplate>
</asp:Repeater>
<tr>
<td colspan="10"> 
&nbsp;
<input type="radio" class="smallbox" id="activate" name="option" runat="server" />
<label for="activate">审核</label>&nbsp;
<input type="radio" class="smallbox" id="quxiaosh" name="option" runat="server" />
<label for="quxiaosh">取消审核</label>&nbsp;
<input type="radio" class="smallbox" id="delete" name="option" runat="server" />
<label for="delete">删除</label>
<asp:Button ID="btnEdit" runat="server" Text="操作" CssClass="button" onclick="btnEdit_Click"  />
    <br />
    </td></tr>
<tr><th colspan="10">
    <webdiyer:AspNetPager ID="pagelist" runat="server"  AlwaysShow="true"
        EnableTheming="False" 
        CenterCurrentPageButton="True" 
        CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条" 
        FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" 
        PageIndexBoxType="TextBox" PrevPageText="上一页" ShowBoxThreshold="20" 
        ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go" 
        TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" UrlPaging="True" 
       PageSize="5" onpagechanged="pagelist_PageChanged">
    </webdiyer:AspNetPager>
    </th></tr>
<tr><td colspan="10"><font color="red">注：：：</font><br />&nbsp;1.对用户发布的视频信息操作一定要谨慎，避免操作不当，造成损失。<br/>
&nbsp;2.删除操作最好不要使用，一旦删除，就没有办法找回，慎记！<br /></td>
</tr></table>
       
       
    
       
    </div>
      <script src="/jscript/common.js" type="text/javascript"></script>
       <script src="/jscript/jquery-1.4.2.js" type="text/javascript"></script>
    <script src="/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    </form>
</body>

</html>
