Subversion-Projekte lars-tiefland.ci

Revision

Revision 1219 | Revision 1222 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1219 lars 1
<?php
2
 
3
/**
4
 *
5
 * @package WebanOS CI
6
 * @author Lars Tiefland <ltiefland@gmail.com>
7
 * @copyright 2016
8
 * @version $Rev: 1221 $
9
 */
10
 
11
class Termine_model extends CI_Model
12
{
13
	public function __construct()
14
	{
15
		parent::__construct();
16
	}
17
 
18
	public function get_list()
19
	{
20
		$orders = array();
21
		$sql = "SELECT
22
				id
23
			FROM
24
				systemtermine
25
			ORDER BY
26
				prioritaet,
27
				faelligkeit DESC
28
		";
29
		$res = $GLOBALS['order_db']->query($sql);
30
		while ($termin = $res->unbuffered_row('array'))
31
		{
32
			$termin = $this->get($termin['id']);
33
			$termine[] = $termin;
34
		}
35
		return $orders;
36
	}
37
 
38
	public function get($id)
39
	{
40
		$orders = array();
41
		$sql = "SELECT
42
				id,
43
				faelligkeit,
44
				prioritaet,
45
				ueberschrift,
46
				nachricht,
1221 lars 47
				deeplink,
1219 lars 48
				erstellt_am,
49
				erstellt_von,
50
				letzte_aenderung_am,
51
				letzte_aenderung_von
52
			FROM
53
				systemtermine
54
			WHERE
55
				id=".$id."
56
		";
57
		$res = $GLOBALS['order_db']->query($sql);
58
		$termin = $res->unbuffered_row('array');
59
		return $termin;
60
	}
61
}
62
 
63
?>