Login   Register  
PHP Classes
elePHPant
Icontem

File: db_config.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Olaf Lederer  >  DB Cart Class  >  db_config.php  >  Download  
File: db_config.php
Role: Configuration script
Content type: text/plain
Description: Database and application variables
Class: DB Cart Class
Manage a shopping cart stored in a MySQL database
Author: By
Last change: modified definition of the application file names
Date: 9 years ago
Size: 1,760 bytes
 

Contents

Class file image Download
<?php 
// db connection
if (!defined("DB_SERVER")) define("DB_SERVER""localhost");
if (!
defined("DB_NAME")) define("DB_NAME""database");
if (!
defined("DB_USER")) define ("DB_USER""user");
if (!
defined("DB_PASSWORD")) define ("DB_PASSWORD""pw");

// db tables (change the names if you need)
define("ORDERS""db_cart_orders");
define("ORDER_ROWS""db_cart_rows");
define("SHIP_ADDRESS""db_cart_shipment");

// cart "globals"
define("CURRENCY"""); // use "", "$", "" or ""
define("INCL_VAT"true);
define("VAT_VALUE"19); // the standard VAT is used by methods if the vat value is not filled
define("SITE_MASTER""Your shop"); // the contact information for the order confirmation
define("SITE_MASTER_MAIL""some_mail@gmail.com");
define("MAIL_ENCODING""iso-8859-1"); // change is if you need...
define("DATE_FORMAT""d-m-Y");
define("RECOVER_ORDER"false); // if this value is true an old order is available for old orders from customers, use "false" to remove the old order while the next access
define("VALID_UNTIL"86400); // the value of seconds how long an old order is valid (default 7 days) and will be recoverd

// some filename constants, you have to change this!
// use different names for the stock examples
$use_stock true// switch between true and false to use the variabels for the stock examples or not
if ($use_stock) {
    
$catalog "db_cart_stock_example.php";
    
$checkput "db_cart_checkout_stock_example.php";
    
$confirm "db_cart_stock_confirm.php";
} else {
    
$catalog "db_cart_example.php";
    
$checkput "db_cart_checkout_example.php";
    
$confirm "db_cart_confirm.php";
}
define("PROD_IDX"$catalog); 
define("CHECKOUT"$checkput);
define("CONFIRM"$confirm); 
?>