This commit is contained in:
Stefan Puraner
2016-05-11 08:00:48 +02:00
15 changed files with 757 additions and 3755 deletions
+1 -37
View File
@@ -1,7 +1,6 @@
<?php
class Kontakt_model extends DB_Model
{
/**
* Constructor
*/
@@ -11,39 +10,4 @@ class Kontakt_model extends DB_Model
$this->dbTable = 'public.tbl_kontakt';
$this->pk = 'kontakt_id';
}
public function saveKontakt($kontakt)
{
//TODO check berechtigung
// if ($this->fhc_db_acl->bb->isBerechtigt('person', 'sui'))
// {
$data = array(
"person_id"=>$kontakt["person_id"],
"kontakttyp"=>$kontakt["kontakttyp"],
"kontakt"=>$kontakt["kontakt"],
"insertvon"=>$kontakt["insertvon"],
"insertamum"=>date('Y-m-d H:i:s')
);
if($this->db->insert("public.tbl_kontakt", $data)){
return $this->db->insert_id();
}
else
{
return false;
}
// }
// else
// {
// return "Nicht berechtigt";
// }
}
public function getKontaktPerson($person_id)
{
$this->db->select("*")
->from("public.tbl_kontakt k")
->where("k.person_id", $person_id);
return $this->db->get()->result_array();
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
<?php
class Thread_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_msg_thread';
$this->pk = 'thread_id';
}
}