Subversion-Projekte lars-tiefland.ci

Revision

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