<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="SWTraining.Login" %>

<%@ Register Src="UserCol/ValidateCode.ascx" TagName="ValidateCode" TagPrefix="uc3" %>
<%@ Import Namespace="SWTraining" %>
<!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 runat="server">
    <title>
        <%=swq.SystemName%></title>
    <link id="linkStyle" runat="server" href="Themes/Blue/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">


        //选择菜单代码:::::::::::::
        var lastSelected = null;

        function Selected(the, type) {
            if (the == lastSelected) {
                return;
            }

            var TdSelected = the;
            TdSelected.className = "bgimg1 TdSelected bgc6";
            if (lastSelected != null) {
                lastSelected.className = "Nav_td";
            }
            lastSelected = TdSelected;
            document.getElementById("hfdLoginType").value = type;
            if (type == 1) {
                Account.innerHTML = "登录名：";
            }
            else {
                Account.innerHTML = "学号：";
            }
        }

        function mouseover(the) {
            currentClass = the.className;
            if (currentClass == 'Nav_td') the.className = 'Nav_td mouseoverbg bgc4';
        }

        function mouseout(the) {
            if (the != lastSelected)
                the.className = currentClass;
        }



        function defaultSelected() {
            var type = document.getElementById("hfdLoginType").value;
            if (type == 1) {
                tduser = document.getElementById("user");
                Selected(tduser, 1);
            }
            else {
                tdstu = document.getElementById("stu");
                Selected(tdstu, 2);
            }

            var showtype = document.getElementById("hfdShowType").value;
            if (showtype != 3) {
                if (showtype == 1)
                    document.getElementById("stu").style.display = "none";
                else
                    document.getElementById("user").style.display = "none";
            }

        }


        
    </script>
    <script type="text/javascript">

        function CloseMsg() {
            document.getElementById("tbMsg").style.display = "none";
            document.getElementById("tbMsg").style.visibility = "hidden";
        }
    </script>
    <style type="text/css">
        html,body
        {
             height:100%;
            }
        
        .Nav_td
        {
            width: 100px;
            border-style: solid;
            border-width: 0px 0px 1px 0px;
            cursor: pointer;
            cursor: hand;
            height: 26px;
            text-align: center !important;
        }
        .TdSelected
        {
            width: 100px;
            border-style: solid !important;
            border-width: 1px 1px 0px 1px !important;
            background-repeat: repeat-x !important;
            text-align: center;
            height: 26px;
            font-weight: bold;
        }
        .mouseoverbg
        {
            font-weight: bold;
        }
    </style>
