* License: http://www.mybb.com/about/license * */ @set_time_limit(0); define('MYBB_ROOT', dirname(dirname(__FILE__)) . "/"); define("INSTALL_ROOT", dirname(__FILE__) . "/"); define("TIME_NOW", time()); define("IN_MYBB", 1); define("IN_INSTALL", 1); if (function_exists('date_default_timezone_set') && !ini_get('date.timezone')) { date_default_timezone_set('GMT'); } require_once MYBB_ROOT . 'inc/class_error.php'; $error_handler = new errorHandler(); require_once MYBB_ROOT . 'inc/class_core.php'; $mybb = new MyBB(); // Include the files necessary for installation require_once MYBB_ROOT . 'inc/class_timers.php'; require_once MYBB_ROOT . 'inc/functions.php'; $admin_dir = "admin"; // Perform a check if MyBB is already installed or not $installed = false; if (file_exists(MYBB_ROOT . "/inc/config.php")) { require MYBB_ROOT . "/inc/config.php"; if (isset($config) && is_array($config)) { $installed = true; if (isset($config['admindir'])) { $admin_dir = $config['admindir']; } else { if (isset($config['admin_dir'])) { $admin_dir = $config['admin_dir'];
* License: http://mybb.com/about/license * * $Id$ */ define('MYBB_ROOT', dirname(dirname(__FILE__)) . "/"); define("INSTALL_ROOT", dirname(__FILE__) . "/"); define("TIME_NOW", time()); define('IN_MYBB', 1); define("IN_UPGRADE", 1); if (function_exists('date_default_timezone_set') && !ini_get('date.timezone')) { date_default_timezone_set('GMT'); } require_once MYBB_ROOT . 'inc/class_error.php'; $error_handler = new errorHandler(); require_once MYBB_ROOT . "inc/class_core.php"; $mybb = new MyBB(); require_once MYBB_ROOT . "inc/config.php"; $orig_config = $config; if (!is_array($config['database'])) { $config['database'] = array("type" => $config['dbtype'], "database" => $config['database'], "table_prefix" => $config['table_prefix'], "hostname" => $config['hostname'], "username" => $config['username'], "password" => $config['password'], "encoding" => $config['db_encoding']); } $mybb->config =& $config; // Include the files necessary for installation require_once MYBB_ROOT . "inc/class_timers.php"; require_once MYBB_ROOT . "inc/functions.php"; require_once MYBB_ROOT . "inc/class_xml.php"; require_once MYBB_ROOT . 'inc/class_language.php'; $lang = new MyLanguage(); $lang->set_path(MYBB_ROOT . 'install/resources/'); $lang->load('language'); // If we're upgrading from an SQLite installation, make sure we still work.
define('MYBB_ROOT', dirname(dirname(__FILE__)) . "/"); } define("TIME_NOW", time()); if (function_exists('date_default_timezone_set') && !ini_get('date.timezone')) { date_default_timezone_set('GMT'); } require_once MYBB_ROOT . "inc/class_error.php"; $error_handler = new errorHandler(); if (!function_exists('json_encode') || !function_exists('json_decode')) { require_once MYBB_ROOT . 'inc/3rdparty/json/json.php'; } require_once MYBB_ROOT . "inc/functions.php"; require_once MYBB_ROOT . "inc/class_timers.php"; $maintimer = new timer(); require_once MYBB_ROOT . "inc/class_core.php"; $mybb = new MyBB(); $not_installed = false; if (!file_exists(MYBB_ROOT . "inc/config.php")) { $not_installed = true; } else { // Include the required core files require_once MYBB_ROOT . "inc/config.php"; $mybb->config =& $config; if (!isset($config['database'])) { $not_installed = true; } } if ($not_installed !== false) { if (file_exists(MYBB_ROOT . "install/index.php")) { if (defined("IN_ARCHIVE") || defined("IN_ADMINCP")) { header("Location: ../install/index.php");
* License: http://www.mybb.com/about/license * */ define('MYBB_ROOT', dirname(dirname(__FILE__)) . "/"); define("INSTALL_ROOT", dirname(__FILE__) . "/"); define("TIME_NOW", time()); define('IN_MYBB', 1); define("IN_UPGRADE", 1); if (function_exists('date_default_timezone_set') && !ini_get('date.timezone')) { date_default_timezone_set('GMT'); } require_once MYBB_ROOT . 'inc/class_error.php'; $error_handler = new errorHandler(); require_once MYBB_ROOT . "inc/functions.php"; require_once MYBB_ROOT . "inc/class_core.php"; $mybb = new MyBB(); require_once MYBB_ROOT . "inc/config.php"; $orig_config = $config; if (!is_array($config['database'])) { $config['database'] = array("type" => $config['dbtype'], "database" => $config['database'], "table_prefix" => $config['table_prefix'], "hostname" => $config['hostname'], "username" => $config['username'], "password" => $config['password'], "encoding" => $config['db_encoding']); } $mybb->config =& $config; // Include the files necessary for installation require_once MYBB_ROOT . "inc/class_timers.php"; require_once MYBB_ROOT . "inc/class_xml.php"; require_once MYBB_ROOT . 'inc/class_language.php'; $lang = new MyLanguage(); $lang->set_path(MYBB_ROOT . 'install/resources/'); $lang->load('language'); // If we're upgrading from an SQLite installation, make sure we still work. if ($config['database']['type'] == 'sqlite3' || $config['database']['type'] == 'sqlite2') {
$debug = new Debug(); $debug->log->trace0("MyBB Merge System Started: \$version_code: {$version_code} \$merge_version: {$merge_version}"); require_once MYBB_ROOT . "inc/config.php"; if (!isset($config['database']['type'])) { if ($config['dbtype']) { die('MyBB needs to be upgraded before you can convert.'); } else { die('MyBB needs to be installed before you can convert.'); } } // If we have register globals on and we're coming from the db config page it seems to screw up the $config variable if (@ini_get("register_globals") == 1) { $config_copy = $config; } require_once MYBB_ROOT . "inc/class_core.php"; $mybb = new MyBB(); if (@ini_get("register_globals") == 1) { $config = $config_copy; unset($config_copy); } require_once MYBB_ROOT . "inc/class_error.php"; require_once MERGE_ROOT . "resources/class_error.php"; $error_handler = new debugErrorHandler(); // Include the files necessary for converting require_once MYBB_ROOT . "inc/class_timers.php"; $timer = new timer(); require_once MYBB_ROOT . 'inc/class_datacache.php'; $cache = new datacache(); require_once MYBB_ROOT . "inc/functions_rebuild.php"; require_once MYBB_ROOT . "inc/functions.php"; require_once MYBB_ROOT . "inc/settings.php";
/** * View the modal. * * @param MyBB $mybb MyBB core object. * @param MyLanguage $lang Language object. * @param templates $templates Template manager. * @param array $theme Details about the current theme. */ function myalerts_view_modal($mybb, $lang, $templates, $theme) { $userAlerts = MybbStuff_MyAlerts_AlertManager::getInstance()->getAlerts(0, $mybb->settings['myalerts_dropdown_limit']); $alerts = ''; if (is_array($userAlerts) && !empty($userAlerts)) { foreach ($userAlerts as $alertObject) { $altbg = alt_trow(); $alert = parse_alert($alertObject); if ($alert['message']) { $alerts .= eval($templates->render('myalerts_alert_row_popup')); } $readAlerts[] = $alert['id']; } } else { $altbg = 'trow1'; $alerts = eval($templates->render('myalerts_alert_row_popup_no_alerts')); } $myalerts_return_link = $mybb->get_input('ret_link'); $myalerts_modal = eval($templates->render('myalerts_modal_content', 1, 0)); echo $myalerts_modal; exit; }