Vergleich install/index.php - 1.8.0 - 1.8.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 58Zeile 58
$lang = new MyLanguage();
$lang->set_path(MYBB_ROOT.'install/resources');
$lang->load('language');

$lang = new MyLanguage();
$lang->set_path(MYBB_ROOT.'install/resources');
$lang->load('language');

 

// Load DB interface
require_once MYBB_ROOT."inc/db_base.php";


// Prevent any shut down functions from running
$done_shutdown = 1;



// Prevent any shut down functions from running
$done_shutdown = 1;


// Include the necessary contants for installation

// Include the necessary constants for installation

$grouppermignore = array('gid', 'type', 'title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');

$grouppermignore = array('gid', 'type', 'title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');

$groupzerogreater = array('pmquota', 'maxpmrecipients', 'maxreputationsday', 'attachquota', 'maxemails', 'maxwarningsday', 'maxposts', 'edittimelimit', 'canusesigxposts', 'maxreputationsperthread');

$groupzerogreater = array('pmquota', 'maxpmrecipients', 'maxreputationsday', 'attachquota', 'maxemails', 'maxwarningsday', 'maxposts', 'edittimelimit', 'canusesigxposts', 'maxreputationsperuser', 'maxreputationsperthread', 'emailfloodtime');

$displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');

$displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');

$fpermfields = array('canview', 'candlattachments', 'canpostthreads', 'canpostreplys', 'canpostattachments', 'canratethreads', 'caneditposts', 'candeleteposts', 'candeletethreads', 'caneditattachments', 'canpostpolls', 'canvotepolls', 'cansearch');

$fpermfields = array('canview', 'canviewthreads', 'candlattachments', 'canpostthreads', 'canpostreplys', 'canpostattachments', 'canratethreads', 'caneditposts', 'candeleteposts', 'candeletethreads', 'caneditattachments', 'canpostpolls', 'canvotepolls', 'cansearch', 'modposts', 'modthreads', 'modattachments', 'mod_edit_posts');


// Include the installation resources
require_once INSTALL_ROOT.'resources/output.php';


// Include the installation resources
require_once INSTALL_ROOT.'resources/output.php';

Zeile 183Zeile 186
	}
}


	}
}


 
/**
* Welcome page
*/

