Jump to content
MakeWebGames

Joshua

Members
  • Posts

    1,271
  • Joined

  • Last visited

Everything posted by Joshua

  1. I "beleive" I'm going to Employee Taxxed, seems like the best bang for my buck :-)
  2. The fee the banker takes is in bank.php :P
  3. it's in cron_day.php I beleive :-)
  4. I'm aware this post was made "pre" but i'm not looking for "cheap" either ;-)
  5. You may have just saved me a ton of work as i was adding something similar like this to a plug-in for my turf/pimp mod :-)
  6. Looking for Exceptionally High Quality lay-out designers No offense to some of our guys who do decent work, but i'm looking for prsionstruggle.com immortalnight.com prisonbreak.com rapslife.com Quality Hit me up if you feel you can do such a thing with pricing info, demos.
  7. Wb bro.
  8. Right, just clarifying.
  9. At the risk of sounding stupid list ($feddedusers, $mailbannded, $forumbannded) = mysql_fetch_row($sql); fetch_row or fetch_array?
  10. Yer I knew that much but I was curious why it wasnt carrying over into the functions themselves >,<   again i just kinda glanced at it, :P
  11. I'll give it a run on Mcaddons someone posted the function formatter isnt defining as well would you need to add $str to the global for each function or perhaps add the formatter function to global_func to make it easier? j/c as i'm not 100%
  12. That preg replace thing I've noticed if you start off with a few letters i.e jsdaha'/.akjafsd it sometimes slips through tho :\
  13. All DIE specialchars! lol ^_^
  14. I prefer entities of specialchars nywho >,,
  15. What did ya do?
  16. **thumbs up** See you used mtgs format bit, good call :D
  17. MTG has done this :-)   Once i figure my way around the "new" gang panel by Floydian I will be doing several freebies for it :)   Working on it :D
  18. users preferance, again I only posted mine because I was so far into it when mtg posted his and didnt want to stop ^_^
  19. If that's referring to the bit of work I did on it, thanks. If that's referring to the mod itself, yea.
  20. Use mine, posted in free mods, it's tested and works :p I'll look at ^ code in a bit and see what happenz
  21. Look at it yourself and tell me, I think it is :-)
  22. LOL   Mines still faster neener ^_^   I couldnt just stop making the one i was doing lol :P
  23. Why i already coded one myself :P I was about halfway through the last file staff file when you posted yours so i just finished mine and posted it lol :P
  24. I coded it MTG's is a bit slower, and mine would be easier to convert for V1 users :) so why not :P
  25. Ok, so TCmaker requested this, then while I was making it MTG made one BUT, i was already into it so im posting mine anywayz :)   SQLS CREATE TABLE IF NOT EXISTS `namechange` ( `ID` int(11) NOT NULL auto_increment, `oldname` varchar(255) NOT NULL, `newname` varchar(255) NOT NULL, `userid` int(11) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;   staff_namerequest.php   <?php require_once("sglobals.php"); $staffornot = mysql_query("SELECT `user_level` FROM `users` WHERE `userid`=".$_SESSION['userid']."", $c); $staff = mysql_fetch_array($staffornot); if($staff['user_level'] < 2) { echo "Only staff can manage this function! [url='index.php'][b]Back[/b][/url]"; $h->endpage(); exit; } $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false; $_GET['ID'] = isset($_GET['ID']) && is_numeric($_GET['ID']) ? abs(@intval($_GET['ID'])) : false; switch($_GET['action']) { case "namelist":namelist();break; case "accept":accept();break; case "deny":deny();break; default:namelist();break; } function namelist() { global $c; //We list the requests. $request = mysql_query("SELECT `ID`,`oldname`,`newname`,`userid` FROM `namechange` ORDER BY `userid` ASC", $c); if(!mysql_num_rows($request)) { echo "There are no requests at this time"; exit; } else { echo "<table width=90% class=table><tr><th>Old Name</th><th>Requested Name</th><th>User ID</th><th>Accept/Deny</tr>"; while($ss = mysql_fetch_array($request)) { echo "<tr><td>".stripslashes(htmlentities($ss['oldname']))."</td> <td>".stripslashes(htmlentities($ss['newname']))."</td> <td>".$ss['userid']."</td> <td>[url='staff_namerequest.php?action=accept&ID=".$ss[']<font color=red>Accept</font>[/url]/[url='staff_namerequest.php?action=deny&ID=".$ss[']<font color=green>Deny</font>[/url]</td></tr>"; } echo "</table>"; } } function accept() { global $h,$c; if(!$_GET['ID']) { echo "You did not select an ID. [url='index.php'][b]Back[/b][/url]"; $h->endpage(); exit; } $change = mysql_query("SELECT `ID`,`oldname`,`newname`,`userid` FROM `namechange` WHERE `ID`={$_GET['ID']}", $c); if(!mysql_num_rows($change)) { echo "The selected request does not exist!"; $h->endpage(); exit; } $cc = mysql_fetch_array($change); mysql_query("UPDATE `users` SET `username`='".$cc['newname']."' WHERE `userid`=".$cc['userid']."", $c); event_add($cc['userid'], "The requested Name change you sent in has been accepted!", $c); stafflog_add("Changed ".stripslashes($cc['oldname'])." to ".stripslashes($cc['newname'])."", $c); mysql_query("DELETE FROM `namechange` WHERE `ID`=".$_GET['ID'].""); echo "Users name has been changed successfully!"; } function deny() { global $h,$c,$ir; if(!$_GET['ID']) { echo "The ID selected does not exist"; $h->endpage(); exit; } $change = mysql_query("SELECT `oldname`,`newname`,`userid` FROM `namechange` WHERE `ID`=".$_GET['ID']."", $c); if(!mysql_num_rows($change)) { echo "The selected request does not exist!"; $h->endpage(); exit; } $cc = mysql_fetch_array($change); event_add($cc['userid'], "The Name change you requested was denied by ".$ir['username'].". Please consult them for any questions.", $c); stafflog_add("Denied Name change from [b]".$cc['oldname']."[/b].", $c); mysql_query("DELETE FROM `namechange` WHERE `ID`=".$_GET['ID'].""); echo "Users name change has been denied! An event has been sent to them"; $h->endpage(); exit; } ?>   In preferances. Overwrite both of your name change functions with   function namechange() { global $c,$db,$ir; if (isset($_POST['NewName'])) { $CheckLog = mysql_num_rows(mysql_query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `login_name`='%s' AND `userid`!='%d'", $_POST['NewName'], $_SESSION['userid'], $c))); $CheckGame = mysql_num_rows(mysql_query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `username`='%s' AND `userid`!='%d'", $_POST['NewName'], $_SESSION['userid'], $c))); if (trim($_POST['NewName']) == '') { echo 'Error! You Did Not Enter A New Name '; } else if ($CheckLog) { echo 'Error! This Name Is In Use '; } else if ($CheckGame) { echo 'Error! This Name Is In Use '; } else if (strlen($_POST['NewName']) < '4') { echo 'Error! This Name Is Too Short'; } else if (strlen($_POST['NewName']) > '15') { echo 'Error! This Name Is Too Long'; } else { $_POST['NewName'] = mysql_real_escape_string(strip_tags($_POST['NewName'])); $db->query("INSERT INTO `namechange` VALUES('','".$ir['username']."','".$_POST['NewName']."',".$ir['userid'].")"); echo 'You Have Sent your name change request!'; } } else { echo '<h3>Name Change</h3> Please note that you still use the same name to login, this procedure simply changes the name that is displayed. Name changes will not be immediate. You must wait for the staff to Review and accept/Deny. If denied you will be informed as to why. <form act="preferences.php?act=namechange" method="post"> New Name: <input type="text" name="NewName" /> <input type="submit" value="Change Name" /> </form>'; } }   Remove your old cases involving name change from your switch up top add this one   case 'namechange':namechange();break;     Yes I use mysql_query Its faster. Yes MTG has just done one as well lol. But i was halfway through easy be darned if i stop and scrap it :P   Enjoy for any who use >,<
×
×
  • Create New...