Please help i cant login to my homepage
userpanel.php
PHP Code:
<div id="page_effect" style="display:none;">
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
//-->
</SCRIPT>
<div class="postui post-title">
<h2><a href="#"><img src="http://www.elitepvpers.com/forum/images/news/01.jpg" alt="" /> <span>Panou Utilizatorului</span></a></h2>
<span class="date">Metin2DD.in</span>
</div>
<div class="postui post-con">
<?PHP
if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) {
if($_POST['emailreset']=="Reset") {
$newPass = rand(000000,999999);
$setPass = "UPDATE player.safebox SET password=".$newPass." WHERE account_id='".$_SESSION['user_id']."' LIMIT 1";
$qryPass = mysql_query($setPass);
echo'<p class="meldung"><meta http-equiv="refresh" content="2;url=index.php?s=userpanel">Your password has been set successfully. You will receive an email with your new password.</p>';
$absender = $serverSettings['titel']." Noua parola la depozit";
$email = $serverSettings['pass_mail'];
$empfaenger = $_SESSION['user_email'];
$mail_body = "Salut,
Parola de la depozitul tau a fost resetata.
Noua parola: ".$newPass."
Te asteptam la joc :)!
Cu drag ".$serverSettings['titel']." Team
Acest e-mail a fost generat!Nu trimite reply la acest e-mail!";
$titel = "Noua parola la depozit".$serverSettings['titel'];
$header .= "X-Priority: 3\n";
$header .= "X-Mailer: mtVision Homepage Mailer\n";
$header .= "MIME-Version: 1.0\n";
$header .= "From: ".$absender." <".$serverSettings['pass_mail'].">\n";
$header .= "Reply-To: ".$serverSettings['pass_mail']."\n";
//$header .= "Content-Transfer-Encoding: 8bit\n";
$header .= "Content-Type: text/plain; charset=iso-8859-1\n";
if(!mail($empfaenger, $titel, $mail_body, $header)) {
echo'<p class="meldung">Eroare nu am putut trimite emailul!</p>';
}
}
}
?>
<?PHP
if(isset($_GET['do']) && $_GET['do']=="activation" && isset($_GET['hash']) && !empty($_GET['hash'])) {
if(strlen($_GET['hash'])==32 && $_GET['hash']!=1 && checkAnum($_GET['hash'])) {
$cmdHash = "SELECT id,web_aktiviert FROM account.account WHERE web_aktiviert='".$_GET['hash']."' AND web_aktiviert!='1' LIMIT 1;";
$qryHash = mysql_query($cmdHash,$sqlServ);
if(mysql_num_rows($qryHash)) {
$getData = mysql_fetch_object($qryHash);
$userUpdate = "UPDATE account.account SET web_aktiviert='1',status='OK' WHERE id='".$getData->id."' LIMIT 1;";
$updateQry = mysql_query($userUpdate,$sqlServ);
if($updateQry) {
echo'<p class="meldung">Your account has been activated successfully. You can log in now.</p>';
echo'<meta http-equiv="refresh" content="5; URL=index.php?s=userpanel"> ';
}
else {
echo'<p class="meldung">Query failed. Please contact an admin!</p>';
}
}
else {
echo'<p class="meldung">Can not find a matching entry. Activation failed.</p>';
}
}
else {
echo'<p class="meldung">No valid hash!</p>';
}
}
if(!empty($_SESSION['user_id']))
{
echo'<div class="splitLeft">';
echo'<ul class="menue">';
echo'</div>';
echo'';
$cmdStats = "SELECT SUM( player.playtime ) AS ges_spielzeit, COUNT( * ) AS ges_chars, player_index.empire
FROM player.player
INNER JOIN player.player_index ON player_index.id = player.account_id
WHERE player.account_id = '".$_SESSION['user_id']."'
LIMIT 1";
$qryStats = mysql_query($cmdStats,$sqlServ);
$getStats = mysql_fetch_object($qryStats);
if(!empty($getStats->empire)) {
$reich = '<img src="img/kingdom/'.$getStats->empire.'.png" title="Reich" alt="Reich"/>';
}
else {
$reich='Nu exista niciun caracter creat';
}
echo'<table>
<tr>
<th class="topLine">Nume de utilizator:</th>
<td class="tdunkel">'.$_SESSION['user_name'].'</td>
</tr>
<tr>
<th class="topLine">Regat:</th>
<td class="thell">'.$reich.'</td>
</tr>
<tr>
<th class="topLine">Caractere:</th>
<td class="tdunkel">'.$getStats->ges_chars.'</td>
</tr>
<tr>
<th class="topLine">Timp jucat:</th>
<td class="thell">'.$getStats->ges_spielzeit.' Minute</td>
</tr>';
$sqlAcc = "SELECT account.social_id AS loeschcode, name_checked AS warn,account.status AS status, safebox.password AS lagerpw
FROM account.account
LEFT JOIN player.safebox
ON account.id=safebox.account_id
WHERE account.id='".$_SESSION['user_id']."'";
$qryAcc = mysql_query($sqlAcc) or die(mysql_error());
$getAcc = mysql_fetch_object($qryAcc);
if(empty($getAcc->lagerpw)) $getAcc->lagerpw = '000000';
echo'
<tr>
<th class="topLine">E-mail:</th>
<td class="tdunkel">'.$_SESSION['user_email'].'</td>
</tr>
<tr>
<th class="topLine">Cod de stergere:</th>
<td class="tdunkel">'.$getAcc->loeschcode.'</td>
</tr>
<tr>
<th class="topLine">Parola depozit:</th>
<td class="tdunkel"><form action="index.php?s=userpanel" method="POST">
<input type="submit" name="emailreset" value="Reset"/>
</td>
</tr>
<tr>
<th class="topLine">Status:</th>
<td class="tdunkel">'.$getAcc->status.'</td>
</tr>
<tr>
<th class="topLine"><b><font color="red">Monezi Cont</font></b>: </th>
<td class="tdunkel">'.$_SESSION['coins'].' (<a href="index.php?s=donatii">doneaza pentru server</a>)</td>
</tr>
</table>';
echo'<div class="clear"></div>';
}
else
{
?>
<form id="login" action="index.php?s=userpanel" method="POST">
<div>
<input class="fui txt user" type="text" name="userid" maxlength="16" size="20"/><br />
<input class="fui txt pass" type="password" name="userpass" maxlength="16" size="20"/><br />
<input class="fui btn log" type="submit" name="submit" value="login"/>
<input class="fui btn reg" ONCLICK="window.location.href='index.php?s=register'" type="button" value="Register" />
<center><a href="index.php?s=lostpw"><h4>Ai uitat parola?</h4></a></center></p>
<div class="clear"></div>
</div>
</form>
<?PHP
}
?>
</div>
<div class="postui post-end"></div>
</div>
thnx
up help please