login.cmp.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php $data['manage/auth.set']=Dever::load('manage/auth.set') ?>
  2. <!DOCTYPE html>
  3. <!--power by dever--><html>
  4. <head>
  5. <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/head.cmp.php' ?>
  6. <link rel="stylesheet" href="<?php echo Dever::config("host")->script ?>lib/layui/admin/style/login.css" media="all">
  7. </head>
  8. <body>
  9. <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
  10. <form action="<?php echo Dever::url("auth.login") ?>" method="post" target="f1" class="form-horizontal m-t-20" id="login">
  11. <input type="hidden" name="function" id="function" value="msg">
  12. <input type="hidden" name="refer" id="refer" value="<?php echo $data['manage/auth.set']['refer'] ?>">
  13. <iframe id="f1" name="f1" style="display:none;"></iframe>
  14. <div class="layadmin-user-login-main">
  15. <div class="layadmin-user-login-box layadmin-user-login-header">
  16. <h2 id="name"><?php echo Dever::load("manage/auth.config#title") ?></h2>
  17. </div>
  18. <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
  19. <div class="layui-form-item">
  20. <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
  21. <input type="text" name="username" id="username" lay-verify="required" placeholder="账号" class="layui-input">
  22. </div>
  23. <div class="layui-form-item">
  24. <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
  25. <input name="password" id="password" type="password" lay-verify="required" placeholder="密码" class="layui-input">
  26. </div>
  27. <div class="layui-form-item">
  28. <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit">登 入</button>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="layui-trans layadmin-user-login-footer">
  33. <p id="footer" style="<?php if(!(Dever::config("base")->copyright)): ?>display:none;<?php endif; ?>"><?php echo Dever::config("base")->copyright ?></p>
  34. </div>
  35. <div class="ladmin-user-login-theme" style="display:none;">
  36. <script type="text/html" template>
  37. <ul>
  38. <li data-theme=""><img src="{{ layui.setter.base }}style/res/bg-none.jpg"></li>
  39. <li data-theme="#03152A" style="background-color: #03152A;"></li>
  40. <li data-theme="#2E241B" style="background-color: #2E241B;"></li>
  41. <li data-theme="#50314F" style="background-color: #50314F;"></li>
  42. <li data-theme="#344058" style="background-color: #344058;"></li>
  43. <li data-theme="#20222A" style="background-color: #20222A;"></li>
  44. </ul>
  45. </script>
  46. </div>
  47. </form>
  48. </div>
  49. <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/script.cmp.php' ?>
  50. <script>
  51. $(function()
  52. {
  53. $("#login").bind("keydown",function(e){
  54. var theEvent = e || window.event;
  55. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  56. if (code == 13) {
  57. $("#login").submit();
  58. }
  59. });
  60. });
  61. </script>
  62. <script>
  63. layui.config({
  64. base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
  65. }).extend({
  66. index: 'lib/index' //主入口模块
  67. }).use(['index', 'user'], function(){
  68. var $ = layui.$
  69. ,setter = layui.setter
  70. ,admin = layui.admin
  71. });
  72. </script>
  73. </body>
  74. </html>