function intro()
{
global $output, $mybb, $lang;

$output->print_header($lang->welcome, 'welcome');

function intro()
{
global $output, $mybb, $lang;

$output->print_header($lang->welcome, 'welcome');

	if(strpos(strtolower($_SERVER['PHP_SELF']), "upload/") !== false)

	if(strpos(strtolower(get_current_location('', '', true)), '/upload/') !== false)

	{
echo $lang->sprintf($lang->mybb_incorrect_folder);
}

	{
echo $lang->sprintf($lang->mybb_incorrect_folder);
}

Zeile 196Zeile 202
	$output->print_footer('license');
}


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


 
/**
* Show the license agreement
*/

function license_agreement()
{
global $output, $lang, $mybb;

function license_agreement()
{
global $output, $lang, $mybb;

Zeile 203Zeile 212
	ob_start();
$output->print_header($lang->license_agreement, 'license');


	ob_start();
$output->print_header($lang->license_agreement, 'license');


	if($mybb->get_input('allow_anonymous_info', 1) == 1)

	if($mybb->get_input('allow_anonymous_info', MyBB::INPUT_INT) == 1)

	{
require_once MYBB_ROOT."inc/functions_serverstats.php";
$build_server_stats = build_server_stats(1, '', $mybb->version_code);

	{
require_once MYBB_ROOT."inc/functions_serverstats.php";
$build_server_stats = build_server_stats(1, '', $mybb->version_code);

Zeile 355Zeile 364
   a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

   a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.





   b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

   b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

Zeile 1010Zeile 1019
	$output->print_footer('requirements_check');
}


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


 
/**
* Check our requirements
*/

function requirements_check()
{
global $output, $mybb, $dboptions, $lang;

function requirements_check()
{
global $output, $mybb, $dboptions, $lang;

Zeile 1195Zeile 1207
	}
}


	}
}


 
/**
* Which database do we use?
*/

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

$mybb->input['action'] = 'database_info';
$output->print_header($lang->db_config, 'dbconfig');

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

$mybb->input['action'] = 'database_info';
$output->print_header($lang->db_config, 'dbconfig');





	echo "<script type=\"text/javascript\">
function updateDBSettings()

	echo "<script type=\"text/javascript\">
function updateDBSettings()

		{

		{

			var dbengine = \$(\"#dbengine\").val();
$('.db_settings').each(function()
{

			var dbengine = \$(\"#dbengine\").val();
$('.db_settings').each(function()
{

Zeile 1213Zeile 1228
				if(dbengine+'_settings' == element.attr('id'))
{
element.show();

				if(dbengine+'_settings' == element.attr('id'))
{
element.show();

				}

				}

				else
{
element.hide();

				else
{
element.hide();

Zeile 1227Zeile 1242
		</script>";

// Check for errors from this stage

		</script>";

// Check for errors from this stage

	if(is_array($errors))
{

	if(is_array($errors))
{

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

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

	}

	}

	else

	else

	{

	{

		echo $lang->db_step_config_db;
}


		echo $lang->db_step_config_db;
}


Zeile 1245Zeile 1260
		if($mybb->get_input('dbengine') == $dbfile)
{
$dbengines .= "<option value=\"{$dbfile}\" selected=\"selected\">{$dbtype['title']}</option>";

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

		}
else

		}
else

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

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

		}

		}

	}

$db_info = array();

	}

$db_info = array();

Zeile 1259Zeile 1274
		$db = new $dbtype['class'];
$encodings = $db->fetch_db_charsets();
$encoding_select = '';

		$db = new $dbtype['class'];
$encodings = $db->fetch_db_charsets();
$encoding_select = '';

		$mybb->input['config'] = $mybb->get_input('config', 2);

		$mybb->input['config'] = $mybb->get_input('config', MyBB::INPUT_ARRAY);

		if(empty($mybb->input['config'][$dbfile]['dbhost']))
{
$mybb->input['config'][$dbfile]['dbhost'] = "localhost";
}
if(empty($mybb->input['config'][$dbfile]['tableprefix']))

		if(empty($mybb->input['config'][$dbfile]['dbhost']))
{
$mybb->input['config'][$dbfile]['dbhost'] = "localhost";
}
if(empty($mybb->input['config'][$dbfile]['tableprefix']))

		{

		{

			$mybb->input['config'][$dbfile]['tableprefix'] = "mybb_";
}
if(empty($mybb->input['config'][$dbfile]['dbname']))

			$mybb->input['config'][$dbfile]['tableprefix'] = "mybb_";
}
if(empty($mybb->input['config'][$dbfile]['dbname']))

Zeile 1277Zeile 1292
			$mybb->input['config'][$dbfile]['dbuser'] = '';
}
if(empty($mybb->input['config'][$dbfile]['dbpass']))

			$mybb->input['config'][$dbfile]['dbuser'] = '';
}
if(empty($mybb->input['config'][$dbfile]['dbpass']))

		{

		{

			$mybb->input['config'][$dbfile]['dbpass'] = '';
}
if(empty($mybb->input['config'][$dbfile]['encoding']))
{
$mybb->input['config'][$dbfile]['encoding'] = "utf8";

			$mybb->input['config'][$dbfile]['dbpass'] = '';
}
if(empty($mybb->input['config'][$dbfile]['encoding']))
{
$mybb->input['config'][$dbfile]['encoding'] = "utf8";

		}

		}


$class = '';
if(empty($first) && !$mybb->get_input('dbengine'))


$class = '';
if(empty($first) && !$mybb->get_input('dbengine'))

		{

		{

			$mybb->input['dbengine'] = $dbfile;
$first = true;
}

			$mybb->input['dbengine'] = $dbfile;
$first = true;
}

Zeile 1295Zeile 1310
		{
$class = "_selected";
}

		{
$class = "_selected";
}





		$db_info[$dbfile] = "
<tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\">
<tr>
<th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->database_settings}</th>

		$db_info[$dbfile] = "
<tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\">
<tr>
<th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->database_settings}</th>

				</tr>";


				</tr>";


		// SQLite gets some special settings
if($dbfile == 'sqlite')
{

		// SQLite gets some special settings
if($dbfile == 'sqlite')
{

Zeile 1337Zeile 1352
		$db_info[$dbfile] .= "
<tr>
<th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->table_settings}</th>

		$db_info[$dbfile] .= "
<tr>
<th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->table_settings}</th>

			</tr>

			</tr>

			<tr class=\"first\">
<td class=\"first\"><label for=\"config_{$dbfile}_tableprefix\">{$lang->table_prefix}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][tableprefix]\" id=\"config_{$dbfile}_tableprefix\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['tableprefix'])."\" /></td>

			<tr class=\"first\">
<td class=\"first\"><label for=\"config_{$dbfile}_tableprefix\">{$lang->table_prefix}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][tableprefix]\" id=\"config_{$dbfile}_tableprefix\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['tableprefix'])."\" /></td>

Zeile 1373Zeile 1388
	$output->print_footer('create_tables');
}


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


 
/**
* Create our tables
*/

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

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

Zeile 1384Zeile 1402
		database_info();
}


		database_info();
}


	$mybb->input['config'] = $mybb->get_input('config', 2);

	$mybb->input['config'] = $mybb->get_input('config', MyBB::INPUT_ARRAY);

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

