westdc-zf1/application/default/controllers/KnowledgeController.php

17 lines
547 B
PHP
Executable File

<?php
class KnowledgeController extends Zend_Controller_Action
{
function indexAction()
{
//$this->_redirect('/metadata');
$sql="select * from knl_article order by item_id desc limit 10";
$this->view->articles=$this->db->fetchAll($sql);
}
function preDispatch()
{
$this->db=Zend_Registry::get('db');
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
}
}