Browse Source

Amélioration du système d'ajout-retrait de slash dans les titres des pages

Cebabonet 8 years ago
parent
commit
63515c8435
2 changed files with 11 additions and 9 deletions
  1. 5 4
      index.php
  2. 6 5
      user/config.php

+ 5 - 4
index.php View File

@@ -143,8 +143,8 @@ while($data_page_menu=mysql_fetch_assoc($req))
143 143
 {
144 144
 
145 145
 
146
-
147
-echo"<a href='?id_page=".$data_page_menu["id_page"]."'>{$data_page_menu["titre"]}</a><br><br>";
146
+$titrepage_stripslashes=stripslashes($data_page_menu["titre"]);
147
+echo"<a href='?id_page=".$data_page_menu["id_page"]."'>{$titrepage_stripslashes}</a><br><br>";
148 148
 }
149 149
 
150 150
 
@@ -216,11 +216,12 @@ if($data_page["id_page"]== null && $static_homepage_status!="1"){
216 216
 	echo"La page que vous aviez défini en page d'accueil n'existe plus.<br><br>";
217 217
 	
218 218
 }else{
219
-$page_name= $data_page["titre"];?>
219
+$page_name= stripslashes($data_page["titre"]);?>
220 220
 <title><?php echo $website_name.' : '.$page_name; ?></title>
221 221
 <?php
222
+$titrepage_stripslash = stripslashes($data_page['titre']);
222 223
 $page_stripslash = stripslashes($data_page['page']);
223
-echo"<h2>{$data_page["titre"]}</h2>";
224
+echo"<h2>{$titrepage_stripslash}</h2>";
224 225
 echo"<b>".$page_date_display." :</b> {$data_page["date"]} par : {$data_page['user']}<br />";
225 226
 echo"<b>".$page_page_display." :</b><br />{$page_stripslash}<br><br>";
226 227
 

+ 6 - 5
user/config.php View File

@@ -14,7 +14,7 @@
14 14
 
15 15
 
16 16
 
17
-//$root_path="/";
17
+$root_path="http://www.blogartisanal.tk/dev/";
18 18
 
19 19
 
20 20
 //SET OTHER PREFERENCES
@@ -36,7 +36,6 @@ $server='Your_MySQL_Server_Address';
36 36
 $user='Your_db_user';
37 37
 $passwd='Your_db_password';
38 38
 $base='Your_db_name';
39
-		
40 39
 
41 40
 
42 41
 
@@ -64,9 +63,6 @@ $blog_info_config_page = mysql_fetch_assoc($req);
64 63
 
65 64
 
66 65
 
67
-$ConfigDir = dirname(__FILE__);
68
-$MainDir = str_replace("user", "",$ConfigDir);
69
-
70 66
 $meta_description=$blog_info_config_page['description'];
71 67
 
72 68
 
@@ -86,6 +82,11 @@ if($static_homepage_status=="1")
86 82
 	
87 83
 		}
88 84
 	}
85
+
86
+$ConfigDir = dirname(__FILE__);
87
+$MainDir = str_replace("user", "",$ConfigDir);
88
+
89
+
89 90
 if($lang=="fr_fr"){
90 91
 	
91 92
 	include "".$MainDir."files/lang/fr_fr.php";