-
Posts
2,701 -
Joined
-
Last visited
-
Days Won
88
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
Thought this was quite funny ;) just lets users see if they can Abduct a user from hospital without being caught themselves.. Call this file hospbust.php <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); if(!$_GET['ID']) { echo "This user is not in hospital."; } if (!isset($_GET['action'])){ $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=40; echo "Are you sure you want to Abduct {$r['username']} out of hospital? It will cost $energycost energy to Abduct them out of hospital. >[url='hospbust.php?action=yes&ID={$_GET[']Yes[/url] [url='hospital.php']No[/url]<"; } else { //if ($_GET['action']=='yes') { $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=1; $hospitalAbducted=rand(1,10); if ($ir['hospital'] > 0) { echo "You can't Abduct {$r['username']} when your in hospital yourself."; $h->endpage(); exit; } if ($r['hospital'] ==0) { echo "{$r['username']} is already out of hospital."; $h->endpage(); exit; } if ($ir['userid'] == $_GET['ID']) { echo "You Abduct yourself out of hospital."; $h->endpage(); exit; } if ($ir['energy'] < $energycost) { echo "You dont have enough energy to Abduct {$r['username']} out of hospital"; $h->endpage(); exit; } if ($ir['hospital'] > 0) { echo "You can't Abduct {$r['username']} when your the hospital."; $h->endpage(); exit; } if ($ir['userid'] != $_GET['ID']) { $j1per=$db->query("SELECT conf_value FROM settings WHERE conf_id=20",$c); $jj1per=$db->fetch_row($j1per); if ($chance == 1) { } $chance = rand(1,5); } if ($chance == 1) { print "You Successfuly Abducted [b]{$r['username']}[/b] out of hospital"; $db->query("UPDATE users SET hospital=0 WHERE userid={$_GET['ID']}",$c); $db->query("UPDATE users SET hospreason='Not In hospital.' WHERE userid={$_GET['ID']}", $c); $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] Abducted you from hospital.",$c); } if ($chance == 2) { { $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=1; $hospital=(int) rand(1,20); print "You were Beat up by a frenzied OAP whilst trying to Abduct [b]{$r['username']} [/b] and thrown in hospital for $hospital minutes."; $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); $db->query("UPDATE users SET hospital=hospital+$hospital WHERE userid=$userid", $c); $db->query("UPDATE users SET hospreason='Caught Abducting {$r['username']} out of hospital' WHERE userid=$userid", $c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] was Beat Up whilst trying to Abduct you from hospital.",$c); } } if ($chance == 3) { $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=1; $hospital=(int) rand(1,20); print "You were Beat up by a frenzied OAP whilst trying to Abduct [b]{$r['username']} [/b] and thrown in hospital for $hospital minutes."; $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); $db->query("UPDATE users SET hospital=hospital+$hospital WHERE userid=$userid", $c); $db->query("UPDATE users SET hospreason='Caught Abducting {$r['username']} out of hospital' WHERE userid=$userid", $c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] was Beat Up whilst trying to Abduct you from hospital.",$c); } } if ($chance == 4) { print "You Successfuly Abducted [b]{$r['username']}[/b] out of hospital"; $db->query("UPDATE users SET hospital=0 WHERE userid={$_GET['ID']}",$c); $db->query("UPDATE users SET hospreason='Not In hospital.' WHERE userid={$_GET['ID']}", $c); $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] Abducted you from hospital.",$c); } if ($chance == 5) { $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=1; $hospital=(int) rand(1,30); print "You were smashed over the head with a comode whilst trying to Abduct [b]{$r['username']} [/b] and thrown in hospital for $hospital minutes."; $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); $db->query("UPDATE users SET hospital=hospital+$hospital WHERE userid=$userid", $c); $db->query("UPDATE users SET hospreason='Caught Trying Abducting {$r['username']} out of hospital' WHERE userid=$userid", $c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] was Beat Up whilst trying to Abduct you from hospital.",$c); } ?> And replace hospital.php with this one. <?php include "globals.php"; echo ' <iframe name="shoutbox" id="shoutbox" src="shoutbox.php" width="100%" frameborder="0"></iframe> <form method="POST" name="shouting" target="shoutbox" action="shoutbox.php"> '.smilies('shouting', 'shout'); if($ir['user_level'] == 2) { echo ' - [[url="shoutbox.php?action=viewbanned"]View Banned[/url]] [[url="shoutbox.php?action=deleteall"]Delete all[/url]]'; } echo '<input type="text" id="shout" name="shout" style="width: 650px;"> <input type="submit" value="Shout!" onclick="window.location=\'hospital.php\';">[url="shoutbox.php"][img=shout-refresh.png][/url] </form>'; if($ir['jail']) { die("<h1>You are in jail so whats the point</h1>"); } print "<h3>Hospital</h3> <table width='75%' class=\"table\" border=\"0\" cellspacing=\"1\"><tr bgcolor=gray><th>Name</th><th>Reason</th><th>Action</th></tr>"; $q=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c); while($r=$db->fetch_row($q)) { print "\n<tr><td>{$r['gangPREF']} [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['hospreason']}</td><td>[[url='hospbust.php?ID={$r[']Abduct[/url]]</td></tr>"; } print "</table>"; $h->endpage(); ?> Word of Warning though you can do more harm than good as some Outcomes may see yourself in hosp and the person your trying to save their time has been raised....
-
Re: MainMenu Mod! NEW! Quick fix to allow mailbox and events and also Announcements to be updated.. overwrite your mainmenu.php with this one. <?php global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $mc=$ir['new_mail']; $fm=$ir['money']; $sql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '0' ORDER BY `order`", $c) or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $ec = ($r['name'] == "Events") ? "({$ir['new_events']})" : ""; $mc = ($r['name'] == "Mailbox") ? "({$ir['new_mail']})" : ""; $a = ($r['name'] == "Announcements") ? "({$ir['new_announcements']})" : ""; $j = ($r['name'] == "Jail") ? "({$set['jail_count']})" : ""; $ho = ($r['name'] == "Hospital") ? "({$set['hospital_count']})" : ""; echo '[url="'. $r['link'] .'"]'. $r['name'] .' '. $ec .' '. $mc .' '. $a .' '. $j .' '. $ho .'[/url] '; } if($ir['gang'] > 0) { echo ' [b]Your Gang Area[/b] '; $gsql = mysql_query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '3' ORDER BY `order`", $c) or die(mysql_error()); while ($r = mysql_fetch_array($gsql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } } if($ir['donatordays']) { echo ' [b]Donator Area[/b] '; $dsql = mysql_query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '2' ORDER BY `order`", $c) or die(mysql_error()); while ($r = mysql_fetch_array($dsql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } } if($ir['user_level'] > 1) { echo ' [b]Staff Area[/b] '; $ssql = mysql_query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '1' ORDER BY `order`", $c) or die(mysql_error()); while($r = mysql_fetch_array($ssql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } } ?> For those that are using this script in conjuction with my menu theme and want to add the COIL images then use this.... Big thanks again to HAUNTED for his patience on this one,, dont call this mainmenu.php name it to the default you used when making a new menu theme so for now im calling this one 1.php <?php global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $turns=$ir['search_turns']; $mc=$ir['new_mail']; $fm=$ir['money']; $sql = $db->query('SELECT COUNT(userid) AS num FROM `users` WHERE laston >= UNIX_TIMESTAMP() - 900'); $var = $db->fetch_row($sql); $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); //$minexp=(int) ($ir['mine_exp']/$ir['mine_needed']*100); //$power=(int) ($ir['power']/$ir['max_power']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $minex=100-$minexp; $pow=100-$power; $zm=money_formatter($ir['money']); $d=""; 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']; // Log Suspicious Users // isomerizer.com Copyright 2008+ if ($ir['log'] > 0) { $access = $_SERVER['REQUEST_METHOD']; $log = $_SERVER['REQUEST_URI']; $date = date ('F j, Y'); $time = date('g:i:s a'); $db->query( sprintf("INSERT INTO `logs` ( `ID` , `userid` , `IP` , `action` , `time` , `date` , `access` ) VALUES ( NULL , %u, '%s', '%s', '%s', '%s', '%s')", $userid, $ip, mysql_real_escape_string($log), $time, $date, $access)); } } $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>[url='viewuser.php?u={$ir[']<font color='red'>{$ir['username']}</font>[/url]</font>";$d="[img=donator.gif]"; } $attack_pics = ($ir['attpics']) ? '[img='.$ir['attpics'].']' : 'None, click here to upload'; $gn=""; print"<table width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='round21.jpg'><center>[b]Attack Image[/b]</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center> [url='attackimageuploader.php']".$attack_pics."[/url] <tr> <td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr>"; print "<table width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='round21.jpg'><center>Player Info</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center> [b]Name:[/b][url='viewuser.php?u={$ir['] $gn{$u} [{$ir['userid']}] $d[/url] Money: {$fm} Level: {$ir['level']} [url='crystalbank.php']Crystals:[/url] {$ir['crystals']} [url="crystaltemple.php?spend=refill><font"][b] [Refill][/b]</font>[/url] [url='bank.php']Bank [/url] [url='cyberbank.php']Cyber Bank[/url] Points: {$ir['points']} [[url='logout.php']Emergency Logout[/url]] </td></tr> <tr> <td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>Player Vitals</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center> [b]Energy:[/b] {$enperc}% [url='crystaltemple.php?spend=refill']<font color='green'>[Refill]</font>[/url] <img src=images/animatedbar.gif width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$wiperc}% <img src=images/animatedbar.gif width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=images/animatedbar.gif width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]EXP:[/b] {$experc}% <img src=images/animatedbar.gif width=$experc height=10><img src=redbar.png width=$exopp height=10> [b]Health:[/b] {$hpperc}% <img src=images/animatedbar.gif width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /></td></tr> <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>User Menu</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center>"; $sql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '0' ORDER BY `order`", $c) or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $ec = ($r['name'] == "Events") ? "({$ir['new_events']})" : ""; $mc = ($r['name'] == "Mailbox") ? "({$ir['new_mail']})" : ""; $a = ($r['name'] == "Announcements") ? "({$ir['new_announcements']})" : ""; $j = ($r['name'] == "Jail") ? "({$set['jail_count']})" : ""; $ho = ($r['name'] == "Hospital") ? "({$set['hospital_count']})" : ""; echo '[url="'. $r['link'] .'"]'. $r['name'] .' '. $ec .' '. $mc .' '. $a .' '. $j .' '. $ho .'[/url] '; } echo '</td> </tr>'; if($ir['gang'] > 0) { print " <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>Your Gang</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center>"; $gsql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '3' ORDER BY `order`", $c) or die(mysql_error()); while ($r = mysql_fetch_array($gsql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } echo '</td> </tr>'; } if($ir['donatordays']) { print " <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>Donator Menu</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center>"; $dsql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '2' ORDER BY `order`", $c) or die(mysql_error()); while ($r = mysql_fetch_array($dsql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } echo '</td> </tr>'; } if($ir['user_level'] > 1) { print " <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>Staff Only</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center>"; $ssql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '1' ORDER BY `order`", $c) or die(mysql_error()); while($r = mysql_fetch_array($ssql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } echo "</td> <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> </tr>"; } echo '</table>'; ?>
-
Re: MainMenu Mod! NEW! Big thanks to eagle eyd Haunted for spotting this :) On crazy's mainmenu.php we found the cause of my error for the reporting of the endpage() find $h = ($r['name'] == "Hospital") ? "({$set['hospital_count']})" : ""; echo '[url="'. $r['link'] .'"]'. $r['name'] .' '. $e .' '. $m .' '. $a .' '. $j .' '. $h .'[/url] '; Replace with $ho = ($r['name'] == "Hospital") ? "({$set['hospital_count']})" : ""; echo '[url="'. $r['link'] .'"]'. $r['name'] .' '. $e .' '. $m .' '. $a .' '. $j .' '. $ho .'[/url] '; The problem consisted because MCC already uses $h as it cause to End so on Crazy's We just alter his $h to $ho to compensate for it..
-
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]   - Cost: \${$r['hPRICE']}   - 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
-
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
-
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
-
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..
-
[MMCODES V2] Menu Creator to work with the Themecreator
Uridium replied to Uridium's topic in Free Modifications
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. -
[MMCODES V2] Menu Creator to work with the Themecreator
Uridium replied to Uridium's topic in Free Modifications
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("'", "'", 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... -
[MMCODES V2] Menu Creator to work with the Themecreator
Uridium posted a topic in Free Modifications
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 -
Re: Item Market Bug Help Please Whats the other error ?
-
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]
-
Re: [mccode v2] Humans vs. Zombies EVENT mod Nice to see someone steering away from Damn Gangster style games :)
-
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....
-
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.
-
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,
-
Re: New MainMenu Invest in a Program Called snagit 7 lets you take area screen shots and keeps them clear.
-
[MCCODES V2+V1] Easiest Editing System you will ever need...
Uridium replied to Uridium's topic in Free Modifications
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> -
[MCCODES V2+V1] Easiest Editing System you will ever need...
Uridium replied to Uridium's topic in Free Modifications
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 ""; } -
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
-
[mccode] Instant Messenger for Your Game! [$50.00]
Uridium replied to Poldar's topic in Paid Modifications
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. -
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
-
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.
-
[mccode v2] Freeze & Reactivate a Users Bank Account
Uridium replied to Uridium's topic in Free Modifications
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; } -
[mccode v2] Enhanced Hall of fame COMPLETED!
Uridium replied to Haunted Dawg's topic in Free Modifications
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