Subversion-Projekte lars-tiefland.ci

Revision

Revision 2360 | Zur aktuellen Revision | 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 2361 2018-10-03 17:39:29Z 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');
2360 lars 22
		$upload = column_exists("logistiker", "import_verzeichnis", $webs["datenbank"],
23
			$remoteServer_dbh);
2361 lars 24
		$this->smarty->assign("upload", $upload);
2360 lars 25
		$default = column_exists("logistiker", "is_default", $webs["datenbank"], $remoteServer_dbh);
2361 lars 26
		$this->smarty->assign("default", $default);
2360 lars 27
		$emailAbspeichern = column_exists("logistiker", "email", $webs["datenbank"], $remoteServer_dbh);
2361 lars 28
		$this->smarty->assign("emailAbspeichern", $emailAbspeichern);
2246 lars 29
	}
30
	/**
31
	 * User::index()
32
	 *
33
	 * @return
34
	 */
35
	public function index()
36
	{
2250 lars 37
		$logistiker = $this->logistiker->get_list();
38
		$this->smarty->assign("logistiker", $logistiker);
2246 lars 39
		$this->smarty->view('logistiker.tpl');
40
	}
41
 
42
	/**
43
	 * User::edit()
44
	 *
45
	 * @param mixed $id
46
	 * @return void
47
	 */
48
	public function edit($id = null)
49
	{
2351 lars 50
		if ($id) {
51
			$logistiker = $this->logistiker->get($id);
52
		}
2273 lars 53
		$this->smarty->assign("logistiker", $logistiker);
54
		$this->smarty->view('logistiker_edit.tpl');
2246 lars 55
	}
56
 
57
	public function save()
58
	{
2320 lars 59
		$daten = $this->input->post('logistiker');
60
		$this->logistiker->save($daten);
2246 lars 61
	}
62
 
63
	public function del($id = null)
64
	{
2347 lars 65
		if ($id) {
66
			$logistiker = $this->logistiker->get($id);
67
			$this->smarty->assign("logistiker", $logistiker);
68
			$this->smarty->view('logistiker_del.tpl');
69
		} elseif ($this->input->post('id')) {
70
			$this->logistiker->del($this->input->post('id'));
71
		}
2246 lars 72
	}
73
 
2279 lars 74
	public function export($id)
75
	{
2354 lars 76
		$tracking = json_encode("");
2352 lars 77
		if ($id) {
78
			$tracking = $this->logistiker->export($id);
79
		}
2311 lars 80
		echo $tracking;
2279 lars 81
	}
2347 lars 82
 
2279 lars 83
	public function tracking($id)
84
	{
2354 lars 85
		$tracking = json_encode("");
2352 lars 86
		if ($id) {
87
			$tracking = $this->logistiker->tracking($id);
88
		}
2282 lars 89
		echo $tracking;
2279 lars 90
	}
2246 lars 91
}