插件名称:忘记后台密码添加新管理员
将Admin_Add 上传系统根目录下
访问: 系统地址/Admin_Add/Admin.php 进行访问
警告:添加后务必删除本插件,防止他人恶意利用.
警告:添加后务必删除本插件,防止他人恶意利用.
警告:添加后务必删除本插件,防止他人恶意利用.
警告:添加后务必删除本插件,防止他人恶意利用.
插件代码展示
<?php
//页面进入路径自己修改自己地址域名。 http://xxxxxx/Admin_Add/Admin.php
include("../Plug/Plug.php");
header("Content-Type: text/html; charset=utf-8");
#登陆字段
$type = Plug_set_post("type");
if ($type == 'json') {
$uname = Plug_set_post("uname");
$ps = Plug_set_post("ps");
$piccode = Plug_set_post("ps2");
$ps = md5($ps);
$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"}';
$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}');";
if (plug_query($sql)) {
Plug_print_json(array("code" => -1, 'msg' => '添加成功'));
} else {
Plug_print_json(array("code" => -1, 'msg' => '添加失败,可能账号已经存在换一个'));
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
<title>忘记后台密码 - <?php echo plug_get_configs_value("sys", "name"); ?></title>
<link href="static/css/css.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="static/js/jquery.min.js"></script>
<style>
.ui-dialog-buttonset button.ui-state-hover {
background: #1497fe !important;
}
</style>
</head>
<body>
<div id="mainContent">
<script type="text/javascript">
var mainContent = $("#mainContent");
</script>
<div id="swin" style="display:none;"></div>
<div id="suwin" style="display:none;"></div>
<div id="processing" style="display:none;"></div>
<div class="loginbox" style="flex-direction: column;">
<div class="contbox flex">
<div class="left">
<img src="static/picture/user-left.png" alt="<?php echo plug_get_configs_value("sys", "name"); ?>">
</div>
<div class="right">
<div class="box">
<div class="l">
<p style="font-size: 25px;">添加管理 - <?php echo plug_get_configs_value("sys", "name"); ?></p>
</div>
<div class="l">
<p style="font-size: 15px;">警告:添加后务必删除本插件,防止他人恶意利用.</p>
</div>
<div class="l">
<p style="font-size: 15px;">警告:添加后务必删除本插件,防止他人恶意利用.</p>
</div>
<div class="l">
<p style="font-size: 15px;">警告:添加后务必删除本插件,防止他人恶意利用.</p>
</div>
<div class="l">
<p style="font-size: 15px;">警告:添加后务必删除本插件,防止他人恶意利用.</p>
</div>
<form id="bsphpfoem" onsubmit="return Login();">
<BR /><BR />
<div class="form">
<ul>
<li class="">
<i class="iconfont"></i>
<input type="text" class="f-16" id="UserName" name="uname" onkeydown="if(event.keyCode==13){$('#Passowrd').focus()}" placeholder="管理账号">
</li>
<li class="">
<i class="iconfont"></i>
<input type="password" class="f-16" id="Passowrd" name="ps" placeholder="密码">
</li>
<li class="">
<i class="iconfont"></i>
<input type="password" class="f-16" id="mibao" name="ps2" placeholder="安全码">
</li>
</ul>
<a onclick="Login()" class="btn f-20 amallbtn" id="MyLogin"><span>确认添加</span></a>
<input type="hidden" id='type' name='type' value="json">
</div>
</form>
</div>
</div>
</div>
<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>
</div>
<script>
function Login() {
if (!$('#UserName').val()) {
alert('请输入用户名');
return;
}
if (!$('#Passowrd').val()) {
alert('请输入密码');
return;
}
if (!$('#mibao').val()) {
alert('请输入安全码');
return;
}
var pdata = $("#bsphpfoem").serialize();
$.post(location.href, pdata, function(rdata) {
alert(rdata.msg);
return false;
});
return false;
}
</script>
</body>
</html>