webERP Forum

Full Version: placing main menu in all the pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I have installed WebERP 4.09 into my server and its working properly. But i am doing few modifications for that.

I am trying to put the Main Menu as common, means i have included Main Menu in includes/header.inc file like this,

after echo '<div id="BodyDiv">';
echo '<div id="BodyWrapDiv">';

i have placed

include('includes/session.inc');
include('MainMenuLinksArray.php');
if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */
$_SESSION['Module'] = $_GET['Application'];
}

//=== MainMenuDiv =======================================================================
echo '<div id="MainMenuDiv"><ul>'; //===HJ===
$i=0;
while ($i < count($ModuleLink)){
// This determines if the user has display access to the module see config.php and header.inc
// for the authorisation and security code
if ($_SESSION['ModulesEnabled'][$i]==1) {
// If this is the first time the application is loaded then it is possible that
// SESSION['Module'] is not set if so set it to the first module that is enabled for the user
if (!isset($_SESSION['Module']) OR $_SESSION['Module']==''){
$_SESSION['Module']=$ModuleLink[$i];
}
if ($ModuleLink[$i] == $_SESSION['Module']){
echo '<li class="main_menu_selected">';
} else {
echo '<li class="main_menu_unselected">';

}
echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></li>';
}
$i++;
}
echo '</ul></div>';

Now, in all page main menu is visible but links are not working, when i click on each menu item, it doesn't go to that page, i should click main menu then go to those pages, works.

I have even included
include('MainMenuLinksArray.php');
but no use.

please someone suggest me for solving this issue.... please
thanks in advance
Thanks Tim

I tried replacing but in any page if i click on any menu it goes to index page (index.php) and in index page if i click on menu items it doesn't go any pages. it just stays in the same page.

I had to do it but not getting how.... plz help me Tim.
Sad
Please find the attached header.inc
Tim,

Hope you have checked header.inc, please suggest me if i need to do any changes
thanks
Sorry for bothering you again. I tried to do but couldn't make it work. So please help me