Example #1
0
function get_navigation()
{
    include LITO_MODUL_PATH . 'acp_navigation/navigate.php';
    $navi = new navigation();
    $rrr = $navi->make_navigate();
    return $rrr;
}
Example #2
0
 public static function getNavTree($restrictToDepth = FALSE)
 {
     if (is_null(self::$navigation)) {
         return array();
     }
     // loop each enabled module with any navStructures
     $navTree = array();
     foreach (self::$navigation as $module => $navStructure) {
         // loop the navStructures
         foreach ((array) $navStructure as $parameters) {
             // Set a pointer in a multidemensional array limited by $restrictToDepth
             $navigation = array();
             $navPt =& $navigation;
             $depth = 0;
             if (!empty($parameters['navBranch'])) {
                 $navBranch = explode('/', $parameters['navBranch']);
                 $navBranch = array_filter($navBranch);
                 foreach ($navBranch as $depth => $branch) {
                     if (is_int($restrictToDepth) && $depth > $restrictToDepth) {
                         break;
                     }
                     $navPt =& $navPt[__($branch)];
                 }
             }
             // if the navStructure does not branch this deep fill to $restriceToDepth
             if (is_int($restrictToDepth) && $depth < $restrictToDepth) {
                 for ($depth; $depth < $restrictToDepth; $depth++) {
                     $navPt =& $navPt['UNSET'];
                 }
             }
             // Mark this as a LEAF
             $navPt =& $navPt[];
             // force the expected keys to have some default value if missing
             $parameters += array('currentNavItem' => NULL, 'module' => $module);
             if (self::atModule($parameters['navURL'])) {
                 $parameters['currentNavItem'] = TRUE;
                 self::$currentSubMenu = $parameters['navSubmenu'];
                 self::$currentBaseUrl = $parameters['navURL'];
             } else {
                 $parameters['currentNavItem'] = FALSE;
             }
             $parameters['navLabel'] = __($parameters['navLabel']);
             // Save these parameters to the pointer
             $navPt = $parameters;
             // merge the pointer with the result array
             $navTree = array_merge_recursive($navTree, $navigation);
         }
     }
     return $navTree;
 }
Example #3
0
 public static function bootstrapPackages($ignoreInstaller = FALSE)
 {
     if (Bluebox_Installer::is_installing() and $ignoreInstaller !== TRUE) {
         return TRUE;
     }
     $installedPackages = Doctrine::getTable('Package')->findByStatus(Package_Manager::STATUS_INSTALLED);
     if (empty($installedPackages)) {
         return FALSE;
     }
     $loadList = $navigation = array();
     foreach ($installedPackages as $package) {
         $packageDir = DOCROOT . $package['basedir'];
         $loadList[$package['name']] = $packageDir;
         if (is_dir($packageDir . '/models')) {
             // Note that with MODEL_LOADING_CONSERVATIVE set, the model isn't really loaded until first requested
             Doctrine::loadModels($packageDir . '/models', Doctrine::MODEL_LOADING_CONSERVATIVE);
         }
         if (empty($package['navigation'])) {
             continue;
         }
         $navigation[$package['name']] = $package['navigation'];
     }
     $loadedModules = Kohana::config('core.modules');
     $systemModules = array_unique(array_merge($loadedModules, $loadList));
     Kohana::config_set('core.modules', $systemModules);
     foreach ($loadList as $packageDir) {
         // Load hooks only for modules in the DB, if hooks are enabled
         if (Kohana::config('core.enable_hooks') === TRUE) {
             if (is_dir($packageDir . '/hooks')) {
                 // Since we're running late, we need to go grab
                 // the hook files again (sad but true)
                 $hooks = Kohana::list_files('hooks', TRUE, $packageDir . '/hooks');
                 foreach ($hooks as $file) {
                     // Load the hook
                     include_once $file;
                 }
             }
         }
     }
     navigation::bootstrap($navigation);
 }
Example #4
0
 function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Features'));
     // Add the base model columns to the grid
     $this->grid->add('ftr_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('ftr_display_name', 'Name');
     $this->grid->add('ftr_desc', 'Description');
     // Add the actions to the grid
     $this->grid->addAction('feature/edit', 'Edit', array('arguments' => 'ftr_id'));
     $this->grid->addAction('feature/delete', 'Delete', array('arguments' => 'ftr_id'));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
     $currentuser = users::getCurrentUser();
     if ($currentuser['user_type'] == User::TYPE_SYSTEM_ADMIN) {
         navigation::getNavTree();
         $submenu = navigation::getCurrentSubMenu();
         navigation::addSubmenuOption('feature', 'Re-Install Default Features', 'feature/installDefaultFeatures');
     }
 }
