Subversion Repositories eFlore/Applications.del

Rev

Rev 1626 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1626 Rev 1876
Line 50... Line 50...
50
 
50
 
51
		if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['QUERY_STRING'])) {
51
		if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['QUERY_STRING'])) {
52
			$url_morceaux = $this->parserUrl();
52
			$url_morceaux = $this->parserUrl();
53
			if (isset($url_morceaux[0])) {
53
			if (isset($url_morceaux[0])) {
54
				$this->widget = $url_morceaux[0];
-
 
55
				// hack car chez moi (mathias) je me retrouve avec $url_morceaux[0] = "delnomduwidget", pourtant j'ai le même .htaccess...
-
 
56
				if (strpos($this->widget, ":") !== false) {
-
 
57
					$this->widget = substr($this->widget, strpos($this->widget, ":") + 1);
-
 
58
				}
54
				$this->widget = $url_morceaux[0];
59
				self::$config['chemins']['widgetCourantDossier'] = self::$config['chemins']['widgetsDossier'].strtolower($this->widget).DIRECTORY_SEPARATOR;
55
				self::$config['chemins']['widgetCourantDossier'] = self::$config['chemins']['widgetsDossier'].strtolower($this->widget).DIRECTORY_SEPARATOR;
60
				$this->chargerWidgetConfig();
56
				$this->chargerWidgetConfig();
61
			}
57
			}
62
			// Chargement des chemins pour l'autoload
58
			// Chargement des chemins pour l'autoload
Line 91... Line 87...
91
		}
87
		}
92
	}
88
	}
Line 93... Line 89...
93
	
89
 
94
	private function nettoyerGet() {
90
	private function nettoyerGet() {
95
		foreach ($_GET as $cle => $valeur) {
91
		foreach ($_GET as $cle => $valeur) {
96
			$verifier = array('NULL', "\n", "\r", "\\", "'", '"', "\x00", "\x1a", ';');
92
			$verifier = array('NULL', "\n", "\r", "\\", '"', "\x00", "\x1a", ';');
97
			$_GET[$cle] = strip_tags(str_replace($verifier, '', $valeur));
93
			$_GET[$cle] = strip_tags(str_replace($verifier, '', $valeur));
98
		}
94
		}
Line 99... Line 95...
99
	}
95
	}
Line 131... Line 127...
131
				require_once $chemin;
127
				require_once $chemin;
132
			}
128
			}
133
		}
129
		}
134
	}
130
	}
Line -... Line 131...
-
 
131
 
135
	
132
 
136
	/**
133
	/**
137
	 * Execute le widget.
134
	 * Execute le widget.
138
	 */
135
	 */
139
	function executer() {
136
	function executer() {
Line 145... Line 142...
145
				if (class_exists($classe_widget)) {
142
				if (class_exists($classe_widget)) {
146
					$widget = new $classe_widget(self::$config, $this->parametres);
143
					$widget = new $classe_widget(self::$config, $this->parametres);
147
					$widget->executer();
144
					$widget->executer();
148
				}
145
				}
149
			}
146
			}
150
		} else {
-
 
151
			echo "pas de module précisé";
-
 
152
		}
147
		}
153
	}
148
	}
Line 154... Line 149...
154
	
149
 
155
	/**
150
	/**
Line 161... Line 156...
161
			$widget_config = parse_ini_file($widget_config_ini_fichier, TRUE);
156
			$widget_config = parse_ini_file($widget_config_ini_fichier, TRUE);
162
			self::$config = array_merge(self::$config, $widget_config);
157
			self::$config = array_merge(self::$config, $widget_config);
163
		}
158
		}
164
	}
159
	}
165
}
160
}
166
?>
-
 
167
161