Exemplo n.º 1
0
     $GLOBALS["CATTO"] = $re[1];
 }
 if ($argv[1] == "--inject") {
     echo inject($argv[2], $argv[3]);
     exit;
 }
 if ($argv[1] == "--conf") {
     echo conf();
     exit;
 }
 if ($argv[1] == "--ufdbguard-compile") {
     echo UFDBGUARD_COMPILE_SINGLE_DB($argv[2]);
     exit;
 }
 if ($argv[1] == "--ufdbguard-dbs") {
     echo UFDBGUARD_COMPILE_DB();
     exit;
 }
 if ($argv[1] == "--ufdbguard-miss-dbs") {
     echo ufdbguard_recompile_missing_dbs();
     exit;
 }
 if ($argv[1] == "--ufdbguard-recompile-dbs") {
     echo ufdbguard_recompile_dbs();
     exit;
 }
 if ($argv[1] == "--ufdbguard-schedule") {
     ufdbguard_schedule();
     exit;
 }
 if ($argv[1] == "--list-missdbs") {
Exemplo n.º 2
0
include_once(dirname(__FILE__)."/ressources/class.mysql.inc");
include_once(dirname(__FILE__).'/framework/class.unix.inc');
include_once(dirname(__FILE__)."/framework/frame.class.inc");


if(posix_getuid()<>0){die("Cannot be used in web server mode\n\n");}
if(count($argv)>0){
	$imploded=implode(" ",$argv);
	if(preg_match("#--verbose#",$imploded)){$GLOBALS["VERBOSE"]=true;$GLOBALS["debug"]=true;ini_set_verbosed(); }
	if(preg_match("#--reload#",$imploded)){$GLOBALS["RELOAD"]=true;}
	if(preg_match("#--shalla#",$imploded)){$GLOBALS["SHALLA"]=true;}
	if(preg_match("#--catto=(.+?)\s+#",$imploded,$re)){$GLOBALS["CATTO"]=$re[1];}
	if($argv[1]=="--inject"){echo inject($argv[2],$argv[3]);exit;}
	if($argv[1]=="--conf"){echo conf();exit;}
	if($argv[1]=="--ufdbguard-compile"){echo UFDBGUARD_COMPILE_SINGLE_DB($argv[2]);exit;}	
	if($argv[1]=="--ufdbguard-dbs"){echo UFDBGUARD_COMPILE_DB();exit;}
	if($argv[1]=="--ufdbguard-miss-dbs"){echo ufdbguard_recompile_missing_dbs();exit;}
	if($argv[1]=="--ufdbguard-recompile-dbs"){echo ufdbguard_recompile_dbs();exit;}
	if($argv[1]=="--ufdbguard-schedule"){ufdbguard_schedule();exit;}
	if($argv[1]=="--list-missdbs"){BuildMissingUfdBguardDBS(false,true);exit;}				
	if($argv[1]=="--cron-compile"){cron_compile();exit;}
	if($argv[1]=="--ufdbguard-status"){print_r(UFDBGUARD_STATUS());exit;}
	
	
	
}