diff --git a/design/privateheader.php b/design/privateheader.php index a629a49..9dcad5b 100755 --- a/design/privateheader.php +++ b/design/privateheader.php @@ -59,9 +59,17 @@ if (isset(G::$LoggedUser['Notify'])) { if (empty(G::$LoggedUser['StyleURL'])) { -?> - + if (($StyleColors = G::$Cache->get_value('stylesheet_colors')) === false) { + G::$DB->query('SELECT LOWER(REPLACE(Name, " ", "_")) AS Name, Color FROM stylesheets WHERE COLOR IS NOT NULL'); + while (list($StyleName, $StyleColor) = G::$DB->next_record()) { + $StyleColors[$StyleName] = $StyleColor; + } + G::$Cache->cache_value('stylesheet_colors', $StyleColors, 0); + } + if (isset($StyleColors[G::$LoggedUser['StyleName']])) { ?> + + } ?> + } else { $StyleURLInfo = parse_url(G::$LoggedUser['StyleURL']); diff --git a/design/publicheader.php b/design/publicheader.php index 73af328..9fbc913 100755 --- a/design/publicheader.php +++ b/design/publicheader.php @@ -7,6 +7,7 @@ define('FOOTER_FILE',SERVER_ROOT.'/design/publicfooter.php');