357 lines
16 KiB
Plaintext
357 lines
16 KiB
Plaintext
<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="Admin_Member_livefilefile.aspx.cs" Inherits="Mtxfw.VipSite.Admin_Member_livefile" %>
|
||
|
||
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
|
||
<!DOCTYPE html>
|
||
<html>
|
||
<head id="Head1" runat="server">
|
||
<title></title>
|
||
|
||
|
||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||
<meta http-equiv="Cache-Control" content="no-store" />
|
||
<meta http-equiv="Pragma" content="no-cache" />
|
||
<meta http-equiv="Expires" content="0" />
|
||
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9,IE=10" />
|
||
<script src="/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
|
||
<script type="text/javascript" src="/Scripts/bootstrap.min.js"></script>
|
||
<script src="/Scripts/common.js" type="text/javascript"></script>
|
||
<script src="/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
|
||
<script src="/artDialog/iframeTools.js" type="text/javascript"></script>
|
||
<link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||
|
||
<!-- Basic Styles -->
|
||
|
||
<meta name="description" content="">
|
||
<meta name="author" content="">
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/bootstrap.css">
|
||
<!--[if IE 7]>
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/font-awesome-ie7.min.css">
|
||
<![endif]-->
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/smartadmin-production.css">
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/smartadmin-skins.css">
|
||
|
||
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/your_style.css">
|
||
|
||
<!-- Demo purpose only: goes with demo.js, you can delete this css when designing your own WebApp -->
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/demo.css">
|
||
|
||
|
||
<!-- FAVICONS -->
|
||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||
<script type="text/javascript" charset="utf-8" src="/Scripts/vod-js-sdk-v6.js"></script>
|
||
<link rel="stylesheet" type="text/css" href="/css/cjadd.css?t=1">
|
||
<style type="text/css">
|
||
.uploadvideobox{ display:inline-block; width:15em;}
|
||
.uploadvideobtnbox{ position:relative;
|
||
float:left;
|
||
width: 8em;
|
||
height: 2em;
|
||
line-height: 2em;
|
||
margin: 1em auto;
|
||
background: linear-gradient(to right, #fec02e, #fc9b06);
|
||
border-radius: 0.5em;
|
||
|
||
color:#fff;}
|
||
.uploadvideobtnbox span{width: 100%;height: 100%; display:block;text-align:center;}
|
||
.uploadvideobtnbox input#videofile{position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
opacity: 0;
|
||
border:0;
|
||
background-color:#000;}
|
||
.processbox{ width: 100%;height: 0.5em;border-radius: 10px;background: #999;margin: 10px auto;border: 1px solid #ff6780; display:none}
|
||
.child{position: relative;height:100%;border-radius:inherit; background-color:#ff4500;}
|
||
|
||
.process-animate{background: #ff6780;position: absolute;left: 0;top: 0;bottom: 0;border-radius:inherit;
|
||
animation: process 1s linear forwards ;
|
||
}
|
||
@keyframes process
|
||
{
|
||
0%{
|
||
left:0;right:100%;
|
||
}
|
||
20%{
|
||
right:80%
|
||
}
|
||
40%{
|
||
right:60%;
|
||
}
|
||
60%{right:40%;}
|
||
80%{right:20%;}
|
||
100%{right:0;}
|
||
}
|
||
.delvideobtnbox{display:inline-block; margin-left:1em; margin-top:1em; width:2em; height:2em; background-color:#fff; cursor:pointer; display:none}
|
||
.delvideobtnbox img{display:inline-block; width:100%; height:100%;}
|
||
</style>
|
||
<script src="Scripts/setdate.js" type="text/javascript"></script>
|
||
<script type="text/javascript">
|
||
var open = function (url) {
|
||
art.dialog.open(url, {
|
||
title: '留言',
|
||
width: '700px',
|
||
height: '600px',
|
||
lock: true,
|
||
id: 'dg_test34243'
|
||
});
|
||
};
|
||
</script>
|
||
<script type="text/javascript">
|
||
//去掉空格
|
||
function fTrim(str) {
|
||
return str.replace(/(^\s*)|(\s*$)/g, "");
|
||
}
|
||
var search2 = function () {
|
||
location.href = 'Admin_Member_livefile.aspx?ttype=' + $("#Drop_ttype").val() + '<%=!String.IsNullOrEmpty(Request.QueryString["xz"])?"&xz=1":""%>&key=' + $("#text_key").val() + '&SJ=' + $("#text_SJ").val() + '&SJ2=' + $("#text_SJ2").val();
|
||
|
||
};
|
||
function getSignature() {
|
||
return "<%=Signature%>";
|
||
/*$.getJSON("/Ajax.ashx?t=" + Math.random(),
|
||
{ action: "GetUgcUploadSign" },
|
||
function (data) {
|
||
if (data.success) {
|
||
return data.sign;
|
||
} else {
|
||
return ""
|
||
}
|
||
})*/
|
||
|
||
};
|
||
function uploadvideo() {
|
||
try {
|
||
const tcVod = new TcVod.default({
|
||
getSignature: getSignature // 前文中所述的获取上传签名的函数
|
||
})
|
||
|
||
const uploader = tcVod.upload({
|
||
mediaFile: document.getElementById('videofile').files[0], // 媒体文件(视频或音频或图片),类型为 File
|
||
})
|
||
uploader.on('media_progress', function (info) {
|
||
$(".uploadvideobtnbox span").html("上传中...");
|
||
$(".processbox").show();
|
||
$('.processbox .child').css("width", (info.percent * 100) + "%");
|
||
|
||
})
|
||
|
||
// 回调结果说明
|
||
// type doneResult = {
|
||
// fileId: string,
|
||
// video: {
|
||
// url: string
|
||
// },
|
||
// cover: {
|
||
// url: string
|
||
// }
|
||
// }
|
||
uploader.done().then(function (doneResult) {
|
||
$("#hidden_video").val(doneResult.video.url);
|
||
$("#file_id").val(doneResult.fileId);
|
||
$(".uploadvideobtnbox span").html("上传完成");
|
||
}).catch(function (err0) {
|
||
alert(err0);
|
||
});
|
||
} catch (err) {
|
||
alert(err);
|
||
}
|
||
|
||
}
|
||
var sInterval0 = null;
|
||
function onupload() {
|
||
var video = $("#hidden_video").val();
|
||
var file_id = $("#file_id").val();
|
||
if (video != "" && file_id != "") {
|
||
$("#btn-continue").attr("disabled", true);
|
||
$("#btn-continue").text("请稍候...");
|
||
sInterval0=setInterval("onuploadto()", 6000);
|
||
} else {
|
||
alert("请先上传视频");
|
||
}
|
||
}
|
||
function onuploadto() {
|
||
clearInterval(sInterval0);
|
||
var video = $("#hidden_video").val();
|
||
var file_id = $("#file_id").val();
|
||
$.post("/Ajax.ashx", { action: "addvideo", video: video,file_id:file_id }, function (data) {
|
||
|
||
if (data == "0") {
|
||
$("#btn-continue").removeAttr("disabled");
|
||
$("#btn-continue").text("确认");
|
||
$('#successModal').modal('hide');
|
||
alert("确认成功");
|
||
self.location = self.location.toString();
|
||
} else {
|
||
$("#btn-continue").removeAttr("disabled");
|
||
$("#btn-continue").text("确认");
|
||
alert(data);
|
||
}
|
||
|
||
});
|
||
|
||
}
|
||
function onsel(fileurl) {
|
||
var d = $(window.parent.document);
|
||
var hidden_video = d.find("#hidden_video");
|
||
hidden_video.val(fileurl);
|
||
art.dialog.close();
|
||
}
|
||
</script>
|
||
<style type="text/css">
|
||
#Label_JF{ color:Red;}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<form runat="server">
|
||
<!-- RIBBON -->
|
||
<%if (String.IsNullOrEmpty(Request.QueryString["xz"]))
|
||
{ %>
|
||
<div id="ribbon">
|
||
|
||
<span class="ribbon-button-alignment"> <span id="refresh" class="btn btn-ribbon" data-title="refresh" rel="tooltip" data-placement="bottom" data-original-title="<i class='text-warning fa fa-warning'></i> 注意!这会重新设置小工具的排位." data-html="true" data-reset-msg="刷新网站?"><i class="fa fa-refresh"></i></span> </span>
|
||
|
||
<!-- breadcrumb -->
|
||
<ol class="breadcrumb">
|
||
<li><a href="/" target="_top">主页</a></li>
|
||
<li><a href="/Member_Index.aspx">会员中心首页</a></li>
|
||
<li><a href="/Admin_Member_config.aspx">后台管理</a></li>
|
||
<li>直播管理</li>
|
||
</ol>
|
||
<!-- end breadcrumb -->
|
||
</div>
|
||
<%} %>
|
||
<!-- END RIBBON -->
|
||
<!-- MAIN CONTENT -->
|
||
<div style="opacity: 1;" id="content">
|
||
<div class="frontMain">
|
||
<%if (String.IsNullOrEmpty(Request.QueryString["xz"]))
|
||
{ %>
|
||
<h1 class="title01"><span class="semi-bold">云视频管理</span>
|
||
|
||
<span class="addtitle"><a href="javascript:$('#successModal').modal('show');" target="_self" class="abtn">添加新视频</a></span>
|
||
|
||
</h1>
|
||
<%} %>
|
||
<div class="MainContent">
|
||
<table width="100%" border="0" class="data_table" id="p_table" cellspacing="0" cellpadding="0">
|
||
<tr>
|
||
<td colspan="9">
|
||
<asp:DropDownList ID="Drop_ttype" runat="server">
|
||
<asp:ListItem Text="所有视频" Value=""></asp:ListItem>
|
||
<asp:ListItem Text="后台上传视频" Value="1"></asp:ListItem>
|
||
<asp:ListItem Text="会员上传视频" Value="2"></asp:ListItem>
|
||
</asp:DropDownList>
|
||
日期从 <input id="text_SJ" type="text" style=" width:100px;" value='<%=Request.QueryString["SJ"]%>' onfocus="ca_show('text_SJ', this, '-');"/>到<input id="text_SJ2" type="text" style=" width:100px;" value='<%=Request.QueryString["SJ2"]%>' onfocus="ca_show('text_SJ2', this, '-');"/>
|
||
用户名:<input id="text_key" type="text" style=" width:100px;" value="<%=Request.QueryString["key"]%>"/>
|
||
<input id="Member_search" type="button" value="查询" onclick="search2()" class="abtn" />
|
||
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#f7f7f7">
|
||
<%if (String.IsNullOrEmpty(Request.QueryString["xz"]))
|
||
{ %>
|
||
<td><b>选择</b></td>
|
||
<%} %>
|
||
<td><b>类型</b></td>
|
||
<td><b>直播账户</b></td>
|
||
<th><b>添加时间</b></th>
|
||
<th><b>下载URL</b></th>
|
||
<%if (!String.IsNullOrEmpty(Request.QueryString["xz"]))
|
||
{ %>
|
||
<th><b>选择视频</b></th>
|
||
<%}
|
||
else
|
||
{ %>
|
||
<th><b>播放视频</b></th>
|
||
<%} %>
|
||
</tr>
|
||
<asp:Repeater ID="Repeater1" runat="server">
|
||
<ItemTemplate>
|
||
<tr <%#(Container.ItemIndex + 1)%2==0?"bgColor=\"#f4f4f4\" onmouseover=\"this.bgColor='#fdff7e'\" onmouseout='this.bgColor=\"#f4f4f4\"'":"bgColor=\"#ffffff\" onmouseover=\"this.bgColor='#fdff7e'\" onmouseout='this.bgColor=\"#ffffff\"'"%>>
|
||
<%if (String.IsNullOrEmpty(Request.QueryString["xz"]))
|
||
{ %>
|
||
<td><asp:checkbox ID="checka" runat="server" CssClass='<%#Eval("ID") %>'></asp:checkbox></td>
|
||
<%} %>
|
||
<td><%#Eval("ttype").ToString() == "3" ? "直播截图" : (Eval("ttype").ToString() == "2" ? "会员上传视频" : (Eval("ttype").ToString() == "1" ? "后台上传视频" : "直播录制视频"))%></td>
|
||
<td><a href="Admin_Member_livefile.aspx?key=<%#Eval("MemberName")%>"><%#Eval("MemberName")%></a>(<%#Eval("realname")%>)</td>
|
||
<td><%#Eval("addtime")%></td>
|
||
<td style="width:200px;word-break:break-all;word-wrap:break-word; "><a href="<%#Eval("video_url")%>" target="_blank"><%#Eval("video_url")%></a></td>
|
||
<%if (!String.IsNullOrEmpty(Request.QueryString["xz"]))
|
||
{ %>
|
||
<td>
|
||
<input type="button" onclick="onsel('<%#Eval("video_url")%>')" class="abtn" value="选择此视频" />
|
||
</td>
|
||
<%}
|
||
else
|
||
{ %>
|
||
<td><a href="<%#cvideo(Eval("video_url").ToString())%>" target="_blank">播放此视频</a></td>
|
||
<%} %>
|
||
</tr>
|
||
|
||
</ItemTemplate>
|
||
</asp:Repeater>
|
||
<%if (String.IsNullOrEmpty(Request.QueryString["xz"]))
|
||
{ %>
|
||
<tr>
|
||
<td colspan="9" style="text-align:left">
|
||
操作:<span style=" cursor:pointer; color:Blue;" onclick="seclectall(0)">全选</span> <span style=" cursor:pointer; color:Blue;" onclick="seclectall(1)">取消所选</span>
|
||
将所选项
|
||
|
||
<asp:DropDownList ID="seclect_Drop" runat="server">
|
||
|
||
</asp:DropDownList>
|
||
<asp:Button ID="Btn_Run" OnClick="Run_Click" OnClientClick="return confirm('删除后不可恢复,确定要删除吗?')" runat="server" Text="执行" CssClass="abtn"></asp:Button>
|
||
</td>
|
||
</tr>
|
||
<%} %>
|
||
<tr>
|
||
<td colspan="9"> <webdiyer:AspNetPager ID="MyPager" AlwaysShow="true" runat="server"
|
||
FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
|
||
CustomInfoHTML="共 <font color="red">%RecordCount%</font> 条记录 当前 <font color="red">%CurrentPageIndex%/%PageCount%</font> 页"
|
||
PrevPageText="上一页" ShowPageIndexBox="Always" ShowCustomInfoSection="Left"
|
||
SubmitButtonText="Go" TextAfterPageIndexBox="页" ShowBoxThreshold="100"
|
||
CurrentPageButtonPosition="Center" ShowMoreButtons="False" PageIndexBoxType="DropDownList"
|
||
TextBeforePageIndexBox="转到" UrlPaging="True">
|
||
</webdiyer:AspNetPager></td>
|
||
</tr>
|
||
</table>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 充值框(Modal) -->
|
||
<div class="modal fade" id="successModal" tabindex="-1" role="dialog" aria-labelledby="successLab" aria-hidden="true">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title"><span id="modal-title">上传</span><span class="close" onclick="$('#successModal').modal('hide');">x</span></h5>
|
||
|
||
</div>
|
||
<div class="modal-body0">
|
||
<div class="uploadvideobox">
|
||
<div class="processbox">
|
||
<div class="child" style="width:0%">
|
||
<p class="process-animate"></p>
|
||
</div>
|
||
</div>
|
||
<div class="uploadvideobtnbox"><span>上传</span><input type="file" id="videofile" value="" onchange="uploadvideo()"/></div>
|
||
<div class="delvideobtnbox" onclick="delvideo()"><img src="/images/close.png" /></div>
|
||
</div>
|
||
<input type="hidden" id="hidden_video" />
|
||
<input type="hidden" id="file_id" />
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default text-right" onclick="$('#successModal').modal('hide');" id="Button1">取消</button>
|
||
<button type="button" class="btn btn-success" id="btn-continue" onclick="onupload()">确认</button>
|
||
</div>
|
||
</div><!-- /.modal-content -->
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</body></html>
|