<?php
//$Id$

define('LT_PATH', ".".PATH_SEPARATOR."../".PATH_SEPARATOR
				."./includes".PATH_SEPARATOR."../includes".PATH_SEPARATOR
				."./utils".PATH_SEPARATOR."../utils");

$dbLTIP = array("otherPath"=>"volunteer", "otherDB"=>"ltip_free1", "currDB"=>"edmmn", "currPayment"=>"pay", "currHandle"=>"");

function lt_maintenance() {

	sscanf($_SERVER["PHP_SELF"], "/%[^/]%s", $ltip, $other);
	if (file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$ltip.'/tools/maintenance.txt')) {
		echo $_SERVER['DOCUMENT_ROOT'].'/'.$ltip.'/tools/maintenance.txt';
		$_SESSION['testlogged'] = false;
		return true;
	}
	$_SESSION['testlogged'] = true;
	return false;
}

foreach ($_GET as $key => $value) { 
	if (preg_match("/(<|%3C)script/", $value)) {
		$_GET[$value]='0';
		//echo "$key: $value<br>"; 
		echo "Illegal Params";
		exit;
	}	
	if (($key=='member_id' || $key=='txn' || $key=='transaction_id' || $key=='id' || $key=='status_id' || $key=='level_id' ) && !preg_match("/^[0-9]+$/", $value)) {
		//echo "$key: $value<br>"; 
		echo "--Illegal Parameters";
		exit;
	}
}
foreach ($_POST as $key => $value) { 
	if (preg_match("/(<|%3C)script/", $value)) {
		//echo "$key: $value<br>"; 
		echo "Illegal Params";
		exit;
	}	
	if (($key=='member_id' || $key=='txn' || $key=='transaction_id' || $key=='id' || $key=='status_id' || $key=='level_id' ) && !preg_match("/^[0-9]+$/", $value)) {
		//echo "$key: $value<br>"; 
		echo "--Illegal Parameters";
		exit;
	}
}
?>
