]> git.mxchange.org Git - friendica.git/blob - view/theme/duepuntozero/style.php
Move PConfig::get() to DI::pConfig()->get()
[friendica.git] / view / theme / duepuntozero / style.php
1 <?php
2 /**
3  * @file view/theme/duepuntozero/style.php
4  */
5 use Friendica\Core\Config;
6 use Friendica\Core\PConfig;
7 use Friendica\DI;
8 use Friendica\Model\Profile;
9
10 if (file_exists("$THEMEPATH/style.css")) {
11         echo file_get_contents("$THEMEPATH/style.css");
12 }
13
14 $uid = $_REQUEST['puid'] ?? 0;
15
16 $s_colorset = Config::get('duepuntozero', 'colorset');
17 $colorset = DI::pConfig()->get($uid, 'duepuntozero', 'colorset');
18
19 if (empty($colorset)) {
20         $colorset = $s_colorset;
21 }
22
23 $setcss = '';
24
25 if ($colorset) {
26         if ($colorset == 'greenzero') {
27                 $setcss = file_get_contents('view/theme/duepuntozero/deriv/greenzero.css');
28         }
29
30         if ($colorset == 'purplezero') {
31                 $setcss = file_get_contents('view/theme/duepuntozero/deriv/purplezero.css');
32         }
33
34         if ($colorset == 'easterbunny') {
35                 $setcss = file_get_contents('view/theme/duepuntozero/deriv/easterbunny.css');
36         }
37
38         if ($colorset == 'darkzero') {
39                 $setcss = file_get_contents('view/theme/duepuntozero/deriv/darkzero.css');
40         }
41
42         if ($colorset == 'comix') {
43                 $setcss = file_get_contents('view/theme/duepuntozero/deriv/comix.css');
44         }
45
46         if ($colorset == 'slackr') {
47                 $setcss = file_get_contents('view/theme/duepuntozero/deriv/slackr.css');
48         }
49 }
50
51 echo $setcss;