@@ -57,16 +57,16 @@ |
||
| 57 | 57 | if ((isset($_GET['page'])) && ($_GET['page'] != "")) { |
| 58 | 58 | $page = $_GET['page']; |
| 59 | 59 | |
| 60 | - $find = 'controller/'; |
|
| 60 | + $find = 'controller/'; |
|
| 61 | 61 | $pos = strpos($page, $find); |
| 62 | 62 | |
| 63 | 63 | if ($pos !== false) { |
| 64 | 64 | //recherche savoir si le fichier appele fait parti du core du systeme pour construire le lien |
| 65 | - $find_core = 'controller/core/'; |
|
| 65 | + $find_core = 'controller/core/'; |
|
| 66 | 66 | $core = strpos($page, $find_core); |
| 67 | 67 | |
| 68 | 68 | //recherche savoir si le fichier appele est un module du systeme pour construire le lien |
| 69 | - $find_module = 'controller/modules/'; |
|
| 69 | + $find_module = 'controller/modules/'; |
|
| 70 | 70 | $module = strpos($page, $find_module); |
| 71 | 71 | |
| 72 | 72 | $explode = explode("/", $page, 2); |
@@ -38,8 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $contenu->getContenuPage(); |
| 40 | 40 | $contenu_page = $contenu->getContenu(); |
| 41 | - } |
|
| 42 | - else { |
|
| 41 | + } else { |
|
| 43 | 42 | $contenu->getHeadPage(1); |
| 44 | 43 | $titre_page = $contenu->getBaliseTitle(); |
| 45 | 44 | $description_page = $contenu->getMetaDescription(); |
@@ -75,17 +74,14 @@ discard block |
||
| 75 | 74 | //si c'est un controleur de base on va cerhcer dans core/admin |
| 76 | 75 | if ($core !== false) { |
| 77 | 76 | require_once(ROOT.$lien.".php"); |
| 78 | - } |
|
| 79 | - else if ($module !== false) { |
|
| 77 | + } else if ($module !== false) { |
|
| 80 | 78 | $explode = explode("/", $lien, 3); |
| 81 | 79 | |
| 82 | 80 | require_once(ROOT.$explode[0]."/".$explode[1]."/app/controller/".$explode[2].".php"); |
| 83 | - } |
|
| 84 | - else { |
|
| 81 | + } else { |
|
| 85 | 82 | require_once("app/controller/".$lien.".php"); |
| 86 | 83 | } |
| 87 | - } |
|
| 88 | - else { |
|
| 84 | + } else { |
|
| 89 | 85 | $cache = new \core\Cache($page); |
| 90 | 86 | |
| 91 | 87 | $router_module = new RouterModule(); |
@@ -95,8 +91,7 @@ discard block |
||
| 95 | 91 | if ($router_module->getController() != "") { |
| 96 | 92 | require_once(MODULEROOT.$router_module->getController()); |
| 97 | 93 | } |
| 98 | - } |
|
| 99 | - else { |
|
| 94 | + } else { |
|
| 100 | 95 | $explode = explode("/", $page); |
| 101 | 96 | $page = "app/views/".end($explode); |
| 102 | 97 | |
@@ -111,8 +106,7 @@ discard block |
||
| 111 | 106 | } |
| 112 | 107 | $cache->setEnd(); |
| 113 | 108 | } |
| 114 | - } |
|
| 115 | - else { |
|
| 109 | + } else { |
|
| 116 | 110 | $page = "app/views/index"; |
| 117 | 111 | require("app/controller/initialise_all.php"); |
| 118 | 112 | require("app/views/template/principal.php"); |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | include_once(ROOT.'libs/ckeditor/ckeditor.php'); |
| 3 | 3 | require_once(ROOT.'libs/ckfinder/ckfinder.php'); |
| 4 | 4 | $ckeditor = new CKEditor(); |
| 5 | - $ckeditor->basePath = WEBROOT.'libs/ckeditor/'; |
|
| 6 | - CKFinder::SetupCKEditor( $ckeditor, WEBROOT.'libs/ckfinder/' ); |
|
| 5 | + $ckeditor->basePath = WEBROOT.'libs/ckeditor/'; |
|
| 6 | + CKFinder::SetupCKEditor($ckeditor, WEBROOT.'libs/ckfinder/'); |
|
| 7 | 7 | ?> |
| 8 | 8 | \ No newline at end of file |
@@ -47,8 +47,7 @@ discard block |
||
| 47 | 47 | //$id_liste_droit_acces = $_SESSION['id_liste_droit_acces']; |
| 48 | 48 | |
| 49 | 49 | unset($_SESSION['err_ajout_utilisateur']); |
| 50 | - } |
|
| 51 | - else { |
|
| 50 | + } else { |
|
| 52 | 51 | $nom = null; |
| 53 | 52 | $prenom = null; |
| 54 | 53 | $pseudo = null; |
@@ -75,8 +74,7 @@ discard block |
||
| 75 | 74 | $contenu_page = $_SESSION['contenu']; |
| 76 | 75 | |
| 77 | 76 | unset($_SESSION['err_modification_contenu']); |
| 78 | - } |
|
| 79 | - else if ($page == "gestion-contenus/modifier-contenu") { |
|
| 77 | + } else if ($page == "gestion-contenus/modifier-contenu") { |
|
| 80 | 78 | $id_page_courante = $_GET['id']; |
| 81 | 79 | |
| 82 | 80 | $contenu->getHeadPage($id_page_courante); |
@@ -89,8 +87,7 @@ discard block |
||
| 89 | 87 | $parent_courant = $contenu->getParent(); |
| 90 | 88 | $texte_parent_courant = $gestion_contenu->getParentTexte($parent_courant); |
| 91 | 89 | $contenu_page = $contenu->getContenu(); |
| 92 | - } |
|
| 93 | - else { |
|
| 90 | + } else { |
|
| 94 | 91 | $balise_title = null; |
| 95 | 92 | $url = null; |
| 96 | 93 | $meta_description = null; |
@@ -131,8 +128,7 @@ discard block |
||
| 131 | 128 | $contenu_dynamique = $config->getContenusDynamique(); |
| 132 | 129 | $responsive = $config->getResponsive(); |
| 133 | 130 | $cache_config = $config->getCache(); |
| 134 | - } |
|
| 135 | - else { |
|
| 131 | + } else { |
|
| 136 | 132 | $config = new \core\Configuration(); |
| 137 | 133 | $nom_site = $config->getNomSite(); |
| 138 | 134 | $url_site = $config->getUrlSite(); |
@@ -156,8 +152,7 @@ discard block |
||
| 156 | 152 | |
| 157 | 153 | if (isset($_SESSION['err_modification_configini'])) { |
| 158 | 154 | |
| 159 | - } |
|
| 160 | - else { |
|
| 155 | + } else { |
|
| 161 | 156 | $developpement = $ini["developpment"]; |
| 162 | 157 | |
| 163 | 158 | $db_type_dev = $ini["dev"]["DB_TYPE"]; |
@@ -1,19 +1,19 @@ |
||
| 1 | 1 | <nav class="nav-page"> |
| 2 | 2 | <div class="inner"> |
| 3 | 3 | <ul> |
| 4 | - <?php for ($i=0 ; $i<count($id_page) ; $i++): ?> |
|
| 4 | + <?php for ($i = 0; $i < count($id_page); $i++): ?> |
|
| 5 | 5 | <?php if ($parent[$i] == 0): ?> |
| 6 | 6 | <li><a href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$id_page[$i]?>"><?=$titre[$i]?></a> |
| 7 | 7 | <ul> |
| 8 | - <?php for ($j=0 ; $j<count($id_page) ; $j++): ?> |
|
| 8 | + <?php for ($j = 0; $j < count($id_page); $j++): ?> |
|
| 9 | 9 | <?php if ($parent[$j] == $id_page[$i]): ?> |
| 10 | 10 | <li><a href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$id_page[$j]?>"><?=$titre[$j]?></a></li> |
| 11 | - <?php endif;?> |
|
| 12 | - <?php endfor;?> |
|
| 11 | + <?php endif; ?> |
|
| 12 | + <?php endfor; ?> |
|
| 13 | 13 | </ul> |
| 14 | 14 | </li> |
| 15 | - <?php endif;?> |
|
| 16 | - <?php endfor;?> |
|
| 15 | + <?php endif; ?> |
|
| 16 | + <?php endfor; ?> |
|
| 17 | 17 | </ul> |
| 18 | 18 | </div> |
| 19 | 19 | </nav> |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | <h1>Gestion des contenus</h1> |
| 4 | 4 | </div> |
| 5 | 5 | </header> |
| 6 | -<?php include("header.php");?> |
|
| 6 | +<?php include("header.php"); ?> |
|
| 7 | 7 | |
| 8 | 8 | <?php if ($droit_acces->getDroitAccesContenu("CREATION PAGE", "gestion-contenus/creer-une-page")):?> |
| 9 | 9 | <a class="submit-contenu" href="<?=ADMWEBROOT?>gestion-contenus/creer-une-page"><i class="fa fa-newspaper-o"></i>Créer une page</a> |
| 10 | -<?php endif;?> |
|
| 11 | 10 | \ No newline at end of file |
| 11 | +<?php endif; ?> |
|
| 12 | 12 | \ No newline at end of file |
@@ -4,18 +4,18 @@ discard block |
||
| 4 | 4 | <h2>Modification de la page <?=$titre_courant?></h2> |
| 5 | 5 | </div> |
| 6 | 6 | </header> |
| 7 | -<?php include("header.php");?> |
|
| 8 | -<?php require_once("admin/controller/ckeditor.php");?> |
|
| 7 | +<?php include("header.php"); ?> |
|
| 8 | +<?php require_once("admin/controller/ckeditor.php"); ?> |
|
| 9 | 9 | <?php $droit_acces->getDroitAccesContenu("GESTION CONTENU PAGE", $_GET['id']); ?> |
| 10 | 10 | |
| 11 | 11 | <form action="<?=ADMWEBROOT?>controller/core/admin/contenus/modifier_contenus" method="post"> |
| 12 | 12 | <?php if (($droit_acces->getModifSeo() == 1) || ($droit_acces->getModifNavigation() == 1) || ($droit_acces->getModifContenu() == 1)):?> |
| 13 | 13 | <button type="submit" class="submit-contenu" type="submit"><i class="fa fa-check"></i>Valider</button> |
| 14 | - <?php endif;?> |
|
| 14 | + <?php endif; ?> |
|
| 15 | 15 | <input type="hidden" name="id_page" value="<?=$id_page_courante?>"> |
| 16 | 16 | <?php if (($_GET['id'] != 1) && ($droit_acces->getSupprimerPage() == 1)):?> |
| 17 | 17 | <button id="supprimer-page-contenu" type="button" class="submit-contenu supprimer-page" href="<?=ADMWEBROOT?>controller/core/admin/contenus/supprimer_page?id=<?=$id_page_courante?>"><i class="fa fa-times"></i>Supprimer cette page</button> |
| 18 | - <?php endif;?> |
|
| 18 | + <?php endif; ?> |
|
| 19 | 19 | |
| 20 | 20 | <div class="inner"> |
| 21 | 21 | <?php if (($droit_acces->getModifSeo() == 0) && ($droit_acces->getModifNavigation() == 0) && ($droit_acces->getModifContenu() == 0)):?> |
@@ -24,11 +24,11 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | <?php if ($droit_acces->getSupprimerPage() == 1):?> |
| 26 | 26 | <h3>Vous pouvez uniquement supprimer cette page</h3> |
| 27 | - <?php endif;?> |
|
| 27 | + <?php endif; ?> |
|
| 28 | 28 | |
| 29 | 29 | <p>Si vous voulez pouvoir modifier cette page, contactez votre gérant.</p> |
| 30 | 30 | </section> |
| 31 | - <?php endif;?> |
|
| 31 | + <?php endif; ?> |
|
| 32 | 32 | |
| 33 | 33 | <?php if ($droit_acces->getModifSeo() == 1):?> |
| 34 | 34 | <section class="contenu modifier-contenu"> |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | <div class="colonne"> |
| 43 | 43 | <div class="bloc"> |
| 44 | 44 | <label class="label" for="url" data-error="L'url doit être comprise entre 3 et 92 caractères">Url affichée dans le navigateur</label> |
| 45 | - <input type="text" name="url" type-val="string" min="3" max="92" value="<?=$url?>" <?php if($id_page_courante==1): ?>disabled<?php endif;?>/> |
|
| 45 | + <input type="text" name="url" type-val="string" min="3" max="92" value="<?=$url?>" <?php if ($id_page_courante == 1): ?>disabled<?php endif; ?>/> |
|
| 46 | 46 | </div> |
| 47 | 47 | </div> |
| 48 | 48 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | <textarea name="meta_description" type-val="string" min="10" max="158" required=""><?=$meta_description?></textarea> |
| 52 | 52 | </div> |
| 53 | 53 | </section> |
| 54 | - <?php endif;?> |
|
| 54 | + <?php endif; ?> |
|
| 55 | 55 | |
| 56 | 56 | <?php if ($droit_acces->getModifNavigation() == 1):?> |
| 57 | 57 | <section class="contenu modifier-contenu"> |
@@ -86,13 +86,13 @@ discard block |
||
| 86 | 86 | </div> |
| 87 | 87 | </div> |
| 88 | 88 | </section> |
| 89 | - <?php endif;?> |
|
| 89 | + <?php endif; ?> |
|
| 90 | 90 | |
| 91 | 91 | <?php if ($droit_acces->getModifContenu() == 1):?> |
| 92 | 92 | <section class="contenu modifier-contenu"> |
| 93 | 93 | <h2>Partie concernant l'affichage dans le navigateur</h2> |
| 94 | 94 | <div class="bloc"> |
| 95 | - <?php if ($droit_acces->getDroitAccesAction("GESTION_CONTENU_DANS_PAGE") == 1){ ?> |
|
| 95 | + <?php if ($droit_acces->getDroitAccesAction("GESTION_CONTENU_DANS_PAGE") == 1) { ?> |
|
| 96 | 96 | <?php $ckeditor->editor('contenu', $contenu_page); ?> |
| 97 | 97 | <?php } else {?> |
| 98 | 98 | <p>Vous n'êtes pas autorisé à créer / modifier des contenus sur ce site internet</p> |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | <?php }?> |
| 101 | 101 | </div> |
| 102 | 102 | </section> |
| 103 | - <?php endif;?> |
|
| 103 | + <?php endif; ?> |
|
| 104 | 104 | </div> |
| 105 | 105 | </form> |
| 106 | 106 | |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | <h2>Création d'une page</h2> |
| 5 | 5 | </div> |
| 6 | 6 | </header> |
| 7 | -<?php include("header.php");?> |
|
| 8 | -<?php include("admin/controller/ckeditor.php");?> |
|
| 7 | +<?php include("header.php"); ?> |
|
| 8 | +<?php include("admin/controller/ckeditor.php"); ?> |
|
| 9 | 9 | |
| 10 | 10 | <form action="<?=ADMWEBROOT?>controller/core/admin/contenus/creer_page" method="post"> |
| 11 | 11 | <button type="submit" class="submit-contenu" type="submit"><i class="fa fa-check"></i>Valider</button> |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | <div class="colonne"> |
| 23 | 23 | <div class="bloc"> |
| 24 | 24 | <label class="label" for="url" data-error="L'url doit être comprise entre 3 et 92 caractères">Url affichée dans le navigateur</label> |
| 25 | - <input type="text" name="url" type-val="string" min="3" max="92" value="<?=$url?>" <?php if($id_page_courante==1): ?>disabled<?php endif;?> required=""/> |
|
| 25 | + <input type="text" name="url" type-val="string" min="3" max="92" value="<?=$url?>" <?php if ($id_page_courante == 1): ?>disabled<?php endif; ?> required=""/> |
|
| 26 | 26 | </div> |
| 27 | 27 | </div> |
| 28 | 28 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | <section class="contenu modifier-contenu"> |
| 60 | 60 | <h2>Partie concernant l'affichage dans le navigateur</h2> |
| 61 | 61 | <div class="bloc"> |
| 62 | - <?php if ($droit_acces->getDroitAccesAction("GESTION_CONTENU_DANS_PAGE") == 1){ ?> |
|
| 62 | + <?php if ($droit_acces->getDroitAccesAction("GESTION_CONTENU_DANS_PAGE") == 1) { ?> |
|
| 63 | 63 | <?php $ckeditor->editor('contenu', $contenu_page); ?> |
| 64 | 64 | <?php } else {?> |
| 65 | 65 | <p>Vous n'êtes pas autorisé à créer / modifier des contenus sur ce site internet</p> |
@@ -3,5 +3,5 @@ |
||
| 3 | 3 | <h1>Gestion des droits d'accès</h1> |
| 4 | 4 | </div> |
| 5 | 5 | </header> |
| 6 | -<?php include("header.php");?> |
|
| 6 | +<?php include("header.php"); ?> |
|
| 7 | 7 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | <h1>Gestion des droits d'accès | modifier la liste : </h1> |
| 4 | 4 | </div> |
| 5 | 5 | </header> |
| 6 | -<?php include("header.php");?> |
|
| 6 | +<?php include("header.php"); ?> |
|
| 7 | 7 | |
| 8 | 8 | <form action="<?=ADMWEBROOT?>controller/core/admin/modules/blog/article/modifier" method="post"> |
| 9 | 9 | <button type="submit" class="submit-contenu" type="submit"><i class="fa fa-pencil"></i>Modifier</button> |