. */ session_start(); // hide all error error_reporting(0); // check url $url2 = explode("&set-theme", $url)[0]; $gettheme = $_GET['set-theme']; $mtheme = array( "dark", "light", "blue", "green", "pink", ); $theme_color = array( "#3a4149", "#008BC9", "#008BC9", "#4dbd74", "#e83e8c", ); $themenum = array_search($gettheme, $mtheme); $getthemecolor = $theme_color[$themenum]; if (empty($gettheme)) { } else { if (in_array($gettheme, $mtheme)) { include_once('./include/headhtml.php'); $gen = ''; $stheme = './include/theme.php'; $handle = fopen($stheme, 'w') or die('Cannot open file: ' . $stheme); $data = $gen; fwrite($handle, $data); $_SESSION['theme'] = $gettheme; $_SESSION['themecolor'] = $getthemecolor; echo '