123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- {template 'common/header-base'}
- <div class="system-login" >
- {if !empty($_W['setting']['copyright']['background_img'])}
- <img src="{php echo to_global_media($_W['setting']['copyright']['background_img']);}" class="bg-img" width="100%"/>
- {else}
- <img src="./resource/images/bg-login.png" class="bg-img"/>
- {/if}
- <div class="head">
- <a href="/" class="logo-version">
- <img src="{if !empty($_W['setting']['copyright']['flogo'])}{php echo to_global_media($_W['setting']['copyright']['flogo'])}{else}./resource/images/logo/login-logo.png{/if}" class="logo">
- <span class="version hidden">{IMS_VERSION}</span>
- </a>
- {if !empty($_W['setting']['copyright']['showhomepage'])}
- <a href="{php echo url('account/welcome')}" class="pull-right">首页</a>
- {/if}
- </div>
- <div class="login-panel">
- <div class="title">
- <a href="javascript:void(0);">账号/手机登录</a>
- </div>
- <form action="" method="post" role="form" id="form1" onsubmit="return formcheck();" class="we7-form">
- <div class="input-group-vertical">
- <input name="login_type" type="hidden" class="form-control " value="system">
- <input name="referer" type="hidden" value="{$_GPC['referer']}">
- <input name="username" type="text" class="form-control " placeholder="请输入用户名/手机登录">
- <input name="password" id="password" type="password" class="form-control password" placeholder="请输入登录密码">
- <span style="display:none;color:red;">大写锁定已打开</span>
- {if !empty($_W['setting']['copyright']['verifycode'])}
- <div class="input-group">
- <input name="verify" type="text" class="form-control" placeholder="请输入验证码">
- <a href="javascript:;" id="toggle" class="input-group-btn imgverify"><img id="imgverify" src="{php echo url('utility/code')}" title="点击图片更换验证码" /></a>
- </div>
- {/if}
- </div>
- <div class="form-inline" style="margin-bottom: 15px;">
- <div class="pull-right">
- <a href="{url 'user/find-password'}" target="_blank" class="color-default"></a>
- </div>
- <div class="checkbox">
- <input type="checkbox" value="true" id="rember" name="rember">
- <label for="rember">记住用户名</label>
- </div>
- </div>
- <div class="login-submit text-center">
- <input type="submit" id="submit" name="submit" value="登录" class="btn btn-primary btn-block" />
- <div class="text-right">
- {if !$_W['siteclose'] && $setting['register']['open']}
- {if empty($_GPC['login_type']) || $_GPC['login_type'] == 'system'}
- <a href="{url 'user/register'}" class="color-default">立即注册</a>
- {/if}
- {/if}
- {if !$_W['siteclose'] && !empty($_W['setting']['copyright']['mobile_status'])}
- {if $_GPC['login_type'] == 'mobile'}
- <a href="{php echo url('user/register', array('register_type' => 'mobile'))}" class="color-default">立即注册</a>
- {/if}
- {/if}
- </div>
- <input name="token" value="{$_W['token']}" type="hidden" />
- </div>
- {if !empty($setting['thirdlogin']['qq']['authstate']) || !empty($setting['thirdlogin']['wechat']['authstate'])}
- <div class="text-center">
- <span class="color-gray">使用第三方账号登录</span>
- <div class="form-control-static">
- {if !empty($setting['thirdlogin']['qq']['authstate'])}<a href="{$login_urls['qq']}"><img src="./resource/images/qqlogin.png" width="35px"></a> {/if}
- {if !empty($setting['thirdlogin']['wechat']['authstate'])}<a href="{$login_urls['wechat']}"><img src="./resource/images/wxlogin.png" width="35px"></a>{/if}
- </div>
- </div>
- {/if}
- </form>
- </div>
- </div>
- {template 'common/footer'}
- <script>
- function detectCapsLock(event) {
- var e = event || window.event;
- var o = e.target || e.srcElement;
- var oTip = o.nextElementSibling;
- var keyCode = e.keyCode || e.switch;
- var isShift = e.shiftKey || (keyCode == 16) || false;
- if (((keyCode >= 65 && keyCode <= 90) && !isShift) || ((keyCode >= 97 && keyCode <= 122) && isShift)) {
- oTip.style.display = '';
- } else {
- oTip.style.display = 'none';
- }
- }
- document.getElementById('password').onkeypress = detectCapsLock;
- function formcheck() {
- if($('#remember:checked').length == 1) {
- cookie.set('remember-username', $(':text[name="username"]').val());
- } else {
- cookie.del('remember-username');
- }
- return true;
- }
- var h = document.documentElement.clientHeight;
- if($('.footer').length) {
- h = h - $('.footer').outerHeight();
- }
- $(".system-login").css('height',h);
- $('#toggle').click(function() {
- $('#imgverify').prop('src', '{php echo url('utility/code')}r='+Math.round(new Date().getTime()));
- return false;
- });
- {if !empty($_W['setting']['copyright']['verifycode'])}
- $('#form1').submit(function() {
- var verify = $(':text[name="verify"]').val();
- if (verify == '') {
- alert('请填写验证码');
- return false;
- }
- });
- {/if}
- </script>
|