<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Course.Admin.Course.KS_AutoPlay" Codebehind="KS.CosAPIConfg.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;
                        }
                    }
                }
            }
        }
        function SetThreeScreen() {
            var b = jQuery("#<%=this.RdbIsThreeScreen.ClientID %> :radio[checked]").val();
            if (b == "1") {
                $("#ThreeenScreen").show();
            }
            else {
                $("#ThreeenScreen").hide();
            }
            
        }
        function SetShouquan() {
            var b = jQuery("#<%=this.RdbShouquan.ClientID %> :radio[checked]").val();
            var a= jQuery("#<%=this.RdbRunning.ClientID %> :radio[checked]").val();
            if (b == "1"&&a=="0") {
                $("#ShouquanUrl").show();
                $("#RunContent").hide();
            }
            else if (b == "0" && a == "1") {
                $("#ShouquanUrl").show();
                $("#RunContent").show();
            }
            else if (b == "1" && a == "1") {
                $("#ShouquanUrl").show();
                $("#RunContent").show();
            }
            else {
                $("#ShouquanUrl").hide();
                $("#RunContent").hide();
            }

        }
        function SetRunning() {
            var a = jQuery("#<%=this.RdbShouquan.ClientID %> :radio[checked]").val();
            var b = jQuery("#<%=this.RdbRunning.ClientID %> :radio[checked]").val();
             if (b == "1"&&a=="0") {
                 $("#ShouquanUrl").show();
             }
             else {
                 $("#ShouquanUrl").hide();
             }

         }
        function SetFreeListening() {
            var b = jQuery("#<%=this.RabIsFreeListening.ClientID %> :radio[checked]").val();
            if (b == "1") {
                $("#FreeListening").show();
            }
            else {
                $("#FreeListening").hide();
            }
        }
   
        jQuery(document).ready(function () {

            SetThreeScreen();
            SetShouquan();
            //SetRunning();
           // SetFreeListening();
        });
    </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 class="active"><a href="KS.CosAPIConfg.aspx"><span>网授视频接口设置</span></a></li>
            <li><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" />
                   <ItemStyle Width="50px" HorizontalAlign="Center" />
                         <ItemTemplate>
                       <%# (Convert.ToString(Eval("id").ToString())=="6" || Convert.ToString(Eval("id").ToString())=="1"  || Convert.ToString(Eval("id").ToString())=="11") ?"<font color='red'>是</font>":"--" %>
                   
                        
                    </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.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>

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

            <PagerStyle CssClass="Page" HorizontalAlign="Right" />
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
        </KS:KSGV>
        <br />
        <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><br />
					<span class="msgtips"><font color="red">
                      引用第三方视频: PC版的调用视频的脚本和手机版的调用视频的脚本的填写方式：如果参数是一个，用{KS:PLAY1},如果参数是多个，用{KS:PLAY1},{KS:PLAY2},按顺序下去，从1开始算起</font>
                      本地视频:则参{KS:Url} 这个为视频址路径</span>
                </td>
            </tr>
            <tr>
                <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>
            <%if(Utils.StrToInt(KSCMS.S("autoid"))==6){ %>
            <tr>
                <td class="lefttd" height="30" style="width: 258px">
                    <strong>授权播放接口设置：</strong></td>
                <td class="righttd">&nbsp;<asp:RadioButtonList ID="RdbShouquan" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"  onclick="SetShouquan()">
                    <asp:ListItem Value="0" Selected="True">不启用</asp:ListItem>
                    <asp:ListItem Value="1">启用</asp:ListItem>
                </asp:RadioButtonList>
           
                    <font color="red">（温馨提示：请确保您所购买的保利威点播套餐支持本功能）</font>
                </td>
            </tr>
            
            
             <tr>
                <td class="lefttd" height="30" style="width: 258px" nowrap>
                    <strong>是否跑马灯设置：</strong></td>
                <td class="righttd">&nbsp;<asp:RadioButtonList ID="RdbRunning" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"  onclick="SetShouquan()">
                    <asp:ListItem Value="0" Selected="True">不启用</asp:ListItem>
                    <asp:ListItem Value="1">启用</asp:ListItem>
                </asp:RadioButtonList>
           
                    <font color="red">（温馨提示：请确保您所购买的保利威点播套餐支持本功能，此功能只支持PC,（防录屏)）</font>
                </td>
            </tr>
             <tr id="ShouquanUrl" style="display:none">
                <td class="lefttd" height="30" align="right" style="width: 258px"><b>授权播放接口设置Url：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="TxtSqUrl" CssClass="textbox" runat="server"   Enabled="false"></asp:TextBox>

                    <br /><font color="red">(这个url也是跑马灯共用的url,请把这个地址复制到保利威视后台的-“视频设置”- 授权播放接口设置，如图操作）:</font><img src="/SysImg/Shouquan.jpg"  height=""/>
                </td>
            </tr>
              <tr id="RunContent" style="display:none">
                <td class="lefttd" height="30" align="right" style="width: 258px"><b>跑马灯的内容：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="TxtRunContent" CssClass="textbox" runat="server"   Width="650px" TextMode="MultiLine" Height="150px"></asp:TextBox>
                    <br /><font color="red">(如果改内容不填写的话,将直接读取当前学员的用户名的,反之，将读取该内容的,该内容不能有特殊符号，也不支持换行。)</font>
                </td>
            </tr>
               <tr>
                <td class="lefttd" height="30" style="width: 258px">
                    <strong>是否启用视频试听几分钟：</strong></td>
                <td class="righttd">&nbsp;<asp:RadioButtonList ID="RabIsFreeListening" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"  >
                    <asp:ListItem Value="0" Selected="True">不启用</asp:ListItem>
                    <asp:ListItem Value="1">启用</asp:ListItem>
                </asp:RadioButtonList>
                   
                    <font color="red">（温馨提示：请确保您所购买的保利威点播套餐支持本功能）</font>
                </td>
            </tr>
            <tr>
                <td class="lefttd" height="30" style="width: 258px">
                    <strong>是否启用三分屏：</strong></td>
                <td class="righttd">&nbsp;<asp:RadioButtonList ID="RdbIsThreeScreen" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"  onclick="SetThreeScreen()">
                    <asp:ListItem Value="0" Selected="True">不启用</asp:ListItem>
                    <asp:ListItem Value="1">启用</asp:ListItem>
                </asp:RadioButtonList>
                  
                    <font color="red">（温馨提示：请确保您所购买的保利威点播套餐支持本功能,此功能只支持PC）</font>
                </td>
            </tr>

           
            <tr id="ThreeenScreen" style="display:none">
                <td class="lefttd" height="30" align="right" style="width: 258px"><b>三分屏的调用视频播放器的脚本：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="TxtScreen" CssClass="textbox" runat="server" Height="150px" TextMode="MultiLine" Width="650px"></asp:TextBox>
             		<br /><font color="red">部份云视频有三分屏设置(保利威视就有三分屏设置)只支持PC版的，没有可留空</font>
                </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>
     


              <tbody id="portinfo"<%=KSCMS.S("autoid")=="1"?" style='display:none'":"" %>>
               <tr>
                <td class="lefttd" height="30" align="right" style="width: 258px"><b>ACCESS_KEY：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="ACCESS_KEY" CssClass="textbox" runat="server"  Width="300px"></asp:TextBox>
             		<font color="red">appID上传时必须 writetoken</font>
                </td>
            </tr>
               <tr>
                <td class="lefttd" height="30" align="right" style="width: 258px"><b>SECRET_KEY：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="SECRET_KEY" CssClass="textbox" runat="server"  Width="300px"></asp:TextBox>
                 	<font color="red">read SECRETKY上传时必须</font>
                </td>
            </tr>
               <tr >
                <td class="lefttd" height="30" align="right" style="width: 258px"><b>WEB授权验证：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="USER_DOMAIN" CssClass="textbox" runat="server"  Width="300px"></asp:TextBox>
                  	<font color="red">  SecretKey WEB授权验证  </font>
                </td>
            </tr>
                <tr  >
                <td class="lefttd" height="30" align="right" style="width: 258px"><b> 上传目录/用户ID：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="USER_AGENT" CssClass="textbox" runat="server"  Width="200px"></asp:TextBox>
                 	<font color="red"> UID/USER_AGENT </font>
                </td>
            </tr>
             <tr  >
                <td class="lefttd" height="30" align="right" style="width: 258px"><b> APP播放SDK：</b></td>
                <td class="righttd">
                    <asp:TextBox ID="APP_SDK" CssClass="textbox" runat="server"  TextMode="MultiLine" Height="100px" Width="300px"></asp:TextBox><br />
                 	<font color="red"> SDK 如遇到安卓|IOS需要不同的用坚线隔开cbyps7ngqjd6|x9qdy532mh</font>  
                </td>
            </tr>
       </tbody>

        </table>
        <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
    </asp:Panel>
    
  </div>  
</asp:Content>
