<!--#include file="conn.asp"-->
<%
page_title=Eval("about_title"&Language)
page_keywords=Eval("about_keywords"&Language)
page_description=Eval("about_description"&Language)
if page_title="" then
page_title=city_title
page_keywords=city_keywords
page_description=city_description
end if
%>
<!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-Language" content="zh-CN">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><%=page_title%></title>
<meta name="keywords" content="<%=page_keywords%>" />
<meta name="description" content="<%=page_description%>" />
<!--#include file="top.asp"-->
<!--#include file="header.asp"-->
  
  
  <link href="<%=filepath%>inc/login.css" rel="stylesheet" type="text/css">
<style type="text/css">
    .login
    {
        width: 90px;
        height: 36px;
        line-height: 36px;
        border: none;
        background: url(images/btn_bg.png);
        font-size: 14px;
        font-weight: bold;
        color: #fff;
        cursor: pointer;
    }
.ul-1{padding-left:35px;clear:both;height:100px;border-top:1px solid #e1e1e1;}    
.ul-1 li.li-1{clear:both;float:none;height:30px;line-height:30px;margin-right:0;}
.ul-1 li{float:left;margin-right:10px;margin-top:5px;}
</style>

<script type="text/javascript">
function checkInput() {
    if ($("#ipt_mail").val() == "") {
        alert("请输入用户名或电子邮件地址！");
        $("#ipt_mail").focus();
        return false;
    } else {
        //checkEmail();
        if ($("#ipt_pwd").val() == "") {
            alert("请输入密码！");
            $("#ipt_pwd").focus();
            return false;
        } else {
            if ($("#ipt_yzm").val() == "") {
                alert("请输入验证码！");
                $("#ipt_yzm").focus();
                return false;
            } else {
                go_login();
            }
        }
    }
}

function checkEmail() {
    if ($("#ipt_mail").val() != "") {
        var emailReg = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
        if (emailReg.test($("#ipt_mail").val())) {
            return true;
        } else {
            alert("您输入的Email地址格式不正确！");
            return false;
        }
    }
} 
</script>

<script type="text/javascript"> 
function go_login() {
    $("#jz").css("display", "");
	var postUrl = "Ajax.asp";
	//var postUrl = "http://c.genanx.com/Tool/Ajax.ashx";
    var re = false;
    var usermail = $.trim($("#ipt_mail").val());
    var password = $.trim($("#ipt_pwd").val());
    var vcode = $.trim($("#ipt_yzm").val());
	var successUrl = $.trim($("#successUrl").val());
    var param = $.param({
        op: "shoplogin",
        usermail: usermail,
        password: password,
        vcode: vcode,
		successUrl: successUrl
    });
    jQuery.getScript(postUrl + "?" + param + "&callback=?",
    function(data) {
        if (data) { 
            //alert(data);
        }
    });
}

function jsonp_callback(t) {
    $("#jz").css("display", "");
    var j = eval('(' + t + ')');
    if (j.result == 0) {
        re = true;
        location.href = j.sUrl;
            //用户登录完合并购物车商品
            //$.Deferred(updateCartUserId).done(function(){
               // location.href = "../index.asp";
            //});
        
    } else {
        $("#jz").css("display", "none");
        alert(j.msg);
        $("#makeCode").attr("src", $("#makeCode").attr("src") + "?"); //重新生成验证码
        re = false;
    }
}

function shop_Login(userId) {
        $.ajax({    
        type: 'POST',
        url: 'ajax/Ajax.ashx',
        data: 'Op=Login&userId='+userId,
        cache: false,
        contentType:"application/x-www-form-urlencoded; charset=utf-8",
        timeout:10000,
        dataType: 'text',
        success: function(j) {
            location.href = "#";
        }
    });
}
</script>

<div id="content" class="w990">
            <div class="layout">
                <div class="col-main">
                    <div class="box main-crumbs">
                    </div>
                    <div class="clearfix">
                        <div class="col580 fleft">
                            <div class="box">
                                <div class="bd">
                                    <div class="tl-login">
                                        <div class="user-form">
                                           <div class="boxtit">
                                        <h3>已注册用户请从这里登录</h3>
                                    </div>
									<% if request("backurl")<>"" then%>
										<div id="error" >
    	                                    <ul class="messages">
        	                                    <li class="error-msg"><span>请先登录，以便继续您的购物之旅！</span></li>
            	                            </ul>
                	                    </div>
									 <%end if%>
                                            <input type="hidden" name="successUrl" id="successUrl" value="<%if request("backurl")<>"" then%><%=request("backurl")%><%else%>menber.asp<%end if%>">
                                            <p class="spacer">
                                                请输入您注册的<strong>用户名或电子邮件地址<!--电子邮件地址--></strong>：</p>
                                            <p class="spacer">
                                                <input name="uname" id="ipt_mail" class="text" type="text"  /><!--onblur="checkEmail();"-->
                                            </p>
                                            <p class="spacer">
                                                密码：</p>
                                            <p class="spacer">
                                                <input name="passwd" id="ipt_pwd" class="text" type="password" />
                                            </p>
                                            <p class="spacer">
                                                验证码：</p>
                                            <p class="spacer">
                                                <input name="ipt_yzm" id="ipt_yzm" class="text" style="width: 80px;" maxlength="5" /><img src="../inc/code.asp" border="0" title="没有看清？点击换一个..." onClick="this.src='../inc/code.asp?'"+Math.random()+"'" id="makeCode" style="margin-left: 10px; vertical-align: middle;cursor:hand;">
													
                                            </p>
                                            <p class="spacer">
                                                <a href="getpassword.asp" target="_blank">忘记密码？</a></p>
                                            <p class="spacer">
                                                <button class="login" id="login" onclick='checkInput();'>
                                                    登录</button>
                                                <img src="images/loading.gif" alt="Loading..." id="jz" style="display: none;" />
                                            </p>
												<!--<ul class="ul-1">
												<li class="li-1">使用合作网站账号登录：</li>                                                                                                       
												<li><a href="#"><img src="images/weibo_1.jpg" /></a></li>						
												<li><a href="#"><img src="images/Connect_logo_4.png" /></a></li>                                                                         
												<li><a href="#"><img src="images/alipay_button.png" /></a></li>
												</ul>-->    

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col400 fright">
                            <div class="box">
                                <div class="bd">
                                    
                                    <div class="tl-login">
                                        <div class="user-form">
                                            <h3>还不是商城用户？</h3>
                                            <p class="spacer-r">
                                                现在免费注册成为会员用户，便能立刻享受便宜又放心的购物乐趣。</p>
                                            <p class="spacer-r">
                                                <a class="s_regbtn" href="Regist.asp">注册新用户</a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>        
        </div>
  
<!--#include file="foot.asp"--> 