<%@ Page Title="" Language="C#" MasterPageFile="~/Management/SiteManage.Master" AutoEventWireup="true"
    CodeBehind="Main.aspx.cs" Inherits="Amr.SuperSiteGroup.Web.Management.Main" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        $.ajax({
            type: "GET",
            url: "Async.aspx?type=GetNews",
            success: function (content) {
                $("#news").html(content);
            }
        });

        $.ajax({
            type: "GET",
            url: "Async.aspx?type=GetHelps",
            success: function (content) {
                $("#helps").html(content);
            }
        });

        $.ajax({
            type: "GET",
            url: "Async.aspx?type=CheckInternet",
            success: function (content) {
                $("#internet").html(content);
            }
        });
    </script>
    <div class="right">
        <div class="clear" style="margin-top: 10px;">
        </div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_list">
            <tr>
                <td width="100%" class="tr1">
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td align="right">
                                官方交流群：
                                <%=siteNameAlias %>（主群）<a target="_blank" href="http://wp.qq.com/wpa/qunwpa?idkey=773ff286b445c9a549a88ce5f44d68ff6add178d8f2a3ee220366908bb6dd12a"><img
                                    border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="AMR采集系统（主群）"
                                    title="AMR采集系统（主群）"></a> （分群一）<a target="_blank" href="http://wp.qq.com/wpa/qunwpa?idkey=47a164c38ec247581491281d58a95a89921f81e6bc72e93f3196d9c67c9c7713"><img
                                        border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="AMR采集系统（分群一）"
                                        title="AMR采集系统（分群一）"></a>（分群二）<a target="_blank" href="http://wp.qq.com/wpa/qunwpa?idkey=6a953d379246f9febebb00853b041728f13a5800aa0a5225c5e31b61d40c1427"><img
                                            border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="AMR采集系统（分群二）"
                                            title="AMR采集系统（分群二）"></a> 官方微博：
                            </td>
                            <td align="left" style="padding-top: 3px;">
                                <wb:follow-button uid="3194636401" type="gray_1" width="67" height="24">
                                </wb:follow-button>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1>
                        站点列表（便于站群用户管理）<a href="SiteInfo.aspx?operation=1">【新建站点】</a></h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <asp:GridView ID="SiteList" runat="server" AutoGenerateColumns="False" EnableModelValidation="True"
                        Width="100%" CellPadding="2" GridLines="None" CssClass="table_list" DataKeyNames="SiteId"
                        AllowPaging="True" AllowSorting="False" CellSpacing="1" OnSelectedIndexChanged="SiteList_SelectedIndexChanged"
                        OnPageIndexChanging="SiteList_PageIndexChanging">
                        <AlternatingRowStyle CssClass="tr_b" />
                        <AlternatingRowStyle />
                        <Columns>
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlSwitchSite" runat="server" NavigateUrl='<%# Bind("Description") %>'
                                        Target="_blank">切换</asp:HyperLink> 
                                    <a href='SiteInfo.aspx?siteid=<%# Eval("SiteId") %>'>编辑</a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="站点编号" InsertVisible="False" SortExpression="SiteId">
                                <ItemTemplate>
                                    <asp:Label ID="LabSiteId" runat="server" Text='<%# Bind("SiteId") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:Label ID="LabSiteId" runat="server" Text='<%# Eval("SiteId") %>'></asp:Label>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="SiteName" HeaderText="站点名称" SortExpression="SiteName" />
                            <asp:BoundField DataField="SiteProtoco" HeaderText="站点协议" SortExpression="SiteProtoco" />
                            <asp:BoundField DataField="SitePort" HeaderText="站点端口" SortExpression="SitePort" />
                            <asp:BoundField DataField="SiteChildDomain" HeaderText="站点域名前缀" SortExpression="SiteChildDomain" />
                            <asp:BoundField DataField="SiteRootDomain" HeaderText="站点根域名" SortExpression="SiteRootDomain" />
                            <asp:TemplateField HeaderText="站点状态" SortExpression="SiteStatus">
                                <EditItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("SiteStatus") %>' />
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="LabSiteStatus" runat="server" Text='<%# Bind("SiteStatus") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="CreatedOn" HeaderText="创建时间" SortExpression="CreatedOn" />
                        </Columns>
                        <EditRowStyle CssClass="tr_a" />
                        <EmptyDataTemplate>
                            <p style="padding: 0 10px;">
                                此处仅显示除本站以外的站点，目前没有发现更多站点；<br />
                                请确认您数据库里面安装了更多的站点，并且您拥有对这些站点的管理权限。
                            </p>
                        </EmptyDataTemplate>
                        <FooterStyle CssClass="dg_header" />
                        <HeaderStyle CssClass="tr1" />
                        <PagerStyle CssClass="dg_page" />
                        <RowStyle CssClass="tr_a" />
                        <AlternatingRowStyle CssClass="tr_b" />
                        <SelectedRowStyle CssClass="tr_a" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        官方动态</h1>
                    <span style="float: right; line-height: 30px; padding-right: 42px;"><a href="http://www.Amr-Lab.net/showforum.aspx?forumid=3"
                        target="_blank">提交问题</a></span>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_list">
                        <tr>
                            <td width="50%" class="tr1">
                                最新动态
                            </td>
                            <td width="50%" class="tr1">
                                帮助中心
                            </td>
                        </tr>
                        <tr>
                            <td class="tr_a" valign="top" id="news">
                                <img src="images/loading.gif">
                            </td>
                            <td class="tr_a" valign="top" id="helps">
                                <img src="images/loading.gif">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1>
                        基本信息统计</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_list">
                        <tr>
                            <td width="50%" class="tr1">
                                参数
                            </td>
                            <td width="50%" class="tr1">
                                值
                            </td>
                        </tr>
                        <tr align="center">
                            <td class="tr_a" valign="top">
                                服务器名
                            </td>
                            <td class="tr_a" valign="top">
                                <%=Request.ServerVariables["SERVER_NAME"]%>
                            </td>
                        </tr>
                        <tr align="center">
                            <td class="tr_a" valign="top">
                                服务器操作系统
                            </td>
                            <td class="tr_a" valign="top">
                                <%=System.Environment.OSVersion.ToString()%>
                            </td>
                        </tr>
                        <tr align="center">
                            <td class="tr_a" valign="top">
                                系统安装目录
                            </td>
                            <td class="tr_a" valign="top">
                                <%=Request.ServerVariables["APPL_PHYSICAL_PATH"]%>
                            </td>
                        </tr>
                    </table>
                    <div class="clear" style="margin-top: 10px;">
                    </div>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_list">
                        <tr>
                            <td width="50%" class="tr1">
                                需开启的变量或函数
                            </td>
                            <td width="10%" class="tr1">
                                要求
                            </td>
                            <td width="40%" class="tr1">
                                实际状态及建议
                            </td>
                        </tr>
                        <tr>
                            <td class="tr_a" valign="top">
                                采集功能
                            </td>
                            <td class="tr_a" valign="top">
                                <div align="center">
                                    <img src="images/ico_ok.gif" width="16" height="16" /></div>
                            </td>
                            <td class="tr_a" valign="top">
                                <div align="center" id="internet">
                                    <img src="images/loading.gif">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="tr_a" valign="top">
                                自定义403.14、404、414错误页为/Unaccessible.aspx
                            </td>
                            <td class="tr_a" valign="top">
                                <div align="center">
                                    <img src="images/ico_ok.gif" width="16" height="16" />
                                </div>
                            </td>
                            <td class="tr_a" valign="top">
                                <div align="center">
                                    IIS7用户无需设置；IIS5，6用户必须设置为指定错误页，否则系统无法使用
                                </div>
                            </td>
                        </tr>
                    </table>
                    <div class="clear" style="margin-top: 10px;">
                    </div>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_list">
                        <tr>
                            <td width="50%" class="tr1">
                                目录名
                            </td>
                            <td width="10%" class="tr1">
                                读取权限
                            </td>
                            <td width="40%" class="tr1">
                                写入权限
                            </td>
                        </tr>
                        <tr>
                            <td class="tr_a" valign="top">
                                <%=Request.ServerVariables["APPL_PHYSICAL_PATH"]%>
                            </td>
                            <td class="tr_a" valign="top">
                                <img src="images/<%=CheckReadPermission() %>" width="16" height="16" />
                            </td>
                            <td class="tr_a" valign="top">
                                <img src="images/<%=CheckWritePermission() %>" width="16" height="16" /><asp:Label
                                    ID="errorInfo" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <!-- 广告位：AMR系统后台广告 -->
    <script type="text/javascript">        BAIDU_CLB_SLOT_ID = "644159";</script>
    <script type="text/javascript" src="http://cbjs.baidu.com/js/o.js"></script>
</asp:Content>
