Login   Register  
PHP Classes
elePHPant
Icontem

File: shopping_cart_DBVar.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of DavidLanz  >  Hippo Shopping Cart  >  shopping_cart_DBVar.php  >  Download  
File: shopping_cart_DBVar.php
Role: Configuration script
Content type: text/plain
Description: declaration of global variables
Class: Hippo Shopping Cart
Manage shopping cart of products stored in MySQL
Author: By
Last change:
Date: 9 years ago
Size: 2,483 bytes
 

Contents

Class file image Download
<?php
  $connection_method 
"mysql";
  if(
$connection_method=="mysql")
  {
    
$host='localhost';            // Hostname of MySQL server
    
$dbUser='root';               // Username for MySQL
    
$dbPass='password';           // Password for MySQL
    
$dbPort='3306';               // Port of MySQL
    
$dbName1='shoppingcart';           // Database name1
    
$dbTable1='products_detail';       // Table name1
    
$dbTable2='customer_detail';       // Table name2
  
}
  elseif(
$connection_method=="mssql")
  {
    
$host='localhost';              // Hostname of MSSQL server
    
$dbUser='sa';                   // Username for MSSQL
    
$dbPass='1234';                 // Password for MSSQL
  
}
  
  
// Site Master Email
  
$admin_email[0] = "someone@mail.com";
  
$err_mail_title "Shopping_Cart_Error_Report";
  
  
// get date
  
$today getdate();
  
$todayyear $today[year];
  
$todaymonth =$today[month];
  
$todayday $today[mday];
   
  switch(
$todaymonth)
  {
    case 
"January":
      
$todaymonth "01";
      break;
    case 
"February":
      
$todaymonth "02";
      break;
    case 
"March":
      
$todaymonth "03";
      break;
    case 
"April":
      
$todaymonth "04";
      break;
    case 
"May":
      
$todaymonth "05";
      break;
    case 
"June":
      
$todaymonth "06";
      break;
    case 
"July":
      
$todaymonth "07";
      break;
    case 
"August":
      
$todaymonth "08";
      break;
    case 
"September":
      
$todaymonth "09";
      break;
    case 
"October":
      
$todaymonth "10";
      break;
    case 
"November":
      
$todaymonth "11";
      break;
    case 
"December":
      
$todaymonth "12";
      break;
  }
  
  if(
strlen($todayday)==1)
  {
    
$todayday "0".$todayday;
  }
  
  
$applydate $todayyear."-".$todaymonth."-".$todayday;
  
$order_number_date $todayyear.$todaymonth.$todayday;
  
  
// Get client IP Address
  
$client_ip $_SERVER['REMOTE_ADDR'];
  
  
// Global String
  
$header_name_shopping_cart_1_1 "Shopping Cart";
  
$admin_font_size "2";
  
$header_language "big5";
  
//$header_language = "utf-8";
  
  // Global URL
  
$url_continue_shopping "shopping_cart_test.php";
  
$url_ready_to_pay "shopping_cart_1-2.php";
  
$url_view_shopping_cart "shopping_cart_1-1.php?email=".$_SESSION['email']."&MemId=".$_SESSION['MemId'];
  
  
// Constant
  
define('SHOPPING_PRAGMA_CACHE''no-cache');
  
    
?>