$color) { $sql = "SELECT id FROM preferences WHERE name='" . sql_escape($key) . "'"; $db_results = mysql_query($sql, dbh()); $results = mysql_fetch_array($db_results); // Quick hack this needs to be fixed if ($results) { $sql = "UPDATE user_preference SET `value`='" . sql_escape($color) . "' WHERE $user_sql " . " preference='" . $results[0] . "'"; $db_results = mysql_query($sql, dbh()); } } // theme colors } // set_theme_colors /*! @function set_theme @discussion this sets the needed vars for the theme */ function set_theme() { if (strlen(conf('theme_name')) > 0) { $theme_path = "/themes/" . conf('theme_name'); conf(array('theme_path'=>$theme_path),1); } } // set_theme /*! @function get_theme_author @discussion returns the author of this theme */ function get_theme_author($theme_name) { $theme_path = conf('prefix') . "/themes/" . conf('theme_name') . "/theme.cfg.php"; $results = read_config($theme_path); return $results['author']; } // get_theme_author /*! @function theme_exists @discussion this function checks to make sure that a theme actually exists */ function theme_exists($theme_name) { $theme_path = conf('prefix') . "/themes/" . $theme_name . "/theme.cfg.php"; if (!file_exists($theme_path)) { return false; } return true; } // theme_exists ?>