} if ($GLOBALS["VERBOSE"]) { ini_set('display_errors', 1); ini_set('html_errors', 0); ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); } include_once dirname(__FILE__) . '/ressources/class.templates.inc'; include_once dirname(__FILE__) . '/ressources/class.ccurl.inc'; include_once dirname(__FILE__) . '/ressources/class.ini.inc'; include_once dirname(__FILE__) . '/ressources/class.mysql.inc'; include_once dirname(__FILE__) . '/framework/class.unix.inc'; include_once dirname(__FILE__) . '/ressources/class.squid.inc'; include_once dirname(__FILE__) . '/ressources/class.os.system.inc'; include_once dirname(__FILE__) . "/framework/frame.class.inc"; Compile(); function Compile() { $unix = new unix(); $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid"; $pid = @file_get_contents($pidfile); if ($unix->process_exists($pid, basename(__FILE__))) { if ($GLOBALS["VERBOSE"]) { echo "Already executed pid {$pid}\n"; } return; } $t = time(); $q = new mysql_squid_builder(); echo "**** LIST_TABLES_CATEGORIES_PERSO *****\n"; $tablescat = $q->LIST_TABLES_CATEGORIES_PERSO();
function IncludeFile($matches) { global $cwd; return Compile($cwd . "/" . $matches[1]); }
<?php $A = array('CLASS TRGUI.php', 'CLASS rxnetcllw.php', 'CLASS rxnetcl.php', 'CLASS TRGWorldCL.php', 'CLASS TRGWorld1.php', 'CLASS TRProcEventsCL.php', 'CLASS TRPlayerList.php', 'CLASS TRGameClient.php', 'CLASS TRCommanderCL.php', 'CLASS TRChatTool.php', 'CLASS TRImageButton.php', 'CLASS TRLevelConstructor.php', 'functions.php', 'hichkok_brutal.php'); $inc = ''; foreach ($A as $v) { $name = substr($v, 0, -4) . '.phb'; Compile('./' . $v, '../files/scripts/' . $name); $inc .= "\r\n require_once(getfilename(DOC_ROOT.'/files/scripts/{$name}'));"; } function compile($in, $out) { if (is_file($out)) { unlink($out); } $fh = fopen($out, 'w'); bcompiler_write_header($fh); bcompiler_write_file($fh, $in); bcompiler_write_footer($fh); fclose($fh); } $C = <<<FUC <?php {$inc} ?> FUC; file_put_contents('../scripts/include.php', $C);
<?php $A = array('CLASS rxnetsvlw.php', 'CLASS rxnetsv.php', 'CLASS TRGame.php', 'CLASS TRPlayer.php', 'CLASS TRCommander.php', 'CLASS TRGWorld.php', 'CLASS TRGWorld1.php', 'CLASS TRTaskManager.php', 'hichkok_brutal.php', 'CLASS TRGLobby.php', 'CLASS testing.php'); $inc = '$dir=dirname(__FILE__);'; foreach ($A as $v) { $name = substr($v, 0, -4) . '.phb'; Compile('./' . $v, './scripts/' . $name); $inc .= "\r\n require_once(realpath(\$dir.'/{$name}'));"; } function compile($in, $out) { if (is_file($out)) { unlink($out); } $fh = fopen($out, 'w'); bcompiler_write_header($fh); bcompiler_write_file($fh, $in); bcompiler_write_footer($fh); fclose($fh); } $C = <<<FUC <?php // © roxblnfk 2012 {$inc} \$S=new TRGame(\$TRConfig); \$S->start(true); ?> FUC; file_put_contents('./scripts/include.php', $C);