if (!empty($_REQUEST['interests_id'])) { $interests = $gBitCustomer->getInterests(); $gBitSmarty->assign_by_ref('interestsList', $interests); $gBitSmarty->assign('interestsName', $interests[$_REQUEST['interests_id']]); $_REQUEST['orders_products'] = TRUE; $_REQUEST['orders_status_comparison'] = '>'; $_REQUEST['orders_status_id'] = 0; $gBitSmarty->assign('listOrders', order::getList($_REQUEST)); $gBitSystem->display('bitpackage:bitcommerce/admin_revenue_interest.tpl', tra('Revenue By Interest') . ' ' . $interests[$_REQUEST['interests_id']] . ' : ' . $_REQUEST['timeframe'], array('display_mode' => 'admin')); } elseif (!empty($_REQUEST['referer'])) { foreach (array('period', 'timeframe', 'referer', 'exclude', 'include', 'new_reg') as $param) { if (!empty($_REQUEST[$param])) { $_REQUEST['listInfo']['parameters'][$param] = $_REQUEST[$param]; } } $statsByReferer = $stats->getRevenueByReferer($_REQUEST); BitBase::postGetList($_REQUEST); $_REQUEST['listInfo']['block_pages'] = 3; $_REQUEST['listInfo']['item_name'] = 'coupons'; $_REQUEST['listInfo']['page_records'] = count($statsByReferer['hosts']); $gBitSmarty->assign_by_ref('listInfo', $_REQUEST['listInfo']); $gBitSmarty->assign('statsByReferer', $stats->getRevenueByReferer($_REQUEST)); $gBitSystem->display('bitpackage:bitcommerce/admin_revenue_referer.tpl', 'Revenue By Referer', array('display_mode' => 'admin')); } elseif (!empty($_REQUEST['timeframe'])) { $statsByType = $stats->getRevenueByType($_REQUEST); $gBitSmarty->assign_by_ref('statsByType', $statsByType); $statsByOption = $stats->getRevenueByOption($_REQUEST); foreach ($statsByOption as $stat) { @($statsByOptionTotalUnits[$stat['products_options_id']] += $stat['total_units']); } $gBitSmarty->assign('statsByOption', $statsByOption);