Ejemplo n.º 1
0
$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));
    die;
}
Ejemplo n.º 2
0
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
if (isset($_COOKIE['ComaCMS_user_lang'])) {
    // check if the language-file is available
    if (file_exists("../lang/lang_{$_COOKIE['ComaCMS_user_lang']}.php")) {