Example #1
0
function menuusuario(){
    $fmenu = null;
    $menu = new xpMenu();
    $fmenu .= $menu->javaScript();
    $fmenu .= $menu->style();
    
    $menu->addMenu('menuusuario');
    $menu->addCategory('reporte', 'Seguimientos', 'imagenes/menu/network.gif', 'menuusuario');
    $menu->addOption('orden', 'Orden', 'imagenes/menu/si.gif', 'orden.php', 'reporte', 'menuusuario');
    $menu->addOption('seguimiento', 'Seguimiento', 'imagenes/menu/si.gif', 'seguimiento.php', 'reporte', 'menuusuario');

    $menu->addOption('salir', 'Salir', 'imagenes/menu/logout.gif', 'ingreso.php', 'reporte', 'menuusuario');
    $fmenu .= $menu->mountMenu('menuusuario');
    return $fmenu;
}
Example #2
0
	$xpmenu->addOption("maps1", "Google Maps on Menu 2", "icons/wmail.gif", "http://maps.google.com", "menu2sup1", "menu2");
	$xpmenu->addOption("labs1", "Google Labs on Menu 2", "icons/news.gif", "http://labs.google.com", "menu2sup1", "menu2");

$xpmenu->addCategory("menu2sup2", "My Links on Menu 2", "icons/wmail.gif", "menu2");
	$xpmenu->addOption("inter1", "Internacional on Menu 2", "icons/wmail.gif", "http://www.internacional.com.br", "menu2sup2", "menu2");
	$xpmenu->addOption("theblog1", "TheBlog.br on Menu 2", "icons/news.gif", "http://the.blog.br", "menu2sup2", "menu2");
	$xpmenu->addOption("portalsi1", "PortalSI.info on Menu 2", "icons/si.gif", "http://www.portalsi.info", "menu2sup2", "menu2");	

?>

<html>
<head>

<?
//javascript for the menu
echo $xpmenu->javaScript();
//css for menu
echo $xpmenu->style();
?>

</head>
<body bgcolor='#FFFFFF' marginheight='0' marginwidth='0' topmargin='0' leftmargin='0'>
<table border='1' cellpadding='0' cellspacing='0' width='100%' height='100%'><tr><td valign='top'>
	<table border='0' cellspacing='1' cellpadding='0' width='100%' height='100%' bgcolor='#f1f1ed'>
		<tr>
			<td valign='top' width=50%>
			<?
				//show menu (put this where you want to show the XP Menu)
				echo $xpmenu->mountMenu("menu1");
			?>
  			</td>
