<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{lang(userlogin)} - {get('fullname')} - Powered by CmsEasy</title>
<meta name="keywords" content="{if $archive[keyword]}{$archive[keyword]}{else}{if $type[keyword]}{$type[keyword]}{elseif $category[$catid][keyword]}{$category[$catid][keyword]}{else}{get('site_keyword')}{/if}{/if}" />
<meta name="description" content="{if $archive[description]}{$archive[description]}{else}{if $type[description]}{$type[description]}{elseif $category[$catid][description]}{$category[$catid][description]}{else}{get('site_description')}{/if}{/if}" />
<meta name="author" content="CmsEasy Team" />
<link rel="icon" href="{$base_url}/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{$base_url}/favicon.ico" type="image/x-icon" />
<link href="{$skin_path}/user/login.css" rel="stylesheet" type="text/css" />
<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;
                }


            }
//-->
</script>
</head>

<body>
<div style="margin:10% auto;">
<div id="main1">
<div class="login1">
<?php if(!get('submit')){ flash();?>
<form id="login_form" name="loginform" method="post"  action="<?php echo url('user/dialog_login');?>" onsubmit="return check();">
<input type='hidden' id="from"  name="from" value="<?php echo get('from')? get('from'):front::$from;?>"/>
     <input type="submit" name="submit" value=" " class="button" tabindex="4" />
     <input name="username" type="text" id="username" value="用户名" class="input" tabindex="1" onfocus="this.className='input_on';this.onmouseout='';this.value=''" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onmousemove="this.className='input_move'" onmouseout="this.className='input_out'" onMouseOver="this.focus()" onblur="if (this.value ==''){this.value=this.defaultValue}" onFocus="this.select()" onClick="if(this.value==this.defaultValue)this.value=''" />
     <input name="password" type="password" id="password" value="密码" tabindex="2" class="input" onfocus="this.className='input_on';this.onmouseout='';this.value=''" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onmousemove="this.className='input_move'"  onmouseout="this.className='input_out'" onMouseOver="this.focus()" onblur="if (this.value ==''){this.value=this.defaultValue}" onFocus="this.select()" onClick="if(this.value==this.defaultValue)this.value=''" />

	 <div class="clear"></div>
<div style="float:left;margin-right:20px;">{verify()}</div>
<input name="verify" type="text" id="verify" value="{lang(verifycode)}" tabindex="3" class="input-code" onfocus="this.className='input-code_on';this.onmouseout='';this.value=''" onblur="this.className='input-code_off';this.onmouseout=function(){this.className='input-code_out'};" onmousemove="this.className='input-code_move'"  onmouseout="this.className='input-code_out'" onMouseOver="this.focus()" onblur="if (this.value ==''){this.value=this.defaultValue}" onFocus="this.select()" onClick="if(this.value==this.defaultValue)this.value=''" />
  </form>
 <?php }else{ if(get('submit')) {
	  if(hasflash()) {
	      echo '<span style="color:red;font-weight:bold;"><br />';
		  echo flash().'</span>';}else{echo '<div style="color:green;font-weight:bold; text-align:center"><br />登陆成功，进入<a href="'.url('user/index').'" target="_blank">会员中心</a>。</div>';}}}?>
          <div class="clear"></div>
<div class="clear"></div>
</div>

</div>
</div>
</body>
</html>
