<%@ Page Language="C#" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.User_UserLogin" Codebehind="UserLogin.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title>用户登录</title>
    <script src="../ks_inc/jquery.js"></script>
    <script src="../ks_inc/Kesion.Common.js"></script>
    <style type="text/css">
<!--
body{font-family: "\5FAE\8F6F\96C5\9ED1";}
.textbox
{
padding: 9px 9px 9px 34px;
width: 220px;
line-height: 20px;
border: 1px solid #d9e1e5;
border-radius: 3px;
outline: none;

}
TD
{
FONT-SIZE: 9pt;line-height: 130%;
}
a{text-decoration: none;} /* 链接无下划线,有为underline */
a:link {color: #000000;} /* 未访问的链接 */
a:visited {color: #333333;} /* 已访问的链接 */
a:hover{COLOR: #AE0927;} /* 鼠标在链接上 */
a:active {color: #0000ff;} /* 点击激活链接 */
#PopLogin{ margin-top:30px;}
#PopLogin td{font-size:14px;line-height:45px; }
#PopLogin td a{color: #009aff}
#PopLogin td span{}
#PopLogin td input{margin:2px; text-indent:5px; color:#666}
#PopLogin .txt{ font-size:14px;}
#PopLogin .btn{ color:#FFF;cursor:pointer; border:0; width:100%; height:48px; line-height:18px;background-color: #76b600;
border: 1px solid #76b600; font-size:18px;font-family: "\5FAE\8F6F\96C5\9ED1";display: inline-block;
border-radius: 5px;}

.sanf {
text-align: center;
margin-top: 20px;
font-size: 14px;
border-top: 1px solid #d9e1e5;
padding-top: 12px;}

 .login_bottom {
text-align: center;
margin-top: 30px;
font-weight: 500;
font-size: 14px;}
 .login_bottom a{color: #009aff;}
 
 
.user_ico, .pass_ico, .yz_ico, .em_ico {
background: url(/user/images/reg_ico.png) no-repeat;
}
 
 .user_ico {
background-position: 5px 10px;
}
.pass_ico {
background-position: 5px -20px;}

-->
</style>
<script>
    function check() {
        if ($("#<%=this.UserName.ClientID %>").val() == '' || $("#<%=this.UserName.ClientID %>").val() == '<%=Tips%>') {
            KesionJS.Alert('请输入<%= Tips%>！', '$("#<%=this.UserName.ClientID %>").focus();');
            return false;
        }
        if ($("#<%=this.PassWord.ClientID %>").val() == '' || $("#<%=this.PassWord.ClientID %>").val() == '******') {
            KesionJS.Alert('请输入登录密码！', '$("#<%=this.PassWord.ClientID %>").focus();');
            return false;
        }
        <%if (MyCache.GetCacheConfig(3).IndexOf("user/login.aspx") !=-1)
        { %>
        if ($("#<%=this.VerifyCode.ClientID %>").val() == '') {
            KesionJS.Alert('请输入验证码！', '$("#<%=this.VerifyCode.ClientID %>").focus();');
            return false;
        }

        <%} %>
    }
    $(document).ready(function () {
        jQuery("#<%=UserName.ClientID%>").focus(function () {
            if (jQuery("#<%=UserName.ClientID%>").val() == '<%=Tips%>') jQuery("#<%=UserName.ClientID%>").val('');
        });
        jQuery("#<%=UserName.ClientID%>").blur(function () {
            if (jQuery("#<%=UserName.ClientID%>").val() == '') jQuery("#<%=UserName.ClientID%>").val('<%=Tips%>');
        });
        jQuery("#<%=PassWord.ClientID%>").focus(function () {
            if (jQuery("#<%=PassWord.ClientID%>").val() == '******') jQuery("#<%=PassWord.ClientID%>").val('');
        });
        jQuery("#<%=PassWord.ClientID%>").blur(function () {
            if (jQuery("#<%=PassWord.ClientID%>").val() == '') jQuery("#<%=PassWord.ClientID%>").val('******');
        });



    });
</script>
</head>
<body leftmargin=0 topmargin=0 bgcolor="transparent">
    <form id="form1" runat="server">
        <asp:Panel ID="LoginPanel" runat="server" Width="100%">
        
        <table id="PopLogin" cellspacing="0" width="60%" align="center">
                <tr>
                    
                  
                    <td>
                        <asp:TextBox ID="UserName" CssClass="textbox user_ico" MaxLength="20" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="UserName"
                            Display="None" ErrorMessage="请输入用户名"></asp:RequiredFieldValidator>
                    </td>
                </tr>
        <tr>
            
            <td>
                <asp:TextBox ID="PassWord" TextMode="password" CssClass="textbox pass_ico" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Password"
                    Display="None" ErrorMessage="请输入密码"></asp:RequiredFieldValidator></td>
        </tr>
        <tr id="vefify" runat="server">
            
            <td>
                <asp:TextBox ID="VerifyCode" placeholder="验证码" CssClass="textbox pass_ico" Width="48px" runat="server"></asp:TextBox>
                <img src="../Plus/ValidateCode.aspx" border="0" style="cursor:pointer" onClick="this.src='../Plus/ValidateCode.aspx?t='+Math.random();" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="VerifyCode"
                    Display="None" ErrorMessage="请输入验证码"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
           <td>
               <a href="<%=BaseFun.GetRewriteUrl("getpassword") %>"  target="_blank" style=" float:right">忘记密码</a>
                 <label><asp:CheckBox ID="Cookies" CssClass="txt" runat="server" Checked="true" Text="永久登录" />
                     <label><asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                    ShowSummary="False" /></label>
                 </label>  
           
                    
            </td>
                    
        </tr>
        <tr>
            
            <td>
             <asp:Button ID="Button1" CssClass="btn" runat="server" OnClientClick="return(check());" Text="登 录" OnClick="Button1_Click" />
            
            </td>
         
        </tr>
        
                </table>
                
                <div class="login_bottom">
                        没有账号？<a href="<%=BaseFun.GetRewriteUrl("reg") %>?backurl=<%=KSCMS.GetComeUrl() %>" target="_blank">现在注册</a>
                 </div>       
				
				<div class="sanf">
	    
				<%
        
                    (new TemporaryVar()).ComeUrl = KSCMS.GetComeUrl();

                    StringBuilder sb = new StringBuilder();
                    if (MyCache.GetAccountAPIConfig("qq", "enable") == "true")
                    {
                        sb.AppendFormat(@"<a href=""{1}"" target=""_parent""><img border=""0"" src=""{{$GetSiteUrl}}sysimg/default/icon_qq.png"" align=""absmiddle"" title=""{0}""/></a>", MyCache.GetAccountAPIConfig("qq", "name"), BaseFun.GetRewriteUrl("qqlogin")+"?backurl="+KSCMS.GetComeUrl());
                    }
                    if (MyCache.GetAccountAPIConfig("weixin", "enable") == "true")
                    {
                        sb.AppendFormat(@" <a href=""{1}"" target=""_parent""><img border=""0"" src=""{{$GetSiteUrl}}sysimg/default/icon_weixin.png"" align=""absmiddle"" title=""{0}""/></a>", MyCache.GetAccountAPIConfig("weixin", "name"), BaseFun.GetRewriteUrl("weixinlogin") + "?backurl=" + KSCMS.GetComeUrl());
                    }
                    if (MyCache.GetAccountAPIConfig("sina", "enable") == "true")
                    {
                        sb.AppendFormat(@" <a href=""{1}"" target=""_parent""><img border=""0"" src=""{{$GetSiteUrl}}sysimg/default/icon_sina.png"" align=""absmiddle"" title=""{0}""/></a>", MyCache.GetAccountAPIConfig("sina", "name"), BaseFun.GetRewriteUrl("sinalogin") + "?backurl=" + KSCMS.GetComeUrl());
                    }
                    if (MyCache.GetAccountAPIConfig("alipay", "enable") == "true")
                    {
                        sb.AppendFormat(@" <a href=""{1}"" target=""_parent""><img border=""0"" src=""{{$GetSiteUrl}}sysimg/default/icon_alipay.png"" align=""absmiddle"" title=""{0}""/></a>", MyCache.GetAccountAPIConfig("alipay", "name"), BaseFun.GetRewriteUrl("alipaylogin") + "?backurl=" + KSCMS.GetComeUrl());
                    }
                    
                    string tp = sb.ToString().Replace("{$GetSiteUrl}", MyCache.GetCacheConfig(5) + KSCMS.GetInstallDir());
                    if (!string.IsNullOrEmpty(tp))
                    {
                        tp = "社交帐号登录：" + tp;
                    }		    
                    Response.Write(tp);
		%></div>
			
             
        </asp:Panel>
    
       <asp:Panel ID="LoginOKPanel" runat="server" Width="100%" Visible="false">
           <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></asp:Panel>
    </form>
   
</body>
</html>
