diff --git a/engine/lib/external/CSSTidy-1.3/css_optimiser.php b/engine/lib/external/CSSTidy-1.3/css_optimiser.php deleted file mode 100644 index 7210524a..00000000 --- a/engine/lib/external/CSSTidy-1.3/css_optimiser.php +++ /dev/null @@ -1,353 +0,0 @@ -3600) { - return unlink($dirname); - } - // Loop through the folder - if(is_dir($dirname)) - { - $dir = dir($dirname); - while (false !== $entry = $dir->read()) { - // Skip pointers - if ($entry == '.' || $entry == '..') { - continue; - } - // Recurse - rmdirr("$dirname/$entry",$oc); - } - $dir->close(); - } - // Clean up - if ($oc==1) - { - return rmdir($dirname); - } -} - -function options($options, $selected = null, $labelIsValue = false) -{ - $html = ''; - - settype($selected, 'array'); - settype($options, 'array'); - - foreach ($options as $value=>$label) - { - if (is_array($label)) { - $value = $label[0]; - $label = $label[1]; - } - $label = htmlspecialchars($label, ENT_QUOTES, "utf-8"); - $value = $labelIsValue ? $label - : htmlspecialchars($value, ENT_QUOTES, "utf-8"); - - $html .= ''; - } - - return $html; -} - -$css = new csstidy(); -if(isset($_REQUEST['custom']) && !empty($_REQUEST['custom'])) -{ - setcookie ('custom_template', $_REQUEST['custom'], time()+360000); -} -rmdirr('temp'); - -if(isset($_REQUEST['case_properties'])) $css->set_cfg('case_properties',$_REQUEST['case_properties']); -if(isset($_REQUEST['lowercase'])) $css->set_cfg('lowercase_s',true); -if(!isset($_REQUEST['compress_c']) && isset($_REQUEST['post'])) $css->set_cfg('compress_colors',false); -if(!isset($_REQUEST['compress_fw']) && isset($_REQUEST['post'])) $css->set_cfg('compress_font-weight',false); -if(isset($_REQUEST['merge_selectors'])) $css->set_cfg('merge_selectors', $_REQUEST['merge_selectors']); -if(isset($_REQUEST['optimise_shorthands'])) $css->set_cfg('optimise_shorthands',$_REQUEST['optimise_shorthands']); -if(!isset($_REQUEST['rbs']) && isset($_REQUEST['post'])) $css->set_cfg('remove_bslash',false); -if(isset($_REQUEST['preserve_css'])) $css->set_cfg('preserve_css',true); -if(isset($_REQUEST['sort_sel'])) $css->set_cfg('sort_selectors',true); -if(isset($_REQUEST['sort_de'])) $css->set_cfg('sort_properties',true); -if(isset($_REQUEST['remove_last_sem'])) $css->set_cfg('remove_last_;',true); -if(isset($_REQUEST['discard'])) $css->set_cfg('discard_invalid_properties',true); -if(isset($_REQUEST['css_level'])) $css->set_cfg('css_level',$_REQUEST['css_level']); -if(isset($_REQUEST['timestamp'])) $css->set_cfg('timestamp',true); - -?> - - -
-- : English Deutsch French Chinese
-- -
- - - load_template($_REQUEST['custom'],false); - } - break; - - case 3: - $css->load_template('highest_compression'); - break; - - case 2: - $css->load_template('high_compression'); - break; - - case 0: - $css->load_template('low_compression'); - break; - } - } - - if($url) - { - if(substr($_REQUEST['url'],0,7) != 'http://') - { - $_REQUEST['url'] = 'http://'.$_REQUEST['url']; - } - $result = $css->parse_from_url($_REQUEST['url'],0); - } - elseif(isset($_REQUEST['css_text']) && strlen($_REQUEST['css_text'])>5) - { - $result = $css->parse($_REQUEST['css_text']); - } - - if($result) - { - $ratio = $css->print->get_ratio(); - $diff = $css->print->get_diff(); - if(isset($_REQUEST['file_output'])) - { - $filename = md5(mt_rand().time().mt_rand()); - $handle = fopen('temp/'.$filename.'.css','w'); - if($handle) { - if(fwrite($handle,$css->print->plain())) - { - $file_ok = true; - } - } - fclose($handle); - } - if($ratio>0) $ratio = ''.$ratio.'% - ('.$diff.' Bytes)'; else $ratio = ''.$ratio.'% ('.$diff.' Bytes)'; - if(count($css->log) > 0): ?> - - '; - echo '';
- echo $css->print->formatted();
- echo '
';
- echo '';
- }
- elseif(isset($_REQUEST['css_text']) || isset($_REQUEST['url'])) {
- echo ''.$lang[$l][28].'
'; - } - ?> -- For bugs and suggestions feel free to contact me. -
- - \ No newline at end of file