<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.Course.KS_liveaccountList" CodeBehind="KS.liveaccountList.aspx.cs" %>

<%@ Import Namespace="Kesion.Publics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">
    <KS:TopNav ID="TopNav1" runat="server" Text="云视频口管理" />

    <asp:Panel ID="ListPanel" runat="server" Width="100%">
        <div class="tabs_header">
            <ul>
                <li id='p1' <%=(pid>0)?"style='display:none'":"" %>>
                    <asp:LinkButton ID="addclassbutton" runat="server" OnClick="addclassbutton_Click"><b></b>添加账号</asp:LinkButton>
                </li>

            </ul>
        </div>
        <div class="content-area">
            <KS:KSGV ID="list" CssClass="CTable  template_msg" runat="server" Width="97%" AutoGenerateColumns="False" EmptyDataText="暂无自定义直播视频播放器接口记录!" GridLines="None" PagerType="CustomNumeric" OnRowDataBound="list_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="序号">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%# Convert.ToInt16(list.PageIndex)*Convert.ToInt16(list.PageCount)+1 %>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="标题">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%#Eval("name") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="推流域名">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%#Eval("livedomain") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="播放域名">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%#Eval("playdomain") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Uid">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%#Eval("uid") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="APPID">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%#Eval("appid") %>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="房间总数">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%#Eval("maxchannel") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="已使用">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%# getTotalLiveRoom(Utils.StrToInt(Eval("id"))) %>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="类型">
                        <ItemStyle Width="50px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <%#Convert.ToString(Eval("issys").ToString())=="0"?"<font color='green'>系统</font>":"<font color='red'>自定义</font>" %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <a href="KS.LiveRoom.aspx?livetype=<%#Eval("serverid") %>&accountid=<%#Eval("id") %>" class="link-color">房间查询</a>
                            <a href="?action=modify&id=<%#Eval("id") %>&serverid=<%#Eval("serverid") %>" class="link-color">修改</a>
                            <a href="?action=del&id=<%#Eval("id") %>&serverid=<%#Eval("serverid") %>" class="link-color">删除</a>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>

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

        </div>
    </asp:Panel>

    <asp:Panel ID="AddPanel" runat="server" Width="100%">
        <div class="content-area">
            <table width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable">

                <tr>
                    <td class="lefttd" height="30" align="right" style="width: 102px"><b><font color="red">*</font>名称：</b></td>
                    <td class="righttd">
                        <asp:TextBox ID="TxtPlayName" CssClass="textbox" runat="server" Height="23px"></asp:TextBox>

                    </td>
                </tr>

                <%if (KSCMS.S("serverid") == "1" || KSCMS.S("serverid") == "6")
                    { %>
                <tr>
                    <td class="lefttd" height="30" align="right" style="width: 102px">
                        <b>UID:
                        </b></td>
                    <td class="righttd">
                        <asp:TextBox ID="Uid" CssClass="textbox" runat="server"></asp:TextBox>
                        <font color="red">用户唯一标识</font>
                    </td>
                </tr>
                <%}
                    if (KSCMS.S("serverid") == "3" || KSCMS.S("serverid") == "4")
                    { %>
                <tr>
                    <td class="lefttd" height="30" align="right" style="width: 102px">
                        <b>推流域名 </b></td>
                    <td class="righttd">
                        <asp:TextBox ID="liveDomain" CssClass="textbox" runat="server" Text="video-center.alivecdn.com"></asp:TextBox>
                        <font color="red">根据设置推流域名(live.abc.com)进行准主播数据推送到服务器</font>
                    </td>
                </tr>
                <tr>
                    <td class="lefttd" height="30" align="right" style="width: 102px">
                        <b>播放域名 </b></td>
                    <td class="righttd">
                        <asp:TextBox ID="PlayDomain" CssClass="textbox" runat="server"></asp:TextBox>
                        <font color="red">客户端显示的播放域名(play.abc.com)</font>
                    </td>
                </tr>
                <%}
                    else
                    { %>

                <%if (KSCMS.S("serverid") != "6")
                    { %>
                <tr>
                    <td class="lefttd" height="30" align="right" style="width: 102px"><b>APPID：</b></td>
                    <td class="righttd">
                        <asp:TextBox ID="App_ID" CssClass="textbox" runat="server"></asp:TextBox>
                        <font color="red">appID创建</font>
                    </td>
                </tr>
                <%} %>
                <tr>
                    <td class="lefttd" height="30" align="right" style="width: 102px"><b>app_Key：</b></td>
                    <td class="righttd">
                        <asp:TextBox ID="app_Key" CssClass="textbox" runat="server"></asp:TextBox>
                        <font color="red">SECRETKY</font>
                    </td>
                </tr>
                <% }
                    if (KSCMS.S("serverid") == "1" || KSCMS.S("serverid") == "5")
                    { %>
                <tr>
                    <td class="lefttd" height="30" align="right" style="width: 102px"><b>最大创建房间数：</b></td>
                    <td class="righttd">
                        <asp:TextBox ID="maxchannel" CssClass="textbox" runat="server">20</asp:TextBox>
                        <font color="red">20</font>
                    </td>
                </tr>
                <%} %>
            </table>

        </div>
        <div style="clear: both; text-align: center">
            <br />
            <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
        </div>
    </asp:Panel>

</asp:Content>

