<?
/* =======================================
Copyright 1998, 2000, 2003, 2007, 2009 - E Net Arch
www.ENetArch.net - 248-686-1407
ENetArch on AIM, Yahoo, and Skype
This program is distributed under the terms of the GNU
General Public License (or the Lesser GPL).
======================================= */
Include_Once ("functions.cls");
Include_Once ("Ladder_Ladder.cls");
//***************************************************************
//*
//* Database Connection
//*
//***************************************************************
$szODBC = "HOST=localhost;UID=sa;PSW=psw;DBF=development;";
$gblLadder = null;
$szIP = getenv ("REMOTE_ADDR");
$szURLPath = "";
// ==========================================
function gblLadder() { global $gblLadder; return ($gblLadder); }
// ==========================================
//*--------------------------------------------------------------
//* main Loop to process tokens.
//*--------------------------------------------------------------
Main ();
Function Main ()
{
session_start();
Connect ();
php_Main ();
Disconnect ();
}
//*--------------------------------------------------------------
//* Connect to Ladder
//*--------------------------------------------------------------
Function Connect()
{
Global $gblLadder;
Global $szODBC;
$gblLadder = new ldrLadder ();
$gblLadder->Connect ($szODBC);
}
//*--------------------------------------------------------------
//* Disconnect from the store
//*--------------------------------------------------------------
Function Disconnect()
{
Global $gblLadder;
$gblLadder->Disconnect();
}
/* ===============================================
2010-07-29 - added session_start to the Main() function
as sessions are a regular part of every application
I build on top of Ladder.
2010-07-29 - added the function gblLadder() which
returns the $gblLadder global variable. Globals
require the programmer to remember to put
'global $gblLadder;' at the beginning of the
functions that use the global variable. A better
way to treat global variables is as global functions.
===============================================
*/
?>
|