<?php
session_name('AR_DIGITAL');
session_start();
$dealerInfo = array(
'abctradeup.com' => array(
'name' => 'ABC Chrysler',
'address' => '1234 Main Street, Anytown',
'postalCode' => 'V3S3X1',
'phone' => '(000) 000-0000',
'website' => 'www.abcchrysler.com',
'emails' => array('dave@absoluteresults.com'),
'area' => 'prairie',
'eventID' => '816',
'eventDate' => 'July 5 & 6',
'preapproval' => 'https://www.dealertrack.ca/DTCanada/WSPlus/MainScreen/DealerApplicationForm.aspx?dealerID=C01434&WebSiteID=203&TPGISConfirmID=5000019&language=en-ca&RedirectionURL=http://www.pembinachrysler.com&Asset=AU&httpRef=http://www.pembinachrysler.com/index.htm',
'chatCode' => '20170',
'gAnalytics' => "",
'campaign' => 'Digital Marketing RSVP'),
'niagaratradeup.com'=>array(
'name'=>'Niagara Chrysler',
'address'=>'4421 Drummond Road, Niagara Falls',
'postalCode' => 'L2E 6C5',
'phone'=>'905-357-7378',
'website'=>'www.niagarachrysler.ca',
'emails' => array('andrewpage@niagarachrysler.ca'),
'area' => 'prairie',
'eventID'=>'9323',
'eventDate'=>'Sep 10 & 11',
'preapproval' => 'http://www.autocreditsolutions.ca/',
'chatCode' => '',
'gAnalytics' => "",
'campaign' => 'Digital Marketing RSVP')
); // Closing bracket
if($_SERVER['HTTP_HOST'] != 'ar.absoluteresults.com')
{
$domainArr = explode('.',$_SERVER['HTTP_HOST']);
while(count($domainArr) > 2) $t = array_shift($domainArr);
$_SESSION['registration']['selectedDealer'] = strtolower(implode('.',$domainArr));
if(!isset($dealerInfo[$_SESSION['registration']['selectedDealer']]))
{
echo 'Invalid Web Link';
exit;
}
}
if($_SERVER['HTTP_HOST'] == 'ar.absoluteresults.com') $_SESSION['registration']['selectedDealer'] = 'abctradeup.com';
//unset($_SESSION['offers']);
if(!isset($_SESSION['offers']))
{
$_SESSION['offers'] = array('saveTruck' => array('description' => 'Save 35% on a Truck',
'color' => '#163359'),
'saveVan' => array('description' => 'Save 35% on a Van',
'color' => '#591818'),
'payment' => array('description' => 'Match Your Payment',
'color' => '#455a29'),
'appraisal' => array('description' => 'What\'s my Vehicle Worth?',
'color' => '#184e5a'),
'preapprove'=> array('description' => 'Get Pre-Approved',
'color' => '#3f4b5a'));
}
$currentPage = str_replace('Email','',array_shift(explode('.',basename($_SERVER['PHP_SELF']))));
if(!array_key_exists($currentPage,$_SESSION['offers'])) $currentPage = 'index';
foreach($_SESSION['offers'] as $offer => $info)
{
if($offer != $currentPage && !isset($_SESSION['offers'][$offer]['complete']))
{
$nextOffer = $offer;
break;
}
}
//if($nextOffer == "") $nextOffer = 'saveTruck';
$area = $dealerInfo[$_SESSION['registration']['selectedDealer']]['area'];
if($area == "") $area = 'bc';
$daaVehicles['bc'] = array('ram' => array('description' => '2013 Ram 1500 SXT<br>Quad Cab 4x4',
'payment' => 143),
'caravan' => array('description' => '2013 Grand Caravan<br>Ultimate Package',
'payment' => 149),
'journey' => array('description' => '2013 Journey<br>Ultimate Package',
'payment' => 149),
'200' => array('description' => '2013 Chrysler 200<br> LX',
'payment' => 96),
'dart' => array('description' => '2013 Dart SE',
'payment' => 94),
'wrangler' => array('description' => '2013 Wrangler<br>Sport 4x4',
'payment' => 112));
$daaVehicles['prairie'] = array('ram' => array('description' => '2013 Ram 1500 SXT<br>Quad Cab 4x4',
'payment' => 138),
'caravan' => array('description' => '2013 Grand Caravan<br>Ultimate Package',
'payment' => 143),
'journey' => array('description' => '2013 Journey<br>Ultimate Package',
'payment' => 140),
'200' => array('description' => '2013 Chrysler 200<br> LX',
'payment' => 90),
'dart' => array('description' => '2013 Dart SE',
'payment' => 88),
'wrangler' => array('description' => '2013 Wrangler<br>Sport 4x4',
'payment' => 107));
$daaVehicles['ab'] = array('ram' => array('description' => '2013 Ram 1500 SXT<br>Quad Cab 4x4',
'payment' => 146),
'caravan' => array('description' => '2013 Grand Caravan<br>SE CVP',
'payment' => 117),
'journey' => array('description' => '2013 Journey<br>CVP',
'payment' => 116),
'200' => array('description' => '2013 Chrysler 200<br> LX',
'payment' => 99),
'dart' => array('description' => '2013 Dart SE',
'payment' => 94),
'wrangler' => array('description' => '2013 Wrangler<br>Sport 4x4',
'payment' => 117));
$daaVehicles['on'] = array('ram' => array('description' => '2013 Ram 1500 SXT<br>Quad Cab 4x4',
'payment' => 141),
'caravan' => array('description' => '2013 Grand Caravan<br>SE CVP',
'payment' => 112),
'journey' => array('description' => '2013 Journey<br>CVP',
'payment' => 112),
'200' => array('description' => '2013 Chrysler 200<br> LX',
'payment' => 96),
'wrangler' => array('description' => '2013 Wrangler<br>2DR 4x4',
'payment' => 115));
$daaVehicles['atlantic'] = array('ram' => array('description' => '2013 Ram 1500 SXT<br>Quad Cab 4x4',
'payment' => 132),
'caravan' => array('description' => '2013 Grand Caravan<br>SE CVP',
'payment' => 107),
'journey' => array('description' => '2013 Journey<br>CVP',
'payment' => 107),
'200' => array('description' => '2013 Chrysler 200<br> LX',
'payment' => 92),
'wrangler' => array('description' => '2013 Wrangler<br>2DR 4x4',
'payment' => 107));
include_once('displayUtils.php');
?>