-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss.php
executable file
·48 lines (37 loc) · 1.07 KB
/
css.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/****
*
* @author: [email protected]
* @SVN: $Id: css.php 41 2010-06-04 16:56:54Z jake $
* @Copyright 2009,2010 Litwicki Media LLC
*
***/
define('MY_DASHBOARD', true);
$root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($root_path . 'common.' . $phpEx);
//get dashboard style
ob_start();
include($root_path . 'css/style.css');
$stylesheet = ob_get_contents();
ob_end_clean();
//append ui.css for jqueryui elements
ob_start();
include($root_path . 'css/ui.css');
$ui_css = ob_get_contents();
ob_end_clean();
$stylesheet = $stylesheet . $ui_css;
$sql = "SELECT * FROM ".CONFIG_TABLE." WHERE theme_config=1";
$result = $db->sql_query($sql);
while( $row = $db->sql_fetchrow($result) )
{
$theme_config_name = '{' . strtoupper($row['config_name']) . '}';
$theme_config_value = $row['config_value'];
//replace stuff
$stylesheet = str_replace($theme_config_name, $theme_config_value, $stylesheet);
}
$db->sql_freeresult($result);
header('Content-type: text/css; charset=UTF-8');
echo $stylesheet;
exit;
?>