</div>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" valign="top">
<div class="normalbox">
<div class="normal">
JavaScript Tree Menu
</div>
<?php 
require_once 'phplm320/lib/PHPLIB.php';
require_once 'phplm320/lib/layersmenu-common.inc.php';
require_once 'phplm320/lib/treemenu.inc.php';
$mid = new TreeMenu();
//$mid->setDirroot('./');
$mid->setLibjsdir('./phplm320/libjs/');
$mid->setImgdir('./phplm320/menuimages/');
$mid->setImgwww('phplm320/menuimages/');
$mid->setIcondir('./phplm320/menuicons/');
$mid->setIconwww('phplm320/menuicons/');
$mid->setMenuStructureFile('phplm320/layersmenu-vertical-1.txt');
$mid->setIconsize(16, 16);
$mid->parseStructureForMenu('treemenu1');
//$mid->setSelectedItemByCount('treemenu1', 7);
$mid->setSelectedItemByUrl('treemenu1', basename(__FILE__));
print $mid->newTreeMenu('treemenu1');
/* alternatively:
$mid->newTreeMenu('treemenu1');
$mid->printTreeMenu('treemenu1');
*/
/* alternatively:
Ejemplo n.º 2
0
            $menustring = $menustring . "..|" . htmlspecialchars(inet_ntoa($arearow["areaaddr"]) . " (" . $arearow["descrip"] . ")") . "|displaybase.php?cust=" . $custrow["customer"] . "&areaindex=" . $arearow["areaindex"] . "||||\n";
            $rangeresult = $ds->GetRangeInArea($custrow["customer"], $arearow["areaindex"]);
            //range
            while ($rangerow = $rangeresult->Fetchrow()) {
                $menustring = $menustring . "...|" . htmlspecialchars(inet_ntoa($rangerow["rangeaddr"]) . " (" . $rangerow["descrip"] . ")") . "|displaybase.php?cust=" . $custrow["customer"] . "&areaindex=" . $arearow["areaindex"] . "&rangeindex=" . $rangerow["rangeindex"] . "&descrip=&sortby=Base+Address" . "||||\n";
                $baseresult = $ds->GetBase($rangerow["rangeaddr"], $rangerow["rangeaddr"] + $rangerow["rangesize"] - 1, "", $custrow["customer"]);
                //subnet (base)
                while ($baserow = $baseresult->Fetchrow()) {
                    $menustring = $menustring . "....|" . htmlspecialchars(inet_ntoa($baserow["baseaddr"]) . " /" . inet_bits($baserow["subnetsize"]) . " (" . $baserow["descrip"] . ")") . "|displaysubnet.php?baseindex=" . $baserow["baseindex"] . "||||\n";
                }
            }
        }
    }
    $mid = new TreeMenu();
    $mid->setDirroot('../menus');
    $mid->setLibjsdir('../menus/libjs/');
    $mid->setImgdir('../menus/menuimages/');
    $mid->setImgwww('../menus/menuimages/');
    $mid->setIcondir('../menus/menuicons/');
    $mid->setIconwww('../menus/menuicons/');
    if (!$menustring) {
        myError($w, $p, my_("No customers"));
    }
    $mid->setMenuStructureString($menustring);
    $mid->setIconsize(16, 16);
    $mid->parseStructureForMenu('treemenu1');
    $mid->newTreeMenu('treemenu1');
    insert($leftmenu, block('<br><br>'));
    insert($leftmenu, block($mid->getTreeMenu('treemenu1')));
    insert($leftmenu, block('<br><br>'));
}
Ejemplo n.º 3
0
                    $back .= mktree($k['categId'], ".{$indent}", "");
                }
                return $back;
            } else {
                return "";
            }
        }
    }
    $itall = mktree(0, ".", "");
    include_once "lib/phplayers/lib/PHPLIB.php";
    include_once "lib/phplayers_tiki/lib/layersmenu-common.inc.php";
    // include Tiki's modified version of that file to keep original intact (luci)
    include_once "lib/phplayers/lib/treemenu.inc.php";
    $phplayers = new TreeMenu();
    $phplayers->setDirrootCommon("lib/phplayers");
    $phplayers->setLibjsdir("lib/phplayers/libjs/");
    $phplayers->setImgdir("lib/phplayers/images/");
    $phplayers->setImgwww("lib/phplayers/images/");
    $phplayers->setTpldirCommon("lib/phplayers/templates/");
    if ($itall) {
        $phplayers->setMenuStructureString($itall);
    }
    $phplayers->parseStructureForMenu("treemenu1");
    $phpitall = $phplayers->newTreeMenu("treemenu1");
    $smarty->assign('tree', $phpitall);
} else {
    $tree_nodes = array();
    foreach ($ctall as $c) {
        $tree_nodes[] = array("id" => $c["categId"], "parent" => $c["parentId"], "data" => '<a class="catname" href="tiki-browse_categories.php?parentId=' . $c["categId"] . '&amp;deep=' . $deep . '&amp;type=' . urlencode($type) . '">' . $c["name"] . '</a><br />');
    }
    $tm = new CatBrowseTreeMaker("categ");
Ejemplo n.º 4
0
		@import url('includes/menu/phplm320/layerstreemenu-hidden.css');
	//-->
	</style>
	<script language='JavaScript' type='text/javascript'>
	<?php 
require_once $phplmDirPath . 'libjs/layersmenu-browser_detection.js';
?>
	</script>
	<script language='JavaScript' type='text/javascript' src='includes/menu/phplm320/libjs/layerstreemenu-cookies.js'></script>
	<?php 
require_once $phplmDirPath . 'lib/PHPLIB.php';
require_once $phplmDirPath . 'lib/layersmenu-common.inc.php';
require_once $phplmDirPath . 'lib/treemenu.inc.php';
$mid = new TreeMenu();
//$mid->setDirroot($myDirPath);
$mid->setLibjsdir($phplmDirPath . 'libjs/');
$mid->setImgdir($phplmDirPath . 'menuimages/');
$mid->setImgwww($phplmDirPath . 'menuimages/');
$mid->setIcondir($phplmDirPath . 'menuicons/');
$mid->setIconwww($phplmDirPath . 'menuicons/');
$menuInvmon = ".|" . TRANS('MNL_INICIO') . "|" . $invDirPath . "abertura.php|" . TRANS('MNL_INICIO_HNT') . "|" . $iconsPath . "gohome.png|centro\n.|" . TRANS('MNL_CAD') . "\n..|" . TRANS('MNL_CAD_EQUIP') . "|" . $invDirPath . "incluir_computador.php||" . $iconsPath . "computador.png|centro\n..|" . TRANS('MNL_CAD_DOC') . "|" . $invDirPath . "documentos.php?action=incluir&cellStyle=true||" . $iconsPath . "contents.png|centro\n..|" . TRANS('MNL_CAD_ESTOQUE') . "|" . $invDirPath . "estoque.php?action=incluir&cellStyle=true||" . $iconsPath . "mouse.png|centro\n.|" . TRANS('MNL_VIS') . "\n..|" . TRANS('MNL_VIS_EQUIP') . "|" . $invDirPath . "mostra_consulta_comp.php||" . $iconsPath . "computador.png|centro\n..|" . TRANS('MNL_VIS_DOC') . "|" . $invDirPath . "documentos.php||" . $iconsPath . "contents.png|centro\n..|" . TRANS('MNL_VIS_ESTOQUE') . "|" . $invDirPath . "estoque.php||" . $iconsPath . "mouse.png|centro\n.|" . TRANS('MNL_CON') . "\n..|" . TRANS('MNL_CON_RAP') . "|" . $invDirPath . "consulta_inv.php||" . $iconsPath . "search.png|centro\n..|" . TRANS('MNL_CON_ESP') . "|" . $invDirPath . "consulta_comp.php||" . $iconsPath . "consulta.png|centro\n..|" . TRANS('MNL_VIS_ESTOQUE') . "|" . $invDirPath . "estoque.php?action=search&cellStyle=true||" . $iconsPath . "mouse.png|centro\n..|" . TRANS('MNL_CON_HIST') . "|\n...|" . TRANS('MNL_CON_HIST_TAG') . "|" . $invDirPath . "consulta_hist_inv.php?from_menu=1||" . $iconsPath . "tag.png|centro\n...|" . TRANS('MNL_CON_HIST_LOCAL') . "|" . $invDirPath . "consulta_hist_local.php|||centro\n.|" . TRANS('MNL_STAT_RELAT') . "|" . $invDirPath . "relatorios.php||" . $iconsPath . "reports.png|centro";
//.|".TRANS('MNL_SENHA']."|".$invDirPath."altera_senha.php||".$iconsPath."password.png|centro";
$mid->setMenuStructureString($menuInvmon);
$mid->setIconsize(16, 16);
$mid->parseStructureForMenu('treemenu1');
//$mid->setTpldir('../../includes/menu/phplm320/templates/');
//$mid->setSelectedItemByUrl('treemenu1', basename(__FILE__));
$menuOcomon = ".|" . TRANS('MNL_INICIO') . "|" . $ocoDirPath . "abertura.php|" . TRANS('MNL_INICIO_HNT') . "|" . $iconsPath . "gohome.png|centro\n.|" . TRANS('MNL_ABRIR') . "|" . $ocoDirPath . "incluir.php||" . $iconsPath . "fone.png|centro\n.|" . TRANS('MNL_CONSULTAR') . "|" . $ocoDirPath . "consultar.php||" . $iconsPath . "consulta.png|centro\n.|" . TRANS('MNL_BUSCA_RAP') . "|" . $ocoDirPath . "alterar.php||" . $iconsPath . "search.png|centro\n.|" . TRANS('MNL_SOLUCOES') . "|" . $ocoDirPath . "consulta_solucoes.php||" . $iconsPath . "solucoes2.png|centro\n.|" . TRANS('MNL_EMPRESTIMOS') . "|" . $ocoDirPath . "emprestimos.php||" . $iconsPath . "emprestimos.png|centro\n.|" . TRANS('MNL_MURAL') . "|" . $ocoDirPath . "avisos.php||" . $iconsPath . "mural.png|centro\n.|" . TRANS('MNL_RELATORIOS') . "|" . $ocoDirPath . "relatorios.php|||centro\n..|SLAs|" . $ocoDirPath . "relatorio_slas_2.php||" . $iconsPath . "sla.png|centro";
//.|".TRANS('MNL_SENHA']."|".$invDirPath."altera_senha.php||".$iconsPath."password.png|centro
$mid->setMenuStructureString($menuOcomon);
$mid->parseStructureForMenu('treemenu2');