Subversion-Projekte lars-tiefland.ci

Revision

Revision 2361 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2246 lars 1
<?php
2
 
3
/**
4
 * User
5
 *
6
 * @package
7
 * @author WebanOS CI
8
 * @copyright Lars Tiefland
9
 * @version 2018
10
 * @access public
11
 */
12
 
13
//$Id: Logistiker.php 2362 2018-10-03 17:49:38Z lars $
14
 
15
class Logistiker extends CI_Controller
16
{
17
 
18
	public function __construct()
19
	{
20
		parent::__construct();
21
		$this->load->model('logistiker_model', 'logistiker');
2362 lars 22
		$upload = column_exists("logistiker", "import_verzeichnis", $GLOBALS["webs"]["datenbank"],
23
			$this->db);
2361 lars 24
		$this->smarty->assign("upload", $upload);
2362 lars 25
		$default = column_exists("logistiker", "is_default", $GLOBALS["webs"]["datenbank"],
26
			$this->db);
2361 lars 27
		$this->smarty->assign("default", $default);
2362 lars 28
		$emailAbspeichern = column_exists("logistiker", "email", $GLOBALS["webs"]["datenbank"],
29
			$this->db);
2361 lars 30
		$this->smarty->assign("emailAbspeichern", $emailAbspeichern);
2246 lars 31
	}
32
	/**
33
	 * User::index()
34
	 *
35
	 * @return
36
	 */
37
	public function index()
38
	{
2250 lars 39
		$logistiker = $this->logistiker->get_list();
40
		$this->smarty->assign("logistiker", $logistiker);
2246 lars 41
		$this->smarty->view('logistiker.tpl');
42
	}
43
 
44
	/**
45
	 * User::edit()
46
	 *
47
	 * @param mixed $id
48
	 * @return void
49
	 */
50
	public function edit($id = null)
51
	{
2351 lars 52
		if ($id) {
53
			$logistiker = $this->logistiker->get($id);
54
		}
2273 lars 55
		$this->smarty->assign("logistiker", $logistiker);
56
		$this->smarty->view('logistiker_edit.tpl');
2246 lars 57
	}
58
 
59
	public function save()
60
	{
2320 lars 61
		$daten = $this->input->post('logistiker');
62
		$this->logistiker->save($daten);
2246 lars 63
	}
64
 
65
	public function del($id = null)
66
	{
2347 lars 67
		if ($id) {
68
			$logistiker = $this->logistiker->get($id);
69
			$this->smarty->assign("logistiker", $logistiker);
70
			$this->smarty->view('logistiker_del.tpl');
71
		} elseif ($this->input->post('id')) {
72
			$this->logistiker->del($this->input->post('id'));
73
		}
2246 lars 74
	}
75
 
2279 lars 76
	public function export($id)
77
	{
2354 lars 78
		$tracking = json_encode("");
2352 lars 79
		if ($id) {
80
			$tracking = $this->logistiker->export($id);
81
		}
2311 lars 82
		echo $tracking;
2279 lars 83
	}
2347 lars 84
 
2279 lars 85
	public function tracking($id)
86
	{
2354 lars 87
		$tracking = json_encode("");
2352 lars 88
		if ($id) {
89
			$tracking = $this->logistiker->tracking($id);
90
		}
2282 lars 91
		echo $tracking;
2279 lars 92
	}
2246 lars 93
}