if(strstr($mybb->input['dbengine'], "sqlite") !== false)

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

if(strstr($mybb->input['dbengine'], "sqlite") !== false)

Zeile 1475Zeile 1493
 *
* Please see the MyBB Docs for advanced
* database configuration for larger installations

 *
* Please see the MyBB Docs for advanced
* database configuration for larger installations

 * http://docs.mybb.com/

 * https://docs.mybb.com/

 */

\$config['database']['type'] = '{$mybb->input['dbengine']}';

 */

\$config['database']['type'] = '{$mybb->input['dbengine']}';

Zeile 1566Zeile 1584
	'mail_logs' => 180, // Mail error logs
'user_mail_logs' => 180, // User mail logs
'promotion_logs' => 180 // Promotion logs

	'mail_logs' => 180, // Mail error logs
'user_mail_logs' => 180, // User mail logs
'promotion_logs' => 180 // Promotion logs

 
);

/**
* Disallowed Remote Hosts
* List of hosts the fetch_remote_file() function will not
* perform requests to.
* It is recommended that you enter hosts resolving to the
* forum server here to prevent Server Side Request
* Forgery attacks.
*/

\$config['disallowed_remote_hosts'] = array(
'localhost',
);

/**
* Disallowed Remote Addresses
* List of IPv4 addresses the fetch_remote_file() function
* will not perform requests to.
* It is recommended that you enter addresses resolving to
* the forum server here to prevent Server Side Request
* Forgery attacks.
* Removing all values disables resolving hosts in that
* function.
*/

\$config['disallowed_remote_addresses'] = array(
'127.0.0.1',
'10.0.0.0/8',
'172.16.0.0/12',
'192.168.0.0/16',

);

";

);

";





	$file = fopen(MYBB_ROOT.'inc/config.php', 'w');
fwrite($file, $configdata);
fclose($file);

	$file = fopen(MYBB_ROOT.'inc/config.php', 'w');
fwrite($file, $configdata);
fclose($file);

 

if(function_exists('opcache_invalidate'))
{
opcache_invalidate(MYBB_ROOT."inc/config.php");
}


// Error reporting back on
$db->error_reporting = 1;


