示例#1
0
function recompile($path)
{
    global $AR, $templateStore;
    $dh = opendir($path);
    $objectID = pathToObjectID($path);
    while (false !== ($file = readdir($dh))) {
        if ($file != "." && $file != "..") {
            $f = $path . $file;
            if (substr($file, -strlen(".pinp")) == ".pinp" && is_file($f)) {
                $templateName = substr($file, 1, -strlen(".pinp"));
                echo "Recompiling {$templateName}<br>\n";
                $pinp_code = file_get_contents($f);
                $compiler = new pinp($AR->PINP_Functions, "local->", "\$AR_this->_");
                $optimized = sprintf($AR->PINPtemplate, $compiled);
                $compiled = $compiler->compile(strtr($pinp_code, "\r", ""));
                if ($compiler->error) {
                    showCompilerError($compiler, $path . $file);
                } else {
                    $optimized = sprintf($AR->PINPtemplate, $compiled);
                    $templateStore->write($optimized, $objectID, $templateName . ".inc");
                }
            } else {
                if (is_dir($f) && $file != "CVS" && $file != ".svn") {
                    recompile("{$f}/");
                }
            }
        }
    }
    closedir($dh);
}
示例#2
0
    exit;
}
if (isset($_GET["freshclam-mirror-del"])) {
    freshclam_delmirror();
    exit;
}
if (isset($_GET["popup"])) {
    page();
    exit;
}
if (isset($_GET["popup-false"])) {
    page_false();
    exit;
}
if (isset($_GET["recompile"])) {
    recompile();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body('{APP_CLAMAV}');
    $addtext = $tpl->_ENGINE_parse_body('{APP_CLAMAV_INSTALL_INFOS}');
    $RECOMPILE_CLAMAV_TEXT = $tpl->_ENGINE_parse_body('{RECOMPILE_CLAMAV_TEXT}');
    $users = new usersMenus();
    $start = "LoadClamavConfig()";
    if (!$users->CLAMAV_INSTALLED) {
        $start = "LoadClamavConfigFalse()";
    }
示例#3
0
<?php

include_once(dirname(__FILE__)."/frame.class.inc");
include_once(dirname(__FILE__)."/class.unix.inc");


if(isset($_GET["db-size"])){db_size();exit;}
if(isset($_GET["recompile"])){recompile();exit;}
if(isset($_GET["recompile-all"])){recompile_all();exit;}





while (list ($num, $line) = each ($_GET)){$f[]="$num=$line";}

writelogs_framework("unable to understand query !!!!!!!!!!!..." .@implode(",",$f),"main()",__FILE__,__LINE__);
die();


function db_size(){
	$unix=new unix();
	$php=$unix->LOCATE_PHP5_BIN();
	shell_exec("$php /usr/share/artica-postfix/exec.squidguard.php --ufdbguard-status");
}

function recompile(){
	@mkdir("/etc/artica-postfix/ufdbguard.recompile-queue",644,true);
	$db=$_GET["recompile"];
	@file_put_contents("/etc/artica-postfix/ufdbguard.recompile-queue/".md5($db)."db",$db);