Jump to content
MakeWebGames

Silver

Members
  • Posts

    262
  • Joined

  • Last visited

Everything posted by Silver

  1. Re: [mccode] Mods 4 Sale bbcode is for text decoration, not for security
  2. Re: [Free v1] Advanced Warning System you have to view the page through someones profile? did u do that?
  3. Re: [Free v1] Advanced Warning System no kraig u dont need that, just run that main part of the query through the SQL area in ur database
  4. Re: [mccode] Mods 4 Sale yea, but the colors have to be hash colors, eg #FFFFFF = white #000000 = black etc
  5. Re: [Free v1] Advanced Warning System   Does it have to have the: but there? just wondering :) please dont call me a n00b What do you mean mate?
  6. Re: [Free v1] Close page system lol...wen people ask me for v2 conversions thats wen it gets hard, i have to look at v2 code before i can help lol...then just guess from there, thanks for the rep :)
  7. Re: [Free v1] Close page system   function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; $page=$_SERVER['REQUEST_URI']; $close=$db->query("SELECT * FROM closedpages WHERE url='$page'",$c) or die(mysql_error()); while($r=$db->fetch_array($close)) { if($db->num_rows($close) > 0 && $r['for'] == 'Public' && $ir['user_level'] == '1') { die("This page has been closed for the Public. The reason for this is: {$r['reason']}."); } else if($db->num_rows($close) > 0 && $r['for'] == 'Staff' && $ir['user_level'] > 1 && $ir['user_level'] != 2) { die("This page has been closed for Staff. The reason for this is: {$r['reason']}."); } else if($db->num_rows($close) > 0 && $r['for'] == 'All' && $r['user_level'] != 2) { die("This page has been closed for everyone. The reason for this is: {$r['reason']}."); } print " "; } }   thats wat it shud look like....
  8. Re: mysql problem Judging by other posts i think you have MCcode version 2 and are getting an error saying about a function for item_remove in global_func.php, am i correct?
  9. Re: [Free v1] Close page system yea you need to put ' around page. like: url='$page'
  10. Re: [Free v1] Close page system $close=mysql_query("SELECT * FROM closedpages WHERE url=$page",$c); change that to $close=mysql_query("SELECT * FROM closedpages WHERE url=$page",$c) or die(mysql_error()); then post back to me the error you get, i think its cos u need '' around $page like '$page'
  11. Re: [Free v1] Close page system bling, whats your game mate? ill come have a look for you :-) and can u pm me or add me to msn so its easier to talk?
  12. Re: mysql problem   Last time i checked there wasnt a table called item_remove. Which table do you mean?
  13. Re: [Free v1] Advanced Warning System Thankyou, if you have any problems or bugs drop me a pm 8-)
  14. Re: [Free v1] Close page system Well, i dont know v2 that well so im not really sure. You will hav to ask a v2 coder. Sorry :-(
  15. Re: Number format hmmm, perhaps because the </a> is missing off the end to close the link?
  16. Re: [mccode] Mods 4 Sale lol, thanks Decepti0n :lol: ok elessar, drop me a pm or an email and i will get back to you :-)
  17. Re: [Free v1] Close page system yea :P but this is for nooooobs, and it saves you going into the code files :)
  18. Re: [mccode] Mods 4 Sale lmao :-D
  19. Re: [Free v1 & v2] Advanced Gang Logs i know its in the v2 staff panel, but from what i can see it looks crap lol this one looks a bit better ;)
  20. Close Page System Allows the owner to close any page in the game, and set a reason for the page being closed. Good to use for: Pages under construction Pages with bugs Pages off limits Go into admin.php (or the file for the owner panel). Find: case 'userlevelform': userlevelform(); break; case 'massmailer': massmailer(); break;   Underneath add: case 'closepage': closepage(); break; case 'closepagedone': closepagedone(); break; case 'openpage': closepage(); break; case 'openpagedone': closepagedone(); break;   Find: Misc [[url='admin.php?action=editnews']Edit Announcements[/url]] [[url='admin.php?action=massmailer']Mass mailer[/url]]   Underneath add: [Close Pages] [Open Pages]   Find: function adnewspaper_form() { global $ir,$c,$h,$userid; print "Editing Admin Pad "; include "admin.news"; print " "; } function adnewspaper_submit() { global $ir,$c,$h,$userid; $l=fopen("admin.news","w"); fwrite($l,stripslashes($_POST['newspaper'])); fclose($l); print "Admin Pad updated!"; }   Underneath add: function closepage() { global $ir,$c,$h,$userid; print "Close Page Function Page URL: (Example: /usersonline.php) (Example: /index.php) Reason for closure: Close for: Public Staff Everyone (Except owner) "; } function closepagedone() { global $ir,$c,$h,$userid; mysql_query("INSERT INTO closedpages VALUES ('','{$_POST['url']}','{$_POST['reason']}','{$_POST['for']}')",$c); print "Page has been closed! [b]Reason:[/b] {$_POST['reason']} [b]Closed for:[/b] {$r{'for']}"; } function openpage() { global $ir,$c,$h,$userid; print "Opening Page Function "; $t=mysql_query("SELECT * FROM closedpages ORDER BY url ASC",$c); print "Page URL: "; while($a = mysql_fetch_array($t)){ print "{$a['url']}"; } print " "; } function openpagedone() { global $ir,$c,$h,$userid; mysql_query("DELETE FROM closedpages WHERE id={$_POST['id']}",$c); print "Page opened!"; }   Open header.php Find: function menuarea() { include "mainmenu.php"; global $ir,$c; print " ";   Underneath add: $page=$_SERVER['REQUEST_URI']; $close=mysql_query("SELECT * FROM closedpages WHERE url=$page",$c); while($r=mysql_fetch_array($close)) { if(mysql_num_rows($close) > 0 && $r['for'] == Public && $ir['user_level'] == 1) { die("This page has been closed for the Public. The reason for this is: {$r['reason']}."); } else if(mysql_num_rows($close) > 0 && $r['for'] == Staff && $ir['user_level'] > 1 && $ir['user_level'] != 2) { die("This page has been closed for Staff. The reason for this is: {$r['reason']}."); } else if(mysql_num_rows($close) > 0 && $r['for'] == All && $r['user_level'] != 2) { die("This page has been closed for everyone. The reason for this is: {$r['reason']}."); } print " "; }   Insert this SQL into your database: -- -- Table structure for table `closedpages` -- CREATE TABLE `closedpages` ( `id` int(11) NOT NULL auto_increment, `url` varchar(255) NOT NULL, `reason` text NOT NULL, `for` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; -- -- Dumping data for table `closedpages` --   If you need help with this contact me on msn: [email protected]. If there are any bugs pm me! Enjoy!
  21. My second free mod! Advanced Warning System Allows staff to give a user a warning with a reason. It also allows edit warnings and remove warnings (owner only; so other staff cant piss around). Once the user has 6 warnings the system will automatically place them in the Federal Jail. Create File: warnings.php Insert: <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if($ir['user_level'] < 2) { die("Staff Only!"); } switch($_GET['action']) { case 'add': addwarning(); break; case 'addsub': addwarning2(); break; case 'del': deletewarning(); break; case 'edit': editwarning(); break; case 'edit2': editwarning2(); break; default: index(); break; } function index() { global $ir,$c,$userid; print "Viewing Warnings For ID: {$_GET['user']} "; $q=mysql_query("SELECT w.*,u.* FROM warnings w LEFT JOIN users u ON w.warner=u.userid WHERE w.user={$_GET['user']} ORDER BY w.time DESC",$c); print "Total Warnings: ".mysql_num_rows($q)." [Add Warning] Warned By:ReasonDateLinks{$r['username']}{$r['warnedfor']}$warned"; if($ir['userid'] == 1) { print "[Remove] "; } if($ir['warner'] == $userid || $userid == 1) { print "[Edit]"; } print "Back to users profile"; } function deletewarning() { global $ir,$c,$userid; if($ir['userid'] != 1) { die("Owner Only");} mysql_query("DELETE FROM warnings WHERE id={$_GET['ID']}",$c); print "Warning Deleted"; } function editwarning() { global $ir,$c,$userid; $target=$_GET['ID']; $edit=mysql_query("SELECT * FROM warnings WHERE id='$target'",$c); while($r=mysql_fetch_array($edit)) { if($r['warner'] != $userid || $userid != 1) { die("You never set this warning, therefore cannot edit it"); } print "Edit Warning {$r['warnedfor']} "; } } function editwarning2() { global $ir,$c,$userid; mysql_query("UPDATE warnings SET warnedfor={$_POST['reason']} WHERE id={$_POST['id']}",$c); print "Warning Updated. [*]Home"; } ?>   SQL: Run this query on the sql tab in phpmyadmin -- -- Table structure for table `warnings` -- CREATE TABLE `warnings` ( `id` int(11) NOT NULL auto_increment, `user` int(11) NOT NULL default '0', `warnedfor` text NOT NULL, `warner` int(11) NOT NULL default '0', `time` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=latin1; -- -- Dumping data for table `warnings` --   Go into viewuser.php Find: [b]Days Old:[/b] {$r['daysold']} Days Old   Replace With: [b]Days Old:[/b] {$r['daysold']} Days Old "; $w=mysql_query("SELECT * FROM warnings WHERE user={$r['userid']}",$c); print " Warnings: ".mysql_num_rows($w)." "; if($ir['user_level'] > 1) { print "|| [Manage]"; } print "   Any problems contact me on msn: [email protected] Enjoy!
  22. Re: Free Admin Mod yup :-) lol, thanks
  23. Ok, here's my very first free mod give away, cos i dont really tend to give away stuff lol noob mods yay :lol: Advanced Gang Logs Basically this gives an advanced log of a gangs events, wars and summary details. Create page: ganglogs.php Insert: <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if($ir['user_level'] != 2 && $ir['user_level'] != 3 && $ir['user_level'] != 5) { die("Staff only!"); } switch($_GET['action']) { case 'ganglog': ganglog_view(); break; default: ganglog_index(); break; } function ganglog_index() { global $ir,$c,$userid; print "Gang Logs You can view a complete record of this gang. "; $q = mysql_query("SELECT * FROM `gangs` ORDER BY `gangNAME` ASC"); print "Gang: "; while($a = mysql_fetch_array($q)){ print "{$a['gangNAME']}"; } print " "; } function ganglog_view() { global $ir,$c,$userid; $q=mysql_query("SELECT * FROM gangs WHERE gangID='{$_POST['gangID']}'",$c); while($r=mysql_fetch_array($q)) { print "</pre> <table width="100%">Gang Record [b]Gang Name: [/b]{$r['gangNAME']} [b]Gang Tag:[/b] {$r['gangPREF']} [b]Gang Leader: [/b]{$r['gangPRESIDENT']} [b]Gang Co-Leader: [/b]{$r['gangVICEPRES']} [b]Gang Money: [/b]\${$r['gangMONEY']} [b]Gang Crystals: [/b]{$r['gangCRYSTALS']} [b]Gang Respect: [/b]{$r['gangRESPECT']} [b]Gang Capacity: [/b]{$r['gangCAPACITY']} [b]Gang Crime:[/b] {$r['gangCRIME']} [b]Gang Crime Hours: [/b]{$r['gangCHOURS']} </table>";<br>}<br>print "<table width="100%">[b]Gang Wars[/b][url='gangs.php?action=view&ID={$r[']{$r['declarer']}[/url] [{$r['drespect']} respect] vs. [url='gangs.php?action=view&ID={$r[']{$r['defender']}[/url] [{$r['frespect']} respect] </table>";<br>$e=mysql_query("SELECT * FROM gangevents WHERE gevGANG={$_POST['gangID']} ORDER BY gevTIME DESC LIMIT 1000",$c);<br>print "<table width="100%">".date('F j Y, g:i:s a',$r['gevTIME'])." {$r['gevTEXT']}</table>";<br>}<br>?&g   Erm, thats basically it apart from creating a link for your staff members: [Advanced Gang Logs] OR you can add a function into your staff panel pages but this way is easier cos it only requires one page editting. :-)
  24. Re: [mccode] Mods 4 Sale TOTALLY mine, i dont resell other peoples mods :) all my work is my own
  25. Re: [mccode] Mods 4 Sale I also got a 5 card poker and scratch card game in the works, these arent completed yet. If you think you would be interested in buyin contact me on msn or email me. The poker game comes with a 52 pack of card images and you can win various prizes for matching suits.
×
×
  • Create New...