KyleMassacre Posted February 20, 2012 Share Posted February 20, 2012 well here are my cases: switch ( $_GET['action'] ) { case 'editnews': newspaper_form(); break; case 'subnews': newspaper_submit(); break; case 'givedpform': give_dp_form(); break; case 'givedpsub': give_dp_submit(); break; case 'stafflist': staff_list(); break; case 'userlevel': userlevel(); break; case 'userlevelform': userlevelform(); break; case 'massmailer': massmailer(); break; default: echo 'Error: This script requires an action.'; break; and i assume its the "userlevelform" cause that is where i get the error: function userlevelform() { global $db,$ir,$c,$h,$userid; echo " <br><h3>User Level Adjust</h3><br /> <form action='staff_special.php?action=userlevel' method='get'> User: ".user_dropdown($c,'ID')." <br /> User Level: <br /> <input type='radio' name='level' value='1' /> Member <br /> <input type='radio' name='level' value='2' /> Admin <br /> <input type='radio' name='level' value='3' /> Secretary <br /> <input type='radio' name='level' value='4' /> Assistant <br /> <input type='radio' name='level' value='5' /> Forum Mod <br /> <input type='submit' value='Adjust' /> </form> "; Quote Link to comment Share on other sites More sharing options...
Mystical Posted February 20, 2012 Author Share Posted February 20, 2012 (edited) All you have to do is this. You do not need to replace anything else. Replace this: function userlevel() { global $db,$ir,$c,$h,$userid; $_GET['level'] = ( isset($_GET['level'])&&in_array($_POST['level'], array(1,2,3,4,5)) )?abs(intval($_GET['level'])):1; $_GET['ID'] = ( isset($_GET['ID'])&&is_numeric($_GET['ID']) )?abs(intval($_GET['ID'])):''; $d = $db->query('SELECT `userid` FROM `users` WHERE `userid` = '.$_POST['ID']); if ( $db->num_rows($d) == 0 ) { echo 'Invalid user.<br />> <a href="staff_special.php?action=userlevelform">Go Home</a>'; die($h->endpage()); With this: function userlevel() { global $db,$ir,$c,$h,$userid; $_GET['level'] = ( isset($_GET['level'])&&in_array($_GET['level'], array(1,2,3,4,5)) )?abs(intval($_GET['level'])):1; $_GET['ID'] = ( isset($_GET['ID'])&&is_numeric($_GET['ID']) )?abs(intval($_GET['ID'])):''; $d = $db->query('SELECT `userid` FROM `users` WHERE `userid` = '.$_GET['ID']); if ( $db->num_rows($d) == 0 ) { echo 'Invalid user.<br />> <a href="staff_special.php?action=userlevelform">Go Home</a>'; die($h->endpage()); The fix was posted by lucky3809 in this thread..... Edited February 20, 2012 by Mystical Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 20, 2012 Share Posted February 20, 2012 (edited) This didnt work for me unless im just not seeing it but here is my code function userlevel() { global $db,$ir,$c,$h,$userid; $_GET['level'] = ( isset($_GET['level'])&&in_array($_GET['level'], array(1,2,3,4,5)) )?abs(intval($_GET['level'])):1; $_GET['ID'] = ( isset($_GET['ID'])&&is_numeric($_GET['ID']) )?abs(intval($_GET['ID'])):''; $d = $db->query('SELECT `userid` FROM `users` WHERE `userid` = '.$_GET['ID']); if ( $db->num_rows($d) == 0 ) { echo 'Invalid user.<br />> <a href="staff_special.php?action=userlevelform">Go Home</a>'; die($h->endpage()); } All you have to do is this. You do not need to replace anything else. Replace this: function userlevel() { global $db,$ir,$c,$h,$userid; $_GET['level'] = ( isset($_GET['level'])&&in_array($_POST['level'], array(1,2,3,4,5)) )?abs(intval($_GET['level'])):1; $_GET['ID'] = ( isset($_GET['ID'])&&is_numeric($_GET['ID']) )?abs(intval($_GET['ID'])):''; $d = $db->query('SELECT `userid` FROM `users` WHERE `userid` = '.$_POST['ID']); if ( $db->num_rows($d) == 0 ) { echo 'Invalid user.<br />> <a href="staff_special.php?action=userlevelform">Go Home</a>'; die($h->endpage()); With this: function userlevel() { global $db,$ir,$c,$h,$userid; $_GET['level'] = ( isset($_GET['level'])&&in_array($_GET['level'], array(1,2,3,4,5)) )?abs(intval($_GET['level'])):1; $_GET['ID'] = ( isset($_GET['ID'])&&is_numeric($_GET['ID']) )?abs(intval($_GET['ID'])):''; $d = $db->query('SELECT `userid` FROM `users` WHERE `userid` = '.$_GET['ID']); if ( $db->num_rows($d) == 0 ) { echo 'Invalid user.<br />> <a href="staff_special.php?action=userlevelform">Go Home</a>'; die($h->endpage()); The fix was posted by lucky3809 in this thread..... That is exactly what i have Edited February 20, 2012 by KyleMassacre added code tags to look pretty Quote Link to comment Share on other sites More sharing options...
Mystical Posted February 21, 2012 Author Share Posted February 21, 2012 Try the whole thing from lucky3809 post. It works fine for me using v.2.03 Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 21, 2012 Share Posted February 21, 2012 Its showing the exact same thing Quote Link to comment Share on other sites More sharing options...
Mystical Posted February 21, 2012 Author Share Posted February 21, 2012 (edited) Its showing the exact same thing Guess what? Mine was not working either.... When I posted it was fixed it must of been in cache from when I added the old file from V 2.0.2c. So I just checked my file and mine did not work either! Got to looking at it with a blank stare for a few hours until my eyes started to bleed....... 5 or 6 beers later I figured out why it was not working. I am as tired as I am drunk so I posted my entire file on pastebin for you which actually works. Just replace yours with this one and let me know how she goes.... http://pastebin.com/bz79m7HW Edited February 21, 2012 by Mystical Quote Link to comment Share on other sites More sharing options...
sniko Posted February 21, 2012 Share Posted February 21, 2012 There is an error in staff_special.php for v2.0.3. When I try to update a users level I get this message. Error: This script requires an action. I saw Illusions fix in another thread but after I added the fix I still get the exact same error. Any help would be appreciated. Try; <a href='filename.php?action=userlevelform'>User Level Form</a><br /> Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted February 28, 2012 Share Posted February 28, 2012 (edited) it is in your staff.php menu the link to the userlevelform it is nothing on your staff_special.php looked over your script you never said when you got that message after you had clicked on the link from your side menu or after selecting a player. and still you shouldnt be mixing POST and GET it needs to be all the same or the Post in the query is not being secured by the secured line with GET. the fix open staff.php find : staff_special.php replace with: staff_special.php?action=userlevelform Edited February 28, 2012 by lucky3809 Quote Link to comment Share on other sites More sharing options...
The Darkness Posted February 28, 2012 Share Posted February 28, 2012 *Coff* *Coff* *Coff* Illegal Version Of MCCODES. Quote Link to comment Share on other sites More sharing options...
Mystical Posted February 28, 2012 Author Share Posted February 28, 2012 *Coff* *Coff* *Coff* Illegal Version Of MCCODES. If you are referring to me *Coff* *Coff* *Coff*...... I hold 2 licenses (REDUX and v2.03) and neither one of them is *Coff* *Coff* *Coff* Illegal Quote Link to comment Share on other sites More sharing options...
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.