Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,140
  • Joined

  • Last visited

  • Days Won

    148

Everything posted by Magictallguy

  1. Re: NEW USERS IMAGE GALLERY FREE!!!!! Look on Torn City (sorry for swearing ;)) too..
  2. Re: An introduction to security Why are you escaping the maxbrave and stuff? Is that necessary? As for: UPDATE users SET `%s` = `%s` Does that SQL actually work? As you're not defining which row you're updating.. This should help in some way  
  3. Re: Need help with creating a php/mysql powered page. And back to the phpinfo() page...You've still yet to password protect/delete that..
  4. Re: Simple CSS menu If you're using MC Codes v2   <?php include(dirname(__FILE__) . '/globals.php'); ?> <style type="text/css"> body {font-family:Arial, Helvetica, sans-serif, Tahoma; font-size:12px;} #vertmenu { font-family: Arial, Helvetica, sans-serif, Tahoma; font-size: 100%; width: 160px; padding: 0px; margin: 0px; } #vertmenu h1 { display: block; background-color:#FF9900; font-size: 100%; padding: 3px 0 5px 3px; border: 1px solid #000000; color: #333333; margin: 0px; width:159px; } #vertmenu ul { list-style: none; margin: 0px; padding: 0px; border: none; } #vertmenu ul li { margin: 0px; padding: 0px; } #vertmenu ul li a { font-size: 100%; display: block; border-bottom: 1px dashed #C39C4E; padding: 5px 0px 2px 4px; text-decoration: none; color: #666666; width:160px; } #vertmenu ul li a:hover, #vertmenu ul li a:focus { color: #000000; background-color: #eeeeee; } </style> </head> <body> <div id="vertmenu"> <h1>Menu items</h1> <ul> [*][url="#"]Item 1[/url] [*][url="#"]Item 2[/url] [*][url="#"]Item 3[/url] [*][url="#"]Item 4[/url] [*][url="#"]Item 5[/url] [*][url="#"]Item 6[/url] [/list] <ul> <? if($ir['donatordays > 0) { echo ' [*][url="#"]Donator 1[/url] [*][url="#"]Donator 2[/url] [*][url="#"]Donator 3[/url]'; } if($ir['user_level'] > 1) { echo ' [*][url="#"]Staff 1[/url] [*][url="#"]Staff 2[/url] [*][url="#"]Staff 3[/url] '; } ?> [*][url="#"]Item 7[/url] [/list] </div> And so on :P It's actually quite simple.. You must experiment! Experiment I tell you!
  5. Re: Free 2 - Icons I feel I must agree with Saiyan!
  6. Re: Free 2 - Icons This is true. Everyone give Nyna a break! She has a lot to do now!
  7. Re: y isnt der a jail in v1 You say "i" instead of "I"! HA! xD
  8. Re: I want to make/own my own game, please help Somebody shout me? :D  
  9. Re: When is it ok to lie? Not necessarily - what if it was to save your life? xD
  10. Re: login.php help! As it loads it's fine - all tables/pictures/whatnot are fine as they are joined together. But when the loading has finished, then it breaks up.. There's a problem between the communication from the login file (most likely the HTML) to the users browser itself
  11. Re: Free 2 - Icons Because it's your mod? xD [me=Magictallguy]hides behind the nearest e-rock[/me]
  12. Re: y isnt der a jail in v1 I can speak/type properly and I'm only 16!
  13. Re: Staff Passwords. I have no comment - though if you could see my face, that would say it all...
  14. Re: This arrray work? Nyna to the rescue! :P
  15. Re: Free 2 - Icons Create one :P - Or use the donator.gif icon. Stick this with the other icon codes if ($do = $u['donatordays']) { $z = sprintf("%u Donator Days%s", $do, $do == 1 ? "" : "s"); $i[] = sprintf(" [url='donator.php'][img=FOLDERNAME/donator.png][/url] |", $z, $z); }   And that should work untested though so if you get any error - which chances are you will :P - just say here and I'll actually test it next time :D
  16. Re: Free 2 - Icons Works fine for me... I tested it on a v1 side folder of mine (for testing purposes only..) Works fine with me!
  17. Re: Free 2 - Icons Now I know this works as I've tested it..   <?php class headers { function startheaders() { global $ir, $set; echo <<<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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #CCCCCC; 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 { } .center { width:932px; background-color:#FFFFFFS; 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; } #icons { text-align:center; } #icons img { padding:0 2px; } --> </style></head> <body> <center> <table width="1000" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function display_icons( $u, $i = array() ) { if ($n = $u['new_announcements']) { $t = sprintf("%u New Announcement%s", $n, $n == 1 ? "" : "s"); $i[] = sprintf("[img=icons/announcements.png]", $t, $t); } if ($y = $u['new_mail']) { $t = sprintf("%u New Mail%s", $y, $y == 1 ? "" : "s"); $i[] = sprintf("[img=icons/mail.png]", $t, $t); } if ($n = $u['new_events']) { $t = sprintf("%u New Event%s", $n, $n == 1 ? "" : "s"); $i[] = sprintf("[img=icons/events.png]", $t, $t); } if ($a = max($u['bankmoney'], 0) + max($u['cybermoney'], 0)) { $fa = "$" . number_format($a) . " Banked"; $i[] = sprintf("[img=icons/bank.png]", $fa, $fa); } if ($z = $u['jobrank']) { $rs = mysql_query(sprintf("SELECT CONCAT(\"Working as \", `jrNAME`, \" in \", `jDESC`) FROM `jobranks` LEFT JOIN `jobs` ON `jrJOB` = `jID` WHERE (`jrID` = %u)", $z)); $row = mysql_fetch_array($rs); mysql_free_result($rs); $i[] = sprintf("[img=icons/working.png]", $row[0], $row[0]); } if (($p = $u['course']) && $u['cdays']) { $rs = mysql_query(sprintf("SELECT CONCAT(\"Studying \", `crName`) FROM `courses` WHERE (`crID` = %u)", $p)); $row = mysql_fetch_row($rs); mysql_free_result($rs); $i[] = sprintf("[img=icons/studying.png]", $row[0], $row[0]); } if (count($i)) echo "<div id='icons'>" . implode("", $i) . "</div><hr />"; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $gn=""; global $staffpage; $bgcolor = 'CCCCCC'; print <<<OUT <table height="50" width="1000" background="Banner.jpg"><tr></tr></table> <table width="90%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> <div align="left"> OUT; $this->display_icons($ir); print <<<OUT Name: <font color=#000066>$gn{$u}</font> Money: <font color=#000066>{$fm}</font> Level: <font color=#000066>{$ir['level']}</font> Points: <font color=#000066>{$ir['crystals']}</font> Energy: <font color=#000066>{$enperc}/100</font> <img src=Green-Bar.png width=$enperc height=6><img src=Red-Bar.png width=$enopp height=6> Nerve: <font color=#000066>{$ir['brave']}/{$ir['maxbrave']}</font> <img src=Blue-Bar.png width=$brperc height=6><img src=Red-Bar.png width=$bropp height=6> Motivation: <font color=#000066>{$wiperc}%</font> <img src=Black-Bar.png width=$wiperc height=6><img src=Red-Bar.png width=$wiopp height=6> [[url='preferences.php']Settings[/url]] [[url='logout.php']Logout[/url]] OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'CCCCCC'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'CCCCCC'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></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; } } ?>
  18. Re: How Do I Lower Stat Gained In Gym That would also work - but if you want high will and low stat gain, edit the gym :P
  19. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) That what I asked before - but nobody answered me :(
  20. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) I'm supposed to put it under the $IP stuff aren't I? xD
  21. Re: Stop Auto Refreshers and multi IP logins I know I'm a complete noob when it comes to this. But! Maybe combining these systems? Obviously a fair amount of rewriting will be needed. Spread it out over the files and database, linking them up where needed. That way the server has the same amount to do but doesn't find it as hard? (I know what I mean, do you? :P) While doing that, you could call from Apache (I wouldn't know as I don't know how Apache works) to check these and then relay it back to wherever needed (Most likely the database). Once these checks are done, either allow the user access, or don't. Seems simple when said, don't know how to go about coding that so don't you dare ask me! :D
  22. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) *muffles a few swear words* I followed the instructions.. Are we supposed to remove the $IP stuff? And I will read through the code now. I was expecting to work straight away coming from you xD   See, this demonstrates my point. You've obviously not even taken the time read through my code MTG, and have even less of an understanding of the language than I suspected. Shame really. I thought at one point you might have showed promise, but you have managed to disappoint me again. if you don't understand or understand the ludicrousness of MTG's code snippet above *and* see the obvious mistake and solution, I suggest you go away for a few years and learn the language.
  23. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) So um...how would I use it then? xD
  24. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) Slight problem - which I've only just noticed. When adding an IP address it blocks everyone (including myself :/) header.php (everything else is the same) /*Nyna's icon thingy mod*/ function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; /* //Error reporting if($ir['userid'] == 2) { error_reporting(E_ALL); } */ include_once("blip.php"); if (blip_is_blocked()) die("<tt>Your IP address has been blocked</tt>"); $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(!$ir['email']) { die ("<body>Your account may be broken. Please mail [email="[email protected]"][email protected][/email] stating your username and player ID."); }
  25. Re: omg wtf i dont get it He attempted to convert from v1 to v2 and failed as he didn't do it completely! There are a few topics telling you have to convert both ways!
×
×
  • Create New...