Vergleich install/index.php - 1.2.8 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * $Id: index.php 3145 2007-06-20 22:21:24Z dennis $

 * $Id: index.php 3256 2007-07-31 19:31:05Z Tikitiki $

 */
error_reporting(E_ALL & ~E_NOTICE);


 */
error_reporting(E_ALL & ~E_NOTICE);


Zeile 55Zeile 55
		'structure_file' => 'mysql_db_tables.php',
'population_file' => 'mysql_db_inserts.php'
);

		'structure_file' => 'mysql_db_tables.php',
'population_file' => 'mysql_db_inserts.php'
);

 
}

// Perform a check if MyBB is already installed or not
$installed = false;
if(file_exists(MYBB_ROOT."/inc/config.php") && file_exists(MYBB_ROOT."/inc/settings.php"))
{
require MYBB_ROOT."/inc/config.php";
require MYBB_ROOT."/inc/settings.php";
if(is_array($config) && is_array($settings))
{
$installed = true;
}

}

if(file_exists('lock'))

}

if(file_exists('lock'))

{

{

	$output->print_error($lang->locked);

	$output->print_error($lang->locked);

 
}
else if($installed == true && !$mybb->input['action'])
{
$output->print_header($lang->already_installed, "errormsg", 0);
echo sprintf($lang->mybb_already_installed, $mybb->version);
$output->print_footer();

}
else
{

}
else
{

Zeile 101Zeile 119
			break;
case 'configuration':
configure();

			break;
case 'configuration':
configure();

			break;

			break;

		case 'adminuser';
create_admin_user();
break;
case 'final':
install_done();

		case 'adminuser';
create_admin_user();
break;
case 'final':
install_done();

			break;

			break;

		default:
intro();
break;
}

		default:
intro();
break;
}

}

}


function intro()
{


function intro()
{

Zeile 129Zeile 147
	$license = '<h3>Important - Read Carefully</h3>
<p>This MyBB End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and the MyBB Group for the MyBB product, which includes computer software and may include associated media, printed materials, and "online" or electronic documentation. By installing, copying, or otherwise using the MyBB product, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, do not install or use the MyBB product and destroy any copies of the application.</p>
<p>The MyBB Group may alter or modify this license agreement without notification and any changes made to the EULA will affect all past and current copies of MyBB</p>

	$license = '<h3>Important - Read Carefully</h3>
<p>This MyBB End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and the MyBB Group for the MyBB product, which includes computer software and may include associated media, printed materials, and "online" or electronic documentation. By installing, copying, or otherwise using the MyBB product, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, do not install or use the MyBB product and destroy any copies of the application.</p>
<p>The MyBB Group may alter or modify this license agreement without notification and any changes made to the EULA will affect all past and current copies of MyBB</p>





<h4>MyBB is FREE software</h4>
<p>MyBB is distributed as "FREE" software granting you the right to download MyBB for FREE and installing a working physical copy at no extra charge.</p>
<p>You may charge a fee for the physical act of transferring a copy.</p>

<h4>MyBB is FREE software</h4>
<p>MyBB is distributed as "FREE" software granting you the right to download MyBB for FREE and installing a working physical copy at no extra charge.</p>
<p>You may charge a fee for the physical act of transferring a copy.</p>

Zeile 145Zeile 163

<h4>Separation of Components</h4>
<p>The MyBB software is licensed as a single product. Components, parts or any code may not be separated from the original MyBB package for either personal use or inclusion in other applications.</p>


<h4>Separation of Components</h4>
<p>The MyBB software is licensed as a single product. Components, parts or any code may not be separated from the original MyBB package for either personal use or inclusion in other applications.</p>





<h4>Termination</h4>
<p>Without prejudice to any other rights, the MyBB Group may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the MyBB software and all of its component parts. The MyBB Group also reserve the right to revoke redistribution rights of MyBB from any corporation or entity for any specified reason.</p>


<h4>Termination</h4>
<p>Without prejudice to any other rights, the MyBB Group may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the MyBB software and all of its component parts. The MyBB Group also reserve the right to revoke redistribution rights of MyBB from any corporation or entity for any specified reason.</p>


Zeile 177Zeile 195
	{
$errors[] = sprintf($lang->req_step_error_box, sprintf($lang->req_step_error_phpversion, $phpversion));
$phpversion = sprintf($lang->req_step_span_fail, $phpversion);

	{
$errors[] = sprintf($lang->req_step_error_box, sprintf($lang->req_step_error_phpversion, $phpversion));
$phpversion = sprintf($lang->req_step_span_fail, $phpversion);

		$showerror = 1;

		$showerror = 1;

	}
else
{

	}
else
{

Zeile 189Zeile 207
	{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_dboptions);
$dbsupportlist = sprintf($lang->req_step_span_fail, $lang->none);

	{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_dboptions);
$dbsupportlist = sprintf($lang->req_step_span_fail, $lang->none);

		$showerror = 1;
}

		$showerror = 1;
}

	else
{
foreach($dboptions as $dboption)

	else
{
foreach($dboptions as $dboption)

Zeile 198Zeile 216
			$dbsupportlist[] = $dboption['title'];
}
$dbsupportlist = implode(', ', $dbsupportlist);

			$dbsupportlist[] = $dboption['title'];
}
$dbsupportlist = implode(', ', $dbsupportlist);

	}


	}


	// Check XML parser is installed
