Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* $Id: index.php 2224 2006-09-14 00:35:33Z chris $
| * $Id: index.php 2795 2007-02-14 03:48:42Z Tikitiki $
|
*/ error_reporting(E_ALL & ~E_NOTICE);
|
*/ error_reporting(E_ALL & ~E_NOTICE);
|
define("MYBB_ROOT", dirname(dirname(__FILE__)));
| define('MYBB_ROOT', dirname(dirname(__FILE__))."/");
|
define("INSTALL_ROOT", dirname(__FILE__));
|
define("INSTALL_ROOT", dirname(__FILE__));
|
require_once MYBB_ROOT.'/inc/class_core.php';
| require_once MYBB_ROOT.'inc/class_core.php';
|
$mybb = new MyBB;
// Include the files necessary for installation
|
$mybb = new MyBB;
// 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.'/admin/adminfunctions.php'; require_once MYBB_ROOT.'/inc/class_xml.php'; require_once MYBB_ROOT.'/inc/functions_user.php'; require_once MYBB_ROOT.'/inc/class_language.php';
| require_once MYBB_ROOT.'inc/class_timers.php'; require_once MYBB_ROOT.'inc/functions.php'; require_once MYBB_ROOT.'admin/adminfunctions.php'; require_once MYBB_ROOT.'inc/class_xml.php'; require_once MYBB_ROOT.'inc/functions_user.php'; require_once MYBB_ROOT.'inc/class_language.php';
|
$lang = new MyLanguage();
|
$lang = new MyLanguage();
|
$lang->set_path('resources/');
| $lang->set_path(MYBB_ROOT.'install/resources');
|
$lang->load('language');
// Include the necessary contants for installation
| $lang->load('language');
// Include the necessary contants for installation
|
Zeile 38 | Zeile 38 |
---|
$output = new installerOutput;
$dboptions = array();
|
$output = new installerOutput;
$dboptions = array();
|
// Get the current working directory $cwd = getcwd();
| |
if(function_exists('mysqli_connect')) {
| if(function_exists('mysqli_connect')) {
|
Zeile 216 | Zeile 213 |
---|
}
// Check config file is writable
|
}
// Check config file is writable
|
$configwritable = @fopen(MYBB_ROOT.'/inc/config.php', 'w');
| $configwritable = @fopen(MYBB_ROOT.'inc/config.php', 'w');
|
if(!$configwritable) { $errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_configfile);
| if(!$configwritable) { $errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_configfile);
|
Zeile 230 | Zeile 227 |
---|
@fclose($configwritable);
// Check settings file is writable
|
@fclose($configwritable);
// Check settings file is writable
|
$settingswritable = @fopen(MYBB_ROOT.'/inc/settings.php', 'w');
| $settingswritable = @fopen(MYBB_ROOT.'inc/settings.php', 'w');
|
if(!$settingswritable) { $errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_settingsfile);
| if(!$settingswritable) { $errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_settingsfile);
|
Zeile 244 | Zeile 241 |
---|
@fclose($settingswritable);
// Check upload directory is writable
|
@fclose($settingswritable);
// Check upload directory is writable
|
$uploadswritable = @fopen(MYBB_ROOT.'/uploads/test.write', 'w');
| $uploadswritable = @fopen(MYBB_ROOT.'uploads/test.write', 'w');
|
if(!$uploadswritable) { $errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir);
| if(!$uploadswritable) { $errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir);
|
Zeile 256 | Zeile 253 |
---|
{ $uploadsstatus = sprintf($lang->req_step_span_pass, $lang->writable); @fclose($uploadswritable);
|
{ $uploadsstatus = sprintf($lang->req_step_span_pass, $lang->writable); @fclose($uploadswritable);
|
@chmod(MYBB_ROOT.'/uploads', 0777); @chmod(MYBB_ROOT.'/uploads/test.write', 0777); @unlink(MYBB_ROOT.'/uploads/test.write');
| @chmod(MYBB_ROOT.'uploads', 0777); @chmod(MYBB_ROOT.'uploads/test.write', 0777); @unlink(MYBB_ROOT.'uploads/test.write');
|
}
// Check avatar directory is writable
|
}
// Check avatar directory is writable
|
$avatarswritable = @fopen(MYBB_ROOT.'/uploads/avatars/test.write', 'w');
| $avatarswritable = @fopen(MYBB_ROOT.'uploads/avatars/test.write', 'w');
|
if(!$avatarswritable) { $errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_avatardir);
| if(!$avatarswritable) { $errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_avatardir);
|
Zeile 274 | Zeile 271 |
---|
{ $avatarsstatus = sprintf($lang->req_step_span_pass, $lang->writable); @fclose($avatarswritable);
|
{ $avatarsstatus = sprintf($lang->req_step_span_pass, $lang->writable); @fclose($avatarswritable);
|
@chmod(MYBB_ROOT.'/uploads/avatars', 0777); @chmod(MYBB_ROOT.'/uploads/avatars/test.write', 0777); @unlink(MYBB_ROOT.'/uploads/avatars/test.write'); }
| @chmod(MYBB_ROOT.'uploads/avatars', 0777); @chmod(MYBB_ROOT.'uploads/avatars/test.write', 0777); @unlink(MYBB_ROOT.'uploads/avatars/test.write'); }
|
// Output requirements page
|
// Output requirements page
|
Zeile 335 | Zeile 332 |
---|
{ global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;
|
{ global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;
|
if(!file_exists(MYBB_ROOT."/inc/db_{$mybb->input['dbengine']}.php"))
| if(!file_exists(MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php"))
|
{ $errors[] = $lang->db_step_error_invalidengine; database_info(); }
// Attempt to connect to the db
|
{ $errors[] = $lang->db_step_error_invalidengine; database_info(); }
// Attempt to connect to the db
|
require_once MYBB_ROOT."/inc/db_{$mybb->input['dbengine']}.php";
| require_once MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php";
|
$db = new databaseEngine; $db->error_reporting = 0;
| $db = new databaseEngine; $db->error_reporting = 0;
|
Zeile 421 | Zeile 418 |
---|
?>";
|
?>";
|
$file = fopen(MYBB_ROOT.'/inc/config.php', 'w');
| $file = fopen(MYBB_ROOT.'inc/config.php', 'w');
|
fwrite($file, $configdata); fclose($file);
| fwrite($file, $configdata); fclose($file);
|
Zeile 461 | Zeile 458 |
---|
{ global $output, $lang;
|
{ global $output, $lang;
|
require_once MYBB_ROOT.'/inc/config.php';
| require_once MYBB_ROOT.'inc/config.php';
|
$db = db_connection($config);
$output->print_header($lang->table_population, 'tablepopulate');
| $db = db_connection($config);
$output->print_header($lang->table_population, 'tablepopulate');
|
Zeile 490 | Zeile 487 |
---|
{ global $output, $cache, $db, $lang;
|
{ global $output, $cache, $db, $lang;
|
require_once MYBB_ROOT.'/inc/config.php';
| require_once MYBB_ROOT.'inc/config.php';
|
$db = db_connection($config);
|
$db = db_connection($config);
|
require_once MYBB_ROOT.'/inc/class_datacache.php';
| require_once MYBB_ROOT.'inc/class_datacache.php';
|
$cache = new datacache;
$output->print_header($lang->theme_installation, 'theme');
| $cache = new datacache;
$output->print_header($lang->theme_installation, 'theme');
|
Zeile 502 | Zeile 499 |
---|
$db->query("DELETE FROM ".TABLE_PREFIX."themes"); $db->query("DELETE FROM ".TABLE_PREFIX."templates");
|
$db->query("DELETE FROM ".TABLE_PREFIX."themes"); $db->query("DELETE FROM ".TABLE_PREFIX."templates");
|
$db->query("INSERT INTO ".TABLE_PREFIX."themes (name,pid,css,cssbits,themebits,extracss) VALUES ('MyBB Master Style','0','','','','')"); $db->query("INSERT INTO ".TABLE_PREFIX."themes (name,pid,def,css,cssbits,themebits,extracss) VALUES ('MyBB Default','1','1','','','','')");
| $db->query("INSERT INTO ".TABLE_PREFIX."themes (name,pid,css,cssbits,themebits,extracss,allowedgroups) VALUES ('MyBB Master Style','0','','','','','')"); $db->query("INSERT INTO ".TABLE_PREFIX."themes (name,pid,def,css,cssbits,themebits,extracss,allowedgroups) VALUES ('MyBB Default','1','1','','','','','')");
|
$db->query("INSERT INTO ".TABLE_PREFIX."templatesets (title) VALUES ('Default Templates');"); $templateset = $db->insert_id();
| $db->query("INSERT INTO ".TABLE_PREFIX."templatesets (title) VALUES ('Default Templates');"); $templateset = $db->insert_id();
|
Zeile 613 | Zeile 610 |
---|
} else {
|
} else {
|
require_once MYBB_ROOT.'/inc/config.php';
| require_once MYBB_ROOT.'inc/config.php';
|
$db = db_connection($config);
echo $lang->admin_step_setupsettings;
| $db = db_connection($config);
echo $lang->admin_step_setupsettings;
|
Zeile 701 | Zeile 698 |
---|
create_admin_user(); }
|
create_admin_user(); }
|
require_once MYBB_ROOT.'/inc/config.php';
| require_once MYBB_ROOT.'inc/config.php';
|
$db = db_connection($config);
|
$db = db_connection($config);
|
require_once MYBB_ROOT.'/inc/settings.php';
| require_once MYBB_ROOT.'inc/settings.php';
|
$mybb->settings = &$settings;
ob_start();
| $mybb->settings = &$settings;
ob_start();
|
Zeile 732 | Zeile 729 |
---|
'yahoo' => '', 'msn' =>'', 'birthday' => '',
|
'yahoo' => '', 'msn' =>'', 'birthday' => '',
|
| 'signature' => '',
|
'allownotices' => 'yes', 'hideemail' => 'no', 'emailnotify' => 'no',
| 'allownotices' => 'yes', 'hideemail' => 'no', 'emailnotify' => 'no',
|
Zeile 754 | Zeile 752 |
---|
'tpp' => 0, 'ppp' => 0, 'referrer' => 0,
|
'tpp' => 0, 'ppp' => 0, 'referrer' => 0,
|
| 'buddylist' => '', 'ignorelist' => '', 'pmfolders' => '', 'notepad' => ''
|
); $db->insert_query(TABLE_PREFIX.'users', $newuser); $uid = $db->insert_id();
| ); $db->insert_query(TABLE_PREFIX.'users', $newuser); $uid = $db->insert_id();
|
Zeile 781 | Zeile 783 |
---|
add_shutdown('test_shutdown_function');
echo $lang->done_step_cachebuilding;
|
add_shutdown('test_shutdown_function');
echo $lang->done_step_cachebuilding;
|
require_once MYBB_ROOT.'/inc/class_datacache.php';
| require_once MYBB_ROOT.'inc/class_datacache.php';
|
$cache = new datacache; $cache->updateversion(); $cache->updateattachtypes();
| $cache = new datacache; $cache->updateversion(); $cache->updateattachtypes();
|
Zeile 822 | Zeile 824 |
---|
function db_connection($config) {
|
function db_connection($config) {
|
require_once MYBB_ROOT."/inc/db_{$config['dbtype']}.php";
| require_once MYBB_ROOT."inc/db_{$config['dbtype']}.php";
|
$db = new databaseEngine; // Connect to Database define('TABLE_PREFIX', $config['table_prefix']);
| $db = new databaseEngine; // Connect to Database define('TABLE_PREFIX', $config['table_prefix']);
|
Zeile 844 | Zeile 846 |
---|
function write_settings() {
|
function write_settings() {
|
global $db, $cwd;
| global $db;
|
$query = $db->query('SELECT * FROM '.TABLE_PREFIX.'settings ORDER BY title ASC'); while($setting = $db->fetch_array($query)) {
| $query = $db->query('SELECT * FROM '.TABLE_PREFIX.'settings ORDER BY title ASC'); while($setting = $db->fetch_array($query)) {
|
Zeile 854 | Zeile 856 |
---|
if(!empty($settings)) { $settings = "<?php\n/*********************************\ \n DO NOT EDIT THIS FILE, PLEASE USE\n THE SETTINGS EDITOR\n\*********************************/\n\n{$settings}\n?>";
|
if(!empty($settings)) { $settings = "<?php\n/*********************************\ \n DO NOT EDIT THIS FILE, PLEASE USE\n THE SETTINGS EDITOR\n\*********************************/\n\n{$settings}\n?>";
|
$file = fopen(dirname($cwd)."/inc/settings.php", "w");
| $file = fopen(MYBB_ROOT."inc/settings.php", "w");
|
fwrite($file, $settings); fclose($file); }
| fwrite($file, $settings); fclose($file); }
|