jon182 Posted June 30, 2009 Posted June 30, 2009 Ok this has me stumped. When i try to go to the staff panel the thing that shows latest staff activity is thier but on the side panel its The mainmenu and not the staff menu. this is staff.php which is the page i go to. I'm not positive this is where the error occurs though <?php include "sglobals.php"; //This contains general thingies switch($_GET['action']) { case 'basicset': basicsettings(); break; case 'announce': announcements(); break; default: index(); break; } function basicsettings() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } if($_POST['submit']) { unset($_POST['submit']); foreach($_POST as $k => $v) { $db->query("UPDATE `settings` SET conf_value='$v' WHERE conf_name='$k'"); } print "Settings updated! [url='staff.php?action=basicset']Back[/url]"; stafflog_add("Updated the basic game settings"); } else { print "<h3>Basic Settings</h3><hr /> <form action='staff.php?action=basicset' method='post'> <input type='hidden' name='submit' value='1' /> Game Name: <input type='text' name='game_name' value='{$set['game_name']}' /> Game Owner: <input type='text' name='game_owner' value='{$set['game_owner']}' /> Game Description: <textarea rows='7' cols='50' name='game_description'>{$set['game_description']}</textarea> Paypal Address: <input type='text' name='paypal' value='{$set['paypal']}' /> Gym/Crimes Validation: <select name='validate_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['validate_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Validation Period: <select name='validate_period' type='dropdown'>"; $opt=array( "5" => "Every 5 Minutes", "15" => "Every 15 Minutes", "60" => "Every Hour", "login" => "Every Login" ); foreach($opt as $k => $v) { if($k == $set['validate_period']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Registration CAPTCHA: <select name='regcap_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['regcap_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Send Crystals: <select name='sendcrys_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['sendcrys_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Bank Xfers: <select name='sendbank_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['sendbank_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Energy Refill Price (crystals): <input type='text' name='ct_refillprice' value='{$set['ct_refillprice']}' /> IQ per crystal: <input type='text' name='ct_iqpercrys' value='{$set['ct_iqpercrys']}' /> Money per crystal: <input type='text' name='ct_moneypercrys' value='{$set['ct_moneypercrys']}' /> Will Potion Item: ".item_dropdown($c, "willp_item", $set['willp_item'])." Police Investigation Item: ".item_dropdown($c, "piITEM", $set['piITEM'])." <input type='submit' value='Update Settings' /></form>"; } } function announcements() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } if($_POST['text']) { $db->query("INSERT INTO announcements VALUES('{$_POST['text']}', unix_timestamp())"); $db->query("UPDATE users SET new_announcements=new_announcements+1"); print "Announcement added! > [url='staff.php']Back[/url]"; stafflog_add("Added a new announcement"); } else { print "Adding an announcement... Please try to make sure the announcement is concise and covers everything you want it to.<form action='staff.php?action=announce' method='post'> Announcement text: <textarea name='text' rows='10' cols='60'></textarea> <input type='submit' value='Add Announcement' /></form>"; } } function index() { global $db,$ir,$c,$h,$userid,$set, $_CONFIG; $pv=phpversion(); $mv=$db->fetch_single($db->query("SELECT VERSION()")); $dv=$_CONFIG['driver']; if($ir['user_level']==2) { $versionno=20200; $version="2.0.2"; print "<h3>System Info</h3><hr /> <table width='75%' cellspacing='1' class='table'> <tr> <th>PHP Version:</th> <td>$pv</td> </tr> <tr> <th>MySQL Version:</th> <td>$mv</td> </tr> <tr> <th>MySQL Driver:</th> <td>$dv</td> </tr> <tr> <th>Codes Version</th> <td>$version (Build: $versionno)</td> </tr> </table><hr /> <h3>Last 10 Staff Actions</h3><hr /> <table width='100%' cellspacing='1' class='table'> <tr> <th>Staff</th> <th>Action</th> <th>Time</th> <th>IP</th> </tr>"; $q=$db->query("SELECT s.*, u.* FROM stafflog AS s LEFT JOIN users AS u ON s.user=u.userid ORDER BY s.time DESC LIMIT 10"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['username']} [{$r['user']}]</td> <td>{$r['action']}</td> <td>".date('F j Y g:i:s a', $r['time'])."</td> <td>{$r['ip']}</td></tr>"; } print "</table><hr />"; } print "<h3>Staff Notepad</h3><hr />"; if($_POST['pad']) { $db->query("UPDATE settings SET conf_value='{$_POST['pad']}' WHERE conf_name='staff_pad'"); $set['staff_pad']=stripslashes($_POST['pad']); print "[b]Staff Notepad Updated![/b]<hr />"; } print "<form action='staff.php' method='post'> <textarea rows='10' cols='60' name='pad'>".htmlspecialchars($set['staff_pad'])."</textarea> <input type='submit' value='Update Notepad' /></form>"; } $h->endpage(); ?> Quote
Lithium Posted June 30, 2009 Posted June 30, 2009 Re: why doesn't this work? and the error is...? Quote
jon182 Posted June 30, 2009 Author Posted June 30, 2009 Re: why doesn't this work? it doesnt show an actual error. The staff menu just doesn't show up. Quote
jon182 Posted July 1, 2009 Author Posted July 1, 2009 Re: why doesn't this work? so does anyone know? Quote
Djkanna Posted July 18, 2009 Posted July 18, 2009 Re: why doesn't this work? Check in your header.php file That its including smenu.php under the staff function instead of mainmenu.php Djkanna Quote
3XTR3M3 Posted July 18, 2009 Posted July 18, 2009 Re: why doesn't this work? yeah djkanna is right i have had this problem before and i fixed it by editing the header :) Quote
jon182 Posted July 20, 2009 Author Posted July 20, 2009 Re: why doesn't this work? its including the smenu.php but its still making the mistake Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.