public function __construct()
 {
     parent::__construct();
     $this->breadcrumbs[] = array('text' => 'House Ads', 'link' => '/reports/houseAdReports');
     $this->houseAds = HouseAdUtil::getHouseAdsByUid($_SESSION['uid'], false);
     fb('had', $this->houseAds);
     fb('ha', HouseAdUtil::getHouseAdsByUid($_SESSION['uid']));
     usort($this->houseAds, 'sortByName');
     if (count($this->houseAds) > 0) {
         $this->cid = isset($_REQUEST['cid']) ? $_REQUEST['cid'] : $this->houseAds[0]->id;
     }
     $this->catOptions = array('3-all' => 'Top 3 Apps', '5-all' => 'Top 5 Apps', '5-android' => 'Top Android Apps', '5-iphone' => 'Top iPhone Apps');
     if (!isset($_SESSION['metricTypeSelected'])) {
         $_SESSION['metricTypeSelected'] = 'Impressions';
     }
     $this->metricTypeSelected = isset($_REQUEST['metricTypeSelected']) ? $_REQUEST['metricTypeSelected'] : $_SESSION['metricTypeSelected'];
     $_SESSION['metricTypeSelected'] = $this->metricTypeSelected;
     $_SESSION['selectedCat'] = isset($_REQUEST['selectedCat']) ? $_REQUEST['selectedCat'] : '3-all';
     $cat = split('-', $_SESSION['selectedCat']);
     fb("selectedCat", $_SESSION['selectedCat']);
     fb("cat", $cat);
     $this->numCat = $cat[0];
     switch (strtolower($cat[1])) {
         case 'all':
             $this->platform = 0;
             break;
         case 'iphone':
             $this->platform = 1;
             break;
         case 'android':
             $this->platform = 2;
             break;
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->breadcrumbs[] = array('text' => 'Application', 'link' => '/reports/applicationReports');
     $appsArray = AppUtil::getAppsByUid($_SESSION['uid']);
     // if (count($appsArray)==0) {
     // 	// no apps!!
     // 	$this->redirect('/apps/apps?msg=You%20currently%20have%20no%20apps.%20Add%20an%20app!');
     // } else {
     // 	$this->aid = isset($_REQUEST['aid'])?$_REQUEST['aid']:$appsArray[0]->id;
     // }
     if (count($appsArray) > 0) {
         $this->aid = isset($_REQUEST['aid']) ? $_REQUEST['aid'] : $appsArray[0]->id;
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->breadcrumbs[] = array('text' => 'Networks', 'link' => '/reports/networkReports');
 }