///////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// for ($i = 0; $i < count($WhereArr); $i++) { $ShowListName = false; if (!isset($WhereArr[$i]['Id']) || $WhereArr[$i]['Id'] == "") { $WhereArr[$i]['Id'] = false; } if (isset($CurrentId[$WhereArr[$i]['Mode']]) && $CurrentId[$WhereArr[$i]['Mode']] != "") { $WhereArr[$i]['Id'] = $CurrentId[$WhereArr[$i]['Mode']]; } if (isset($WhereArr[$i]['Id']) && $WhereArr[$i]['Id'] != "") { $WhereForm[$WhereArr[$i]['Mode']] = 1; $LastMode = $WhereArr[$i]['Mode']; } $WhereArr[$i]['Url'] = GetConstPath($WhereArr, $i); $WhereArr[$i]['Url2'] = GetConstPath($WhereArr, $i, false); if ($WhereArr[$i]['Mode'] == "Month") { $WhereArr[$i]['Name'] = $Lang['ByMonths']; $MetaTitle .= ": " . $Lang['ByMonths']; if (ValidVar($WhereArr[$i]['Id']) !== false) { $RowMonth = explode("-", $WhereArr[$i]['Id']); $WhereArr[$i]['Name2'] = ValidVar($Lang['MonthName'][ValidVar($RowMonth[1])]); $Report->WhereArr[] = "DATE_FORMAT(DATE_ADD(S_LOG.STAMP, INTERVAL '" . $nsUser->TZ . "' HOUR), '%Y-%m')='" . $WhereArr[$i]['Id'] . "'"; unset($RowMonth); } } if ($WhereArr[$i]['Mode'] == "Date") { $WhereArr[$i]['Name'] = $Lang['ByDays']; $MetaTitle .= ": " . $Lang['ByDays']; if (ValidVar($WhereArr[$i]['Id']) !== false) { $WhereArr[$i]['Name2'] = $WhereArr[$i]['Id'];
} $GroupByCnt = count($GroupByForm); if ($StartDate) { $Report->StartDate = $StartDate; } if ($ViewDate) { $Report->ViewDate = $ViewDate; } if ($EndDate) { $Report->EndDate = $EndDate; } /////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// require "lib/const_groupby.inc.php"; require "lib/const_path.inc.php"; $CurrentPath = GetConstPath($WhereArr, count($WhereArr) - 2, false); $CurrentPath .= "GroupBy={$GroupBy}&Limit={$Limit}&Filter={$Filter}"; $CurrentPath = $nsProduct->SelfAction($CurrentPath); ////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////// if ($PrevReport && $nsUser->Columns->CONVERSIONS) { $PrevReport->Calculate(); $Report->PrevLevelUni = $PrevReport->CampStat[$Report->ConversionUni]; } $Report->PageLimit = $Limit; if ($OrderBy == "ACTCONV" || $OrderBy == "SALECONV" || $OrderBy == "ACTIONCNT" || $OrderBy == "ACTIONUNI" || $OrderBy == "SALECNT" || $OrderBy == "SALEUNI" || $OrderBy == "COST" || $OrderBy == "ROI" || $OrderBy == "INCOME") { $Report->PageLimit = false; @ini_set("memory_limit", "20M"); } $Report->Calculate(); if (ValidVar($Report->CampStat)) {