Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

DrawOption()

Description

Renders an option in the Permission Manager (admin_group_permissions.php page)

Parameters

ColumnTypeDefaultDescription
$permission string Permission identifier
$description string User friendly description of the permission
$reverse boolean false Reverse the permission
$reload boolean false Autosave changes done on this permission

Return

void

Location

include/render_functions.php lines 4779 to 4794

Definition

 
function DrawOption($permission,$description,$reverse=false,$reload=false)
    {
    global 
$permissions,$permissions_done;
    
$checked=(in_array($permission,$permissions));
    if (
$reverse) {$checked=!$checked;}
    
?>
    <input type="hidden" name="permission_ echo base64_encode($permission)?>" value=" echo ($reverse)?"reverse":"normal" ?>">
    <tr>
        <td> if ($reverse) {?><i> ?> echo $permission?> if ($reverse) {?></i> ?></td>
        <td> echo $description?></td>
        <td><input type="checkbox" name="checked_ echo base64_encode($permission?> 
            
if ($checked) { ?> checked  ?> if ($reload) { ?> onChange="CentralSpacePost(this.form,false);"  ?>></td>
    </tr>
    
    $permissions_done
[]=$permission;
    }

This article was last updated 21st April 2021 17:35 Europe/London time based on the source file dated 15th April 2021 09:35 Europe/London time.