All pastes #749636 Raw Edit

Mine

public text v1 · immutable
#749636 ·published 2007-10-25 20:38 UTC
rendered paste body
<?

	require 'Include/Global.inc.php';
	require_once $_SERVER['DOCUMENT_ROOT']."/FastAim/Classes/FastAimClasses/EZImpressionClass.php";
	require_once $_SERVER['DOCUMENT_ROOT']."/FastAim/EZImpDelivery.php";
	
	$EZImp_class_obj = new ezImpression();

	# CHECK if consumed orders need to be marked
	//Set $OrderArray - Called it FilledID so its not so obviously an orderID 
	if(isset($_REQUEST['FilledID'])) 
	{
		$ConsumedID_list = $_REQUEST['FilledID'];
	
		//Check, if we have any consumption's submitted
		if(count($ConsumedID_list) > 0) 
		{
			
			//Check for Security Key, Client IP and EZ ID
			if(isset($_REQUEST['SecurityKey']) AND isset($_REQUEST['ClientIP']) AND isset($_REQUEST['EZID'])) 
			{
				
				//Set $AID - FastAim Administrator ID - Used to verify impression claims and authorize ad requests
				if(! isset($_REQUEST['AID'])) 
				{
					$AID=0;
				}	
				
				// record consumed orders
				$Delivery = record_consumed_orders($ConsumedID_list, $SecurityKey, $ClientIP, $EZID, $AID, $EZImp_class_obj);
			
			} 
			else 
			{
				$Delivery = 0;
			} // end, if(isset($_REQUEST['SecurityKey']) AND isset($_REQUEST['ClientIP']) AND isset($_REQUEST['EZID']))
			
		} 
		else 
		{
			$Delivery = 0;
		} // end, if(count($ConsumedID_list) > 0)
		
	} 
	else 
	{
		$Delivery = 0;
	} // end, if(isset($_REQUEST['FilledID']))

	
	# CHECK, if orders are requested
	........

?>





<?
	//Usage:  EZImpDelivery.php?AID=1&SecurityKey=946&ClientIP=155.234.232.12&ConsumedID[0]=5&ConsumedID[1]=15&EZID=2343
	
	require 'Include/Global.inc.php';
	require_once $_SERVER['DOCUMENT_ROOT']."/FastAim/Classes/FastAimClasses/EZImpressionClass_new.php";
	
	$EZImp_class_obj = new ezImpression();
	
	//Set $OrderArray - Called it FilledID so its not so obviously an orderID 
	if(isset($_REQUEST['FilledID'])) 
	{
		$OrderArray = $_REQUEST['FilledID'];
		//Check, if we have any consumption's submitted
		if(count($OrderArray) > 0) 
		{	
			//Check for Security Key, Client IP and EZ ID
			if(isset($_REQUEST['SecurityKey']) AND isset($_REQUEST['ClientIP']) AND isset($_REQUEST['EZID'])) {
				
			//Set $AID - FastAim Administrator ID - Used to verify impression claims and authorize ad requests
			if(! isset($_REQUEST['AID'])) 
			{
				$AID=0;
			}	
				
			// record consumed orders
			$Delivery = record_consumed_orders($ConsumedID_list, $SecurityKey, $ClientIP, $EZID, $AID, $EZImp_class_obj);
			
			} 
			else 
			{
				$Delivery = -1;
			} // end, if(isset($_REQUEST['SecurityKey']) AND isset($_REQUEST['ClientIP']) AND isset($_REQUEST['EZID']))
			
		} 
		else 
		{
			$Delivery = 0;
		} // end, if(count($OrderArray) > 0)
		
	} 
	else 
	{
		$Delivery = 0;
	} // end, if(isset($_REQUEST['ConsumedID']))
	
	$EZImp_class_obj->GenerateXMLReturn($Delivery);
	unset($EZImp_class_obj);
	return $Delivery;
	

	// method to call from old EZImp.php code
	function record_consumed_orders($ConsumedID_list, $SecurityKey, $ClientIP, $EZID, $AID, &$EZImp_class_obj) 
	{
		
		// record consumed orders
		$Delivery = $EZImp_class_obj->MarkFilled($EZID, $SecurityKey, $ConsumedID_list, $AID, $ClientIP );
		
		//$EZImp_class_obj->GenerateXMLReturn($Delivery);
		return $Delivery;
	}

?>