Jump to content
MakeWebGames

Impossible

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by Impossible

  1. Re: Admin Content Manager mod I would really just like to see a preview. All the hype is getting me excited. I might have to buy if it pleases me. xD
  2. Re: Locked Account Mod [V2] Yeah, Marc, that's why it takes me so dang long to read your MSN messages, because you do that capitalize stuff. Anyways, nice seeing you here. ...Back on subject. In the first place, user's should not have the same login name and username. If you put a lock on the login name, it wouldn't be so bad. But, I wouldn't want a complete lock. At least let them be able to mail a staff member, talking about what happened. Not just lock after 4 attempts. I have so many passwords, that it takes me a couple times to go through my list. lol.
  3. Re: [MMCODES V2] HACKING ATTEMPTS LOGGED Me and a friend worked on this to make a log, if you would like to place in staff.php for easy viewing, or even call it whatever file you want. I figured that I steal and use so many things off of this site, I might as well contribute once in a while. :) I suggest to add: staff.php: if($ir['user_level'] != 2) //owner { die(" "); } { echo "<h3>Last 10 MySQL Error Logs</h3> (If the userid is 0, the error was from the system like crons, etc.)<hr />"; echo "<table width='100%' cellspacing='1' class='table'>"; echo "<tr>"; echo "<th>User</th>"; echo "<th>Error Message</th>"; echo "<th>Quere Executed</th>"; echo "<th>File</th>"; echo "<th>Time Reported</th>"; echo "</tr>"; $sql = $db->query("SELECT * FROM `mysql_errors` ORDER BY `error_time` DESC LIMIT 10"); if(!$db->num_rows($sql)) { echo "<tr style='text-align: center;'>"; echo "<td colspan='5'>No mysql errors</td>"; echo "</tr>"; } else { while ($row = $db->fetch_row($sql)) { $username = $db->fetch_single($db->query(sprintf("SELECT username FROM users WHERE (userid = %u)", $row['me_userid']))); echo "<tr>"; echo sprintf("<td>[url='viewuser.php?u=%u']%s [%u][/url]</td>", $row['me_userid'], stripslashes($username), $row['me_userid']); echo sprintf("<td>%s</td>", $row['error_msg']); echo sprintf("<td>%s</td>", htmlspecialchars($row['query_was'])); echo sprintf("<td>%s</td>", $row['file']); echo sprintf("<td>%s</td>", date('F j Y g:i:s a', $row['error_time'])); echo "</tr>"; } echo "</table>"; } }   By Itself: <?php include(DIRNAME(__FILE__) . "/globals.php"); if($ir['user_level'] != 2) //owner { die("You cannot access this page!"); } echo "<h3>Last 20 MySQL Error Logs</h3><hr />"; echo "<table width='100%' cellspacing='1' class='table'>"; echo "<tr>"; echo "<th>User</th>"; echo "<th>Error Message</th>"; echo "<th>Quere Executed</th>"; echo "<th>File</th>"; echo "<th>Time Reported</th>"; echo "</tr>"; $sql = $db->query("SELECT * FROM `mysql_errors` ORDER BY `error_time` DESC LIMIT 10"); if(!$db->num_rows($sql)) { echo "<tr style='text-align: center;'>"; echo "<td colspan='5'>No mysql errors</td>"; echo "</tr>"; } else { while ($row = $db->fetch_row($sql)) { $username = $db->fetch_single($db->query(sprintf("SELECT username FROM users WHERE (userid = %u)", $row['me_userid']))); echo "<tr>"; echo sprintf("<td>[url='viewuser.php?u=%u']%s [%u][/url]</td>", $row['me_userid'], stripslashes($username), $row['me_userid']); echo sprintf("<td>%s</td>", $row['error_msg']); echo sprintf("<td>%s</td>", htmlspecialchars($row['query_was'])); echo sprintf("<td>%s</td>", $row['file']); echo sprintf("<td>%s</td>", date('F j Y g:i:s a', $row['error_time'])); echo "</tr>"; } echo "</table>"; } $h->endpage(); ?>
  4. Re: [Mccodes V2] Easter Egg Events If you don't have your game installed in the root directory, replace holiday_event.php with below code.   <?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; } { $av="<font color='green'>OK</font>"; $avf=1; } 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>
  5. I need some help converting php's from I think v1 to v2. If anyone knows how to do this, please MSN me. ([email protected])   Thanks.
  6. Re: [All versions] Mailbox clickable bbcode and smilies I tried to add this to my site, images didn't work. Removed all "/" before image url. It worked. Thanks for this mod. +1
  7. Re: FREE Bug Tracker Mod Awesome!!
  8. Re: FREE Bug Tracker Mod Just one more thing... Can someone make this script so that you regular members can view the bugs that have been posted, but cannot see the items under manage? (MSN me for more info)
  9. Re: [MCCODES V2] Reset password + Secret question before password is sent. Again, great! It works, it's clean, neat, easy to implement.
  10. Re: [MCCODES V2] Reset password + Secret question before password is sent. Works great, thanks for the mod! +1 (Also, making a new login.php to match the resend.php that you have would be nice also.)
  11. Re: Businesses Mod [Mccode V2] Richard & Illusions +1 Great mod, keep them coming.
  12. Re: [MCCODES V2] Reset password + Secret question before password is sent. Sounds like it will be a good idea, but there is one problem... When a member wants to reset their password, what happens if they noob spell, then they don't know exactly what they entered. Maybe it should contain a conformation screen so no one misspells their secret question answer. Or just make members use a small word to describe their questions.
  13. Re: MCcodes V2 status mod Well you did good... +1
×
×
  • Create New...