Beispiel #1
0
}
//
// Either we don't have a value for this cache
// or the hash is out of date
// so get the styesheets,
//
// connect to the database
require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'version.php';
//require(dirname(__FILE__).DIRECTORY_SEPARATOR.'fileloc.php'); //is included in top now
require cms_join_path(dirname(__FILE__), 'lib', 'config.functions.php');
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'misc.functions.php';
require cms_join_path(dirname(__FILE__), 'lib', 'classes', 'class.global.inc.php');
require cms_join_path(dirname(__FILE__), 'lib', 'adodb.functions.php');
$gCms = new CmsObject();
load_adodb();
$db = $gCms->GetDb();
require cms_join_path(dirname(__FILE__), 'lib', 'page.functions.php');
// extract the stylesheet(s)
$sql = "SELECT css_text, css_name FROM " . $config['db_prefix'] . "css WHERE css_id = " . $db->qstr($cssid);
$row = $db->GetRow($sql);
// calculate the new etag
$etag = md5($row['css_text']);
// update the hash cache
$hash[$cssid] = $etag;
csscache_hash_to_csvfile($hashfile, $hash);
// add a comment at the start
$css = "/* Start of CMSMS style sheet '{$row['css_name']}' */\n{$row['css_text']}\n/* End of '{$row['css_name']}' */\n\n";
// set encoding
$encoding = '';
if ($config['admin_encoding'] != '') {
    $encoding = $config['admin_encoding'];