}
    /*echo "<pre>";
    
    				print_r($jsfiles);
    
    			echo "</pre>";*/
    //file_put_contents($writabledir.$name,$js);
    //}
    echo "\n\n\n\t\t\t<script type='text/javascript' src='{$serverpath}" . "{$name}' > </script>";
} else {
    if (isset($usejscompression) && $usejscompression == "yes" && !$writefile) {
        echo "\n\n\n\t\t\t<script type='text/javascript' src='{$serverpath}" . "{$name}' > </script>";
    }
}
$name = 'top_compression_css.php';
$writefile = delete_old_md5s($writabledir, $name, $cachetime);
if (isset($usecsscompression) && $usecsscompression == "yes" && $writefile) {
    /*	if(file_exists($writabledir.$name)){
    
    	delete_old_md5s($writabledir,$name,$cachetime);
    
    	}else{*/
    /*temp added */
    /*foreach($cssfiles as $cssfile){
    
    			if(strpos($cssfile,'.css') > -1)
    
    			echo $cssfile."<br>";	
    
    		}*/
    /* end temp added */
Esempio n. 2
0
    $js .= file_get_contents('notice.js');
    $js .= file_get_contents('kfm.js');
    $js .= file_get_contents('alerts.js');
    $js .= file_get_contents('contextmenu.js');
    $js .= file_get_contents('directories.js');
    $js .= file_get_contents('file.selections.js');
    $js .= file_get_contents('file.text-editing.js');
    $js .= file_get_contents('hooks.js');
    $js .= file_get_contents('modal.dialog.js');
    $js .= file_get_contents('panels.js');
    $js .= file_get_contents('kaejax_replaces.js');
    $js .= file_get_contents('kdnd.js');
    $js .= file_get_contents('file.class.js');
    $js .= file_get_contents('files.js');
    $js .= file_get_contents('resize_handler.js');
    $js .= file_get_contents('search.js');
    $js .= file_get_contents('lazyload_functions.js');
    // }
    if (isset($_REQUEST['minify'])) {
        require '../includes/jsmin-1.1.1.php';
        $js = JSMin::minify($js);
        file_put_contents(WORKPATH . $name, $js);
        delete_old_md5s(WORKPATH);
        exit;
    } else {
        if (strpos($_SERVER['REQUEST_URI'], '/can-minify') !== false) {
            $js .= "setTimeout(function(){var a=document.createElement('img');a.src='j/all.php?minify=1';a.style.display='none';document.body.appendChild(a);},5000);";
        }
    }
    echo $js;
}