query("SELECT D.Db,D.Config,D.Json,D.Host,D.Id From Manager_account.Domini D where D.Host='".($_GET["PUBLICCLEANID"])."' limit 1"); $utente=$utente->fetch_assoc(); $impostazioni=unserialize($utente["Json"]); $moduli=unserialize(base64_decode($_GET["Moduli"])); //if ($_COOKIE["AnteprimaIdchk"]=='3db4adc6120eecb6f3eca9a4bcc693f470035060') print_r($_GET); if (is_array($moduli)) foreach ($moduli as $modulo) { $exists=false; if ($exists) { $body=file_get_contents($url); } else if (file_exists($_SERVER["DOCUMENT_ROOT"]."/custom/".$utente["Host"]."/css/".$modulo.".css")) { $body=file_get_contents($_SERVER["DOCUMENT_ROOT"]."/custom/".$utente["Host"]."/css/".$modulo.".css"); } else if (file_exists($_SERVER["DOCUMENT_ROOT"]."/moduli/css/".$modulo.".css")) { $body=file_get_contents($_SERVER["DOCUMENT_ROOT"]."/moduli/css/".$modulo.".css"); } $buffer.="\n/* Modulo ".$modulo."*/\n".$body; } //$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); //$buffer = str_replace(': ', ':', $buffer); //$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer); //$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer); //header('Cache-Control: cache'); //header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 864000) . ' GMT'); //header("Cache-Control: max-age=2592000"); //header("Last-Modified: ".gmdate("D, d M Y H:i:s", time()-864000)." GMT"); //$etagFile = md5_file(__FILE__); //header("Etag: $etagFile"); header("Content-type: text/css"); echo(trim($buffer));