Esempio n. 1
0
 function getNav()
 {
     include_once 'mms_template_menu.php';
     $menu = new mms_template_menu($this->getNavArray(), 'tree', "REQUEST_URI");
     $menu->std_icon = "pfeilchen_orange.gif";
     $menu->class = "leftnav";
     return $menu->get();
 }
Esempio n. 2
0
{
    function HTML_menu_browser_topnav($DSN = '', $table = '', $query = "")
    {
        $this->HTML_Menu_browser($DSN, $table, $query);
    }
    function makeURL($eintrag)
    {
        $url = $eintrag['url'];
        return $url;
    }
}
$browser = new HTML_menu_browser_topnav($cfg['database']['dsn']);
$browser->setQuery("SELECT * FROM rc_navigation");
$topMenuEntries = $browser->getMenu();
//  print_r($topMenuEntries);
$topMenu = new mms_template_menu($topMenuEntries, 'rows', "REQUEST_URI");
/**
  Replaces an URI with the HTML-Clickable equivalent
  @param    string  str The string to be parsed an replaced
  @return   string  str The tag-added string
  @see      make_link
*/
function replace_uri($str)
{
    $pattern = '#(^|[^\\"=]{1})(http://|ftp://|mailto:|news:)([^\\s<>]+)([\\s\\n<>]|$)#sm';
    return preg_replace($pattern, "\\1<a href=\"\\2\\3\">\\3</a>\\4", $str);
}
// end func replace_uri
/**
  Checks if the URI to translate is prefixed with an internet protocol
  if not, the protocol is added. Calls then replace_uri.