Пример #1
0
define("INCLUDES", "includes/");
define("MODULES", "modules/");
define("CONFIG_FILE", "includes/config.inc.php");
require_once "includes/functions.php";
require_once "includes/helpers.php";
require_once "includes/html_functions.php";
require_once CONFIG_FILE;
// Connect to the database server and select database.
$db = createDatabaseConnection($db_type, $db_host, $db_user, $db_pass, $db_name, $table_prefix);
$settings = $db->getSettings();
@($GLOBALS['panel_language'] = $settings['panel_language']);
// Load languages.
include_once "includes/lang.php";
ogpLang();
require_once "includes/view.php";
$view = new OGPView();
$view->setCharset(get_lang('lang_charset'));
$view->setTimeZone($settings['time_zone']);
if (isset($_GET['type']) && $_GET['type'] == 'cleared') {
    heading(true);
    $view->printView(true);
} else {
    ogpHome();
    $view->printView();
}
function heading()
{
    global $db, $view, $settings;
    if (!file_exists(CONFIG_FILE)) {
        print_failure(get_lang('failed_to_read_config'));
        $view->refresh("index.php");
Пример #2
0
    exit;
}
if ('' == file_get_contents(CONFIG_FILE)) {
    header('Location: install.php');
    exit;
}
require_once CONFIG_FILE;
// Connect to the database server and select database.
$db = createDatabaseConnection($db_type, $db_host, $db_user, $db_pass, $db_name, $table_prefix);
$settings = $db->getSettings();
@($GLOBALS['panel_language'] = $settings['panel_language']);
// Load languages.
include_once "includes/lang.php";
ogpLang();
require_once "includes/view.php";
$view = new OGPView();
$view->setCharset(get_lang('lang_charset'));
if (isset($_GET['type']) && $_GET['type'] == 'cleared') {
    heading(true);
    $view->printView(true);
} else {
    ogpHome();
    $view->printView();
}
function heading()
{
    global $db, $view, $settings;
    $view->setCharset(get_lang('lang_charset'));
    $view->setTimeZone($settings['time_zone']);
    if (!file_exists(CONFIG_FILE)) {
        print_failure(get_lang('failed_to_read_config'));