$mid = new LayersMenu();
//$mid->setDirroot('./');
////$mid->setLibjsdir('./libjs/');
////$mid->setImgdir('./menuimages/');
//$mid->setImgwww('menuimages/');
////$mid->setIcondir('./menuicons/');
//$mid->setIconwww('menuicons/');
////$mid->setTpldir('./templates/');
//$mid->setHorizontalMenuTpl('layersmenu-horizontal_menu.ihtml');
//$mid->setVerticalMenuTpl('layersmenu-vertical_menu.ihtml');
//$mid->setSubMenuTpl('layersmenu-sub_menu.ihtml');
//$mid->setDownArrowImg('down-arrow.png');
//$mid->setForwardArrowImg('forward-arrow.png');
$mid->setMenuStructureFile('layersmenu-horizontal-1.txt');
$mid->setIconsize(16, 16);
$mid->parseStructureForMenu('hormenu1');
$mid->newHorizontalMenu('hormenu1');
$mid->setMenuStructureFile('layersmenu-vertical-2.txt');
$mid->parseStructureForMenu('vermenu1');
$mid->newVerticalMenu('vermenu1');
$mid->printHeader();
/* alternatively:
$header = $mid->getHeader();
print $header;
*/
?>

</head>
<body>

<?php 
Пример #2
0
//$mid->setDirroot($myDirPath);
////$mid->setLibjsdir($myDirPath . 'libjs/');
////$mid->setImgdir($myDirPath . 'menuimages/');
//$mid->setImgwww($myWwwPath . 'menuimages/');
////$mid->setIcondir($myDirPath . 'menuicons/');
//$mid->setIconwww($myWwwPath . 'menuicons/');
////$mid->setTpldir($myDirPath . 'templates/');
//$mid->setHorizontalMenuTpl('layersmenu-horizontal_menu.ihtml');
//$mid->setSubMenuTpl('layersmenu-sub_menu.ihtml');
////$mid->setHorizontalMenuTpl('layersmenu-horizontal_menu-old.ihtml');
////$mid->setSubMenuTpl('layersmenu-sub_menu-old.ihtml');
//$mid->setDownArrowImg('down-arrow.png');
//$mid->setForwardArrowImg('forward-arrow.png');
$mid->setMenuStructureFile($myDirPath . 'layersmenu-horizontal-1.txt');
$mid->setIconsize(16, 16);
$mid->parseStructureForMenu('menuHorizontal1');
$mid->newHorizontalMenu('menuHorizontal1');
$mid->printHeader();
/* alternatively:
$header = $mid->getHeader();
print $header;
*/
?>

</head>
<body>

