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

17 lines
562 B
PHP
Raw Normal View History

2009-03-06 03:20:46 +00:00
<?php
class KnowledgeController extends Zend_Controller_Action
{
function indexAction()
{
//$this->_redirect('/metadata');
2010-01-07 15:14:06 +00:00
$sql="select * from knl_article where url <>'' order by item_id desc limit 10";
2009-03-06 03:20:46 +00:00
$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();
}
}