<?php
$scripts = array(
    "../../../components/jquery/jqplot/jquery.jqplot.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.canvasTextRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.dateAxisRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.barRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.categoryAxisRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.pieRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.donutRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.trendline.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.meterGaugeRenderer.js",
    "../../../components/jquery/jqplot/plugins/jqplot.bubbleRenderer.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.cursor.min.js",
    "../../../components/jquery/jqplot/plugins/jqplot.highlighter.js",     
    "../../../components/jquery/jqplot/plugins/jqplot.smoothFunnelRenderer.js",
    "../../../components/jquery/jqplot/plugins/jqplot.pointLabels.min.js",
    "../../../components/d3.v3/d3.min.js",
    "../../../components/d3.v3/nv.d3.min.js",
    "../../../components/leaflet-0.6.4/leaflet-src.js",    
    "../../../app/controller/dashboard_functions.min.js",
    "../../../app/controller/report_functions.min.js",
    "../../../app/controller/dashboard.min.js",
    "../../../components/leaflet-0.6.4/world-countries.js"
);

$buffer = "";
foreach ($scripts as $script) {
  $buffer .= 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);
?>