Jump to content
MakeWebGames

Dylan

Members
  • Posts

    291
  • Joined

  • Last visited

    Never

Everything posted by Dylan

  1. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) Great mod Nyna :lol:
  2. Re: Updated Money & Crystal Bank [V2] ** Fixed tested and works   <?php require "globals.php"; print "<center><h3>Bank</h3></center><hr />"; if($ir['bankmoney']>-1) { switch($_GET['action']) { case "crydeposit": crydeposit(); break; case "crywithdraw": crywithdraw(); break; case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>49999) { print " <center> Congratulations, you bought the crystal and money bank for \$50,000! <a href='bank.php'> Start using my accounts! </a> </center>"; $db->query("UPDATE users SET money=money-50000,bankcrystal=0,bankmoney=9 WHERE userid=$userid",$c); } else { print " <center> You do not have enough money to open the crystal and money bank accounts! <a href='index.php'> Home </a> </center>"; } } else { print " <center> Open a crystal and money bank account today, just \$50,000! <a href='bank.php?buy'> Yes, sign me up! </a> </center>"; } } function index() { global $db,$ir,$c,$userid,$h; print " <center>\n[b]You currently have {$ir['bankcrystal']} crystals in the bank.[/b] [b]You currently have {$ir['bankmoney']} money in the bank.[/b] There is no interest involved with Crystals, only for Money </center><center> <table width='75%' border='1'> <th background='tableup.jpg' width=50%><font color=white>[b]Deposit Crystals</th> <th background='tableup.jpg' width=50%><font color=white>[b]Withdraw Crystals</th> <tr><td> <center>There is no fee on crystals deposits. <form action='bank.php?action=crydeposit' method='post'> [b]Amount:[/b] <input type='text' name='deposit' value='{$ir['crystals']}' /> <input type='submit' value='Deposit' /></form></td> <td> <center>There is no fee on crystal withdrawals. <form action='bank.php?action=crywithdraw' method='post'> [b]Amount:[/b] <input type='text' name='withdraw' value='{$ir['bankcrystal']}' /> <input type='submit' value='Withdraw' /></form></td> </tr> <tr><td background='tableup.jpg'><font color=white>[b]<center>Deposit Money[/b]</center></font></td><td background='tableup.jpg'><font color=white>[b]<center>Withdraw Money[/b]</center></font></td></tr> <tr><td><center>Todays fee is 15% of the money you deposit, Max fee is \$30,000<form action='bank.php?action=deposit' method='post'> [b]Amount:[/b] <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form></center></td> <td><center>There is no fee on Money withdrawals. <form action='bank.php?action=withdraw' method='post'> [b]Amount:[/b] <input type='text' name='withdraw' value='{$ir['bankmoney']}' /> <input type='submit' value='Withdraw' /></form></center></td></tr> </table>"; } function crydeposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['crystals']) { print "<center> You do not have enough crystals to deposit this amount. </center>[url='index.php']Home[/url]</center>"; } else { $gain=$_POST['deposit']-$fee; $ir['bankcrystal']+=$gain; $db->query("UPDATE users SET bankcrystal=bankcrystal+$gain, crystals=crystals-{$_POST['deposit']} where userid=$userid",$c); print "<center> You hand over {$_POST['deposit']} crystals and they are deposited. You now have [b]{$ir['bankcrystal']}[/b] crystals in the bank. [url='bank.php'] Back[/url]"; } } function crywithdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['bankcrystal']) { print "<center> You do not have enough banked crystals to withdraw this amount. [url='bank.php']Back[/url]</center>"; } else { $gain=$_POST['withdraw']; $ir['crystalbank']-=$gain; $db->query("UPDATE users SET bankcrystal=bankcrystal-$gain, crystals=crystals+$gain where userid=$userid",$c); print "<center>You withdraw $gain crystals from your bank. You now have [b]{$ir['bankcrystal']}[/b] crystals in the bank. [url='bank.php'] Back[/url]</center>"; } } function deposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } else { $fee=ceil($_POST['deposit']*15/100); if($fee > 30000) { $fee=30000; } $gain=$_POST['deposit']-$fee; $ir['bankmoney']+=$gain; $db->query("UPDATE users SET bankmoney=bankmoney+$gain, money=money-{$_POST['deposit']} where userid=$userid"); print "You hand over \${$_POST['deposit']} to be deposited, after the fee is taken (\$$fee), \$$gain is added to your account. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['bankmoney']) { print "You do not have enough banked money to withdraw this amount."; } else { $gain=$_POST['withdraw']; $ir['bankmoney']-=$gain; $db->query("UPDATE users SET bankmoney=bankmoney-$gain, money=money+$gain where userid=$userid"); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } $h->endpage(); ?>
  3. Re: Race Logs V2 I am aware it is telling that everyone is a multi working on a fix for this :wink:
  4. :-D For those with the cars mod, I got bored soo I made "race logs" for the staff panel Function add above $h->endpage(); in staff_logs.php function view_race_logs() { global $db,$ir,$c,$h,$userid; print "<h3>Race Logs</h3> <table width=100% cellspacing='1' class='table'> <tr style='background:gray'> <th>ID</th> <th>User From</th> <th>User To</th> <th>Multi?</th> <th>Amount</th> <th>Winner</th> <th> </th> </tr>"; $q=$db->query("SELECT rr.*,u1.username as sender, u2.username as sent FROM race_results rr LEFT JOIN users u1 ON rr.rrCHALLENGER=u1.userid LEFT JOIN users u2 ON rr.rrCHALLENGED=u2.userid ORDER BY rr.rrID DESC"); while($r=$db->fetch_row($q)) { if($r['cxFROMIP'] == $r['cxTOIP']) { $m="<span style='color:red;font-weight:800'>MULTI</span>"; } else { $m=""; } print "<tr><td>{$r['rrID']}</td> <td>[url='viewuser.php?u={$r[']{$r['sender']}[/url] [{$r['rrCHALLENGER']}] [b]Used [{$r['rrCHRCAR']}] [/b] </td><td>[url='viewuser.php?u={$r[']{$r['sent']}[/url] [{$r['rrCHALLENGED']}] [b] Used [{$r['rrCHDCAR']}] [/b] </td> <td>$m</td> <td> {$r['rrBET']} Money </td> <td>{$r['rrWINNER']} </td> <td> [[url='staff_punit.php?action=fedform&XID={$r[']Ban Sender[/url]] [[url='staff_punit.php?action=fedform&XID={$r[']Ban Receiver[/url]]</td> </tr>"; } print "</table>"; stafflog_add("Viewed the Race Logs"); } Cases (add under case 'stafflogs': view_staff_logs(); break;) case 'rcelogs': view_race_logs(); break; Add this link in your log links Race Logs :-D Screen Shot Hope it wasn't bad for my first mod :mrgreen:
  5. Re: New Crime Page [V2] great one!! :-D
  6. Re: Staff Passwords. I kinda didn't like that idea *never got it to work* so I ripped the login made alogin.php..and had it redirect to staff page works fine for me :-D
  7. Re: [V2] Login Page Advanced Yea well Done :) I like it
  8. Re: [V2] Login Page Advanced   <?php session_start(); 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"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $sql = "SELECT COUNT(userid) FROM users"; $rs = mysql_query($sql); $row = mysql_fetch_array($rs); $total_users = $row[0]; $sql = sprintf("SELECT COUNT(userid) FROM users WHERE (laston > %u)", time() - 900); $rs = mysql_query($sql); $row = mysql_fetch_array($rs); $users_online = $row[0]; $users_offline = $total_users - $users_online; 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> <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> body { background-color: #000000; } .main { background-image: url(""); color: white; font-family: Tahoma; } .button { background-image: url("default.png"); width: 100; height: 30; border: 0; color: red; } .text { color: red; font-family: Tahoma; } .nav a:visited,a:active,a:link { color: white;text-decoration: none; } .nav a:hover { color: white;text-decoration: underline; } </style> <center>{$set['game_description']}</center> <center><table width='800'><tr><td> <div id="main1" style="position:absolute; width:800px; height:600px; z-index:0; visibility: visible;"> <center><table width='800' height='600' class='main'><tr><td class='main'> <div id="login" style="position:absolute; left:28px; right:600px; top:182px; bottom:283px; width:172px; height:135px; z-index:0; visibility: visible;"> <center><form action='authenticate.php' method='POST'> Username: <input type='text' name='username'> Password: <input type='password' name='password'> <input type='submit' value='Login' class='button'></form> </div> <div id="main2" style="position:absolute; left:249px; right:23px; top:138px; bottom:201px; width:528px; height:261px; z-index:0; visibility: visible;" class="text"> </div> <div id="nav" style="position:absolute; left:29px; right:602px; top:371px; bottom:35px; width:169px; height:194px; z-index:0; visibility: visible;" class="nav"> <table width='100%'><tr><td><center> [url="login.php"]Login[/url] [url="register.php"]Register[/url] [url="screen.php"]Screen Shots[/url] [url="rules.php"]Rules[/url] Users Online: {$users_online} Users Offline: {$users_offline} Total Users: {$total_users} </tr> </div> </td></tr></table> </div> </td></tr></table> EOF; ?>   * Fixed now it shows users online/offline/total users..also ridded of the game description was really annoying
  9. Re: [v2]Reset Specific User[v2] Nice mod 9/10
  10. Re: Free 2 - Icons   <style>#icons { text-align:center; } #icons img { padding:0 2px; } $this->display_icons($ir);</style> OUT;   Thats how I have mine set up..but it is not showing pictures now..on images should I add /images/?
  11. Re: Free 2 - Icons I made the file "Icons" and it would not load them..I uploaded to "Images" and it works perfect
  12. Re: Free 2 - Icons Works great thanks!!!
  13. Re: Free 2 - Icons hmm okay I'll take them out and try it thanks!!
  14. Re: Free 2 - Icons Well I installed everything I'm having trouble on knowing were to place the...   <?php 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 />"; } ?>
  15. Re: Free 2 - Icons Nyna...I love your work but I can't find the headers..class can you help me?
  16. Re: [V2] cars_mod staff_cars When you edit a car it makes all the cars you have the same
  17. Re: Add new level Thanks alot I just wanted too add ranks like "Helper" and stuff and was wandering how
  18. I was wandering if someone can help me with making new staff ranks..etc.. I've looked everywhere and can not figure out how to do it
×
×
  • Create New...