{template 'header.html'}
<script type="text/javascript">
<!--
	/*
 * jQuery placeholder, fix for IE6,7,8,9
 * @author JENA
 * @since 20131115.1504
 * @website ishere.cn
 */
var JPlaceHolder = {
    //检测
    _check : function(){
        return 'placeholder' in document.createElement('input');
    },
    //初始化
    init : function(){
        if(!this._check()){
            this.fix();
        }
    },
    //修复
    fix : function(){
        jQuery(':input[placeholder]').each(function(index, element) {
            var self = $(this), txt = self.attr('placeholder');
            self.wrap($('<div></div>').css({position:'relative', zoom:'1', border:'none', background:'none', padding:'none', margin:'none'}));
            var pos = self.position(), h = self.outerHeight(true), paddingleft = self.css('padding-left');
            var holder = $('<span></span>').text(txt).css({position:'absolute', left:pos.left, top:pos.top, height:h, lienHeight:h, paddingLeft:paddingleft, color:'#aaa'}).appendTo(self.parent());
            self.focusin(function(e) {
                holder.hide();
            }).focusout(function(e) {
                if(!self.val()){
                    holder.show();
                }
            });
            holder.click(function(e) {
                holder.hide();
                self.focus();
            });
        });
    }
};
//执行
jQuery(function(){
    JPlaceHolder.init();    
});
//-->
</script>

<div class="blank10"></div>

<!-- 页面标题开始 -->
<div class="t_1 wow bounceIn">
<div>
<h3>{lang(user)}{lang(login)}</h3>
<p>User Login</p>
</div>
</div>

<div class="p10">






		<script type="text/javascript" LANGUAGE="javascript">
            <!--

		    function check()
            {
                if(document.loginform.username.value.length==0){
                    alert("{lang(please_enter_your_user_name)}");
                    document.loginform.username.focus();
                    return false;
                }

                if(document.loginform.password.value.length==0){
                    alert("{lang(please_set_a_password)}");
                    document.loginform.password.focus();
                    return false;
                }

                if(document.loginform.password2.value.length==0){
                    alert("{lang(enter_confirm_password)}");
                    document.loginform.password2.focus();
                    return false;
                }

                if(document.loginform.aquestion.value.length==0){
                    alert("{lang(set_security)}");
                    document.loginform.aquestion.focus();
                    return false;
                }

                if(document.loginform.question.value.length==0){
                    alert("{lang(please_set_the_security_answer)}");
                    document.loginform.question.focus();
                    return false;
                }

                if(document.loginform.answer.value.length==0){
                    alert("{lang(please_enter_the_custom_security_answer)}");
                    document.loginform.answer.focus();
                    return false;
                }
                if(document.loginform.verify.value.length==0){
                    alert("{lang(enter)}{lang(verifycode)}!");
                    document.loginform.verify.focus();
                    return false;
                }


            }


            function set_question(value)
            {
                document.getElementById("question").value=value;
                document.getElementById("question").focus();
            }
            //-->
        </script>
    
		<script type="text/javascript" LANGUAGE="javascript">
            <!--

        function check()
            {
                if(document.loginform.username.value.length==0){
                    alert("{lang(please_enter_your_user_name)}");
                    document.loginform.username.focus();
                    return false;
                }

                if(document.loginform.password.value.length==0){
                    alert("{lang(please_set_a_password)}");
                    document.loginform.password.focus();
                    return false;
                }

                if(document.loginform.password2.value.length==0){
                    alert("{lang(enter_confirm_password)}");
                    document.loginform.password2.focus();
                    return false;
                }

                if(document.loginform.aquestion.value.length==0){
                    alert("{lang(set_security)}");
                    document.loginform.aquestion.focus();
                    return false;
                }

                if(document.loginform.question.value.length==0){
                    alert("{lang(please_set_the_security_answer)}");
                    document.loginform.question.focus();
                    return false;
                }

                if(document.loginform.answer.value.length==0){
                    alert("{lang(please_enter_the_custom_security_answer)}");
                    document.loginform.answer.focus();
                    return false;
                }
                if(document.loginform.verify.value.length==0){
                    alert("{lang(enter)}{lang(verifycode)}!");
                    document.loginform.verify.focus();
                    return false;
                }


            }


            function set_question(value)
            {
                document.getElementById("question").value=value;
                document.getElementById("question").focus();
            }
            //-->
        </script>

