/**
  * Returns the export csv for an entire row
  * @return String
  */
 function getExportRowHtml($row)
 {
     $current_detail = $this->getCurrentDetailByKey($row->getDetailId());
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_INTERVAL)) {
         ReportBasicForm::echoCell($row->getIntervalId());
         ReportBasicForm::echoCell($row->getFormattedIntervalName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_PPC_NETWORK)) {
         ReportBasicForm::echoCell($row->getPpcNetworkId());
         ReportBasicForm::echoCell($row->getPpcNetworkName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_PPC_ACCOUNT)) {
         ReportBasicForm::echoCell($row->getPpcAccountId());
         ReportBasicForm::echoCell($row->getPpcAccountName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_AFFILIATE_NETWORK)) {
         ReportBasicForm::echoCell($row->getAffiliateNetworkId());
         ReportBasicForm::echoCell($row->getAffiliateNetworkName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_CAMPAIGN)) {
         ReportBasicForm::echoCell($row->getAffiliateCampaignId());
         ReportBasicForm::echoCell($row->getAffiliateCampaignName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_LANDING_PAGE)) {
         ReportBasicForm::echoCell($row->getLandingPageId());
         ReportBasicForm::echoCell($row->getLandingPageName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_KEYWORD)) {
         ReportBasicForm::echoCell($row->getKeywordId());
         ReportBasicForm::echoCell($row->getKeywordName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_TEXT_AD)) {
         ReportBasicForm::echoCell($row->getTextAdId());
         ReportBasicForm::echoCell($row->getTextAdName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_REFERER)) {
         ReportBasicForm::echoCell($row->getRefererId());
         ReportBasicForm::echoCell($row->getRefererName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_IP)) {
         ReportBasicForm::echoCell($row->getIpId());
         ReportBasicForm::echoCell($row->getIpName());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_C1)) {
         ReportBasicForm::echoCell($row->getC1());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_C2)) {
         ReportBasicForm::echoCell($row->getC2());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_C3)) {
         ReportBasicForm::echoCell($row->getC3());
     }
     if ($this->isDetailIdSelected(ReportBasicForm::DETAIL_LEVEL_C4)) {
         ReportBasicForm::echoCell($row->getC4());
     }
     foreach ($this->getDisplay() as $display_item_key) {
         if (ReportBasicForm::DISPLAY_LEVEL_CLICK_COUNT == $display_item_key) {
             ReportBasicForm::echoCell($row->getClicks());
         } else {
             if (ReportBasicForm::DISPLAY_LEVEL_CLICK_OUT_COUNT == $display_item_key) {
                 ReportBasicForm::echoCell($row->getClickOut());
             } else {
                 if (ReportBasicForm::DISPLAY_LEVEL_LEAD_COUNT == $display_item_key) {
                     ReportBasicForm::echoCell($row->getLeads());
                 } else {
                     if (ReportBasicForm::DISPLAY_LEVEL_SU == $display_item_key) {
                         ReportBasicForm::echoCell(round($row->getSu() * 100, 2) . '%');
                     } else {
                         if (ReportBasicForm::DISPLAY_LEVEL_PAYOUT == $display_item_key) {
                             ReportBasicForm::echoCell('$' . number_format($row->getPayout(), 2));
                         } else {
                             if (ReportBasicForm::DISPLAY_LEVEL_EPC == $display_item_key) {
                                 ReportBasicForm::echoCell('$' . number_format($row->getEpc(), 2));
                             } else {
                                 if (ReportBasicForm::DISPLAY_LEVEL_CPC == $display_item_key) {
                                     ReportBasicForm::echoCell("\$" . number_format($row->getCpc() * 100, 2));
                                 } else {
                                     if (ReportBasicForm::DISPLAY_LEVEL_INCOME == $display_item_key) {
                                         ReportBasicForm::echoCell('$' . number_format($row->getIncome(), 2));
                                     } else {
                                         if (ReportBasicForm::DISPLAY_LEVEL_COST == $display_item_key) {
                                             ReportBasicForm::echoCell('$' . number_format($row->getCost(), 2));
                                         } else {
                                             if (ReportBasicForm::DISPLAY_LEVEL_NET == $display_item_key) {
                                                 ReportBasicForm::echoCell('$' . number_format($row->getNet(), 2));
                                             } else {
                                                 if (ReportBasicForm::DISPLAY_LEVEL_ROI == $display_item_key) {
                                                     ReportBasicForm::echoCell($row->getRoi());
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     ReportBasicForm::echoRow();
 }
                        if (count($summary_form_detail_3->getChildArrayBySort()) > 0) {
                            /* @var $summary_form_detail_4 Form */
                            foreach ($summary_form_detail_3->getChildArrayBySort() as $summary_form_detail_4) {
                                if (count($summary_form_detail_4->getChildArrayBySort()) > 0) {
                                    /* @var $summary_form_detail_5 Form */
                                    foreach ($summary_form_detail_4->getChildArrayBySort() as $summary_form_detail_5) {
                                        $summary_form->getExportRowHtml($summary_form_detail_5);
                                    }
                                } else {
                                    $summary_form->getExportRowHtml($summary_form_detail_4);
                                }
                            }
                        } else {
                            $summary_form->getExportRowHtml($summary_form_detail_3);
                        }
                    }
                } else {
                    $summary_form->getExportRowHtml($summary_form_detail_2);
                }
            }
        } else {
            $summary_form->getExportRowHtml($summary_form_detail_1);
        }
    }
} else {
    ReportBasicForm::echoCell("no data for this selected date range");
    ReportBasicForm::echoRow();
}
?>