index.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>nps admin login</title>
  7. <link href="{{.web_base_url}}/static/css/bootstrap.min.css" rel="stylesheet">
  8. <link href="{{.web_base_url}}/static/font-awesome/css/font-awesome.css" rel="stylesheet">
  9. <link href="{{.web_base_url}}/static/css/style.css" rel="stylesheet">
  10. </head>
  11. <body class="gray-bg">
  12. <div class="loginColumns animated fadeInDown">
  13. <div class="row">
  14. <div class="col-md-offset-3 col-md-6">
  15. <h2 class="font-bold">nps</h2>
  16. <p>
  17. A convenient proxy server
  18. </p>
  19. <p>
  20. Using it, it can penetrate the intranet tcp、udp、socks5、http、p2p and so on
  21. </p>
  22. <p>
  23. and more?
  24. </p>
  25. <p>
  26. goto <a href="//github.com/cnlh/nps">nps</a>
  27. </p>
  28. <div class="ibox-content">
  29. <form class="m-t" onsubmit="return false">
  30. <div class="form-group">
  31. <input name="username" class="form-control" placeholder="username" required="">
  32. </div>
  33. <div class="form-group">
  34. <input name="password" type="password" class="form-control" placeholder="password" required="">
  35. </div>
  36. <button onclick="login()" class="btn btn-primary block full-width m-b">login</button>
  37. {{if eq true .register_allow}}
  38. <a class="btn btn-sm btn-white btn-block" href="{{.web_base_url}}/login/register">register</a>
  39. {{end}}
  40. </form>
  41. </div>
  42. </div>
  43. </div>
  44. <hr/>
  45. </div>
  46. </body>
  47. <script src="{{.web_base_url}}/static/js/jquery-2.1.1.js"></script>
  48. </html>
  49. <script type="text/javascript">
  50. // Login Page Flipbox control
  51. function login() {
  52. $.ajax({
  53. type: "POST",
  54. url: "{{.web_base_url}}/login/verify",
  55. data: $("form").serializeArray(),
  56. success: function (res) {
  57. if (res.status) {
  58. window.location.href = "{{.web_base_url}}/index/index"
  59. } else {
  60. alert(res.msg)
  61. }
  62. }
  63. })
  64. return false
  65. }
  66. </script>
  67. </body>
  68. </html>