$lib = new ComaLib(); $extern_page = GetPostOrGet('page'); $queries_count = 0; define('DB_PREFIX', $d_pre); $sqlConnection = new Sql($d_user, $d_pw, $d_server); $sqlConnection->Connect($d_base); $config = new Config(); $config->LoadAll(); $user = new User($sqlConnection); $output = new ComaLate(); $styleName = $config->Get('style', 'default'); $headerStyleName = GetPostOrGet('style'); if (!empty($headerStyleName)) { $styleName = $headerStyleName; } $output->LoadTemplate('./styles/', $styleName); $output->SetMeta('generator', 'ComaCMS v0.2 (http://comacms.berlios.de)'); $output->SetCondition('notinadmin', true); if (!isset($extern_page) && endsWith($_SERVER['PHP_SELF'], 'index.php')) { $extern_page = $config->Get('default_page', 'home'); } elseif (!isset($extern_page)) { $extern_page = ''; } if (startsWith($extern_page, 'a:')) { header('Location: admin.php?page=' . substr($extern_page, 2)); die; } elseif (startsWith($extern_page, 's:')) { header('Location: special.php?page=' . substr($extern_page, 2)); die; } elseif (startsWith($extern_page, 'l:')) { header('Location: index.php?page=' . substr($extern_page, 2));
require_once __ROOT__ . '/classes/sql.php'; require_once __ROOT__ . '/functions.php'; require_once __ROOT__ . '/lib/comalate/comalate.class.php'; require_once __ROOT__ . '/install/install.class.php'; // ComaLib $lib = new ComaLib(); // SqlConnection to prevent errors $sqlConnection = new Sql('', '', ''); // Get style for the page $extern_style = GetPostOrGet('style'); if (empty($extern_style)) { $extern_style = 'comacms'; } // ComaLate for output replacements and template support $output = new ComaLate(); $output->LoadTemplate('../styles/', $extern_style); $output->AddCssFile('./install.css'); $output->SetMeta('generator', 'ComaCMS v0.2 (http://comacms.berlios.de)'); $output->SetCondition('notinadmin', true); $output->SetCondition('notathome', true); $output->Title = 'ComaCMS - Installation'; // Get the actual subpage of the installation $extern_page = 1; $extern_page = GetPostOrGet('page'); // Check external page if (!is_numeric($extern_page)) { $extern_page = 1; } // Local language variable $language = ''; // try to get the language-setting from the language-cookie