if(!function_exists('xml_parser_create'))
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_xmlsupport);
$xmlstatus = sprintf($lang->req_step_span_fail, $lang->not_installed);

	// Check XML parser is installed
if(!function_exists('xml_parser_create'))
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_xmlsupport);
$xmlstatus = sprintf($lang->req_step_span_fail, $lang->not_installed);

		$showerror = 1;
}
else
{
$xmlstatus = sprintf($lang->req_step_span_pass, $lang->installed);
}

		$showerror = 1;
}
else
{
$xmlstatus = sprintf($lang->req_step_span_pass, $lang->installed);
}


// Check config file is writable
$configwritable = @fopen(MYBB_ROOT.'inc/config.php', 'w');
if(!$configwritable)


// Check config file is writable
$configwritable = @fopen(MYBB_ROOT.'inc/config.php', 'w');
if(!$configwritable)

	{

	{

		$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_configfile);
$configstatus = sprintf($lang->req_step_span_fail, $lang->not_writable);

		$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_configfile);
$configstatus = sprintf($lang->req_step_span_fail, $lang->not_writable);

		$showerror = 1;
}
else
{

		$showerror = 1;
}
else
{

		$configstatus = sprintf($lang->req_step_span_pass, $lang->writable);
}
@fclose($configwritable);

		$configstatus = sprintf($lang->req_step_span_pass, $lang->writable);
}
@fclose($configwritable);

Zeile 232Zeile 250
	{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_settingsfile);
$settingsstatus = sprintf($lang->req_step_span_fail, $lang->not_writable);

	{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_settingsfile);
$settingsstatus = sprintf($lang->req_step_span_fail, $lang->not_writable);

		$showerror = 1;
}
else

		$showerror = 1;
}
else

	{
$settingsstatus = sprintf($lang->req_step_span_pass, $lang->writable);
}

	{
$settingsstatus = sprintf($lang->req_step_span_pass, $lang->writable);
}

Zeile 246Zeile 264
	{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir);
$uploadsstatus = sprintf($lang->req_step_span_fail, $lang->not_writable);

	{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir);
$uploadsstatus = sprintf($lang->req_step_span_fail, $lang->not_writable);

		$showerror = 1;

		$showerror = 1;

		@fclose($uploadswritable);
}
else

		@fclose($uploadswritable);
}
else

Zeile 256Zeile 274
	  	@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
$avatarswritable = @fopen(MYBB_ROOT.'uploads/avatars/test.write', 'w');
if(!$avatarswritable)

	// Check avatar directory is writable
$avatarswritable = @fopen(MYBB_ROOT.'uploads/avatars/test.write', 'w');
if(!$avatarswritable)

Zeile 279Zeile 297

// Output requirements page
echo sprintf($lang->req_step_reqtable, $phpversion, $dbsupportlist, $xmlstatus, $configstatus, $settingsstatus, $uploadsstatus, $avatarsstatus);


// Output requirements page
echo sprintf($lang->req_step_reqtable, $phpversion, $dbsupportlist, $xmlstatus, $configstatus, $settingsstatus, $uploadsstatus, $avatarsstatus);





	if($showerror == 1)
{
$error_list = error_list($errors);
echo sprintf($lang->req_step_error_tablelist, $error_list);
$output->print_footer();

	if($showerror == 1)
{
$error_list = error_list($errors);
echo sprintf($lang->req_step_error_tablelist, $error_list);
$output->print_footer();

	}

	}

	else
{
echo $lang->req_step_reqcomplete;
$output->print_footer('database_info');

	else
{
echo $lang->req_step_reqcomplete;
$output->print_footer('database_info');

	}

	}

}

function database_info()

}

function database_info()

