Guest User

page.php

a guest
Jun 16th, 2013
64
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php defined('SYSPATH') or die('No direct script access.');
  2.  
  3. class Controller_Page extends Controller_Common {
  4.  
  5.     // Главная страница
  6.     public function action_index()
  7.     {
  8.         $articles = array();
  9.  
  10.         $content = View::factory('/pages/show')
  11.                 ->bind('articles', $articles);
  12.  
  13.         $articles = Model::factory('Article')->get_all();
  14.  
  15.         $this->template->content = $content;
  16.     }
  17.  
  18.     /*     public function action_index()
  19.     {
  20.         $chat = array();
  21.  
  22.         $content = View::factory('/chat/show')
  23.                 ->bind('chat', $chat);
  24.  
  25.         $chat = Model::factory('chat')->get_chat();
  26.  
  27.         $this->template->content = $content;
  28.     } */
  29.  
  30. } // End Page
RAW Paste Data