Example #5
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Agents'));
     // Add the base model columns to the grid
     $this->grid->add('cca_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('cca_displayname', 'Display Name');
     $this->grid->add('cca_loginid', 'Login ID');
     $this->grid->add('agentLocation/name', 'Location', array('width' => '150', 'search' => false));
     // Add the actions to the grid
     $this->grid->addAction('callcenter_agents/edit', 'Edit', array('arguments' => 'cca_id'));
     $this->grid->addAction('callcenter_agents/delete', 'Delete', array('arguments' => 'cca_id'));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
     $currentuser = users::getCurrentUser();
     if ($currentuser['user_type'] == User::TYPE_SYSTEM_ADMIN) {
         navigation::getNavTree();
         $submenu = navigation::getCurrentSubMenu();
         navigation::addSubmenuOption('callcenter_agents', 'Re-Install Features', 'callcenter_agents/installFeatures');
     }
 }
Example #6
0
 public static function getOutput($par)
 {
     $nav = new template("navigation/container");
     $public = !isset($_SESSION['user']);
     foreach (dbConn::query("SELECT * FROM :prefix:navigation WHERE parent IS NULL AND public = :0 ORDER BY position", $public) as $r) {
         if ($r['admin'] && !$_SESSION['isAdmin']) {
             continue;
         }
         $link = new template("navigation/layer1");
         $link->insert("caption", htmlspecialchars($r['caption']));
         $link->insert("destination", ROOT . $r['destination'] . "/");
         $requestUri = $_SERVER['REQUEST_URI'];
         if (navigation::startsWith($_SERVER['REQUEST_URI'], ROOT)) {
             $requestUri = urldecode(substr($_SERVER['REQUEST_URI'], strlen(ROOT)));
         }
         // check active
         //$link->insert("active", $requestUri == $r['destination'] ? "active" : "");
         $link->insert("active", navigation::startsWith($requestUri, $r['destination']) ? "active" : "");
         foreach (dbConn::query("SELECT * FROM :prefix:navigation WHERE parent = :0 ORDER BY position", $r['linkId']) as $s) {
             $sublink = new template("navigation/layer2");
             $sublink->insert("caption", htmlspecialchars($s['caption']));
             $sublink->insert("destination", ROOT . $s['destination'] . "/");
             $requestUri = $_SERVER['REQUEST_URI'];
             if ($requestUri[strlen($requestUri) - 1] == "/") {
                 $requestUri = substr($requestUri, 0, strlen($requestUri) - 1);
             }
             if (navigation::startsWith($requestUri, ROOT)) {
                 $requestUri = substr($requestUri, strlen(ROOT), strlen($requestUri) - strlen(ROOT));
             }
             $sublink->insert("active", $requestUri == $s['destination'] ? "active" : "");
             $link->insert("links", $sublink->getOutput());
         }
         $nav->insert("links", $link->getOutput());
     }
     return $nav->getOutput();
 }
Example #7
0
" class="logo">
                    	<?php 
echo dyn::get('hp_name');
?>
                    </a>
                    
                    <div class="btn-group">
                        <button type="button" class="btn btn-default dropdown-toggle">
                        	Navigation <span class="caret"></span>
                        </button>
                    </div>
                    
                	<nav>
                    	<ul>
                        	<?php 
foreach (navigation::getCategoryById(0) as $navi) {
    $class = $navi->get('id') == $this->get('id') ? 'class="active"' : '';
    echo '<li ' . $class . '><a href="' . $navi->getUrl() . '">' . $navi->get('name') . '</a></li>';
}
?>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
    </header>
    
    <section id="top">
    	<div class="container">
    		<div class="row">
        		<div class="col-lg-12">
Example #8
0
echo block::getBlock('Startseite 3er Box');
?>
                    
                    <div class="row">
        				<div class="col-md-8">
               				<?php 
echo dyn::get('content');
?>
 
                    	</div>
        				<div class="col-md-4">
                        	<?php 
if (navigation::getCategoryById($this->get('id'))) {
    echo '<h2>Navigation</h2>';
    echo '<ul class="subnav">';
    foreach (navigation::getCategoryById($this->get('id')) as $subnavi) {
        echo '<li><a href="' . $subnavi->getUrl() . '">' . $subnavi->get('name') . '</a></li>';
    }
    echo '</ul>';
}
?>
                        	<h2>Sidebar</h2>
                            <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
                            <p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
                    	</div>
                    </div>
                </section>
            </div>
        </div>
    	<div class="row">
        	<div class="col-lg-12"> 
