<?php
if(!defined('InEmpireCMS'))
{
	exit();
}
?>
<?php
$public_diyr['pagetitle']='会员登录';
$login='login';
$url="<a href=../../../>首页</a>&nbsp;>&nbsp;<a href=../cp/>会员中心</a>&nbsp;>&nbsp;会员登录";
require(ECMS_PATH.'e/template/incfile/header.php');
?>
<link href="/templets/member/common/css/login.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/templets/member/common/js/jquery.js"></script>
<script type="text/javascript" src="/templets/member/common/js/msgbox.js"></script>
<script type="text/javascript">
$(function(){
	$("#btnSignCheck").click(function(){
		if($("#txtUsername").val() == ''){
			bwError("请输入用户名");
			$("#txtUsername").trigger('focus');
			return false;
		}
		
		if($("#txtPassword").val() == ''){
			bwError("请输入密码");
			$("#txtPassword").trigger('focus');
			return false;
		}
		
		if($("#vdcode").val() == ''){
			bwError("请输入验证码");
			$("#vdcode").trigger('focus');
			return false;
		}
		
		$(this).closest("form").submit();
	});
});

function changeAuthCode() {
	var num = 	new Date().getTime();
	var rand = Math.round(Math.random() * 10000);
	num = num + rand;
	$('#ver_code').css('visibility','visible');
	if ($("#vdimgck")[0]) {
		$("#vdimgck")[0].src = "/e/ShowKey/?v=login&num=" + num;
	}
	return false;	
}
var childWindow;
function toQzoneLogin(){
	childWindow =window.open("/e/memberconnect/?apptype=qq&url="+document.URL,"TencentLogin","width=800,height=500,menubar=1,scrollbars=1, resizable=1,status=1,titlebar=1,toolbar=1,location=1");
}
function closeChildWindow(){
	childWindow.close();
}
</script>
<div class="login bor" style="padding:50px 0;">
    <div class="main fLeft">
      <div class="step"> <span>请在这里登录</span> <a href="../register/<?=$tobind?'?tobind=1':''?>">还没注册点击这里</a> </div>
      <div class="clear"></div>
       <form name="form1" method="post" action="../doaction.php">
    <input type=hidden name=ecmsfrom value="<?=ehtmlspecialchars($_GET['from'])?>">
    <input type=hidden name=enews value=login>
	<input name="tobind" type="hidden" id="tobind" value="<?=$tobind?>">
        <ul>
          <li> <span>用户名：</span>
            <input id="txtUsername" class="text " type="text" name="username"/>
          </li>
          <li> <span>密　码：</span>
            <input id="txtPassword" class="text " type="password" name="password"/>
          </li>
          <?php
	if($public_r['loginkey_ok'])
	{
	?>
   
          <li> <span>验证码：</span>
            <input id="vdcode" class="text login_from3" type="text" style="width: 50px; text-transform: uppercase;" name="vdcode"/>
            <img id="vdimgck" align="absmiddle" onclick="this.src=this.src+'?'" style="cursor: pointer;" alt="看不清？点击更换" src="/e/ShowKey/?v=login"/> 看不清？ <a href="#" onclick="changeAuthCode();">点击更换</a> </li>
             <?php
	}	
	?>
          <li> <span>有效期：</span>
            <input type="radio" value="2592000" name="lifetime" id="ra1"/>
            <label for="ra1">一个月</label>
            <input type="radio" checked="checked" value="604800" name="lifetime" id="ra2"/>
            <label for="ra2">一周</label>
            <input type="radio" value="86400" name="lifetime"  id="ra3"/>
            <label for="ra3">一天</label>
            <input type="radio" value="0" name="lifetime"  id="ra4"/>
            <label for="ra4">即时</label>
          </li>
          <li>
          	<span>&nbsp;</span>
            <table cellpadding="0" cellspacing="0">
            	<tr>
                	<td><a href="javascript:;" id="btnSignCheck" class="lg_btn"><span style="text-align:center;">&nbsp;登&nbsp;录&nbsp;</span></a></td>
                    <td style="padding-left:10px;"><a target="_self" href="javascript:vod(0);" onclick="toQzoneLogin();return false;"><img src="/templets/member/common/images/qq_login.png"></a></td>
                </tr>
            </table>
           </li>
        </ul>
      </form>
    </div>
    <div class="login_sidebar fRight">
      <p><span>还没有注册吗？</span><br />
        本站的账号都没有？你也太落伍了<br />
        赶紧去注册一个吧。</p>
      <button class="signUp" onclick="javascript:location='../register/<?=$tobind?'?tobind=1':''?>'"></button><br />
      <a href="../GetPassword/" style="color:#4abb73; font-size:14px; margin-left:110px;">忘记密码？</a>
    </div>
    <div class="clear"></div>
<?php
require(ECMS_PATH.'e/template/incfile/footer.php');
?>