parse_incoming();
$ipsclass->initiate_ipsclass();
//--------------------------------
// Setup Main Installer Class
//--------------------------------
require( INS_ROOT_PATH . 'core/class_installer.php' );
require( INS_ROOT_PATH . 'custom/app.php' );
$install = new application_installer();
$install->ipsclass =& $ipsclass;
$install->read_config();
$install->template = new install_template( $ipsclass );
$install->template->product_name = $install->product_name;
$install->template->product_version = $install->product_version;
$install->template->product_long_version = $install->product_long_version;
//--------------------------------
// Saved Data
//--------------------------------
$install->saved_data = unserialize( urldecode( stripslashes( $_POST['saved_data'] ) ) );
//--------------------------------
// Test lock
//--------------------------------
if ( $ipsclass->input['p'] != 'done' )
{
$got_lock = $install->check_lock();
if ( $got_lock )
{
$install->template->hide_next = 1;
$install->template->warning( array( "This installer is locked. Via FTP please delete the file 'installfiles/lock.php' and then refresh this page." ) );
$install->template->output( $install->product_name, $install->product_version );
exit();
}
}
//--------------------------------
// Make sure we've renamed conf_global.php
//--------------------------------
if ( file_exists( INS_DOC_ROOT_PATH.'conf_global.php.dist') AND ! file_exists( INS_DOC_ROOT_PATH.'conf_global.php') )
{
if ( ! @rename( INS_DOC_ROOT_PATH.'conf_global.php.dist', INS_DOC_ROOT_PATH.'conf_global.php' ) )
{
$install->template->hide_next = 1;
$install->template->warning( array( "You MUST rename the file 'conf_global.php.dist' TO 'conf_global.php' before continuing.
This file can be found in the root forum directory on your FTP server, the same directory where 'admin.php' and 'index.php' are stored." ) );
$install->template->output( $install->product_name, $install->product_version );
exit();
}
}
// -------------------------------
// Run Install Step
// -------------------------------
$install->pre_process();
$install->process();
$install->post_process();
// -------------------------------
// Output
// -------------------------------
$install->template->saved_data = serialize( $install->saved_data );
$install->template->output( $install->product_name, $install->product_version );
?>