加入收藏 | 设为首页 | 会员中心 | 我要投稿 大连站长网 (https://www.0411zz.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

ucenter遗忘密码以后如何找回,重置更新密码源码

发布时间:2022-06-29 21:05:43 所属栏目:教程 来源:互联网
导读:将以下内容另存为.php格式,放在ucenter根目录即可重置修改你的管理密码,用完记得删除. ?php define(ROOT_DIR,dirname(__FILE__)./); if(!file_exists(./data/config.inc.php) || !is_writeable(./data)){ $isucdir= 0; echo UCenter创始人密码重置工具必须
  将以下内容另存为.php格式,放在ucenter根目录即可重置修改你的管理密码,用完记得删除.
 
  <?php
  define(ROOT_DIR,dirname(__FILE__)."/");
  if(!file_exists('./data/config.inc.php') || !is_writeable('./data')){
     $isucdir= 0;
     echo 'UCenter创始人密码重置工具必须放在UCenter根目录下才能正常使用.';
     exit;
  
  }else{
     $isucdir = 1;
  }
  $info="";
  setucadministrator();
  function setucadministrator(){
  global $isucdir;
  global $info;
  if($_POST['setucsubmit']){
  
     if($isucdir){
      $configfile = ROOT_DIR."./data/config.inc.php";
      $uc_password = $_POST["uc_password"];
      $salt = substr(uniqid(rand()), 0, 6);
      if(!$uc_password){

  function errorpage($message,$title = '',$isheader = 1,$isfooter = 1){
     $message = "<h4>$title</h4><br><br><table><tr><th> 提示信息</th></tr><tr><td>$message</td>< /tr></table>";
     echo $message;
     exit;
  }
  function templates($tpl){
  switch ($tpl){
     case "header":
      echo '<html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      <title>UCenter 创始人密码更改工具</title>
      <style type="text/css">
      <!--
      body {font-family: Arial, Helvetica, sans-serif, "宋体";font-size: 12px;color:#000;line-height: 120%;padding:0;margin:0;background:#DDE0FF;overflow-x:hidden;word-break:break-all;white-space:normal;scrollbar-3d-light-color:#606BFF;scrollbar-highlight-color:#E3 EFF9;scrollbar-face-color:#CEE3F4;scrollbar-arrow-color:#509AD8;scrollbar-shadow-color:#F0F1FF;scrollbar-base-color:#CEE3F4;}
      a:hover {color:#60F;}
      ul {padding:2px 0 10px 0;margin:0;}
      textarea,table,td,th,select{border:1px solid #868CFF;border-collapse:collapse;}
      input{margin:10px 0 0px 30px;border-width:1px;border-style:solid;border-color:#FFF #64A7DD #64A7DD #FFF;padding:2px 8px;background:#E3EFF9;}
      input.radio,input.checkbox,input.textinput,input.specialsubmit {margin:0;padding:0;border:0;padding:0;background:none;}
      input.textinput,input.specialsubmit {border:1px solid #AFD2ED;background:#FFF;height:24px;}
      input.textinput {padding:4px 0;}     input.specialsubmit {border-color:#FFF #64A7DD #64A7DD #FFF;background:#E3EFF9;padding:0 5px;}
      option {background:#FFF;}
      select {background:#F0F1FF;}
      #header {height:60px;width:100%;padding:0;margin:0;}
       h6 {color:#F00;padding-top:5px;margin-top:0;}
       .specialdiv {width:70%;border:1px dashed #C8CCFF;padding:0 5px;margin-top:20px;background:#F9F9FF;}
       #textcontent ul {margin-left:30px;}
       textarea {width:78%;height:320px;text-align:left;border-color:#AFD2ED;}
       select {border-color:#AFD2ED;}
       table {width:74%;font-size:12px;margin-left:18px;margin-top:10px;}
          table.specialtable,table.specialtable td {border:0;}
        td,th {padding:5px;text-align:left;}
          caption {font-weight:bold;padding:8px 0;color:#3544FF;text-align:left;}
          th {background:#D9DCFF;font-weight:600;}
        td.specialtd {text-align:left;}
       .specialtext {background:#FCFBFF;margin-top:20px;padding:5px 40px;width:64.5%;margin-bottom:10px;color:#006;}
      #footer p {padding:0 5px;text-align:center;}
      -->
      </style>
      </head>
      <body>

       echo '<form action="?action=setucadministrator" method="post">
       <h5>UCenter 创始人密码更改工具</h5>
       <h5> <font color=red>使用完毕后请及时删除本文件,以免给您造成不必要的损失</font></h5>
       <table>
       <tr><th width="30%">用户名</th><td width="70%"><input class="textinput" readonly="readonly" disabled type="text" name="username" size="25" maxlength="40" value="UCenter Administrator"></td></tr>
       <tr><th width="30%">请输入密码</th><td width="70%"><input class="textinput" type="text" name="uc_password" size="25"></td></tr>
      
       </table>
       <input type="submit" name="setucsubmit" value="提   交">
       </form>';
      }
      templates("footer");
      break;
  }
  }
  ?>
  将这个文件另存为php后上传到ucenter目录运行即可.
 
 

(编辑:大连站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!