Zeile 304Zeile 322
	{
$error_list = error_list($errors);
echo sprintf($lang->db_step_error_config, $error_list);

	{
$error_list = error_list($errors);
echo sprintf($lang->db_step_error_config, $error_list);

 
		$dbengine = $mybb->input['dbengine'];

		$dbhost = $mybb->input['dbhost'];
$dbuser = $mybb->input['dbuser'];
$dbname = $mybb->input['dbname'];
$tableprefix = $mybb->input['tableprefix'];

		$dbhost = $mybb->input['dbhost'];
$dbuser = $mybb->input['dbuser'];
$dbname = $mybb->input['dbname'];
$tableprefix = $mybb->input['tableprefix'];

 
		$encoding = $mybb->input['encoding'];

	}
else

	}
else

	{

	{

		echo $lang->db_step_config_db;
$dbhost = 'localhost';
$tableprefix = 'mybb_';
$dbuser = '';
$dbname = '';

		echo $lang->db_step_config_db;
$dbhost = 'localhost';
$tableprefix = 'mybb_';
$dbuser = '';
$dbname = '';

 
		$dbengine = 'mysql';
$encoding = 'utf8';

	}

// Loop through database engines
foreach($dboptions as $dbfile => $dbtype)
{

	}

// Loop through database engines
foreach($dboptions as $dbfile => $dbtype)
{

		$dbengines .= "<option value=\"{$dbfile}\">{$dbtype['title']}</option>";




























































		if($dbengine != '' && $dbengine == $dbfile)
{
$dbengines .= "<option value=\"{$dbfile}\" selected=\"selected\">{$dbtype['title']}</option>";
}
else
{
$dbengines .= "<option value=\"{$dbfile}\">{$dbtype['title']}</option>";
}
}

$encodings_array = array(
'big5' => 'Big5 Traditional Chinese',
'dec8' => 'DEC West European',
'cp850' => 'DOS West European',
'hp8' => 'HP West European',
'koi8r' => 'KOI8-R Relcom Russian',
'latin1' => 'cp1252 West European',
'latin2' => 'ISO 8859-2 Central European',
'swe7' => '7bit Swedish',
'ascii' => 'US ASCII',
'ujis' => 'EUC-JP Japanese',
'sjis' => 'Shift-JIS Japanese',
'hebrew' => 'ISO 8859-8 Hebrew',
'tis620' => 'TIS620 Thai',
'euckr' => 'EUC-KR Korean',
'koi8u' => 'KOI8-U Ukrainian',
'gb2312' => 'GB2312 Simplified Chinese',
'greek' => 'ISO 8859-7 Greek',
'cp1250' => 'Windows Central European',
'gbk' => 'GBK Simplified Chinese',
'latin5' => 'ISO 8859-9 Turkish',
'armscii8' => 'ARMSCII-8 Armenian',
'utf8' => 'UTF-8 Unicode',
'ucs2' => 'UCS-2 Unicode',
'cp866' => 'DOS Russian',
'keybcs2' => 'DOS Kamenicky Czech-Slovak',
'macce' => 'Mac Central European',
'macroman' => 'Mac West European',
'cp852' => 'DOS Central European',
'latin7' => 'ISO 8859-13 Baltic',
'cp1251' => 'Windows Cyrillic',
'cp1256' => 'Windows Arabic',
'cp1257' => 'Windows Baltic',
'binary' => 'Binary pseudo charset',
'geostd8' => 'GEOSTD8 Georgian',
'cp932' => 'SJIS for Windows Japanese',
'eucjpms' => 'UJIS for Windows Japanese',
);

// Loop through database encodings
foreach($encodings_array as $key => $encodingtext)
{
if($key == $encoding)
{
$encodings .= "<option value=\"{$key}\" selected=\"selected\">{$encodingtext}</option>\n";
}
else
{
$encodings .= "<option value=\"{$key}\">{$encodingtext}</option>\n";
}

	}


	}


	echo sprintf($lang->db_step_config_table, $dbengines, $dbhost, $dbuser, $dbname, $tableprefix);

	echo sprintf($lang->db_step_config_table, $dbengines, $dbhost, $dbuser, $dbname, $tableprefix, $encodings);

	$output->print_footer('create_tables');
}

function create_tables()
{
global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;

	$output->print_footer('create_tables');
}

