rendered paste bodyrequire_once $_SERVER['DOCUMENT_ROOT']."/FastAim/EZImpDeliveryMethod.php";
$EZImp_class_obj = new ezImpression();
if(isset($_REQUEST['FilledID'])) {
.....
.....
$Delivery = record_consumed_orders($ConsumedID_list, $SecurityKey, $ClientIP, $EZID, $AID, $EZImp_class_obj);
}
EZImpDeliveryMethod.php
// method to call from old EZImp.php code and EZImpDelivery.php
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;
}
EZImpDelivery.php
require 'Include/Global.inc.php';
require_once $_SERVER['DOCUMENT_ROOT']."/FastAim/Classes/FastAimClasses/EZImpressionClass_new.php";
require_once $_SERVER['DOCUMENT_ROOT']."/FastAim/EZImpDeliveryMethod.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 {
# NEED TO WRITE ERROR
$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;