if(!isset($ref))
{
$ref = "index.php";
}
include "func.inc.php";
include "db/config.dat";
$where = "> Lost Password";
$show = 0;
$e = 0;
if (isset($l))
{
if (isset($u_name))
{
// Attempt to login
$r = get_pass($u_name);
$length = "3";
srand((double)microtime()*1000000);
$vowels = array("a", "e", "i", "o", "u");
$cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "tr", "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
$num_vowels = count($vowels);
$num_cons = count($cons);
for($i = 0; $i < $length; $i++){
$decryptedpassword .= $cons[rand(0, $num_cons - 1)].$vowels[rand(0, $num_vowels - 1)];
}
$arghpass = t_encrypt($decryptedpassword, $key);
if ($r == "")
{
$error = "Your username is incorrect.";
} else {
mail("$r[4]", "Pass retrieval", "Your password of $title is: $decryptedpassword", "From: $admin_email");
$zarg = listall("./db/users");
$thezargs = count($zarg);
for($ix = 0; $ix < $thezargs; $ix++) {
$rec = def($zarg[$ix], "./db/users");
if($rec[user_name] == $u_name) {
edit($rec[id], "$rec[user_name]<~>$arghpass<~>$rec[level]<~>$rec[email]<~>$rec[view_email]<~>$rec[mail_list]<~>$rec[location]<~>$rec[url]<~>$rec[avatar]<~>$rec[icq]<~>$rec[aim]<~>$rec[msn]<~>$rec[sig]<~>$rec[posts]<~>$rec[date_added]<~>$rec[id]", "./db/users", "no");
$rec = "You are VARGED NOW!!";
break;
}
}
if ($ref == "")
{
$ref = "index.php";
}
$error = "Emailed the password of $u_name to $u_name, redirecting...
";
$e = 1;
}
}
}
include "header.php";
if (!isset($user_env))
{
if (isset($error))
{
echo "$error";
if ($e == 1)
{
exit;
}
}
echo "
";
echo "