"Admin Login/Password Reset To Default" Mod
2.0.x
|
| Price: |
USD 0 |
| Module Type: |
Administrator Panel Mods |
| Version: |
2.0.x |
| Supported?: |
Yes (free) |
|
Module Description:
|
|
|
This script allow you to reset your PMR administrator password if you forgot it, just make sure to be able to get access to your site via ftp.. Upload this script to your PMR root folder and run in your browser to reset administrator password to default - "admin":
<?php
include ('./config.php'); include ('./includes/functions.php'); include ('./includes/db.php');
$db = new Dbaccess; $db->connect ( $dbi['sql_host'], $dbi['sql_username'], $dbi['sql_password'], $dbi['sql_dbname'] ) or error('Critial Error', mysql_error () );
// Unset all sql datails for the security purposes unset ( $dbi );
$db->query('DROP TABLE IF EXISTS ' . ADMINS_TABLE) or error('Critical Error', mysql_error () ); $db->query('CREATE TABLE ' . ADMINS_TABLE . ' (login varchar(20) DEFAULT NULL, password varchar(32) DEFAULT NULL, level varchar(25) DEFAULT NULL)') or error('Critical Error', mysql_error () );
$db->query('INSERT INTO ' . ADMINS_TABLE . ' (login, password, level) VALUES ("admin", "' . md5("admin") . '", "SUPERUSER")') or error('Critical Error', mysql_error () );
echo 'Administrators table recreated and repopulated<br>';
$db->close();
?>
|
Downloaded / Viewed: 716
Submission Date: 09-15-2007
Last Update: 07-07-2008
|
|
|
|