This commit is contained in:
Paminger
2016-05-04 07:05:23 +02:00
parent a932cfd0ad
commit 6836c3608d
216 changed files with 2934 additions and 147 deletions
@@ -0,0 +1,14 @@
<?php
class Adresse_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_adresse';
$this->pk = 'adresse_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Bankverbindung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_bankverbindung';
$this->pk = 'bankverbindung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Benutzer_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_benutzer';
$this->pk = 'uid';
}
}
@@ -0,0 +1,14 @@
<?php
class Benutzerfunktion_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_benutzerfunktion';
$this->pk = 'benutzerfunktion_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Benutzergruppe_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_benutzergruppe';
$this->pk = array('gruppe_kurzbz', 'uid');
}
}
@@ -0,0 +1,14 @@
<?php
class Fotostatus_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_fotostatus';
$this->pk = 'fotostatus_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Freebusy_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_freebusy';
$this->pk = 'freebusy_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Freebusytyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_freebusytyp';
$this->pk = 'freebusytyp_kurzbz';
}
}
@@ -0,0 +1,49 @@
<?php
class Kontakt_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$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();
}
}
@@ -0,0 +1,14 @@
<?php
class Kontaktmedium_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_kontaktmedium';
$this->pk = 'kontaktmedium_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Kontakttyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_kontakttyp';
$this->pk = 'kontakttyp';
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Notiz_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_notiz';
$this->pk = 'notiz_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Notizzuordnung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_notizzuordnung';
$this->pk = 'notizzuordnung_id';
}
}
@@ -1,42 +0,0 @@
<?php
class Prestudent_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable='public.tbl_prestudent';
$this->pk='prestudent_id';
}
/**
*
*/
public function loadPrestudentPerson($prestudentID)
{
// Check the rights
if (! $this->fhc_db_acl->isBerechtigt('basis/person', 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> basis/person', FHC_MODEL_ERROR);
// Prepare SQL-Query
$this->db->select('*')
->from('public.tbl_prestudent')
->join('public.tbl_person', 'person_id')
->where('prestudent_id', $prestudentID);
// Do the query
$result = $this->db->get()->result_object();
// Return the result
if ($result)
return $this->_success($result);
else
return $this->_error($this->db->error(), FHC_DB_ERROR);
}
}