Esempio n. 1
0
function smarty_cms_function_edit($params, &$smarty)
{
    global $gCms;
    if (!check_permission(get_userid(false), 'Modify Any Page') && !quick_check_authorship($gCms->variables['content_id'], author_pages(get_userid(false)))) {
        return;
    }
    $urlext = '?' . CMS_SECURE_PARAM_NAME . '=' . $_SESSION[CMS_USER_KEY];
    $text = isset($params['text']) ? $params['text'] : 'Edit This Page';
    if (isset($params["showbutton"])) {
        return '<a href="' . $gCms->config['root_url'] . '/' . $gCms->config['admin_dir'] . '/editcontent.php' . $urlext . '&amp;content_id=' . $gCms->variables['content_id'] . '"><img src="' . $gCms->config['root_url'] . '/images/cms/editbutton.png" alt="' . $text . '"/></a>';
    } else {
        return '<a href="' . $gCms->config['root_url'] . '/' . $gCms->config['admin_dir'] . '/editcontent.php' . $urlext . '&amp;content_id=' . $gCms->variables['content_id'] . '">' . $text . '</a>';
    }
    /*
    global $gCms;
    	
    $userid = get_userid(false);
    if(!$userid) return;
    
    $access = check_permission($userid, 'Modify Any Page');
    if (!$access) return;
    
    $text = 'Edit This Page';
    
    if (!empty($params['text']))
    {
    	$text = $params['text'];
    }
    
    //will this work if using htaccess? (Yes! -Wishy)
    if (isset($params["showbutton"]))
    {
    	return '<a href="'.$gCms->config['root_url'].'/'.$gCms->config['admin_dir'].'/editcontent.php?content_id='.$gCms->variables['content_id'].'"><img src="'.$gCms->config['root_url'].'/images/cms/editbutton.png" alt="'.$text.'"/></a>';
    }
    else
    {
    	return '<a href="'.$gCms->config['root_url'].'/'.$gCms->config['admin_dir'].'/editcontent.php?content_id='.$gCms->variables['content_id'].'">'.$text.'</a>';
    }
    */
}
Esempio n. 2
0
function display_content_list($themeObject = null)
{
    $gCms = cmsms();
    global $thisurl;
    global $urlext;
    check_login();
    $userid = get_userid();
    // setup which columns to display.
    $mypages = author_pages($userid);
    $columnstodisplay = array();
    $columnstodisplay['expand'] = 1;
    $columnstodisplay['hier'] = 1;
    $columnstodisplay['page'] = 1;
    $columnstodisplay['alias'] = get_site_preference('listcontent_showalias', 1);
    $columnstodisplay['url'] = get_site_preference('listcontent_showurl', 1);
    $columnstodisplay['template'] = 1;
    $columnstodisplay['friendlyname'] = 1;
    $columnstodisplay['owner'] = 1;
    $columnstodisplay['active'] = check_permission($userid, 'Manage All Content');
    $columnstodisplay['default'] = check_permission($userid, 'Manage All Content');
    $columnstodisplay['move'] = check_permission($userid, 'Manage All Content') || check_permission($userid, 'Reorder Content');
    $columnstodisplay['view'] = 1;
    $columnstodisplay['copy'] = check_permission($userid, 'Add Pages') || check_permission($userid, 'Manage All Content');
    $columnstodisplay['edit'] = 1;
    $columnstodisplay['delete'] = check_permission($userid, 'Remove Pages') || check_permission($userid, 'Manage All Content');
    $columnstodisplay['multiselect'] = check_permission($userid, 'Remove Pages') || check_permission($userid, 'Manage All Content');
    $page = 1;
    if (isset($_GET['page'])) {
        $page = $_GET['page'];
    }
    //$limit = get_preference($userid, 'paging', 0);
    $limit = 0;
    //Took out pagination
    $thelist = '';
    $count = 0;
    $currow = "row1";
    if ($themeObject == null) {
        $themeObject = AdminTheme::GetThemeObject();
    }
    // construct true/false button images
    $image_true = $themeObject->DisplayImage('icons/system/true.gif', lang('true'), '', '', 'systemicon');
    $image_set_false = $themeObject->DisplayImage('icons/system/true.gif', lang('setfalse'), '', '', 'systemicon');
    $image_set_true = $themeObject->DisplayImage('icons/system/false.gif', lang('settrue'), '', '', 'systemicon');
    $expandImg = $themeObject->DisplayImage('icons/system/expand.gif', lang('expand'), '', '', 'systemicon');
    $contractImg = $themeObject->DisplayImage('icons/system/contract.gif', lang('contract'), '', '', 'systemicon');
    $downImg = $themeObject->DisplayImage('icons/system/arrow-d.gif', lang('down'), '', '', 'systemicon');
    $upImg = $themeObject->DisplayImage('icons/system/arrow-u.gif', lang('up'), '', '', 'systemicon');
    $viewImg = $themeObject->DisplayImage('icons/system/view.gif', lang('view'), '', '', 'systemicon');
    $editImg = $themeObject->DisplayImage('icons/system/edit.gif', lang('edit'), '', '', 'systemicon');
    $copyImg = $themeObject->DisplayImage('icons/system/copy.gif', lang('copy'), '', '', 'systemicon');
    $deleteImg = $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'), '', '', 'systemicon');
    #Setup array so we don't load more templates than we need to
    $templateops = TemplateOperations::get_instance()->LoadTemplates();
    #Ditto with users
    $users = array();
    $menupos = array();
    $openedArray = array();
    if (get_preference($userid, 'collapse', '') != '') {
        $tmp = explode('.', get_preference($userid, 'collapse'));
        foreach ($tmp as $thisCol) {
            $colind = substr($thisCol, 0, strpos($thisCol, '='));
            if ($colind != "") {
                $openedArray[] = $colind;
            }
        }
    }
    debug_buffer('At Start of Display Content List');
    $hierarchy = $gCms->GetHierarchyManager();
    $rowcount = 0;
    if ($hierarchy->hasChildren()) {
        $pagelist = array();
        $children = $hierarchy->getChildren(false, true);
        $author_allpages = check_permission($userid, 'Reorder Content') && check_peer_authorship($userid, $children[0]->getId());
        foreach ($children as $child) {
            display_hierarchy($child, $userid, check_modify_all($userid), $users, $menupos, $openedArray, $pagelist, $image_true, $image_set_false, $image_set_true, $upImg, $downImg, $viewImg, $editImg, $copyImg, $deleteImg, $expandImg, $contractImg, $mypages, $page, $columnstodisplay, $author_allpages);
        }
        $rowcount += count($pagelist);
        foreach ($pagelist as $item) {
            $thelist .= $item;
        }
        $thelist .= '</tbody>';
        $thelist .= "</table>\n";
    }
    $headoflist = '';
    $headoflist .= '<div class="pageoverflow"><p class="pageoptions">';
    if (check_permission($userid, 'Add Pages') || check_permission($userid, 'Manage All Content')) {
        $headoflist .= '<a href="addcontent.php' . $urlext . '" class="pageoptions">';
        $headoflist .= $themeObject->DisplayImage('icons/system/newobject.gif', lang('addcontent'), '', '', 'systemicon') . '</a>';
        $headoflist .= ' <a class="pageoptions" href="addcontent.php' . $urlext . '">' . lang("addcontent") . '</a>';
    }
    $headoflist .= '<a style="margin-left: 10px;" href="' . $thisurl . '&amp;expandall=1" onclick="xajax_content_expandall(); return false;">';
    $headoflist .= $themeObject->DisplayImage('icons/system/expandall.gif', lang('expandall'), '', '', 'systemicon') . '</a>';
    $headoflist .= ' <a class="pageoptions" href="' . $thisurl . '&amp;expandall=1" onclick="xajax_content_expandall(); return false;">' . lang("expandall") . '</a>&nbsp;&nbsp;&nbsp;';
    $headoflist .= ' <a href="' . $thisurl . '&amp;collapseall=1" onclick="xajax_content_collapseall(); return false;">';
    $headoflist .= $themeObject->DisplayImage('icons/system/contractall.gif', lang('contractall'), '', '', 'systemicon') . '</a>';
    $headoflist .= ' <a class="pageoptions" href="' . $thisurl . '&amp;collapseall=1" onclick="xajax_content_collapseall(); return false;">' . lang("contractall") . '</a>';
    if (check_permission($userid, 'Manage All Content')) {
        $reorderurl = "ordercontent.php?" . CMS_SECURE_PARAM_NAME . "=" . $_SESSION[CMS_USER_KEY];
        $headoflist .= '&nbsp;&nbsp;&nbsp;<a href="' . $reorderurl . '">';
        $headoflist .= $themeObject->DisplayImage('icons/system/reorder.gif', lang('reorderpages'), '', '', 'systemicon') . '</a>';
        $headoflist .= ' <a class="pageoptions" href="' . $reorderurl . '">' . lang('reorderpages') . '</a>';
    }
    $headoflist .= '</p></div>';
    $headoflist .= '<form action="multicontent.php" method="post">';
    $headoflist .= '<div class="hidden" ><input type="hidden" name="' . CMS_SECURE_PARAM_NAME . '" value="' . $_SESSION[CMS_USER_KEY] . '"/></div>' . "\n";
    $headoflist .= '<table cellspacing="0" class="pagetable">' . "\n";
    $headoflist .= '<thead>';
    $headoflist .= "<tr>\n";
    // setup column titles.
    if ($columnstodisplay['expand']) {
        $headoflist .= "<th>&nbsp;</th>";
    }
    if ($columnstodisplay['hier']) {
        $headoflist .= "<th>&nbsp;</th>";
    }
    if ($columnstodisplay['page']) {
        $str = lang('menutext');
        if (get_site_preference('listcontent_showtitle')) {
            $str = lang('title');
        }
        $headoflist .= '<th scope="col" class="pagew25" title="' . lang('lctitle_page') . '">' . lang('page') . " <em>({$str})</em></th>\n";
    }
    if ($columnstodisplay['alias']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_alias') . '">' . lang('pagealias') . "</th>\n";
    }
    if ($columnstodisplay['url']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_url') . '">' . lang('url') . "</th>\n";
    }
    if ($columnstodisplay['template']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_template') . '">' . lang('template') . "</th>\n";
    }
    if ($columnstodisplay['friendlyname']) {
        $headoflist .= "<th scope=\"col\" >" . lang('type') . "</th>\n";
    }
    if ($columnstodisplay['owner']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_owner') . '">' . lang('owner') . "</th>\n";
    }
    if ($columnstodisplay['active']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_active') . '" class="pagepos">' . lang('active') . "</th>\n";
    }
    if ($columnstodisplay['default']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_default') . '" class="pagepos">' . lang('default') . "</th>\n";
    }
    if ($columnstodisplay['move']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_move') . '" class="move">' . lang('move') . "</th>\n";
    }
    if ($columnstodisplay['view']) {
        $headoflist .= "<th class=\"pageicon\">&nbsp;</th>\n";
    }
    if ($columnstodisplay['copy']) {
        $headoflist .= "<th class=\"pageicon\">&nbsp;</th>\n";
    }
    if ($columnstodisplay['edit']) {
        $headoflist .= "<th class=\"pageicon\">&nbsp;</th>\n";
    }
    if ($columnstodisplay['delete']) {
        $headoflist .= "<th class=\"pageicon\">&nbsp;</th>\n";
    }
    if ($columnstodisplay['multiselect']) {
        $headoflist .= '<th scope="col" title="' . lang('lctitle_multiselect') . '" class="checkbox"><input id="selectall" type="checkbox" onclick="select_all();" /><label for="selectall" class="invisible">' . lang('toggle') . '</label></th>' . "\n";
        // checkbox column
    }
    $headoflist .= "</tr>\n";
    $headoflist .= '</thead>';
    $headoflist .= '<tbody>';
    ob_start();
    $opts = array();
    if (check_permission($userid, 'Remove Pages') || check_permission($userid, 'Manage All Content')) {
        bulkcontentoperations::register_function(lang('delete'), 'delete');
    }
    if (check_permission($userid, 'Manage All Content')) {
        bulkcontentoperations::register_function(lang('active'), 'active');
        bulkcontentoperations::register_function(lang('inactive'), 'inactive');
        bulkcontentoperations::register_function(lang('cachable'), 'setcachable');
        bulkcontentoperations::register_function(lang('noncachable'), 'setnoncachable');
        bulkcontentoperations::register_function(lang('showinmenu'), 'showinmenu');
        bulkcontentoperations::register_function(lang('hidefrommenu'), 'hidefrommenu');
        bulkcontentoperations::register_function(lang('secure'), 'secure');
        bulkcontentoperations::register_function(lang('insecure'), 'insecure');
        bulkcontentoperations::register_function(lang('settemplate'), 'settemplate');
        bulkcontentoperations::register_function(lang('changeowner'), 'changeowner');
    }
    $opts = bulkcontentoperations::get_operation_list();
    if (!empty($opts)) {
        echo '<div class="pageoptions">' . "\n";
        echo '<div style="margin-top: 0; float: right; text-align: right">' . "\n";
        echo '<label for="multiaction">' . lang('selecteditems') . '</label>:&nbsp;&nbsp;';
        echo '<select name="multiaction" id="multiaction">';
        foreach ($opts as $key => $value) {
            echo '<option value="' . $key . '">' . $value . '</option>';
        }
        echo '</select>' . "\n";
        echo '<input type="submit" accesskey="s" value="' . lang('submit') . '"/></div></div>' . "\n";
    }
    /*    } */
    ?>
			<div style="float: left;">
<?php 
    if (check_permission($userid, 'Add Pages') || check_permission($userid, 'Manage All Content')) {
        ?>
			<a href="addcontent.php<?php 
        echo $urlext;
        ?>
" class="pageoptions">
<?php 
        echo $themeObject->DisplayImage('icons/system/newobject.gif', lang('addcontent'), '', '', 'systemicon') . '</a>';
        echo ' <a class="pageoptions" href="addcontent.php' . $urlext . '">' . lang("addcontent");
        ?>
			</a>
<?php 
    }
    ?>
		<a style="margin-left: 10px;" href="'.$thisurl.'&amp;expandall=1" onclick="xajax_content_expandall(); return false;">
<?php 
    echo $themeObject->DisplayImage('icons/system/expandall.gif', lang('expandall'), '', '', 'systemicon') . '</a>';
    echo ' <a class="pageoptions" href="' . $thisurl . '&amp;expandall=1" onclick="xajax_content_expandall(); return false;">' . lang("expandall");
    ?>
			</a>&nbsp;&nbsp;&nbsp;
		<a href="<?php 
    echo $thisurl;
    ?>
&amp;collapseall=1" onclick="xajax_content_collapseall(); return false;">
<?php 
    echo $themeObject->DisplayImage('icons/system/contractall.gif', lang('contractall'), '', '', 'systemicon') . '</a>';
    echo ' <a class="pageoptions" href="' . $thisurl . '&amp;collapseall=1" onclick="xajax_content_collapseall(); return false;">' . lang("contractall") . '</a>';
    if (check_permission($userid, 'Manage All Content')) {
        $image_reorder = $themeObject->DisplayImage('icons/system/reorder.gif', lang('reorderpages'), '', '', 'systemicon');
        $reorderurl = "ordercontent.php?" . CMS_SECURE_PARAM_NAME . "=" . $_SESSION[CMS_USER_KEY];
        echo '&nbsp;&nbsp;&nbsp; <a class="pageoptions" href="' . $reorderurl . '">' . $image_reorder . '</a> <a class="pageoptions" href="' . $reorderurl . '">' . lang('reorderpages') . '</a>';
    }
    ?>
			</div>

			<br />

			<div class="clearb"></div>
<?php 
    $footer = ob_get_contents();
    ob_end_clean();
    return $headoflist . $thelist . $footer . '</form></div>';
}
 /**
  * SetAggregatePermissions
  *
  * This function gathers disparate permissions to come up with the visibility of
  * various admin sections, e.g., if there is any content-related operation for
  * which a user has permissions, the aggregate content permission is granted, so
  * that menu item is visible.
  *
  * @access private
  * @ignore
  */
 private function _SetAggregatePermissions($force = FALSE)
 {
     $this->_SetModuleAdminInterfaces();
     if (is_array($this->_perms && $force == FALSE)) {
         return;
     }
     $this->_perms = array();
     $this->_breadcrumbs = array();
     // Content Permissions
     $this->_perms['htmlPerms'] = check_permission($this->userid, 'Add Global Content Blocks') | check_permission($this->userid, 'Modify Global Content Blocks') | check_permission($this->userid, 'Delete Global Content Blocks');
     $gCms = cmsms();
     $gcbops = $gCms->GetGlobalContentOperations();
     $thisUserBlobs = $gcbops->AuthorBlobs($this->userid);
     if (count($thisUserBlobs) > 0) {
         $this->_perms['htmlPerms'] = true;
     }
     $this->_perms['pagePerms'] = check_permission($this->userid, 'Modify Any Page') || check_permission($this->userid, 'Add Pages') || check_permission($this->userid, 'Remove Pages') || check_permission($this->userid, 'Manage All Content');
     $thisUserPages = author_pages($this->userid);
     if (count($thisUserPages) > 0) {
         $this->_perms['pagePerms'] = true;
     }
     $this->_perms['contentPerms'] = $this->_perms['pagePerms'] | $this->_perms['htmlPerms'] | (isset($this->_sectionCount['content']) && $this->_sectionCount['content'] > 0);
     // layout
     $this->_perms['templatePerms'] = check_permission($this->userid, 'Add Templates') | check_permission($this->userid, 'Modify Templates') | check_permission($this->userid, 'Remove Templates');
     $this->_perms['cssPerms'] = check_permission($this->userid, 'Add Stylesheets') | check_permission($this->userid, 'Modify Stylesheets') | check_permission($this->userid, 'Remove Stylesheets');
     $this->_perms['cssAssocPerms'] = check_permission($this->userid, 'Add Stylesheet Assoc') | check_permission($this->userid, 'Modify Stylesheet Assoc') | check_permission($this->userid, 'Remove Stylesheet Assoc');
     $this->_perms['layoutPerms'] = $this->_perms['templatePerms'] | $this->_perms['cssPerms'] | $this->_perms['cssAssocPerms'] | (isset($this->_sectionCount['layout']) && $this->_sectionCount['layout'] > 0);
     // file / image
     $this->_perms['filePerms'] = check_permission($this->userid, 'Modify Files') | (isset($this->_sectionCount['files']) && $this->_sectionCount['files'] > 0);
     // user/group
     $this->_perms['userPerms'] = check_permission($this->userid, 'Add Users') | check_permission($this->userid, 'Modify Users') | check_permission($this->userid, 'Remove Users');
     $this->_perms['groupPerms'] = check_permission($this->userid, 'Add Groups') | check_permission($this->userid, 'Modify Groups') | check_permission($this->userid, 'Remove Groups');
     $this->_perms['groupPermPerms'] = check_permission($this->userid, 'Modify Permissions');
     $this->_perms['groupMemberPerms'] = check_permission($this->userid, 'Modify Group Assignments');
     $this->_perms['usersGroupsPerms'] = $this->_perms['userPerms'] | $this->_perms['groupPerms'] | $this->_perms['groupPermPerms'] | $this->_perms['groupMemberPerms'] | (isset($this->_sectionCount['usersgroups']) && $this->_sectionCount['usersgroups'] > 0);
     // admin
     $this->_perms['sitePrefPerms'] = check_permission($this->userid, 'Modify Site Preferences') | (isset($this->_sectionCount['preferences']) && $this->_sectionCount['preferences'] > 0);
     $this->_perms['adminPerms'] = $this->_perms['sitePrefPerms'] | (isset($this->_sectionCount['admin']) && $this->_sectionCount['admin'] > 0);
     $this->_perms['siteAdminPerms'] = $this->_perms['sitePrefPerms'] | $this->_perms['adminPerms'] | (isset($this->_sectionCount['admin']) && $this->_sectionCount['admin'] > 0);
     // extensions
     $this->_perms['codeBlockPerms'] = check_permission($this->userid, 'Modify User-defined Tags');
     $this->_perms['modulePerms'] = check_permission($this->userid, 'Modify Modules');
     $this->_perms['eventPerms'] = check_permission($this->userid, 'Modify Events');
     $this->_perms['taghelpPerms'] = check_permission($this->userid, 'View Tag Help');
     $this->_perms['extensionsPerms'] = $this->_perms['codeBlockPerms'] | $this->_perms['modulePerms'] | $this->_perms['eventPerms'] | $this->_perms['taghelpPerms'] | (isset($this->_sectionCount['extensions']) && $this->_sectionCount['extensions'] > 0);
 }
