sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false)) { exit; } $sid = htmlspecialchars($_GET['sid']); $id = intval($_GET['id']); $sql = "SELECT session_id FROM {$table_prefix}sessions WHERE session_id = '" . ((!get_magic_quotes_gpc()) ? $db->sql_escape($sid) : $sid) . "'"; $result = $db->sql_query($sql); if ($db->sql_fetchrow($result)) { $sql = "SELECT theme_data FROM {$table_prefix}styles_theme WHERE theme_id = $id"; $result2 = $db->sql_query($sql, 300); if ($row = $db->sql_fetchrow($result2)) { header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 3600)); header('Content-type: text/css'); echo $row['theme_data']; } $db->sql_freeresult($result2); } $db->sql_freeresult($result); if (!empty($cache)) { $cache->unload(); } $db->sql_close(); } ?>