if (!$fpermlist[$fperm['arg']]['_ftitle']) { $fpermlist[$fperm['arg']]['_ftitle'] = $fperm['ftitle']; } } if (!empty($fpermlist)) { foreach ($fpermlist as $fid => $fpl) { ForumPermTable($fid, $fpl); } } else { echo ' <tr class="cell1"><td>' . __('No permissions.') . '</td></tr>'; } echo ' </table> <table class="outline margin">'; ForumPermTable(0); echo ' </table> </td></tr></table> <table class="outline margin"> <tr> <td class="cell1 center"><input type="submit" name="saveaction" value="' . __('Save all changes') . '"></td> </tr> </table> <input type="hidden" name="token" value="' . htmlspecialchars($loguser['token']) . '"> </form>'; function PermSwitch($field, $threeway, $_val) { $val = $_val; if (!$threeway && $val == 0) { $val = -1;
<form action="" method="POST"> <table class="outline margin"> <tr class="header1"><th colspan="2">' . __('Forum permissions') . '</th></tr>'; $fperms = Query("SELECT p.*, g.id gid, g.name gname, g.color_unspec gcolor FROM {usergroups} g LEFT JOIN {permissions} p ON p.id=g.id AND p.applyto=0 AND p.arg={2}\n\tWHERE ISNULL(p.perm) OR SUBSTR(p.perm,1,6)={0} OR SUBSTR(p.perm,1,4)={1} ORDER BY g.type, g.rank", 'forum.', 'mod.', $id); while ($fperm = Fetch($fperms)) { $fpermlist[$fperm['gid']][$fperm['perm']] = $fperm['value']; if (!$fpermlist[$fperm['gid']]['_gname']) { $fpermlist[$fperm['gid']]['_gname'] = $fperm['gname']; } if (!$fpermlist[$fperm['gid']]['_gcolor']) { $fpermlist[$fperm['gid']]['_gcolor'] = $fperm['gcolor']; } } if (!empty($fpermlist)) { foreach ($fpermlist as $gid => $fpl) { ForumPermTable($gid, $fpl); } } else { echo ' <tr class="cell1"><td>' . __('No permissions.') . '</td></tr>'; } echo ' </table> <table class="outline margin"> <tr> <td class="cell1 center"><input type="submit" name="saveaction" value="' . __('Save all changes') . '"></td> </tr> </table> <input type="hidden" name="token" value="' . htmlspecialchars($loguser['token']) . '"> </form>'; function PermSwitch($field, $val)