Login   Register  
PHP Classes
elePHPant
Icontem

File: config.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dennis T Kaplan  >  dbStringIt  >  config.php  >  Download  
File: config.php
Role: Configuration script
Content type: text/plain
Description: config
Class: dbStringIt
Generate SQL to update databases from form values
Author: By
Last change:
Date: 7 years ago
Size: 2,470 bytes
 

Contents

Class file image Download
<?php
$b
=Paths();
$rootPath $b['rootPath'] ."../";
$wwwPath  $b['wwwPath'];


define('SITENAME'"dbStringIt");
define('DOMAIN',   $_SERVER['SERVER_NAME']);
define("NO_REPLY_EMAIL""NoReply@" $_SERVER['SERVER_NAME']);
define("ADMIN_EMAIL""Admin@" $_SERVER['SERVER_NAME']);
define ('DB_HOST',      DOMAIN);
define ('DB_USERNAME',  "root");
define ('DB_PASSWORD',  "your pass");
// Define DB Names
define ('DB_USER',  "user");


// POST AND GET VARIABLES
$vars['alias'] = '';
$vars['pass'] = '';
$vars['verify'] = '';
$vars['default_group'] = '';
$vars['groups'] = '';
$vars['email'] = '';
$vars['newemail'] = '';
$vars['First_Name'] = '';
$vars['Last_Name'] = '';
$vars['Company'] = '';
$vars['Street'] = '';
$vars['City'] = '';
$vars['State'] = '';
$vars['ZIP'] = '';
$vars['ZIP4'] = '';
$vars['Country'] = 'US';
$vars['Phone'] = '';
$vars['Cell'] = '';
$vars['IP'] = '127.0.0.1';



session_start();
if (!isset(
$_SESSION['auth']['initiated'])) {
   
session_set_cookie_params(0'/''.'.DOMAIN);
   
$_SESSION['auth']['initiated'] = true;
   
setcookie("auth"session_id(), 0"/"'.'.DOMAIN);
   if (!isset(
$_COOKIE['auth'])) {
      
$_COOKIE['auth'] = 'session_id()';
   }
}

function 
Paths() {
   
$a substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
   
$b['wwwPath'] = "http://" $_SERVER["SERVER_NAME"] . trim($_SERVER["SCRIPT_NAME"], $a );
   
$b['rootPath'] = trim($_SERVER["SCRIPT_FILENAME"], $a );
  return 
$b;
}


$testdb['alias'] = '';
$testdb['pass'] = '';
$testdb['verify'] = '';
$testdb['default_group'] = '';
$testdb['groups'] = '';
$testdb['email'] = '';
$testdb['newemail'] = '';
$testdb['First_Name'] = '';
$testdb['Last_Name'] = '';
$testdb['Company'] = 'Some, inc.';
$testdb['Street'] = 'Some Street';
$testdb['City'] = 'Some City';
$testdb['State'] = 'CA';
$testdb['ZIP'] = '90278';
$testdb['ZIP4'] = '';
$testdb['Country'] = 'US';
$testdb['Phone'] = '123456789';
$testdb['Cell'] = '123456789';
$testdb['IP'] = '127.0.0.1';

$test2db['alias'] = '';
$test2db['pass'] = '';
$test2db['verify'] = '';
$test2db['default_group'] = '';
$test2db['groups'] = '';
$test2db['email'] = '';
$test2db['newemail'] = '';
$test2db['First_Name'] = '';
$test2db['Last_Name'] = '';
$test2db['Company'] = '';
$test2db['Street'] = '';
$test2db['City'] = '';
$test2db['State'] = '';
$test2db['ZIP'] = '';
$test2db['Country'] = 'DE';
$test2db['ZIP4'] = '';
$test2db['Phone'] = '';
$test2db['Cell'] = '';
$test2db['IP'] = '127.0.0.1';


?>