<?php	#.htsite.inc.php in the valID directory
if (substr($_SERVER["HTTP_HOST"],0,4) == "ttt.") $live=0; else $live=1;
$live=1;
#$live=2;
#$live=3;
/*switch ($file)
{
	case "index.php":
	case "findit.php":
	case "howto.php":
	case "others.php":
		$dsn["phptype"]="pgsql"; 
		$dsn["username"]="valid"; 
		$dsn["password"]="Robert Wells"; 
		#$dsn["hostspec"]="localhost"; 
		$dsn["database"]="valid"; 
		#$dsn["port"]="5432"; 
		break;
	case "officer.php":
	case "database.php":
		$dsn["phptype"]="pgsql"; 
		$dsn["username"]="validofficer"; 
		$dsn["password"]="Foundations are the Identity of Obscurity"; 
		#$dsn["hostspec"]="localhost"; 
		$dsn["database"]="valid"; 
		#$dsn["port"]="5432"; 
		break;
	default:
		echo "We are sorry but this machine does not yet recognize this file.";
		die("<BR>I hope you're not an evil person attempting to subvert us.");
		break;
}*/
$options = array("debug"=>2,"portability"=>DB_PORTABILITY_ALL^DB_PORTABILITY_RTRIM); 
buggywuggy( "We are about to connect as ".print_r($dsn,TRUE)."."); 
$db =& DB::connect($dsn, $options); 
if (PEAR::isError($db)) 
{ 
	echo "<BR>We failed to connect to the ".$dsn["database"]." data base."; 
	die($db->getMessage()); 
} 
$db->setFetchMode(DB_FETCHMODE_ASSOC); 
if ($live == 1) ##fully functional
{ 
	$site_url="www.osmio.org"; 
	$allsites="/var/www/sites/allsites"; 
	$PKH_debug_write=172; 
	$logfile="/var/log/httpd/domains/valid.log"; 
	$site_name="Authentify ValID"; 
	$openssldir="/usr/bin";
	$certsdir="/home/phadley/websites/certs";
	$skipcall=0;
	$testcall=0;
} 
else if ($live == 0)	##On PKH's staging server
{ 
	$site_url="ttt.authentify.com"; 
	$allsites="/home/www/data/allsites"; 
	$PKH_debug_write=255; 
	$logfile="/var/log/httpd/valid.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)	##live site but it skips the call to test the certificate
{
	$site_url="www.osmio.org"; 
	$allsites="/var/www/sites/allsites"; 
	$PKH_debug_write=172; 
	$logfile="/var/log/httpd/domains/valid.log"; 
	$site_name="Authentify ValID"; 
	$openssldir="/usr/bin";
	$certsdir="/home/phadley/websites/certs";
	$skipcall=1;
	$testcall=1;
}
else if ($live==3)	##live site but it skips the call to test the certificate
{
	$site_url="www.osmio.org"; 
	$allsites="/var/www/sites/allsites"; 
	$PKH_debug_write=172; 
	$logfile="/var/log/httpd/domains/valid.log"; 
	$site_name="Authentify ValID"; 
	$openssldir="/usr/bin";
	$certsdir="/home/phadley/websites/certs";
	$skipcall=0;
	$testcall=1;
}
else
{
	echo "What system is this on?";
	die ("This is too dangerous to keep going.");
}
?>