Esempio n. 1
0
function get_main_navigation($current_page)
{
    global $_pages, $_base_path, $_tool;
    $parent_page = $_pages[$current_page]['parent'];
    $_top_level_pages = array();
    $tool_file = $table = '';
    if (isset($parent_page) && defined($parent_page)) {
        foreach ($_pages[$parent_page] as $page) {
            if (page_available($page)) {
                if (isset($_pages[$page]['title'])) {
                    $_page_title = $_pages[$page]['title'];
                } else {
                    $_page_title = _AT($_pages[$page]['title_var']);
                }
                if (isset($_tool[$_pages[$page]['title_var']])) {
                    //viene prelevato il file nel caso in cui lo strumento sia valodo per essere inserito nella toolbar in fase di editing dei conenuti del corso
                    $tool_file = $_tool[$_pages[$page]['title_var']]['file'];
                    $table = $_tool[$_pages[$page]['title_var']]['table'];
                } else {
                    $tool_file = '';
                    $table = '';
                }
                $_top_level_pages[] = array('url' => AT_print($_base_path, 'url.page') . url_rewrite($page), 'title' => $_page_title, 'tool_file' => $tool_file, 'table' => $table, 'img' => AT_print($_base_path, 'url.page') . $_pages[$page]['img']);
            }
        }
    } else {
        if (isset($parent_page)) {
            return get_main_navigation($parent_page);
        }
    }
    return $_top_level_pages;
}
Esempio n. 2
0
if ($current_tab == 0 || $current_tab == 3) 
{
    $simple = true;
    if ($_POST['complexeditor'] == '1') {
        $simple = false;
    }
    load_editor($simple, false, "none");    
}

// Generate the last content tool elements
//loading toolbar for insert discussion topic or web link into the content
if ($current_tab == 0){
    if(authenticate(AT_PRIV_CONTENT,AT_PRIV_RETURN)){
        $home_links = get_home_navigation();                        //vengono lette le caratteristiche di ogni modulo attivato nella home page.
        $main_links = get_main_navigation($current_page);           //vengono lette le caratteristiche di ogni modulo attivo nel main navigation

        $num = count($main_links);                                  //necessario elminare il primo e l'utlimo elemento poichè sono rispettivamente "Home" e "Manage"
        unset($main_links[0]);                                      //"Home" label
        unset($main_links[$num-1]);                                 //"Manage" label

        $all_tools = $home_links;                                   //$all_tools represent a merge between $home_links and main_links without repetitions.
        $check=false;
        foreach($main_links as $main) {
            foreach($home_links as $home) {
                if($home['title'] == $main['title']) {
                    $check=true;
                    break;
                }
            }
            if(!$check && $main['tool_file'] != '' && $main['table'] != '') {
Esempio n. 3
0
  <div class="wrapper header">
    <div class="subwrapper">
      <div class="inner start">
        <div class="divLogo">Logospace</div>
        <div class="divSlogan">Slogan Platzhalter</div>
        <!--<div class="divLangs">
          <ul>
            <li><a href="#">English</a></li>
            <li><a href="#">Deutsch</a></li>
            <li><a href="#">Franz&ouml;sisch</a></li>
          </ul>
        </div>-->
        <div class="divSearch">
         <input type="text" name="iptSearch" id="iptSearch" value="Suche"/>
        </div>
      </div>
    </div>
  </div>
  <!-- Main Navigation Section -->
  <div class="wrapper nav">
    <div class="subwrapper">
      <div class="inner start">
        <ul>
          <?php 
get_main_navigation('li', '', 'selected', true, false);
?>
        </ul>
        <div class="clear"></div>
      </div>
    </div>
  </div>
Esempio n. 4
0
}
require AT_INCLUDE_PATH . 'header.inc.php';
if ($current_tab == 0 || $current_tab == 3) {
    $simple = true;
    if ($_POST['complexeditor'] == '1') {
        $simple = false;
    }
    load_editor($simple, false, "none");
}
// Generate the last content tool elements
//loading toolbar for insert discussion topic or web link into the content
if ($current_tab == 0) {
    if (authenticate(AT_PRIV_CONTENT, AT_PRIV_RETURN)) {
        $home_links = get_home_navigation();
        //vengono lette le caratteristiche di ogni modulo attivato nella home page.
        $main_links = get_main_navigation($current_page);
        //vengono lette le caratteristiche di ogni modulo attivo nel main navigation
        $num = count($main_links);
        //necessario elminare il primo e l'utlimo elemento poichè sono rispettivamente "Home" e "Manage"
        unset($main_links[0]);
        //"Home" label
        unset($main_links[$num - 1]);
        //"Manage" label
        $all_tools = $home_links;
        //$all_tools represent a merge between $home_links and main_links without repetitions.
        $check = false;
        foreach ($main_links as $main) {
            foreach ($home_links as $home) {
                if ($home['title'] == $main['title']) {
                    $check = true;
                    break;
Esempio n. 5
0
    header('location: ' . AT_BASE_HREF . 'index.php');
    exit;
}
$_top_level_pages = get_main_navigation($current_page);
$_current_top_level_page = get_current_main_page($current_page);
if (empty($_top_level_pages)) {
    if (!$_SESSION['member_id'] && !$_SESSION['course_id']) {
        $_top_level_pages = get_main_navigation($_pages[AT_NAV_PUBLIC][0]);
    } else {
        if ($_SESSION['course_id'] < 0) {
            $_top_level_pages = get_main_navigation($_pages[AT_NAV_ADMIN][0]);
        } else {
            if (!$_SESSION['course_id']) {
                $_top_level_pages = get_main_navigation($_pages[AT_NAV_START][0]);
            } else {
                $_top_level_pages = get_main_navigation($_pages[AT_NAV_COURSE][0]);
            }
        }
    }
}
/****
Toggle to switch between mobile and responsive themes
****/
if ($_GET['mobile'] == '2') {
    global $msg;
    unset($_SESSION['prefs']['PREF_RESPONSIVE']);
    if (isset($_GET['cid'])) {
        $cid = "?cid=" . $_GET['cid'];
    }
    //unset($_COOKIE['responsive']);
    setcookie("responsive", NULL, -1);