Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,667
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Uridium

  1. Re: V2 Estate.php Fix? Try this   <?php include "globals.php"; $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=$db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np=$db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hrNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); echo '<script>alert("House Purchased Enjoy your New Home");</script>'; echo '<script>history.back(1);</script>'; exit; } } else if (isset($_GET['sellhouse'])) { $npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np=$db->fetch_row($npq); if($ir['maxwill'] == 100) { print "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); echo '<script>alert("House Sold You went back to the Lowest priced House");</script>'; echo '<script>history.back(1);</script>'; exit; } } else { print "Your current property: [b]{$mp['hNAME']}[/b] The houses you can buy are listed below. Click a house to buy it. "; if($ir['willmax'] > 100) { print "[url='estate.php?sellhouse']Sell Your House[/url] "; } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print "[url='estate.php?property={$r[']{$r['hNAME']}[/url] &nbsp - Cost: \${$r['hPRICE']} &nbsp - Will Bar: {$r['hWILL']} "; } } $h->endpage(); ?>   Ive added echo '<script>alert("House Sold You went back to the Lowest priced House");</script>'; echo '<script>history.back(1);</script>'; exit; } and echo '<script>alert("House Purchased Enjoy Your New Home");</script>'; echo '<script>history.back(1);</script>'; exit; } And fixed a willmax error
  2. Re: MainMenu Mod! NEW! I had a few problems with this one mainly that when i clicked on links no matter what link i clicked on i got Unexpected $end for every page looked at Might be that im using a different layout for my menus
  3. Re: V2 Estate.php Fix? I noticed sometimes on V2 that the queries was always to blame depending on how the rest of your files are laid out. try changing   while($r=$db->fetch_row($hq))   To   while($r=mysql_fetch_row($hq))   Im not saying this is the cause but its helped me in the past
  4. Re: MainMenu Mod! NEW! I have to say ive seen this script in Action and its very very very very good a nice clever approach to editing.. the reordering system is a brilliant idea. Im going to have to use this script and if its okies with Crazy have a mess with it..
  5. Re: [MMCODES V2] Menu Creator to work with the Themecreator Screenie This screenshot is what ive done to my menus those that are using the standard MCC menus will not see their version look anything like this/ But the idea is you Surround youe link in 3 images those being top center bottom... I'll share the images for the Coiled Menu.. round21.jpg << TOP round17a.jpg << MIDDLE round20.jpg << BOTTOM Quick Guide on how to wrap around your links....... print "<tr> <td width='169' height='39' background='round21.jpg'><center>Donators Only</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center> [url='cgym.php']Donator Gym[/url] [url='friendslist.php']Friends List[/url] [url='blacklist.php']Black List[/url]</td></tr> <tr> <td width='169' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr>"; If ya need more help just post.
  6. Re: [MMCODES V2] Menu Creator to work with the Themecreator STAFF SECTION call this file staff_menucreator.php   <?php //* V2 Menu Creator //* Illusions 2008 this notice must stay intact //* Free for to those Members of Criminal Existance Forums //* All we ask is that you keep this Notice intact *// include "sglobals.php"; //This contains user stuffs switch($_GET['action']) { case 'newMenu': new_Menu_form(); break; case 'newMenusub': new_Menu_submit(); break; case 'editMenu': edit_Menu_begin(); break; case 'editMenuform': edit_Menu_form(); break; case 'editMenusub': edit_Menu_sub(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "&#39;", htmlspecialchars($in)); } function new_Menu_form() { global $db,$ir,$c,$MenuID; if($ir['user_level'] != 2) { die("403"); } $oq=$db->query("SELECT * FROM Menu WHERE MenuTITLE='{$_POST['MenuTITLE']}' and MenuID='{$_POST['MenuID']}'"); $rm=$db->fetch_row($oq); print "<h1>Adding a new Menu</h1> <form action='staff_menucreator.php?action=newMenusub' method='post'> Menu ID: <input type='text' name='MenuID' /> Menu Title: <input type='text' name='MenuTITLE' /> Menu Number: <input type='text' name='MenuDATA' /> The Menu Number must be the same as the file you uploaded example 1 and not 1.php <input type='submit' value='Create New Menu' /> Menu ID's already in use are {$_POST['MenuID']} </form>"; } function new_Menu_submit() { global $db,$ir,$c,$MenuID; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['MenuID']) || !isset($_POST['MenuTITLE']) || !isset($_POST['MenuDATA'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_menucreator.php?action=newMenu']> Back[/url]"; $h->endpage(); exit; } $db->query("INSERT INTO Menu (MenuID, MenuTITLE, MenuDATA) VALUES( '{$_POST['MenuID']}', '{$_POST['MenuTITLE']}', '{$_POST['MenuDATA']}')"); //$i=mysql_insert_Menuid($c); print " <font size=3>Successfully Created Menu {$_POST['MenuTITLE']}</font>"; stafflog_add("Created Menu {$_POST['MenuTITLE']} "); } function edit_Menu_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing Menu</h3> <form action='staff_menucreator.php?action=editMenuform' method='post'> Menu: ".Menu_dropdown($c,'Menu')." <input type='submit' value='Edit Menu' /></form> OR enter a Menu ID to edit: <form action='staff_menucreator.php?action=editMenuform' method='post'> Menu: <input type='text' name='Menu' value='0' /> <input type='submit' value='Edit Menu' /></form>"; } function edit_Menu_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $q = $db->query("SELECT * FROM Menu WHERE MenuDATA='{$_POST['Menu']}'"); $r = $db->fetch_row($q); print "<h3>Menu Editing System</h3> <form action='staff_menucreator.php?action=editMenusub' method='post'> Menu ID: <input type='text' name='MenuID' value='{$r['MenuID']}' /> Menu Title: <input type='text' name='MenuTITLE' value='{$r['MenuTITLE']}' /> Menu CSS: <input type='text' name='MenuDATA' value='{$r['MenuDATA']}' /> <input type='submit' value='Edit Menu' /></form>"; } function edit_Menu_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['MenuID'])) { $go=1; } if(!isset($_POST['MenuTITLE'])) { $go=1; } if(!isset($_POST['MenuDATA'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['Menu']=$_POST['MenuID']; edit_Menu_form(); } $oq=$db->query("SELECT * FROM Menu WHERE MenuTITLE='{$_POST['MenuTITLE']}' and MenuID='{$_POST['MenuID']}'"); $rm=$db->fetch_row($oq); $db->query("UPDATE Menu SET MenuTITLE='{$_POST['MenuTITLE']}', MenuDATA='{$_POST['MenuDATA']}' WHERE MenuID={$_POST['MenuID']}"); stafflog_add("Edited Menu {$_POST['MenuTITLE']} [{$_POST['MenuID']}]"); print " <h1>Menu</h1><h3><font color='yellow'> {$_POST['MenuTITLE']}</h3></font><h1> edited.... Successfully</h1>"; } $h->endpage(); ?>   Now open up smenu.php and add these links   [b]Menu Creator[/b] > [url='staff_menucreator.php?action=newMenu']Add A New Menu[/url] > [url='staff_menucreator.php?action=editMenu']Edit A Menu[/url]   Ok as of now your mainmenu.php needs to be renamed to the value you set when creating a new menu via the admin menu Example Menu ID: 1 Menu Title: glossy menu Menu Number: 1 --------------------------- Menu ID: <<< REFERS TO THE MENU ID TO BE CHOSEN Menu Title: <<< THIS IS WHAT THE USER SEES FROM THE DROPDOWN Menu Number: <<< THIS IS THE NUMBER OF THE FILE YOUVE CHOSEN All new files will need to be numbered so your mainmenu.php will become 1.php and a new one when made and created 2.php and so on...
  7. A while ago i made a Theme creator which was good but the Menu always stayed the same. And now that people can Add Graphics to menus i thought it would be a good idea so admins could add their own touch of class to their menus. and let the users swap and change them. SQLS   CREATE TABLE IF NOT EXISTS `Menu` ( `MenuID` int(11) NOT NULL auto_increment, `MenuTITLE` varchar(255) NOT NULL default '', `MenuDATA` varchar(255) NOT NULL default '1', `MenuLOCK` int(11) NOT NULL default '0', PRIMARY KEY (`MenuID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ; ALTER TABLE `users` ADD `MenuID` INT( 11 ) NOT NULL DEFAULT '1' ;   call this file choosemenu.php   <?php /* Big Thanks to KILLAH for this Script /* 2008 KILLAH & ILLUSIONS /* Mccodes V2 Menu Change */ include("globals.php"); switch($_GET['action']) { case 'accept': accept_Menu_begin(); break; default: print "Error: This script requires an action."; break; } function accept_Menu_begin() { global $ir,$h; if($_POST['Menu']) { $Menu = abs(@intval($_POST['Menu'])); $rows = mysql_num_rows(mysql_query("SELECT MenuID FROM Menu WHERE MenuID=".$Menu)); if($rows == 0) { echo 'This Menu does not exist. Go AWAY!'; $h->endpage(); exit; } mysql_query("UPDATE users SET MenuID=".$Menu." WHERE userid=".$ir['userid']); echo ' <h2>Menu Updated </h2> <a href=index.php>[REFRESH Menu]</a>'; $h->endpage(); exit; } $q = mysql_query("SELECT MenuID FROM Menu"); $r = mysql_fetch_assoc($q); echo ' <h3>Choose Your Menu</h3> <form action="choosemenu.php?action=accept" method="post"> Menu: '.Menu_dropdown($r,'Menu').' <input type="submit" value="Choose Menu"> </form>'; } $h->endpage(); ?>   open up global_func.php and add   function Menu_dropdown($connection,$ddname="Menu",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM Menu ORDER BY MenuDATA ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['MenuDATA']}'"; if ($selected == $r['MenuDATA'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['MenuTITLE']}</option>"; } $ret.="\n</select>"; return $ret; }   open preferences.php and add this link to the rest...   [url='choosemenu.php?action=accept']Change Game Menu [ <font color=yellow>NEW</font>][/url]   Now open up header.php find include "mainmenu.php"; overwrite that with.   global $db,$ir,$c,$h,$userid,$set,$Menu; $q = $db->query("SELECT MenuID FROM users WHERE userid=$userid",$c); $t = $db->fetch_row($q); include "{$t['MenuID']}.php";   DONT UPLOAD HEADER.php just yet until youve done the next part
  8. Re: Item Market Bug Help Please Whats the other error ?
  9. I was helping someone out on a Mcc game and they mentioned that they had a feeling one of the gang members were cheating thier players by removing funds and crystals from the gangs vaults. So i was kinda inspired to make it so they can now be tracked..... SQLS For Gang Crystals   CREATE TABLE IF NOT EXISTS `gangcrystalxferlogs` ( `cxGANGID` int(11) NOT NULL auto_increment, `cxGANGFROM` int(11) NOT NULL default '0', `cxGANGTO` int(11) NOT NULL default '0', `cxGANGAMOUNT` int(11) NOT NULL default '0', `cxGANGTIME` int(11) NOT NULL default '0', `cxGANGFROMIP` varchar(15) NOT NULL default '127.0.0.1', `cxGANGTOIP` varchar(15) NOT NULL default '127.0.0.1', PRIMARY KEY (`cxGANGID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;   And for Gang Bank   CREATE TABLE IF NOT EXISTS `gangbankxferlogs` ( `cxGANGID` int(11) NOT NULL auto_increment, `cxGANGFROM` int(11) NOT NULL default '0', `cxGANGTO` int(11) NOT NULL default '0', `cxGANGAMOUNT` int(11) NOT NULL default '0', `cxGANGTIME` int(11) NOT NULL default '0', `cxGANGFROMIP` varchar(15) NOT NULL default '127.0.0.1', `cxGANGTOIP` varchar(15) NOT NULL default '127.0.0.1', `cxGANGBANK` enum('bank','cyber') NOT NULL default 'bank', PRIMARY KEY (`cxGANGID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;   Now open up staff_logs.php and add these cases   case 'gangcryslogs': view_gangcrys_logs(); break; case 'gangbanklogs': view_gangbank_logs(); break;   and these functions...   function view_gangcrys_logs() { global $db,$ir,$c,$h,$userid; print "<h3>Gang Crystal Xfer Logs</h3> <table width=100% cellspacing='1' class='table'> <tr style='background:gray'> <th>ID</th> <th>Time</th> <th>User From</th> <th>User To</th> <th>Multi?</th> <th>Amount</th> <th> </th> </tr>"; $q=mysql_query("SELECT cxGANG.*,u1.username as sender, u2.username as sent FROM gangcrystalxferlogs cxGANG LEFT JOIN users u1 ON cxGANG.cxGANGFROM=u1.userid LEFT JOIN users u2 ON cxGANG.cxGANGTO=u2.userid ORDER BY cxGANG.cxGANGTIME DESC"); while($r=$db->fetch_row($q)) { if($r['cxGANGFROMIP'] == $r['cxGANGTOIP']) { $m="<span style='color:red;font-weight:800'>MULTI</span>"; } else { $m=""; } print "<tr><td>{$r['cxGANGID']}</td> <td>" . date("F j, Y, g:i:s a",$r['cxGANGTIME']) . "</td><td>[url='viewuser.php?u={$r[']{$r['sender']}[/url] [{$r['cxGANGFROM']}] (IP: {$r['cxGANGFROMIP']}) </td><td>[url='viewuser.php?u={$r[']{$r['sent']}[/url] [{$r['cxGANGTO']}] {$r['cxGANGTOIP']}) </td> <td>$m</td> <td> {$r['cxGANGAMOUNT']} crystals</td> <td> [[url='staff_punit.php?action=fedform&XID={$ir[']Jail Sender[/url]] [[url='staff_punit.php?action=fedform&XID={$r[']Jail Receiver[/url]]</td> </tr>"; } print "</table>"; stafflog_add("Viewed the Gang Crystal Xfer Logs"); }   and   function view_gangbank_logs() { global $db,$ir,$c,$h,$userid; print "<h3>Gang Bank Xfer Logs</h3> <table width=100% cellspacing='1' class='table'> <tr style='background:gray'> <th>ID</th> <th>Time</th> <th>User From</th> <th>User To</th> <th>Multi?</th> <th>Amount</th> <th> </th> </tr>"; $q=mysql_query("SELECT cxGANG.*,u1.username as sender, u2.username as sent FROM gangbankxferlogs cxGANG LEFT JOIN users u1 ON cxGANG.cxGANGFROM=u1.userid LEFT JOIN users u2 ON cxGANG.cxGANGTO=u2.userid ORDER BY cxGANG.cxGANGTIME DESC"); while($r=$db->fetch_row($q)) { if($r['cxGANGFROMIP'] == $r['cxGANGTOIP']) { $m="<span style='color:red;font-weight:800'>MULTI</span>"; } else { $m=""; } print "<tr><td>{$r['cxGANGID']}</td> <td>" . date("F j, Y, g:i:s a",$r['cxGANGTIME']) . "</td><td>[url='viewuser.php?u={$r[']{$r['sender']}[/url] [{$r['cxGANGFROM']}] (IP: {$r['cxGANGFROMIP']}) </td><td>[url='viewuser.php?u={$r[']{$r['sent']}[/url] [{$r['cxGANGTO']}] {$r['cxGANGTOIP']}) </td> <td>$m</td> <td> {$r['cxGANGAMOUNT']} crystals</td> <td> [[url='staff_punit.php?action=fedform&XID={$ir[']Jail Sender[/url]] [[url='staff_punit.php?action=fedform&XID={$r[']Jail Receiver[/url]]</td> </tr>"; } print "</table>"; stafflog_add("Viewed the Gang Bank Xfer Logs"); }   Now open up yourgang.php find this function gang_donate2() and the Queries for the dbase add these 2 new lines   $db->query("INSERT INTO gangcrystalxferlogs VALUES ('', $userid, {$_GET['ID']}, {$_POST['crystals']}, unix_timestamp(), 'DONATED', 'DONATED')"); $db->query("INSERT INTO gangbankxferlogs VALUES ('', $userid, {$_GET['ID']}, {$_POST['crystals']}, unix_timestamp(), 'DONATED', 'DONATED')");   Further down find the one for Vault.. and the queries then add these 2   $db->query("INSERT INTO gangcrystalxferlogs VALUES ('', $userid, {$_GET['ID']}, {$_POST['crystals']}, unix_timestamp(), '', 'WITHDREW')"); $db->query("INSERT INTO gangbankxferlogs VALUES ('', $userid, {$_GET['ID']}, {$_POST['crystals']}, unix_timestamp(), '', 'WITHDREW')");   Finally add these 2 nwe links to the logs in smenu.php   > [url='staff_logs.php?action=gangcryslogs']Gang Crystal Xfer Logs[/url] > [url='staff_logs.php?action=gangbanklogs']Gang Bank Xfer Logs[/url]
  10. Re: [mccode v2] Humans vs. Zombies EVENT mod Nice to see someone steering away from Damn Gangster style games :)
  11. Re: Businesses Mod [Mccode V2]   Dont you just love those that complain. Any mod that deals with cash on large basis which im sure this one does is bound to have a few snags. So it would be a decent gesture to explain the problem rather than making it a public spectacle....
  12. Re: Stop people from using IE on website If your going to this lengh to stop IE users viewing your page. I suppose i could stop FF users viewing mine as i dont use FF. But overall FF and IE are not that hard to implement so they are viewed by either browser.
  13. Re: New MainMenu Nice mod but my only concern is with the menu being so wide wouldnt hat making the vewing area smaller Another possible method would be to implement an Ajax Menu where by it retracts to the left when not in use and when you hover over it then it would become visible Thus making the whole game area screen wider,
  14. Re: New MainMenu Invest in a Program Called snagit 7 lets you take area screen shots and keeps them clear.
  15. Re: [MCCODES V2+V1] Easiest Editing System you will ever need... This is a blank Version use it for what ever ya want   $query='SELECT * FROM items'; // Alter for your table name $result=mysql_query($query); $num=mysql_numrows($result); print"<table border='0' cellspacing='2' cellpadding='2'> <tr> <th><font face='Arial, Helvetica, sans-serif'>Item Id</font></th> <th><font face='Arial, Helvetica, sans-serif'>Item Type</font></th> <th><font face='Arial, Helvetica, sans-serif'>Item Name</font></th> <th><font face='Arial, Helvetica, sans-serif'>Item Desc</font></th> <th><font face='Arial, Helvetica, sans-serif'>Item Pic</font></th> </tr>"; $i=0; while ($i < $num) { $f1=mysql_result($result,$i,'itmid'); $f2=mysql_result($result,$i,'itmtype'); $f3=mysql_result($result,$i,'itmname'); $f4=mysql_result($result,$i,'itmdesc'); $f5=mysql_result($result,$i,'itmpic'); // Add as many as these as you want print"<tr> <td><font face='Arial, Helvetica, sans-serif'>$f1;</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f2;</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f3;</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f4;</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f5;</font></td> </tr>"; $i++; } print ""; } If your adding more dont forget to change the bolder part to the next number IE $f6 $f7 and so on <td><font face='Arial, Helvetica, sans-serif'>$f5;</font></td>
  16. Re: [MCCODES V2+V1] Easiest Editing System you will ever need... Same as above but this ones for the staff_users.php   function edit_user_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $query='SELECT * FROM users'; $result=mysql_query($query); $num=mysql_numrows($result); print"<table border='0' cellspacing='2' cellpadding='2'> <tr> <th><font face='Arial, Helvetica, sans-serif'>User Id</font></th> <th><font face='Arial, Helvetica, sans-serif'>User Name</font></th> <th><font face='Arial, Helvetica, sans-serif'>Login Name</font></th> <th><font face='Arial, Helvetica, sans-serif'>Last Ip</font></th> </tr> "; $i=0; while ($i < $num) { $f1=mysql_result($result,$i,'userid'); $f2=mysql_result($result,$i,'username'); $f3=mysql_result($result,$i,'login_name'); $f4=mysql_result($result,$i,'lastip_login'); print"<tr> <td><form action='staff_users.php?action=edituserform' method='post'> <input type='hidden' name='user' value='$f1;' /> <input type='submit' value='Edit This User' /></form></td> <font face='Arial, Helvetica, sans-serif'>[url='staff_users.php?action=edituserform'][/url]</font></td> <td><font face='Arial, Helvetica, sans-serif'>[b]$f2;[/b]</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f3;</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f4;</font></td> </tr>"; $i++; } print ""; }
  17. This may come in handy for those that have Masses of items in their game.. I was chatting with Richard and decided that the normal Dropdown for editing items or item types was a pain. Well unless you had a good head for number.... so here goes lol open up staff_items.php function edit_item_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $query='SELECT * FROM items'; $result=mysql_query($query); $num=mysql_numrows($result); print"<table border='0' cellspacing='2' cellpadding='2'> <tr> <th><font face='Arial, Helvetica, sans-serif'>Item Id</font></th> <th><font face='Arial, Helvetica, sans-serif'>Item Type</font></th> <th><font face='Arial, Helvetica, sans-serif'>Item Name</font></th> <th><font face='Arial, Helvetica, sans-serif'>Item Desc</font></th> <th><font face='Arial, Helvetica, sans-serif'>Item Pic</font></th> </tr>"; $i=0; while ($i < $num) { $f1=mysql_result($result,$i,'itmid'); $f2=mysql_result($result,$i,'itmtype'); $f3=mysql_result($result,$i,'itmname'); $f4=mysql_result($result,$i,'itmdesc'); $f5=mysql_result($result,$i,'itmpic'); print"<tr> <td><form action='staff_items.php?action=edititemform' method='post'> <input type='text' name='item' value='$f1;' /> <input type='submit' value='Edit By ID' /></form> <font face='Arial, Helvetica, sans-serif'>[url='staff_items.php?action=edititemform'][/url]</font></td> <td><form action='staff_items.php?action=edititemform' method='post'> <input type='text' name='item' value='$f2;' /> <input type='submit' value='Edit By Type' /></form> <font face='Arial, Helvetica, sans-serif'>[url='staff_items.php?action=edititemform'][/url]</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f3;</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f4;</font></td> <td><font face='Arial, Helvetica, sans-serif'>$f5;</font></td> </tr>"; $i++; } print ""; } function edit_item_form() { And place that where your Edit would usually be... Screenie
  18. Re: [mccode] Instant Messenger for Your Game! [$50.00] Im not one to judge people or scripts   So what happens after 12 months is up do you just vanish ?   As it was mentioned there are TONS of php messenger scripts out thjere that will do the exact same as yours PHP121 have a totally free version that would surpass your messenger. Youve probably coded something great but im not sure that these forus are the place to be selling it.
  19. Re: NO DONATION.. to Get your game to install on a subfolder openup installer.php and find if($pvf+$wvf+$dvf+$avf < 4) change it to if($pvf+$wvf+$dvf < 3) Ignore the failed message and just click NEXT to start installing
  20. Re: Filter Badwords! FREE! Dont think im trying to put your script off Crazy but with so many variations of different swear words and the ingenious replacements for them wouldnt this script take quite a few words for just one word......? Example B A S T A R D B4ST4RD B4574RD B.A.S.T.A.R.D theres 4 just for one word and could really even account for more.
  21. Re: [mccode v2] Freeze & Reactivate a Users Bank Account Just to fix the Error of the SQl not updating Open up staff_users.php FIND.   $db->query("UPDATE users SET username='{$_POST['username']}', level={$_POST['level']}, money={$_POST['money']}, crystals={$_POST['crystals']}, energy=$energy, brave=$nerve, maxbrave=$nerve, maxenergy=$energy, hp=$hp, maxhp=$hp, hospital={$_POST['hospital']}, jail={$_POST['jail']}, duties='{$_POST['duties']}', staffnotes='{$_POST['staffnotes']}', mailban={$_POST['mailban']}, mb_reason='{$_POST['mb_reason']}', forumban={$_POST['forumban']}, fb_reason='{$_POST['fb_reason']}', hospreason='{$_POST['hospreason']}', jail_reason='{$_POST['jail_reason']}', login_name='{$_POST['login_name']}', will=$will, maxwill=$maxwill WHERE userid={$_POST['userid']}");   And Replace with....   $db->query("UPDATE users SET username='{$_POST['username']}', level={$_POST['level']}, money={$_POST['money']}, crystals={$_POST['crystals']}, frozen={$_POST['frozen']},energy=$energy, brave=$nerve, maxbrave=$nerve, maxenergy=$energy, hp=$hp, maxhp=$hp, hospital={$_POST['hospital']}, jail={$_POST['jail']}, duties='{$_POST['duties']}', staffnotes='{$_POST['staffnotes']}', mailban={$_POST['mailban']}, mb_reason='{$_POST['mb_reason']}', forumban={$_POST['forumban']}, fb_reason='{$_POST['fb_reason']}', hospreason='{$_POST['hospreason']}', jail_reason='{$_POST['jail_reason']}', login_name='{$_POST['login_name']}', will=$will, maxwill=$maxwill WHERE userid={$_POST['userid']}");   Your Frozen Accounts shoul now be updated... ALSO in the imadd.php and itmsell.php Overwrite what i had before which was   if($ir['frozen']>0) { die(" <h1>Sorry you cannot Add or Sell Items whilst your Account is Frozen</h1>"); }   with this one   if($ir['frozen']>0) { echo '<script>alert("Your Bank Account Has Been Frozen you cannot sell items.");</script>'; echo '<script>history.back(1);</script>'; exit; }
  22. Re: [mccode v2] Enhanced Hall of fame COMPLETED! Most of the time colours dont show due to the way the CSS is laid out on your header.php so on header instead of using a colour for text try using Transparent
  23. Re: [Mccodes V2] Easter Egg Events   This just the basis of the holiday even creator where by you can change your seasonal event to do what ever you want. its merely a sript to keep your members happy for a few days over the holidays its up to you what you want it to do and how its run. Example The streets.php offers a player between 25-50 searches a day finding items going to hosp or jail. You can include the $ functions from the holiday creator so members can find eggs for easter or presents for xmas although they dont gain anything from finding these items it just adds a bit of fun to your games/
  24. Re: [MCCODES V2] Reset password + Secret question before password is sent. Update for Preferences.php Open up preferences.php find..   case 'passchange2': do_pass_change(); break; case 'passchange': pass_change(); break;   Underneath Add..   case 'questionchange2': do_squestion_change(); break; case 'questionchange': squestion_change(); break;   Still in prefs find   $db->query("UPDATE users SET userpass=md5('{$_POST['newpw']}') WHERE userid=$userid"); print "Password changed!"; } }   Underneath add   function squestion_change() { print "<h3>Secret Question Change</h3> <form action='preferences.php?action=questionchange2' method='post'>Current Secret Question: <input type='Secret Question' name='oldsquestion' /> New Secret Question: <input type='text' name='newsquestion' /> Confirm: <input type='text' name='newsquestion2' /> <input type='submit' value='Change Secret Question' /></form>"; } function do_squestion_change() { global $db,$ir,$c,$userid,$h; if(($_POST['oldsquestion']) != $ir['squestion']) { echo '<script>alert("The question we have on our database for you doesnt match the one youve given");</script>'; echo '<script>history.back(1);</script>'; exit; } else if($_POST['newsquestion'] !== $_POST['newsquestion2']) { echo '<script>alert("Sorry neither of the new Questions you entered Matched try again");</script>'; echo '<script>history.back(1);</script>'; exit; } if ($_POST['newsquestion'] == '') { echo '<script>alert("You Must Enter a New Secret Question dont leave the field blank");</script>'; echo '<script>history.back(1);</script>'; exit; } if ($_POST['newsquestion2'] == '') { echo '<script>alert("You cannot leave the Confirmt field blank");</script>'; echo '<script>history.back(1);</script>'; exit; } else { $db->query("UPDATE users SET squestion='{$_POST['newsquestion']}' WHERE userid=$userid"); echo '<script>alert("Success New Secret Question has been Updated Thank You");</script>'; echo '<script>history.back(1);</script>'; exit; } }   Finally Add   [url='preferences.php?action=questionchange']Change Secret Question[/url]   With the rest of the links in preferences.
  25. Re: [Mccodes V2] Easter Egg Events Holiday Creator call this file holiday_creator.php   <?php include "sglobals.php"; //This contains Holiday layouts //Illusions 2009 switch($_GET['action']) { case 'createholiday_event': create_holiday_event(); break; case 'createholiday_eventsub': create_holiday_event_sub(); break; case 'editholiday_event': edit_holiday_event(); break; case 'editholiday_eventform': edit_holiday_event_form(); break; case 'editholiday_eventsub': edit_holiday_event_sub(); break; case 'deleteholiday_event': delete_holiday_event(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function create_holiday_event() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Access Denied"); } print "Create New Holiday holiday_event. <table width='75%' class='table' cellspacing='1'> <form action='holiday_creator.php?action=createholiday_eventsub' method='post'> <tr> <th colspan='2'><h2>Holiday Event System Setup </h2></th> </tr> <tr> <td align='center'>holiday event ID Number Keeps Note of ID's added</td> <td><input type='text' name='holiday_event_id' value='' /></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 colspan='2' align='center'><input type='submit' value='Create New Holiday' /></td> </tr> </table></form></center>"; } function create_holiday_event_sub() { global $db,$ir,$c,$userid; if($ir['user_level'] != 2) { die("Access Denied"); } if(!isset($_POST['holiday_event_id']) || !isset($_POST['holiday_event_name'])) { print "You missed one or more of the required fields. Please go back and try again. [url='holiday_creator.php?action=createholiday_event']> Back[/url]"; $h->endpage(); exit; } $Get = $db->query(sprintf("SELECT `holiday_event_id` FROM `holiday_event_settings` WHERE `holiday_event_id`='%s'", addslashes($_POST['holiday_event_id']))); if($db->num_rows($Get)) { print "<h1>Sorry ID {$_POST['holiday_event_id']} is already In Use.</h1><h1>DO YOU WANT TO</h1> [url='holiday_creator.php?action=createholiday_event']1 Try Include another Holiday[/url] [url='holiday_creator.php?action=editholiday_event']2 Edit An Existing Holiday[/url] [url='holiday_creator.php?action=deleteholiday_event']3 Delete an existing Holiday[/url]"; exit; } $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']}')"); $i=mysql_insert_id($c); print "<h1>{$_POST['holiday_event_name']}</h1> Was Successfully Created <h1>DO YOU WANT TO</h1> <a href='holiday_creator.php?action=createholiday_eventsub'>1 Create Another Holiday <a href='holiday_creator.php?action=editholiday_event'>2 Edit An Exsisting Holiday [url='holiday_creator.php?action=deleteholiday_event']3 Delete an existing Holiday[/url]"; stafflog_add("Created new Holiday {$_POST['holiday_event_name']} [$i]"); } function edit_holiday_event() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Access Denied"); } print "<h3>Editing Holiday</h3> You can edit any aspect of this Holiday. <form action='holiday_creator.php?action=editholiday_eventform' method='post'> Holiday: ".holiday_dropdown($c,'holiday_event_id')." <input type='submit' value='Edit Holiday' /></form> OR enter a Holiday ID to edit: <form action='holiday_creator.php?action=editholiday_eventform' method='post'> Holiday: <input type='text' name='holiday_event_id' value='0' /> <input type='submit' value='Edit Holiday' /></form>"; } function edit_holiday_event_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Access Denied"); } $d=$db->query("SELECT * FROM holiday_event_settings WHERE holiday_event_id={$_POST['holiday_event_id']}"); $holi=$db->fetch_row($d); print "<h3>Editing Holiday</h3> <table width='75%' class='table' cellspacing='1'> <form action='holiday_creator.php?action=editholiday_eventsub' method='post'> <tr> <th colspan='2'><h2>Holiday Event System Setup </h2></th> </tr> <tr> <td align='center'>holiday event ID Number Your Editing ID {$holi['holiday_event_id']}</td> <td><input type='hidden' name='holiday_event_id' value='{$holi['holiday_event_id']}' /></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='{$holi['holiday_event_name']}' /></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'>{$holi['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='{$holi['holiday_event_page']}' /></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='{$holi['holiday_event_action']}' /></td> </tr> <tr> <td align='center'>Message for Winning Events Enter the message for a winning event</td> <td><textarea rows='6' cols='40' name='holiday_winning_message_1'>{$holi['holiday_winning_message_1']}</textarea></td> </tr> <tr> <td align='center'>Message for Failed Events Enter the message for a Failed event</td> <td><textarea rows='6' cols='40' name='holiday_failed_message_1'>{$holi['holiday_failed_message_1']}</textarea></td> </tr> <tr> <td align='center'>Prize name for Event 1 </td> <td><input type='text' name='holiday_event_message_1' value='{$holi['holiday_event_message_1']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 2 </td> <td><input type='text' name='holiday_event_message_2' value='{$holi['holiday_event_message_2']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 3 </td> <td><input type='text' name='holiday_event_message_3' value='{$holi['holiday_event_message_3']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 4 </td> <td><input type='text' name='holiday_event_message_4' value='{$holi['holiday_event_message_4']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 5 </td> <td><input type='text' name='holiday_event_message_5' value='{$holi['holiday_event_message_5']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 6 </td> <td><input type='text' name='holiday_event_message_6' value='{$holi['holiday_event_message_6']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 7 </td> <td><input type='text' name='holiday_event_message_7' value='{$holi['holiday_event_message_7']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 8 </td> <td><input type='text' name='holiday_event_message_8' value='{$holi['holiday_event_message_8']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 9 </td> <td><input type='text' name='holiday_event_message_9' value='{$holi['holiday_event_message_9']}' /></td> </tr> <tr> <td align='center'>Prize name for Event 10 </td> <td><input type='text' name='holiday_event_message_10' value='{$holi['holiday_event_message_10']}' /></td> </tr> <tr> <td colspan='2' align='center'><input type='submit' value='Edit This Holiday' /></td> </tr> </table></form></center>"; } function edit_holiday_event_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Access Denied"); } $db->query("UPDATE `holiday_event_settings` SET 'holiday_event_name' = '{$_POST['holiday_event_name']}', 'holiday_event_description' = '{$_POST['holiday_event_description']}', 'holiday_event_page' = '{$_POST['holiday_event_page']}', 'holiday_event_action' = '{$_POST['holiday_event_action']}', 'holiday_winning_message_1' = '{$_POST['holiday_winning_message_1']}', 'holiday_failed_message_1' = '{$_POST['holiday_failed_message_1']}', 'holiday_event_message_1' = '{$_POST['holiday_event_message_1']}', 'holiday_event_message_2' = '{$_POST['holiday_event_message_2']}', 'holiday_event_message_3' = '{$_POST['holiday_event_message_3']}', 'holiday_event_message_4' = '{$_POST['holiday_event_message_4']}', 'holiday_event_message_5' = '{$_POST['holiday_event_message_5']}', 'holiday_event_message_6' = '{$_POST['holiday_event_message_6']}', 'holiday_event_message_7' = '{$_POST['holiday_event_message_7']}', 'holiday_event_message_8' = '{$_POST['holiday_event_message_8']}', 'holiday_event_message_9' = '{$_POST['holiday_event_message_9']}', 'holiday_event_message_10' = '{$_POST['holiday_event_message_10']}' WHERE `holiday_event_id` = '{$_POST['holiday_event_id']}'"); stafflog_add("Edited Holiday {$_POST['holiday_event_name']} [{$_POST['holiday_event_id']}]"); print "<h1>Holiday {$_POST['holiday_event_name']} Updated</h1> <a href='holiday_creator.php?action=createholiday_eventsub'>1 Create Another Holiday <a href='holiday_creator.php?action=editholiday_event'>2 Edit An Exsisting Holiday [url='holiday_creator.php?action=deleteholiday_event']3 Delete an existing Holiday[/url]"; } function delete_holiday_event() { global $ir,$c,$h,$userid,$db; if($ir['user_level'] != 2) { die("Access Denied"); } $undeletable = array('1'); // add more IDs here, such as NPCs switch ($_GET['step']) { default: echo "<h3>Deleting Holiday Event</h3> Here you can delete a Holiday. <form action='holiday_creator.php?action=deleteholiday_event&step=2' method='post'> Delete Holiday: ".holiday_dropdown($c,'holiday_event_id')." <input type='submit' value='Delete Holiday' /></form> OR enter a Holiday ID to Delete: <form action='holiday_creator.php?action=deleteholiday_event&step=2' method='post'> Delete Holiday: <input type='text' name='holiday_event_id' value='0' /> <input type='submit' value='Delete Holiday' /></form>"; break; case 2: $target = $_POST['holiday_event_id']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) //print" <a href='holiday_creator.php?action=createholiday_eventsub'>1 Create A New Holiday <a href='holiday_creator.php?action=editholiday_event'>2 Edit An Exsisting Holiday [url='holiday_creator.php?action=deleteholiday_event']3 Delete an existing Holiday[/url]"; { die(' <h1>You cannot delete this Holiday its a Fixed Base Sorry try editing it.<h1>'); } $d=$db->query("SELECT holiday_event_id FROM holiday_event_settings WHERE holiday_event_id='$target'"); $holi=$db->fetch_row($d); print "<h3>Confirm</h3> Delete Holiday ".$holi["holiday_event_id"]."? <form action='holiday_creator.php?action=deleteholiday_event&step=3' method='post'> <input type='hidden' name='holiday_event_id' value='$target' /> <input type='submit' name='yesorno' value='Yes' /> <input type='submit' name='yesorno' value='No' onclick=\"window.location='holiday_creator.php?action=deleteholiday_event';\" /></form>"; break; case 3: $target = $_POST['holiday_event_id']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die('You cannot delete this Holiday.'); } if($_POST['yesorno']=='No') { die("<h1>Holiday {$holi['holiday_event_name']} has not been deleted.</h1> <a href='holiday_creator.php?action=createholiday_eventsub'>1 Create A New Holiday <a href='holiday_creator.php?action=editholiday_event'>2 Edit An Existing Holiday [url='holiday_creator.php?action=deleteholiday_event']3 Delete an existing Holiday[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); $d=$db->query("SELECT holiday_event_id FROM holiday_event_settings WHERE holiday_event_id='$target'"); $holi=$db->fetch_row($d); $db->query("DELETE FROM holiday_event_settings WHERE holiday_event_id='$target'"); echo "<h1>Holiday {$holi['holiday_event_name']} Successfully Deleted.</h1> <a href='holiday_creator.php?action=createholiday_eventsub'>1 Create A New Holiday <a href='holiday_creator.php?action=editholiday_event'>2 Edit An Exsisting Holiday [url='holiday_creator.php?action=deleteholiday_event']3 Delete an existing Holiday[/url]"; stafflog_add("Deleted holiday_event {$holi['holiday_event_name']} [{$_POST['holiday_event_id']}]"); break; } } $h->endpage(); ?>   Now open up global_func.php and just after...   <?php function money_formatter($muny,$symb='$') { return $symb.number_format($muny); }   ADD THIS   function holiday_dropdown($connection,$ddname="holiday_event_id",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM holiday_event_settings ORDER BY holiday_event_name DESC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['holiday_event_id']}'"; if ($selected == $r['holiday_event_id'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['holiday_event_name']}</option>"; } $ret.="\n</select>"; return $ret; }   Now open up smenu.php and add   print "> [url='holiday_creator.php?action=createholiday_event']Create New Holiday Game[/url] > [url='holiday_creator.php?action=editholiday_event']Edit A Holiday[/url] > [url='holiday_creator.php?action=deleteholiday_event']Delete A Holiday[/url] ";   And your done This is just the Creator for the Holidays you will need to Alter your scripts if you want an event to take part,,,,
×
×
  • Create New...