ÿØÿà JFIF ` ` ÿþ
|
Server : Apache System : Linux cloud.heroica.com.br 4.18.0-553.36.1.el8_10.x86_64 #1 SMP Wed Jan 22 03:07:54 EST 2025 x86_64 User : farolpborg ( 1053) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/farolpborg/public_html/cms/_assets/js/ |
Upload File : |
<?php
header('Content-type: text/js');
//if($_SERVER['SERVER_NAME'] != "localhost"){ ob_start("compress"); }
function compress($buffer){
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
return $buffer;
}
$dir = ".";
$handle = opendir($dir);
function strposa($haystack, $needles = array()){
$result = array();
foreach($needles as $needle){
$res = strpos($haystack, $needle);
if($res !== false){ $result[$needle] = $res; };
}
if(empty($result)){ return false; };
}
$global = "global.js";
$principal = "principal.js";
include($global);
include($principal);
$contains = array($global, $principal);
while($res = readdir($handle)){
$array = explode(".", $res);
end($array);
$ext = current($array);
$tem = ($ext == "js") ? $res : "";
if(strposa($tem, $contains) === FALSE){
if(strpos($tem, 'jquery') === FALSE && strpos($tem, '_') === FALSE){
if(file_exists($tem)){
include($tem);
}
}
}
}
//if($_SERVER['SERVER_NAME'] != "localhost"){ ob_end_flush(); }
?>