Example #3
0
 function menu_header($title, $no_menu, $is_index)
 {
     global $path_to_root, $help_base_url, $power_by, $version, $db_connections, $installed_extensions;
     if (!$no_menu) {
         echo "<script type='text/javascript' src='{$path_to_root}/themes/dashboard/js/jquery-1.3.2.js'></script>\n";
         echo "<script type='text/javascript' src='{$path_to_root}/themes/dashboard/js/jquery-ui-1.7.2.custom.min.js'></script>\n";
         echo "<script type='text/javascript' src='{$path_to_root}/themes/dashboard/js/jquery.json-2.2.min.js'></script>\n";
         echo "<script type='text/javascript' src='{$path_to_root}/themes/dashboard/js/dashboard.js'></script>\n";
         echo "<script type='text/javascript' src='https://www.google.com/jsapi'></script>\n";
     }
     $sel_app = $_SESSION['sel_app'];
     echo "<div class='fa-main'>\n";
     if (!$no_menu) {
         $applications = $_SESSION['App']->applications;
         $local_path_to_root = $path_to_root;
         $img = "<img src='{$local_path_to_root}/themes/exclusive_db/images/login.gif' width='14' height='14' border='0' alt='" . _('Logout') . "'>&nbsp;&nbsp;";
         $himg = "<img src='{$local_path_to_root}/themes/exclusive_db/images/help.gif' width='14' height='14' border='0' alt='" . _('Help') . "'>&nbsp;&nbsp;";
         echo "<div id='header'>\n";
         echo "<ul>\n";
         echo "  <li><a href='{$path_to_root}/admin/display_prefs.php?'>" . _("Preferences") . "</a></li>\n";
         echo "  <li><a href='{$path_to_root}/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>" . _("Change password") . "</a></li>\n";
         if ($help_base_url != null) {
             echo "  <li><a target = '_blank' onclick=" . '"' . "javascript:openWindow(this.href,this.target); return false;" . '" ' . "href='" . help_url() . "'>{$himg}" . _("Help") . "</a></li>";
         }
         echo "  <li><a href='{$path_to_root}/access/logout.php?'>{$img}" . _("Logout") . "</a></li>";
         echo "</ul>\n";
         $indicator = "{$path_to_root}/themes/" . user_theme() . "/images/ajax-loader.gif";
         echo "<h1>{$power_by} {$version}<span style='padding-left:300px;'><img id='ajaxmark' src='{$indicator}' align='center' style='visibility:hidden;'></span></h1>\n";
         echo "</div>\n";
         // header
         echo "<div class='fa-menu'>";
         echo "<ul>\n";
         foreach ($applications as $app) {
             if ($sel_app == $app->id) {
                 $sel_application = $app;
             }
             $acc = access_string($app->name);
             echo "<li " . ($sel_app == $app->id ? "class='active' " : "") . "><a href='{$local_path_to_root}/index.php?application=" . $app->id . "'{$acc['1']}><b>" . $acc[0] . "</b></a></li>\n";
         }
         echo "</ul>\n";
         echo "</div>\n";
         // menu
         echo "<div class='clear'></div>\n";
     }
     echo "<div class='fa-body'>\n";
     if (!$no_menu) {
         add_access_extensions();
         echo "<div class='fa-side'>\n";
         echo "<div class='fa-submenu'>\n";
         $app = $sel_application;
         $xpmenu = new xpMenu();
         $xpmenu->addMenu($sel_app);
         $acc = access_string($app->name);
         $imgs = array('orders' => 'invoice.gif', 'AP' => 'receive.gif', 'stock' => 'basket.png', 'manuf' => 'cog.png', 'proj' => 'time.png', 'GL' => 'gl.png', 'system' => 'controller.png');
         if (!isset($imgs[$app->id])) {
             $imgs[$app->id] = "controller.png";
         }
         $xpmenu->addCategory($app->id, $acc[0], "{$local_path_to_root}/themes/exclusive_db/images/" . $imgs[$app->id], $app->id);
         $i = $j = 0;
         if ($sel_app == "system") {
             $imgs2 = array("page_edit.png", "page_edit.png", "page_edit.png", "page_edit.png", "folder.gif");
         } else {
             $imgs2 = array("folder.gif", "report.png", "page_edit.png", "money.png", "folder.gif");
         }
         foreach ($app->modules as $module) {
             $xpmenu->addOption($i++, $module->name, "{$local_path_to_root}/themes/exclusive_db/images/transparent.gif", "", $app->id, $sel_app);
             $apps = array();
             foreach ($module->lappfunctions as $appfunction) {
                 $apps[] = $appfunction;
             }
             foreach ($module->rappfunctions as $appfunction) {
                 $apps[] = $appfunction;
             }
             $application = array();
             foreach ($apps as $application) {
                 $lnk = access_string($application->label);
                 if ($_SESSION["wa_current_user"]->can_access_page($application->access)) {
                     if ($application->label != "") {
                         $xpmenu->addOption($i++, $lnk[0], "{$local_path_to_root}/themes/exclusive_db/images/" . $imgs2[$j], "{$path_to_root}/{$application->link}", $app->id, $sel_app);
                     }
                 } else {
                     $xpmenu->addOption($i++, $lnk[0], "{$local_path_to_root}/themes/exclusive_db/images/" . $imgs2[$j], "#", $app->id, $sel_app);
                 }
             }
             $j++;
         }
         $txt = $xpmenu->javaScript();
         $txt .= $xpmenu->javaScript();
         $txt .= $xpmenu->style();
         $txt .= $xpmenu->mountMenu($sel_app, $sel_app);
         echo $txt;
         echo "</div>\n";
         // submenu
         echo "<div class='clear'></div>\n";
         echo "</div>\n";
         // fa-side
         echo "<div class='fa-content'>\n";
     }
     if ($no_menu) {
         echo "<br>";
     } elseif ($title && !$no_menu && !$is_index) {
         echo "<center><table id='title'><tr><td width='100%' class='titletext'>{$title}</td>" . "<td align=right>" . (user_hints() ? "<span id='hints'></span>" : '') . "</td>" . "</tr></table></center>";
     }
 }