//that comparison needs. $selectedPresentation = 'comparison'; sort($_POST['cmpSelect']); $baseDateArray['comparison'] = $_POST['cmpSelect']; $dateSpan = 1; foreach ($_POST['cmpSelect'] as $cmpIndex => $cmpValue) { $dateParts = explode('-', $cmpValue); $month = $dateParts[0]; $day = $dateParts[1]; $year = $dateParts[2]; $date = $year . '-' . $month . '-' . $day; $cmpDateArray[$cmpIndex] = $date; } $baseDate = $cmpDateArray; } else { $dateSet = $oControlPanel->dateSpanCalculator($baseDateArray['advancedFrom'], $baseDateArray['advancedTo'], ''); $dateSpan = $dateSet['dateSpan']; $baseDate = $dateSet['baseDate']; } $selectedPoints['advanced'] = $_POST['advPoints']; $numberOfPoints = count($_POST['advPoints']); } elseif (isset($_POST['fetchEvents']) && isset($_POST['evtPoints'])) { $selectedPoints['event'] = $_POST['evtPoints']; if (isset($_POST['evtBaseDate'])) { $baseDateArray['event'] = $_POST['evtBaseDate']; $dateParts = explode('-', $_POST['evtBaseDate']); $month = $dateParts[0]; $day = $dateParts[1]; $year = $dateParts[2]; $baseDate = $year . '-' . $month . '-' . $day; } else {
$selectedPresentation = 'comparison'; sort($_REQUEST['cmpSelect']); $baseDateArray['comparison'] = $_REQUEST['cmpSelect']; $dateSpan = 1; foreach ($_REQUEST['cmpSelect'] as $cmpIndex => $cmpValue) { $dateParts = explode('-', $cmpValue); $month = $dateParts[0]; $day = $dateParts[1]; $year = $dateParts[2]; $date = $year . '-' . $month . '-' . $day; $cmpDateArray[$cmpIndex] = $date; } $baseDate = $cmpDateArray; } elseif ($mvcSelection == 'export') { $selectedPoints = $_REQUEST['advPoints']; $dateSet = $oControlPanel->dateSpanCalculator($_REQUEST['advCSVBaseDateFrom'], $_REQUEST['advCSVBaseDateTo'], ''); $dateSpan = $dateSet['dateSpan']; $baseDate = $dateSet['baseDate']; $selectedPresentation = 'individual'; $action = 'basic'; $hasPrices = false; $hasData = false; $rollup = false; if (isset($_REQUEST['csvChoices'])) { foreach ($_REQUEST['csvChoices'] as $inx => $choice) { if ($choice == 'pricing') { $hasPrices = true; } if ($choice == 'data') { $hasData = true; }