// Error reporting back on
$db->error_reporting = 1;

Zeile 1610Zeile 1664
	$output->print_footer('populate_tables');
}


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


 
/**
* Insert our default data
*/

function populate_tables()
{
global $output, $lang;

function populate_tables()
{
global $output, $lang;

Zeile 1654Zeile 1711
	$output->print_footer('templates');
}


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


 
/**
* Install our theme
*/

function insert_templates()
{
global $mybb, $output, $cache, $db, $lang;

require MYBB_ROOT.'inc/config.php';
$db = db_connection($config);

function insert_templates()
{
global $mybb, $output, $cache, $db, $lang;

require MYBB_ROOT.'inc/config.php';
$db = db_connection($config);





	require_once MYBB_ROOT.'inc/class_datacache.php';
$cache = new datacache;


	require_once MYBB_ROOT.'inc/class_datacache.php';
$cache = new datacache;


Zeile 1672Zeile 1732
	$db->delete_query("templates");
$db->delete_query("themestylesheets");
my_rmdir_recursive(MYBB_ROOT."cache/themes", array(MYBB_ROOT."cache/themes/index.html"));

	$db->delete_query("templates");
$db->delete_query("themestylesheets");
my_rmdir_recursive(MYBB_ROOT."cache/themes", array(MYBB_ROOT."cache/themes/index.html"));





	$insert_array = array(
'title' => 'Default Templates'
);

	$insert_array = array(
'title' => 'Default Templates'
);

Zeile 1683Zeile 1743
	{
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php";

	{
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php";

	}

	}

	elseif(file_exists(MYBB_ROOT."admin/inc/functions_themes.php"))
{
require_once MYBB_ROOT."admin/inc/functions.php";
require_once MYBB_ROOT."admin/inc/functions_themes.php";
}
else

	elseif(file_exists(MYBB_ROOT."admin/inc/functions_themes.php"))
{
require_once MYBB_ROOT."admin/inc/functions.php";
require_once MYBB_ROOT."admin/inc/functions_themes.php";
}
else

	{

	{

		$output->print_error("Please make sure your admin directory is uploaded correctly.");
}
$theme_id = import_theme_xml($contents, array("templateset" => -2, "version_compat" => 1));

		$output->print_error("Please make sure your admin directory is uploaded correctly.");
}
$theme_id = import_theme_xml($contents, array("templateset" => -2, "version_compat" => 1));

Zeile 1752Zeile 1812
				// Add to display and stylesheet list
$properties['disporder'][$stylesheet['attributes']['name']] = $count;
$stylesheets[$stylesheet['attributes']['attachedto']]['global'][] = $css_url;

				// Add to display and stylesheet list
$properties['disporder'][$stylesheet['attributes']['name']] = $count;
$stylesheets[$stylesheet['attributes']['attachedto']]['global'][] = $css_url;





				++$count;
}
}
}

				++$count;
}
}
}


$db->update_query("themes", array("def" => 1, "properties" => $db->escape_string(serialize($properties)), "stylesheets" => $db->escape_string(serialize($stylesheets))), "tid = '{$tid}'");



$db->update_query("themes", array("def" => 1, "properties" => $db->escape_string(my_serialize($properties)), "stylesheets" => $db->escape_string(my_serialize($stylesheets))), "tid = '{$tid}'");


	echo $lang->theme_step_imported;
$output->print_footer('configuration');
}

	echo $lang->theme_step_imported;
$output->print_footer('configuration');
}







/**
* Default configuration
*/

