getTokenByUrl($url); $content = $pages->selectByTokenMenu($token_menu); preg_match("/^(include):(.*)$/", strip_tags($content->texte), $matches); if ($matches) { switch ($matches[2]) { case "faq": $datas['faqs'] = $faqs->selectAllActives(); break; case "coffrets": $datas['products'] = $produits->selectAllActivesForCategory("coffret"); break; case "permis": $datas['products'] = $produits->selectAllActivesForCategory("permis"); break; } $include = "section.".$matches[2].".html"; $view->assign('include',$include); } $template = !empty($content->template)?$content->template:'interne'; $view->setKarmaView($template); $encarts_internes = $encarts->getEncarts($template); $view->assign('encarts',$encarts_internes); if (!empty($content)) { $view->assign('content',$content); } else { /* CONTENU NON TROUVÉ */ header("Location:/index.html"); exit(); } $view->showView(); } else { exit('PAGE NON TROUVEE'); } ?>