public function campaignAction()
 {
     $historyObj = new Application_Model_Report();
     $userid = $this->user->getId();
     $subUsersArray = $historyObj->findChildEntityList($userid, 5, "");
     //echo "<pre>"; print_r($subUsersArray); exit;
     if ($this->request->getParam('locationName') != '' and $this->request->getParam('locationName') != 0) {
         if ($this->request->getParam('seehistoryby') == 'month') {
             $startdate = $this->request->getParam('yearMessageReport') . '-' . $this->request->getParam('monthMessageReport') . '-1 00:00:00';
             $enddate = $this->request->getParam('yearMessageReport') . '-' . $this->request->getParam('monthMessageReport') . '-30 23:59:59';
             $campaignhistoryArray = $historyObj->reportCampaignHistoryByPeriod($this->request->getParam('locationName'), $startdate, $enddate);
         } else {
             $campaignhistoryArray = $historyObj->reportCampaignHistory($this->request->getParam('locationName'));
         }
     } else {
         $campaignhistoryArray = $historyObj->reportCampaignHistory($userid);
     }
     //echo $this->request->getParam('locationName'); echo "<pre>"; print_r($campaignhistoryArray); exit;
     $this->view->campaignhistory = $campaignhistoryArray;
     $this->view->subusers = $subUsersArray;
     $this->view->monthList = $this->monthList();
     $this->view->yearList = $this->yearList();
     $this->view->monthSelected = $this->request->getParam('monthMessageReport');
     $this->view->yearSelected = $this->request->getParam('yearMessageReport');
     $this->view->locationSelected = $this->request->getParam('locationName');
     $this->view->seebySelected = $this->request->getParam('seehistoryby');
     $this->view->userid = $userid;
 }