</head>
<body onload="defaultSelected()" class="login_bodybg" style="margin: 0px; padding: 0px">
    <div class="png_bg login_bg" style=" height:100%">
        <form id="form1" runat="server">

        <table cellpadding="0" style="width: auto; margin: 2px" cellspacing="0" runat="server"
            id="tbMsg">
            <tr>
                <td style="border: solid 1px #DF8434; background-color: #FEE7A2; padding: 2px; text-align: center;
                    vertical-align: middle; line-height: 20px">
                    <nobr>
                    <div style="float: left">
                        <span style="color: Red">系统提醒：</span><asp:Literal ID="litMsg" runat="server"></asp:Literal><asp:CheckBox ID="cbxKnow" runat="server" /><span style="color: #6F6667">知道了，下次不再提醒！</span></div>
                    <div style="width: 16px; height: 16px; border: solid 1px #DF8434; text-align: center;
                        vertical-align: middle; line-height: 16px; float: left; background-color: White">
                        <a href="#" onclick=" javascript:CloseMsg();">X</a>
                    </div>
                    <div style="clear: both; font-size: 0px; line-height: 0px">
                    </div>
                </nobr>
                </td>
            </tr>
        </table>
        <div class="divpanel" style=" padding-top:120px; text-align: center">
            <div style="margin-left: auto; margin-right: auto; width: 420px">
            </div>
            <table cellpadding="0" cellspacing="0" style="margin-left: auto; margin-right: auto;">
                <tr>
                    <td class="login_box_j" style="width: 9px; height: 9px; background-repeat: no-repeat;
                        background-position: left top">
                    </td>
                    <td class="login_box_t">
                    </td>
                    <td class="login_box_j" style="width: 9px; height: 9px; background-repeat: no-repeat;
                        background-position: right top">
                    </td>
                </tr>
                <tr>
                    <td class="login_box_l" style="width: 9px;">
                    </td>
                    <td class="login_bg1c" style="padding-left: 20px; padding-right: 20px; padding-bottom: 2px">
                        <!--内容开始//-->
                        <div class="png_bg" style="width: 420px; height: 60px; background-image: url('Images/LoginPic.png');
                            text-align: left">
                            <div class="png_bg" style="width: 60px; height: 60px; background-image: url('<%=swq.LoginLogo%>')">
                            </div>
                        </div>
                        <table cellpadding="0" cellspacing="0" style="margin-left: auto; margin-right: auto">
                            <tr>
                                <td class="login_bg2c1" style="padding-top: 2px">
                                    <!--内容开始//-->
                                    <table style="width: 350px; text-align: left; border-width: 0px" cellspacing="0"
                                        class="login">
                                        <tr>
                                            <th colspan="11" style="height: 2px;">
                                                <div>
                                                </div>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td class="Nav_td" style="width: 10px;">
                                                &nbsp;
                                            </td>
                                            <td class="Nav_td" id="user" onclick="Selected(this,1)" onmouseover="mouseover(this)"
                                                onmouseout="mouseout(this)">
                                                员工登录
                                            </td>
                                            <td class="Nav_td" id="stu" onclick="Selected(this,2)" onmouseover="mouseover(this)"
                                                onmouseout="mouseout(this)">
                                                学员登录
                                            </td>
                                            <td class="Nav_td">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="4" class="bgc6" style="border-left-width: 1px; border-right-width: 1px;
                                                border-bottom-width: 1px">
                                                <table cellpadding="4" class="login_font">
                                                    <tr>
                                                        <td style="width: 126px; text-align: right;" id="Account">
                                                            帐号：
                                                        </td>
                                                        <td style="width: 351px">
                                                            <asp:TextBox ID="tbxUserName" runat="server" Width="145px" CssClass="login_input"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ID="_tbxUserName" runat="server" ControlToValidate="tbxUserName"
                                                                Display="Dynamic"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="width: 126px; text-align: right;">
                                                            密码：
                                                        </td>
                                                        <td style="width: 351px">
                                                            <asp:TextBox ID="tbxPassword" runat="server" Width="145px" TextMode="Password" CssClass="login_input"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ID="_tbxPassword" runat="server" ControlToValidate="tbxPassword"
                                                                Display="Dynamic"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr runat="server" id="trValidateNum" class="login_col">
                                                        <td style="width: 126px; text-align: right;">
                                                            验证码：
                                                        </td>
                                                        <td style="width: 351px">
                                                            <uc3:ValidateCode ID="ValidateCode1" runat="server" Partition="userlogin" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="width: 126px; text-align: right;">
                                                            会话：
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlSaveCookie" runat="server" CssClass="login_select">
                                                                <asp:ListItem Value="0">不保存</asp:ListItem>
                                                                <asp:ListItem Value="1">保存</asp:ListItem>
                                                            </asp:DropDownList>
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" style="width: 126px">
                                                        </td>
                                                        <td align="left">
                                                            <asp:Button ID="btnSubmit" runat="server" Text="登录" OnClick="btnSubmit_Click" CssClass="login_button">
                                                            </asp:Button>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                    <!--内容结束//-->
                                </td>
                            </tr>
                        </table>
                        <div style="margin: 10px">
                            <%=ViewState["Copyright"]%></div>
                        <!--内容结束//-->
                    </td>
                    <td class="login_box_r" style="width: 9px;">
                    </td>
                </tr>
                <tr>
                    <td class="login_box_j" style="width: 9px; height: 9px; background-repeat: no-repeat;
                        background-position: left bottom">
                    </td>
                    <td class="login_box_b">
                    </td>
                    <td class="login_box_j" style="width: 9px; height: 9px; background-repeat: no-repeat;
                        background-position: right bottom">
                    </td>
                </tr>
            </table>
            <div class="png_bg login_ref" style="margin-left: auto; margin-right: auto; width: 478px; height:47px; margin-top:5px" >
            </div>
            <asp:HiddenField ID="hfdLoginType" runat="server" Value="1" />
            <asp:HiddenField ID="hfdShowType" runat="server" Value="3" />
        </div>


        </form>
    </div>
</body>
</html>
