Пример #1
0
    $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") {
        $zipFile->addModify("tmp/index.html", null, "tmp/");
    }
}
function delSvnAndSmartyDir($action, $fileProps)
{
    if (preg_match("/.svn/", $fileProps["filename"]) || preg_match("/templates/", $fileProps["filename"]) || preg_match("/templates_c/", $fileProps["filename"])) {
        return false;
    } else {
        return true;
    }
}
function addFiles($src, &$zipFile, $typeArch)
{
    if ($typeArch == "tar") {