I Can't Figure Out My Password - NOT Wordpress
Here is the admin area - mylovelybunny.com
I am trying to go into phpmyadmin to change the password, but no luck.
The current password is *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
and I have no idea how to decode it.
I tried to resave a password saved as MD5 over that password, but it didn't help.
Here is the php file for the index page:
<?php
session_start();
require_once("config.php");
require_once SMARTY_DIR."config_file.class.php";
require_once SMARTY_DIR."smarty.class.php";
require_once "libs/globals.php";
require_once "libs/db_layer.php";
require_once "libs/db_module.php";
$post_vars = StripSlashArray ($_POST);
if (!is_array($post_vars)) {
$post_vars = StripSlashArray($_GET);
}
class savename extends db_module {
function savename() {
$table_name = "tbl_admin";
$table_schema="";
$searchable_columns ="adminUserName";
$this->db_layer();
$this->db_module($table_name, $table_schema, $searchable_columns);
return 1;
}
function action($post_vars) {
$return_str = "";
$error="0";
switch ($post_vars['action']) {
case "login":
if($this->Validate($post_vars)) {
$error="1";
$return_str .= $this->welcome();
}
else{
$return_str .= $this->welcome();
}
break;
case 'logout':
$this->unsetsession();
header('location:./');
exit();
case 'welcome':
$return_str .= $this->welcome();
break;
default:
$return_str .= $this->loginForm($post_vars,$error);
}
return $return_str;
}
//-----------------------------------------
function unsetsession() {
session_unregister('session_admin_id');
session_unregister('session_adminuser_name');
session_destroy();
}
//-----------------------------------------
function Validate ($post_vars) {
require_once "../classes/class.util.php";
$smarty = new Smarty ();
$post_vars = AddSlashArray ($post_vars);
extract ($post_vars);
$error=0;
if($user_name == "") {
$GLOBALS['errors'][$error]="Please enter your username.";
$error++;
}
if($password == "") {
$GLOBALS['errors'][$error]="Please enter your password.";
$error++;
}
if($error=="0") {
$utilObj = new MyUtil();
$sqlCount="SELECT count(*) AS counter FROM tbl_admin AS adm WHERE adm.adminUserName LIKE '".$user_name."' AND adm.adminPassword='".$utilObj->base64En(2,$password)."' AND adm.adminStatus ='Y'";
$rsCount=mysql_query($sqlCount);
$rowCount=mysql_fetch_array($rsCount);
mysql_free_result($rsCount);
if($rowCount['counter']=="0") {
$GLOBALS['errors'][$error]="Please enter correct username or password.";
$error++;
}
else{
$sql="SELECT adm.adminID, adm.adminUserName, adm.adminID FROM tbl_admin AS adm WHERE adm.adminUserName='".$user_name."' AND adm.adminPassword='".$utilObj->base64En(2,$password)."' AND adm.adminStatus ='Y'";
$rs=mysql_query($sql);
$row=mysql_fetch_array($rs);
mysql_free_result($rs);
$_SESSION['session_admin_id']=$row['adminID'];
$_SESSION['session_adminuser_name']=$row['adminUserName'];
$sql_update="UPDATE tbl_admin SET adminLastLogin = '".date("Y-m-d H:i:s")."', adminIpAddress = '".$_SERVER['REMOTE_ADDR']."' WHERE adminID ='".$row['adminID']."'";
mysql_query($sql_update);
//$smarty->assign("admin_id", $row['admin_id']);
}
}
Return $error;
}
//-----------------------------------------
function loginForm ($post_vars, $error=NULL) {
$smarty = new Smarty();
if(is_array($post_vars)) {
extract ($post_vars);
$smarty->assign ("user_name", $user_name);
$smarty->assign ("password", $password);
if ($error != NULL){
$str="<img src='images/error.gif' border='0' alt='' align='absmiddle'>";
$str.="<B>Some fields have not been correctly completed.</B> Please review the changes required below.";
$str.="<ul type='square' style='margin:10 10 10 30;'>";
for($i=0; $i<count($GLOBALS['errors']); $i++) {
$str.="<li>".$GLOBALS['errors'][$i]."</li>";
}
$str.="</ul>";
$smarty->assign ("error", $str);
}
}
if(!$_SESSION['session_user_name'])
return $smarty->fetch("admin_index.tpl");
}
function welcome() {
$smarty = new Smarty();
$query1="SELECT DATE_FORMAT(adminLastLogin,'%d-%m-%Y %h:%i %p') AS lastlogin FROM tbl_admin WHERE adminUserName ='".$_SESSION['session_adminuser_name']."'";
$res1=mysql_query($query1);
$row=mysql_fetch_array($res1);
$smarty->assign('lastlogin', $row['lastlogin']);
return $smarty->fetch("admin_welcome.tpl");
}
}
$savename = new savename();
$body = $savename->action($post_vars);
$smarty = new Smarty();
$smarty->assign("body", $body);
$smarty->display("admin_layout.tpl");
?>
|~| VeeroTech Hosting - sales @ veerotech.net
|~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
|~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
|~| Visit us @veerotech Facebook - Twitter - LinkedIn
Robin