<extend name="Public:base" />
<block name="head_script">
 <link href="__CSS__/login.css" rel="stylesheet" type="text/css">	
</block>
<block name="content">
<section id="content-container" class="container">
<div class="container">
	<div class="row">

	
		<?php if(isset($error)) { ?>		
			<div class="alert alert-danger" role="alert">
			  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			  <div id="fail"><?php echo $error; ?></div>
			</div>		
		<?php } ?>
		<div id="content" class="col-md-24 col-sm-24 col-xs-24">
			<h1>用户登录</h1>
			<p>没有账号？<a href="{:U('/register')}">立即注册</a></p>
			<form class="register" method="post" action="{:U('/login')}">
				<div class="left">
					
					<div class="content">
						<table class="form">
				        <tr>
				          <td>用户名 / E-mail<span class="required"> *</span></td>
						</tr>
						
						<tr>
				          <td><input class="form-control" type="text" name="uname" value="{$uname}" />
				            
				            </td>
				        </tr>
					
				        <tr>
							<td>密码<span class="required"> *</span></td>
						</tr>
						<tr>
				          <td><input class="form-control" type="password" name="pwd" value="{$pwd}" />
				           </td>
				        </tr>
				      
				        <tr>
							<td>验证码<span class="required"> *</span></td>
						</tr>
						<tr>
				          <td><input class="form-control" type="text" name="code" />
				            
				            </td>
				        </tr>
				        <tr>
							<td><img class="verifyimg reloadverify" alt="点击切换" src="{:U('Public/verify')}"></td>
						</tr>
						<tr>
							<td><a href="{:U('/forgot')}">忘记密码?</a></td>
						</tr>
				        
						</table>
						    <div class="buttons">
						      <div class="left">
						        <input type="submit" value="提交" class="btn btn-primary btn-continue" />
						      </div>
						    </div>
					</div>
					
				</div>				
			</form>
		</div>
		
	</div>	
</div>	
</section>
<style>
	.verifyimg{cursor:pointer;}
</style>
<script>
	//刷新验证码
	var verifyimg = $(".verifyimg").attr("src");
    $(".reloadverify").click(function(){
        if( verifyimg.indexOf('?')>0){
            $(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
        }else{
            $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
        }
    });	
</script>
{~W('Share/common_share')}
</block>