Example #1
0
require 'init.php';
$type = strtolower($_GET["t"]);
if (!in_array($type, array("js", "css"))) {
    return;
}
$bundle = @$_GET["b"];
//load static bundle
$module = @$_GET["m"];
//load module bundle
if (!$bundle && !$module) {
    return;
}
date_default_timezone_set('Asia/Chongqing');
$bundle_files = array();
if ($module) {
    $temp = $type == "js" ? YZE_Request::jsBundle($module) : YZE_Request::cssBundle($module);
    if ($temp) {
        foreach ($temp as $file) {
            $bundle_files[] = "/module-assets/{$module}/" . ltrim($file, "/");
        }
    }
} else {
    $app = new App_Module();
    foreach (explode(",", $bundle) as $bundle) {
        if (empty($bundle)) {
            continue;
        }
        $temp = $type == "js" ? $app->js_bundle($bundle) : $app->css_bundle($bundle);
        if (!$temp) {
            continue;
        }