[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/includes/init_includes/ -> init_database.php (source)

   1  <?php
   2  /**

   3   * Initialise database driver and connect

   4   * see {@link  http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.

   5   *

   6   * @package initSystem

   7   * @copyright Copyright 2003-2006 Zen Cart Development Team

   8   * @copyright Portions Copyright 2003 osCommerce

   9   * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

  10   * @version $Id: init_database.php 3008 2006-02-11 09:32:24Z drbyte $

  11   */
  12  if (!defined('IS_ADMIN_FLAG')) {
  13    die('Illegal Access');
  14  }
  15  /**

  16   * require the query_factory clsss based on the DB_TYPE

  17   */
  18  require('includes/classes/db/' .DB_TYPE . '/query_factory.php');
  19  $db = new queryFactory();
  20  
  21  $down_for_maint_source = 'nddbc.html';
  22  
  23  if (!$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false)) {
  24    if (file_exists('zc_install/index.php')) {
  25      header('location: zc_install/index.php');
  26      exit;
  27    } elseif (file_exists($down_for_maint_source)) {
  28      if (defined('HTTP_SERVER') && defined('DIR_WS_CATALOG')) {
  29        header('location: ' . HTTP_SERVER . DIR_WS_CATALOG . $down_for_maint_source );
  30      } else {
  31        header('location: ' . $down_for_maint_source );
  32  //    header('location: mystoreisdown.html');

  33      }
  34      exit;
  35    } else {
  36      exit;
  37    }
  38  }
  39  ?>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics