<%@ Page Language="C#" AutoEventWireup="true" Inherits="com.xykj.modulecontrol.Account" %>

<%@ Import Namespace="com.xykj.business.View.Account" %>
<%@ Import Namespace="com.xykj.common" %>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        /*
            var can = com.xykj.system.Security.CanLoginIP(new System.Collections.Generic.List<string>() { 
                     "122.111.11.41",
                     "127.0.0.1"
                    });
            if (!can)
            {
                Response.Clear();
                Response.Write("IP禁止访问");
                Response.End();
                return;
            }*/
        var ver = double.Parse(XY.Browser.Version);
        if (XY.Browser.Name == "IE" && ver < 8)
        {
            Response.Clear();
            Response.Write("浏览器版本过低 请更换浏览器或者升级到最新版本IE<br/>下载地址:<a href='http://windows.microsoft.com/zh-cn/internet-explorer/download-ie'>下载IE最新版本</a>");
            Response.End();
            return;
        }

        if (Administrator.Admin == null)
        {
            Response.Redirect("login.aspx", true);
        }
        GroupManage gm = new com.xykj.business.View.Account.GroupManage();
        var group = gm.GetGroupById(Administrator.Admin.Group);
        if (!group.IsAdmin)
        {
            Response.Redirect("/message-9999999.html", true);
        }
    }    
</script>
