<?php
/************************************************************************
- * MXChange v0.2.1 Start: 12/03/2004 *
- * =============== Last change: 12/13/2004 *
+ * Mailer v0.2.1-FINAL Start: 12/03/2004 *
+ * =================== Last change: 12/13/2004 *
* *
* -------------------------------------------------------------------- *
* File : theme-manager.php *
// Load all themes
while ($content = SQL_FETCHARRAY($result)) {
// Construct relative include file name
- $inc = sprintf("theme/%s/theme.php", SQL_ESCAPE($content['theme_path']));
+ $inc = sprintf("theme/%s/theme.php", secureString($content['theme_path']));
// Load it's theme.php file if found
if (isIncludeReadable($inc)) {
return $name;
}
-// Initialize variables
-$GLOBALS['curr_theme'] = getCurrentTheme();
+// Filter for generic handling of theme change
+function FILTER_HANDLE_THEME_CHANGE () {
+ // Check if new theme is selcted
+ if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme())) {
+ // Set new theme for guests
+ $newTheme = postRequestElement('new_theme');
-// Check if new theme is selcted
-if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != $GLOBALS['curr_theme'])) {
- // Set new theme for guests
- $newTheme = postRequestElement('new_theme');
+ // Change to new theme
+ setTheme($newTheme);
- // Change to new theme
- setTheme($newTheme);
+ // Remove current from array
+ removeIncludeFromPool('theme', sprintf("theme/%s/theme.php", getCurrentTheme()));
- // Remove current from array
- removeIncludeFromPool('theme', sprintf("theme/%s/theme.php", $GLOBALS['curr_theme']));
-
- // Add new theme
- addIncludeToPool('theme', sprintf("theme/%s/theme.php", $newTheme));
-} // END - if
+ // Add new theme
+ addIncludeToPool('theme', sprintf("theme/%s/theme.php", $newTheme));
+ } // END - if
+}
// [EOF]
?>