Exemplo n.º 1
0
// IBM_DB2
if (zbx_is_callable(array('db2_connect', 'db2_set_option', 'db2_prepare', 'db2_execute', 'db2_fetch_assoc'))) {
    $ZBX_CONFIG['allowed_db']['IBM_DB2'] = 'IBM DB2';
}
// SQLITE3. The false is here to avoid autoloading of the class.
if (class_exists('SQLite3', false) && zbx_is_callable(array('ftok', 'sem_acquire', 'sem_release', 'sem_get'))) {
    $ZBX_CONFIG['allowed_db']['SQLITE3'] = 'SQLite3';
}
if (count($ZBX_CONFIG['allowed_db']) == 0) {
    $ZBX_CONFIG['allowed_db']['no'] = 'No';
}
/*
 * Setup wizard
 */
global $ZBX_SETUP_WIZARD;
$ZBX_SETUP_WIZARD = new CSetupWizard($ZBX_CONFIG);
zbx_set_post_cookie('ZBX_CONFIG', serialize($ZBX_CONFIG));
require_once dirname(__FILE__) . '/include/page_header.php';
include 'include/views/js/setup.js.php';
/*
 * Check configuration
 */
global $ZBX_CONFIGURATION_FILE;
if (file_exists($ZBX_CONFIGURATION_FILE)) {
    if (isset($_REQUEST['message'])) {
        show_error_message($_REQUEST['message']);
    }
}
$ZBX_SETUP_WIZARD->show();
unset($_POST);
require_once dirname(__FILE__) . '/include/page_footer.php';