function create_tables()
{
global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;

 
	
if(!$mybb->input['encoding'])
{
$errors[] = $lang->db_step_error_missingencoding;
}


if(!file_exists(MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php"))
{
$errors[] = $lang->db_step_error_invalidengine;


if(!file_exists(MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php"))
{
$errors[] = $lang->db_step_error_invalidengine;

		database_info();
}


		database_info();
}


	// Attempt to connect to the db
require_once MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php";
$db = new databaseEngine;

	// Attempt to connect to the db
require_once MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php";
$db = new databaseEngine;

Zeile 347Zeile 433
	if(!$connection)
{
$errors[] = sprintf($lang->db_step_error_noconnect, $mybb->input['dbhost']);

	if(!$connection)
{
$errors[] = sprintf($lang->db_step_error_noconnect, $mybb->input['dbhost']);

	}


	}


	// Select the database
$dbselect = $db->select_db($mybb->input['dbname']);
if(!$dbselect)

	// Select the database
$dbselect = $db->select_db($mybb->input['dbname']);
if(!$dbselect)

Zeile 359Zeile 445
	if(is_array($errors))
{
database_info();

	if(is_array($errors))
{
database_info();

 
	}

$collations = array(
'big5' => 'big5_chinese_ci',
'dec8' => 'dec8_swedish_ci',
'cp850' => 'cp850_general_ci',
'hp8' => 'hp8_english_ci',
'koi8r' => 'koi8r_general_ci',
'latin1' => 'latin1_swedish_ci',
'latin2' => 'latin2_general_ci',
'swe7' => 'swe7_swedish_ci',
'ascii' => 'ascii_general_ci',
'ujis' => 'ujis_japanese_ci',
'sjis' => 'sjis_japanese_ci',
'hebrew' => 'hebrew_general_ci',
'tis620' => 'tis620_thai_ci',
'euckr' => 'euckr_korean_ci',
'koi8u' => 'koi8u_general_ci',
'gb2312' => 'gb2312_chinese_ci',
'greek' => 'greek_general_ci',
'cp1250' => 'cp1250_general_ci',
'gbk' => 'gbk_chinese_ci',
'latin5' => 'latin5_turkish_ci',
'armscii8' => 'armscii8_general_ci',
'utf8' => 'utf8_general_ci',
'ucs2' => 'ucs2_general_ci',
'cp866' => 'cp866_general_ci',
'keybcs2' => 'keybcs2_general_ci',
'macce' => 'macce_general_ci',
'macroman' => 'macroman_general_ci',
'cp852' => 'cp852_general_ci',
'latin7' => 'latin7_general_ci',
'cp1251' => 'cp1251_general_ci',
'cp1256' => 'cp1256_general_ci',
'cp1257' => 'cp1257_general_ci',
'binary' => 'binary',
'geostd8' => 'geostd8_general_ci',
'cp932' => 'cp932_japanese_ci',
'eucjpms' => 'eucjpms_japanese_ci',
);

// Decide if we can use a database encoding or not
if(($db->title == "MySQLi" || $db->title == "MySQL") && $db->get_version() >= '4.1.0')
{
$db_encoding = "\$config['db_encoding'] = '{$mybb->input['encoding']}';";
$charset = " CHARACTER SET {$mybb->input['encoding']} COLLATE ".$collations[$mybb->input['encoding']];
}
else
{
$db_encoding = "// \$config['db_encoding'] = '{$mybb->input['encoding']}';";
$charset = "";

	}

// Write the configuration file

	}

// Write the configuration file

Zeile 415Zeile 552
 */

\$config['super_admins'] = '1';

 */

\$config['super_admins'] = '1';

 

/**
* Database Encoding
* If you wish to set an encoding for MyBB uncomment
* the line below (if it isn't already) and change
* the current value to the mysql charset:
* http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html
*/

{$db_encoding}

 
?>";


 
?>";


Zeile 458Zeile 605
{
global $output, $lang, $config;


{
global $output, $lang, $config;


	require_once MYBB_ROOT.'inc/config.php';

	require 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 487Zeile 634
{
global $output, $cache, $db, $lang, $config;


{
global $output, $cache, $db, $lang, $config;


	require_once MYBB_ROOT.'inc/config.php';

	require MYBB_ROOT.'inc/config.php';

	$db = db_connection($config);

require_once MYBB_ROOT.'inc/class_datacache.php';

	$db = db_connection($config);

require_once MYBB_ROOT.'inc/class_datacache.php';

Zeile 610Zeile 757
	}
else
{

	}
else
{

		require_once MYBB_ROOT.'inc/config.php';

		require MYBB_ROOT.'inc/config.php';

		$db = db_connection($config);

echo $lang->admin_step_setupsettings;

		$db = db_connection($config);

echo $lang->admin_step_setupsettings;

Zeile 698Zeile 845
		create_admin_user();
}


		create_admin_user();
}


	require_once MYBB_ROOT.'inc/config.php';

	require MYBB_ROOT.'inc/config.php';

	$db = db_connection($config);


	$db = db_connection($config);


	require_once MYBB_ROOT.'inc/settings.php';

	require MYBB_ROOT.'inc/settings.php';

	$mybb->settings = &$settings;

ob_start();

	$mybb->settings = &$settings;

ob_start();