59 lines
2.5 KiB
PHP
Executable File
59 lines
2.5 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
function sOngCont($ongActif) {
|
|
|
|
// tableaux contenant les liens d'accès et le texte à affOngArticher
|
|
$sousOngletsLien = array(
|
|
"./frmAdmin.php?affAdmin=6&optAff=5&typeOfCommercant=1",
|
|
"./frmAdmin.php?affAdmin=6&optAff=5&typeOfCommercant=2",
|
|
"./frmAdmin.php?affAdmin=6&optAff=5&typeOfCommercant=3",
|
|
"./frmAdmin.php?affAdmin=6&optAff=5&typeOfCommercant=4",
|
|
"./frmAdmin.php?affAdmin=6&optAff=5&typeOfCommercant=5"
|
|
);
|
|
|
|
$sousOngletsTexte = array(
|
|
"<span id=\"puceMenu2\" class=\"fad fa-user-circle\" ></span>Raison sociale",
|
|
"<span id=\"puceMenu2\" class=\"fad fa-user-circle\" ></span>Rib",
|
|
"<span id=\"puceMenu2\" class=\"fad fa-user-circle\" ></span>Banque",
|
|
"<span id=\"puceMenu2\" class=\"fad fa-user-circle\" ></span>S.A.V",
|
|
"<span id=\"puceMenu2\" class=\"fad fa-user-circle\" ></span>Commerçant"
|
|
);
|
|
|
|
$sousOngletsTexte2 = array(
|
|
"<span class=\"fad fa-user-circle\" style=\"color:white;\"></span>Raison sociale",
|
|
"<span class=\"fad fa-user-circle\" style=\"color:white;\"></span>Rib",
|
|
"<span class=\"fad fa-user-circle\" style=\"color:white;\"></span>Banque",
|
|
"<span class=\"fad fa-user-circle\" style=\"color:white;\"></span>S.A.V",
|
|
"<span class=\"fad fa-user-circle\" style=\"color:white;\"></span>Commerçant"
|
|
);
|
|
|
|
// onglet actif
|
|
// $test = substr($lien, -1)"./frmAdmin.php?affAdmin=6&typeOfCommercant=" .$ongActif;
|
|
// echo 'test=' .$test;
|
|
|
|
// $ongletsContact= "<div id='sousMenuO' style='height:29px;border:1px solid red;'> ";
|
|
$ongletsContact= "<div id='sousMenuO'> <ul id='sousOnglets' >";
|
|
|
|
// boucle qui parcours les deux tableaux
|
|
foreach($sousOngletsLien as $cle=>$lien) {
|
|
// si le nom du fichier correspond a celui pointe par l'indice, alors on l'active
|
|
$test = substr($lien, -1);
|
|
if ($test == $ongActif) {
|
|
$ongletsContact=$ongletsContact. '<li class="sactive" >';
|
|
$ongletsContact=$ongletsContact. '<a href="' .$lien. '" >' .$sousOngletsTexte2[$cle]. '</a>';
|
|
$ongletsContact=$ongletsContact. '</li>';
|
|
}
|
|
else {
|
|
$ongletsContact=$ongletsContact. '<li >';
|
|
$ongletsContact=$ongletsContact. '<a href="' .$lien. '">' .$sousOngletsTexte[$cle]. '</a>';
|
|
$ongletsContact=$ongletsContact. '</li>';
|
|
}
|
|
}
|
|
$_SESSION['actifOnglet']=$ongActif;
|
|
$ongletsContact.= "</ul>\n</div>";
|
|
// $ongletsContact.= "</div>";
|
|
// on renvoie le code xHTML
|
|
return $ongletsContact;
|
|
}
|
|
$sousOngCont= sOngCont($typeOfCommercant);
|
|
?>
|