-
Posts
1,660 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Jordan Palmer
-
Hi All. A slight update has been made =] <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : 'index'; switch($_GET['action']) { case 'banned': fedded(); break; case 'forum': forum_banned(); break; case 'mails': mail_banned(); break; default: index(); break; } if (!in_array($_GET['action'], array('banned','forum','mails','index'))) { echo "[b]Invalid Action.[/b]"; $h->endpage(); exit; } if(!function_exists('formatter')) { function formatter($str) { return is_numeric($str) ? number_format($str) : htmlentities(stripslashes($str)); } } function index() { print "<h3>Jail Management</h3> "; global $db; $feddedusers = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (fedjail = 1)")); $mailbanned = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (mailban > 0)")); $forumbanned = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (forumban > 0)")); echo "<table class='table' width='50%'>"; echo "<tr>"; echo "<th>[url='?action=banned']Federal Jail[/url]</th>"; echo "<td style='text-align:center;'>".$feddedusers."</a></td>"; echo "</tr>"; echo "<tr>"; echo "<th>[url='?action=mails']Mail Banned[/url]</th>"; echo "<td style='text-align:center;'>".$mailbanned."</td>"; echo "</tr>"; echo "<tr>"; echo "<th>[url='?action=forum']Forum Banned[/url]</th>"; echo "<td style='text-align:center;'>".$forumbanned."</td>"; echo "</tr>"; echo "</table>"; } function fedded() { global $db,$r,$h; echo ' <h3 style="text-align: left; text-decoration: underline;">Ferderal Jail</h3> <table border="1" width="100%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> <th>Jailer</th> </tr> '; $Find = $db->query("SELECT f.fed_userid, f.fed_days, f.fed_reason, u.username, " . "uu.userid AS fed_jailer_id, uu.username AS fed_jailer " . "FROM fedjail f " . "LEFT JOIN users u ON f.fed_userid=u.userid " . "LEFT JOIN users uu ON f.fed_jailedby = uu.userid " . "WHERE f.fed_days > 0 ORDER BY f.fed_days ASC"); while($r = $db->fetch_row($Find)) { echo ' <tr style="text-align:center;"> <td>[url="viewuser.php?u='.$r['fed_userid'].'"]'.formatter($r['username']).'[/url]</td> <td>'.formatter($r['fed_days']).' Days</td> <td>'.formatter($r['fed_reason']).'</td> <td>[url="viewuser.php?u='.$r['fed_jailer_id'].'"][b]'.formatter($r['fed_jailer']).'[/b][/url] ['.$r['fed_jailer_id'].']</td> </tr> '; } echo '</table>'; } function mail_banned() { global $db,$r,$h; print '<h3 style="text-align: left; text-decoration: underline;">MailBanned Users</h3> <table border="1" width="100%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> </tr> '; $q=$db->query("SELECT `userid`,`username`,`mailban`,`mb_reason` FROM `users` WHERE `mailban` > 0 ORDER BY `mailban` DESC"); while($r=$db->fetch_row($q)) { print " <tr> <td>[url='viewuser.php?u=".$r[']".formatter($r['username'])."[/url]</td> <td>".formatter($r['mailban'])."</td> <td>".formatter($r['mb_reason'])."</td> </tr>"; } echo "</table>"; } function forum_banned() { global $db,$r,$h; print '<h3 style="text-align: left; text-decoration: underline;">Forumbanned Users</h3> <table border="1" width="100%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> </tr> '; $q=$db->query("SELECT `userid`,`username`,`forumban`,`fb_reason` FROM users WHERE `forumban` > 0 ORDER BY `forumban` DESC"); while($r=$db->fetch_row($q)) { print "<tr> <td>[url='viewuser.php?u=".$r[']".formatter($r['username'])."[/url]</td> <td>".formatter($r['forumban'])."</td> <td>".formatter($r['fb_reason'])."</td></tr>"; } echo "</table>"; } $h->endpage(); ?> Thanks too Equinox for the advice... :)
-
Sounds like a plan & Thank you 8)
-
Thankyou. And yes, I think it does everything I need it =] :D
-
I hate the most off MCCodes tables, I use these as I think they give it an extra look :P Thanks though
-
Ahh Thanks
-
What exactly did you edit? or was the minor issue? I didn't test out with people in jail but it should work fine -.-
-
Forgot I was in the GRPG section lol, Sorry I'll get it moved ASAP :)
-
Hey Guys. I've never actually seen someone release a nice Fedjail.php, I've seen some good updates but non worth really looking at for longer than 5seconds lol, Anyway here's my new version, It is.. Secure Clean Code Tested and fully working All in one big page (: Free =] As I said, I've changed quite a bit, Ranging from the "SELECT * FROM" too the actual display off it =] <?php include_once (DIRNAME(__FILE__) . '/globals.php'); /* -- New FedJail - Updated 25th april 2010 -- Product Copyright (c) Jordan Palmer 2010 -- Free for ALL Members | Mccode V2 -- Contact me @ [email][email protected][/email] ::UNTESTED:: */ $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : 'index'; switch($_GET['action']) { case 'banned': fedded(); break; case 'forum': forum_banned(); break; case 'mails': mail_banned(); break; default: index(); break; } if (!in_array($_GET['action'], array('banned','forum','mails','index'))) { echo '[b]Invalid Action.[/b]'; exit($h->endpage()); } function index() { echo 'Banned Users'; global $db; $sql = $db->query ('SELECT ', '(SELECT COUNT(userid) FROM users WHERE fedjail = 1) as fedjail_users, ', '(SELECT COUNT(userid) FROM users WHERE mailban > 0) as mailban_users, ', '(SELECT COUNT(userid) FROM users WHERE forumban > 0) as forumban_users' ); list ($feddedusers, $mailbannded, $forumbannded) = mysql_fetch_row($sql); echo '<table class = "table" width = "50%"> <tr> <th><a href = "?action=banned">Federal Jail</a></th> <td style = "text-align:center;">'.number_format($feddedusers).'</a></td> </tr> <tr> <th><a href = "?action=mails">Mail Banned</a></th> <td style = "text-align:center;">'.number_format($mailbanned).'</td> </tr> <tr> <th><a href = "?action=forum">Forum Banned</a></th> <td style = "text-align:center;">'.number_format($forumbanned).'</td> </tr> </table>'; } function fedded() { global $db,$r,$h; echo ' <h3 style="text-align: left; text-decoration: underline;">Ferderal Jail</h3> <table border="1" width="100%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> <th>Jailer</th> </tr>'; $Find = $db->query("SELECT f.fed_userid, f.fed_days, f.fed_reason, u.username, " . "uu.userid AS fed_jailer_id, uu.username AS fed_jailer " . "FROM fedjail f " . "LEFT JOIN users u ON f.fed_userid=u.userid " . "LEFT JOIN users uu ON f.fed_jailedby = uu.userid " . "WHERE f.fed_days > 0 ORDER BY f.fed_days ASC"); while($r = $db->fetch_row($Find)) { echo ' <tr style = "text-align:center;"> <td><a href = "/viewuser.php?u='.abs(intval($r['fed_userid'])).'">'.htmlentities($r['username'],ENT_QUOTES).'</a></td> <td>'.number_format($r['fed_days']).' Days</td> <td>'.stripslashes(htmlentities($r['fed_reason'],ENT_QUOTES).'</td> <td><a href = "/viewuser.php?u='.abs(intval($r['fed_jailer_id'])).'">[b]'.htmlentities($r['fed_jailer'], ENT_QUOTES).'[/b]</a> ['.number_format($r['fed_jailer_id']).']</td> </tr> '; } echo '</table>'; } function mail_banned() { global $db,$r,$h; print '<h3 style="text-align: left; text-decoration: underline;">MailBanned Users</h3> <table border="1" width="100%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> </tr> '; $q=$db->query("SELECT `userid`,`username`,`mailban`,`mb_reason` FROM `users` WHERE `mailban` > 0 ORDER BY `mailban` DESC"); while($r=$db->fetch_row($q)) { echo ' <tr> <td><a href = "/viewuser.php?u='.abs(intval($r['userid'])).'">'.htmlentities($r['username'],ENT_QUOTES).'</a></td> <td>'.number_format($r['mailban']).'</td> <td>'.stripslashes(htmlentities($r['mb_reason'],ENT_QUOTES)).'</td> </tr>' } echo '</table>'; } function forum_banned() { global $db,$r,$h; echo '<h3 style = "text-align: left; text-decoration: underline;">Forumbanned Users</h3> <table border = "1" width = "100%" class = "table" cellspacing = "0" cellpadding = "2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> </tr> '; $q=$db->query("SELECT `userid`,`username`,`forumban`,`fb_reason` FROM users WHERE `forumban` > 0 ORDER BY `forumban` DESC"); while($r=$db->fetch_row($q)) { echo '<tr> <td><a href = "/viewuser.php?u='.abs(intval($r['userid'])).'">'.htmlentities($r['username'], ENT_QUOTES).'</a></td> <td>'.number_format($r['forumban']).'</td> <td>'.stripslashes(htmlentities($r['fb_reason'], ENT_QUOTES)).'</td></tr>'; } echo '</table>'; } $h->endpage(); ?> There is no need for screen shots, As replacing the file will show you what it can do =] Please leave bugs/suggestions/comments & Please vote in the Poll I've added =]
-
LOL Well I suppose he can the both of us =D :thumbsup:
-
V2 Is a good choice. If you need help post or PM/IM me =]
-
Dabs wouldn't nor he couldn't do that, Unless they make you type the domain and I don't see that anywhere =]
-
Firstly it's MCCodes Secondly - No one pays for it, Well not many anyway =] & I doubt it's your concern, If you go to http://www.mccodes.com/ you could ask one of them to validate it for you, However I doubt they would
-
Firstly, Its MCcodes Secondly which version?
-
I use BlueIMP & I don't need to be integrated. I think it's pretty good without it =]
-
I'm aware off that now. @OP; You don't need one. Edit the current one =]
-
This is pretty good. I think a little tamper to the CSS and It'd be perfect :P
-
It's actually hard too know unless you have access to the code
-
Sound good. You picked an engine to use yet?
-
I love this, I beta'd this and was very happy with the coding and features even though it's a replacement it's really good :)
-
What do you mean as ''Nullled'' ? Do you mean the actual game? or the game layout 8|
-
Agreed. I doubt a millisecond is gunna change anything
-
Magictallguy's is ''slower'' not much but yes, And that's also easy to convert if you have 5seconds to spare -_- But as I said, Good work
-
Request Name Change, Staff Moderated--Mod
Jordan Palmer replied to Joshua's topic in Free Modifications
Meh... *bites tongue* Good work -
I use BlueIMP - It's good for me :P
-
I love how you deny things thats true xD