<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LiveTelecast_List.aspx.cs"
    Inherits="RM.Web.LiveTelecast.LiveTelecast_List" %>

<%@ Register Src="~/UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc2" %>
<!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><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_Form")%></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <link href="/Themes/Scripts/artDialog/skins/opera.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_Form")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="text-align: right">
            <uc2:LoadButton ID="LoadButton1" runat="server" />
            <a class="button green" href="/LiveTelecast/Live_TelecastList.aspx" target="_blank"
                title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_List_ckzb")%>"><span class="icon-botton" style="background: url('/Themes/images/16/images.png') no-repeat scroll 0px 4px;">
                </span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_List_ckzb")%></a>
        </div>
    </div>
    <div class="div-body" >
        <%=pageHtml.ToString() %>
    </div>
    </form>
</body>
</html>

<script type="text/javascript">

    function downFile(dtype,key) {
        window.open("LiveTelecast_List.aspx?action=getxml&downtype=" + dtype + "&key=" +key+"&r="+Math.random());
    }

    //添加
    function add() {
        //alert(Menu_Id);
        var url = "/LiveTelecast/LiveTelecast_Form.aspx";
        top.openDialog(url, 'addLiveTelecast_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_Form")%>', 1050, 430, 50, 50);
    }
    //liveId 房间编号  userid 教师id  StartDate开课时间 islb是否录制
    function m1(jiami) {
        var link = "tks://" + jiami;
       
            location.href = link;
        //showConfirmMsg("<textarea style='width:500px; height:50px;'>" + jiami + "</textarea><br/><h2><a href='http://www.newstartsoft.com/Html/cstool.html' style='blue' target='_blank'>点我下载直播软件</a></h2>", function () { });
     }
    $(function (){
        //把分页定位到屏幕下面
        divresize(90);
        FixedTableHeader("#table1", $(window).height() - 121);
        $('.delData').click(function () {
            ajaxUpdateData('/LiveTelecast/Live_Delete.ashx', { key: $(this).attr('data'), action: "0" }, function (data) {
                switch (data) {
                    case 0: //正确
                        showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_List_sczb")%>', 1500, 4);
                        setTimeout(function () {
                            //刷新页面
                            Loading(true);
                            window.location.reload();
                        }, 1500);
                        break;
                    case 1: //插入数据失败
                        livePage.alertMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_List_sczb")%>', 3, 4000);
                        break;
                    case 2: //创建xml文件异常
                        livePage.alertMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("live_Room_err2")%>', 3, 4000);
                        break;
                    case 3: //参数不正确
                        livePage.alertMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("live_Room_err3")%>', 3, 4000);
                        break;
                    case 4: //session丢失
                        livePage.alertMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("live_Room_err4")%>', 3, 4000);
                        break;
                    case 5: //关闭直播修改xml文件异常
                        livePage.alertMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("live_Room_err5")%>', 3, 4000);
                        break;
                    default: //未知
                        livePage.alertMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("live_Room_err6")%>', 3, 4000);
                        break;
                }
            }, function () {
                showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("live_Room_err7")%>', 4000, 3);
            }, '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_List_scm")%>');
            return false;
        });

        $('.editData').click(function () {
            var key = $(this).attr('data');
            var url = "/LiveTelecast/LiveTelecast_Form.aspx?key=" + key;
            top.openDialog(url, 'editLiveTelecast_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_Form")%>', 1050, 430, 50, 50);
        });

        $('.livedetail').click(function () {
            var url = '/LiveTelecast/LiveHistory.aspx?key=' + $(this).attr('data');
            top.openDialog(url, 'liveDetail', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("LiveTelecast_Form")%>', 400, 550, 50, 50);
            return false;
        });
    });
</script>
