Yoyox 0 Posted May 1, 2014 Share Posted May 1, 2014 why these code don't work ? <div id="con-top">Panou de control</div> <div id="con-mid"> <?PHP if(isset($_GET['do']) && $_GET['do']=="aktivieren" && 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">Ihr Account wurde erfolgreich aktiviert. Sie können sich nun einloggen.</p>'; echo'<meta http-equiv="refresh" content="1; URL=index.php?s=login"> '; } else { echo'<p class="meldung">Query fehlgeschlagen. Bitte einen Admin kontaktieren!</p>'; } } else { echo'<p class="meldung">Es wurde kein passender Eintrag gefunden. Aktivierung fehlgeschlagen.</p>'; } } else { echo'<p class="meldung">Kein valider Hash!</p>'; } } if(!empty($_SESSION['user_id'])) { $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/reiche/'.$getStats->empire.'.png" title="Reich" alt="Reich"/>'; } else { $reich='kein Reich ausgewählt'; } echo'<table> <tr> <th class="topLine">Account:</th> <td class="tdunkel">'.$_SESSION['user_name'].'</td> </tr> <tr> <th class="topLine">Reich:</th> <td class="thell">'.$reich.'</td> </tr> <tr> <th class="topLine">Charaktere:</th> <td class="tdunkel">'.$getStats->ges_chars.'</td> </tr> <tr> <th class="topLine">Gesamte Spielzeit:</th> <td class="thell">'.$getStats->ges_spielzeit.' Minuten</td> </tr>'; $sqlAcc = "SELECT account.social_id AS loeschcode, 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">Löschcode:</th> <td class="tdunkel">'.$getAcc->loeschcode.'</td> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <center><a href="?s=prestige">Prestige System (Übersicht)</a></center> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ </tr> </table>'; } else { ?> <h2>Login</h2> <form action="index.php?s=login" method="POST"> <table> <tr> <th class="topLine">User ID:</th> <td class="tdunkel"><input type="text" name="userid" maxlength="16" size="20"/></td> </tr> <tr> <th class="topLine">Passwort:</th> <td class="thell"><input type="password" name="userpass" maxlength="16" size="20"/></td> </tr> <tr> <td class="topLine" style="text-align:center;" colspan="2"><input type="submit" name="submit" value="Login"/></td> </tr> </table> <p><a href="index.php?s=register">Registrierung</a> • <a href="index.php?s=lostpw">Passwort vergessen</a></p> </form> <?PHP } ?> </div> <div id="con-bot"></div> Link to comment Share on other sites More sharing options...
Premium Shogun 4598 Posted May 1, 2014 Premium Share Posted May 1, 2014 "Don't work" is not a valid report. Include error logs. Link to comment Share on other sites More sharing options...
Bacca001 30 Posted May 1, 2014 Share Posted May 1, 2014 This is a module for active an account, not login. Link to comment Share on other sites More sharing options...
Yoyox 0 Posted May 2, 2014 Author Share Posted May 2, 2014 ok , i understood now . Can somebody give me a valid login php code ? Link to comment Share on other sites More sharing options...
Premium Shogun 4598 Posted May 2, 2014 Premium Share Posted May 2, 2014 Programming doesn't work this way... Link to comment Share on other sites More sharing options...
Yoyox 0 Posted May 2, 2014 Author Share Posted May 2, 2014 ok , thx shogun Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now