Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,124
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by Magictallguy

  1. 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; } } ?>
  2. 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
  3. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) That what I asked before - but nobody answered me :(
  4. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) I'm supposed to put it under the $IP stuff aren't I? xD
  5. 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
  6. 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.
  7. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) So um...how would I use it then? xD
  8. 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."); }
  9. 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!
  10. Re: New exploit found! That's one way to put your foot in it! xD
  11. Re: I need help plz OMG!!! HAHAHAHAHA He actually searched for the word "facilities" . not staff
  12. Re: mining From what I can recal from memory.. Find this: $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;   and change to this:   $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); $mpperc=(int) ($ir['power']/$ir['maxpower']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $mpopp=100-$mpperc;   Still in header - find [b]Health:[/b] {$hpperc}% <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr />   and change to: [b]Health:[/b] {$hpperc}% <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> [b]Mine Power:[/b] {$mpperc}% <img src=greenbar.png width=$mpperc height=10><img src=redbar.png width=$mpopp height=10> <hr /> and that should do it!
  13. Re: MAILS It may not be anything to do with that.. Are you sending mass mails but it's not showing up?
  14. Re: crimes with 0 exp Meh xD
  15. Re: Mccodes V2 Normal Bank.php NO FEES! It annoys me when people can't spell or type properly but meh! xD
  16. Re: Simple SQL Injection protection This forum is for help...Not accusations (read what I'm saying, I didn't says "false accusations") Please take it to PM, I don't want to see yet another forum thread going to s*** because 2 people can't get along..
  17. Re: Simple CSS menu And it's very easy to incorperate into PHP! :)
  18. Re: BBCode_Engine You edited? Yea.....
  19. Re: [v2]Reset Specific User[v2] I was joking ¬.¬
  20. Re: wtf tables are f d up Neither would I if I had 638 posts! (You did when I posted this anyway...)
  21. Re: Mccodes V2 Normal Bank.php NO FEES! Well said Destiny! xD
  22. Re: Simple SQL Injection protection *makes buzzer sound* Actually, Nyna isn't "always" right (as she will most likely confirm) - but she does have 30+ years of experience behind her and knows what she is doing :)  
  23. Re: new login.php MSN: [email protected]
  24. Re: [v2]Reset Specific User[v2] O_o wouldn't push Nyna!! xD you mst remember that she is only 23! (lol :P)
  25. Re: crimes with 0 exp When creating a crime, set the Crime EXP to 0
×
×
  • Create New...