<?php 
if (substr($_SERVER["HTTP_HOST"],0,4) == "ttt.") $live=0; else $live=1;
$live=1;	#Production, $skipcall=0,$testcall=0, make the call to the number in the database.
$live=98;	#testing, $skipcall=1,$testcall=1, do not make the call, use the database.
$live=2;	#testing, $skipcall=0,$testcall=1, make call to PKH's cellular telephone.

#uggywuggy("We have skipcall=$skipcall and testcall=$testcall.",__LINE__,__FILE__);

$dsn["phptype"]="pgsql"; 
$dsn["username"]="authentify"; 
$dsn["password"]="Robert Wells"; 
#$dsn["hostspec"]="localhost"; 
$dsn["database"]="authentify"; 
#$dsn["port"]="5432"; 
$options = array("debug"=>2,"portability"=>DB_PORTABILITY_ALL^DB_PORTABILITY_RTRIM); 
#echo "We are about to connect."; 
$db =& MDB2::connect($dsn, $options); 
if (PEAR::isError($db)) 
{ 
	echo "<BR>We failed to connect to the ".$dsn["database"]." data base."; 
	die($db->getMessage()); 
} 
$db->setFetchMode(MDB2_FETCHMODE_ASSOC);
#uggywuggy("We have skipcall=$skipcall and testcall=$testcall.",__LINE__,__FILE__);

if ($live == 1) 
{ 
	$site_url="www.osmio.org"; 
	$allsites="/var/www/sites/allsites"; 
	$PKH_debug_write=172; 
	$logfile="/var/log/httpd/authentify.com.log"; 
	$site_name="Authentify ValID"; 
	$openssldir="/usr/bin";
	$certsdir="/home/phadley/websites/certs";
	$skipcall=0;
	$testcall=0;
} 
else if ($live == 0)
{ 
	$site_url="ttt.authentify.com"; 
	$allsites="/home/www/data/allsites"; 
	$PKH_debug_write=255; 
	$logfile="/var/log/httpd/authentify.com.log"; 
	$site_name="Authentify ValID"; 
	$openssldir="/usr/bin";
	$certsdir="/home/phadley/websites/certs";
	$skipcall=1;	##Don't bother Authentify, just assume it worked.
	$testcall=1;	##Use my number instead of one from the database.
} 
else if ($live==2)
{
	$site_url="www.osmio.org"; 
	$allsites="/var/www/sites/allsites"; 
	$PKH_debug_write=172; 
	$logfile="/var/log/httpd/authentify.com.log"; 
	$site_name="Authentify ValID"; 
	$openssldir="/usr/bin";
	$certsdir="/home/phadley/websites/certs";
	$skipcall=0;
	$testcall=1;
}
else if ($live == 98)
{
	$site_url="www.osmio.org";
	$allsites="/var/www/sites/allsites";
	$PKH_debug_srite=255;
	$logfile="/var/log/httpd/domains/www.reloid.com";
	$site_name="Reliable ID";
	$openssldir="/usr/bin";
	$certsdir="/home/phadley/websites/certs";
	$skipcall=1;
	$testcall=1;
}
else
{
	echo "What system is this on?";
	die ("This is too dangerous to keep going.");
}
#uggywuggy("We have skipcall=$skipcall and testcall=$testcall.",__LINE__,__FILE__);
?>
