Subversion-Projekte lars-tiefland.ci

Revision

Revision 1502 | Revision 1926 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1472 lars 1
<?php
2
 
3
/**
4
 *
5
 * @package WebanOS CI
6
 * @author Lars Tiefland <ltiefland@gmail.com>
7
 * @copyright 2016
8
 * @version $Rev: 1924 $
9
 */
10
 
11
class Artikelstamm extends CI_Controller
12
{
13
	public function __construct()
14
	{
15
		parent::__construct();
16
		$this->load->model('artikel_model', 'artikel');
17
		$this->load->model('directory_model', 'directory');
1924 lars 18
		$aehnlich = array(
19
			"nein",
20
			"ja",
21
			);
22
		$sql = "SELECT
23
	            id,
24
	            name
25
	        FROM
26
	            content_management.medien_typ
27
	    ";
28
		$res = $this->db->query($sql);
29
		while ($row = $res->unbuffered_row('array'))
30
		{
31
			$typen[$row['id']] = $row['name'];
32
		}
33
		$this->smarty->assign("typen", $typen);
34
		$this->smarty->assign("aehnlich", $aehnlich);
1472 lars 35
	}
36
 
37
	public function index($dir = -1)
38
	{
39
		$dirs = $this->directory->get_list($dir);
40
		$this->smarty->assign('dirs', $dirs);
1479 lars 41
		if ($dir == -1)
1472 lars 42
		{
43
			$this->smarty->assign('title', 'Artikelverwaltung');
1477 lars 44
			$this->smarty->display('artstamm.tpl');
1472 lars 45
		}
46
		else
47
		{
1502 lars 48
			$items = $this->artikel->get_list($dir);
1491 lars 49
			$this->smarty->assign('items', $items);
1477 lars 50
			$this->smarty->display('artstamm_sub.tpl');
1472 lars 51
		}
52
	}
53
}
54
 
1491 lars 55
?>