{imp:"uio/_layinfo"}<!--模板继承-->

{block:init}{:parent}
{code:"_config/user_getpw"}{/block:init}

{block:title}{lang(user.lon_fpass)}{/block:title}

{block:hdimp}{php}
eimp('initJs','jquery,bootstrap;comm;comm(-lang)');
eimp('initCss','bootstrap,stpub,jstyle;comm;/base/assets/cssjs/cinfo'); 
{/php}{/block:hdimp}
{block:hdcss}{:parent}
.vcm1{ float:right; }
div.main p.150 { line-height:150%; }
{/block:hdcss}

{block:main}
<div id="topMargin" style="display:none; border:0px solid #999;"></div>

<form action="?{=$this->mkv}" method="post" name="fmgetpw" id="fmgetpw">
  {if $user->userFlag=='Login' }
  <p class="text-danger bg-warning pa10">
      [{=$user->usess['uname']}] {lang(user.lon_logined)} <br>
      {lang(user.lon_change)}【<a href="?uio-logout">{lang(user.lon_logout)}</a>】; <br>
      {lang(user.lon_touto)}：{php echo date('Y-m-d H:i:s',$user->usess['stime']+$user->utmOut); } 
  </p>
  {elseif !empty($remsg) }
  <div class="text-info bg-info pa10 ma10">
      {=$remsg}
  </div>
  {elseif !empty($emid) }
  <p class="pa10 ma10 tc">
    {if is_array($emres)}
    	你的帐号为: {=$emres[2]} <br/>
        密码重置为: `<span class="c00F bold">{=$emres['pass']}</span>`
    {else}
    	{=$emres}
    {/if}
  </p>
  
  {else}
  <div id="idx_login" class="pgu_login">
    <div class="h150 pa10">{lang(user.lon_type)} <br>
        <a href="#" onClick="funcGetpw(1)">{lang(user.lon_click)}&gt;&gt;</a>, {lang(user.gtp_wechat)}
    </div>
    <div class="login">
      <div class="bg-info tc pa10">{lang(user.lon_fpass)}</div>
      <p class="row"> <i class="col-xs-4 col-md-4"><a class="block pt10 c333">{lang(uname)}: </a></i>
        <i class="col-xs-8 col-md-8 tl">
        <input id="fm[uname]" name="fm[uname]" tabindex="1" type="text" class="form-control" reg="key:2-24"/>
        </i>
      </p>
      <p class="row"> <i class="col-xs-4 col-md-4"><a class="block pt10 c333">{lang(user.gtp_email)}: </a></i>
        <i class="col-xs-8 col-md-8 tl">
        <input id="fm[memail]" name="fm[memail]" tabindex="2" type="text" class="form-control" reg="fix:email"/>
        </i>
      </p>
      <p class="row"> <i class="col-xs-4 col-md-4"><a class="block pt10 c333">{lang(vcode)}: </a></i>
        <i class="col-xs-8 col-md-8 tl">
        <script>fsInit('fmgetpw');</script>
        </i>
      </p>
      <p class="row"> <i class="col-xs-4 col-md-4"></i> 
        <i class="col-xs-8 col-md-8 tl">
        <input name="submit" value="{lang(user.gtp_send)}" tabindex="19820" type="submit" class="form-control btn btn-primary" />
        <input name="act" type="hidden" value="dogetpw" />
        <input name="recbk" type="hidden" value="{=$recbk}" />
        </i>
      </p>

    </div>
    <div class="clear"></div>
  </div>
  <div id="idx_lscan" class="pgu_lscan" style="display:none;">
    <div class="h150 pa10">{lang(user.lon_nowechat)} <br>
        <a href="#" onClick="funcGetpw()">{lang(user.lon_click)}&gt;&gt;</a>, {lang(user.gtp_idmail)}
    </div>
    <div class="login">
      <p class="tc" id="lscan_msg">
      <img src="{=PATH_VIEWS}/base/assets/aimg/loadbig.gif" id="lscan_img" width="180">
      </p>
    </div>
    <div class="clear"></div>
  </div>
  {/if}
</form>

<script>
var ubase = '<?php echo PATH_ROOT."/plus/api/wechat.php?"; ?>';
var iTime = 0;
function funcGetpw(scan){
    $('#idx_lscan').toggle();
    $('#idx_login').toggle();
    if(scan) fshowQrcode();
}
function fshowQrcode(){ // 缓存,更新...
    if(iTime) return;
    var extp = Math.random().toString(36).substr(2); 
    var url = 'actys=getQrcode&qrmod=getpw&extp='+extp+'&varname=data';
    $.getScript(ubase+url, function(){  //调试
        $('#lscan_img').attr('src',data.url);
        clearTimeout(iTime);
    });
}
winAutoMargin('topMargin');
</script>

{/block:main}
