<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Course.Admin.Course.KS_LivePlay" Codebehind="KS.CosLiveAPIConfig.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">
    <script type="text/javascript">
        function setRadio(nowRadio) {
            var myForm, objRadio;
            myForm = document.forms[0];
            for (var i = 0; i < myForm.length; i++) {
                if (myForm.elements[i].type == "radio") {
                    objRadio = myForm.elements[i];
                    if (objRadio != nowRadio && objRadio.name.indexOf("list") > -1 && objRadio.name.indexOf("RdbIsDefault") > -1) {
                        if (objRadio.checked) {
                            objRadio.checked = false;
                        }
                    }
                }
            }
        }
    </script>
     <div id="manage_top" class="menu_top_fixed">
         <ul class="titleTab">
          <%if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx0", true))
                  { %>
          <li><a href="KS.CosConfig.aspx">系统设置</a></li>
             <%}
               if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx1",true)){ %>
          <div onmouseover="jQuery('#topcd').show();" onmouseout="jQuery('#topcd').hide();" class="liwrap">
                   <li><a href="KS.CosCategory.aspx?type=0">分类设置</a></li>
                   <div id="topcd" class="topcd" style="display:none">
                      <a href="KS.CosCategory.aspx?type=0">网授分类</a>
                      <a href="KS.CosCategory.aspx?type=1">面授分类</a>
                   </div>
           </div>
            <%}
                if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx2", true))
                { %>
          <li><a href="KS.CosLiveConfig.aspx">直播道具</a></li>
             <%}
                 if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx3", true))
                 { %>
          <li><a href="KS.CosFaceType.aspx">面授班型</a></li>
              <%}
                  if (KSSecurity.CheckMenuPower("Course/KS.CosConfig.aspx4", true))
                  { %>
          <div onmouseover="jQuery('#topvideo').show();" onmouseout="jQuery('#topvideo').hide();" class="liwrap">
                   <li class="curr"><a href="KS.CosAPIConfg.aspx">视频接口</a></li>
                   <div id="topvideo" class="topcd" style="display:none">
                      <a href="KS.CosAPIConfg.aspx">点播接口</a>
                      <a href="KS.CosLiveAPIConfig.aspx">直播接口</a>
                   </div></div>
              <%} %>
          <li><a href="KS.CosVideoAdvertiseManage.aspx">设置视频广告</a></li>
       </ul>
 </div>  
