<?php
$scripts = array(
  "../../../components/jquery/js/jquery-1.11.3.min.js",
  "../../../components/jquery/js/jquery-ui.min.js",
  "../../../components/bootstrap/js/bootstrap.min.js",
  "plugins/sparkline/jquery.sparkline.min.js",
  "plugins/jvectormap/jquery-jvectormap-1.2.2.min.js",
  "plugins/jvectormap/jquery-jvectormap-world-mill-en.js",
  "plugins/daterangepicker/daterangepicker.min.js",
  "plugins/datatables/jquery.dataTables10.min.js",
  "plugins/colresizable/colResizable-1.5.min.js",
  "plugins/ionslider/ion.rangeSlider.min.js",
  "../../../app/functions.min.js",
  "../../../components/jwt/jwt-decode.min.js"
);

$buffer = "";
foreach ($scripts as $script) {
  $buffer .= "\n".file_get_contents($script).";";
}
// Enable GZip encoding.
ob_start("ob_gzhandler");
// Enable caching
header('Cache-Control: public');
// Expire in one day
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 86400) . ' GMT');
// Set the correct MIME type, because Apache won't set it for us
header("Content-type: text/javascript; charset=utf-8");
// Write everything out
echo($buffer);
?>