Location: PHPKode > projects > NetOffice > netoffice/general/error.php
<?php // $Revision: 1.10 $
/* vim: set expandtab ts=4 sw=4 sts=4: */

/**
 * $Id: error.php,v 1.10 2004/01/18 20:55:07 madbear Exp $
 *
 * Copyright (c) 2003 by the NetOffice developers
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

require_once('../includes/settings.php');

$blank = 'true';
require_once('../themes/' . THEME . '/block.class.php');
require_once('../themes/' . THEME . '/header.php');

// language detection
if ($langDefault == '') {
    if (isset($HTTP_ACCEPT_LANGUAGE)) {
        $plng = split(',', $HTTP_ACCEPT_LANGUAGE);
        if (count($plng) > 0) {
            while (list($k, $v) = each($plng)) {
                $k = split(';', $v, 1);
                $k = split('-', $k[0]);
                if (@file_exists('../languages/lang_' . $k[0] . '.php')) {
                    $langDefault = $k[0];
                    break;
                }
                $langDefault = 'en';
            }
        } else {
            $langDefault = 'en';
        }
    } else {
        $langDefault = 'en';
    }
}

require_once('../languages/lang_' . $langDefault . '.php');

$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs('&nbsp;');
$blockPage->closeBreadcrumbs();

$block1 = new block();
$block1->heading('NetOffice : Error');

$block1->openContent();

if ($HTTP_GET_VARS['type'] == 'myserver') {
    if ($databaseType == 'mysql') {
        $block1->contentTitle('MySQL Error');
    }
    $block1->contentRow('', $strings['error_server']);
}

if ($HTTP_GET_VARS['type'] == 'mydatabase') {
    if ($databaseType == 'mysql') {
        $block1->contentTitle('MySQL Error');
    }
    $block1->contentRow('', $strings['error_database']);
}

if ($HTTP_GET_VARS['type'] == 'phpversion') {
    $block1->contentTitle('PHP Version Error');
    $block1->contentRow('', $strings['error_phpversion']);
}

$block1->closeContent();

$footerDev = false;
require_once('../themes/' . THEME . '/footer.php');

?>
Return current item: NetOffice