Jump to content
MakeWebGames

Halo

Members
  • Posts

    395
  • Joined

  • Last visited

    Never

Everything posted by Halo

  1. Halo

    No I'S

    Re: No I'S on my summer holidays, me and my mates went to japan
  2. Re: 3 Word Game reach the cupboard...
  3. Re: [v2]Attack Ban[v2] No Problem...
  4. I HATE attack abusers, so i thought if you can Ban mail abusers why not attack abusers... How To Install: SQL QUERY -- -------------------------------------------------------- -- -- Table structure for table `attackban` -- CREATE TABLE `attackban` ( `ab_id` int(11) NOT NULL auto_increment, `ab_userid` int(11) NOT NULL default '0', `ab_days` int(11) NOT NULL default '0', `ab_reason` text NOT NULL, PRIMARY KEY (`ab_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -- Dumping data for table `attackban` -- ALTER TABLE `users` ADD `attackban` INT(11) NOT NULL DEFAULT '0'; Then open staff_punit.php Find: case 'ipsub': ip_search_submit(); break; case 'massjailip': mass_jail(); break; add below: case 'attackform': attackban_user_form(); break; case 'attacksub': attackban_user_submit(); break; case 'unattackform': unab_user_form(); break; case 'unattacksub': unab_user_submit(); break; then find: $h->endpage(); ?> add above: function attackban_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Attack Banning User</h3> The user will not be able to attack anyone in the game. <form action='staff_punit.php?action=attacksub' method='post'> User: ".user_dropdown($c,'user',$_GET['XID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Attack Ban User' /></form>"; } function attackban_user_submit() { global $db,$ir,$c,$h,$userid; $re=$db->query("UPDATE users SET attackban=1 WHERE userid={$_POST['user']}"); if($db->affected_rows()) { $db->query("INSERT INTO attackban VALUES('',{$_POST['user']},{$_POST['days']},'". $_POST['reason']."')"); } print "User Attack Banned."; stafflog_add("Attack Banned ID {$_POST['user']} for {$_POST['days']}"); } function unab_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Un-Attack Banning User</h3> The user will be able to attack again. <form action='staff_punit.php?action=unattacksub' method='post'> User: ".ab_user_dropdown($c,'user')." <input type='submit' value='Un-Attack Ban User' /></form>"; } function unab_user_submit() { global $db,$ir,$c,$h,$userid; $db->query("UPDATE users SET attackban=0 WHERE userid={$_POST['user']}"); $db->query("DELETE FROM attackban WHERE ab_userid={$_POST['user']}"); print "User un-attackbanned."; stafflog_add("Un-attack baned user ID {$_POST['user']}"); } Save that and open global_func.php: Find: function fed_user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE fedjail=1 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } add below: function ab_user_dropdown($connection,$ddname="attackban",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE attackban=1 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } Save that and open attack.php and find: <?php $menuhide=1; $atkpage=1; include "globals.php" add below: if($ir['attackban']) { $q=$db->query("SELECT * FROM attackban WHERE ab_userid=$userid"); $r=$db->fetch_row($q); print"[b]<font color=red size=+1>You have been attack banned for {$r['ab_days']} days. Reason: {$r['ab_reason']}</font>[/b] [url='index.php']> Back[/url] "; $h->endpage(); exit; } Save that and open smenu.php find: > [url='staff_punit.php?action=unfedform']Unjail User[/url] add below: > [url='staff_punit.php?action=attackform']Attack Ban User[/url] > [url='staff_punit.php?action=unattackform']Un-Attack Ban User[/url] Finally open cron_day.php and find: $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); } $db->query("DELETE FROM fedjail WHERE fed_days=0"); add below: $db->query("UPDATE attackban set ab_days=ab_days-1"); $q=$db->query("SELECT * FROM attackban WHERE ab_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['ab_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET attackban=0 WHERE userid IN(".implode(",", $ids).")"); } $db->query("DELETE FROM attackban WHERE ab_days=0"); Screenshot: And your done, any bugs or questions post back here!
  5. Re: Staff V2 Why don't you just set someones user_level to something and then go on viewuser.php and edit that so when they click on the profile it displays there level, same for userlist and maybe make some more panels for them...
  6. Re: wats correct lol, i think its just when you are in phpMyAdmin you don't need to but when you are importing files it helps if you do
  7. Re: Forums Function On staff Panel V2 Codes Have you got the link as:   > <a href='staff_forums.php?action=delcity>Delete Forum</a>   Many people get it wrong when changing the mainmenu, the cases are odd lol...
  8. Halo

    MAILS

    Re: MAILS Just do the sensible option and re-upload your mailbox.php file
  9. Re: profile sig   Oh and this so called "fix" wrong the original one was right, if you put {$ir['display_pic']} insted of {$r['display_pic']} it will show your display image not theirs...
  10. Re: profile sig If its your sig thats not working run this querie: ALTER TABLE `users` ADD `sig` TEXT NOT NULL;
  11. Re: Attacking What version of mccodes?...
  12. Re: FREE SERVER THAT WORKS WITH MCCODES Yeah, off course but these guys are talking about the free package, never get a free package you can;t rely on them
  13. Re: Count Backwards :D 4971
  14. Re: Counting (nr game) 1850
  15. Re: 3 Word Game wanted to eat...
  16. Re: [v2]***UPDATED*** Staff Action: Full User Details[v2] Lol, No Problem :-D
  17. Re: 50/50 {crystal} V2 Isn't this Iso's mod, just with crystals?
  18. Re: 3 Word Game for looking at
  19. Re: Counting (nr game) *No One Seems To Be Posting So I Just Will lol, keep this post alive* 1848
  20. Re: [v2]Reset Specific User[v2] True but still its only on thing to add, a few word to type and your done
  21. Re: Gym Record He's Right
  22. Re: [v2]Reset Specific User[v2] No Problem
  23. Re: [MCcode V1.1] New Search/Locate Great Mod, Nice One
  24. Re: Counting (nr game) 1847
  25. Re: Counting (nr game) 1846
×
×
  • Create New...