public function init() { parent::init(); if (!stristr($_SERVER['REQUEST_URI'], 'ajax')) { $banners = FM_Components_Banner::getSortedRandomBanners(array()); $this->view->layout()->banners = $this->view->partial('banner/bannerleftindex.phtml', array('banners' => $banners)); $this->view->layout()->astrology = $this->view->partial('widgets/horoscope/full.phtml', array('signs' => FM_Components_RSS_Horoscope::getAll())); $spotlight = FM_Components_Organization::getRandom(6, false, array(), true); $this->view->layout()->spotlight = $this->view->partial('organization/spotlight.phtml', array('organizations' => $spotlight)); $featuredOrganization = FM_Components_Organization::getRandom(1, true, array(8)); $this->view->layout()->featuredOrganization = $this->view->partial('organization/indexfeatured.phtml', array('organization' => $featuredOrganization[1])); } }
function indexAction() { $id = Zend_Auth::getInstance()->hasIdentity(); $this->view->layout()->maps = false; //if(!$id) { //echo '<body><div style="width:1000px;margin:0px auto;"><div style="margin:0px auto;"><img // src="/images/UnderConstruction.jpeg" /></div></div></body>'; //exit; //} else { $fn = new FM_Components_RSS_FlashNews(); $this->view->topstories = $this->view->partial('widgets/rss/news.phtml', array('news' => $fn, 'class' => 'rss', 'id' => "fnrss", 'limit' => 30, 'title' => 'flash news', 'icon' => 'flashnew-icon.png')); $mn = new FM_Components_RSS_MonmouthNews(); $this->view->monmouthnews = $this->view->partial('widgets/rss/news.phtml', array('news' => $mn, 'class' => 'rss', 'id' => "mnrss", 'limit' => 30, 'title' => 'mounmouth news 24', 'icon' => 'info_icon.png')); $bz = new FM_Components_RSS_Finance(); $this->view->financenews = $this->view->partial('widgets/rss/news.phtml', array('news' => $bz, 'class' => 'rss', 'id' => "bzrss", 'limit' => 30, 'title' => 'finance', 'icon' => 'finance-icon.png')); $en = new FM_Components_RSS_Entertainment(); $this->view->entertainmentnews = $this->view->partial('widgets/rss/news.phtml', array('news' => $en, 'class' => 'rss', 'id' => "enrss", 'limit' => 30, 'title' => 'entertainment', 'icon' => 'entert-icon.png')); $sports = new FM_Components_RSS_Sports(); $this->view->sportsnews = $this->view->partial('widgets/rss/news.phtml', array('news' => $sports, 'class' => 'rss', 'id' => "sprss", 'limit' => 30, 'title' => 'sports', 'icon' => 'sport-icon.png')); $banners = FM_Components_Banner::getSortedRandomBanners(array(), 9); $this->view->layout()->banners = $this->view->partial('banner/bannerleftindex.phtml', array('banners' => $banners)); $featuredOrganization = FM_Components_Organization::getRandom(1, true, array(8)); $this->view->layout()->featuredOrganization = $this->view->partial('organization/indexfeatured.phtml', array('organization' => $featuredOrganization[1])); $this->view->layout()->weather = $this->view->partial('widgets/weather/widget.phtml'); $spotlight = FM_Components_Organization::getRandom(6, false, array(), true); //print_r(count($spotlight));exit; $this->view->layout()->spotlight = $this->view->partial('organization/spotlight.phtml', array('organizations' => $spotlight)); //$recipeOfTheDay = new FM_Components_RSS_Rod(); //$this->view->layout()->rod = $this->view->partial('widgets/rss/rod.phtml', //array('rod'=>$recipeOfTheDay, 'class'=>'rodrss', 'id'=>"rssrod", 'limit'=>1, 'title'=>'RECIPE OF THE DAY', 'icon'=>'')); $this->view->entertainment = $this->view->partial('widgets/rss/entertainment.phtml'); // print_r($recipeOfTheDay);exit; $this->view->layout()->astrology = $this->view->partial('widgets/horoscope/full.phtml', array('signs' => FM_Components_RSS_Horoscope::getAll())); $headerBanner = new FM_Components_Widgets_BannerLayout($this->view); $this->view->layout()->header = $this->view->partial('headers/index.phtml', array('banner' => $headerBanner->toHTML())); $c = new FM_Components_Calendar_Month(0, 0, 0); $date1 = date('n', time()) == 12 ? date('Y', strtotime("+1 year")) : date('Y', time()); $date2 = date('n', time()) == 12 || date('n', time()) == 11 ? date('Y', strtotime("+1 year")) : date('Y', time()); $d = new FM_Components_Calendar_Month(date('n', strtotime("first day of next month")), $date1, 0); $e = new FM_Components_Calendar_Month(date('n', strtotime("first day of next month +1 month")), $date2, 0); //echo date('n', strtotime("+1 month"));exit; $ae[] = $c->getActiveEvents(date('d', time())); $ae[] = $d->getActiveEvents(date('d', time()), true); $ae[] = $e->getActiveEvents(date('d', time()), true); $this->view->calendarrss = $this->view->partial('widgets/rss/calendar.phtml', array('events' => $ae, 'class' => 'rss', 'id' => "evrss", 'title' => 'Events', 'icon' => 'event-icon.png')); // } }