Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jan 18, 2024
1 parent 830788a commit df6a5fb
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions view/theme.css.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
<?php
$sessionName = 'themeCSSSession';
session_name($sessionName);
session_start();
if(!empty($_SERVER['theme'])){
$theme = $_SERVER['theme'];
$doNotConnectDatabaseIncludeConfig = 1;
}
session_write_close();
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
header("Content-type: text/css; charset: UTF-8");
$theme = getCurrentTheme();
_mysql_close();
if(empty($doNotConnectDatabaseIncludeConfig)){
$theme = getCurrentTheme();
_mysql_close();
_session_write_close();
session_name($sessionName);
session_start();
$_SERVER['theme'] = $theme;
}
_session_write_close();
echo "/* theme = {$theme} */".PHP_EOL;
echo file_get_contents("{$global['systemRootPath']}view/css/custom/{$theme}.css");
Expand Down

0 comments on commit df6a5fb

Please sign in to comment.