Subversion-Projekte lars-tiefland.ci

Revision

Revision 1678 | Revision 1697 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
898 lars 1
<?php
1577 lars 2
 
3
class Artikel extends CI_Controller
4
{
5
	public function __construct()
828 lars 6
	{
1577 lars 7
		parent::__construct();
8
		$this->load->model('artikel_model', 'artikel');
1584 lars 9
		$this->load->model('herstellerkatalog_model', 'hersteller');
828 lars 10
	}
1584 lars 11
 
12
	public function edit($id = null)
1577 lars 13
	{
1618 lars 14
		$robots = array(
15
			"index,follow",
16
			"index,nofollow",
17
			"noindex,follow",
18
			"noindex,nofollow",
19
			);
1588 lars 20
		$hersteller = $this->hersteller->get_list('dropdown');
1577 lars 21
		$daten = array();
1584 lars 22
		if ($id)
1577 lars 23
		{
24
			$daten = $this->artikel->get($id);
25
		}
1618 lars 26
		$this->smarty->assign('robots', $robots);
1586 lars 27
		$this->smarty->assign('hersteller', $hersteller);
1584 lars 28
		$this->smarty->assign('daten', $daten);
1577 lars 29
		$this->smarty->view('artikel.tpl');
30
	}
1673 lars 31
 
32
	public function save()
33
	{
34
		$artikel = $this->input->post('artikel');
35
		$meta = $this->input->post('metatgs');
36
		$preise = $this->input->post('preise');
37
		$auispraegungen = $this->input->post('auspraegung');
38
		$optionen = $this->input->post('optionen');
39
		$this->artikel->save($artikel);
40
	}
1577 lars 41
}