function configure()
{
global $output, $mybb, $errors, $lang;

function configure()
{
global $output, $mybb, $errors, $lang;





	$output->print_header($lang->board_config, 'config');

	$output->print_header($lang->board_config, 'config');

	



	echo <<<EOF

	echo <<<EOF

		<script type="text/javascript">	

		<script type="text/javascript">

		function warnUser(inp, warn)
{
var parenttr = $('#'+inp.id).closest('tr');

		function warnUser(inp, warn)
{
var parenttr = $('#'+inp.id).closest('tr');

Zeile 1790Zeile 1853
				}
}
}

				}
}
}

			



		function revertSetting(defval, inpid)
{

		function revertSetting(defval, inpid)
{

			$(inpid).val(defval);			

			$(inpid).val(defval);

			var parenttr = $(inpid).closest('tr');
parenttr.next('.setting_peeker').remove();
if(parenttr.is(':last-child'))
{
parenttr.addClass('last');

			var parenttr = $(inpid).closest('tr');
parenttr.next('.setting_peeker').remove();
if(parenttr.is(':last-child'))
{
parenttr.addClass('last');

			}			

			}

		}
</script>

		}
</script>

		
EOF;


EOF;


// If board configuration errors
if(is_array($errors))


// If board configuration errors
if(is_array($errors))

Zeile 1818Zeile 1881
		$cookiedomain = htmlspecialchars_uni($mybb->get_input('cookiedomain'));
$cookiepath = htmlspecialchars_uni($mybb->get_input('cookiepath'));
$contactemail = htmlspecialchars_uni($mybb->get_input('contactemail'));

		$cookiedomain = htmlspecialchars_uni($mybb->get_input('cookiedomain'));
$cookiepath = htmlspecialchars_uni($mybb->get_input('cookiepath'));
$contactemail = htmlspecialchars_uni($mybb->get_input('contactemail'));

	}
else
{

	}
else
{

		$bbname = 'Forums';
$cookiedomain = '';

		$bbname = 'Forums';
$cookiedomain = '';

		$cookiepath = '/';

 
		$websitename = 'Your Website';

		$websitename = 'Your Website';

		$contactemail = '';

 

$protocol = "http://";
if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off"))
{
$protocol = "https://";


$protocol = "http://";
if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off"))
{
$protocol = "https://";

		}

		}


// Attempt auto-detection


// Attempt auto-detection

		if($_SERVER['HTTP_HOST'])

		if(!empty($_SERVER['HTTP_HOST']))

		{
$hostname = $protocol.$_SERVER['HTTP_HOST'];
$cookiedomain = $_SERVER['HTTP_HOST'];
}

		{
$hostname = $protocol.$_SERVER['HTTP_HOST'];
$cookiedomain = $_SERVER['HTTP_HOST'];
}

		elseif($_SERVER['SERVER_NAME'])

		elseif(!empty($_SERVER['SERVER_NAME']))

		{
$hostname = $protocol.$_SERVER['SERVER_NAME'];
$cookiedomain = $_SERVER['SERVER_NAME'];

		{
$hostname = $protocol.$_SERVER['SERVER_NAME'];
$cookiedomain = $_SERVER['SERVER_NAME'];

		}

if(substr($cookiedomain, 0, 4) == "www.")
{
$cookiedomain = my_substr($cookiedomain, 4);
}

		}

if(my_substr($cookiedomain, 0, 4) == "www.")
{
$cookiedomain = substr($cookiedomain, 4);
}


// IP addresses and hostnames are not valid
if(my_inet_pton($cookiedomain) !== false || strpos($cookiedomain, '.') === false)


// IP addresses and hostnames are not valid
if(my_inet_pton($cookiedomain) !== false || strpos($cookiedomain, '.') === false)

Zeile 1860Zeile 1921
			$cookiedomain = ".{$cookiedomain}";
}


			$cookiedomain = ".{$cookiedomain}";
}


		if($_SERVER['SERVER_PORT'] && $_SERVER['SERVER_PORT'] != 80 && !preg_match("#:[0-9]#i", $hostname))

		if(!empty($_SERVER['SERVER_PORT']))

		{

		{

			$hostname .= ':'.$_SERVER['SERVER_PORT'];












			$port = ":{$_SERVER['SERVER_PORT']}";
$pos = strrpos($cookiedomain, $port);

if($pos !== false)
{
$cookiedomain = substr($cookiedomain, 0, $pos);
}

if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && !preg_match("#:[0-9]#i", $hostname))
{
$hostname .= $port;
}

		}

		}

 

