adminLinks('assoc'); // $plugs = e107::getNav()->pluginLinks(E_16_PLUGMANAGER, "array"); // $this->links = array_merge($core,$plugs); // $this->links = multiarray_sort($this->links,'title'); //XXX Move this function in e107_class? $this->links = e107::getNav()->adminLinks(); $this->render(); } function render() { $ns = e107::getRender(); $mes = e107::getMessage(); $admin_cat = e107::getNav()->adminCats(); $text = "
"; $text .= ""; // print_a($this->links); $text .= "
"; foreach ($admin_cat['id'] as $id => $cat_id) { $cls = ($id == 1) ? "active" : ""; $text .= "
".$this->renderCat($id)."
"; } $text .= "
"; $text .= "
"; $ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); } function renderCat($cat) { $text = ""; foreach($this->links as $val) { if($val['cat'] != $cat) { // echo "
".$funcinfo['cat']." != ".$cat; continue; } $text .= e107::getNav()->renderAdminButton($val['link'], $val['title'], $val['caption'], $val['perms'], $val['icon_32'], "div"); } return $text; } function render2() { $mes = e107::getMessage(); $admin_cat = e107::getNav()->adminCats(); $text = "
"; $text .= "
"; print_a($admin_cat); foreach ($admin_cat['id'] as $cat_key => $cat_id) { $text_check = FALSE; $text_cat = ""; if ($cat_key != 5) // Note the Plugin category. { foreach ($newarray as $key => $funcinfo) { if ($funcinfo[4] == $cat_key) { $text_rend = e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[6], 'div'); if ($text_rend) { $text_check = TRUE; } $text_cat .= $text_rend; } } } else // Plugin category. { $text_rend = e107::getNav()->pluginLinks(defset('E_32_PLUGMANAGER'), "div"); if ($text_rend) { $text_check = TRUE; } $text_cat .= $text_rend; } //$text_cat .= render_clean(); if ($text_check) { $text .= "
\n"; $text .= "
".$admin_cat['title'][$cat_key]."
"; $text .= $text_cat ; $text .= "
"; } } $text .= "
"; $ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); } }