Beispiel #1
0
 // Mails
 $mails = CUserMessageDest::loadNewMessages();
 // Creation du Template
 $tplHeader = new CSmartyDP("style/{$uistyle}");
 $tplHeader->assign("offline", false);
 $tplHeader->assign("nodebug", true);
 $tplHeader->assign("obsolete_module", $obsolete_module);
 $tplHeader->assign("localeInfo", $locale_info);
 // Favicon
 $tplHeader->assign("mediboardShortIcon", CFaviconLoader::loadFile("style/{$uistyle}/images/icons/favicon.ico"));
 // CSS
 $mediboardStyle = CCSSLoader::loadFiles();
 if ($uistyle != "mediboard") {
     $mediboardStyle .= CCSSLoader::loadFiles($uistyle);
 }
 $mediboardStyle .= CCSSLoader::loadFiles("modules");
 $tplHeader->assign("mediboardStyle", $mediboardStyle);
 //JS
 $tplHeader->assign("mediboardScript", CJSLoader::loadFiles());
 $tplHeader->assign("dialog", $dialog);
 $tplHeader->assign("messages", $messages);
 $tplHeader->assign("mails", $mails);
 $tplHeader->assign("uistyle", $uistyle);
 $tplHeader->assign("cp_group", $current_group->cp);
 // cp of the current group
 $tplHeader->assign("browser", $browser);
 $tplHeader->assign("errorMessage", CAppUI::getMsg());
 $tplHeader->assign("Etablissements", $etablissements);
 $tplHeader->assign("applicationVersion", $applicationVersion);
 $tplHeader->assign("allInOne", CValue::get("_aio"));
 $tplHeader->assign("portal", array("help" => mbPortalURL($m, $tab), "tracker" => mbPortalURL("tracker")));
Beispiel #2
0
} elseif ($typeArch == "tar") {
    $zipFile = new Archive_Tar("tmp/mediboard_repas.tar.gz", true);
} else {
    return;
}
if ($indexFile) {
    // Création du fichier index.html
    $plats = new CPlat();
    $smarty = new CSmartyDP();
    $smarty->assign("plats", $plats);
    $smarty->assign("mediboardScriptStorage", mbLoadScriptsStorage());
    $smartyStyle = new CSmartyDP();
    $smartyStyle->assign("offline", true);
    $smartyStyle->assign("localeInfo", $locale_info);
    $smartyStyle->assign("mediboardShortIcon", CFaviconLoader::loadFile("style/{$uistyle}/images/icons/favicon.ico"));
    $smartyStyle->assign("mediboardStyle", CCSSLoader::loadFiles());
    $smartyStyle->assign("mediboardScript", CJSLoader::loadFiles());
    $smartyStyle->assign("messages", $messages);
    $smartyStyle->assign("infosystem", CAppUI::pref("INFOSYSTEM"));
    $smartyStyle->assign("errorMessage", CAppUI::getMsg());
    $smartyStyle->assign("uistyle", $uistyle);
    ob_start();
    $smartyStyle->display("header.tpl");
    $smarty->display("repas_offline.tpl");
    $smartyStyle->display("footer.tpl");
    $indexFile = ob_get_contents();
    ob_end_clean();
    file_put_contents("tmp/index.html", $indexFile);
    if ($typeArch == "zip") {
        $zipFile->addFile("tmp/index.html", "index.html");
    } elseif ($typeArch == "tar") {