忘记后台管理密码添加管理员插件

忘记后台密码添加管理插件,该插件开源可二次开发,需要下载研究即可
忘记密码 后台密码 忘记后台密码
详情

插件名称:忘记后台密码添加新管理员
将Admin_Add 上传系统根目录下

访问: 系统地址/Admin_Add/Admin.php 进行访问

警告:添加后务必删除本插件,防止他人恶意利用.
警告:添加后务必删除本插件,防止他人恶意利用.
警告:添加后务必删除本插件,防止他人恶意利用.
警告:添加后务必删除本插件,防止他人恶意利用.

插件代码展示

  1. <?php
  2. //页面进入路径自己修改自己地址域名。 http://xxxxxx/Admin_Add/Admin.php
  3. include("../Plug/Plug.php");
  4. header("Content-Type: text/html; charset=utf-8");
  5. #登陆字段
  6. $type = Plug_set_post("type");
  7. if ($type == 'json') {
  8. $uname = Plug_set_post("uname");
  9. $ps = Plug_set_post("ps");
  10. $piccode = Plug_set_post("ps2");
  11. $ps = md5($ps);
  12. $a = '{"root":"1","root_1":"1","root_2":"1","top_1":"0","back":"0","link":"0","log_all":"0","log_1":"0","log_2":"0","log_3":"0","log_4":"0","log_8":"0","log_5":"0","log_6":"0","log_7":"0","top_2":"0","xt_1":"0","xt_2":"0","xt_3":"0","xt_4":"0","xt_5":"0","xt_6":"0","xt_7":"0","xt_8":"0","xt_9":"0","xt_10":"0","top_3":"0","zh_1":"0","zh_2":"0","zh_3":"0","zh_4":"0","top_4":"0","app_1":"0","app_2":"0","app_3":"0","app_4":"0","top_5":"0","html_1":"0","top_6":"0","wz_1":"0","wz_2":"0","wz_3":"0","wz_4":"0","top_7":"0","cw_":"0","cw_1":"0","cw_2":"0","cw_3":"0","cw_4":"0","cw_5":"0","cw_6":"0","cw_7":"0","top_8":"0","yy_1":"0","yy_2":"0","yy_3":"0","yy_4":"0","top_9":"0","appenconfig":"1"}';
  13. $sql = "INSERT INTO bs_php_admin (Admin_ID, Admin_AdminUserName, Admin_AdminPassWord, Admin_MiBao, Admin_CaoShi, Admin_LoGinIP, Admin_LoGinNum, Admin_LoGDaTe, Admin_IsLock, Admin_Permission) VALUES(NULL, '{$uname}', '{$ps}', '$piccode', 1546074984, '127.0.0.1', 1, '2018-12-29 17:16:24', 0, '{$a}');";
  14. if (plug_query($sql)) {
  15. Plug_print_json(array("code" => -1, 'msg' => '添加成功'));
  16. } else {
  17. Plug_print_json(array("code" => -1, 'msg' => '添加失败,可能账号已经存在换一个'));
  18. }
  19. }
  20. ?>
  21. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  22. <html xmlns="http://www.w3.org/1999/xhtml">
  23. <head>
  24. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  25. <meta name="renderer" content="webkit">
  26. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
  27. <title>忘记后台密码 - <?php echo plug_get_configs_value("sys", "name"); ?></title>
  28. <link href="static/css/css.css" rel="stylesheet" type="text/css">
  29. <script type="text/javascript" src="static/js/jquery.min.js"></script>
  30. <style>
  31. .ui-dialog-buttonset button.ui-state-hover {
  32. background: #1497fe !important;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <div id="mainContent">
  38. <script type="text/javascript">
  39. var mainContent = $("#mainContent");
  40. </script>
  41. <div id="swin" style="display:none;"></div>
  42. <div id="suwin" style="display:none;"></div>
  43. <div id="processing" style="display:none;"></div>
  44. <div class="loginbox" style="flex-direction: column;">
  45. <div class="contbox flex">
  46. <div class="left">
  47. <img src="static/picture/user-left.png" alt="<?php echo plug_get_configs_value("sys", "name"); ?>">
  48. </div>
  49. <div class="right">
  50. <div class="box">
  51. <div class="l">
  52. <p style="font-size: 25px;">添加管理 - <?php echo plug_get_configs_value("sys", "name"); ?></p>
  53. </div>
  54. <div class="l">
  55. <p style="font-size: 15px;">警告:添加后务必删除本插件,防止他人恶意利用.</p>
  56. </div>
  57. <div class="l">
  58. <p style="font-size: 15px;">警告:添加后务必删除本插件,防止他人恶意利用.</p>
  59. </div>
  60. <div class="l">
  61. <p style="font-size: 15px;">警告:添加后务必删除本插件,防止他人恶意利用.</p>
  62. </div>
  63. <div class="l">
  64. <p style="font-size: 15px;">警告:添加后务必删除本插件,防止他人恶意利用.</p>
  65. </div>
  66. <form id="bsphpfoem" onsubmit="return Login();">
  67. <BR /><BR />
  68. <div class="form">
  69. <ul>
  70. <li class="">
  71. <i class="iconfont"></i>
  72. <input type="text" class="f-16" id="UserName" name="uname" onkeydown="if(event.keyCode==13){$('#Passowrd').focus()}" placeholder="管理账号">
  73. </li>
  74. <li class="">
  75. <i class="iconfont"></i>
  76. <input type="password" class="f-16" id="Passowrd" name="ps" placeholder="密码">
  77. </li>
  78. <li class="">
  79. <i class="iconfont"></i>
  80. <input type="password" class="f-16" id="mibao" name="ps2" placeholder="安全码">
  81. </li>
  82. </ul>
  83. <a onclick="Login()" class="btn f-20 amallbtn" id="MyLogin"><span>确认添加</span></a>
  84. <input type="hidden" id='type' name='type' value="json">
  85. </div>
  86. </form>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="copyright f-16"><?php echo plug_get_configs_value("sys", "name"); ?> | <a style="color:#FFF" target="_blank" href="https://www.bsphp.com" class="f-16">BSPHP</a> Copyright © 2009-2020</div>
  91. </div>
  92. <script>
  93. function Login() {
  94. if (!$('#UserName').val()) {
  95. alert('请输入用户名');
  96. return;
  97. }
  98. if (!$('#Passowrd').val()) {
  99. alert('请输入密码');
  100. return;
  101. }
  102. if (!$('#mibao').val()) {
  103. alert('请输入安全码');
  104. return;
  105. }
  106. var pdata = $("#bsphpfoem").serialize();
  107. $.post(location.href, pdata, function(rdata) {
  108. alert(rdata.msg);
  109. return false;
  110. });
  111. return false;
  112. }
  113. </script>
  114. </body>
  115. </html>