<?php defined('PHPNEW_STATIC_TPL') === false && exit(URL_HOST);?>
{template header}
<style type="text/css">
    .uls{}
    .uls h3{height: 38px; line-height: 38px; color: blue; font-size: 14px; font-weight: bolder;}
    .uls li{overflow: hidden; line-height: 28px; height: 28px; margin-bottom: 8px; clear: both; }
    .li_span_a { float: left; width: 80px; text-align: right; padding-right: 8px;}
    .li_span_b {float: left; width: 300px;}
    
    .userlistb{width: 390px;}
    .userlistb h3{height: 38px; line-height: 38px; border-bottom: 1px solid silver; color: blue; font-size: 14px; font-weight: bolder; margin-bottom: 0px;}
    .userlistb li{line-height: 20px; height: 20px;}
    input{padding: 3px; border: 1px solid silver;}
    .all{color: #FF8040; margin-left: 5px;}
    .submit{ margin-top: 35px;}
</style>
<script type="text/javascript">
var n = e = c = i = a = '';
function submitajax(obj){
    n = encodeURIComponent($('.username').val());
    e = encodeURIComponent($('input[name="useremal"]').val());
    c = encodeURIComponent($('input[name="check"]').val());
    $('.all').text('');
    i++;
    $.getJSON('./index.php?user=register_ajax&username='+n+'&useremal='+e+'&check='+c+'&rand='+i,function(data){
        if(data.check === 1){
            $('.check').text('(不区分大小写) 验证错误!!');
        }
        if(data.name === 2){
            $('.cname').text('用户名错误或者已经存在用户');
        }
        if(data.email === 3){
            $('.cemail').text('email错误或者已经存在');
        }
        if(data.ok === 0){
            $(obj).attr('onsubmit','');
            $(obj).submit();
        }
    });
    return false;
}
$(function(){
    updateform('$default_parem[3]');
})

function updateform(classname){
    $('.login').hide();
    $('.register').hide();
    $('.'+classname).show();
}
</script>
<div class="login" style="float: left; width: 530px; margin-left: 10px; overflow: hidden;">
<form action="./index.php?user=login" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="reurl" value="$reurl" />
    <ul class="uls">
    <h3 style="font-weight: bolder;"><span style="background-color: #0080FF; padding: 3px; color: white;">登 录</span> / <span style="font-size: 12px; color: gray; cursor: pointer;" onclick="updateform('register');">注 册</span></h3>
    <li style="border: 1px solid silver; border-left: 20px solid #388BAF; background-color: #E6F2F7; margin-bottom: 28px;">　欢迎加入我们,享受优质服务, 请输入账号信息</li>
    <li><span class="li_span_a"> <strong>账 号</strong>: </span><span class="li_span_b"><input accept="accept" style="width: 130px; border-bottom: 2px solid #98CBE7;" type="text" name="username" value="" /></span></li>
    <li><span class="li_span_a"> <strong>密 码</strong>: </span><span class="li_span_b"><input accept="accept" style="width: 130px; border-bottom: 2px solid #98CBE7;" type="password" name="userpass" value="" /></span></li>
    <li style="overflow: hidden; margin-bottom: 135px; margin-top: 35px;"><input style="margin-left: 88px; float: left;" class="submit" type="submit" value=" 登 录 " /> {if empty($qq_config[open]) === false}<a style="border-bottom: none; display: block; float: left;" href="./index.php?user=qqlogin.html"><img style="margin-left: 10px;vertical-align: top;" src="./Static/Images/logo_style1.png" /></a>{/if}</li>
    
    </ul>
</form>
</div>

<div class="register" style="float: left; width: 530px; margin-left: 10px; overflow: hidden;">
<form action="./index.php?user=login&register" method="post" onsubmit="return submitajax(this);" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="reurl" value="$reurl" />
    <ul class="uls">
    <h3 style="font-weight: bolder;"><span style="font-size: 12px; cursor: pointer;color: gray;" onclick="updateform('login');">登 录</span> / <span style="background-color: #0080FF; padding: 3px; color: white;">注 册</span></h3>
    <li style="border: 1px solid silver; border-left: 20px solid #388BAF; background-color: #E6F2F7;">　请完善个人信息后提交注册, 谢谢</li>
    <li><span class="li_span_a"> <strong>用户名称</strong>:　</span><span class="li_span_b"><input type="text" class="username" name="username" value="" /><span class="all cname"></span></span></li>
    <li><span class="li_span_a"> <strong>用户密码</strong>:　</span><span class="li_span_b"><input type="password" style="width:132px;" name="userpass" value="" /></span></li>
    <li><span class="li_span_a"> <strong>用户邮件</strong>:　</span><input type="text" name="useremal" value="" /><span class="all cemail"></span></li>
    
    <li><span class="li_span_a"> <strong>验证码</strong>:　</span><input type="text" name="check" style="width: 60px; margin-top: 6px; vertical-align: top;" value="" /><img style="border: 1px solid silver; margin-left: 2px; height: 19px; margin-top: 6px;" title="点击更换验证码" src="./index.php?user=image" onclick="this.src='./index.php?user=image&'+Math.random()" /><span class="all check"></span></li>
    
    <li style="overflow: hidden; margin-bottom: 65px; margin-top: 35px;"><input style="margin-left: 88px; float: left;" type="submit" value=" 注 册 " /> {if empty($qq_config[open]) === false}<a style="border-bottom: none; display: block; float: left;" href="./index.php?user=qqlogin.html"><img style="margin-left: 10px; vertical-align: top;" src="./Static/Images/logo_style1.png" /></a>{/if}</li>
    
    </ul>
</form>
</div>

<div style="float: left; width: 400px;">
    <ul class="userlistb">
    <h3>最新注册</h3>
        <!--{loop $user_list $val}-->
        <li>　{$val[user_id]} - {$val[user_name]} / {$val[user_regtime]}</li>
        <!--{/loop}-->
    </ul>
</div>
<div style="clear: both;"> </div>
{template footer} 