Subversion-Projekte lars-tiefland.ci

Revision

Revision 1223 | Revision 1236 | 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: 1224 $
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
	{
1223 lars 20
		$termine = array();
1219 lars 21
		$sql = "SELECT
22
				id
23
			FROM
24
				systemtermine
1222 lars 25
			WHERE
26
				cms_access_id=".$this->session->user_data['ID']."
1219 lars 27
			ORDER BY
28
				prioritaet,
29
				faelligkeit DESC
30
		";
1224 lars 31
		$res = $this->db->query($sql);
1219 lars 32
		while ($termin = $res->unbuffered_row('array'))
33
		{
34
			$termin = $this->get($termin['id']);
35
			$termine[] = $termin;
36
		}
1223 lars 37
		return $termine;
1219 lars 38
	}
39
 
40
	public function get($id)
41
	{
42
		$orders = array();
43
		$sql = "SELECT
44
				id,
45
				faelligkeit,
46
				prioritaet,
47
				ueberschrift,
48
				nachricht,
1221 lars 49
				deeplink,
1219 lars 50
				erstellt_am,
51
				erstellt_von,
52
				letzte_aenderung_am,
53
				letzte_aenderung_von
54
			FROM
55
				systemtermine
56
			WHERE
57
				id=".$id."
58
		";
1224 lars 59
		$res = $this->db->query($sql);
1219 lars 60
		$termin = $res->unbuffered_row('array');
61
		return $termin;
62
	}
63
}
64
 
65
?>