<div class="blank30"></div>

<style type="text/css">/*定义标题*/

.btn {
float:left; 
width:47%;
line-height:28px;
padding:5px 0px;
color:#FFF;
font-size:14px;
border-radius: 3px 3px 3px 3px;
overflow:hidden;
	cursor:pointer;
	background-color:#236298;
	display:block;
	text-align:center;-moz-box-shadow: 3px 3px 4px #DFDFDF;-webkit-box-shadow: 3px 3px 4px #DFDFDF;box-shadow: 3px 3px 4px #DFDFDF;
}
.btn:hover{ background-color:#FF4A00;}

a.btn {color:white; }



#verify {
 width:255px;
  height:30px;
  line-height:30px;
  margin:10px 0px;
  padding:0px 15px;
  border:1px solid #ccc;
border-radius: 5px 0px 0px 5px;
}
#verify:hover {
border:1px solid #A5C7FE;
-moz-box-shadow:0px 0px 10px #A5C7FE;
-webkit-box-shadow:0px 0px 10px #A5C7FE;
box-shadow:0px 0px 10px #A5C7FE;

}
#username,
#password {
  width:93%;
  height:28px;
  line-height:28px;
  padding:0px 10px;
  border:1px solid #ccc;
  font-weight:bold;
  font-size:12px;
  border-radius: 3px 3px 3px 3px;
}
</style>
    
<form id="login_form"   name="loginform" method="post"  action="<?php echo url('user/login') ?>" onsubmit="return check()">
<input type='hidden' id="from"  name="from" value="<?php echo get('from')? get('from'):front::$from;?>"/>
                
<?php if(hasflash()) { ?>             
<?php echo showflash(); ?>
{else}
                                     
       
                                
<input name="username" placeholder="{lang(username)}" type="text" id="username" value="{get('username')}" tabindex="1" />
<div class="blank10"></div>
        
                                     
<input name="password" placeholder="{lang(password)}" type="password" id="password" value="<?php //echo $password;?>" tabindex="2" />



{if config::get('mobilechk_enable') && config::get('mobilechk_login')}
<script src="{$base_url}/js/mobilechk.js"></script>
<div class="blank10"></div>
<input type='text' id="mobilenum"  tabindex="3" placeholder="{lang(send_cell_phone_verification_code)}"  name="mobilenum" />&nbsp;<input id="btm_sendMobileCode" onclick="sendMobileCode($('#tel').val());" type="button" value="{lang(phone_verification_code)}" />
{/if}

{if config::get('verifycode')=='1'}
<input type='text' id="verify"  tabindex="3"  name="verify" />{verify()}
<div class="blank10"></div>
{/if}
{if config::get('verifycode')=='2'} 
<div class="blank20"></div>
<div id="verifycode_embed"></div>
<script src="http://api.geetest.com/get.php"></script>
<script>
var loadGeetest = function(config) {
	window.gt_captcha_obj = new window.Geetest({
		gt : config.gt,
		challenge : config.challenge,
		product : 'float',
		offline : !config.success
	});
	gt_captcha_obj.appendTo("#verifycode_embed");
};

$.ajax({
	url : '{url('tool/geetest',0)}',
	type : "get",
	dataType : 'JSON',
	success : function(result) {
		//console.log(result);
		loadGeetest(result)
	}
});
</script>
{/if}
                                    



<div class="blank20"></div>
<input type="submit" name="submit" value=" {lang(login)} " class="register_btn" />
      

<div class="blank20"></div>
<a href="{url('user/getpass')}" class="btn" style="margin-right:18px;">{lang(findpassword)}</a><a href="{url('user/register')}" class="btn">{lang(register)}</a>
		 
						
       

{if $ologinlist}
{loop $ologinlist $ologin}
{if $ologin[enabled]==1} 
<div class="blank30"></div>
<a target="_blank" href="<?php echo url('user/ologin/logtype/'.$ologin[ologin_code]);?>"><img src="{$base_url}/images/{$ologin[ologin_code]}.png" border="0" class="fl" /></a>&nbsp;&nbsp;
{/if}
{/loop}
{/if} 
{/if}


                                   
</form>


<div class="blank30"></div>
</div>

{template 'footer.html'}