require "include/bittorrent.php";
dbconn(false);
loggedinorreturn();
// The following line may need to be changed to UC_MODERATOR if you don't have Forum Moderators
if ($CURUSER['class'] < UC_MODERATOR) stderr( _("Error"), _("Permission denied.")); // No acces to below this rank
if ($CURUSER['override_class'] != 255) stderr( _("Error"), _("Permission denied.")); // No access to an overridden user class either - just in case
if ($_GET['action'] == 'editclass') //Process the querystring - No security checks are done as a temporary class higher
{ //than the actual class mean absoluetly nothing.
$newclass = (int) $_GET['class'];
$returnto = htmlspecialchars($_GET['returnto']);
mysql_query("UPDATE users SET override_class = ".sqlesc($newclass)." WHERE id = ".$CURUSER['id']); // Set temporary class
header("Location: ".$BASEURL."/".$returnto);
die();
}
// HTML Code to allow changes to current class
stdhead( _("Set override class for ") . $CURUSER["username"]);
?>
= _('Allows you to change your user class on the fly.') ?>