
tittlemouse
Members-
Posts
303 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by tittlemouse
-
Re: Donator's Bank[MCV2] hi i couldnt get this to work on my v2 game
-
Re: [V2] cars_mod staff_cars hi i carnt get the give user car part to work but the view garage does but a few inventory text needed changed to garage
-
Re: IP Banning tool [V1] + [V2] hi make a folder called ipbans (no caps) and then chomd it to 777 and did you change the username part where it says username
-
Re: [V2] cars_mod staff_cars i know i have that. but i need the admin funcs for v2 so i can give user a car and so i can view members garage
-
this is to go with the ruby trader mod that hundley made <?php include "globals.php"; print "<h3>Ruby Market</h3>"; switch($_GET['action']) { case "buy": ruby_buy(); break; case "remove": ruby_remove(); break; case "add": ruby_add(); break; default: rmarket_index(); break; } function rmarket_index() { global $db,$ir,$c,$userid,$h; print "[url='rmarket.php?action=add']> Add A Listing[/url] Viewing all listings... <table width=75% cellspacing=1 class='table'> <tr style='background:gray'> <th>Adder</th> <th>Qty</th> <th>Price each</th> <th>Price total</th> <th>Links</th> </tr>"; $q=$db->query("SELECT cm.*, u.* FROM rubymarket cm LEFT JOIN users u ON u.userid=cm.cmADDER ORDER BY cmPRICE/cmQTY ASC"); while($r=$db->fetch_row($q)) { if($r['cmADDER'] == $userid) { $link = "[url='rmarket.php?action=remove&ID={$r[']Remove[/url]"; } else { $link = "[url='rmarket.php?action=buy&ID={$r[']Buy[/url]"; } $each= (int) $r['cmPRICE'] / $r['cmQTY']; print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['cmQTY']}</td> <td> \$" . number_format($each)."</td> <td>\$".number_format($r['cmPRICE'])."</td> <td>[$link]</td> </tr>"; } print "</table>"; } function ruby_remove() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM rubymarket WHERE cmID={$_GET['ID']} AND cmADDER=$userid"); if(!$db->num_rows($q)) { print "Error, either these rubys do not exist, or you are not the owner. [url='rmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $db->query("UPDATE users SET ruby=ruby+{$r['cmQTY']} where userid=$userid"); $db->query("DELETE FROM rubymarket WHERE cmID={$_GET['ID']}"); print "rubys removed from market! [url='rmarket.php']> Back[/url]"; } function ruby_buy() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM rubymarket cm WHERE cmID={$_GET['ID']}"); if(!$db->num_rows($q)) { print "Error, either these rubys do not exist, or they have already been bought. [url='rmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); if($r['cmPRICE'] > $ir['money']) { print "Error, you do not have the funds to buy these rubys. [url='rmarket.php']> Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE users SET ruby=ruby+{$r['cmQTY']} where userid=$userid"); $db->query("DELETE FROM rubymarket WHERE cmID={$_GET['ID']}"); $db->query("UPDATE users SET money=money-{$r['cmPRICE']} where userid=$userid"); $db->query("UPDATE users SET money=money+{$r['cmPRICE']} where userid={$r['cmADDER']}"); event_add($r['cmADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['cmQTY']} rubys from the market for \$".number_format($r['cmPRICE']).".",$c); print "You bought the {$r['cmQTY']} rubys from the market for \$".number_format($r['cmPRICE'])."."; } function ruby_add() { global $db,$ir,$c,$userid,$h; $_POST['amnt'] = abs((int) $_POST['amnt']); $_POST['price'] = abs((int) $_POST['price']); if($_POST['amnt']) { if($_POST['amnt'] > $ir['ruby']) { die ("You are trying to add more rubys to the market than you have."); } $tp=$_POST['amnt']*$_POST['price']; $db->query("INSERT INTO rubymarket VALUES('',{$_POST['amnt']},$userid,$tp)"); $db->query("UPDATE users SET ruby=ruby-{$_POST['amnt']} WHERE userid=$userid"); print "rubys added to market! [url='rmarket.php']> Back[/url]"; } else { print "[b]Adding a listing...[/b] You have [b]{$ir['ruby']}[/b] ruby(s) that you can add to the market.<form action='rmarket.php?action=add' method='post'><table width=50% border=2><tr> <td>ruby:</td> <td><input type='text' name='amnt' value='{$ir['ruby']}' /></td></tr><tr> <td>Price Each:</td> <td><input type='text' name='price' value='200' /></td></tr><tr> <td colspan=2 align=center><input type='submit' value='Add To Market' /></tr></table></form>"; } } $h->endpage(); ?> SQL -- -------------------------------------------------------- -- -- Table structure for table `rubymarket` -- CREATE TABLE `rubymarket` ( `cmID` int(11) NOT NULL auto_increment, `cmQTY` int(11) NOT NULL default '0', `cmADDER` int(11) NOT NULL default '0', `cmPRICE` int(11) NOT NULL default '0', PRIMARY KEY (`cmID`) ) ENGINE=MyISAM ; -- -------------------------------------------------------
-
Re: Ruby Trader Mod FREE!!! V2 dont forget to add this to header.php [b]Rubys:[/b] {$ir['ruby']}
-
Re: [V2] cars_mod staff_cars hi do you have give user car and view users garage?
-
Re: Visus yeah please do make this
-
Re: login.php help thanks very much yes that is much better
-
Re: IP Banning tool [V1] + [V2] thanks this person was really annoying me. when i feded him he just rejoined thanks to thisi can now just ip ban him thanks
-
Re: Profile Music is there anyway you can edit it so it autoplays. and so we can add this to our login.php page
-
here is my login.php <?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']; } 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 type="text/css"> <!-- body { background-color: #000000; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: yellow; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: white;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: white; } .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:#000000; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#000000; height:22px; } .table3 td { background-color:#000000; } td .alt { background-color:#000000; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #000000; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #000000; } --> </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=http://www.hitman-country.novahost.org/title.jpg] EOF; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); } $year=date('Y'); print "<h3>{$set['game_name']} Logging page</h3> <div id='Layer8'> <table width='181' height='203' border='1' bgcolor='#333333'> <tr> <th height='50' scope='col'>Navigation</th> </tr> <tr> <td height='30'>[url='login.php']Login[/url]</td> </tr> <tr> <td height='28'>[url='register.php']Register[/url]</td> </tr> <tr> <td height='30'>[url='#']Lost Password?[/url]</td> </tr> <tr> <td height='30'>[url='#']Screenshots[/url]</td> </tr> <tr> <td height='30'>[url='#']Terms Of Service[/url]</td> </div><center><font color=white> <table width='50%' border='3' cellpadding='1' cellspacing='1'> <tr> <td width='20%' bgcolor='#000000' valign='top'>[url='register.php']<big>Register</big>[/url] | [url='URL HERE']<big>Forum</big>[/url]</p> <center> <table width=100% border=6 cellspacing=0 class=tabletrans><th><font color=white>[b]Decription[/b]</th><th><font color=white>[b]Login[/b]</th><tr><td width=50%><center><font color=white> To be written </td><td><form action=authenticate.php method=post name=login onsubmit=\"return saveme();\">Username: <input type=text name=username> Password: <input type=password name=password> Remember me? <input type=\"radio\" value=\"ON\" name=\"save\">Yes <input type=\"radio\" name=\"save\" value=\"OFF\" checked>No <input type=submit value=Submit></a></form></td></tr></table></center> <font color=white> <center><table width=30% border=1 cellspacing=0 class=tabletrans><th><font color=white>[b][/b] [i]<center> Powered by codes made by Dabomstew (© {$year}). Game Copyright ©{$year} {$set['game_owner']}.</center>[/i]"; print <<<OUT </td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> </center></td> </tr> </table> </tr> </table> </td> </tr> </table> </body> </html> OUT; ?> my probrlem is here <div id='Layer8'> <table width='181' height='203' border='1' bgcolor='#333333'> <tr> <th height='50' scope='col'>Navigation</th> </tr> <tr> <td height='30'>[url='login.php']Login[/url]</td> </tr> <tr> <td height='28'>[url='register.php']Register[/url]</td> </tr> <tr> <td height='30'>[url='#']Lost Password?[/url]</td> </tr> <tr> <td height='30'>[url='#']Screenshots[/url]</td> </tr> <tr> <td height='30'>[url='#']Terms Of Service[/url]</td> i want to put that where the white thing is next to the login part but with a little space in between you can see it as www.hitman-country.novahost.org i know it is on a free host that why im buying a host and domain soon.
-
Re: Profile Music nice code ive got it on my profile
-
Re: [v1] NEW LOGIN MY FIRST [V1] has anyone good a goodreg page for v2
-
Re: itemmarket.php help that works a treat thanks +1
-
here is the code im trying to use on my v2 site <?php include "globals.php"; print "<h3>Item Market</h3>"; switch($_GET['action']) { case "buy": item_buy(); break; case "gift1": item_gift1(); break; case "gift2": item_gift2(); break; case "remove": item_remove(); break; default: imarket_index(); break; } function imarket_index() { global $db,$ir,$c,$userid,$h; print "Viewing all listings... <table width=75% cellspacing=1 class='table'> <tr style='background:gray'> <th>Adder</th> <th>Item</th> <th>Price</th> <th>Links</th> </tr>"; $q=$db->query("SELECT im.*, i.*, u.*,it.* FROM itemmarket im LEFT JOIN items i ON im.imITEM=i.itmid LEFT JOIN users u ON u.userid=im.imADDER LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid ORDER BY i.itmtype, i.itmname ASC"); $lt=""; while($r=$db->fetch_row($q)) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; print "\n<tr style='background: gray;'><th colspan=4>{$lt}</th></tr>"; } if($r['imCURRENCY']=="money") { $price="\$".number_format($r['imPRICE']); } else { $price=number_format($r['imPRICE'])." crystals"; } if($r['imADDER'] == $userid) { $link = "[[url='itemmarket.php?action=remove&ID={$r[']Remove[/url]]"; } else { $link = "[[url='itemmarket.php?action=buy&ID={$r[']Buy[/url]] [[url='itemmarket.php?action=gift1&ID={$r[']Gift[/url]]"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['itmname']}</td> <td>$price</td> <td>[[url='iteminfo.php?ID={$r[']Info[/url]] $link</td> </tr>"; } print "</table>"; } function item_remove() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT im.*,i.* FROM itemmarket im LEFT JOIN items i ON im.imITEM=i.itmid WHERE imID={$_GET['ID']} AND imADDER=$userid"); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or you are not the owner. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); item_add($userid, $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query("DELETE FROM itemmarket WHERE imID={$_GET['ID']}"); $db->query("INSERT INTO imremovelogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} removed a {$r['itmname']} from the item market.')"); print "Item removed from market! [url='itemmarket.php']> Back[/url]"; } function item_buy() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_GET['ID']}",$c); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $curr=$r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { print "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } item_add($userid, $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query("DELETE FROM itemmarket WHERE imID={$_GET['ID']}"); $db->query("UPDATE users SET $curr=$curr-{$r['imPRICE']} where userid=$userid"); $db->query("UPDATE users SET $curr=$curr+{$r['imPRICE']} where userid={$r['imADDER']}"); if($curr=="money") { event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for \$".number_format($r['imPRICE']).".",$c); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')"); print "You bought the {$r['itmname']} from the market for \$".number_format($r['imPRICE'])."."; } else { event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for ".number_format($r['imPRICE'])." crystals.",$c); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for {$r['imPRICE']} crystals from user ID {$r['imADDER']}')"); print "You bought the {$r['itmname']} from the market for ".number_format($r['imPRICE'])." crystals."; } } function item_gift1() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_GET['ID']}"); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $curr=$r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { print "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } if($curr=="money") { print "Buying the [b]{$r['itmname']}[/b] for \$".number_format($r['imPRICE'])." as a gift... <form action='itemmarket.php?action=gift2' method='post'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> User to give gift to: ".user_dropdown($c,'user')." <input type='submit' value='Buy Item and Send Gift' /></form>"; } else { print "Buying the [b]{$r['itmname']}[/b] for ".number_format($r['imPRICE'])." crystals as a gift... <form action='itemmarket.php?action=gift2' method='post'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> User to give gift to: ".user_dropdown($c,'user')." <input type='submit' value='Buy Item and Send Gift' /></form>"; } } function item_gift2() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_POST['ID']}"); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $curr=$r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { print "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } item_add($_POST['user'], $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query("DELETE FROM itemmarket WHERE imID={$_POST['ID']}"); $db->query("UPDATE users SET $curr=$curr-{$r['imPRICE']} where userid=$userid"); $db->query("UPDATE users SET $curr=$curr+{$r['imPRICE']} where userid={$r['imADDER']}"); if($curr=="money") { event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for \$".number_format($r['imPRICE']).".",$c); event_add($_POST['user'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought you a {$r['itmname']} from the item market as a gift.",$c); $u=$db->query("SELECT username FROM users WHERE userid={$_POST['user']}"); $uname=$db->fetch_single($u); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']} as a gift for $uname [{$_POST['user']}]')"); print "You bought the {$r['itmname']} from the market for \$".number_format($r['imPRICE'])." and sent the gift to $uname."; } else { event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for ".number_format($r['imPRICE'])." crystals.",$c); event_add($_POST['user'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought you a {$r['itmname']} from the item market as a gift.",$c); $u=$db->query("SELECT username FROM users WHERE userid={$_POST['user']}"); $uname=$db->fetch_single($u); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for {$r['imPRICE']} crystals from user ID {$r['imADDER']} as a gift for $uname [{$_POST['user']}]')"); print "You bought the {$r['itmname']} from the market for ".number_format($r['imPRICE'])." crystals and sent the gift to $uname."; } } $h->endpage(); ?> i carnt get it to work this is what i get
-
Re: Ajax chat for V2 thanks this is a good code.
-
Re: Tutorial: v1 - v2 Conversion thanks very much for posting this it has been very usefull as i can now convert mods.
-
Re: Password Protect Staff/Admin Panel that code is dumb all you have to do is view source and you will have the password.
-
Re: Counting (nr game) 1097
-
Re: gretna gretna to win the spl next season
-
Re: gretna theres the finished top 2 1 Gretna 66 pts --------------------------------------------------------------------------- 2 St Johnstone 65 pts
-
i would like to devote today to gretna. 5 years ago they were in non-league and now they are in spl they were promoted today. up with da gretna
-
Re: Counting (nr game) 1092
-
Re: Counting (nr game) 1090