Subversion-Projekte lars-tiefland.ci

Revision

Revision 1924 | Revision 1929 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

/**
 *
 * @package WebanOS CI
 * @author Lars Tiefland <ltiefland@gmail.com> 
 * @copyright 2016
 * @version $Rev: 1926 $
 */

class Artikelstamm extends CI_Controller
{
        public function __construct()
        {
                parent::__construct();
                $this->load->model('artikel_model', 'artikel');
                $this->load->model('directory_model', 'directory');
                $sql = "SELECT
                    id,
                    name
                FROM
                    content_management.medien_typ
            ";
                $res = $this->db->query($sql);
                while ($row = $res->unbuffered_row('array'))
                {
                        $typen[$row['id']] = $row['name'];
                }
                $this->smarty->assign("aehnlich", $aehnlich);
        }

        public function index($dir = -1)
        {
                $dirs = $this->directory->get_list($dir);
                $this->smarty->assign('dirs', $dirs);
                if ($dir == -1)
                {
                        $this->smarty->assign('title', 'Artikelverwaltung');
                        $this->smarty->display('artstamm.tpl');
                }
                else
                {
                        $items = $this->artikel->get_list($dir);
                        $this->smarty->assign('items', $items);
                        $this->smarty->display('artstamm_sub.tpl');
                }
        }
}

?>