Example #9
0
function get_navigation($modulname)
{
    global $db, $tpl, $lang_suffix, $n, $is_loged_in;
    // get_modulname
    // return array
    // 0 = modulname
    // 1 = modulstartfile
    // 2 = modul ID
    // 3 = Show Error 0/1
    $module = get_modulname(1);
    if (is_modul_id_aktive($module[2]) == 1) {
        include LITO_MODUL_PATH . $module[0] . '/' . $module[1];
        $navi = new navigation();
        //hauptnavi
        $rrr = $navi->make_navigation($modulname, $module[2], $is_loged_in, 0);
        $tpl->assign('LITO_NAVIGATION', $rrr);
        //navigation left side
        $rrr_1 = $navi->make_navigation($modulname, $module[2], $is_loged_in, 1);
        $tpl->assign('LITO_NAVIGATION_1', $rrr_1);
        //navigation right side
        $rrr_2 = $navi->make_navigation($modulname, $module[2], $is_loged_in, 2);
        $tpl->assign('LITO_NAVIGATION_2', $rrr_2);
        unset($navi);
    } else {
        return $module[4] == 0 ? '' : 'Modul wurde deaktiviert.';
    }
}
Example #10
0
        // Children Tab Stuff
        //////////
    }
} catch (Exception $e) {
    log::insert("Data Entry: Object: Error", 0, 0, $e->getMessage());
    errorHandle::errorMsg($e->getMessage());
    $error = TRUE;
}
// build the form for displaying
if (forms::validID()) {
    try {
        if (($builtForm = forms::build($engine->cleanGet['MYSQL']['formID'], $engine->cleanGet['MYSQL']['objectID'], $error)) === FALSE) {
            throw new Exception("Error building form.");
        }
        localvars::add("form", $builtForm);
        localvars::add("leftnav", navigation::buildProjectNavigation($engine->cleanGet['MYSQL']['formID']));
        localvars::add("objectID", $engine->cleanGet['MYSQL']['objectID']);
        //////////
        // Project Tab Stuff
        $selectedProjects = objects::getProjects($engine->cleanGet['MYSQL']['objectID']);
        localVars::add("projectOptions", projects::generateProjectChecklist($selectedProjects));
        // Project Tab Stuff
        //////////
    } catch (Exception $e) {
        log::insert("Data Entry: Object: Error", $engine->cleanGet['MYSQL']['objectID'], $engine->cleanGet['MYSQL']['formID'], $e->getMessage());
        errorHandle::errorMsg($e->getMessage());
    }
}
localVars::add("results", displayMessages());
// Display warning if form is not part of current project
forms::checkFormInCurrentProjects($engine->cleanGet['MYSQL']['formID']);
Example #11
0
                // let's go
                if (!empty($items)) {
                    // header
                    $page_title = $lang['Group_Control_Panel'];
                    include $get->url('includes/page_header');
                    // hidden fields
                    _hide_build(array('sid' => $userdata['session_id']));
                    _hide_send();
                    // build groups list
                    $groups_list = array('name' => POST_GROUPS_URL, 'items' => $items);
                    $rcs->constructor($groups_list);
                    unset($items);
                    // display
                    $template->set_filenames(array('user' => 'groupcp_select_body.tpl'));
                    // constants
                    $template->assign_vars(array('L_USERGROUPS' => $lang['usergroups_list'], 'L_SELECT_USERGROUP' => $lang['select_usergroup'], 'L_SELECT_USERGROUP_DETAILS' => $lang['select_usergroup_details'], 'L_VIEW_INFORMATION' => $lang['View_Information'], 'I_SUBMIT' => $images['cmd_submit'], 'S_USERGROUP_ACTION' => $get->url('groupcp', '', true)));
                    // navigation
                    $navigation = new navigation();
                    $navigation->add('usergroups_list', 'select_usergroup', 'groupcp');
                    $navigation->display();
                    unset($navigation);
                    // send the display
                    $template->pparse('user');
                } else {
                    message_die(GENERAL_MESSAGE, $lang['No_groups_exist']);
                }
            }
        }
    }
}
include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
Example #12
0
                    <div class="main">
                        
                        <?php 
message::render();
?>

                        <div class="sub_menu">
                        <?php 
$submenu = navigation::getCurrentSubMenu();
if (!empty($submenu) && navigation::atUrl()) {
    foreach ($submenu as $menuItem => $parameters) {
        if (!empty($parameters['disabled'])) {
            continue;
        }
        if (navigation::atUrl($parameters['url'])) {
            continue;
        }
        echo html::anchor($parameters['url'], __($menuItem));
    }
}
?>
                        </div>
                        
                        <?php 