Esempio n. 4
0
            $_SESSION['cms_passthru']['mact'] = implode(',', array($tmp[0], 'm1_', $tmp[1]));
            if (count($tmp2) > 0) {
                $_SESSION['cms_passthru']['m1_contentlist'] = implode(',', $tmp2);
            }
            // handle any normal module action.
            redirect("moduleinterface.php" . $urlext);
        }
    }
}
include_once "header.php";
global $gCms;
$db =& $gCms->GetDb();
$hm =& $gCms->GetHierarchyManager();
$nodelist = array();
$bulk = false;
$mypages = author_pages($userid);
function get_delete_list($sel_nodes, &$parent, &$final_result, $depth = 0)
{
    // get the list of items we should delete
    $userid = get_userid();
    if (!check_permission($userid, 'Remove Pages')) {
        return FALSE;
    }
    global $mypages;
    $status = TRUE;
    foreach ($sel_nodes as $node) {
        if (check_ownership($userid, $node->getTag()) || quick_check_authorship($node->getTag(), $mypages)) {
            $content =& $node->GetContent(false);
            $children =& $node->getChildren(false, true);
            $child_status = array();
            if (isset($children) && count($children)) {
/**
 * Checks that the given userid has access to modify the given
 * pageid.  This would mean that they were set as additional
 * authors/editors by the owner.
 *
 * @internal
 * @since 0.2
 * @param  integer The admin user id
 * @param  integer A valid content id.
 * @return boolean
 */
function check_authorship($userid, $contentid = '')
{
    $check = false;
    $gCms = cmsms();
    if (!isset($gCms->variables['authorpages'])) {
        author_pages($userid);
    }
    if (isset($gCms->variables['authorpages'])) {
        if (in_array($contentid, $gCms->variables['authorpages'])) {
            $check = true;
        }
    }
    return $check;
}
Esempio n. 6
0
 /**
  * SetAggregatePermissions
  *
  * This function gathers disparate permissions to come up with the visibility of
  * various admin sections, e.g., if there is any content-related operation for
  * which a user has permissions, the aggregate content permission is granted, so
  * that menu item is visible.
  *
  */
 function SetAggregatePermissions()
 {
     # Content Permissions
     $this->perms['htmlPerms'] = check_permission($this->userid, 'Add Global Content Blocks') | check_permission($this->userid, 'Modify Global Content Blocks') | check_permission($this->userid, 'Delete Global Content Blocks');
     global $gCms;
     $gcbops =& $gCms->GetGlobalContentOperations();
     $thisUserBlobs = $gcbops->AuthorBlobs($this->userid);
     if (count($thisUserBlobs) > 0) {
         $this->perms['htmlPerms'] = true;
     }
     $this->perms['pagePerms'] = check_permission($this->userid, 'Modify Any Page') || check_permission($this->userid, 'Add Pages') || check_permission($this->userid, 'Remove Pages') || check_permission($this->userid, 'Manage All Content');
     $thisUserPages = author_pages($this->userid);
     if (count($thisUserPages) > 0) {
         $this->perms['pagePerms'] = true;
     }
     $this->perms['contentPerms'] = $this->perms['pagePerms'] | $this->perms['htmlPerms'] | (isset($this->sectionCount['content']) && $this->sectionCount['content'] > 0);
     # layout
     $this->perms['templatePerms'] = check_permission($this->userid, 'Add Templates') | check_permission($this->userid, 'Modify Templates') | check_permission($this->userid, 'Remove Templates');
     $this->perms['cssPerms'] = check_permission($this->userid, 'Add Stylesheets') | check_permission($this->userid, 'Modify Stylesheets') | check_permission($this->userid, 'Remove Stylesheets');
     $this->perms['cssAssocPerms'] = check_permission($this->userid, 'Add Stylesheet Assoc') | check_permission($this->userid, 'Modify Stylesheet Assoc') | check_permission($this->userid, 'Remove Stylesheet Assoc');
     $this->perms['layoutPerms'] = $this->perms['templatePerms'] | $this->perms['cssPerms'] | $this->perms['cssAssocPerms'] | (isset($this->sectionCount['layout']) && $this->sectionCount['layout'] > 0);
     # file / image
     $this->perms['filePerms'] = check_permission($this->userid, 'Modify Files') | (isset($this->sectionCount['files']) && $this->sectionCount['files'] > 0);
     # user/group
     $this->perms['userPerms'] = check_permission($this->userid, 'Add Users') | check_permission($this->userid, 'Modify Users') | check_permission($this->userid, 'Remove Users');
     $this->perms['groupPerms'] = check_permission($this->userid, 'Add Groups') | check_permission($this->userid, 'Modify Groups') | check_permission($this->userid, 'Remove Groups');
     $this->perms['groupPermPerms'] = check_permission($this->userid, 'Modify Permissions');
     $this->perms['groupMemberPerms'] = check_permission($this->userid, 'Modify Group Assignments');
     $this->perms['usersGroupsPerms'] = $this->perms['userPerms'] | $this->perms['groupPerms'] | $this->perms['groupPermPerms'] | $this->perms['groupMemberPerms'] | (isset($this->sectionCount['usersgroups']) && $this->sectionCount['usersgroups'] > 0);
     # admin
     $this->perms['sitePrefPerms'] = check_permission($this->userid, 'Modify Site Preferences') | (isset($this->sectionCount['preferences']) && $this->sectionCount['preferences'] > 0);
     $this->perms['adminPerms'] = $this->perms['sitePrefPerms'] | (isset($this->sectionCount['admin']) && $this->sectionCount['admin'] > 0);
     $this->perms['siteAdminPerms'] = $this->perms['sitePrefPerms'] | $this->perms['adminPerms'] | (isset($this->sectionCount['admin']) && $this->sectionCount['admin'] > 0);
     # extensions
     $this->perms['codeBlockPerms'] = check_permission($this->userid, 'Modify User-defined Tags');
     $this->perms['modulePerms'] = check_permission($this->userid, 'Modify Modules');
     $this->perms['eventPerms'] = check_permission($this->userid, 'Modify Events');
     $this->perms['taghelpPerms'] = check_permission($this->userid, 'View Tag Help');
     $this->perms['extensionsPerms'] = $this->perms['codeBlockPerms'] | $this->perms['modulePerms'] | $this->perms['eventPerms'] | $this->perms['taghelpPerms'] | (isset($this->sectionCount['extensions']) && $this->sectionCount['extensions'] > 0);
 }