Subversion-Projekte lars-tiefland.ci

Revision

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