Esempio n. 1
0
 function show($view, $loc = null, $title = '')
 {
     $id = pathos_sessions_get('last_section');
     $current = null;
     $sections = navigationmodule::getHierarchy();
     foreach (array_keys($sections) as $sid) {
         if ($id == $sid) {
             $current = $sections[$sid];
             break;
         }
     }
     $template = new template('navigationmodule', $view, $loc);
     $template->assign('sections', $sections);
     $template->assign('current', $current);
     $template->assign('canManage', pathos_permissions_checkOnModule('manage', 'navigationmodule'));
     $template->assign('title', $title);
     $template->output();
 }
Esempio n. 2
0
#
# You should have received a copy of the GNU
# General Public License along with Exponent; if
# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: manage.php,v 1.6 2005/04/06 15:53:34 filetreefrog Exp $
##################################################
if (!defined('PATHOS')) {
    exit('');
}
if (pathos_permissions_checkOnModule('manage', 'navigationmodule')) {
    pathos_flow_set(SYS_FLOW_PROTECTED, SYS_FLOW_ACTION);
    $template = new template('navigationmodule', '_manager', $loc);
    $sections = navigationmodule::getHierarchy();
    $last_manage_depth = -1;
    $last_admin_depth = -1;
    if ($user && $user->is_acting_admin) {
        foreach (array_keys($sections) as $id) {
            $sections[$id]->canManage = 1;
            $sections[$id]->canManageRank = 1;
            $sections[$id]->canAdmin = 1;
        }
    } else {
        $thisloc = pathos_core_makelocation('navigationmodule');
        foreach (array_keys($sections) as $id) {
            $thisloc->int = $id;