示例#1
0
    function __init()
    {
        // parent init should be called first
        parent::__init();
        // hook deefault view into weekly action
        if ($this->screen == 'index') {
            $this->screen = 'weekly';
        }
        // assign common attributes (required for all actions)
        $this->tpl->add_secondary('outlay_categories', db_fetch_array('
			SELECT id, name
			FROM outlay_category', 'name', 'id'));
        $this->tpl->add_secondary('outlay_notes', db_fetch_array('
			SELECT DISTINCT note
			FROM outlay'));
    }
示例#2
0
 function __init()
 {
     parent::__init();
     $this->tpl->add_secondary('tags', db_fetch_array('SELECT name FROM tag ORDER BY name'));
 }