网站使用技巧>正文
骑士cms忘记了密码咋办啊
2014-03-31 22:28骑士cms忘记了密码咋办啊。不用着急,
保存为editaccount.php。域名加上这个就可以了
复制以下代码:
<?php
define(’IN_QISHI’, true);
require_once(dirname(__FILE__).’/include/common.inc.php’);
require_once(QISHI_ROOT_PATH.’include/mysql.class.php’);
$db = new mysql($dbhost,$dbuser,$dbpass,$dbname);
$act = !empty($_GET[’act’]) ? trim($_GET[’act’]) : ’set’;
?>
<!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=gb2312" />
<title>骑士人才系统后台用户名密码重设工具</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 50px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #F4F7F9;
line-height:180%
}
body,td,th {
font-size: 12px;
color: #000000;
}
form{ padding:0px; margin:0px;}
a:link {
color: #0066CC;
}
a:visited {
color: #0066CC;
}
a:hover {
color: #009900;
}
define(’IN_QISHI’, true);
require_once(dirname(__FILE__).’/include/common.inc.php’);
require_once(QISHI_ROOT_PATH.’include/mysql.class.php’);
$db = new mysql($dbhost,$dbuser,$dbpass,$dbname);
$act = !empty($_GET[’act’]) ? trim($_GET[’act’]) : ’set’;
?>
<!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=gb2312" />
<title>骑士人才系统后台用户名密码重设工具</title>
<style type="text/css">
<!--
body {
}
body,td,th {
}
form{ padding:0px; margin:0px;}
a:link {
}
a:visited {
}
a:hover {
}
-->
</style></head>
<body>
<?php
if ($act=="set")
{
?>
<table width="500" border="0"
align="center" cellpadding="5"
cellspacing="0">
<tr>
<td
align="center"><strong
style="font-size:14px;">骑士人才系统后台用户名密码重设工具</strong></td>
</tr>
<tr>
<td>
<strong>说明:</strong>此工具仅适用于骑士人才系统3.0及以上版本,由<a
href="http://www.jiuquan.cc/"
target="_blank">骑士人才系统官方站</a>提供,如遇问题请到<a
href="http://www.jiuquan.cc/bbs/"
target="_blank">论坛</a>求助。<br
/>
请在下方表单中输入您要重设的用户名和密码,重设后请务必删除文件。</td>
</tr>
</table>
<form id="form1" name="form1" method="post" action="?act=save">
<table width="500" border="0"
align="center" cellpadding="3" cellspacing="1"
bgcolor="#B6D1EB">
<tr>
<td
bgcolor="#DFF3FD"> 请填写您要重设的用户名和密码:</td>
</tr>
<tr>
<td height="150"
bgcolor="#FFFFFF"><table width="100%"
border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="100"
align="right">设置用户名:</td>
<td><input
name="adminname" type="text" size="20"
/></td>
</tr>
<tr>
<td
align="right">设置新密码:</td>
<td><input
name="adminpwd" type="text" size="20"
/></td>
</tr>
<tr>
<td> </td>
<td><input
type="submit" name="Submit" value="保存"
style="font-size:12px; padding:3px;"
/></td>
</tr>
</table></td>
</tr>
</table>
</form>
<?php
}
elseif ($act=="save")
{
$account = $db->getone("SELECT *
FROM ".table(’admin’)." WHERE admin_id = ’1’");
if (empty($account))
{
exit("后台管理员帐号不存在!");
}
if
(strlen(trim($_POST[’adminpwd’]))<5)
exit("<script
language=javascript>alert(’密码长度不能小于6个字符!’);window.location=’?act=’</script>");
if
(strlen(trim($_POST[’adminname’]))<2)
exit("<script
language=javascript>alert(’用户名长度不能小于2个字符!’);window.location=’?act=’</script>");
$setsqlarr[’admin_name’]=trim($_POST[’adminname’]);
$setsqlarr[’pwd’]=md5($_POST[’adminpwd’].$account[’pwd_hash’].$QS_pwdhash);
if
(!updatetable(table(’admin’),$setsqlarr," admin_id=’1’"))
{
exit("密码重设失败!");
}
?>
<table width="500" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FBD08A">
<tr>
<td align="center"
bgcolor="#FFFDF0"
style="color:#FF0000">
恭喜您设置成功,请务必删本工具!
</td>
</tr>
</table>
<?php
}
?>
</body>
</html>
</style></head>
<body>
<?php
if ($act=="set")
{
?>
请在下方表单中输入您要重设的用户名和密码,重设后请务必删除文件。</td>
<form id="form1" name="form1" method="post" action="?act=save">
</form>
<?php
}
elseif ($act=="save")
{
?>
<table width="500" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FBD08A">
</table>
<?php
}
?>
</body>
</html>
本文链接:https://www.0937.biz/post-123.html
- 上一篇:谷歌WebP图片提升网站载入速度
- 下一篇:二级目录301重定向到二级域名的两种方法
猜你喜欢
- 2014-03-31 HTML内嵌网页
- 2014-03-31 帝国cms sitemap.php 转sitemap.xml 伪静态规则
- 2014-03-31 织梦火车头发布模块参数设置和详细介绍
- 2014-03-31 论坛注册页面提示语的修改方法
- 2014-03-31 齐博cms(原PHP168)打了3月4日的补丁后.百度编辑器上传不了图片了
- 2014-03-31 phpcms v9网站搬家更换域名的详细方法
- 2014-03-31 css控制div显示/隐藏方法及2种方法比较原码 转
- 2014-03-31 dedecms采集过滤规则 万能采集过滤代码 常用过滤
- 2014-03-31 html网页跳转代码大全
- 图文推荐
-
- 热门标签