<?php

	$com = false;
	//$com = true;
	$distinct = true;

	error_reporting(0);

	function compress($buffer) {

	  /* remove comments */
	  $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
	  /* remove tabs, spaces, newlines, etc. */
	  $buffer = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $buffer);
	  return $buffer;
	}

	$files = array(
		"font.icomoon.css",
		"font.ghlypicons.css",

		"bootstrap.css",
		"reset.css",
		"content.css",

		"nav.css",
		"crumbtrail.css",

		"general.css",
		"text.css",

		"bootstrap.datetimepicker.css",
		"bootstrap.datetimepicker.custom.css",


		"buttons.css",
		"qbuttons.css",

		"widget.css",
		"widget.tabs.css",
		"widget.drop.css",

		"skin.Blue.css",
		"skin.DarkBlue.css",
		"skin.Gray.css",
		"skin.DarkGray.css",
		"skin.Green.css",
		"skin.LightGreen.css",
		"skin.Lilac.css",
		"skin.Orange.css",
		"skin.DarkOrange.css",
		"skin.Pink.css",
		"skin.Purple.css",
		"skin.Red.css",
		"skin.Yellow.css",
		"skin.Teal.css",
		"skin.Help.css",

		"forms.css",
		"forms.extra.css",
		"forms.ckeditor.css",
		"forms.chosen.css",
		"forms.chosen.custom.css",
		"forms.tagsinput.css",
//		"forms.uniform.css",
//		"forms.uniform.custom.css",
		"forms.elements.css",
		"forms.languages.css",
		"forms.queue.css",
		"forms.layouts.editor.css",
		"forms.uploader.css",
		"forms.cropper.css",
		"forms.captcha.css",
		"forms.checkbox.css",
		"forms.multiselect.css",
		"forms.variable-holder.css",
		"forms.bootstrap.css",
		"help.css",

		"table.css",
		"notes.css",
		"common.css",
		"jquery.ui.css",
		"jquery.ui.custom.css",
		"jquery.ui.plupload.css",
		"jquery.ui.plupload.custom.css",
		"jquery.mt-select.css",
		"jquery.jgrowl.css",

		"alerts.css",

		"accordion.css",
		"messages.css",
		"reserved.css",
		"paging.css",
		"notify.css",
		"chart.css",
		"tablet.css",
		//"3rdparty.colpick.css",
		"jquery.colorpicker.css",
		"jquery.colorpicker.custom.css",
		"prettyPhoto.css",
		"delete-dialog.css",
		"jquery.uix.multiselect.css",
		"jquery.uix.multiselect.custom.css",
		"mainButton.css",
		"notifications.css",

		"final.css"

	);



	foreach ($files as $key => $val) {

		if ($com) {
			$content .=  "\n" . Compress(file_get_contents( $val));
		} else {

			if ($distinct) {
				$content .= "@import url('{$val}'); \n";
			} else {
				$content .=  "\n" . (file_get_contents( $val));	
			}
			


		}
		

		
	}

	header("Content-type: text/css");
	header("Cache-Control: max-age=2692000, public");

    header("Content-Length: ".strlen($content)); 
	echo $content;
	die();
	

?>