echo $content;
?>

                    </div>

                </div>
Example #13
0
<?php

// @TODO there is way too much logic in this file. It needs to be refactored out.
include "../header.php";
$formID = isset($engine->cleanPost['HTML']['id']) ? $engine->cleanPost['HTML']['id'] : (isset($engine->cleanGet['HTML']['id']) ? $engine->cleanGet['HTML']['id'] : NULL);
if (is_empty($formID)) {
    $formID = NULL;
}
log::insert("Form Creator: Edit Forms", 0, $formID);
if (isset($engine->cleanPost['MYSQL']['deleteForm'])) {
    forms::delete($engine->cleanGet['HTML']['id']);
    http::redirect(localvars::get('siteRoot') . 'formCreator/list.php', 301);
}
if (isset($engine->cleanPost['MYSQL']['submitNavigation'])) {
    try {
        if (navigation::updateFormNav($engine->cleanPost['RAW']['groupings']) === FALSE) {
            throw new Exception("Error saving navigation");
        }
        errorHandle::successMsg("Successfully updated Form Navigation.");
    } catch (Exception $e) {
        errorHandle::newError("{$e->getFile()}:{$e->getLine()} {$e->getMessage()}", errorHandle::DEBUG);
        errorHandle::errorMsg("Error Updating Navigation");
        $engine->openDB->transRollback();
        $engine->openDB->transEnd();
    }
}
if (isset($engine->cleanPost['MYSQL']['submitForm'])) {
    $engine->openDB->transBegin();
    $form = json_decode($engine->cleanPost['RAW']['form'], TRUE);
    $fields = json_decode($engine->cleanPost['RAW']['fields'], TRUE);
    $idno = NULL;
Example #14
0
?>
  </div>

  <div id="content_wrapper">
    <div class="child_nav">
      <?php 
if ($child_nav) {
    echo navigation::render($child_nav, $this->child_nav_active);
}
?>
    </div>
    
    <div class="grandchild_nav">
      <?php 
if ($grandchild_nav) {
    echo navigation::render($grandchild_nav, $this->grandchild_nav_active);
}
?>
    </div>

    <div id="primary_content">
      <?php 
if (isset($content)) {
    echo $content;
}
?>
    </div>
    
    <div id="footer">© Copyright 2009 PlusPanda =] | <a href="#">Top</a></div>
  
  </div>
Example #15
0
            <div class="wrapper">
                <div class="nav">
                    <ul>
                    <?php 
$navTree = navigation::getNavTree(0);
foreach ($navTree as $navStructure) {
    // determine if the nav items has a menu icon
    if ($img = navigation::getNavIcon($navStructure)) {
        $icon = '<span class="navIcon ' . pathinfo($img, PATHINFO_FILENAME) . '" style="background-image: url(' . $img . ');">&nbsp;</span>';
    } else {
        $icon = '';
    }
    // create the link for this item
    echo '<li>';
    echo html::anchor($navStructure['navURL'], $icon . '<span>' . $navStructure['navLabel'] . '</span>', array('title' => $navStructure['navSummary'], 'class' => navigation::getNavClasses($navStructure)));
    echo '</li>';
}
?>
                    </ul>
                </div>

                <div class="main">
                    <?php 
echo $content;
?>
                </div>

            </div>

        </div>
Example #16
0
$navTree = navigation::getNavTree(0);
foreach ($navTree as $branch => $navStructure) {
    if (empty($navStructure['currentNavItem'])) {
        echo '<li>';
        echo html::anchor($navStructure['navURL'], '<span>' . $navStructure['navLabel'] . '</span>', array('title' => $navStructure['navSummary'], 'class' => navigation::getNavClasses($navStructure)));
        echo '</li>';
    } else {
        echo '<li class="currentNavItem">';
        echo '<span>' . $navStructure['navLabel'] . '</span>';
        if (!empty($navStructure['navSubmenu'])) {
            echo '<ul>';
            foreach ($navStructure['navSubmenu'] as $label => $options) {
                if (!is_array($options)) {
                    $options = array('url' => $options);
                }
                $currentNavItem = navigation::atUrl($options['url']);
                if (!empty($options['disabled']) && !$currentNavItem) {
                    continue;
                }
                echo '<li ';
                if ($currentNavItem) {
                    echo 'class="currentNavItem"';
                }
                echo '>';
                echo html::anchor($options['url'], '<span>' . $label . '</span>');
                echo '</li>';
            }
            echo '</ul>';
        }
        echo '</li>';
    }