-
Posts
2,667 -
Joined
-
Last visited
-
Days Won
75
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
Re: [Mccodes V2] Easter Egg Events INSTALLER FIRST SQLS ( DONT SEND DIRECTLY TO PHPMYADMIN JUST UPLOAD TO YOUR SITE AS holiday_event.sql ) CREATE TABLE IF NOT EXISTS `holiday_event_settings` ( `holiday_event_id` int(11) NOT NULL AUTO_INCREMENT, `holiday_event_name` varchar(255) NOT NULL, `holiday_event_description` varchar(255) NOT NULL, `holiday_event_page` varchar(255) NOT NULL, `holiday_event_action` varchar(255) NOT NULL, `holiday_winning_message_1` varchar(255) NOT NULL, `holiday_failed_message_1` varchar(255) NOT NULL, `holiday_event_message_1` varchar(255) NOT NULL, `holiday_event_message_2` varchar(255) NOT NULL, `holiday_event_message_3` varchar(255) NOT NULL, `holiday_event_message_4` varchar(255) NOT NULL, `holiday_event_message_5` varchar(255) NOT NULL, `holiday_event_message_6` varchar(255) NOT NULL, `holiday_event_message_7` varchar(255) NOT NULL, `holiday_event_message_8` varchar(255) NOT NULL, `holiday_event_message_9` varchar(255) NOT NULL, `holiday_event_message_10` varchar(255) NOT NULL, PRIMARY KEY (`holiday_event_id`) ) ENGINE=MyISAM ; ALTER TABLE `users` ADD `holiday_event_turns` INT( 11 ) NOT NULL; ALTER TABLE `users` ADD `holiday_event_wins` INT( 11 ) NOT NULL; Call this file holiday_event.php <?php session_start(); ob_start(); function valid_email($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Illusions Installer</title> <script language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } // --> </script> <script language="JavaScript"> var usr; var pw; var sv; function getme() { usr = document.login.username; pw = document.login.password; sv = document.login.save; if (GetCookie('player') != null) { usr.value = GetCookie('username') pw.value = GetCookie('password') if (GetCookie('save') == 'true') { sv[0].checked = true; } } } function saveme() { if (usr.value.length != 0 && pw.value.length != 0) { if (sv[0].checked) { expdate = new Date(); expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000)); SetCookie('username', usr.value, expdate); SetCookie('password', pw.value, expdate); SetCookie('save', 'true', expdate); } if (sv[1].checked) { DeleteCookie('username'); DeleteCookie('password'); DeleteCookie('save'); } } else { alert('You must enter a username/password.'); return false; } } </script> <style type="text/css"> <!-- body { background-color: #DEDEDE; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#FFFFFF; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } --> </style></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=title.jpg] <h2>Illusions 2009 Installer</h2> <?php switch($_GET['code']) { case "install": install(); break; case "config": config(); break; default: diagnostics(); break; } function menuprint($highlight) { $items=array( 'diag' => '1. Diagnostics', 'input' => '2. Configuration', 'sql' => '3. Installation & Extras', ); $c=0; print "<hr />"; foreach($items as $k => $v) { $c++; if($c > 1) { print " > "; } if($k==$highlight) { print "<font color='black'>{$v}</font>"; } else { print "<font color='gray'>{$v}</font>"; } } print "<hr />"; } function diagnostics() { menuprint("diag"); if (version_compare(phpversion(), '4.2.0') < 0) { $pv="<font color='red'>Failed</font>"; $pvf=0; } else { $pv="<font color='green'>OK</font>"; $pvf=1; } if(is_writable('./')) { $wv="<font color='green'>OK</font>"; $wvf=1; } else { $wv="<font color='red'>Failed</font>"; $wvf=0; } if(function_exists('mysql_connect') || function_exists('mysqli_connect')) { $dv="<font color='green'>OK</font>"; $dvf=1; } else { $dv="<font color='red'>Failed</font>"; $dvf=0; } if(str_replace('holiday_event.php','',$_SERVER['SCRIPT_NAME']) == "/") { $av="<font color='green'>OK</font>"; $avf=1; } else { $av="<font color='red'>Failed</font>"; $avf=0; } print "<h3>Basic Diagnostic Results:</h3> <table width='80%' class='table' cellspacing='1'> <tr> <td>PHP version >= 4.2.0</td> <td>{$pv}</td> </tr> <tr> <td>Game folder writable</td> <td>{$wv}</td> </tr> <tr> <td>MySQL support in PHP present</td> <td>{$dv}</td> </tr> <tr> <td>Game installed at root level of domain or subdomain</td> <td>{$av}</td> </tr> </table>"; if($pvf+$wvf+$dvf+$avf < 4) { print "<hr /><font color='red'>One of the basic diagnostics failed, so Setup cannot continue. Please fix the ones that failed and try again.</font><hr />"; } else { print "<hr />> [url='holiday_event.php?code=config']Next Step[/url]<hr />"; } } function config() { menuprint("input"); print "<h3>holiday_event_ System Setup:</h3> <center> <form action='holiday_event.php?code=install' method='post'> <table width='75%' class='table' cellspacing='1'> <tr> <th colspan='2'>Database Config</th> </tr> <tr> <td align='center'>MySQL Driver</td> <td><select name='driver' type='dropdown'>"; if(function_exists('mysql_connect')) { print "<option value='mysql'>MySQL Standard</option>"; } if(function_exists('mysqli_connect')) { print "<option value='mysql'>MySQLi Enhanced</option>"; } print "</select></td> </tr> <tr> <td align='center'>Hostname This is usually localhost</td> <td><input type='text' name='hostname' value='localhost' /></td> </tr> <tr> <td align='center'>Username The user must be able to use the database</td> <td><input type='text' name='username' value='' /></td> </tr> <tr> <td align='center'>Password</td> <td><input type='text' name='password' value='' /></td> </tr> <tr> <td align='center'>Database Name The database should not have any other software using it.</td> <td><input type='text' name='database' value='' /></td> </tr> <tr> <th colspan='2'><h2>Holiday Event System Setup </h2></th> </tr> <tr> <td align='center'>holiday event ID Number This will be set by default as 1</td> <td><input type='hidden' name='holiday_event_id' value='1' /></td> </tr> <tr> <td align='center'>Holiday Event Name Give your holiday event a name</td> <td><input type='text' name='holiday_event_name' value='Easter' /></td> </tr> <tr> <td align='center'>Holiday Event Description Brief Description about this Holiday Event.</td> <td><textarea rows='6' cols='40' name='holiday_event_description'></textarea></td> </tr> <tr> <td align='center'>Page Linking Which Page are you linking this event to example attack.php If no Event page is required call it index.php </td> <td><input type='text' name='holiday_event_page' value='attack.php' /></td> </tr> <tr> <td align='center'>Page Action ? Does the page above require an Action if so use the action specified by the page Example ?ID=\$r['userid'] If the page doesnt require an action just leave the field blank</td> <td><input type='text' name='holiday_event_action' value='?ID=\$ir[userid]' /></td> </tr> <tr> <td align='center'>Message for Winning Events Enter the message for a winning event</td> <td><input type='text' name='holiday_winning_message_1' value='Congratulations you found a' /></td> </tr> <tr> <td align='center'>Message for Failed Events Enter the message for a Failed event</td> <td><input type='text' name='holiday_failed_message_1' value='Sorry Unlucky this time' /></td> </tr> <tr> <td align='center'>Prize name for Event 1 </td> <td><input type='text' name='holiday_event_message_1' value='golden_egg' /></td> </tr> <tr> <td align='center'>Prize name for Event 2 </td> <td><input type='text' name='holiday_event_message_2' value='chicken_egg' /></td> </tr> <tr> <td align='center'>Prize name for Event 3 </td> <td><input type='text' name='holiday_event_message_3' value='chocolate_egg' /></td> </tr> <tr> <td align='center'>Prize name for Event 4 </td> <td><input type='text' name='holiday_event_message_4' value='ruby_egg' /></td> </tr> <tr> <td align='center'>Prize name for Event 5 </td> <td><input type='text' name='holiday_event_message_5' value='spectrum_egg' /></td> </tr> <tr> <td align='center'>Prize name for Event 6 </td> <td><input type='text' name='holiday_event_message_6' value='spotted_egg' /></td> </tr> <tr> <td align='center'>Prize name for Event 7 </td> <td><input type='text' name='holiday_event_message_7' value='flowered_egg' /></td> </tr> <tr> <td align='center'>Prize name for Event 8 </td> <td><input type='text' name='holiday_event_message_8' value='royal_egg_blue' /></td> </tr> <tr> <td align='center'>Prize name for Event 9 </td> <td><input type='text' name='holiday_event_message_9' value='royal_egg_red' /></td> </tr> <tr> <td align='center'>Prize name for Event 10 </td> <td><input type='text' name='holiday_event_message_10' value='flambouyant_egg' /></td> </tr> <tr> <td align='center'>Number of Turns Per Player Enter Number of Turns for each player Default is 10</td> <td><input type='text' name='holiday_event_turns' value='10' /></td> </tr> <tr> <td align='center'>Number of Wins for players Enter Number of Wins Needed before a player is Successful Default is 10</td> <td><input type='text' name='holiday_event_wins' value='10' /></td> </tr> <tr> <td colspan='2' align='center'><input type='submit' value='Install' /></td> </tr> </table></form></center>"; } function install() { menuprint("sql"); { print "<h2><font color=green>Config writing Bypassed.</h2></font> "; define('MONO_ON', 1); require "class/class_db_mysql.php"; $db=new database; $db->configure($_POST['hostname'], $_POST['username'], $_POST['password'], $_POST['database'], 0); $db->connect(); $c=$db->connection_id; print "<h2>Connection Successful.</h2> "; $fo=fopen("holiday_event.sql","r"); $query=""; $lines=explode("\n",fread($fo,1024768)); fclose($fo); foreach($lines as $line) { if(!(strpos($line,"--") === 0) && trim($line) != "") //check for commented lines or blankies { $query.=$line; if(!(strpos($line,";") === FALSE)) { $db->query($query); $query=""; } } } print "Main MySQL data was written. Now write Extra MySQL data. "; //$username=$_POST['a_username']; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; // START MAIN EVENTS FOR SQL BASE // $db->query("INSERT INTO holiday_event_settings VALUES( '{$_POST['holiday_event_id']}', '{$_POST['holiday_event_name']}', '{$_POST['holiday_event_description']}', '{$_POST['holiday_event_page']}', '{$_POST['holiday_event_action']}', '{$_POST['holiday_winning_message_1']}', '{$_POST['holiday_failed_message_1']}', '{$_POST['holiday_event_message_1']}', '{$_POST['holiday_event_message_2']}', '{$_POST['holiday_event_message_3']}', '{$_POST['holiday_event_message_4']}', '{$_POST['holiday_event_message_5']}', '{$_POST['holiday_event_message_6']}', '{$_POST['holiday_event_message_7']}', '{$_POST['holiday_event_message_8']}', '{$_POST['holiday_event_message_9']}', '{$_POST['holiday_event_message_10']}')"); // OK TIME TO ADD THE EXTRA USERS PART TO THE TABLE // $db->query("UPDATE users SET holiday_event_turns='{$_POST['holiday_event_turns']}'"); $db->query("UPDATE users SET holiday_event_wins='{$_POST['holiday_event_wins']}'"); $path=$_SERVER['HTTP_HOST']; print " <h2>[b]Holiday Event Installation Was Successful![/b]</h2><hr /> <center><h1><font color='green'>SETUP COMPLETE</h1></font></center> Goto your Admin Panel to ADD, DELETE, EDIT your s"; } } ?> </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> Now goto your site and run the holiday_event.php remember the holiday_event.sql needs to be on your server PART 2 BELOW
-
mccode-v2 Reset password + Secret question before password is sent.
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Reset password + Secret question before password is sent. Once ive done the part for preferences.php those that are already regd on the game can set a new Secret Question via settings For those that havent had hance to set a new secret question and cant access the login page will have to use other means IE mail to staff -
mccode-v2 Reset password + Secret question before password is sent.
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Reset password + Secret question before password is sent. well if ya edit it and make it better dont forget to share :) -
Re: [Mccodes V2] Easter Egg Events Dont worry i havent forgotten about this mod just fixing some bugs
-
mccode-v2 Reset password + Secret question before password is sent.
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Reset password + Secret question before password is sent. I suppose thats the beauty of CE forums whatever ive lost i can usually track down what ive posted on here.. -
mccode-v2 Reset password + Secret question before password is sent.
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Reset password + Secret question before password is sent. I dont have an old copy of it i lost quite a lot of files on a reformat so im back to the basic MCC V2 at moment -
mccode-v2 Reset password + Secret question before password is sent.
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Reset password + Secret question before password is sent. Open up register.php and find else if($_POST['password'] != $_POST['cpassword']) { print "The passwords did not match, go back and try again. >[url='register.php']Back[/url]"; } Underneath add else if($_POST['squestion'] != $_POST['csquestion']) { print "<h1>ERROR! The Questions Dont Match</h1> >[url='register.php']Back[/url]"; } Same file Alter this line from $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); To this one $db->query("INSERT INTO users (username, login_name, userpass, squestion, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), '{$_POST['squestion']}', 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); Same File Again find <tr> <td><div align='center'>Password:</div></td> <td><div align='center'> <input type='password' name='password' /> </div></td> </tr> <tr> <td><div align='center'>Confirm Password: </div></td> <td><div align='center'> <input type='password' name='cpassword' /> </div></td> </tr> Underneath Add <tr> <td><div align='center'>Secret Question</div></td> <td><div align='center'> <input type='text' name='squestion' /> </div></td> </tr> <tr> <td><div align='center'>Re-type Secret Question</div></td> <td><div align='center'> <input type='text' name='csquestion' /> </div></td> </tr> And Thats it i havent added this to the preferences.php file yet but will do over time. -
mccode-v2 Reset password + Secret question before password is sent.
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Reset password + Secret question before password is sent. Okies here goes SQL ALTER TABLE `users` ADD `squestion` VARCHAR( 255 ) NOT NULL ; call this file resend.php <? include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); ?> <html> <style> body { background: #1E1E1E; color: #fff; font-size: 11px; font-family: Verdana; } td { color: #fff; font-size: 11px; font-family: Verdana; } #foot { color: #fff; font-size: 11px; font-family: Verdana; width: 808px; height: 24px; background: #1E1E1E; } a, a:visited { color: #D9C5C5; font-weight: bold; text-decoration: none; } a:hover, a:active { color: #fff; font-weight: bold; text-decoration: none; } #head { background: #1E1E1E url(title.jpg) no-repeat; width: 808px; height: 154px; font-size: 11px; font-family: Verdana; } #menu { background: #1E1E1E; width: 808px; height: 30px; font-size: 11px; font-family: Verdana; padding-top: 6px; padding-left: 16px; } #body { background: #1E1E1E; width: 580px; height: 500px; font-size: 11px; font-family: Verdana; padding-top: 10px; padding-left: 20px; } #body-right { background: #1E1E1E; width: 208px; height: 500px; font-size: 11px; font-family: Verdana; } input, select { font-size: 11px; } </style> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> <TABLE align=center width='808' BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD colspan='2' valign='top' id='head'> </TD> </TR> <TR> <TD colspan='2' valign='top' id='menu'> [url='login.php']Login[/url] | [url='register.php']Join the game[/url] | [url='resend.php']Lost pass?[/url] </TD> </TR> <TR> <TD valign='top' align='left' id='body'> <? if(isset($_POST['resend'])) { $email = mysql_real_escape_string($_POST["email"]); if ($email == '') { echo '<script>alert("Not sure what happened there did you actually give me an address to lookup ?");</script>'; echo '<script>history.back(1);</script>'; exit; } if((!strstr($email , "@")) || (!strstr($email , "."))) { echo '<script>alert("Sorry the Address type was not recognised.");</script>'; echo '<script>history.back(1);</script>'; exit; } $q = mysql_query("SELECT * FROM users WHERE email = '$email'") or die(mysql_error()); if(mysql_num_rows($q) > 0) { $q2 = mysql_fetch_assoc($q); $username = $q2[username]; //$pass = $q2[pass]; } else { echo '<script>alert("Sorry that Email Address was not found in our Database");</script>'; echo '<script>history.back(1);</script>'; exit; } function makePassword($len = 8) // << Change for greater lengh { $vowels = array('a', 'e', 'i', 'o', 'u'); //Bang in some Vowels cos we love em $confusing = array('I', 'l', '1', 'Z', '0'); //Confuse the array even more with some capitals $replacements = array('A', 'k', '3', 'U', '9'); //If not happy with Vowels or Confuse then add replacemnts for the happy chappy $choices = array(0 => rand(0, 1), 1 => rand(0, 1), 2 => rand(0, 2)); $parts = array(0 => '', 1 => '', 2 => ''); if ($choices[0]) $parts[0] = rand(1, rand(9,99)); if ($choices[1]) $parts[2] = rand(1, rand(9,99)); $len -= (strlen($parts[0]) + strlen($parts[2])); for ($i = 0; $i < $len; $i++) { if ($i % 2 == 0) $parts[1] .= chr(rand(97, 122)); else $parts[1] .= $vowels[array_rand($confusing)]; } if ($choices[2]) $parts[1] = ucfirst($parts[1]); if ($choices[2] == 2) $parts[1] = strrev($parts[1]); $r = $parts[0] . $parts[1] . $parts[2]; $r = str_replace($confusing, $replacements, $r); return $r; } $p = makePassword(8); // <<< Change value for lenght of password given $pass = md5($p); $squestion = mysql_real_escape_string($_POST["squestion"]); $q1 = mysql_query("SELECT * FROM users WHERE squestion = '$squestion'") or die(mysql_error()); if(mysql_num_rows($q1) < 0) { $q3 = mysql_fetch_assoc($q1); $username = $q3[username]; } if ($squestion == '') { echo '<script>alert("Please go back and check your Secret Question Again it doesnt seem to be the same as the one we have in our database");</script>'; echo '<script>history.back(1);</script>'; exit; } if ($squestion !== $question) $query = mysql_query( "UPDATE users SET userpass = '$pass' WHERE email = '$email' AND username = '$username'" ) or die(mysql_error()); $send = mail($email , "Password retrieval" , "You or someone using your mail has requested a password reset.\r\nYour data is:\r\nusernamename: $username\r\nPassword: $p\n\r\n\rYou can now login, thank you.", "FROM: [email][email protected][/email];"); if($query && $send) { echo ' <div class="info"> <center><h1>Success!!</h1></center> Your new password has been sent to the mail address you provided.</p> Once you get it, click [url="index.php"]here[/url] to login.</p> </div> '; } else { echo ' <div> Accept our apologies, we have encountered some problems.</p> ',$question.'</p> Your data is not lost, no need to worry. [b]<h2>Account Data Found For Username:<font color=lightgreen> '.$username.'</font>[/b]</h2>[b]<h2>New Password Changed To:<font color=yellow> '.$p.'</font>[/b]</h2> Your MD5 pass is <h2>'.$pass.'</h2></p> Try again later.</p> </div> '; } } else { ?> <div>[b]Re-New Password Request[/b]</div> We will Require your Email and Secret Password you used to Join the Game with.</p> <form method="post" action="resend.php"> Email: <input name="email" type="text" class="textBox"> Secret Question you gave when you signed up: <input name="squestion" type="text" class="textBox"> <input name="resend" type="submit" class="textBox" id="resend" value="Resend email"> </form> </p> After you enter your e-mail and Secret Question Correctly we will check if it exists in the database We will then send a Temporary Password to you. So you can Login to your Account You Can change this Password from the Settings Menu</div> <? } ?> Part 2 to follow could put it here but incase i mess it up lol -
mccode-v2 Reset password + Secret question before password is sent.
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Reset password + Secret question before password is sent. good thinking :) i'll do it so both questions have to match -
I liked the idea of a Password Retrivel system on a game but it dawned on me that as players get to know one another and sometimes fall out they may give their email addy away to a friend quite harmlessley only to find with the Password Retrieval from old they could just Pissss people off by entering their Addy all the time to send out new passwords...... So whys this one better ? Well this one still uses the email system as before but on registration users Now have to enter a Secret question so they can retrieve passwords. Even if a user gets their email address correct and the Secret Question Wrong then No email will be sent to a user saying a password reset occured.. Both the email and the secret Question have to be exact.. Will post in a few moments when i get the files ive adjusted together.....
-
Re: Battle ladder [Mccodes V2] Yep gotta agree the Editing of posts is a bit silly i would recommend 24 hours from posting the script so you can fine tune faults you find later... But to add my script again would just confuse anyone who hasnt read this post page and is just working from say page 2 or 3....
-
Re: [Mccodes V2] Easter Egg Events screenie setup
-
Re: [Mccodes V2] Easter Egg Events Ok i kinda went a bit mental i was sat here working out the sqls when i decided to alter it a bit and save me a lot of time doing a mod for every festivity of the year. So the updated version will let you name your festivity event example easter, christmas, blah, blah, blah. Pages can be linked to any page that you already have on your game. even if your pages require an action. I'll post up an image in about 5 mins so you get the idea. as always ive included an installer for easy installation.
-
Thought id do an Easter Egg event seeing as its drawing near Very basic uses the Streets system. The cron will give each user 10 egg Tokens The player then searches the Basket with their 10 tokens to try dig out the 10 eggs Hidden in the basket some results are Red Herrings and others will reward the player with an egg after the 24 hour even the person with the most eggs collected will be rewarded with a desired item chosen by the game admin. Its about 75% complete just making a few improvements
-
Re: [MCCODES V2]My First Mod (Flash Games) pointless or not its here its free and its available for others giving someone Crappy feedback like that isnt going to inspire them to do better and be creative. The guy has seen an opportunity for a bit of free entertainment and shared it. All my mods are crap they dont give money they dont give crystals but they do give users entertainment. so im going to give him +1 just to piss you off ;)
-
Re: V2 index.php The amount of files MCC could be cut down to half if people were to do things like you have just done. The attack uses 5 files and 4 are just wasted they could all be put into one script and you could save server space.. The files for staff could also be reduced to 2 files that being staff.php and smenu.php
-
Re: V2 index.php Nice to see some people thinking out side the box :) Nice work gideon.... Can i just mention though thst you add the ability for those that are in hosp or jail not to be able to see the bank... Just add if($ir['jail'] or $ir['hospital']) { die("Your Bank cannot be accessed while in jail or hospital."); } Before your bank routine :) +1
-
Re: Businesses Mod [Mccode V2] Check your script for extra Quotation Marks " these should only be found on the script your using with PRINT" and "; in your explore .php if you find any that are not like the above example like here Business listings change to Business listings
-
[MCCODES V2] Updated Jail now lets users Offer rescue Price
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Updated Jail now lets users Offer rescue Price What is your problem the above script is NOT yours and any edits from this script were not taken from yours. I dont steal from people on here and never have done. if yours is called rescue.php and mine is called rescue.php that is purely coincidental. -
[MCCODES V2] Updated Jail now lets users Offer rescue Price
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Updated Jail now lets users Offer rescue Price Thanks for adding back this post MD -
Re: [Mccodes V2] Item Sell Update [Javascript!] Yet another Quality product from Iamwicked +1
-
Re: Contact Staff Through Email Eternal can you explain what errors you fixed so the postee knows for future reference :)
-
Heres a small fix for those using the 150 energy bar mod. Some will have noticed that when its changed from 100-150 the bar stretches and becomes longer than the other bars. This small fix will make the energy bar stay at 100 lenght no matter what size the bar is.. open header.php and add this before PRINT <<<OUT section for where your energy bar is.. $width = 100; $left_width = round(($ir['energy']/$ir['maxenergy'])*$width); $right_width = $width - $left_width; Now alter your image part of the bar to read [b]Energy:[/b]{$ir[energy]} <img src=animatedbar.gif width=$left_width height=10><img src=redbar.png width=$right_width height=10> Change the img llink to that of your own... Your energy bar wont overstretch anymore You can apply the same rule for the other bars but make sure you change the energy and maxenergy to the bar your editing...
-
Re: one of my mods deleted ? replace your rescue.php eith this one see if that helps... <?php include "globals.php"; if($ir['jail']) { die("<h1>You cannot bail out people while in jail.</h1>"); } $_GET['ID']=abs((int) $_GET['ID']); $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}")); if(!$r['userid']) { die("Invalid user"); } if(!$r['jail']) { die("That user is not in jail!"); } if($r['rescue'] AND ($r['money'] > $r['rescue'])) { $cost = $r['rescue']; } else { $cost = 0; } $cf=number_format($cost); if($ir['money'] < $cost) { die("Sorry, you do not have enough money to bail out {$r['username']}. You need \$$cf."); } print "You successfully bailed {$r['username']} out of jail for \$$cf. > [url='jail.php']Back[/url]"; $db->query("UPDATE users SET money=money-{$cost} WHERE userid={$r['userid']}"); $db->query("UPDATE users SET money=money+{$cost} WHERE userid=$userid"); $db->query("UPDATE users SET energy=energy-2 WHERE userid=$userid"); $db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}"); $db->query("UPDATE users SET money=money-{$cost} WHERE userid={$r['userid']}"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] rescued you ftom jail you payed them \$$cost", $c); $h->endpage(); ?> This version will also deduct 10 energy for every rescue from the rescuer
-
Re: [mccode v2] Items Pic mod yes sorry myfault it is impic not itmpics as i suggested.. send me your addy and i'll take a look