<?php  
class ModuleFlash extends Controller {
	
	function fetch() { 	
		
		$config   =& $this->locator->get('config');
		$request  =& $this->locator->get('request');
		$language =& $this->locator->get('language');
		$session  =& $this->locator->get('session');
		$url      =& $this->locator->get('url');
		$database =& $this->locator->get('database');
		$customer =& $this->locator->get('customer');
		$template = $this->locator->get('template');
//	 exit($_SERVER['PHP_SELF']);
	 
		$get_url=explode('&',$_SERVER['REQUEST_URI']);    	
    	if(strpos($get_url[0],'controller')!==false){     		
                return array();
  			 }
  			 
       $flash_results=$database->getRows("select title, image, `order`, status, href from `flash` where status =1 order by `order` asc");  
       $template->set('flash',$flash_results);
       return $template->fetch('module/flash.tpl');
  	}
}

?>