<div class="menu_top_fixed_height"></div> 
 <div class="content-area">
    <div class="tabs_header">
        <span class="fr"><asp:LinkButton ID="addclassbutton" runat="server" OnClick="addclassbutton_Click" CssClass="mr20 button button_on">添加直播视频播放器接口</asp:LinkButton></span>
        <ul class="tabs">
            <li ><a href="KS.CosAPIConfg.aspx"><span>网授视频接口设置</span></a></li>
            <li class="active"><a href="KS.CosLiveAPIConfig.aspx"><span>直播视频接口设置</span></a></li>
           
        </ul>
     </div>
    <asp:Panel ID="ListPanel" runat="server" Width="100%">
   
        <KS:KSGV ID="list" CssClass="CTable  template_msg" runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="暂无自定义直播视频播放器接口记录!" GridLines="None" PagerType="CustomNumeric" OnRowDataBound="list_RowDataBound">
            <Columns>
                <asp:BoundField HeaderText="序号" DataField="id">
                    <ItemStyle HorizontalAlign="Center" Width="40px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="启用">
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:HiddenField ID="Hidissys" Value='<%# Eval("issys") %>' runat="server" />
                        <asp:HiddenField ID="HidID" Value='<%# Eval("id") %>' runat="server" />
                        <asp:HiddenField ID="Hidenable" Value='<%# Eval("enable") %>' runat="server" />

                        <asp:CheckBox ID="CkbEnable" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
               

                <asp:TemplateField HeaderText="直播视频播放器名称">
                    <ItemStyle HorizontalAlign="Left" />
                    <ItemTemplate>
                        <asp:TextBox CssClass="textbox" ID="TxtName" Text='<%#Eval("name") %>' Width="280" runat="server"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="默认">
                    <ItemStyle HorizontalAlign="Center" Width="60px" />
                    <ItemTemplate>
                        <asp:RadioButton ID="RdbIsDefault" runat="server" />
                        <asp:HiddenField ID="HidIsDefault" runat="server" Value='<%# Eval("isdefault") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                   <asp:TemplateField HeaderText="账号类型">
                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                    <ItemTemplate>
                 
                   <%# Convert.ToInt16(Eval("id").ToString())>6?"--":  Convert.ToString(Eval("livetype").ToString())=="1"?"<font color='green'>账号</font>":"<font color='red'>推流</font>" %>
              
                         </ItemTemplate>
                </asp:TemplateField>
                    <asp:TemplateField HeaderText="直播方式">
                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                    <ItemTemplate>
                   <%# Convert.ToInt16(Eval("id").ToString())>6 ?"--":Convert.ToString(Eval("wlink").ToString())=="1"?"<font color='green'>外连</font>":"<font color='red'>内置SDK</font>" %>
                    </ItemTemplate>
                </asp:TemplateField>
                     <asp:TemplateField HeaderText="账号数">
                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                    <ItemTemplate>
                     <%#Convert.ToInt16(Eval("id").ToString())>6 ?"--": Eval("account") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="接口">
                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                    <ItemTemplate>
                      <%# Convert.ToString(Eval("issys").ToString())=="0"?"<font style='color:#999'>系统</font>":"<font color='red'>自定义</font>" %>
                    </ItemTemplate>
                </asp:TemplateField>
           
                  <asp:TemplateField HeaderText="账号管理">
                    <ItemStyle Width="60px" HorizontalAlign="Center" />
                    <ItemTemplate>

                    <%# Convert.ToInt16(Eval("id").ToString())>6 ?"--":"<a href='KS.liveaccountlist.aspx?serverid="+Eval("id")+"' class='link-color'>进入</a>"%>
                      
                    </ItemTemplate>
                </asp:TemplateField>
                     <asp:TemplateField HeaderText="操作">
                    <ItemStyle Width="60px" HorizontalAlign="Center" />
                    <ItemTemplate>

                        <a href="KS.CosLiveAPIConfig.aspx?action=modify&liveid=<%#Eval("id") %>" class="link-color">修改</a>
                        <%#Convert.ToString(Eval("issys").ToString())=="0"?"":"<a class=link-color href=\"KS.CosLiveAPIConfig.aspx?action=del&liveid="+Eval("id")+"\" onclick=\"return confirm('确认删除吗?\n如果要删除,请点确认,否则请取消.');\">删除</a>" %>
                    </ItemTemplate>
                </asp:TemplateField>
                     <asp:TemplateField HeaderText="教程">
                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%# (Convert.ToString(Eval("id").ToString())=="1" ) ?"<a href='http://www.kesion.com/v-112-46352.aspx' target='_bank'>教程<a/>":"" %>
                         <%# (Convert.ToString(Eval("id").ToString())=="2" ) ?"<a href='http://www.kesion.com/v-112-46353.aspx' target='_bank'>教程<a/>":"" %>
                          <%# (Convert.ToString(Eval("id").ToString())=="4" ) ?"<a href='http://www.kesion.com/v-112-46354.aspx' target='_bank'>教程<a/>":"" %>
                             <%# (Convert.ToString(Eval("id").ToString())=="3" ) ?"<a href='http://www.kesion.com/v-112-46355.aspx' target='_bank'>教程<a/>":"" %>
                               <%# Utils.StrToInt(Convert.ToString(Eval("id").ToString()))<=4 ?"":"--" %>
                          </ItemTemplate>
                </asp:TemplateField>
            </Columns>


            <PagerStyle CssClass="Page" HorizontalAlign="Right" />
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
        </KS:KSGV>

        <KS:Foot ID="Foot2" runat="server" CancelButtonVisible="false" OnSubmit="Foot2_Submit" SubmitButtonText="批量保存(0)" />
       


    </asp:Panel>

    <asp:Panel ID="AddPanel" runat="server" Width="100%">

        <table width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable">

            <tr>
                <td class="lefttd" height="30" align="right" style="width:258px"><b><font color="red">*</font>直播视频播放器名称：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="TxtPlayName" CssClass="textbox" runat="server"></asp:TextBox>

                </td>
            </tr>
            <tr>
                <td class="lefttd" height="30" align="right" style="width:258px"><b><font color="red">*</font>PC版的调用视频播放器的脚本：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="TxtPCJavaScript" CssClass="textbox" runat="server" Height="150px" TextMode="MultiLine" Width="650px"></asp:TextBox>

                </td>
            </tr>
            <%if (KSCMS.S("liveid") == "6")
                { %>
                <tr>
                <td class="lefttd" height="30" align="right" style="width:258px"><b><font color="red">*</font>PC版的回放脚本：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="TxtPCBack" CssClass="textbox" runat="server" Height="150px" TextMode="MultiLine" Width="650px"></asp:TextBox>

                </td>
            </tr>
            <%} %>
            <tr>
                <td class="lefttd" height="30" align="right" style="width:258px"> </td>
                <td>
                    <span class="msgtips"><font color="red">调用标签分别是：{KS:PLAY1},如果参数是多个，用{KS:PLAY1},{KS:PLAY2},按顺序下去</font></span>

                </td>
            </tr>
            <tr style="display:none">
                <td class="lefttd" height="30" align="right" style="width:258px"><b><font color="red">*</font>手机版的调用视频播放器的脚本：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="Txt3GJavaScript" CssClass="textbox" runat="server" Height="150px" TextMode="MultiLine" Width="650px"></asp:TextBox>

                </td>
            </tr>
                     
            <tr>
                <td class="lefttd" height="30" style="width: 258px">
                    <strong>是否启用：</strong></td>
                <td class="righttd">&nbsp;<asp:RadioButtonList ID="RdbEnable" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                    <asp:ListItem Value="true" Selected="True">启用</asp:ListItem>
                    <asp:ListItem Value="false">不启用</asp:ListItem>
                </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="lefttd" height="30" style="width: 258px">
                    <strong>是否默认：</strong></td>
                <td class="righttd">&nbsp;<asp:RadioButtonList ID="RbDeFault" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                    <asp:ListItem Value="true" Selected="True">是</asp:ListItem>
                    <asp:ListItem Value="false">否</asp:ListItem>
                </asp:RadioButtonList>
                </td>
            </tr>
           
            <% if (Utils.StrToInt(KSCMS.S("liveid")) <= 2 && Utils.StrToInt(KSCMS.S("liveid"))>=1)
               { %>  
            <tr>
               	<td align="right" class="lefttd" style="width: 258px">
                    <strong>是否外链：</strong></td>
                <td class="righttd">&nbsp;
                   	<asp:CheckBox ID="CheckBox1" runat="server"  Text="启用"/>
   					<font color="red">启用外链之后设置播放器不起作用，直播页自动会跳转到第三方播放页面</font>
                </td>                  
            </tr>         
             <%} %> 
         
        </table>
        <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
        


    </asp:Panel>
  </div> 

</asp:Content>