$currentlocation = get_current_location('', '', true);
$noinstall = substr($currentlocation, 0, strrpos($currentlocation, '/install/'));

$cookiepath = $noinstall.'/';
$bburl = $hostname.$noinstall;

		$websiteurl = $hostname.'/';


		$websiteurl = $hostname.'/';


		$currentlocation = get_current_location();
if($currentlocation)
{
// TODO: Change this to find the last position of /install/
$pos = my_strpos($currentlocation, '/install/');
if($pos === 0)
{
$cookiepath = "/";
}
else
{
$cookiepath = my_substr($currentlocation, 0, $pos).'/';
}
}

$currentscript = $hostname.get_current_location();

if($currentscript)
{
$bburl = my_substr($currentscript, 0, my_strpos($currentscript, '/install/'));
}

if($_SERVER['SERVER_ADMIN'])

		if(isset($_SERVER['SERVER_ADMIN']) && filter_var($_SERVER['SERVER_ADMIN'], FILTER_VALIDATE_EMAIL))























		{
$contactemail = $_SERVER['SERVER_ADMIN'];
}

		{
$contactemail = $_SERVER['SERVER_ADMIN'];
}

Zeile 1897Zeile 1953
	echo $lang->sprintf($lang->config_step_table, $bbname, $bburl, $websitename, $websiteurl, $cookiedomain, $cookiepath, $contactemail);
$output->print_footer('adminuser');
}

	echo $lang->sprintf($lang->config_step_table, $bbname, $bburl, $websitename, $websiteurl, $cookiedomain, $cookiepath, $contactemail);
$output->print_footer('adminuser');
}







/**
* How do we want to name the admin user?
*/

function create_admin_user()
{
global $output, $mybb, $errors, $db, $lang;

function create_admin_user()
{
global $output, $mybb, $errors, $db, $lang;

Zeile 1911Zeile 1970
			$errors[] = $lang->config_step_error_url;
}
if(empty($mybb->input['bbname']))

			$errors[] = $lang->config_step_error_url;
}
if(empty($mybb->input['bbname']))

		{

		{

			$errors[] = $lang->config_step_error_name;
}
if(is_array($errors))
{
configure();

			$errors[] = $lang->config_step_error_name;
}
if(is_array($errors))
{
configure();

		}

		}

	}
$output->print_header($lang->create_admin, 'admin');

	}
$output->print_header($lang->create_admin, 'admin');

	



	echo <<<EOF

	echo <<<EOF

		<script type="text/javascript">	

		<script type="text/javascript">

		function comparePass()
{
var parenttr = $('#adminpass2').closest('tr');

		function comparePass()
{
var parenttr = $('#adminpass2').closest('tr');

Zeile 1938Zeile 1997
			}
}
</script>

			}
}
</script>

		



EOF;

if(is_array($errors))

EOF;

if(is_array($errors))

Zeile 2020Zeile 2079
 *  If you wish to request a PIN
* when someone tries to login
* on your Admin CP, enter it below.

 *  If you wish to request a PIN
* when someone tries to login
* on your Admin CP, enter it below.

 */

 */


\$config['secret_pin'] = '{$pin}';");



\$config['secret_pin'] = '{$pin}';");


Zeile 2108Zeile 2167
				"type" => $db->escape_string($view['attributes']['type']),
"visibility" => (int)$view['attributes']['visibility'],
"title" => $db->escape_string($view['title'][0]['value']),

				"type" => $db->escape_string($view['attributes']['type']),
"visibility" => (int)$view['attributes']['visibility'],
"title" => $db->escape_string($view['title'][0]['value']),

				"fields" => $db->escape_string(serialize($fields)),
