placing main menu in all the pages - Printable Version +- webERP Forum (http://www.weberp.org/forum) +-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1) +--- Forum: Development Discussion & Specification (http://www.weberp.org/forum/forumdisplay.php?fid=10) +--- Thread: placing main menu in all the pages (/showthread.php?tid=444) |
placing main menu in all the pages - mythri - 12-04-2012 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 RE: placing main menu in all the pages - mythri - 12-05-2012 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. RE: placing main menu in all the pages - mythri - 12-05-2012 Please find the attached header.inc RE: placing main menu in all the pages - mythri - 12-06-2012 Tim, Hope you have checked header.inc, please suggest me if i need to do any changes thanks RE: placing main menu in all the pages - mythri - 12-10-2012 Sorry for bothering you again. I tried to do but couldn't make it work. So please help me |