mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-15 21:44:56 +01:00
This will do a clean install ... it will fail if config isn't writeable or any other error occurs ...
git-svn-id: file:///svn/phpbb/trunk@2698 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7b1c9135e8
commit
183718f25f
@ -4,7 +4,7 @@
|
||||
* -------------------
|
||||
* begin : Tuesday, Sept 11, 2001
|
||||
* copyright : (C) 2001 The phpBB Group
|
||||
* email : supportphpbb.com
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
@ -94,40 +94,6 @@ $available_dbms = array(
|
||||
)
|
||||
);
|
||||
|
||||
//
|
||||
// drop table schema
|
||||
//
|
||||
$sql_array = array();
|
||||
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_auth_access";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_banlist";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_categories";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_config";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_disallow";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_forum_prune";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_forums";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_groups";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_posts";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_posts_text";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_privmsgs";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_privmsgs_text";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_ranks";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_search_results";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_search_wordlist";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_search_wordmatch";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_sessions";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_smilies";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_themes";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_themes_name";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_topics";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_topics_watch";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_user_group";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_users";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_vote_desc";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_vote_results";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_vote_voters";
|
||||
$sql_array['drop_schema'][] = "DROP TABLE phpbb_words";
|
||||
|
||||
//
|
||||
// Uncomment the following line to completely disable the ftp option...
|
||||
//
|
||||
@ -139,13 +105,21 @@ $sql_array['drop_schema'][] = "DROP TABLE phpbb_words";
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
//
|
||||
// Try opening config file
|
||||
//
|
||||
if ( @file_exists('../config.'.$phpEx) )
|
||||
{
|
||||
include('../config.'.$phpEx);
|
||||
}
|
||||
|
||||
//
|
||||
// Obtain various vars
|
||||
//
|
||||
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? true : false;
|
||||
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
|
||||
|
||||
if( isset($HTTP_POST_VARS['install_step']) || isset($HTTP_GET_VARS['install_step']) )
|
||||
if ( isset($HTTP_POST_VARS['install_step']) || isset($HTTP_GET_VARS['install_step']) )
|
||||
{
|
||||
$install_step = ( isset($HTTP_POST_VARS['install_step']) ) ? $HTTP_POST_VARS['install_step'] : $HTTP_GET_VARS['install_step'];
|
||||
}
|
||||
@ -181,15 +155,7 @@ $board_email = ( !empty($HTTP_POST_VARS['board_email']) ) ? $HTTP_POST_VARS['boa
|
||||
$script_path = ( !empty($HTTP_POST_VARS['script_path']) ) ? $HTTP_POST_VARS['script_path'] : '';
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
if ( @file_exists('../config.'.$phpEx) )
|
||||
{
|
||||
include('../config.'.$phpEx);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Do we install/upgrade/update or quit back to index?
|
||||
//
|
||||
if ( !defined('PHPBB_INSTALLED') )
|
||||
{
|
||||
@ -202,14 +168,9 @@ if ( !defined('PHPBB_INSTALLED') )
|
||||
include($phpbb_root_path . 'language/lang_' . $language . '/lang_main.'.$phpEx);
|
||||
include($phpbb_root_path . 'language/lang_' . $language . '/lang_admin.'.$phpEx);
|
||||
|
||||
//
|
||||
// Ok for the time being I'm commenting this out whilst I'm working on
|
||||
// better integration of the install with upgrade as per Bart's request
|
||||
// JLH
|
||||
//
|
||||
if ( $upgrade == 1 )
|
||||
{
|
||||
// require('upgrade.'.$phpEx);
|
||||
require('upgrade.'.$phpEx);
|
||||
$install_step = 1;
|
||||
}
|
||||
}
|
||||
@ -220,13 +181,10 @@ else
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// What shall we do?
|
||||
//
|
||||
if ( !empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 1 && !defined("PHPBB_INSTALLED") && empty($HTTP_POST_VARS['upgrade_now']) )
|
||||
{
|
||||
header("Content-Type: text/x-delimtext; name=\"config.$phpEx\"");
|
||||
header("Content-disposition: attachment; filename=config.$phpEx");
|
||||
|
||||
//
|
||||
// We need to stripslashes no matter what the setting of magic_quotes_gpc is
|
||||
// because we add slahes at the top if its off, and they are added automaticlly
|
||||
@ -234,9 +192,11 @@ if ( !empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 1
|
||||
//
|
||||
$HTTP_POST_VARS['config_data'] = stripslashes($HTTP_POST_VARS['config_data']);
|
||||
|
||||
header("Content-Type: text/x-delimtext; name=\"config.$phpEx\"");
|
||||
header("Content-disposition: attachment; filename=config.$phpEx");
|
||||
echo $HTTP_POST_VARS['config_data'];
|
||||
|
||||
exit;
|
||||
|
||||
}
|
||||
else if ( !empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 2 && !defined("PHPBB_INSTALLED") )
|
||||
{
|
||||
@ -249,7 +209,7 @@ else if ( !empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] =
|
||||
$s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars($HTTP_POST_VARS['config_data']) . '" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="ftp_file" value="1" />';
|
||||
|
||||
if( $upgrade == 1 )
|
||||
if ( $upgrade == 1 )
|
||||
{
|
||||
$s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />';
|
||||
}
|
||||
@ -291,7 +251,10 @@ else if( !empty($HTTP_POST_VARS['ftp_file']) && !defined("PHPBB_INSTALLED") )
|
||||
//
|
||||
$s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars($HTTP_POST_VARS['config_data']) . '" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />';
|
||||
if( $upgrade == 1 )
|
||||
|
||||
page_header($lang['NoFTP_config'], "install.$phpEx");
|
||||
|
||||
if ( $upgrade == 1 )
|
||||
{
|
||||
$s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="dbms" value="'.$dmbs.'" />';
|
||||
@ -307,23 +270,15 @@ else if( !empty($HTTP_POST_VARS['ftp_file']) && !defined("PHPBB_INSTALLED") )
|
||||
$s_hidden_fields .= '<input type="hidden" name="server_name" value="'.$server_name.'" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="script_path" value="'.$script_path.'" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="board_email" value="'.$board_email.'" />';
|
||||
|
||||
$template->assign_block_vars("switch_upgrade_install", array());
|
||||
$template->assign_vars(array(
|
||||
"L_UPGRADE_INST" => $lang['continue_upgrade'],
|
||||
"L_UPGRADE_SUBMIT" => $lang['upgrade_submit'])
|
||||
);
|
||||
}
|
||||
$template->assign_block_vars("switch_common_install", array());
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_INSTRUCTION_TEXT" => $lang['NoFTP_config'],
|
||||
"L_SUBMIT" => $lang['Download_config'],
|
||||
|
||||
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
||||
"S_FORM_ACTION" => "install.$phpEx")
|
||||
);
|
||||
|
||||
$template->pparse('body');
|
||||
page_footer($lang['Download_config'], $s_hidden_fields);
|
||||
|
||||
exit;
|
||||
}
|
||||
@ -347,42 +302,34 @@ else if( !empty($HTTP_POST_VARS['ftp_file']) && !defined("PHPBB_INSTALLED") )
|
||||
//
|
||||
@ftp_chdir($conn_id, $ftp_dir);
|
||||
|
||||
$res = ftp_put($conn_id, 'config.'.$phpEx, $tmpfname, FTP_ASCII);
|
||||
$res = ftp_put($conn_id, '../config.'.$phpEx, $tmpfname, FTP_ASCII);
|
||||
|
||||
@ftp_quit($conn_id);
|
||||
|
||||
unlink($tmpfname);
|
||||
|
||||
if( $upgrade == 1 )
|
||||
{
|
||||
require('upgrade.'.$phpEx);
|
||||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// Ok we are basically done with the install process let's go on
|
||||
// and let the user configure their board now.
|
||||
//
|
||||
// We are going to do this by calling the admin_board.php from the
|
||||
// normal board admin section.
|
||||
// Ok we are basically done with the install process let's go on and let the user
|
||||
// configure their board now. We are going to do this by calling the admin_board.php
|
||||
// from the normal board admin section.
|
||||
//
|
||||
$s_hidden_fields = '<input type="hidden" name="username" value="' . $admin_name . '" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="password" value="' . $admin_pass1 . '" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="redirect" value="admin/index.php" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="submit" value="' . $lang['Login'] . '" />';
|
||||
|
||||
$template->assign_block_vars("switch_common_install", array());
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_INSTRUCTION_TEXT" => $lang['Inst_Step_2'],
|
||||
"L_SUBMIT" => $lang['Finish_Install'],
|
||||
|
||||
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
||||
"S_FORM_ACTION" => "login.$phpEx")
|
||||
);
|
||||
|
||||
$template->pparse('body');
|
||||
page_header($lang['Inst_Step_2'], "../login.$phpEx");
|
||||
page_footer($lang['Finish_Install'], $s_hidden_fields);
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
}
|
||||
else if ( ( empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin_pass1) || $dbhost == '' ) && !defined("PHPBB_INSTALLED") )
|
||||
{
|
||||
@ -446,81 +393,81 @@ else if ( ( empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="install_step" value="1" />';
|
||||
|
||||
page_header($instruction_text);
|
||||
page_header($instruction_text, "install.$phpEx");
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $lang['Initial_config']; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right" width="40%"><span class="gen"><?php echo $lang['Default_lang']; ?>: </span></td>
|
||||
<td class="row2"><?php echo $lang_options; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['dbms']; ?>: </span></td>
|
||||
<td class="row2"><select name="dbms" onchange="if(document.install_form.upgrade.options[upgrade.selectedIndex].value == 1) { document.install_form.dbms.selectedIndex=0}"><?php echo $dbms_options; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Install_Method']; ?>: </span></td>
|
||||
<td class="row2"><select name="upgrade" onchange="if( this.options[this.selectedIndex].value == 1 ) { document.install_form.dbms.selectedIndex=0; }"><?php echo $upgrade_option; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $lang['DB_config']; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Host']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="dbhost" value="<?php echo ( $dbhost != '' ) ? $dbhost : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Name']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="dbname" value="<?php echo ( $dbname != '' ) ? $dbname : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Username']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="dbuser" value="<?php echo ( $dbuser != '' ) ? $dbuser : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Password']; ?>: </span></td>
|
||||
<td class="row2"><input type="password" name="dbpasswd" value="<?php echo ( $dbpasswd != '' ) ? $dbpasswd : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Table_Prefix']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="prefix" value="<?php echo ( !empty($table_prefix) ) ? $table_prefix : 'phpbb_'; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $lang['Admin_config']; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Server_name']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="server_name" value="<?php echo $server_name; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Server_port']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="server_port" value="<?php echo $server_port; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Script_path']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="script_path" value="<?php echo $script_path; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Username']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="admin_name" value="<?php echo ( $admin_name != '' ) ? $admin_name : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_email']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="board_email" value="<?php echo ( $admin_email != '' ) ? $admin_email : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Password']; ?>: </span></td>
|
||||
<td class="row2"><input type="password" name="admin_pass1" value="<?php echo ( $admin_pass1 != '' ) ? $admin_pass1 : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Password_confirm']; ?>: </span></td>
|
||||
<td class="row2"><input type="password" name="admin_pass2" value="<?php echo ( $admin_pass2 != '' ) ? $admin_pass2 : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $lang['Initial_config']; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right" width="40%"><span class="gen"><?php echo $lang['Default_lang']; ?>: </span></td>
|
||||
<td class="row2"><?php echo $lang_options; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['dbms']; ?>: </span></td>
|
||||
<td class="row2"><select name="dbms" onchange="if(document.install_form.upgrade.options[upgrade.selectedIndex].value == 1) { document.install_form.dbms.selectedIndex=0}"><?php echo $dbms_options; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Install_Method']; ?>: </span></td>
|
||||
<td class="row2"><select name="upgrade" onchange="if( this.options[this.selectedIndex].value == 1 ) { document.install_form.dbms.selectedIndex=0; }"><?php echo $upgrade_option; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $lang['DB_config']; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Host']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="dbhost" value="<?php echo ( $dbhost != '' ) ? $dbhost : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Name']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="dbname" value="<?php echo ( $dbname != '' ) ? $dbname : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Username']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="dbuser" value="<?php echo ( $dbuser != '' ) ? $dbuser : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Password']; ?>: </span></td>
|
||||
<td class="row2"><input type="password" name="dbpasswd" value="<?php echo ( $dbpasswd != '' ) ? $dbpasswd : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Table_Prefix']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="prefix" value="<?php echo ( !empty($table_prefix) ) ? $table_prefix : 'phpbb_'; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $lang['Admin_config']; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Server_name']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="server_name" value="<?php echo $server_name; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Server_port']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="server_port" value="<?php echo $server_port; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Script_path']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="script_path" value="<?php echo $script_path; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Username']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="admin_name" value="<?php echo ( $admin_name != '' ) ? $admin_name : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_email']; ?>: </span></td>
|
||||
<td class="row2"><input type="text" name="board_email" value="<?php echo ( $board_email != '' ) ? $board_email : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Password']; ?>: </span></td>
|
||||
<td class="row2"><input type="password" name="admin_pass1" value="<?php echo ( $admin_pass1 != '' ) ? $admin_pass1 : ''; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Password_confirm']; ?>: </span></td>
|
||||
<td class="row2"><input type="password" name="admin_pass2" value="<?php echo ( $admin_pass2 != '' ) ? $admin_pass2 : ''; ?>" /></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
page_footer($lang['Start_Install'], $s_hidden_fields);
|
||||
page_footer($lang['Start_Install'], $s_hidden_fields, "install.$phpEx");
|
||||
|
||||
exit;
|
||||
}
|
||||
@ -533,38 +480,9 @@ else
|
||||
// populated DB is supplied, all we need do here is update
|
||||
// the relevant entries
|
||||
//
|
||||
if( $reinstall )
|
||||
if ( isset($dbms) )
|
||||
{
|
||||
$sql_query = preg_replace('/phpbb_/', $table_prefix, $sql_array['drop_schema']);
|
||||
$sql_count = count($sql_query);
|
||||
|
||||
for($i = 0; $i < $sql_count; $i++)
|
||||
{
|
||||
$result = $db->sql_query($sql_query[$i]);
|
||||
if( !$result )
|
||||
{
|
||||
$error = $db->sql_error();
|
||||
|
||||
$template->assign_block_vars("switch_error_install", array());
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_ERROR_TITLE" => $lang['Installer_Error'],
|
||||
"L_ERROR" => $lang['Install_db_error'] . '<br /><br />' . $error)
|
||||
);
|
||||
|
||||
$template->pparse('body');
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$admin_name = $userdata['username'];
|
||||
$admin_pass1 = $userdata['user_password'];
|
||||
$language = $userdata['user_lang'];
|
||||
}
|
||||
else if( isset($dbms) )
|
||||
{
|
||||
switch( $dbms )
|
||||
switch ( $dbms )
|
||||
{
|
||||
case 'msaccess':
|
||||
case 'mssql-odbc':
|
||||
@ -585,32 +503,37 @@ else
|
||||
$check_other = 'pgsql';
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !extension_loaded( $check_exts ) && !extension_loaded( $check_other ) )
|
||||
{
|
||||
$template->assign_block_vars("switch_error_install", array());
|
||||
/* $template->assign_block_vars("switch_error_install", array());
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_ERROR_TITLE" => $lang['Installer_Error'],
|
||||
"L_ERROR" => $lang['Install_No_Ext'])
|
||||
);
|
||||
$template->pparse('body');
|
||||
$template->pparse('body'); */
|
||||
|
||||
exit;
|
||||
}
|
||||
include($phpbb_root_path.'includes/db.'.$phpEx);
|
||||
|
||||
include($phpbb_root_path . 'db/' . $dbms . '.' . $phpEx);
|
||||
|
||||
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||
}
|
||||
|
||||
$dbms_schema = 'db/schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_schema.sql';
|
||||
$dbms_basic = 'db/schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_basic.sql';
|
||||
$dbms_schema = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_schema.sql';
|
||||
$dbms_basic = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_basic.sql';
|
||||
|
||||
$remove_remarks = $available_dbms[$dbms]['COMMENTS'];;
|
||||
$delimiter = $available_dbms[$dbms]['DELIM'];
|
||||
$delimiter_basic = $available_dbms[$dbms]['DELIM_BASIC'];
|
||||
|
||||
if( $install_step == 1 || $reinstall )
|
||||
if ( $install_step == 1 || $reinstall )
|
||||
{
|
||||
if( $upgrade != 1 )
|
||||
if ( $upgrade != 1 )
|
||||
{
|
||||
if( $dbms != 'msaccess' )
|
||||
if ( $dbms != 'msaccess' )
|
||||
{
|
||||
//
|
||||
// Ok we have the db info go ahead and read in the relevant schema
|
||||
@ -619,7 +542,7 @@ else
|
||||
// to let them know we are actually doing something.
|
||||
//
|
||||
$sql_query = @fread(@fopen($dbms_schema, 'r'), @filesize($dbms_schema));
|
||||
$sql_query = preg_replace('/phpbb_/', $table_prefix, $sql_query);
|
||||
$sql_query = preg_replace('/phpbb_/is', $table_prefix, $sql_query);
|
||||
|
||||
$sql_query = $remove_remarks($sql_query);
|
||||
$sql_query = split_sql_file($sql_query, $delimiter);
|
||||
@ -628,22 +551,7 @@ else
|
||||
|
||||
for($i = 0; $i < $sql_count; $i++)
|
||||
{
|
||||
$result = $db->sql_query($sql_query[$i]);
|
||||
if( !$result )
|
||||
{
|
||||
$error = $db->sql_error();
|
||||
|
||||
$template->assign_block_vars("switch_error_install", array());
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_ERROR_TITLE" => $lang['Installer_Error'],
|
||||
"L_ERROR" => $lang['Install_db_error'] . '<br />' . $error['message'])
|
||||
);
|
||||
|
||||
$template->pparse('body');
|
||||
|
||||
exit;
|
||||
}
|
||||
$db->sql_query($sql_query[$i]);
|
||||
}
|
||||
|
||||
//
|
||||
@ -659,22 +567,7 @@ else
|
||||
|
||||
for($i = 0; $i < $sql_count; $i++)
|
||||
{
|
||||
$result = $db->sql_query($sql_query[$i]);
|
||||
if( !$result )
|
||||
{
|
||||
$error = $db->sql_error();
|
||||
|
||||
$template->assign_block_vars("switch_error_install", array());
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_ERROR_TITLE" => $lang['Installer_Error'],
|
||||
"L_ERROR" => $lang['Install_db_error'] . "<br />" . $error["message"])
|
||||
);
|
||||
|
||||
$template->pparse('body');
|
||||
|
||||
exit;
|
||||
}
|
||||
$db->sql_query($sql_query[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -685,7 +578,8 @@ else
|
||||
// this we are going to pass them over to the admin_forum.php script
|
||||
// to set up their forum defaults.
|
||||
//
|
||||
$error = "";
|
||||
$admin_pass_md5 = ( $confirm && $userdata['user_level'] == ADMIN ) ? $admin_pass1 : md5($admin_pass1);
|
||||
$error = '';
|
||||
|
||||
//
|
||||
// Update the default admin user with their information.
|
||||
@ -728,8 +622,6 @@ else
|
||||
WHERE config_name = 'newest_username'";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$admin_pass_md5 = ( $confirm && $userdata['user_level'] == ADMIN ) ? $admin_pass1 : md5($admin_pass1);
|
||||
|
||||
$sql = "UPDATE " . $table_prefix . "users
|
||||
SET username = '" . str_replace("\'", "''", $admin_name) . "', user_password='" . str_replace("\'", "''", $admin_pass_md5) . "', user_lang = '" . str_replace("\'", "''", $language) . "', user_email='" . str_replace("\'", "''", $board_email) . "'
|
||||
WHERE username = 'Admin'";
|
||||
@ -739,11 +631,10 @@ else
|
||||
SET user_regdate = " . time();
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
//
|
||||
// Change session table to HEAP if MySQL version matches
|
||||
//
|
||||
if( preg_match("/^mysql/", $dbms) )
|
||||
if ( preg_match("/^mysql/", $dbms) )
|
||||
{
|
||||
$sql = "SELECT VERSION() AS mysql_version";
|
||||
if($result = $db->sql_query($sql))
|
||||
@ -760,7 +651,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
if( $error != "" )
|
||||
/* if ( $error != '' )
|
||||
{
|
||||
$template->assign_block_vars("switch_error_install", array());
|
||||
|
||||
@ -772,12 +663,12 @@ else
|
||||
$template->pparse('body');
|
||||
|
||||
exit;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if( !$reinstall && !$upgrade_now )
|
||||
if ( !$reinstall && !$upgrade_now )
|
||||
{
|
||||
$template->assign_block_vars("switch_common_install", array());
|
||||
// $template->assign_block_vars("switch_common_install", array());
|
||||
|
||||
//
|
||||
// Write out the config file.
|
||||
@ -796,8 +687,7 @@ else
|
||||
@umask(0111);
|
||||
$no_open = FALSE;
|
||||
|
||||
$fp = @fopen('config.'.$phpEx, 'w');
|
||||
if( !$fp )
|
||||
if ( !($fp = @fopen('../config.'.$phpEx, 'w')) )
|
||||
{
|
||||
//
|
||||
// Unable to open the file writeable do something here as an attempt
|
||||
@ -805,7 +695,7 @@ else
|
||||
//
|
||||
$s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars($config_data) . '" />';
|
||||
|
||||
if( extension_loaded('ftp') && !defined('NO_FTP') )
|
||||
if ( extension_loaded('ftp') && !defined('NO_FTP') )
|
||||
{
|
||||
$template->assign_block_vars('switch_ftp_option', array());
|
||||
|
||||
@ -821,7 +711,8 @@ else
|
||||
{
|
||||
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />';
|
||||
}
|
||||
if( $upgrade == 1 )
|
||||
|
||||
if ( $upgrade == 1 )
|
||||
{
|
||||
$s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="dbms" value="'.$dbms.'" />';
|
||||
@ -865,7 +756,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_block_vars("switch_common_install", array());
|
||||
// $template->assign_block_vars("switch_common_install", array());
|
||||
}
|
||||
|
||||
//
|
||||
@ -884,7 +775,7 @@ else
|
||||
// We are going to do this by calling the admin_board.php from the
|
||||
// normal board admin section.
|
||||
//
|
||||
if( !$reinstall )
|
||||
if ( !$reinstall )
|
||||
{
|
||||
$s_hidden_fields = '<input type="hidden" name="username" value="' . $admin_name . '" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="password" value="' . $admin_pass1 . '" />';
|
||||
@ -893,18 +784,11 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_hidden_fields = "";
|
||||
$s_hidden_fields = '';
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_INSTRUCTION_TEXT" => $lang['Inst_Step_2'],
|
||||
"L_SUBMIT" => $lang['Finish_Install'],
|
||||
|
||||
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
||||
"S_FORM_ACTION" => ( $reinstall ) ? append_sid("login.$phpEx") : "login.$phpEx")
|
||||
);
|
||||
|
||||
$template->pparse('body');
|
||||
page_header($lang['Inst_Step_2'], "../login.$phpEx");
|
||||
page_footer($lang['Finish_Install'], $s_hidden_fields);
|
||||
|
||||
exit;
|
||||
}
|
||||
@ -931,7 +815,7 @@ function slash_input_data(&$data)
|
||||
//
|
||||
//
|
||||
//
|
||||
function page_header($l_instructions)
|
||||
function page_header($l_instructions, $s_action)
|
||||
{
|
||||
global $phpEx, $lang;
|
||||
|
||||
@ -959,15 +843,20 @@ td.cat { background-image: url('../admin/images/cellpic1.gif') }
|
||||
|
||||
<table width="85%" cellspacing="0" cellpadding="0" border="0" align="center">
|
||||
<tr>
|
||||
<td><br clear="all" />
|
||||
<td><br clear="all" /><br />
|
||||
|
||||
<p><?php echo $l_instructions; ?></p>
|
||||
|
||||
<form action="install.<?php echo $phpEx; ?>" name="install_form" method="post"><table class="bg" width="100%" cellspacing="1" cellpadding="2" border="0">
|
||||
<br clear="all" />
|
||||
|
||||
<form action="<?php echo $s_action; ?>" name="install_form" method="post"><table class="bg" width="100%" cellspacing="1" cellpadding="2" border="0">
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
function page_footer($l_submit, $s_hidden_fields)
|
||||
{
|
||||
global $lang;
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Basic DB data for phpBB2 devel
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# -- Config
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('config_id','1');
|
||||
@ -29,13 +30,13 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1'
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','30');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold','25');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars','255');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options','10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_box_privmsgs','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','youraddress@yourdomain.com');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0');
|
||||
@ -45,10 +46,11 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','')
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_enable','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_interval','10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path','images/avatars/upload');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path','images/avatars/gallery');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path','images/smiles');
|
||||
@ -62,15 +64,15 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.myserver.tld');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('newest_user_id', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('newest_username', 'Admin');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('newest_username', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('num_users', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('num_posts', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('num_topics', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '1.0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '1.5');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('active_sessions', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_gc', '3600');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_last_gc', '0');
|
||||
@ -127,16 +129,16 @@ INSERT INTO phpbb_auth_options (auth_type, auth_option) VALUES ('admin', 'clearl
|
||||
|
||||
|
||||
# -- phpbb_styles
|
||||
INSERT INTO phpbb_styles (style_id, template_id, theme_id, imageset_id, style_name, style_default) VALUES (1, 1, 1, 1, 'subSilver', 1);
|
||||
INSERT INTO phpbb_styles (style_id, template_id, theme_id, imageset_id, style_name) VALUES (1, 1, 1, 1, 'subSilver');
|
||||
|
||||
# -- phpbb_styles_imageset
|
||||
INSERT INTO phpbb_styles_imageset (imageset_id, imageset_name, imageset_path, post_new, post_locked, post_pm, reply_new, reply_pm, reply_locked, icon_quote, icon_edit, icon_search, icon_profile, icon_pm, icon_email, icon_www, icon_icq, icon_aim, icon_yim, icon_msnm, icon_no_edit, icon_no_email, icon_no_www, icon_no_icq, icon_no_aim, icon_no_yim, icon_no_msnm, icon_delete, icon_ip, goto_post, goto_post_new, goto_post_latest, goto_post_newest, forum, forum_new, forum_locked, folder, folder_new, folder_hot, folder_hot_new, folder_locked, folder_locked_new, folder_sticky, folder_sticky_new, folder_announce, folder_announce_new, topic_watch, topic_unwatch, poll_left, poll_center, poll_right, rating) VALUES (1, 'subSilver © phpBB Group', 'subSilver', '"imagesets/subSilver/{LANG}/post.gif" width="82" height="25" border="0"', '"imagesets/subSilver/{LANG}/reply-locked.gif" width="82" height="25" border="0"', '"imagesets/subSilver/{LANG}/post.gif" width="82" height="25" border="0"', '"imagesets/subSilver/{LANG}/reply.gif" width="88" height="27" border="0"', '"imagesets/subSilver/{LANG}/reply.gif" width="88" height="27" border="0"', '"imagesets/subSilver/{LANG}/reply-locked.gif" width="82" height="25" border="0"', '"imagesets/subSilver/{LANG}/icon_quote.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_edit.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_search.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_profile.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_pm.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_email.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_www.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_icq_add.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_aim.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_yim.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_msnm.gif" width="59" height="18" border="0"', '', '', '', '', '', '', '', '"imagesets/subSilver/icon_delete.gif" width="16" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_ip.gif" width="16" height="18" border="0"', '"imagesets/subSilver/icon_minipost.gif" width="12" height="9" border="0"', '"imagesets/subSilver/icon_minipost_new.gif" width="12" height="9" border="0"', '"imagesets/subSilver/icon_latest_reply.gif" width="18" height="9" border="0"', '"imagesets/subSilver/icon_newest_reply.gif" width="18" height="9" border="0"', '"imagesets/subSilver/folder_big.gif" width="46" height="25" border="0"', '"imagesets/subSilver/folder_new_big.gif" width="46" height="25" border="0"', '"imagesets/subSilver/folder_locked_big.gif" width="46" height="25" border="0"', '"imagesets/subSilver/folder.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_new.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_hot.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_new_hot.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_lock.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_lock_new.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_sticky.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_sticky_new.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_announce.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_announce_new.gif" width="19" height="18" border="0"', '', '', '"imagesets/subSilver/voting_lcap.gif" width="4" height="12" border="0"', '"imagesets/subSilver/voting_rcap.gif" height="12" border="0"', '"imagesets/subSilver/voting_bar.gif" width="4" height="12" border="0"', '"imagesets/subSilver/ratings/{RATE}.gif" width="45" height="17" border="0"');
|
||||
INSERT INTO phpbb_styles_imageset (imageset_id, imageset_name, imageset_path, post_new, post_locked, post_pm, reply_new, reply_pm, reply_locked, icon_quote, icon_edit, icon_search, icon_profile, icon_pm, icon_email, icon_www, icon_icq, icon_aim, icon_yim, icon_msnm, icon_no_email, icon_no_www, icon_no_icq, icon_no_aim, icon_no_yim, icon_no_msnm, icon_delete, icon_ip, goto_post, goto_post_new, goto_post_latest, goto_post_newest, forum, forum_new, forum_locked, folder, folder_new, folder_hot, folder_hot_new, folder_locked, folder_locked_new, folder_sticky, folder_sticky_new, folder_announce, folder_announce_new, topic_watch, topic_unwatch, poll_left, poll_center, poll_right, rating) VALUES (1, 'subSilver © phpBB Group', 'subSilver', '"imagesets/subSilver/{LANG}/post.gif" width="82" height="25" border="0"', '"imagesets/subSilver/{LANG}/reply-locked.gif" width="82" height="25" border="0"', '"imagesets/subSilver/{LANG}/post.gif" width="82" height="25" border="0"', '"imagesets/subSilver/{LANG}/reply.gif" width="88" height="27" border="0"', '"imagesets/subSilver/{LANG}/reply.gif" width="88" height="27" border="0"', '"imagesets/subSilver/{LANG}/reply-locked.gif" width="82" height="25" border="0"', '"imagesets/subSilver/{LANG}/icon_quote.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_edit.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_search.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_profile.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_pm.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_email.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_www.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_icq_add.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_aim.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_yim.gif" width="59" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_msnm.gif" width="59" height="18" border="0"', '', '', '', '', '', '', '"imagesets/subSilver/icon_delete.gif" width="16" height="18" border="0"', '"imagesets/subSilver/{LANG}/icon_ip.gif" width="16" height="18" border="0"', '"imagesets/subSilver/icon_minipost.gif" width="12" height="9" border="0"', '"imagesets/subSilver/icon_minipost_new.gif" width="12" height="9" border="0"', '"imagesets/subSilver/icon_latest_reply.gif" width="18" height="9" border="0"', '"imagesets/subSilver/icon_newest_reply.gif" width="18" height="9" border="0"', '"imagesets/subSilver/folder_big.gif" width="46" height="25" border="0"', '"imagesets/subSilver/folder_new_big.gif" width="46" height="25" border="0"', '"imagesets/subSilver/folder_locked_big.gif" width="46" height="25" border="0"', '"imagesets/subSilver/folder.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_new.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_hot.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_new_hot.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_lock.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_lock_new.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_sticky.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_sticky_new.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_announce.gif" width="19" height="18" border="0"', '"imagesets/subSilver/folder_announce_new.gif" width="19" height="18" border="0"', '', '', '"imagesets/subSilver/voting_lcap.gif" width="4" height="12" border="0"', '"imagesets/subSilver/voting_rcap.gif" height="12" border="0"', '"imagesets/subSilver/voting_bar.gif" width="4" height="12" border="0"', '"imagesets/subSilver/ratings/{RATE}.gif" width="45" height="17" border="0"');
|
||||
|
||||
# -- phpbb_styles_template
|
||||
INSERT INTO phpbb_styles_template (template_id, template_name, template_path, poll_length, pm_box_length, compile_crc) VALUES (1, 'subSilver © phpBB Group', 'subSilver', 205, 175, '');
|
||||
|
||||
# -- phpbb_styles_theme
|
||||
INSERT INTO phpbb_styles_theme (theme_id, css_data, css_external) VALUES (1, 'th { background-image: url(templates/subSilver/images/cellpic3.gif) }\r\ntd.cat { background-image: url(templates/subSilver/images/cellpic1.gif) }\r\ntd.rowpic { background-image: url(templates/subSilver/images/cellpic2.jpg); background-repeat: repeat-y }\r\ntd.icqback { background-image: url(templates/subSilver/images/icon_icq_add.gif); background-repeat: no-repeat }\r\ntd.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom { background-image: url(templates/subSilver/images/cellpic1.gif) }\r\nTH.thTop { background-image: url(templates/subSilver/images/cellpic3.gif) }', 'subSilver/subSilver.css');
|
||||
INSERT INTO phpbb_styles_theme (theme_id, css_data, css_external) VALUES (1, 'th { background-image: url(templates/subSilver/images/cellpic3.gif) }\r\ntd.cat { background-image: url(templates/subSilver/images/cellpic1.gif) }\r\ntd.rowpic { background-image: url(templates/subSilver/images/cellpic2.jpg); background-repeat: repeat-y }\r\ntd.icqback { background-image: url(templates/subSilver/images/icon_icq_add.gif); background-repeat: no-repeat }\r\ntd.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom { background-image: url(templates/subSilver/images/cellpic1.gif) }\r\nth.thTop { background-image: url(templates/subSilver/images/cellpic3.gif) }', 'subSilver/subSilver.css');
|
||||
|
||||
|
||||
# -- Categories
|
||||
@ -148,10 +150,10 @@ INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order,
|
||||
|
||||
|
||||
# -- Users
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 0, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
|
||||
INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
|
||||
|
||||
# -- username: admin password: admin (change this or remove it once everything is working!)
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 1, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
|
||||
INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
|
||||
|
||||
|
||||
# -- Ranks
|
||||
@ -160,16 +162,29 @@ INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image
|
||||
|
||||
# -- Groups
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type) VALUES (1, 'REGISTERED', 0);
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type) VALUES (1, 'ADMINISTRATOR', 0);
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type) VALUES (2, 'ADMINISTRATOR', 0);
|
||||
|
||||
|
||||
# -- User -> Group
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, 1, 0);
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 1, 0);
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, 2, 0);
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);
|
||||
|
||||
|
||||
# -- User auth
|
||||
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_allow_deny) SELECT -1, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_type LIKE 'forum' AND auth_option IN ('list', 'read', 'post', 'reply');
|
||||
|
||||
# -- Group auth
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_allow_deny) SELECT 2, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_type IN ('admin');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_allow_deny) SELECT 1, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_type IN ('forum', 'mod');
|
||||
|
||||
# -- Prefetch auth
|
||||
INSERT INTO phpbb_auth_prefetch (user_id, forum_id, auth_option_id, auth_allow_deny) SELECT -1, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_type LIKE 'forum' AND auth_option IN ('list', 'read', 'post', 'reply');
|
||||
INSERT INTO phpbb_auth_prefetch (user_id, forum_id, auth_option_id, auth_allow_deny) SELECT 2, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_type IN ('admin');
|
||||
INSERT INTO phpbb_auth_prefetch (user_id, forum_id, auth_option_id, auth_allow_deny) SELECT 2, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_type IN ('forum', 'mod');
|
||||
|
||||
|
||||
# -- Demo Topic
|
||||
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1);
|
||||
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_first_post_id, topic_last_post_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 1, 1);
|
||||
|
||||
|
||||
# -- Demo Post
|
||||
|
@ -48,10 +48,10 @@ CREATE TABLE phpbb_auth_options (
|
||||
# Table structure for table `phpbb_auth_prefetch`
|
||||
#
|
||||
CREATE TABLE phpbb_auth_prefetch (
|
||||
user_id mediumint(8) unsigned NOT NULL default '0',
|
||||
user_id mediumint(8) NOT NULL default '0',
|
||||
forum_id mediumint(8) unsigned NOT NULL default '0',
|
||||
auth_option_id smallint(5) unsigned NOT NULL default '0',
|
||||
auth_allow_deny tinyint(4) NOT NULL default '1')
|
||||
auth_allow_deny tinyint(4) NOT NULL default '1'
|
||||
);
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ CREATE TABLE phpbb_auth_prefetch (
|
||||
# Table structure for table `phpbb_auth_users`
|
||||
#
|
||||
CREATE TABLE phpbb_auth_users (
|
||||
user_id mediumint(8) unsigned NOT NULL default '0',
|
||||
user_id mediumint(8) NOT NULL default '0',
|
||||
forum_id mediumint(8) unsigned NOT NULL default '0',
|
||||
auth_option_id smallint(5) unsigned NOT NULL default '0',
|
||||
auth_allow_deny tinyint(4) NOT NULL default '1'
|
||||
@ -134,6 +134,8 @@ CREATE TABLE phpbb_disallow (
|
||||
#
|
||||
CREATE TABLE phpbb_forums (
|
||||
forum_id smallint(5) UNSIGNED NOT NULL,
|
||||
cat_id smallint(5) UNSIGNED NOT NULL,
|
||||
|
||||
parent_id smallint(5) UNSIGNED NOT NULL,
|
||||
forum_order smallint(5) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user