<div class="wrapper clearfix">
	<div class="wrap_box">
		<h3 class="notice">已注册用户，请登录</h3>
		<p class="tips">欢迎来到我们的网站，如果您已是本站会员请登录</p>
		<div class="box login_box clearfix">
			<form action='{url:/simple/login_act}' method='post'>
				<table width="515" class="form_table f_l">
					<col width="160px" />
					<col />

					{if:$this->getError()}
					<tr><td colspan="2">
						<div class="prompt"><img src="{skin:images/front/error_s.gif}" width="16" height="15" />{echo:$this->getError()}</div>
					</td></tr>
					{/if}

					<tr><th>用户名/邮箱/手机：</th><td><input class="gray" type="text" name="login_info" value="{echo:ICookie::get('loginName');}" pattern='required' alt='填写用户名，邮箱，手机号' /></td></tr>
					<tr><th>密码：</th><td><input class="gray" type="password" name="password" pattern='^\S{6,32}$' alt='填正确密码' /></td></tr>
					<tr class="low"><td></td>
						<td>
							<label class="attr"><input class="radio" type="checkbox" name="remember" value='1' />记住登录名</label>
							<label class="attr"><a class="link pwd" href="{url:/simple/find_password}">忘记密码</a></label>
						</td>
					</tr>
					<tr class="low">
						<td></td>
						<td>
							{foreach:items=Api::run('getOauthList')}
							<a href="{url:/simple/oauth_login/id/$item['id']}"><img src='{webroot:$item[logo]}' /></a>
							{/foreach}
						</td>
					</tr>
					<tr><td></td><td><input class="submit_login" type="submit" value="登录" /></td></tr>
				</table>
			</form>

			{if:IReq::get('tourist') === null}
			<!--正常登录时-->
			<table width="360px" class="form_table prompt_3 f_l">
				<col width="75px" />
				<col />
				<tr>
					<th></th>
					<td>
						<p class="mt_10"><strong class="f14">您还不是<span class="orange">{$this->_siteConfig->name}</span>用户</strong></p>
						<p>现在免费注册成为{$this->_siteConfig->name}商城用户，便能立即享受便宜又放心的购物乐趣。<a class="blue" href="{url:}">网站首页>></a></p>
						<p class="mt_10"><a class="reg_btn" href="{url:/simple/reg}">注册新用户</a></p>
					</td>
				</tr>
			</table>

			{else:}
			<!--访客购买时跳转-->
			<table id="reg_table" width="360px" class="form_table prompt_3 f_l">
				<col width="75px" />
				<col />
				<tr>
					<th></th>
					<td>
						<p class="mt_10 m_15">
							<strong class="f14">您还不是<span class="orange">{$this->_siteConfig->name}</span>用户</strong><br />
							<label>使用游客身份结账或注册</label>
						</p>
						<p><label class="attr"><input class="radio" type='radio' name='next_step' value='acount' />使用游客身份结账</label></p>
						<p><label class="attr"><input class="radio" type='radio' name='next_step' value='reg' checked='checked' />注册新用户</label></p>
						<p class="mt_10 indentation">现在免费注册成为{$this->_siteConfig->name}商城用户，便能立即享受便宜又放心的购物乐趣。<a class="blue" href="{url:}">网站首页>></a></p>
						<p class="mt_40 f_r"><a class="next_step" href="javascript:next_step();">下一步</a></p>
					</td>
				</tr>
			</table>
			{/if}

		</div>
	</div>
</div>

<script type='text/javascript'>
//DOM加载结束
$(function(){
	$(".form_table input").focus(function(){$(this).addClass('current');}).blur(function(){$(this).removeClass('current');})
});

//下一步操作
function next_step()
{
	var step_val = $('[name="next_step"]:checked').val();
	if(step_val == 'acount')
	{
		{set:$url = plugin::trigger('getCallback')."/tourist/yes"}
		window.location.href = '{url:$url}';
	}
	else if(step_val == 'reg')
	{
		window.location.href = '{url:/simple/reg}';
	}
}
</script>
