require_once(SM_PATH . 'functions/plugin.php');
require_once(SM_PATH . 'functions/constants.php');
-$username = ( !isset($username) ? '' : $username );
+$username = ( !isset($_SESSION['username']) ? '' : $_SESSION['username'] );
$custom_css = getPref($data_dir, $username, 'custom_css', 'none' );
$chosen_theme = getPref($data_dir, $username, 'chosen_theme');
$found_theme = false;
+
+/* need to adjust $chosen_theme path with SM_PATH */
+$chosen_theme = preg_replace("/(\.\.\/){1,}/", SM_PATH, $chosen_theme);
+
for ($i = 0; $i < count($theme); ++$i){
if ($theme[$i]['PATH'] == $chosen_theme) {
$found_theme = true;
}
}
+
if (!defined('download_php')) {
- session_register('theme_css');
+ sqsession_register($theme_css, 'theme_css');
}
$use_javascript_addr_book = getPref($data_dir, $username, 'use_javascript_addr_book', $default_use_javascript_addr_book);