<?php /** * Minimum Requirement: PHP 5.3.3 */ if (!defined('IN_src')) { exit; } require $src_root_path . 'includes/startup.' . $phpEx; require $src_root_path . 'src/class_loader.' . $phpEx; $src_class_loader = new \src\class_loader('src\\', "{$src_root_path}src/", $phpEx); $src_class_loader->register(); $src_config_php_file = new \src\config_php_file($src_root_path, $phpEx); extract($src_config_php_file->get_all()); if (!defined('src_INSTALLED')) { // Redirect the user to the installer require $src_root_path . 'includes/functions.' . $phpEx; // We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information // available as used by the redirect function $server_name = !empty($_SERVER['HTTP_HOST']) ? strtolower($_SERVER['HTTP_HOST']) : (!empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); $server_port = !empty($_SERVER['SERVER_PORT']) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'); $secure = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 1 : 0; $script_name = !empty($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'); if (!$script_name) { $script_name = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI'); } // $src_root_path accounts for redirects from e.g. /adm $script_path = trim(dirname($script_name)) . '/' . $src_root_path . 'install/index.' . $phpEx; // Replace any number of consecutive backslashes and/or slashes with a single slash // (could happen on some proxy setups and/or Windows servers) $script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
<?php if (!defined('IN_src')) { exit; } $src_config_php_file = new \src\config_php_file($src_root_path, $phpEx); extract($src_config_php_file->get_all()); unset($dbpasswd); $dbms = $src_config_php_file->convert_30_dbms_to_31($dbms); /** * $convertor_data provides some basic information about this convertor which is * used on the initial list of convertors and to populate the default settings */ $convertor_data = array('forum_name' => 'src', 'version' => '1', 'src_version' => '1', 'author' => 'BSG Chandigarh', 'dbms' => $dbms, 'dbhost' => $dbhost, 'dbport' => $dbport, 'dbuser' => $dbuser, 'dbpasswd' => '', 'dbname' => $dbname, 'table_prefix' => 'opsrc_', 'forum_path' => '../forums', 'author_notes' => ''); /** * $tables is a list of the tables (minus prefix) which we expect to find in the * source forum. It is used to guess the prefix if the specified prefix is incorrect */ $tables = array('auth_access', 'banlist', 'categories', 'disallow', 'forum_prune', 'forums', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'smilies', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words'); /** * $config_schema details how the srcrd configuration information is stored in the source forum. * * 'table_format' can take the value 'file' to indicate a config file. In this case array_name * is set to indicate the name of the array the config values are stored in * Example of using a file: * $config_schema = array( * 'table_format' => 'file', * 'filename' => 'NAME OF FILE', // If the file is not in the root directory, the path needs to be added with no leading slash * 'array_name' => 'NAME OF ARRAY', // Only used if the configuration file stores the setting in an array. * 'settings' => array( * 'srcrd_email' => 'SUPPORT_EMAIL', // target config name => source target name