コード例 #1
0
ファイル: outlay.php プロジェクト: anatoliychakkaev/webdesk
    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
ファイル: note.php プロジェクト: anatoliychakkaev/webdesk
 function __init()
 {
     parent::__init();
     $this->tpl->add_secondary('tags', db_fetch_array('SELECT name FROM tag ORDER BY name'));
 }