angel1992 Posted May 22, 2023 Posted May 22, 2023 So i am getting backinto mccodes after number of years away from it due to making game servers and working non stop did all my useal things set hings up set everything up right removed the csrf token that keeps bugging me for weird reasons not sure why mccodes need a csrf token anyway but when the stuff was made i go to the login page log in as the useal user and pass hit login and it just refreshes back to the login page dosnt load anything else now i am on a new host that i got any one got any ideas why it not logging in at all or why it refeshes when you hit login Quote
big_mike Posted May 22, 2023 Posted May 22, 2023 2 hours ago, angel1992 said: So i am getting backinto mccodes after number of years away from it due to making game servers and working non stop did all my useal things set hings up set everything up right removed the csrf token that keeps bugging me for weird reasons not sure why mccodes need a csrf token anyway but when the stuff was made i go to the login page log in as the useal user and pass hit login and it just refreshes back to the login page dosnt load anything else now i am on a new host that i got any one got any ideas why it not logging in at all or why it refeshes when you hit login if i remember rightly had the same issues but it always seemed to let me login when using chrome for some strange reason 😕 might be better to redo the whole login logic. Quote
angel1992 Posted May 22, 2023 Author Posted May 22, 2023 5 minutes ago, big_mike said: if i remember rightly had the same issues but it always seemed to let me login when using chrome for some strange reason 😕 might be better to redo the whole login logic. was thinking the same thing but i on opera GX but i looking at the code and i don't see the issue yet Quote
ags_cs4 Posted May 22, 2023 Posted May 22, 2023 well i cant say without seeing the code or the page, as it could be any thing Quote
angel1992 Posted May 22, 2023 Author Posted May 22, 2023 39 minutes ago, ags_cs4 said: well i cant say without seeing the code or the page, as it could be any thing forgive me i forgot login.php <?php /** * MCCodes Version 2.0.5b * Copyright (C) 2005-2012 Dabomstew * All rights reserved. * * Redistribution of this code in any form is prohibited, except in * the specific cases set out in the MCCodes Customer License. * * This code license may be used to run one (1) game. * A game is defined as the set of users and other game database data, * so you are permitted to create alternative clients for your game. * * If you did not obtain this code from MCCodes.com, you are in all likelihood * using it illegally. Please contact MCCodes to discuss licensing options * in this case. * * File: login.php * Signature: 4a7c1670deb7175782714a27e72bfc16 * Date: Fri, 20 Apr 12 08:50:30 +0000 */ require_once('globals_nonauth.php'); $login_csrf = request_csrf_code('login'); print <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>{$set['game_name']}</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="js/login.js"></script> <link href="css/login.css" type="text/css" rel="stylesheet" /> </head> <body onload="getme();"> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"><img src="title.jpg" alt="Mccodes Version 2" /><br /> <!-- Begin Main Content --> EOF; $IP = str_replace(array('/', '\\', '\0'), '', $_SERVER['REMOTE_ADDR']); if (file_exists('ipbans/' . $IP)) { die( "<span style='font-weight: bold; color:red;'> Your IP has been banned, there is no way around this. </span></body></html>"); } $year = date('Y'); echo "<h3>> {$set['game_name']} Log-In</h3> <table width='80%'> <tr> <td width='50%'> <fieldset> <legend>About {$set['game_name']}</legend> " . nl2br($set['game_description']) . " </fieldset> </td> <td>"; echo <<<EOF <fieldset> <legend>Login</legend> <form action='authenticate.php' method='POST' name='login' onsubmit='return saveme();'> Username: <input type='text' name='username' /><br /> Password: <input type='password' name='password' /><br /> Remember me?<br /> <input type='radio' value='ON' name='save' /> Yes <input type='radio' value='OFF' name='save' /> No<br /> <input type='hidden' name='verf' value='{$login_csrf}' /> <input type='submit' value='Submit'> </form> </fieldset> EOF; echo "</td></tr></table><br /> <h3><a href='register.php'>REGISTER NOW!</a></h3><br /> <i><center>Powered by codes made by Dabomstew (© {$year}). Game Copyright ©{$year} {$set['game_owner']}.</center></i>"; print <<<OUT </td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> </body> </html> OUT; loggedin.php <?php /** * MCCodes Version 2.0.5b * Copyright (C) 2005-2012 Dabomstew * All rights reserved. * * Redistribution of this code in any form is prohibited, except in * the specific cases set out in the MCCodes Customer License. * * This code license may be used to run one (1) game. * A game is defined as the set of users and other game database data, * so you are permitted to create alternative clients for your game. * * If you did not obtain this code from MCCodes.com, you are in all likelihood * using it illegally. Please contact MCCodes to discuss licensing options * in this case. * * File: loggedin.php * Signature: 348279378970838959d2e96c262b5301 * Date: Fri, 20 Apr 12 08:50:30 +0000 */ $housequery = 1; require_once('globals.php'); if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/installer.php') && $ir['user_level'] == 2) { echo ' <span style="font-weight: bold; font-size: 42px; color: red;"> WARNING: you have not deleted installer.php from the server. <br /> We suggest you do this immediately. </span> '; } echo ' <b>Welcome, ' . $ir['username'] . '!</b> <br /> <em>Your last visit was: ' . $lv . '.</em> '; $exp = (int) ($ir['exp'] / $ir['exp_needed'] * 100); if ($ir['hospital']) { $geninf = '<tr><td colspan="2"><font color="red">You are in Hospital for ' . $ir['hospital'] . ' minute(s)</font></td></tr>'; } elseif ($ir['jail']) { $geninf = '<tr><td colspan="2"><font color="red">You are in Jail for ' . $ir['jail'] . ' minute(s)</font></td></tr>'; } else { $geninf = ''; } echo " <table cellspacing='1' cellpadding='3' class='table' width='70%'> <tr> <td colspan='2' class='h'><b>General Information</b></td> </tr> {$geninf} <tr> <td><b>Name:</b> {$ir['username']}</td> <td><b>Crystals:</b> {$cm}</td> </tr> <tr> <td><b>Level:</b> {$ir['level']}</td> <td><b>Exp:</b> {$exp}%</td> </tr> <tr> <td><b>Money:</b> $fm</td> <td><b>HP:</b> {$ir['hp']}/{$ir['maxhp']}</td> </tr> <tr> <td><b>Property:</b> {$ir['hNAME']}</td> <td><b>Days Old:</b> {$ir['daysold']}</td> </tr> "; $ts = $ir['strength'] + $ir['agility'] + $ir['guard'] + $ir['labour'] + $ir['IQ']; $ir['strank'] = get_rank($ir['strength'], 'strength'); $ir['agirank'] = get_rank($ir['agility'], 'agility'); $ir['guarank'] = get_rank($ir['guard'], 'guard'); $ir['labrank'] = get_rank($ir['labour'], 'labour'); $ir['IQrank'] = get_rank($ir['IQ'], 'IQ'); $tsrank = get_rank($ts, 'strength+agility+guard+labour+IQ'); $ir['strength'] = number_format($ir['strength']); $ir['agility'] = number_format($ir['agility']); $ir['guard'] = number_format($ir['guard']); $ir['labour'] = number_format($ir['labour']); $ir['IQ'] = number_format($ir['IQ']); $ts = number_format($ts); echo " <tr> <td class='h' colspan='2'><b>Stats Info</b></td></tr> <tr> <td><b>Strength:</b> {$ir['strength']} [Ranked: {$ir['strank']}]</td> <td><b>Agility:</b> {$ir['agility']} [Ranked: {$ir['agirank']}]</td> </tr> <tr> <td><b>Guard:</b> {$ir['guard']} [Ranked: {$ir['guarank']}]</td> <td><b>Labour:</b> {$ir['labour']} [Ranked: {$ir['labrank']}]</td> </tr> <tr> <td><b>IQ: </b> {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td> <td><b>Total stats:</b> {$ts} [Ranked: $tsrank]</td> </tr> </table> "; $q = $db->query("SELECT `content` FROM `papercontent`"); $news = $db->fetch_single($q); $db->free_result($q); echo $set['game_name'] . ' Latest News: <br /> ' . nl2br($news) . ' <br /> '; $h->endpage(); Â Quote
ags_cs4 Posted May 22, 2023 Posted May 22, 2023 every thing looks good, even tho the login logic is not on this page but i think it might be a sessions problem not saving or something is the game live? if se you can post or PM me a link Quote
angel1992 Posted May 22, 2023 Author Posted May 22, 2023 1 hour ago, ags_cs4 said: every thing looks good, even tho the login logic is not on this page but i think it might be a sessions problem not saving or something is the game live? if se you can post or PM me a link um it not live but i am working on it issue got fixed forgot to clear my cache Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.