genTotalMenu(); ($_SESSION['lang'] == 'en' ) ? $titre = 'Quebec Franchise :: Entrepreneurship for everyone' : $titre = 'Quebec Franchise :: L\'entrepreneurship pour tous ' ; $guide = new GestionFranchise(); $livre = new GestionLivre(); $menuTop = $guide->genMenuTop(); $langIcon = $lang->genMenuLang(); $menuTop = str_replace("{lang}", $langIcon, $menuTop); ($_SESSION['lang'] == 'en' ) ? $logolink = 'Quebec Franchise :: Return to homepage' : $logolink = 'Quebec Franchise :: Retour à la page d\'accueil ' ; ($_SESSION['lang'] == 'en' ) ? $location = ' Homepage' : $location = ' Page d\'accueil ' ; $currentMag = $guide->currentMag(); $pubLarge = $guide->pubLarge(); // genere la grande publicite $pubSmall = $guide->pubSmall(); // genere les petites publicites $sort = ''; if ( isset($_GET['id']) ) { $id = $_GET['id']; $sNavi = ''; } else if ( isset($_GET['cat']) ) { $sNavi = $livre->genSnaviLivre(''); $collec = $livre->getListeCategorieLivreNom(); $cate = urldecode($_GET['cat']); foreach($collec as $key => $value ){ if ( $value == $cate ) { $sort = $key; break; } } $id = ''; } else { $sNavi = $livre->genSnaviLivre(''); $id = ''; } try { $corps = $livre->listeLivre($id, $sort); $contents = $sNavi.$corps; } catch (Exception $e){ echo $e->getMessage(); } // affichage $coquille = file_get_contents('modeles/default.html',true); $page = str_replace('{title}', $titre,$coquille); $page = str_replace('{content}', $contents,$page); $page = str_replace('{pubLarge}',$pubLarge,$page); $page = str_replace('{logolink}',$logolink,$page); $page = str_replace('{location}',$location,$page); $page = str_replace('{currentMag}',$currentMag,$page); $page = str_replace('{pubSmall}',$pubSmall,$page); $page = str_replace('{menuTop}',$menuTop,$page); $page = str_replace('{navibar}',$navBar,$page); $page = str_replace('{date}',date('Y'),$page); echo $page;