示例#1
0
}
// defines
define('_NAME', 'torrentflux-b4rt');
define('_UPGRADE_FROM', 'v94');
define('_UPGRADE_TO', '1.0');
define('_DEFAULT_PATH', '/usr/local/torrent/');
define('_TITLE', _NAME . ' ' . _VERSION . ' - Upgrade ' . _UPGRADE_FROM . ' to ' . _UPGRADE_TO);
define('_DIR', dirname($_SERVER["SCRIPT_FILENAME"]) . "/");
define('_FILE_DBCONF', 'inc/config/config.db.php');
define('_FILE_THIS', $_SERVER['SCRIPT_NAME']);
// Database-Types
$databaseTypes = array();
$databaseTypes['mysql'] = 'mysql_connect';
$databaseTypes['sqlite'] = 'sqlite_open';
// init queries
initQueries("upgrade", _UPGRADE_FROM);
// -----------------------------------------------------------------------------
// Main
// -----------------------------------------------------------------------------
// ob-start
if (@ob_get_level() == 0) {
    @ob_start();
}
if (isset($_REQUEST["1"])) {
    // 1 - Database
    sendHead(" - Database");
    send("<h1>" . _TITLE . "</h1>");
    send("<h2>Database</h2>");
    sendButton(11);
} elseif (isset($_REQUEST["11"])) {
    // 11 - Database - type
示例#2
0
define('_NAME', 'TorrentFlux-NG');
define('_TITLE', _NAME . ' ' . _VERSION . ' - Setup');
define('_DIR', dirname($_SERVER["SCRIPT_FILENAME"]) . "/");
define('_FILE_DBCONF', 'inc/config/config.db.php');
define('_FILE_THIS', $_SERVER['SCRIPT_NAME']);
define('_FORUM_URL', "http://tf-b4rt.berlios.de/forum/");
// Database-Types
$databaseTypes = array();
$databaseTypes['MySQL'] = 'mysql_connect';
$databaseTypes['SQLite'] = 'sqlite_open';
$databaseTypes['Postgres'] = 'pg_connect';
// generic msg about db config missing:
$msgDbConfigMissing = 'Database configuration file <em>' . _DIR . _FILE_DBCONF . '</em> missing. ';
$msgDbConfigMissing .= 'Setup cannot continue.  Please check the file exists and is readable by the webserver before continuing.';
// init queries
initQueries("install");
// -----------------------------------------------------------------------------
// Main
// -----------------------------------------------------------------------------
// ob-start
if (@ob_get_level() == 0) {
    @ob_start();
}
if (isset($_REQUEST["1"])) {
    // 1 - Database
    sendHead(" - Database");
    send("<h1>" . _TITLE . "</h1>");
    send("<h2>Database</h2>");
    send("<p>In this section you will choose the type of database you wish to use with " . _NAME . ".  You will then be prompted to provide the hostname, database name, username and password that " . _NAME . " will use to store information.</p>");
    send("<p>Finally " . _NAME . " will run some tests to check everything works OK and write the database and server configuration.</p>");
    send("<p>For more information and support with this installation, please feel free to visit <a href='" . _FORUM_URL . "'>the " . _NAME . " forum</a>.</p><br/>");