mysql_close($link); } } else { $error = true; $topass['message']['type'] = MESSAGE_ERROR; $topass['message']['text'][] = 'Database Host or user or password are wrong.'; } } else { $error = true; $topass['message']['type'] = MESSAGE_ERROR; $topass['message']['text'][] = 'Server configuration does not allow db connections.'; } } else { $error = true; $topass['message']['type'] = MESSAGE_ERROR; $topass['message']['text'][] = 'Server configuration does not allow db connections.'; } if (!$error) { require_once '../../includes/classes/etano_package.class.php'; db_connect($_SESSION['install']['input']['dbhost'], $_SESSION['install']['input']['dbuser'], $_SESSION['install']['input']['dbpass'], $_SESSION['install']['input']['dbname']); $p = new etano_package(); if (!$p->db_insert_file(dirname(__FILE__) . '/../sql/db.sql')) { trigger_error($p->manual_actions[count($p->manual_actions) - 1]['error'], E_USER_ERROR); } } else { $nextpage = 'install/step3.php'; } } $my_url = str_replace('/install/processors/insert_db.php', '', $_SERVER['PHP_SELF']); define('_BASEURL_', (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $my_url); redirect2page($nextpage, $topass, $qs);