<?php $user->req("ForumAdmin"); if (is_valid_integer($_GET['aid']) && is_valid_signed_integer($_GET['fid'])) { $aid = $_GET['aid']; $fid = $_GET['fid']; } else { err_not_found("invalid fid or aid"); } db_exec("delete from f_moderators where aid = ? and fid = ?", array($aid, $fid)); Header("Location: useracl.phtml?message=" . urlencode("User ACL Deleted"));
<?php $user->req("ForumAdmin"); if (is_valid_integer($_REQUEST['aid'])) { $aid = $_REQUEST['aid']; } else { err_not_found("Invalid FID or AID"); } /* If submit is set, shove the data into the database (well, after some */ /* error checking) */ if (isset($_POST['submit'])) { $opts = $_POST['opts']; for ($i = 0; $i < count($opts); $i++) { $capabilities = array(); if (is_valid_signed_integer($opts[$i]['fid'])) { $fid = $opts[$i]['fid']; if (isset($opts[$i]['Lock'])) { $capabilities[] = "Lock"; } if (isset($opts[$i]['Moderate'])) { $capabilities[] = "Moderate"; } if (isset($opts[$i]['Delete'])) { $capabilities[] = "Delete"; } if (isset($opts[$i]['OffTopic'])) { $capabilities[] = "OffTopic"; } if (isset($opts[$i]['Advertise'])) { $capabilities[] = "Advertise"; }