@@ -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/'; |
|
5 | + $ckeditor->basePath = WEBROOT.'libs/ckeditor/'; |
|
6 | 6 | CKFinder::SetupCKEditor($ckeditor, WEBROOT.'libs/ckfinder/'); |
7 | 7 | ?> |
8 | 8 | \ No newline at end of file |
@@ -41,25 +41,25 @@ discard block |
||
41 | 41 | |
42 | 42 | |
43 | 43 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
44 | - public function getLogged(){ |
|
44 | + public function getLogged() { |
|
45 | 45 | return $this->logged; |
46 | 46 | } |
47 | - public function getSuperAdmin(){ |
|
47 | + public function getSuperAdmin() { |
|
48 | 48 | return $this->super_admin; |
49 | 49 | } |
50 | - public function getIdListeDroitAcces(){ |
|
50 | + public function getIdListeDroitAcces() { |
|
51 | 51 | return $this->id_liste_droit_acces; |
52 | 52 | } |
53 | - public function getModifSeo(){ |
|
53 | + public function getModifSeo() { |
|
54 | 54 | return $this->modif_seo; |
55 | 55 | } |
56 | - public function getModifContenu(){ |
|
56 | + public function getModifContenu() { |
|
57 | 57 | return $this->modif_contenu; |
58 | 58 | } |
59 | - public function getModifNavigation(){ |
|
59 | + public function getModifNavigation() { |
|
60 | 60 | return $this->modif_navigation; |
61 | 61 | } |
62 | - public function getSupprimerPage(){ |
|
62 | + public function getSupprimerPage() { |
|
63 | 63 | return $this->supprimer_page; |
64 | 64 | } |
65 | 65 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | //page sans droit dans admin |
142 | 142 | $all_access = array("gestion-comptes/mon-compte", "index"); |
143 | 143 | |
144 | - if (($this->super_admin == 1) || (in_array($this->getListeDroitPage($page), $this->getListeDroitAcces()))|| (in_array($page, $all_access))) { |
|
144 | + if (($this->super_admin == 1) || (in_array($this->getListeDroitPage($page), $this->getListeDroitAcces())) || (in_array($page, $all_access))) { |
|
145 | 145 | return true; |
146 | 146 | } |
147 | 147 | else { |
@@ -129,7 +129,7 @@ |
||
129 | 129 | |
130 | 130 | $dbc->prepare("INSERT INTO page (titre, contenu, url, meta_description, balise_title, ordre, parent, affiche) VALUES (:titre, :contenu, :url, :meta_description, :balise_title, :ordre, :parent, :affiche)", $value); |
131 | 131 | $this->id_page = $dbc->lastInsertId(); |
132 | - $this->setAjoutLienNavigation("ID_page", $this->id_page , 1); |
|
132 | + $this->setAjoutLienNavigation("ID_page", $this->id_page, 1); |
|
133 | 133 | } |
134 | 134 | else { |
135 | 135 | FlashMessage::setFlash("Impossible de créer cette page, veuillez réeseyer dans un moment. Si le problème persiste contactez votre administrateur."); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $navigation = []; |
13 | 13 | $last_ordre = ""; |
14 | 14 | |
15 | - if($no_module === null) { |
|
15 | + if ($no_module === null) { |
|
16 | 16 | $query = $dbc->select()->from("navigation")->orderBy("ordre")->get(); |
17 | 17 | } |
18 | 18 | else { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | if (is_array($query) && (count($query) > 0)) { |
76 | 76 | foreach ($query as $obj) { |
77 | - $sous_menu[] = [$obj->ID_page, $obj->titre, $obj->url, $obj->balise_title,]; |
|
77 | + $sous_menu[] = [$obj->ID_page, $obj->titre, $obj->url, $obj->balise_title, ]; |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function setAjoutLien($id, $value_id) { |
112 | 112 | $dbc = App::getDb(); |
113 | 113 | |
114 | - $dbc->insert($id, $value_id)->insert("ordre", $this->last_ordre+1)->into("navigation")->set(); |
|
114 | + $dbc->insert($id, $value_id)->insert("ordre", $this->last_ordre + 1)->into("navigation")->set(); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | public function setSupprimerLien($id, $value_id) { |
@@ -7,11 +7,11 @@ |
||
7 | 7 | <ul> |
8 | 8 | <?php foreach ($nav[4] as $snav):?> |
9 | 9 | <li><a href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$snav[0]?>" title="<?=$snav[3]?>"><?=$snav[1]?></a></li> |
10 | - <?php endforeach;?> |
|
10 | + <?php endforeach; ?> |
|
11 | 11 | </ul> |
12 | - <?php endif;?> |
|
12 | + <?php endif; ?> |
|
13 | 13 | </li> |
14 | - <?php endforeach;?> |
|
14 | + <?php endforeach; ?> |
|
15 | 15 | </ul> |
16 | 16 | </div> |
17 | 17 | </nav> |
@@ -16,7 +16,7 @@ |
||
16 | 16 | <button type="submit" class="submit-contenu" type="submit"><i class="fa fa-check"></i>Valider</button> |
17 | 17 | <?php endif; ?> |
18 | 18 | <input type="hidden" name="id_page" value="<?=$id_page_courante?>"> |
19 | - <?php if (($_GET['id'] != 1) && (($droit_acces->getSupprimerPage() == 1) || ($droit_acces->getSuperAdmin() == 1))):?> |
|
19 | + <?php if (($_GET['id'] != 1) && (($droit_acces->getSupprimerPage() == 1) || ($droit_acces->getSuperAdmin() == 1))):?> |
|
20 | 20 | <button id="supprimer-page-contenu" type="button" class="submit-contenu supprimer-page supprimer open-popup" popup="supprimer-page" href="<?=ADMWEBROOT?>controller/core/admin/contenus/gestion/supprimer_page?id=<?=$id_page_courante?>"><i class="fa fa-times"></i>Supprimer cette page</button> |
21 | 21 | <?php endif; ?> |
22 | 22 |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | public function get() { |
141 | 141 | $values = []; |
142 | - $requete = $this->req_beginning . implode(",", $this->select_champ) . " FROM " . implode(",", $this->table); |
|
142 | + $requete = $this->req_beginning.implode(",", $this->select_champ)." FROM ".implode(",", $this->table); |
|
143 | 143 | |
144 | 144 | if ((!empty($this->conditions)) || (!empty($this->conditions_table))) { |
145 | 145 | $requete .= $this->getWhereConditions()[0]; |
@@ -162,12 +162,12 @@ discard block |
||
162 | 162 | |
163 | 163 | $datas = []; |
164 | 164 | $count = count($this->champs); |
165 | - for ($i=0 ; $i<$count ; $i++) { |
|
165 | + for ($i = 0; $i < $count; $i++) { |
|
166 | 166 | $datas[] = $this->champs[$i]."=:".$this->champs[$i]; |
167 | 167 | } |
168 | 168 | |
169 | 169 | //si on a des conditions alors on sera dans un insert |
170 | - $requete = $this->req_beginning . implode(",", $this->table) . " SET " . implode(", ", $datas); |
|
170 | + $requete = $this->req_beginning.implode(",", $this->table)." SET ".implode(", ", $datas); |
|
171 | 171 | |
172 | 172 | if ((!empty($this->conditions)) || (!empty($this->conditions_table))) { |
173 | 173 | $requete .= $this->getWhereConditions()[0]; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function del() { |
186 | 186 | $values = []; |
187 | - $requete = $this->req_beginning . implode(",", $this->table); |
|
187 | + $requete = $this->req_beginning.implode(",", $this->table); |
|
188 | 188 | |
189 | 189 | if (!empty($this->conditions)) { |
190 | 190 | $requete .= $this->getWhereConditions()[0]; |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | $count = count($this->champs_where); |
240 | 240 | |
241 | - for ($i=0 ; $i<$count ; $i++) { |
|
241 | + for ($i = 0; $i < $count; $i++) { |
|
242 | 242 | $datas[] = $this->champs_where[$i]." ".$this->conditions[$i]." :".str_replace(".", "", $this->champs_where[$i])." ".$this->closure[$i]." "; |
243 | 243 | } |
244 | 244 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
252 | - return [" WHERE ". implode(" ", $datas), $values]; |
|
252 | + return [" WHERE ".implode(" ", $datas), $values]; |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | /** |