Beispiel #1
0
<?php

require 'config.php';
require 'language/' . DEFAULT_LANGUAGE . '/language.php';
require 'includes/functions.php';
require 'includes/db/' . DB_TYPE . '/query_factory.php';
$context_ref = isset($_GET['idx']) ? $_GET['idx'] : '';
// Load db class
$db = new queryFactory();
if (!$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE)) {
    echo $db->show_error() . '<br />';
    die(NO_CONNECT_DB);
}
$current = check_version();
// make sure db is current with latest information files
$result = false;
if ($context_ref) {
    $result = $db->Execute("select doc_url from " . DB_PREFIX . "zh_search where doc_pos = '" . $context_ref . "'");
}
$start_page = !$result ? DOC_ROOT_URL . '/' . DOC_HOME_PAGE : $result->fields['doc_url'];
//$start_page = DOC_ROOT_URL . '/' . DOC_HOME_PAGE;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php 
echo HEADING_TITLE;
?>
</title>
<link rel="stylesheet" href="css/phreehelp.css">
Beispiel #2
0
     if (!install_build_co_config_file($db_name, 'DB_SERVER_USERNAME', $db_username)) {
         $error = true;
     }
     if (!install_build_co_config_file($db_name, 'DB_SERVER_PASSWORD', $db_password)) {
         $error = true;
     }
     if (!install_build_co_config_file($db_name, 'DB_SERVER_HOST', $db_host)) {
         $error = true;
     }
 }
 if (!$error) {
     // try to connect to db
     require '../includes/db/' . DB_TYPE . '/query_factory.php';
     $db = new queryFactory();
     if (!$db->connect($db_host, $db_username, $db_password, $db_name)) {
         $error = $messageStack->add(MSG_ERROR_CANNOT_CONNECT_DB . $db->show_error(), 'error');
     } else {
         // test for InnoDB support
         $result = $db->Execute("show engines");
         $innoDB_enabled = false;
         while (!$result->EOF) {
             if ($result->fields['Engine'] == 'InnoDB') {
                 $innoDB_enabled = true;
             }
             $result->MoveNext();
         }
         if (!$innoDB_enabled) {
             $error = $messageStack->add(MSG_ERROR_INNODB_NOT_ENABLED, 'error');
         }
     }
 }