"conditions" => $db->escape_string(serialize($conditions)),
"custom_profile_fields" => $db->escape_string(serialize($custom_profile_fields)),

				"fields" => $db->escape_string(my_serialize($fields)),
"conditions" => $db->escape_string(my_serialize($conditions)),
"custom_profile_fields" => $db->escape_string(my_serialize($custom_profile_fields)),

				"sortby" => $db->escape_string($view['sortby'][0]['value']),
"sortorder" => $db->escape_string($view['sortorder'][0]['value']),
"perpage" => (int)$view['perpage'][0]['value'],

				"sortby" => $db->escape_string($view['sortby'][0]['value']),
"sortorder" => $db->escape_string($view['sortorder'][0]['value']),
"perpage" => (int)$view['perpage'][0]['value'],

Zeile 2129Zeile 2188
	$output->print_footer('final');
}


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


 
/**
* Installation is finished
*/

function install_done()
{
global $output, $db, $mybb, $errors, $cache, $lang;

function install_done()
{
global $output, $db, $mybb, $errors, $cache, $lang;

Zeile 2234Zeile 2296
		'receivepms' => 1,
'pmnotice' => 1,
'pmnotify' => 1,

		'receivepms' => 1,
'pmnotice' => 1,
'pmnotify' => 1,

 
		'buddyrequestspm' => 1,
'buddyrequestsauto' => 0,

		'showimages' => 1,
'showvideos' => 1,
'showsigs' => 1,

		'showimages' => 1,
'showvideos' => 1,
'showsigs' => 1,

Zeile 2293Zeile 2357
			'uid' => (int)$uid,
'cpstyle' => '',
'notes' => '',

			'uid' => (int)$uid,
'cpstyle' => '',
'notes' => '',

			'permissions' => $db->escape_string(serialize($insertmodule)),
'defaultviews' => $db->escape_string(serialize($defaultviews))

			'permissions' => $db->escape_string(my_serialize($insertmodule)),
'defaultviews' => $db->escape_string(my_serialize($defaultviews))

		);

$insertmodule = array();

		);

$insertmodule = array();

Zeile 2349Zeile 2413
	$cache->update("plugins", array());
$cache->update("internal_settings", array('encryption_key' => random_str(32)));
$cache->update_default_theme();

	$cache->update("plugins", array());
$cache->update("internal_settings", array('encryption_key' => random_str(32)));
$cache->update_default_theme();

 
	$cache->update_reportreasons(true);


$version_history = array();
$dh = opendir(INSTALL_ROOT."resources");


$version_history = array();
$dh = opendir(INSTALL_ROOT."resources");

Zeile 2392Zeile 2457
	$output->print_footer('');
}


	$output->print_footer('');
}


 
/**
* @param array $config
*
* @return DB_MySQL|DB_MySQLi|DB_PgSQL|DB_SQLite
*/

function db_connection($config)
{
require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php";
switch($config['database']['type'])

function db_connection($config)
{
require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php";
switch($config['database']['type'])

	{

	{

		case "sqlite":
$db = new DB_SQLite;
break;

		case "sqlite":
$db = new DB_SQLite;
break;

Zeile 2416Zeile 2486
	$db->connect($config['database']);
$db->set_table_prefix(TABLE_PREFIX);
$db->type = $config['database']['type'];

	$db->connect($config['database']);
$db->set_table_prefix(TABLE_PREFIX);
$db->type = $config['database']['type'];





	return $db;
}


	return $db;
}


 
/**
* @param array $array
*
* @return string
*/

function error_list($array)
{
$string = "<ul>\n";

function error_list($array)
{
$string = "<ul>\n";

Zeile 2431Zeile 2506
	return $string;
}


	return $string;
}


 
/**
* Write our settings to the settings file
*/

function write_settings()
{
global $db;

function write_settings()
{
global $db;

Zeile 2450Zeile 2528
		fclose($file);
}
}

		fclose($file);
}
}

?>