<div id="login" class="box">
      <div class="top">
        <h3 class="title"><tpl>$user_login</tpl><!-- 会员登录 --></h3>
      </div>
      <div class="content">
	  <tpl>if $smarty.session.userinfo.user_id == ""</tpl>
        <form action="<tpl> $Site_Url </tpl>/member/user.php?action=login" method="post" name="userlogin" id="userlogin">
          <label><tpl>$user_name</tpl><!-- 用户名 -->:</label>
          <input name="txt_username" type="text" />
          <label><tpl>$user_pwd</tpl><!-- 密　码 -->:</label>
          <input name="txt_pwd" type="password" />
          <tpl>if $view_config.view_login_validate=='1'</tpl>
		  <label><tpl>$user_code</tpl><!-- 验证码  -->:</label>
          <input name="txt_login_code" type="text" style="width:40px;text-transform:uppercase;" />&nbsp;
		  <img src="<tpl> $Site_Url </tpl>/classes/libraries/code.php" name="codeimage" border="0" id="codeimage" style="vertical-align:middle;" title="<tpl>$langMClickReplacingCode</tpl>" onclick="this.src='<tpl> $Site_Url </tpl>/classes/libraries/code.php?' + Math.random()" style="cursor: pointer" />
		  <tpl>/if</tpl>
		  <input type="hidden" name="nc_refresh" value="<tpl> $Site_Url </tpl>" />
		  &nbsp;<br />
		  <span class="buttons log">
          <h5><a href="#" onclick="document.userlogin.submit()"><tpl>$user_login</tpl><!-- 会员登录 --></a></h5></span>
		  <span class="buttons reg">
          <h5><a href="<tpl> $Site_Url </tpl>/member/user.php?action=register"><tpl>$user_register</tpl><!-- 用户注册 --></a></h5>
          </span> 
          <p><a href="<tpl>$Site_Url</tpl>/member/user.php?action=forgetpass"><tpl>$forget_pwd</tpl></a><!-- 忘记/找回密码？ --></p>
        </form>
		<tpl>else</tpl>
		<tpl>$user_hello</tpl><!-- 您好， --><a href="<tpl>$Site_Url</tpl>/member/user_center.php"><tpl>$username</tpl></a><br />
		<tpl>$user_grade</tpl>:&nbsp;<tpl>$smarty.session.userinfo.user_grade_name</tpl><br />
		<tpl>$user_grade_discount</tpl>:&nbsp;<tpl>if $smarty.session.userinfo.user_grade_discount!=''</tpl><tpl>$smarty.session.userinfo.user_grade_discount</tpl><tpl>$user_grade_discount1</tpl><tpl>else</tpl><tpl>$user_grade_discount_null</tpl><tpl>/if</tpl><br />
		<a href="<tpl>$Site_Url</tpl>/member/user.php?action=login_out"><tpl>$login_out</tpl><!-- 退出 --></a>
		<tpl>/if</tpl>
      </div>
    </div>