public function fileExists($path) { return Website::fileExists($path); }
<b>IF NOT INSTALLED:</b><br> <a href="install.php?page=step&step=start" target="step">0. Informations</a><br> <a href="install.php?page=step&step=1" target="step">1. Set server path</a><br> <a href="install.php?page=step&step=2" target="step">2. Check DataBase connection</a><br> <a href="install.php?page=step&step=3" target="step">3. Add tables and columns to DB</a><br> <a href="install.php?page=step&step=4" target="step">4. Add samples to DB</a><br> <a href="install.php?page=step&step=5" target="step">5. Set Admin Account</a><br> <b>Author:</b><br> Gesior<br> Compatible with TFS 0.3.6 and TFS 0.4 up to revision 3702</a>'; } elseif ($page == 'step') { if ($step >= 2 && $step <= 5) { //load server config $config['server'] if (Website::getWebsiteConfig()->getValue('useServerConfigCache')) { // use cache to make website load faster if (Website::fileExists('./config/server.config.php')) { $tmp_php_config = new ConfigPHP('./config/server.config.php'); $config['server'] = $tmp_php_config->getConfig(); } else { // if file isn't cache we should load .lua file and make .php cache $tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua'); $config['server'] = $tmp_lua_config->getConfig(); $tmp_php_config = new ConfigPHP(); $tmp_php_config->setConfig($tmp_lua_config->getConfig()); $tmp_php_config->saveToFile('./config/server.config.php'); } } else { $tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua'); $config['server'] = $tmp_lua_config->getConfig(); } if (Website::getServerConfig()->isSetKey('mysqlHost')) {
<?php if (!defined('INITIALIZED')) { exit; } // DEFINE VARIABLES FOR SCRIPTS AND LAYOUTS (no more notices 'undefinied variable'!) if (!isset($_REQUEST['subtopic']) || empty($_REQUEST['subtopic']) || is_array($_REQUEST['subtopic'])) { $_REQUEST['subtopic'] = "latestnews"; } else { $_REQUEST['subtopic'] = (string) $_REQUEST['subtopic']; } if (Functions::isValidFolderName($_REQUEST['subtopic'])) { if (Website::fileExists("pages/" . $_REQUEST['subtopic'] . ".php")) { $subtopic = $_REQUEST['subtopic']; } else { new Error_Critic('CRITICAL ERROR', 'Cannot load page <b>' . htmlspecialchars($_REQUEST['subtopic']) . '</b>, file does not exist.'); } } else { new Error_Critic('CRITICAL ERROR', 'Cannot load page <b>' . htmlspecialchars($_REQUEST['subtopic']) . '</b>, invalid file name [contains illegal characters].'); } // action that page should execute if (isset($_REQUEST['action'])) { $action = (string) $_REQUEST['action']; } else { $action = ''; } $logged = false; $account_logged = new Account(); $group_id_of_acc_logged = 0; // with ONLY_PAGE option we want disable useless SQL queries if (!ONLY_PAGE) {