12-04-2012, 11:23 PM
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
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