forked from FlippAcademy/StarGamesControlPanel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ch_theme.php
executable file
·39 lines (37 loc) · 1.38 KB
/
ch_theme.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
<!--
// =========================================================================
// ______
// / __/ /____ ________ ____ ___ _ ___ ___
// _\ \/ __/ _ `/ __/ _ `/ _ `/ ' \/ -_|_-<
// /___/\__/\_,_/_/ \_, /\_,_/_/_/_/\__/___/
// _____ /___/ __ ___ __
// / ___/__ ___ / /________ / / / _ \___ ____ ___ / /
// / /__/ _ \/ _ \/ __/ __/ _ \/ / / ___/ _ `/ _ \/ -_) /
// \___/\___/_//_/\__/_/ \___/_/ /_/ \_,_/_//_/\__/_/
// =========================================================================
// Copyright (c) Stargames Control Panel - Licensed under GNU GPL.
// See LICENSE File
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php
require "memory.php";
if(empty($POST_ch_theme) && !$CONFIG_theme_select_mode)
header("location:index.php?act=idx");
$HTTP_REFERER = get_referer();
if($POST_ch_theme!='') {
$dir = "theme/$POST_ch_theme";
if (is_dir($dir)) {
$ch_theme = $POST_ch_theme;
} else {
$ch_theme = $CONFIG_default_theme;
}
if($CONFIG_save_type==1) {
$_SESSION["usertheme"] = $ch_theme;
} else {
CP_setCookie("usertheme",$ch_theme);
}
}
header("location:$HTTP_REFERER");
?>