forked from mybb/mybb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
css.php
40 lines (32 loc) · 850 Bytes
/
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
<?php
/**
* MyBB 1.8
* Copyright 2014 MyBB Group, All Rights Reserved
*
* Website: http://www.mybb.com
* License: http://www.mybb.com/about/license
*
*/
define("IN_MYBB", 1);
define("NO_ONLINE", 1);
define('THIS_SCRIPT', 'css.php');
require_once "./inc/init.php";
require_once MYBB_ROOT . $config['admin_dir'] . '/inc/functions_themes.php';
$stylesheet = $mybb->get_input('stylesheet', MyBB::INPUT_INT);
if($stylesheet)
{
$options = array(
"limit" => 1
);
$query = $db->simple_select("themestylesheets", "stylesheet", "sid=".$stylesheet, $options);
$stylesheet = $db->fetch_field($query, "stylesheet");
$plugins->run_hooks("css_start");
if(!empty($mybb->settings['minifycss']))
{
$stylesheet = minify_stylesheet($stylesheet);
}
$plugins->run_hooks("css_end");
header("Content-type: text/css");
echo $stylesheet;
}
exit;