Change to allow to use theme with no table tags
This commit is contained in:
parent
61a34831e3
commit
8a6716627c
@ -46,7 +46,7 @@ function print_auguria_menu($db,$atarget,$hideifnotallowed)
|
|||||||
$menuArbo = new Menubase($db,'auguria','top');
|
$menuArbo = new Menubase($db,'auguria','top');
|
||||||
$tabMenu = $menuArbo->menuTopCharger($hideifnotallowed,$_SESSION['mainmenu'], 'auguria');
|
$tabMenu = $menuArbo->menuTopCharger($hideifnotallowed,$_SESSION['mainmenu'], 'auguria');
|
||||||
|
|
||||||
print '<table class="tmenu" summary="topmenu"><tr class="tmenu">'."\n";
|
print_start_menu_array();
|
||||||
|
|
||||||
for($i=0; $i<count($tabMenu); $i++)
|
for($i=0; $i<count($tabMenu); $i++)
|
||||||
{
|
{
|
||||||
@ -77,29 +77,71 @@ function print_auguria_menu($db,$atarget,$hideifnotallowed)
|
|||||||
else if (! empty($_SESSION['mainmenu']) && $tabMenu[$i]['mainmenu'] == $_SESSION['mainmenu']) $classname='class="tmenusel"';
|
else if (! empty($_SESSION['mainmenu']) && $tabMenu[$i]['mainmenu'] == $_SESSION['mainmenu']) $classname='class="tmenusel"';
|
||||||
else $classname='class="tmenu"';
|
else $classname='class="tmenu"';
|
||||||
|
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
|
|
||||||
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($tabMenu[$i]['atarget']?" target='".$tabMenu[$i]['atarget']."'":($atarget?" target=$atarget":"")).'>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($tabMenu[$i]['atarget']?" target='".$tabMenu[$i]['atarget']."'":($atarget?" target=$atarget":"")).'>';
|
||||||
print $tabMenu[$i]['titre'];
|
print_text_menu_entry($tabMenu[$i]['titre']);
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
print '</td>'."\n";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$tabMenu[$i]['titre'].'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>'."\n";
|
print_text_menu_entry($tabMenu[$i]['titre']);
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</tr></table>'."\n";
|
print_end_menu_array();
|
||||||
|
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function print_start_menu_array()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (preg_match('/auguria/',$conf->top_menu)) print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
||||||
|
else print '<ul class="tmenu">';
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_start_menu_entry($idsel)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (preg_match('/auguria/',$conf->top_menu)) print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
||||||
|
else print '<li class="tmenu" id="mainmenutd_'.$idsel.'">';
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_text_menu_entry($text)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
print '<span class="mainmenuaspan">';
|
||||||
|
print $text;
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_end_menu_entry()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (preg_match('/auguria/',$conf->top_menu)) print '</td>';
|
||||||
|
else print '</li>';
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_end_menu_array()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (preg_match('/eldy/',$conf->top_menu)) print '</tr></table>';
|
||||||
|
else print '</ul>';
|
||||||
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -42,7 +42,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
|
|
||||||
$id='mainmenu';
|
$id='mainmenu';
|
||||||
|
|
||||||
print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
print_start_menu_array();
|
||||||
|
|
||||||
// Home
|
// Home
|
||||||
$classname="";
|
$classname="";
|
||||||
@ -55,10 +55,12 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
$classname = 'class="tmenu"';
|
$classname = 'class="tmenu"';
|
||||||
}
|
}
|
||||||
$idsel='home';
|
$idsel='home';
|
||||||
print '<td class="tmenu" align="center" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/index.php?mainmenu=home&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("Home").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/index.php?mainmenu=home&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("Home"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
|
|
||||||
|
|
||||||
// Third parties
|
// Third parties
|
||||||
@ -81,19 +83,23 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
if (($conf->societe->enabled && $user->rights->societe->lire)
|
if (($conf->societe->enabled && $user->rights->societe->lire)
|
||||||
|| ($conf->fournisseur->enabled && $user->rights->fournisseur->lire))
|
|| ($conf->fournisseur->enabled && $user->rights->fournisseur->lire))
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" align="center" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/index.php?mainmenu=companies&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("ThirdParties").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/index.php?mainmenu=companies&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("ThirdParties"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$langs->trans("ThirdParties").'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("ThirdParties"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,19 +127,23 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
$idsel='products';
|
$idsel='products';
|
||||||
if ($user->rights->produit->lire || $user->rights->service->lire)
|
if ($user->rights->produit->lire || $user->rights->service->lire)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/product/index.php?mainmenu=products&leftmenu="'.($atarget?" target=$atarget":"").'>'.$chaine.'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/product/index.php?mainmenu=products&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($chaine);
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$chaine.'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>';
|
print_text_menu_entry($chaine);
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,19 +166,23 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
$idsel='commercial';
|
$idsel='commercial';
|
||||||
if($user->rights->societe->lire || $user->rights->societe->contact->lire)
|
if($user->rights->societe->lire || $user->rights->societe->contact->lire)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="'.$id.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="'.$id.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/comm/index.php?mainmenu=commercial&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("Commercial").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/comm/index.php?mainmenu=commercial&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("Commercial"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$langs->trans("Commercial").'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>';
|
print print_text_menu_entry($langs->trans("Commercial"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,19 +207,23 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
if ($user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire
|
if ($user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire
|
||||||
|| $user->rights->facture->lire || $user->rights->banque->lire)
|
|| $user->rights->facture->lire || $user->rights->banque->lire)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/compta/index.php?mainmenu=accountancy&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("MenuFinancial").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/compta/index.php?mainmenu=accountancy&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("MenuFinancial"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$langs->trans("MenuFinancial").'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("MenuFinancial"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,19 +246,23 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
$idsel='project';
|
$idsel='project';
|
||||||
if ($user->rights->projet->lire)
|
if ($user->rights->projet->lire)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/projet/index.php?mainmenu=project&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("Projects").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/projet/index.php?mainmenu=project&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("Projects"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$langs->trans("Projects").'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("Projects"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -263,19 +285,23 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
$idsel='tools';
|
$idsel='tools';
|
||||||
if ($user->rights->mailing->lire || $user->rights->bookmark->lire || $user->rights->export->lire || $user->rights->import->run)
|
if ($user->rights->mailing->lire || $user->rights->bookmark->lire || $user->rights->export->lire || $user->rights->import->run)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/index.php?mainmenu=tools&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("Tools").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/index.php?mainmenu=tools&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("Tools"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$langs->trans("Tools").'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("Tools"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -296,10 +322,12 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$idsel='shop';
|
$idsel='shop';
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/boutique/index.php?mainmenu=shop&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("OSCommerce").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/boutique/index.php?mainmenu=shop&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("OSCommerce"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
|
|
||||||
// OSCommerce WS
|
// OSCommerce WS
|
||||||
@ -318,10 +346,12 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$idsel='shop';
|
$idsel='shop';
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/oscommerce_ws/index.php?mainmenu=shop&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("OSCommerce").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/oscommerce_ws/index.php?mainmenu=shop&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("OSCommerce"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Members
|
// Members
|
||||||
@ -342,19 +372,23 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
$idsel='members';
|
$idsel='members';
|
||||||
if ($user->rights->adherent->lire)
|
if ($user->rights->adherent->lire)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/adherents/index.php?mainmenu=members&leftmenu="'.($atarget?" target=$atarget":"").'>'.$langs->trans("MenuMembers").'</a>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'/adherents/index.php?mainmenu=members&leftmenu="'.($atarget?" target=$atarget":"").'>';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("MenuMembers"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$langs->trans("MenuMembers").'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>';
|
print_text_menu_entry($langs->trans("MenuMembers"));
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -397,27 +431,68 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
|
|||||||
else if (! empty($_SESSION['mainmenu']) && $tabMenu[$i]['mainmenu'] == $_SESSION['mainmenu']) $classname='class="tmenusel"';
|
else if (! empty($_SESSION['mainmenu']) && $tabMenu[$i]['mainmenu'] == $_SESSION['mainmenu']) $classname='class="tmenusel"';
|
||||||
else $classname='class="tmenu"';
|
else $classname='class="tmenu"';
|
||||||
|
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($tabMenu[$i]['atarget']?" target='".$tabMenu[$i]['atarget']."'":($atarget?" target=$atarget":"")).'>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($tabMenu[$i]['atarget']?" target='".$tabMenu[$i]['atarget']."'":($atarget?" target=$atarget":"")).'>';
|
||||||
print $tabMenu[$i]['titre'];
|
print_text_menu_entry($tabMenu[$i]['titre']);
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! $hideifnotallowed)
|
if (! $hideifnotallowed)
|
||||||
{
|
{
|
||||||
print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
print_start_menu_entry($idsel);
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">'.$tabMenu[$i]['titre'].'</a>';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||||
print '</td>';
|
print_text_menu_entry($tabMenu[$i]['titre']);
|
||||||
|
print '</a>';
|
||||||
|
print_end_menu_entry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</tr></table>';
|
print_end_menu_array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function print_start_menu_array()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (preg_match('/eldy/',$conf->top_menu)) print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
||||||
|
else print '<ul class="tmenu">';
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_start_menu_entry($idsel)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (preg_match('/eldy/',$conf->top_menu)) print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
||||||
|
else print '<li class="tmenu" id="mainmenutd_'.$idsel.'">';
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_text_menu_entry($text)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
print '<span class="mainmenuaspan">';
|
||||||
|
print $text;
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_end_menu_entry()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (preg_match('/eldy/',$conf->top_menu)) print '</td>';
|
||||||
|
else print '</li>';
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_end_menu_array()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (preg_match('/eldy/',$conf->top_menu)) print '</tr></table>';
|
||||||
|
else print '</ul>';
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user