blog->settings->themes; if (isset($_POST['file_content'])) { try { // Save CSS $css = base64_encode($_POST['file_content']); $s->put('morecss',$css); // Minify it $css_min = preg_replace('` {2,}`', ' ', $_POST['file_content']); $css_min = preg_replace('/(\/\*[\s\S]*?\*\/)/', '', $css_min); $css_min = preg_replace('/(\t|\r|\n)/', '', $css_min); $css_min = str_replace(array(' { ',' {','{ '),'{', $css_min); $css_min = str_replace(array(' } ',' }','} '),'}', $css_min); $css_min = str_replace(array(' : ',' :',': '),':', $css_min); $css_min = str_replace(array(' ; ',' ;','; '),';', $css_min); $css_min = str_replace(array(' , ',' ,',', '),',', $css_min); $s->put('morecss_min',base64_encode($css_min)); http::redirect($p_url.'&config=1'); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } } $css_content = base64_decode($s->morecss); ?>
'.form::textarea('file_content',60,20,html::escapeHTML($css_content),'maximal','').'
'. ''.form::hidden('p','moreCSS'). dcCore::app()->formNonce(). '
'; ?>