Jump to content
MakeWebGames

Brad

Members
  • Posts

    173
  • Joined

  • Last visited

Everything posted by Brad

  1. Thanks
  2. thanks
  3. which one the one i made or ur one
  4. can anyone c if it works now cause i think i fixed it
  5. ok thanks
  6. what do you mean xD
  7. thanks mate i wont add on this as it has a bug in but i think i just fixed the bug
  8. wait i c whats wrong
  9. it should work i dont know why ?
  10. ok this is a little mod ask a ghost   V1 call it askghost.php <?php //This mod is for v1 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(); $question=($_POST['question']); $ask=" <form action=askghost.php method=POST>Question: <input type=text name=question> <input type=submit value=Ask></form>"; print "<h3>I know you</h3> Welcome to the the ghost home. Here you can type in a question about anything and the ghost will reveal the answer to you. "; if ($question=="") { print $ask; $h->endpage(); exit; } else { if ($question=="$question") { switch(mt_rand(1,50)) { case 1; echo'No'; break; case 2; echo'Yes'; break; case 3; echo'I cant answer that'; break; case 4; echo'Very unlikely'; break; case 5; echo'That is not correct'; break; case 6; echo'The stars say no'; break; case 7; echo'Definitely not'; break; case 8; echo'That is correct'; break; case 9; echo'Why say that'; break; case 10; echo'I do not understand'; break; case 11; echo'Of course'; break; case 12; echo'Is that so?'; break; case 13; echo'Right....'; break; case 14; echo'That is 100% true'; break; case 15; echo'Dont ask me that'; break; case 16; echo'Wouldnt you like to know'; break; case 17; echo'The stars seem to be saying thats true'; break; case 18; echo'No way!'; break; case 19; echo'That depends really'; break; case 20; echo'Never'; break; case 21; echo'I will not answer that'; break; case 22; echo'Im not harsh'; break; case 23; echo'That is not up to me to decide'; break; case 24; echo'Get a life'; break; case 25; echo'Why ask'; break; case 26; echo'Say Yes'; break; case 27; echo'Say No'; break; case 28; echo'What!'; break; case 29; echo'You did what'; break; case 30; echo'Your asking to many questions'; break; case 31; echo'You keep asking yourseld that'; break; case 32; echo'That is not up to me to decide'; break; case 33; echo'Are you sure'; break; case 34; echo'Go home'; break; case 35; echo'I dont like you'; break; case 36; echo'You kidding. Right?'; break; case 37; echo'I refuse to answer'; break; case 38; echo'Yup'; break; case 39; echo'No way at all!'; break; case 40; echo'I dont want to answer you that question!'; break; case 41; echo'To Right'; break; case 42; echo'Up to you'; break; case 43; echo'100% NOT True'; break; case 44; echo'You like bacon'; break; case 45; echo'Lol you crack me up'; break; case 46; echo'What you looking at'; break; case 47; echo'What the hell'; break; case 48; echo'What did you just say'; break; case 49; echo'I dont know'; break; case 50; echo'Im not a robot'; break; } } print "<hr />[b]$question[/b] "; print " "; print " [b]"; print "<table width=174 height=156 border=0 cellpadding=0 cellspacing=0> <tr><td background='bga.png'><center>$case</td></tr></table> ";//Background Pic print "$ask"; $h->endpage(); exit; } $h->endpage(); ?>     v2 call askghost.php <?php //This mod is for v2 include "globals.php"; $question=($_POST['question']); $ask=" <form action=askghost.php method=POST>Question: <input type=text name=question> <input type=submit value=Ask></form>"; print "<h3>I know you</h3> Welcome to the the ghost home. Here you can type in a question about anything and the ghost will reveal the answer to you. "; if ($question=="") { print $ask; $h->endpage(); exit; } else { if ($question=="$question") { switch(mt_rand(1,50)) { case 1; echo'No'; break; case 2; echo'Yes'; break; case 3; echo'I cant answer that'; break; case 4; echo'Very unlikely'; break; case 5; echo'That is not correct'; break; case 6; echo'The stars say no'; break; case 7; echo'Definitely not'; break; case 8; echo'That is correct'; break; case 9; echo'Why say that'; break; case 10; echo'I do not understand'; break; case 11; echo'Of course'; break; case 12; echo'Is that so?'; break; case 13; echo'Right....'; break; case 14; echo'That is 100% true'; break; case 15; echo'Dont ask me that'; break; case 16; echo'Wouldnt you like to know'; break; case 17; echo'The stars seem to be saying thats true'; break; case 18; echo'No way!'; break; case 19; echo'That depends really'; break; case 20; echo'Never'; break; case 21; echo'I will not answer that'; break; case 22; echo'Im not harsh'; break; case 23; echo'That is not up to me to decide'; break; case 24; echo'Get a life'; break; case 25; echo'Why ask'; break; case 26; echo'Say Yes'; break; case 27; echo'Say No'; break; case 28; echo'What!'; break; case 29; echo'You did what'; break; case 30; echo'Your asking to many questions'; break; case 31; echo'You keep asking yourseld that'; break; case 32; echo'That is not up to me to decide'; break; case 33; echo'Are you sure'; break; case 34; echo'Go home'; break; case 35; echo'I dont like you'; break; case 36; echo'You kidding. Right?'; break; case 37; echo'I refuse to answer'; break; case 38; echo'Yup'; break; case 39; echo'No way at all!'; break; case 40; echo'I dont want to answer you that question!'; break; case 41; echo'To Right'; break; case 42; echo'Up to you'; break; case 43; echo'100% NOT True'; break; case 44; echo'You like bacon'; break; case 45; echo'Lol you crack me up'; break; case 46; echo'What you looking at'; break; case 47; echo'What the hell'; break; case 48; echo'What did you just say'; break; case 49; echo'I dont know'; break; case 50; echo'Im not a robot'; break; } } print "<hr />[b]$question[/b] "; print " "; print " [b]"; print "<table width=174 height=156 border=0 cellpadding=0 cellspacing=0> <tr><td background='bga.png'><center>$case</td></tr></table> ";//Background Pic print "$ask"; $h->endpage(); exit; } $h->endpage(); ?>     Untested any bugs post
  11. I like it but not secure kyle good for your first mod +1
  12. Brad

    Admin

    help
  13. help
  14. lol
  15. no i just tested it the coverted one dont work can someone fix
  16. Think i coverted it untested   <?php header('X-UA-Compatible: IE=EmulateIE8'); ob_start ("ob_gzhandler"); header("Cache-Control: must-revalidate"); $count = 3; $x = -1; while($x < $count) { $security = array("ID","viewforum","viewtopic"); $x++; $_GET[$security[$x]] = abs(@intval($_GET[$security[$x]])); } class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>{$set['game_name']}</title> <meta http-equiv="content-language" content="en"/> <meta name="Distribution" content="Global"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <link rel="stylesheet" type="text/css" href="custom.css" /> </head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> <style type="text/css"> img { border: none; } </style> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = $_SERVER['REMOTE_ADDR']; $IP = mysql_real_escape_string($IP); $IP = mysql_escape($IP); mysql_query("UPDATE users SET laston=unix_timestamp(), lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die (" <body> Your account may be broken. Please mail support@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print " You lost all your EXP for running from the fight."; mysql_query("UPDATE users SET exp=0, attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $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); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = " <font color=red>{$ir['username']}</font> ";$d="[img=donator.gif]"; } $gn=""; global $staffpage; $bgcolor = '999999'; //Display Pic $display_pic = $ir['display_pic']; if(!$display_pic) { $display_pic="/images/noav.png"; } print <<<OUT <div id="hd"> <div class="hd_displaypic">[img=$display_pic]</div> <div class="hd_username"> [b]Name:[/b] [url="viewuser.php?u={$ir['userid']}"] $gn{$u} [{$ir['userid']}] $d[/url] </div></div> <ul id="menu"> [*][url="index.php"]Home[/url] [*][url="inventory.php"]Inventory[/url] [*][url="explore.php"]City[/url] [*][url="viewuser.php?u={$ir['userid']}"]Profile[/url] [*][url="bank.php"]Bank[/url] [*][url="gym.php"]Gym[/url] [*][url="bank.php"]Test[/url] [*][url="gym.php"]Test[/url] [*][url="logout.php"]Logout[/url] [/list] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top" align="left" style="padding-left:10px;"> <span class='icons1' style='padding-left:24px;'></span>[b]Money:[/b] {$fm} <span class='icons2' style='padding-left:24px;'></span>[b]Level:[/b] {$ir['level']} <span class='icons3' style='padding-left:24px;'></span>[b]Crystals:[/b] {$ir['crystals']} <hr /> <div class="stat_bars"> <div>[b]Energy:[/b]</div> <a href="#" class="Tooltip"><span>Current Energy:{$enperc}%</span> <img src=images/bar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10></a> </div> <div class="stat_bars"> <div>[b]Will:[/b]</div> [url="#"]<span>Current Will: {$wiperc}%</span><img src=images/bar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10>[/url] </div> <div class="stat_bars"> <div>[b]Brave:[/b]</div> [url="#"]<span>Current Brave: {$ir['brave']}/{$ir['maxbrave']}</span><img src=images/bar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10>[/url] </div> <div class="stat_bars"> <div>[b]EXP:[/b]</div> [url="#"]<span>Current EXP: {$experc}%</span><img src=images/bar.png width=$experc height=10><img src=redbar.png width=$exopp height=10>[/url] </div> <div class="stat_bars"> <div>[b]Health:[/b]</div> [url="#"]<span>Current Health: {$hpperc}%</span><img src=images/bar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10>[/url] </div> <hr /> OUT; if($ir['fedjail']) { $q=mysql_query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=mysql_fetch_row($q); die(" [b] <font color=red size=+1> You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die(" [b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '999999'; print ' </td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td> <td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } 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>'; } function endpage() { global $db; //Shows useronline & Total Users $q=mysql_query(" SELECT userid FROM users WHERE laston>unix_timestamp()-100*60 ORDER BY laston DESC"); $r1=mysql_num_rows($q); $q=mysql_query("SELECT userid FROM users"); $r2=mysql_num_rows($q); print <<<OUT </center> </td></tr></table> </td><td class="rgrad"></td> </tr><tr><td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"></td> <td class="dgrad" align="center">Total Users [url="userlist.php"]$r2[/url] | Users Online [url="usersonline.php"]$r1[/url] </td> <td class="dgradr"></td> </tr></table> </td></tr></table> </body> </html> OUT; } } ?>
  17. Can someone covert it so it works on lite
  18. thanks
  19. can someone cover that to mccode lite cause i wanna use that
  20. Can someone tell me how to make one or make me a owner panel sec and helper and fixed admin to help for Mcc Lite
  21. where does that go in it
  22. but what about converting logins whats the code and with a coverter u upload it works in one click that simple
  23. yeah that simple but do you have to use notepad i have dreamweaver
  24. Brad

    Admin

    Line 601 to 991   } function unfed_user_submit() { global $ir,$c,$h,$userid; mysql_query("UPDATE users SET fedjail=0 WHERE userid={$_POST['user']}",$c); mysql_query("DELETE FROM fedjail WHERE fed_userid={$_POST['user']}",$c); mysql_query("INSERT INTO unjaillogs VALUES('',$userid, {$_POST['user']}, unix_timestamp())",$c); print "User unjailed."; } function newspaper_form() { global $ir,$c,$h,$userid; $q=mysql_query("SELECT * FROM papercontent LIMIT 1",$c); $news=mysql_result($q,0,0); print "<h3>Editing Announcements</h3><form action='admin.php?action=subnews' method='post'> <textarea rows='7' cols='35' name='newspaper'>$news</textarea> <input type='submit' value='Change' /></form>"; } function newspaper_submit() { global $ir,$c,$h,$userid; $news=$_POST['newspaper']; mysql_query("UPDATE papercontent SET content='$news'",$c); print "Announcements updated!"; } function view_attack_logs() { global $ir,$c,$h,$userid; print "<h3>Attack Logs</h3> <table width=75%><tr style='background:gray'><th>Time</th><th>Detail</th></tr>"; $q=mysql_query("SELECT * FROM attacklogs ORDER BY time DESC",$c); while($r=mysql_fetch_array($q)) { print "<tr><td>".date('F j, Y, g:i:s a',$r['time'])."</td><td>{$r['attacker']} attacked {$r['attacked']} and {$r['result']} and stole \${$r['stole']}</td></tr>"; } print "</table>"; } function inv_user_begin() { global $ir,$c,$h,$userid; print "<h3>Viewing User Inventory</h3> You may browse this user's inventory. <form action='admin.php?action=invuser' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='View Inventory' /></form>"; } function inv_user_view() { global $ir,$c,$h,$userid; $inv=mysql_query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$_POST['user']}",$c); if (mysql_num_rows($inv) == 0) { print "[b]This person has no items![/b]"; } else { print "[b]Their items are listed below.[/b] <table width=100%><tr style='background-color:gray;'><th>Item</th><th>Sell Value</th><th>Total Sell Value</th><th>Links</th></tr>"; while($i=mysql_fetch_array($inv)) { print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print "x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>[[url='admin.php?action=deleinv&ID={$i[']Delete[/url]]"; print "</td></tr>"; } print "</table>"; } } function inv_delete() { global $ir,$c,$h,$userid; mysql_query("DELETE FROM inventory WHERE inv_id={$_GET['ID']}",$c); print "Item deleted from inventory."; } function credit_user_form() { global $ir,$c,$h,$userid; print "<h3>Crediting User</h3> You can give a user money. <form action='admin.php?action=creditsub' method='post'> User: ".user_dropdown($c,'user')." Money: <input type='text' name='money' /> <input type='submit' value='Credit User' /></form>"; } function credit_user_submit() { global $ir,$c,$h,$userid; $_POST['money'] = (int) $_POST['money']; mysql_query("UPDATE users u SET money=money+{$_POST['money']} WHERE u.userid={$_POST['user']}",$c); print "User credited."; } function ccredit_user_form() { global $ir,$c,$h,$userid; print "<h3>Crediting User Crystals</h3> You can give a user crystals. <form action='admin.php?action=ccreditsub' method='post'> User: ".user_dropdown($c,'user')." Crystals: <input type='text' name='crystals' /> <input type='submit' value='Credit User' /></form>"; } function ccredit_user_submit() { global $ir,$c,$h,$userid; $_POST['crystals'] = (int) $_POST['crystals']; mysql_query("UPDATE users u SET crystals=crystals+{$_POST['crystals']} WHERE u.userid={$_POST['user']}",$c); print "User credited."; } function ip_search_form() { global $ir,$c,$h,$userid; print "<h3>IP Search</h3> <form action='admin.php?action=ipsub' method='post'> IP: <input type='text' name='ip' value='...' /> <input type='submit' value='Search' /></form>"; } function ip_search_submit() { global $ir,$c,$h,$userid; print "Searching for users with the IP: [b]{$_POST['ip']}[/b] <table width=75%><tr style='background:gray'> <th>User</th> <th>Level</th> <th>Money</th> </tr>"; $q=mysql_query("SELECT * FROM users WHERE lastip='{$_POST['ip']}'",$c); $ids=array(); while($r=mysql_fetch_array($q)) { $ids[]=$r['userid']; print "\n<tr> <td> [url='viewuser.php?u={$r[']{$r['username']}[/url]</td> <td> {$r['level']}</td> <td>{$r['money']}</td> </tr>"; } print "</table> [b]Mass Jail[/b] <form action='admin.php?action=massjailip' method='post'> <input type='hidden' name='ids' value='".implode(",",$ids)."' /> Days: <input type='text' name='days' value='300' /> Reason: <input type='text' name='reason' value='Same IP users, Mail [email][email protected][/email] with your case.' /> <input type='submit' value='Mass Jail' /></form>"; } function mass_jail() { global $ir,$c,$h,$userid; $ids=explode(",",$_POST['ids']); foreach($ids as $id) { $re=mysql_query("UPDATE users SET fedjail=1 WHERE userid={$id}",$c); if(mysql_affected_rows($c)) { mysql_query("INSERT INTO fedjail VALUES('',{$id},{$_POST['days']},$userid,'". mysql_real_escape_string($_POST['reason'],$c)."')",$c); } mysql_query("INSERT INTO jaillogs VALUES('',$userid, {$id}, {$_POST['days']}, '{$_POST['reason']}',unix_timestamp())",$c); print "User jailed : $id."; } } function view_itm_logs() { global $ir,$c,$h,$userid; print "<h3>Item Xfer Logs</h3> <table width=75%><tr style='background:gray'><th>Time</th><th>Detail</th></tr>"; $q=mysql_query("SELECT ix.*,u1.username as sender, u2.username as sent,i.itmname as item FROM itemxferlogs ix LEFT JOIN users u1 ON ix.ixFROM=u1.userid LEFT JOIN users u2 ON ix.ixTO=u2.userid LEFT JOIN items i ON i.itmid=ix.ixITEM ORDER BY ix.ixTIME DESC",$c); while($r=mysql_fetch_array($q)) { print "<tr><td>" . date("F j, Y, g:i:s a",$r['ixTIME']) . "</td><td>{$r['sender']} sent {$r['ixQTY']} {$r['item']}(s) to {$r['sent']} </td></tr>"; } print "</table>"; } function view_cash_logs() { global $ir,$c,$h,$userid; print "<h3>Cash Xfer Logs</h3> <table width=75% border=1> <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 cx.*,u1.username as sender, u2.username as sent FROM cashxferlogs cx LEFT JOIN users u1 ON cx.cxFROM=u1.userid LEFT JOIN users u2 ON cx.cxTO=u2.userid ORDER BY cx.cxTIME DESC",$c) or die(mysql_error()." "."SELECT cx.*,u1.username as sender, u2.username as sent FROM cashxferlogs cx LEFT JOIN users u1 ON cx.cxFROM=u1.userid LEFT JOIN users u2 ON cx.cxTO=u2.userid ORDER BY cx.cxTIME DESC"); while($r=mysql_fetch_array($q)) { if($r['cxFROMIP'] == $r['cxTOIP']) { $m="<span style='color:red;font-weight:800'>MULTI</span>"; } else { $m=""; } print "<tr><td>{$r['cxID']}</td> <td>" . date("F j, Y, g:i:s a",$r['cxTIME']) . "</td><td>[url='viewuser.php?u={$r[']{$r['sender']}[/url] [{$r['cxFROM']}] (IP: {$r['cxFROMIP']}) </td><td>[url='viewuser.php?u={$r[']{$r['sent']}[/url] [{$r['cxTO']}] (IP: {$r['cxTOIP']}) </td> <td>$m</td> <td> \${$r['cxAMOUNT']}</td> <td> [[url='admin.php?action=fedform&XID={$r[']Jail Sender[/url]] [[url='admin.php?action=fedform&XID={$r[']Jail Receiver[/url]]</td> </tr>"; } print "</table>"; } function view_mail_logs() { global $ir,$c,$h,$userid; $_GET['st']=abs((int) $_GET['st']); $rpp=100; print "<h3>Mail Logs</h3> <table width=75% border=2> \n<tr style='background:gray'> <th>ID</th> <th>Time</th> <th>User From</th> <th>User To</th> <th width>Subj</th> <th width=30%>Msg</th> <th></th> </tr>"; $q=mysql_query("SELECT m.*,u1.username as sender, u2.username as sent FROM mail m LEFT JOIN users u1 ON m.mail_from=u1.userid LEFT JOIN users u2 ON m.mail_to=u2.userid WHERE m.mail_from != 0 ORDER BY m.mail_time DESC LIMIT {$_GET['st']},$rpp",$c) or die(mysql_error()." "."SELECT cx.*,u1.username as sender, u2.username as sent FROM cashxferlogs cx LEFT JOIN users u1 ON cx.cxFROM=u1.userid LEFT JOIN users u2 ON cx.cxTO=u2.userid ORDER BY cx.cxTIME DESC LIMIT {$_GET['st']},$rpp"); while($r=mysql_fetch_array($q)) { print "\n<tr><td>{$r['mail_id']}</td> <td>" . date("F j, Y, g:i:s a",$r['mail_time']) . "</td><td>{$r['sender']} [{$r['mail_from']}] </td> <td>{$r['sent']} [{$r['mail_to']}] </td> \n<td> {$r['mail_subject']}</td> \n<td>{$r['mail_text']}</td> <td> [[url='admin.php?action=mailform&XID={$r[']MailBan Sender[/url]] [[url='admin.php?action=mailform&XID={$r[']MailBan Receiver[/url]]</td> </tr>"; } print "</table> "; $q2=mysql_query("SELECT mail_id FROM mail WHERE mail_from != 0",$c); $rs=mysql_num_rows($q2); $pages=ceil($rs/20); print "Pages: "; for($i=1;$i<=$pages;$i++) { $st=($i-1)*20; print "[url='admin.php?action=maillogs&st=$st']$i[/url]"; if($i % 7 == 0) { print " \n"; } } } function staff_list() { global $ir,$c,$h,$userid; print "<h3>Staff Management</h3>"; print "[b]Admins[/b] <table width=80%><tr style='background:gray'> <th>User</th> <th>Online?</th> <th>Links</th> </tr>"; $q=mysql_query("SELECT * FROM users WHERE user_level=2 ORDER BY userid ASC", $c); while($r=mysql_fetch_array($q)) { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>$on</td> <td>[url='admin.php?action=userlevel&level=1&ID={$r[']Member[/url]</td></tr>"; } print "</table>"; } function userlevel() { global $ir,$c,$h,$userid; $_GET['level']=abs((int) $_GET['level']); $_GET['ID']=abs((int) $_GET['ID']); mysql_query("UPDATE users SET user_level={$_GET['level']} WHERE userid={$_GET['ID']}", $c); print "User's level adjusted."; } function userlevelform() { global $ir,$c,$h,$userid; print "<h3>User Level Adjust</h3> <form action='admin.php' method='get'> <input type='hidden' name='action' value='userlevel'> User: ".user_dropdown($c,'ID')." User Level: <input type='radio' name='level' value='0' /> NPC <input type='radio' name='level' value='1' /> Member <input type='radio' name='level' value='3' /> Helper <input type='radio' name='level' value='4' /> Legend <input type='radio' name='level' value='2' /> Admin <input type='submit' value='Adjust' /></form>"; } function massmailer() { global $ir,$c,$userid; if($_POST['text']) { $_POST['text']=nl2br(strip_tags($_POST['text'])); $subj="This is a mass mail from the administration"; if($_POST['cat']==1) $q=mysql_query("SELECT * FROM users ",$c); else if($_POST['cat']==2) $q=mysql_query("SELECT * FROM users WHERE user_level > 1",$c); else if($_POST['cat']==3) $q=mysql_query("SELECT * FROM users WHERE user_level=2",$c); else $q=mysql_query("SELECT * FROM users WHERE user_level={$_POST['level']}",$c); while($r=mysql_fetch_array($q)) { mysql_query("INSERT INTO mail VALUES('', 0, 0, {$r['userid']}, unix_timestamp(),'$subj','{$_POST['text']}')",$c); print "Mass mail sent to {$r['username']}. "; } print "Mass mail sending complete! [url='admin.php']> Back[/url]"; } else { print "[b]Mass Mailer[/b] <form action='admin.php?action=massmailer' method='post'> Text: <textarea name='text' rows='7' cols='40'></textarea> <input type='radio' name='cat' value='1' /> Send to all members <input type='radio' name='cat' value='2' /> Send to staff only <input type='radio' name='cat' value='3' /> Send to admins only OR Send to user level: <input type='radio' name='level' value='1' /> Member <input type='radio' name='level' value='2' /> Admin <input type='submit' value='Send' /></form>"; } } function ipban() { ?><h3>Ban an IP</h3> <form action='admin.php?action=ipbancon' method='post'> <input type="text" name="ip" /> <input type='submit' value='BAN!' /></form> <hr width="50%" /> [url="admin.php?action=ipbanview"][b]Click to view current IP bans[/b][/url] <? } function ipbancon() { $filename='/home/bradlll/public_html/ipbans/'.$_POST['ip']; $file=fopen($filename,w) or die("Error Creating File"); fclose($file); ?>Done [url="admin.php?action=ipbanview"][b]Back[/b][/url]<? } function ipbanview() { $dir = "/home/bradlll/public_html/ipbans/"; ?> <h3>Viewing banned IP's</h3> <table border="1"> <tr> <th> IP </th> <th> Delete? </th> </tr><? if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if (strlen($file)>4) { ?> <tr> <td> <? echo $file; ?> </td> <td> [url="admin.php?action=ipbanremove&ip=<? echo $file; ?>"][b]Delete[/b][/url] </td> </tr> <? } } closedir($dh); } } ?></table> [url="admin.php"][b]Back[/b][/url] <? } function ipbanremove() { $file=$_GET['ip']; $filepath = "/home/bradlll/public_html/ipbans/".$file; if (! unlink ($filepath)) { echo "Couldn't delete file"; } else { echo "Removed IP: ".$file; } ?> [url="admin.php?action=ipbanview"][b]Back[/b][/url]<? } function del_user_form() { global $ir,$c,$h,$userid; print "<h3>Deleting User</h3> The user will be deleted. <form action='admin.php?action=delusersub' method='post'> User: ".user_dropdown($c,'user',$_GET['XID'])." <input type='submit' value='Delete User' /></form>"; } function del_user_submit() { global $ir,$c,$h,$userid; mysql_query("DELETE FROM users WHERE userid={$_POST['user']}",$c); print "User deleted."; } function adnewspaper_form() { global $ir,$c,$h,$userid; print "<h3>Editing Admin Pad</h3><form action='admin.php?action=subadnews' method='post'> <textarea rows='7' cols='35' name='newspaper'>"; include "admin.news"; print "</textarea> <input type='submit' value='Change' /></form>"; } function adnewspaper_submit() { global $ir,$c,$h,$userid; $l=fopen("admin.news","w"); fwrite($l,stripslashes($_POST['newspaper'])); fclose($l); print "Admin Pad updated!"; } $h->endpage(); ?>
×
×
  • Create New...