<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_Login, QianboCMS" EnableEventValidation="false" %>
<%@ Import Namespace="Qianbo.Common" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>千博网站管理系统 - 后台管理面板</title>
    <link href="AdminDefaultTheme/index.css" type="text/css" rel="stylesheet" />
    <link href="AdminDefaultTheme/MasterPage.css" type="text/css" rel="stylesheet" />
    <link href="AdminDefaultTheme/Guide.css" type="text/css" rel="stylesheet" />
    <link href="AdminDefaultTheme/Login.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../Js/Common.js"></script>
    <script type="text/javascript">
        var currFrame;
        function SetFrame(val) {
            if (val.parent != val) {
                SetFrame(val.parent);
            }
            else {
                currFrame = val;
            }
        }
        SetFrame(this);
        if (currFrame != window) {
            currFrame.location.href ='<%=Param.ApplicationRootPath%>/<%=Param.AdminDirName%>/Login.aspx'
        }
        function CheckValidate() {
            if ($("txtAdminName").value.trim().length == 0) {
                alert('用户名不能为空！');
                return false;
            }
            if ($("txtAdminPass").value.trim().length == 0) {
                alert('密码不能为空！');
                return false;
            }
            if ($("txtAdminRzm") != null && $("txtAdminRzm").value.trim().length == 0) {
                alert('认证码不能为空！');
                return false;
            }
            if ($("txtValidate").value.trim().length == 0) {
                alert('验证码不能为空！');
                return false;
            }
            return true;
        }
        function CheckBrowser() {
            var app = navigator.appName;
            var verStr = navigator.appVersion;
            if (app.indexOf('Netscape') != -1) {
                alert('提示：\n你使用的是Netscape、Firefox或者其他非IE浏览器，可能会导致无法使用后台的部分功能。建议您使用 IE7.0 或以上版本。');
            } else if (app.indexOf('Microsoft') != -1) {
                if (verStr.indexOf('MSIE 7.0') != -1)
                    alert('提示：\n如果后台功能异常，请在IE浏览器兼容性视图设置中，将网址加入到兼容性列表中。');
            }
        }
    </script>
</head>

<body id="loginbody">
    <form id="AdminLoginFrm" runat="server">
        <div id="adminboxall">
            <div class="adminboxtop"></div>
            <div id="adminboxmain">
                <div class="menu">
                    <asp:ImageButton ID="btnSubmit" ImageUrl="AdminDefaultTheme/LoginImages/admin_menu.gif" runat="server" Style="width: 76px; height: 26px;" OnClick="btnSubmit_Click" OnClientClick="return  CheckValidate();" />
                </div>
            </div>
            <div class="adminboxbottom">
                <div id="login">
                    <ul>
                        <li class="text">用户名：<br />
                            <div class="box1">
                                <asp:TextBox ID="txtAdminName" runat="server" MaxLength="20" CssClass="boxcontent"></asp:TextBox>
                            </div>
                        </li>
                        <li class="text">密 码：<br />
                            <div class="box2">
                                <asp:TextBox ID="txtAdminPass" runat="server" TextMode="Password" MaxLength="20" CssClass="boxcontent"></asp:TextBox>
                            </div>
                        </li>
                        <%
                            if (IsOpenRZM)
                            {
                        %>
                        <li class="text">管理认证码：<br />
                            <div class="box3">
                                <asp:TextBox ID="txtAdminRzm" runat="server" TextMode="Password" MaxLength="20" CssClass="boxcontent"></asp:TextBox>
                            </div>
                        </li>
                        <%}%>
                        <li class="textCode">验证码：<br />
                            <div class="box4">
                                <asp:TextBox ID="txtValidate" runat="server" CssClass="boxcontent2" MaxLength="20"></asp:TextBox>
                                <img src="../Common/Code.aspx?" id="IMG1" runat="server" align="absmiddle" onclick="this.src+=Math.random()" title="换个验证码" style="border-width: 0px; cursor: hand;" />
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <a href="http://www.qianbo.com.cn/" target="_blank">
                <img src="AdminDefaultTheme/LoginImages/admin_text.gif" width="186" border="0" height="10" /></a>
            <div class="clearbox"></div>
        </div>
    </form>
    <script language="javascript" type="text/javascript">
        CheckBrowser();
    </script>
</body>
</html>