<?php 
$mid->printMenu('menuHorizontal1');
/* alternatively:
$hormenu1 = $mid->getMenu('hormenu1');
Пример #3
0
<?php 
include "libjs/layersmenu-browser_detection.js";
?>
// -->
</script>
<script language="JavaScript" type="text/javascript" src="libjs/layersmenu-library.js"></script>
<script language="JavaScript" type="text/javascript" src="libjs/layersmenu.js"></script>
<script language="JavaScript" type="text/javascript" src="libjs/layerstreemenu-cookies.js"></script>

<?php 
include "lib/PHPLIB.php";
include "lib/layersmenu-common.inc.php";
include "lib/layersmenu.inc.php";
$mid = new LayersMenu();
$mid->setMenuStructureFile("layersmenu-horizontal-1.txt");
$mid->parseStructureForMenu("hormenu1");
$mid->setHorizontalMenuTpl("layersmenu-horizontal_menu-full.ihtml");
$mid->newHorizontalMenu("hormenu1");
$menustring = ".|Linus B. Torvalds|http://www.cs.Helsinki.FI/u/torvalds/|The father of Linux||Linus\n" . ".|Linux Kernel Archives|http://www.kernel.org/|Here you can download the Linux kernel sources|www.kernel.org_images_tux16-16.png|kernelorg\n" . ".|Linux Distributions|http://flashnet.linux.tucows.com/distribution.html|Here you can find a list of the major Linux distributions||Linux|1\n" . "..|Debian GNU/Linux|http://www.debian.org/|Enjoy the exciting world of Debian GNU/Linux!|debian-icon-mini.png|Linux|1\n" . "...|About|http://www.debian.org/intro/about|||Linux\n" . "...|News|http://www.debian.org/News/|||Linux\n" . "...|Distribution|http://www.debian.org/distrib/|||Linux\n" . "...|Support|http://www.debian.org/support|||Linux\n" . "...|Development|http://www.debian.org/devel/|||Linux\n" . "...|Search|http://search.debian.org/|||Linux\n" . "...|A Debian Mirror|http://ftp.mirror.ac.uk/sites/ftp.debian.org/|||Linux\n" . "..|Mandrake|http://www.mandrakelinux.com/|Mandrake Linux||Linux\n" . "...|Errata|http://www.mandrakelinux.com/en/errata.php3|||Linux\n" . "...|Download|http://www.mandrakelinux.com/en/ftp.php3|||Linux\n" . "...|Mandrake Expert|http://www.mandrakeexpert.com/index1.php|||Linux\n" . "...|Bugzilla|http://qa.mandrakesoft.com/|||Linux\n" . "..|Slackware|http://www.freesoftware.org/|Slackware Linux||Linux\n";
$mid->setMenuStructureString($menustring);
$mid->parseStructureForMenu("vermenu1");
$mid->setDownArrowImg("down-galaxy.png");
$mid->setForwardArrowImg("forward-galaxy.png");
$mid->setVerticalMenuTpl("layersmenu-vertical_menu-galaxy.ihtml");
$mid->setSubMenuTpl("layersmenu-sub_menu-galaxy.ihtml");
$mid->newVerticalMenu("vermenu1");
$mid->setMenuStructureFile("layersmenu-vertical-2.txt");
$mid->parseStructureForMenu("vermenu2");
$mid->setDownArrowImg("down-gtk2.png");
$mid->setForwardArrowImg("forward-gtk2.png");
$mid->setVerticalMenuTpl("layersmenu-vertical_menu.ihtml");
Пример #4
0
function render_menu()
{
    global $CONF, $CUR_TEMPLATE, $MODULES, $MENU, $point, $PAGE;
    //We use default template
    if (isset($_SESSION[cur_templ])) {
        $template = $_SESSION[cur_templ];
    } else {
        $template = $CONF[default_template];
    }
    //Include PHP Layer Menù for Layers configuration
    require_once $CONF[path_base] . $CONF[dir_framework] . "external_lib/phplm/lib/PHPLIB.php";
    require_once $CONF[path_base] . $CONF[dir_framework] . "external_lib/phplm/lib/layersmenu-common.inc.php";
    require_once $CONF[path_base] . $CONF[dir_framework] . "external_lib/phplm/lib/layersmenu.inc.php";
    $CUR_TEMPLATE[JS][count($CUR_TEMPLATE[JS])] = $CONF[url_base] . $CONF[dir_framework] . "external_lib/phplm/libjs/layersmenu-browser_detection.js";
    $CUR_TEMPLATE[JS][count($CUR_TEMPLATE[JS])] = $CONF[url_base] . $CONF[dir_framework] . "external_lib/phplm/libjs/layersmenu-library.js";
    $CUR_TEMPLATE[JS][count($CUR_TEMPLATE[JS])] = $CONF[url_base] . $CONF[dir_framework] . "external_lib/phplm/libjs/layersmenu.js";
    $myDirParh = $CONF[path_base] . $CONF[dir_framework] . "external_lib/phplm/";
    $myWwwPath = $CONF[url_base] . $CONF[dir_framework] . "external_lib/phplm/";
    $mid = new LayersMenu();
    $mid->setDirroot($myDirParh);
    $mid->setLibjsdir($myDirPath . 'libjs/');
    $mid->setImgdir($myDirPath . 'menuimages/');
    $mid->setImgwww($myWwwPath . 'menuimages/');
    $mid->setIcondir($CONF[path_base] . $CONF[dir_template] . $template . "/images/ico/");
    $mid->setIconwww($CONF[url_base] . $CONF[dir_template] . $template . "/images/ico/");
    $mid->setTpldir($CONF[path_base] . $CONF[dir_template] . $template . "/menu_template/");
    $mid->setHorizontalMenuTpl('layersmenu-horizontal_menu.ihtml');
    $mid->setSubMenuTpl('layersmenu-sub_menu.ihtml');
    $pt = ".";
    $temppt = $pt;
    for ($x = 1; $x < 11; $x++) {
        $point[$x] = $temppt;
        $temppt .= $pt;
    }
    $main_level = explode(",", $CONF[menu_order]);
    $level = 1;
    foreach ($main_level as $v) {
        $string_menu2 = "";
        if (isset($MENU[$v][0][title])) {
            foreach ($MENU[$v][0] as $k => $v2) {
                if (is_int($k)) {
                    $string_menu2 .= render_submenu($level + 1, $v2, $v);
                }
            }
            if (strlen($string_menu2) > 1 || $MENU[$v][0][perm] == 1) {
                $string_menu .= $point[$level] . "|" . $MENU[$v][0][title] . "|" . $MENU[$v][0][page] . "||" . $MENU[$v][0][icon] . "\n" . $string_menu2;
            }
        }
    }
    $mid->setMenuStructureString(".|Home|" . $CONF[url_base] . "main.php||ico_home_peq.gif\n" . $string_menu);
    $mid->setIconsize(16, 16);
    $mid->parseStructureForMenu('hormenu1');
    $mid->newHorizontalMenu('hormenu1');
    $PAGE[MENU_HEADER] = $mid->makeHeader();
    $PAGE[MENU_TAB] = $mid->getMenu("hormenu1");
    $PAGE[MENU_FOOTER] = $mid->makeFooter();
}
Пример #5
0
function myheading($q, $title, $displaymenu = true)
{
    // Generate the correct prefix for URLs in menu.
    $BASE_URL = base_url();
    $BASE_DIR = base_dir();
    $myDirPath = $BASE_DIR . '/menus/';
    $myWwwPath = $BASE_URL . '/menus/';
    // these files should probably not be here
    require_once $myDirPath . 'lib/PHPLIB.php';
    require_once $myDirPath . 'lib/layersmenu-common.inc.php';
    require_once $myDirPath . 'lib/layersmenu.inc.php';
    require_once $BASE_DIR . '/menudefs.php';
    eval("\$ADMIN_MENU = \"{$ADMIN_MENU}\";");
    // create the html page HEAD section
    insert($q, $header = wheader("IPPlan - {$title}"));
    insert($q, $w = container("div", array("class" => "matte")));
    insert($header, generic("meta", array("http-equiv" => "Content-Type", "content" => "text/html; charset=UTF-8")));
    if ($displaymenu) {
        insert($header, generic("link", array("rel" => "stylesheet", "href" => "{$myWwwPath}" . "layersmenu-gtk2.css")));
        //    insert($header, generic("link",array("rel"=>"stylesheet","href"=>"$myWwwPath"."layersmenu-demo.css")));
    }
    // Konqueror and Safari browsers do not support overflow: auto css tag so use custom stylesheet
    if (stristr($_SERVER["HTTP_USER_AGENT"], "konqueror") or stristr($_SERVER["HTTP_USER_AGENT"], "safari")) {
        insert($header, generic("link", array("rel" => "stylesheet", "href" => "{$BASE_URL}" . "/themes/default-safari.css")));
    } else {
        // Added theme support.
        $themecookie = isset($_COOKIE["ipplanTheme"]) ? $_COOKIE["ipplanTheme"] : "";
        global $config_themes;
        // obtained from config.php file which is global
        if (!empty($themecookie) and $config_themes[$themecookie] != "") {
            insert($header, generic("link", array("rel" => "stylesheet", "href" => "{$BASE_URL}" . "/themes/{$config_themes[$themecookie]}")));
        } else {
            insert($header, generic("link", array("rel" => "stylesheet", "href" => "{$BASE_URL}" . "/themes/default.css")));
        }
    }
    if ($displaymenu) {
        insert($w, script("", array("language" => "JavaScript", "type" => "text/javascript", "src" => $myWwwPath . "libjs/layersmenu-browser_detection.js")));
        insert($w, script("", array("language" => "JavaScript", "type" => "text/javascript", "src" => $myWwwPath . 'libjs/layersmenu-library.js')));
        insert($w, script("", array("language" => "JavaScript", "type" => "text/javascript", "src" => $myWwwPath . 'libjs/layersmenu.js')));
        $mid = new LayersMenu(6, 7, 2, 1);
        $mid->setDirroot($BASE_DIR . '/menus/');
        $mid->setLibjsdir($BASE_DIR . '/menus/libjs/');
        $mid->setImgdir($BASE_DIR . '/menus/menuimages/');
        $mid->setImgwww($BASE_URL . '/menus/menuimages/');
        $mid->setIcondir($BASE_DIR . '/menus/menuicons/');
        $mid->setIconwww($BASE_URL . '/menus/menuicons/');
        $mid->setTpldir($BASE_DIR . '/menus/templates/');
        $mid->SetMenuStructureString($ADMIN_MENU);
        $mid->setIconsize(16, 16);
        $mid->parseStructureForMenu('hormenu1');
        $mid->newHorizontalMenu('hormenu1');
    }
    // draw header box
    insert($w, $con = container("div", array("class" => "headerbox", "align" => "center")));
    insert($con, heading(1, my_("IPPlan - IP Address Management and Tracking")));
    insert($con, block("<br>"));
    insert($con, heading(3, $title));
    if ($displaymenu) {
        // draw menu box here
        insert($w, $con = container("div", array("class" => "menubox")));
        insert($con, $t = table(array("cols" => "2", "width" => "100%")));
        insert($t, $c1 = cell());
        insert($t, $c2 = cell(array("align" => "right")));
        insert($c1, block($mid->getHeader()));
        insert($c1, block($mid->getMenu('hormenu1')));
        insert($c1, block($mid->getFooter()));
        // find a place to display logged in user
        insert($c2, $uc = container("div", array("class" => "userbox")));
        if (getAuthUsername() != "") {
            insert($uc, block(sprintf(my_("Logged in as %s"), getAuthUsername())));
        }
    }
    insert($w, $con = container("div", array("class" => "normalbox")));
    insert($w, $con1 = container("div", array("class" => "footerbox")));
    insert($con1, block("IPPlan v4.92b"));
    return $con;
}
Пример #6
0
function montaMenu()
{
    $myDirPath = '../includes/menu/phplm320/';
    $myWwwPath = '../includes/menu/phplm320/';
    ?>
			
			<link rel="stylesheet" href="<?php 
    print $myWwwPath;
    ?>
invmon-layersmenu-demo.css" type="text/css"></link>
			<link rel="stylesheet" href="<?php 
    print $myWwwPath;
    ?>
invmon-layersmenu-gtk2.css" type="text/css"></link>
			<link rel="shortcut icon" href="<?php 
    print $myWwwPath;
    ?>
LOGOS/shortcut_icon_phplm.png"></link>
			<script language="JavaScript" type="text/javascript">
			<!--
			<?php 
    require_once $myDirPath . 'libjs/layersmenu-browser_detection.js';
    ?>
			// -->
			</script>
			<script language="JavaScript" type="text/javascript" src="<?php 
    print $myWwwPath;
    ?>
libjs/layersmenu-library.js"></script>
			<script language="JavaScript" type="text/javascript" src="<?php 
    print $myWwwPath;
    ?>
libjs/layersmenu.js"></script>
			
			<?php 
    require_once $myDirPath . 'lib/PHPLIB.php';
    require_once $myDirPath . 'lib/layersmenu-common.inc.php';
    require_once $myDirPath . 'lib/layersmenu.inc.php';
    $mid = new LayersMenu(6, 7, 2, 1);
    // Gtk2-like
    $menuInvmon = ".|Iniciar|abertura.php|Tela inicial do Sistema\n" . ".|Cadastrar\n" . "..|Equipamento\n" . "..|Documento\n" . "..|Item de estoque\n" . "..|Local\n" . "..|Usuário\n" . ".|Visualizar\n" . "..|Equipamentos\n" . "..|Documentos\n" . "..|Estoque\n" . ".|Consultar\n" . "..|Consulta rápida\n" . "..|Consulta Especial\n" . "..|Histórico\n" . "...|Por Etiqueta\n" . "...|Localização anterior\n" . ".|Estatíticas e Relatórios\n" . ".|Senha\n" . ".|Admin\n" . "..|Componentes\n" . "...|CD-Rom\n" . "...|DVD\n" . "...|Gravador\n" . "...|HD\n" . "...|Placa mãe\n" . "...|Memória\n" . "...|Placa de modem\n" . "...|Processador\n" . "...|Placa de rede\n" . "...|Placa de som\n" . "...|Vídeo\n" . "..|Fabricantes\n" . "..|Fornecedores\n" . "..|Softwares\n" . "..|Configurações\n" . "..|Estoque\n" . ".|Exemplo\n" . "..|Submenu\n" . "...|submenu\n" . "....|Item|link|Title ou Hint|invmon-favicon.ico|Target\n" . "....|---\n" . "....|Item|link|Title ou Hint|invmon-favicon.ico|Target\n";
    /* TO USE ABSOLUTE PATHS: */
    $mid->setDirroot($myDirPath);
    $mid->setLibjsdir($myDirPath . 'libjs/');
    $mid->setImgdir($myDirPath . 'menuimages/');
    $mid->setImgwww($myWwwPath . 'menuimages/');
    $mid->setIcondir($myDirPath . 'menuicons/');
    $mid->setIconwww($myWwwPath . 'menuicons/');
    $mid->setTpldir($myDirPath . 'templates/');
    $mid->setHorizontalMenuTpl('layersmenu-horizontal_menu.ihtml');
    $mid->setSubMenuTpl('layersmenu-sub_menu.ihtml');
    $mid->setDownArrowImg('down-arrow-blue.png');
    $mid->setForwardArrowImg('forward-arrow-blue.png');
    $mid->setMenuStructureString($menuInvmon);
    $mid->setIconsize(16, 16);
    $mid->parseStructureForMenu('menuHorizontal1');
    $mid->newHorizontalMenu('menuHorizontal1');
    $mid->printHeader();
    $mid->printMenu('menuHorizontal1');
    $mid->printFooter();
}