Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
placing main menu in all the pages
12-04-2012, 11:23 PM,
#1
placing main menu in all the pages
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
Reply
12-05-2012, 03:25 PM, (This post was last modified: 12-05-2012, 03:35 PM by mythri.)
#2
RE: placing main menu in all the pages
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
Reply
12-05-2012, 08:53 PM,
#3
RE: placing main menu in all the pages
Please find the attached header.inc


Attached Files
.zip   header.zip (Size: 2.05 KB / Downloads: 1)
Reply
12-06-2012, 05:10 PM,
#4
RE: placing main menu in all the pages
Tim,

Hope you have checked header.inc, please suggest me if i need to do any changes
thanks
Reply
12-10-2012, 05:05 PM,
#5
RE: placing main menu in all the pages
Sorry for bothering you again. I tried to do but couldn't make it work. So please help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)