Subversion-Projekte lars-tiefland.ci

Revision

Revision 1697 | Revision 1699 | 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
	{
1698 lars 14
		$artikelstatus = explode(";", $GLOBALS["web_rechte"]["online_shop"]["artikel"]["status"]);
1618 lars 15
		$robots = array(
16
			"index,follow",
17
			"index,nofollow",
18
			"noindex,follow",
19
			"noindex,nofollow",
20
			);
1588 lars 21
		$hersteller = $this->hersteller->get_list('dropdown');
1577 lars 22
		$daten = array();
1584 lars 23
		if ($id)
1577 lars 24
		{
25
			$daten = $this->artikel->get($id);
26
		}
1697 lars 27
		$this->smarty->assign('artikelstatus', $artikelstatus);
1618 lars 28
		$this->smarty->assign('robots', $robots);
1586 lars 29
		$this->smarty->assign('hersteller', $hersteller);
1584 lars 30
		$this->smarty->assign('daten', $daten);
1577 lars 31
		$this->smarty->view('artikel.tpl');
32
	}
1673 lars 33
 
34
	public function save()
35
	{
36
		$artikel = $this->input->post('artikel');
37
		$meta = $this->input->post('metatgs');
38
		$preise = $this->input->post('preise');
39
		$auispraegungen = $this->input->post('auspraegung');
40
		$optionen = $this->input->post('optionen');
41
		$this->artikel->save($artikel);
42
	}
1577 lars 43
}