Example #1
0
 /**
  * The function returns short HTML block for current page.
  * 
  * @access public
  * @return string The HTML code.
  */
 public function htmlShort()
 {
     $Page = new Content_Page();
     $Page = $Page->findItem(array('Module = Controller_Frontend_Clients'));
     $Client = new Client();
     $Clients = $Client->findList(array(), 'Position asc', 0, 5);
     return $this->getView()->htmlShort($Page, $Clients);
 }
Example #2
0
 /**
  * The index handler.
  * 
  * @access public
  * @return string The HTML code.
  */
 public function index()
 {
     $Article = new Article();
     $Client = new Client();
     $Button = new Button();
     $Proud = new Proud();
     $Banner = new Banner();
     $a = array();
     $a[] = 'PostedAt < ' . time();
     $a[] = 'Type = ' . Article::ARTICLE;
     $b = array();
     $b[] = 'PostedAt < ' . time();
     $b[] = 'Type = ' . Article::NEWS;
     foreach ($Banner->findList(array(), 'rand()', 0, 1) as $Banner) {
     }
     $this->getView()->set(array('Articles' => $Article->findShortList($a, 'PostedAt desc', 0, 4), 'News' => $Article->findShortList($b, 'PostedAt desc', 0, 2), 'Clients' => $Client->findList(array(), 'Position asc', 0, 8), 'Buttons' => $Button->findList(array(), 'Position asc', 0, 3), 'Prouds' => $Proud->getLastProuds(), 'Banner' => $Banner));
     return $this->getView()->render();
 }
Example #3
0
 /**
  * The index handler.
  * 
  * @access public
  * @return string The HTML code.
  */
 public function index()
 {
     $Client = new Client();
     $this->getView()->set('Clients', $Client->findList(array(), 'Position asc'));
     return $this->getView()->render();
 }