Exemplo n.º 1
0
// compatibility work-around logic for PHP4
require 'includes/functions/compatibility.php';
// include the list of project filenames
require 'includes/filenames.php';
// include the list of project database tables
require 'includes/database_tables.php';
// initialize the message stack for output messages
require 'includes/classes/message_stack.php';
$messageStack = new messageStack();
// initialize the cache class
require 'includes/classes/cache.php';
$osC_Cache = new osC_Cache();
// include the database class
require 'includes/classes/database.php';
// make a connection to the database... now
$osC_Database = osC_Database::connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
$osC_Database->selectDatabase(DB_DATABASE);
// set the application parameters
$Qcfg = $osC_Database->query('select configuration_key as cfgKey, configuration_value as cfgValue from :table_configuration');
$Qcfg->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qcfg->setCache('configuration');
$Qcfg->execute();
while ($Qcfg->next()) {
    define($Qcfg->value('cfgKey'), $Qcfg->value('cfgValue'));
}
$Qcfg->freeResult();
// include functions
require 'includes/functions/general.php';
require 'includes/functions/html_output.php';
// include and start the services
require 'includes/classes/services.php';
Exemplo n.º 2
0
<?php

/*
  $Id: step_6.php $
  TomatoCart Open Source Shopping Cart Solutions
  http://www.tomatocart.com

  Copyright (c) 2009 Wuxi Elootec Technology Co., Ltd;  Copyright (c) 2007 osCommerce

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/
define('DB_TABLE_PREFIX', $_POST['DB_TABLE_PREFIX']);
include '../includes/database_tables.php';
$osC_Database = osC_Database::connect($_POST['DB_SERVER'], $_POST['DB_SERVER_USERNAME'], $_POST['DB_SERVER_PASSWORD'], $_POST['DB_DATABASE_CLASS']);
$osC_Database->selectDatabase($_POST['DB_DATABASE']);
//configuration
$Qupdate = $osC_Database->query('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
$Qupdate->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qupdate->bindValue(':configuration_value', $_POST['CFG_STORE_NAME']);
$Qupdate->bindValue(':configuration_key', 'STORE_NAME');
$Qupdate->execute();
$Qupdate = $osC_Database->query('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
$Qupdate->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qupdate->bindValue(':configuration_value', $_POST['CFG_STORE_OWNER_NAME']);
$Qupdate->bindValue(':configuration_key', 'STORE_OWNER');
$Qupdate->execute();
$Qupdate = $osC_Database->query('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
$Qupdate->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qupdate->bindValue(':configuration_value', $_POST['CFG_STORE_OWNER_EMAIL_ADDRESS']);
Exemplo n.º 3
0
  http://www.oscommerce.com

  Copyright (c) 2004 osCommerce

  Released under the GNU General Public License
*/
?>

<p class="pageTitle"><?php 
echo PAGE_TITLE_UPGRADE;
?>
</p>

<?php 
$db = array('DB_SERVER' => trim($_POST['DB_SERVER']), 'DB_SERVER_USERNAME' => trim($_POST['DB_SERVER_USERNAME']), 'DB_SERVER_PASSWORD' => trim($_POST['DB_SERVER_PASSWORD']), 'DB_DATABASE' => trim($_POST['DB_DATABASE']));
$osC_Database = osC_Database::connect($db['DB_SERVER'], $db['DB_SERVER_USERNAME'], $db['DB_SERVER_PASSWORD']);
if ($osC_Database->isError() === false) {
    $osC_Database->selectDatabase($db['DB_DATABASE']);
}
if ($osC_Database->isError()) {
    ?>

<form name="upgrade" action="upgrade.php" method="post">

<table width="95%" border="0" cellpadding="2" class="formPage">
  <tr>
    <td><?php 
    echo sprintf(ERROR_UNSUCCESSFUL_DATABASE_CONNECTION, $osC_Database->getError());
    ?>
</td>
  </tr>
Exemplo n.º 4
0
require 'includes/filenames.php';
// include the list of project database tables
require '../includes/database_tables.php';
// initialize the message stack for output messages
require 'includes/classes/message_stack.php';
$osC_MessageStack = new osC_MessageStack_Admin();
// initialize the cache class
require '../includes/classes/cache.php';
$osC_Cache = new osC_Cache();
// include the administrators log class
if (file_exists('includes/applications/administrators_log/classes/administrators_log.php')) {
    include 'includes/applications/administrators_log/classes/administrators_log.php';
}
// include the database class
require '../includes/classes/database.php';
$osC_Database = osC_Database::connect();
// set application wide parameters
$Qcfg = $osC_Database->query('select configuration_key as cfgKey, configuration_value as cfgValue from :table_configuration');
$Qcfg->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qcfg->setCache('configuration');
$Qcfg->execute();
while ($Qcfg->next()) {
    define($Qcfg->value('cfgKey'), $Qcfg->value('cfgValue'));
}
$Qcfg->freeResult();
// define our general functions used application-wide
require '../includes/functions/general.php';
require 'includes/functions/general.php';
require '../includes/functions/html_output.php';
require 'includes/functions/html_output.php';
// include session class