diff --git a/.gitignore b/.gitignore
index 51b973de7..7fdf62e73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ documents/
.settings
.project
.buildpath
+application/config/development/
tests/codeception/codeception.yml
tests/codeception/tests/api.suite.yml
tests/codeception/tests/functional.suite.yml
@@ -19,4 +20,4 @@ tests/codeception/_output/*
/submodules/d3
composer.lock
bin
-/tests/codeception/api.suite.yml
\ No newline at end of file
+/tests/codeception/api.suite.yml
diff --git a/application/config/autoload.php b/application/config/autoload.php
index dd66c13b6..6bbcbf33b 100755
--- a/application/config/autoload.php
+++ b/application/config/autoload.php
@@ -1,5 +1,5 @@
'',
diff --git a/application/config/fhcomplete.php b/application/config/fhcomplete.php
index 37bb2a457..47867d517 100644
--- a/application/config/fhcomplete.php
+++ b/application/config/fhcomplete.php
@@ -6,17 +6,227 @@ $config['fhc_version'] = '3.2';
$config['fhc_acl'] = array
(
- 'bis.tbl_nation' => 'basis/nation',
+ 'bis.tbl_archiv' => 'basis/archiv',
+ 'bis.tbl_ausbildung' => 'basis/ausbildung',
+ 'bis.tbl_berufstaetigkeit' => 'basis/berufstaetigkeit',
+ 'bis.tbl_beschaeftigungsausmass' => 'basis/beschaeftigungsausmass',
+ 'bis.tbl_besqual' => 'basis/besqual',
+ 'bis.tbl_bisfunktion' => 'basis/bisfunktion',
+ 'bis.tbl_bisio' => 'basis/bisio',
+ 'bis.tbl_bisorgform' => 'basis/bisorgform',
+ 'bis.tbl_bisverwendung' => 'basis/bisverwendung',
+ 'bis.tbl_bundesland' => 'basis/bundesland',
+ 'bis.tbl_entwicklungsteam' => 'basis/entwicklungsteam',
+ 'bis.tbl_gemeinde' => 'basis/gemeinde',
+ 'bis.tbl_hauptberuf' => 'basis/hauptberuf',
'bis.tbl_lgartcode' => 'basis/lgartcode',
-
- 'lehre.tbl_studienplan' => 'basis/studienplan',
+ 'bis.tbl_mobilitaetsprogramm' => 'basis/mobilitaetsprogramm',
+ 'bis.tbl_nation' => 'basis/nation',
+ 'bis.tbl_orgform' => 'basis/orgform',
+ 'bis.tbl_verwendung' => 'basis/verwendung',
+ 'bis.tbl_zgv' => 'basis/zgv',
+ 'bis.tbl_zgvdoktor' => 'basis/zgvdoktor',
+ 'bis.tbl_zgvgruppe' => 'basis/zgvgruppe',
+ 'bis.tbl_zgvmaster' => 'basis/zgvmaster',
+ 'bis.tbl_zweck' => 'basis/zweck',
+ 'campus.tbl_abgabe' => 'basis/abgabe',
+ 'campus.tbl_anwesenheit' => 'basis/anwesenheit',
+ 'campus.tbl_beispiel' => 'basis/beispiel',
+ 'campus.tbl_content' => 'basis/content',
+ 'campus.tbl_contentchild' => 'basis/contentchild',
+ 'campus.tbl_contentgruppe' => 'basis/contentgruppe',
+ 'campus.tbl_contentlog' => 'basis/contentlog',
+ 'campus.tbl_contentsprache' => 'basis/contentsprache',
+ 'campus.tbl_coodle' => 'basis/coodle',
+ 'campus.tbl_dms' => 'basis/dms',
+ 'campus.tbl_erreichbarkeit' => 'basis/erreichbarkeit',
+ 'campus.tbl_feedback' => 'basis/feedback',
+ 'campus.tbl_freebusy' => 'basis/freebusy',
+ 'campus.tbl_freebusytyp' => 'basis/freebusytyp',
+ 'campus.tbl_infoscreen' => 'basis/infoscreen',
+ 'campus.tbl_legesamtnote' => 'basis/legesamtnote',
+ 'campus.tbl_lvgesamtnote' => 'basis/lvgesamtnote',
+ 'campus.tbl_lvinfo' => 'basis/lvinfo',
+ 'campus.tbl_news' => 'basis/news',
+ 'campus.tbl_notenschluessel' => 'basis/notenschluessel',
+ 'campus.tbl_notenschluesseluebung' => 'basis/notenschluesseluebung',
+ 'campus.tbl_paabgabe' => 'basis/paabgabe',
+ 'campus.tbl_paabgabetyp' => 'basis/paabgabetyp',
+ 'campus.tbl_pruefung' => 'basis/pruefung',
+ 'campus.tbl_pruefungsanmeldung' => 'basis/pruefungsanmeldung',
+ 'campus.tbl_pruefungsfenster' => 'basis/pruefungsfenster',
+ 'campus.tbl_pruefungsstatus' => 'basis/pruefungsstatus',
+ 'campus.tbl_pruefungstermin' => 'basis/pruefungstermin',
+ 'campus.tbl_reservierung' => 'basis/reservierung',
+ 'campus.tbl_resturlaub' => 'basis/resturlaub',
+ 'campus.tbl_studentbeispiel' => 'basis/studentbeispiel',
+ 'campus.tbl_studentuebung' => 'basis/studentuebung',
+ 'campus.tbl_template' => 'basis/template',
+ 'campus.tbl_uebung' => 'basis/uebung',
+ 'campus.tbl_veranstaltung' => 'basis/veranstaltung',
+ 'campus.tbl_veranstaltungskategorie' => 'basis/veranstaltungskategorie',
+ 'campus.tbl_zeitaufzeichnung' => 'basis/zeitaufzeichnung',
+ 'campus.tbl_zeitsperre' => 'basis/zeitsperre',
+ 'campus.tbl_zeitsperretyp' => 'basis/zeitsperretyp',
+ 'campus.tbl_zeitwunsch' => 'basis/zeitwunsch',
+ 'fue.tbl_aktivitaet' => 'basis/aktivitaet',
+ 'fue.tbl_aufwandstyp' => 'basis/aufwandstyp',
+ 'fue.tbl_projekt' => 'basis/projekt',
+ 'fue.tbl_projekt_ressource' => 'basis/projekt_ressource',
+ 'fue.tbl_projektphase' => 'basis/projektphase',
+ 'fue.tbl_projekttask' => 'basis/projekttask',
+ 'fue.tbl_ressource' => 'basis/ressource',
+ 'fue.tbl_scrumsprint' => 'basis/scrumsprint',
+ 'fue.tbl_scrumteam' => 'basis/scrumteam',
+ 'lehre.tbl_abschlussbeurteilung' => 'basis/abschlussbeurteilung',
+ 'lehre.tbl_abschlusspruefung' => 'basis/abschlusspruefung',
+ 'lehre.tbl_akadgrad' => 'basis/akadgrad',
+ 'lehre.tbl_anrechnung' => 'basis/anrechnung',
+ 'lehre.tbl_betreuerart' => 'basis/betreuerart',
+ 'lehre.tbl_ferien' => 'basis/ferien',
+ 'lehre.tbl_lehreinheit' => 'basis/lehreinheit',
+ 'lehre.tbl_lehreinheitgruppe' => 'basis/lehreinheitgruppe',
+ 'lehre.tbl_lehreinheitmitarbeiter' => 'basis/lehreinheitmitarbeiter',
+ 'lehre.tbl_lehrfach' => 'basis/lehrfach',
+ 'lehre.tbl_lehrform' => 'basis/lehrform',
+ 'lehre.tbl_lehrfunktion' => 'basis/lehrfunktion',
+ 'lehre.tbl_lehrmittel' => 'basis/lehrmittel',
+ 'lehre.tbl_lehrtyp' => 'basis/lehrtyp',
+ 'lehre.tbl_lehrveranstaltung' => 'basis/lehrveranstaltung',
+ 'lehre.tbl_lvangebot' => 'basis/lvangebot',
+ 'lehre.tbl_lvregel' => 'basis/lvregel',
+ 'lehre.tbl_lvregeltyp' => 'basis/lvregeltyp',
+ 'lehre.tbl_moodle' => 'basis/moodle',
+ 'lehre.tbl_note' => 'basis/note',
+ 'lehre.tbl_notenschluessel' => 'basis/notenschluessel',
+ 'lehre.tbl_notenschluesselaufteilung' => 'basis/notenschluesselaufteilung',
+ 'lehre.tbl_notenschluesselzuordnung' => 'basis/notenschluesselzuordnung',
+ 'lehre.tbl_projektarbeit' => 'basis/projektarbeit',
+ 'lehre.tbl_projektbetreuer' => 'basis/projektbetreuer',
+ 'lehre.tbl_projekttyp' => 'basis/projekttyp',
+ 'lehre.tbl_pruefung' => 'basis/pruefung',
+ 'lehre.tbl_pruefungstyp' => 'basis/pruefungstyp',
'lehre.tbl_studienordnung' => 'basis/studienordnung',
- 'lehre.vw_studienplan' => 'basis/vw_studienplan',
-
- 'public.tbl_person' => 'basis/person',
+ 'lehre.tbl_studienordnungstatus' => 'basis/studienordnungstatus',
+ 'lehre.tbl_studienplan' => 'basis/studienplan',
+ 'lehre.tbl_studienplatz' => 'basis/studienplatz',
+ 'lehre.tbl_stunde' => 'basis/stunde',
+ 'lehre.tbl_stundenplan' => 'basis/stundenplan',
+ 'lehre.tbl_stundenplandev' => 'basis/stundenplandev',
+ 'lehre.tbl_vertrag' => 'basis/vertrag',
+ 'lehre.tbl_vertragsstatus' => 'basis/vertragsstatus',
+ 'lehre.tbl_vertragstyp' => 'basis/vertragstyp',
+ 'lehre.tbl_zeitfenster' => 'basis/zeitfenster',
+ 'lehre.tbl_zeugnis' => 'basis/zeugnis',
+ 'lehre.tbl_zeugnisnote' => 'basis/zeugnisnote',
+ 'public.tbl_adresse' => 'basis/adresse',
+ 'public.tbl_akte' => 'basis/akte',
+ 'public.tbl_ampel' => 'basis/ampel',
+ 'public.tbl_aufmerksamdurch' => 'basis/aufmerksamdurch',
+ 'public.tbl_aufnahmeschluessel' => 'basis/aufnahmeschluessel',
+ 'public.tbl_aufnahmetermin' => 'basis/aufnahmetermin',
+ 'public.tbl_aufnahmetermintyp' => 'basis/aufnahmetermintyp',
+ 'public.tbl_bankverbindung' => 'basis/bankverbindung',
+ 'public.tbl_benutzer' => 'basis/benutzer',
+ 'public.tbl_benutzerfunktion' => 'basis/benutzerfunktion',
+ 'public.tbl_benutzergruppe' => 'basis/benutzergruppe',
+ 'public.tbl_bewerbungstermine' => 'basis/bewerbungstermine',
+ 'public.tbl_buchungstyp' => 'basis/buchungstyp',
+ 'public.tbl_dokument' => 'basis/dokument',
+ 'public.tbl_dokumentprestudent' => 'basis/dokumentprestudent',
+ 'public.tbl_dokumentstudiengang' => 'basis/dokumentstudiengang',
+ 'public.tbl_erhalter' => 'basis/erhalter',
+ 'public.tbl_fachbereich' => 'basis/fachbereich',
+ 'public.tbl_filter' => 'basis/filter',
+ 'public.tbl_firma' => 'basis/firma',
+ 'public.tbl_firmatag' => 'basis/firmatag',
+ 'public.tbl_firmentyp' => 'basis/firmentyp',
+ 'public.tbl_fotostatus' => 'basis/fotostatus',
+ 'public.tbl_funktion' => 'basis/funktion',
+ 'public.tbl_geschaeftsjahr' => 'basis/geschaeftsjahr',
+ 'public.tbl_gruppe' => 'basis/gruppe',
'public.tbl_kontakt' => 'basis/kontakt',
- 'public.tbl_prestudent' => 'basis/person',
- 'public.tbl_prestudentstatus' => 'basis/person',
+ 'public.tbl_kontaktmedium' => 'basis/kontaktmedium',
+ 'public.tbl_kontakttyp' => 'basis/kontakttyp',
+ 'public.tbl_konto' => 'basis/konto',
+ 'public.tbl_lehrverband' => 'basis/lehrverband',
+ 'public.tbl_log' => 'basis/log',
+ 'public.tbl_mitarbeiter' => 'basis/mitarbeiter',
+ 'public.tbl_msg_message' => 'basis/msg_message',
+ 'public.tbl_msg_thread' => 'basis/msg_thread',
+ 'public.tbl_notiz' => 'basis/notiz',
+ 'public.tbl_notizzuordnung' => 'basis/notizzuordnung',
'public.tbl_organisationseinheit' => 'basis/organisationseinheit',
- 'public.tbl_sprache' => 'admin'
+ 'public.tbl_organisationseinheittyp' => 'basis/organisationseinheittyp',
+ 'public.tbl_ort' => 'basis/ort',
+ 'public.tbl_ortraumtyp' => 'basis/ortraumtyp',
+ 'public.tbl_person' => 'basis/person',
+ 'public.tbl_personfunktionstandort' => 'basis/personfunktionstandort',
+ 'public.tbl_preincoming' => 'basis/preincoming',
+ 'public.tbl_preinteressent' => 'basis/preinteressent',
+ 'public.tbl_preinteressentstudiengang' => 'basis/preinteressentstudiengang',
+ 'public.tbl_preoutgoing' => 'basis/preoutgoing',
+ 'public.tbl_prestudent' => 'basis/prestudent',
+ 'public.tbl_prestudentstatus' => 'basis/prestudentstatus',
+ 'public.tbl_raumtyp' => 'basis/raumtyp',
+ 'public.tbl_reihungstest' => 'basis/reihungstest',
+ 'public.tbl_semesterwochen' => 'basis/semesterwochen',
+ 'public.tbl_service' => 'basis/service',
+ 'public.tbl_sprache' => 'basis/sprache',
+ 'public.tbl_standort' => 'basis/standort',
+ 'public.tbl_statistik' => 'basis/statistik',
+ 'public.tbl_status' => 'basis/status',
+ 'public.tbl_student' => 'basis/student',
+ 'public.tbl_studentlehrverband' => 'basis/studentlehrverband',
+ 'public.tbl_studiengang' => 'basis/studiengang',
+ 'public.tbl_studiengangstyp' => 'basis/studiengangstyp',
+ 'public.tbl_studienjahr' => 'basis/studienjahr',
+ 'public.tbl_studiensemester' => 'basis/studiensemester',
+ 'public.tbl_tag' => 'basis/tag',
+ 'public.tbl_variable' => 'basis/variable',
+ 'public.tbl_vorlage' => 'basis/vorlage',
+ 'public.tbl_vorlagestudiengang' => 'basis/vorlagestudiengang',
+ 'system.tbl_appdaten' => 'basis/appdaten',
+ 'system.tbl_benutzerrolle' => 'basis/benutzerrolle',
+ 'system.tbl_berechtigung' => 'basis/berechtigung',
+ 'system.tbl_cronjob' => 'basis/cronjob',
+ 'system.tbl_rolle' => 'basis/rolle',
+ 'system.tbl_rolleberechtigung' => 'basis/rolleberechtigung',
+ 'system.tbl_server' => 'basis/server',
+ 'system.tbl_webservicelog' => 'basis/webservicelog',
+ 'system.tbl_webservicerecht' => 'basis/webservicerecht',
+ 'system.tbl_webservicetyp' => 'basis/webservicetyp',
+ 'testtool.tbl_ablauf' => 'basis/ablauf',
+ 'testtool.tbl_antwort' => 'basis/antwort',
+ 'testtool.tbl_frage' => 'basis/frage',
+ 'testtool.tbl_gebiet' => 'basis/gebiet',
+ 'testtool.tbl_kategorie' => 'basis/kategorie',
+ 'testtool.tbl_kriterien' => 'basis/kriterien',
+ 'testtool.tbl_pruefling' => 'basis/pruefling',
+ 'testtool.tbl_vorschlag' => 'basis/vorschlag',
+ 'wawi.tbl_aufteilung' => 'basis/aufteilung',
+ 'wawi.tbl_bestelldetail' => 'basis/bestelldetail',
+ 'wawi.tbl_bestelldetailtag' => 'basis/bestelldetailtag',
+ 'wawi.tbl_bestellstatus' => 'basis/bestellstatus',
+ 'wawi.tbl_bestellung' => 'basis/bestellung',
+ 'wawi.tbl_bestellungtag' => 'basis/bestellungtag',
+ 'wawi.tbl_betriebsmittel' => 'basis/betriebsmittel',
+ 'wawi.tbl_betriebsmittelperson' => 'basis/betriebsmittelperson',
+ 'wawi.tbl_betriebsmittelstatus' => 'basis/betriebsmittelstatus',
+ 'wawi.tbl_betriebsmitteltyp' => 'basis/betriebsmitteltyp',
+ 'wawi.tbl_buchung' => 'basis/buchung',
+ 'wawi.tbl_buchungstyp' => 'basis/buchungstyp',
+ 'wawi.tbl_budget' => 'basis/budget',
+ 'wawi.tbl_konto' => 'basis/konto',
+ 'wawi.tbl_kostenstelle' => 'basis/kostenstelle',
+ 'wawi.tbl_rechnung' => 'basis/rechnung',
+ 'wawi.tbl_rechnungsbetrag' => 'basis/rechnungsbetrag',
+ 'wawi.tbl_rechnungstyp' => 'basis/rechnungstyp',
+ 'wawi.tbl_zahlungstyp' => 'basis/zahlungstyp',
+
+ 'lehre.vw_studienplan' => 'basis/studienplan',
+
+ 'public.tbl_sprache' => 'admin',
+ 'public.tbl_msg_thread' => 'admin',
+ 'public.tbl_msg_message' => 'admin'
);
\ No newline at end of file
diff --git a/application/config/foreign_chars.php b/application/config/foreign_chars.php
index ac406e3d4..a656dd048 100755
--- a/application/config/foreign_chars.php
+++ b/application/config/foreign_chars.php
@@ -1,5 +1,5 @@
my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
-$route['person/(:any)'] = 'person/view/$1';
-$route['person'] = 'person';
$route['default_controller'] = 'Vilesci';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
+
+// Class name conflicts
+$route['api/v1/organisation/studiengang/(:any)'] = 'api/v1/organisation/studiengang2/$1';
+$route['api/v1/ressource/betriebsmittelperson/(:any)'] = 'api/v1/ressource/betriebsmittelperson2/$1';
+$route['api/v1/organisation/fachbereich/(:any)'] = 'api/v1/organisation/fachbereich2/$1';
+$route['api/v1/organisation/geschaeftsjahr/(:any)'] = 'api/v1/organisation/geschaeftsjahr2/$1';
+$route['api/v1/organisation/organisationseinheit/(:any)'] = 'api/v1/organisation/organisationseinheit2/$1';
+$route['api/v1/system/sprache/(:any)'] = 'api/v1/system/sprache2/$1';
\ No newline at end of file
diff --git a/application/config/smileys.php b/application/config/smileys.php
index 1eeba4776..272be2fcd 100755
--- a/application/config/smileys.php
+++ b/application/config/smileys.php
@@ -1,5 +1,5 @@
load->database('system'); //Use the system-Connection for DB-Manipulation
+ $this->config->load('migration');
$this->load->library('migration');
// If not set, set it
@@ -301,7 +302,7 @@ class DBTools extends FHC_Controller
*/
private function __getVersion()
{
- $row = $this->db->get('ci_migrations')->row();
+ $row = $this->db->get($this->config->item('migration_table'))->row();
return $row ? $row->version : 0;
}
}
diff --git a/application/controllers/Examples.php b/application/controllers/Examples.php
index f40a37aa4..89177263f 100644
--- a/application/controllers/Examples.php
+++ b/application/controllers/Examples.php
@@ -189,7 +189,7 @@ class Examples extends CI_Controller
$output = $crud->render();
- if($crud->getState() != 'list') {
+ if ($crud->getState() != 'list') {
$this->_example_output($output);
} else {
return $output;
@@ -214,7 +214,7 @@ class Examples extends CI_Controller
$output = $crud->render();
- if($crud->getState() != 'list') {
+ if ($crud->getState() != 'list') {
$this->_example_output($output);
} else {
return $output;
@@ -237,7 +237,7 @@ class Examples extends CI_Controller
$output = $crud->render();
- if($crud->getState() != 'list') {
+ if ($crud->getState() != 'list') {
$this->_example_output($output);
} else {
return $output;
diff --git a/application/controllers/ModelTest.php b/application/controllers/ModelTest.php
index 430021d26..3e51082d7 100755
--- a/application/controllers/ModelTest.php
+++ b/application/controllers/ModelTest.php
@@ -1,5 +1,5 @@
Person_model->getPerson(null, 'asdf\' OR person_id=1; SELECT 1; --');
var_dump($res->result_object());
- $this->load->model('person/Prestudent_model');
+ $this->load->model('crm/Prestudent_model');
$id=null;
// Insert PreStudent
@@ -79,7 +79,7 @@ class ModelTest extends FHC_Controller
var_dump($res->retval);
// Insert PreStudentStatus
- $this->load->model('person/Prestudentstatus_model');
+ $this->load->model('crm/Prestudentstatus_model');
$data = array
(
'prestudent_id' => $id,
@@ -155,7 +155,7 @@ class ModelTest extends FHC_Controller
else
var_dump($res->retval);
- $this->load->model('core/Sprache_model');
+ $this->load->model('system/Sprache_model');
// Insert Sprache
$data = array
(
diff --git a/application/controllers/Rest_server.php b/application/controllers/Rest_server.php
index b00fbef9b..a9a755c76 100644
--- a/application/controllers/Rest_server.php
+++ b/application/controllers/Rest_server.php
@@ -21,7 +21,7 @@
* @return some value on success.
*/
-defined('BASEPATH') || exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* @class Rest_server
diff --git a/application/controllers/Vilesci.php b/application/controllers/Vilesci.php
index 3cbf06974..fed0f077b 100755
--- a/application/controllers/Vilesci.php
+++ b/application/controllers/Vilesci.php
@@ -1,5 +1,5 @@
load->model('file_model', 'FileModel');
- // Load set the uid of the model to let to check the permissions
- $this->FileModel->setUID($this->_getUID());
- }
-
- /**
- * @return void
- */
- public function postFile()
- {
- $result = $this->FileModel->saveFile($this->post());
-
- if($result === TRUE)
- {
- $httpstatus = REST_Controller::HTTP_OK;
- $payload = [
- 'success' => true,
- 'message' => 'File saved.'
- ];
- $payload['data'] = $result;
- }
- else
- {
- $payload = [
- 'success' => false,
- 'message' => 'Could not save file.'
- ];
- $httpstatus = REST_Controller::HTTP_OK;
- }
- $this->response($payload, $httpstatus);
- }
-}
\ No newline at end of file
diff --git a/application/controllers/api/v1/Kontakt.php b/application/controllers/api/v1/Kontakt.php
deleted file mode 100644
index 7f9c05112..000000000
--- a/application/controllers/api/v1/Kontakt.php
+++ /dev/null
@@ -1,80 +0,0 @@
-load->model('kontakt/Kontakt_model');
- }
-
- public function kontaktPerson_get()
- {
- $result = $this->Kontakt_model->getKontaktPerson($this->get("person_id"));
- if($result != FALSE)
- {
- $httpstatus = REST_Controller::HTTP_OK;
- $payload = [
- 'success' => true,
- 'message' => 'Kontakt found.'
- ];
- $payload['data'] = $result;
- }
- else
- {
- $payload = [
- 'success' => false,
- 'message' => 'Could not find Kontakt.'
- ];
- $httpstatus = REST_Controller::HTTP_OK;
- }
-
- $this->response($payload, $httpstatus);
- }
-
- public function kontakt_post()
- {
- $result = $this->Kontakt_model->saveKontakt($this->post());
- if($result != FALSE)
- {
- $httpstatus = REST_Controller::HTTP_OK;
- $payload = [
- 'success' => true,
- 'message' => 'Kontakt saved.'
- ];
- $payload['data'] = $result;
- }
- else
- {
- $payload = [
- 'success' => false,
- 'message' => 'Could not save Kontakt.'
- ];
- $httpstatus = REST_Controller::HTTP_OK;
- }
-
- $this->response($payload, $httpstatus);
- }
-
-}
diff --git a/application/controllers/api/v1/Ping.php b/application/controllers/api/v1/Ping.php
index bde091170..a4ca0d4a1 100644
--- a/application/controllers/api/v1/Ping.php
+++ b/application/controllers/api/v1/Ping.php
@@ -14,7 +14,7 @@
// ------------------------------------------------------------------------
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
require APPPATH . '/libraries/REST_Controller.php';
diff --git a/application/controllers/api/v1/Test.php b/application/controllers/api/v1/Test.php
index d575db173..c036973f5 100644
--- a/application/controllers/api/v1/Test.php
+++ b/application/controllers/api/v1/Test.php
@@ -1,6 +1,6 @@
load->model('accounting/aufteilung_model', 'AufteilungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AufteilungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAufteilung()
+ {
+ $aufteilungID = $this->get('aufteilung_id');
+
+ if (isset($aufteilungID))
+ {
+ $result = $this->AufteilungModel->load($aufteilungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAufteilung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['aufteilung_id']))
+ {
+ $result = $this->AufteilungModel->update($this->post()['aufteilung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AufteilungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($aufteilung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Bestelldetail.php b/application/controllers/api/v1/accounting/Bestelldetail.php
new file mode 100644
index 000000000..cde6eb766
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Bestelldetail.php
@@ -0,0 +1,78 @@
+load->model('accounting/bestelldetail_model', 'BestelldetailModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BestelldetailModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBestelldetail()
+ {
+ $bestelldetailID = $this->get('bestelldetail_id');
+
+ if (isset($bestelldetailID))
+ {
+ $result = $this->BestelldetailModel->load($bestelldetailID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBestelldetail()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bestelldetail_id']))
+ {
+ $result = $this->BestelldetailModel->update($this->post()['bestelldetail_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BestelldetailModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bestelldetail = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Bestelldetailtag.php b/application/controllers/api/v1/accounting/Bestelldetailtag.php
new file mode 100644
index 000000000..1263bd04e
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Bestelldetailtag.php
@@ -0,0 +1,79 @@
+load->model('accounting/bestelldetailtag_model', 'BestelldetailtagModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BestelldetailtagModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBestelldetailtag()
+ {
+ $bestelldetail_id = $this->get('bestelldetail_id');
+ $tag = $this->get('tag');
+
+ if (isset($bestelldetail_id) && isset($tag))
+ {
+ $result = $this->BestelldetailtagModel->load(array($bestelldetail_id, $tag));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBestelldetailtag()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bestelldetailtag_id']))
+ {
+ $result = $this->BestelldetailtagModel->update($this->post()['bestelldetailtag_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BestelldetailtagModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bestelldetailtag = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Bestellstatus.php b/application/controllers/api/v1/accounting/Bestellstatus.php
new file mode 100644
index 000000000..2feb43ced
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Bestellstatus.php
@@ -0,0 +1,78 @@
+load->model('accounting/bestellstatus_model', 'BestellstatusModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BestellstatusModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBestellstatus()
+ {
+ $bestellstatus_kurzbz = $this->get('bestellstatus_kurzbz');
+
+ if (isset($bestellstatus_kurzbz))
+ {
+ $result = $this->BestellstatusModel->load($bestellstatus_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBestellstatus()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bestellstatus_kurzbz']))
+ {
+ $result = $this->BestellstatusModel->update($this->post()['bestellstatus_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->BestellstatusModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bestellstatus = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Bestellung.php b/application/controllers/api/v1/accounting/Bestellung.php
new file mode 100644
index 000000000..cce6a4298
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Bestellung.php
@@ -0,0 +1,78 @@
+load->model('accounting/bestellung_model', 'BestellungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BestellungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBestellung()
+ {
+ $bestellungID = $this->get('bestellung_id');
+
+ if (isset($bestellungID))
+ {
+ $result = $this->BestellungModel->load($bestellungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBestellung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bestellung_id']))
+ {
+ $result = $this->BestellungModel->update($this->post()['bestellung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BestellungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bestellung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Bestellungtag.php b/application/controllers/api/v1/accounting/Bestellungtag.php
new file mode 100644
index 000000000..13361d66f
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Bestellungtag.php
@@ -0,0 +1,79 @@
+load->model('accounting/bestellungtag_model', 'BestellungtagModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BestellungtagModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBestellungtag()
+ {
+ $bestellung_id = $this->get('bestellung_id');
+ $tag = $this->get('tag');
+
+ if (isset($bestellung_id) && isset($tag))
+ {
+ $result = $this->BestellungtagModel->load(array($bestellung_id, $tag));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBestellungtag()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bestellungtag_id']))
+ {
+ $result = $this->BestellungtagModel->update($this->post()['bestellungtag_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BestellungtagModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bestellungtag = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Buchung.php b/application/controllers/api/v1/accounting/Buchung.php
new file mode 100644
index 000000000..7175063a2
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Buchung.php
@@ -0,0 +1,78 @@
+load->model('accounting/buchung_model', 'BuchungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BuchungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBuchung()
+ {
+ $buchungID = $this->get('buchung_id');
+
+ if (isset($buchungID))
+ {
+ $result = $this->BuchungModel->load($buchungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBuchung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['buchung_id']))
+ {
+ $result = $this->BuchungModel->update($this->post()['buchung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BuchungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($buchung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Buchungstyp.php b/application/controllers/api/v1/accounting/Buchungstyp.php
new file mode 100644
index 000000000..854cc954b
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Buchungstyp.php
@@ -0,0 +1,78 @@
+load->model('accounting/buchungstyp_model', 'BuchungstypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BuchungstypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBuchungstyp()
+ {
+ $buchungstyp_kurzbz = $this->get('buchungstyp_kurzbz');
+
+ if (isset($buchungstyp_kurzbz))
+ {
+ $result = $this->BuchungstypModel->load($buchungstyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBuchungstyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['buchungstyp_kurzbz']))
+ {
+ $result = $this->BuchungstypModel->update($this->post()['buchungstyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->BuchungstypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($buchungstyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Budget.php b/application/controllers/api/v1/accounting/Budget.php
new file mode 100644
index 000000000..7de0dee3f
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Budget.php
@@ -0,0 +1,79 @@
+load->model('accounting/budget_model', 'BudgetModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BudgetModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBudget()
+ {
+ $kostenstelle_id = $this->get('kostenstelle_id');
+ $geschaeftsjahr_kurzbz = $this->get('geschaeftsjahr_kurzbz');
+
+ if (isset($kostenstelle_id) && isset($geschaeftsjahr_kurzbz))
+ {
+ $result = $this->BudgetModel->load(array($kostenstelle_id, $geschaeftsjahr_kurzbz));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBudget()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['budget_id']) && isset($this->post()['geschaeftsjahr_kurzbz']))
+ {
+ $result = $this->BudgetModel->update(array($this->post()['budget_id'], $this->post()['geschaeftsjahr_kurzbz']), $this->post());
+ }
+ else
+ {
+ $result = $this->BudgetModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($budget = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Konto.php b/application/controllers/api/v1/accounting/Konto.php
new file mode 100644
index 000000000..2c05a6735
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Konto.php
@@ -0,0 +1,78 @@
+load->model('accounting/konto_model', 'KontoModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->KontoModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getKonto()
+ {
+ $kontoID = $this->get('konto_id');
+
+ if (isset($kontoID))
+ {
+ $result = $this->KontoModel->load($kontoID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postKonto()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['konto_id']))
+ {
+ $result = $this->KontoModel->update($this->post()['konto_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->KontoModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($konto = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Kostenstelle.php b/application/controllers/api/v1/accounting/Kostenstelle.php
new file mode 100644
index 000000000..ef4074134
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Kostenstelle.php
@@ -0,0 +1,78 @@
+load->model('accounting/kostenstelle_model', 'KostenstelleModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->KostenstelleModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getKostenstelle()
+ {
+ $kostenstelleID = $this->get('kostenstelle_id');
+
+ if (isset($kostenstelleID))
+ {
+ $result = $this->KostenstelleModel->load($kostenstelleID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postKostenstelle()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['kostenstelle_id']))
+ {
+ $result = $this->KostenstelleModel->update($this->post()['kostenstelle_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->KostenstelleModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($kostenstelle = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Rechnung.php b/application/controllers/api/v1/accounting/Rechnung.php
new file mode 100644
index 000000000..4bc69abf6
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Rechnung.php
@@ -0,0 +1,78 @@
+load->model('accounting/rechnung_model', 'RechnungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->RechnungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getRechnung()
+ {
+ $rechnungID = $this->get('rechnung_id');
+
+ if (isset($rechnungID))
+ {
+ $result = $this->RechnungModel->load($rechnungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postRechnung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['rechnung_id']))
+ {
+ $result = $this->RechnungModel->update($this->post()['rechnung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->RechnungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($rechnung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Rechnungsbetrag.php b/application/controllers/api/v1/accounting/Rechnungsbetrag.php
new file mode 100644
index 000000000..3031857e0
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Rechnungsbetrag.php
@@ -0,0 +1,78 @@
+load->model('accounting/rechnungsbetrag_model', 'RechnungsbetragModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->RechnungsbetragModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getRechnungsbetrag()
+ {
+ $rechnungsbetragID = $this->get('rechnungsbetrag_id');
+
+ if (isset($rechnungsbetragID))
+ {
+ $result = $this->RechnungsbetragModel->load($rechnungsbetragID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postRechnungsbetrag()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['rechnungsbetrag_id']))
+ {
+ $result = $this->RechnungsbetragModel->update($this->post()['rechnungsbetrag_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->RechnungsbetragModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($rechnungsbetrag = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Rechnungstyp.php b/application/controllers/api/v1/accounting/Rechnungstyp.php
new file mode 100644
index 000000000..56deb307f
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Rechnungstyp.php
@@ -0,0 +1,78 @@
+load->model('accounting/rechnungstyp_model', 'RechnungstypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->RechnungstypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getRechnungstyp()
+ {
+ $rechnungstyp_kurzbz = $this->get('rechnungstyp_kurzbz');
+
+ if (isset($rechnungstyp_kurzbz))
+ {
+ $result = $this->RechnungstypModel->load($rechnungstyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postRechnungstyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['rechnungstyp_kurzbz']))
+ {
+ $result = $this->RechnungstypModel->update($this->post()['rechnungstyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->RechnungstypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($rechnungstyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Vertrag.php b/application/controllers/api/v1/accounting/Vertrag.php
new file mode 100644
index 000000000..8993838d9
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Vertrag.php
@@ -0,0 +1,78 @@
+load->model('accounting/vertrag_model', 'VertragModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VertragModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVertrag()
+ {
+ $vertragID = $this->get('vertrag_id');
+
+ if (isset($vertragID))
+ {
+ $result = $this->VertragModel->load($vertragID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVertrag()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['vertrag_id']))
+ {
+ $result = $this->VertragModel->update($this->post()['vertrag_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->VertragModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($vertrag = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Vertragsstatus.php b/application/controllers/api/v1/accounting/Vertragsstatus.php
new file mode 100644
index 000000000..bc7567cf9
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Vertragsstatus.php
@@ -0,0 +1,78 @@
+load->model('accounting/vertragsstatus_model', 'VertragsstatusModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VertragsstatusModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVertragsstatus()
+ {
+ $vertragsstatus_kurzbz = $this->get('vertragsstatus_kurzbz');
+
+ if (isset($vertragsstatus_kurzbz))
+ {
+ $result = $this->VertragsstatusModel->load($vertragsstatus_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVertragsstatus()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['vertragsstatus_kurzbz']))
+ {
+ $result = $this->VertragsstatusModel->update($this->post()['vertragsstatus_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->VertragsstatusModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($vertragsstatus = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Vertragstyp.php b/application/controllers/api/v1/accounting/Vertragstyp.php
new file mode 100644
index 000000000..44f0a6c76
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Vertragstyp.php
@@ -0,0 +1,78 @@
+load->model('accounting/vertragstyp_model', 'VertragstypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VertragstypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVertragstyp()
+ {
+ $vertragstyp_kurzbz = $this->get('vertragstyp_kurzbz');
+
+ if (isset($vertragstyp_kurzbz))
+ {
+ $result = $this->VertragstypModel->load($vertragstyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVertragstyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['vertragstyp_kurzbz']))
+ {
+ $result = $this->VertragstypModel->update($this->post()['vertragstyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->VertragstypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($vertragstyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/accounting/Zahlungstyp.php b/application/controllers/api/v1/accounting/Zahlungstyp.php
new file mode 100644
index 000000000..bcd529472
--- /dev/null
+++ b/application/controllers/api/v1/accounting/Zahlungstyp.php
@@ -0,0 +1,78 @@
+load->model('accounting/zahlungstyp_model', 'ZahlungstypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZahlungstypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZahlungstyp()
+ {
+ $zahlungstyp_kurzbz = $this->get('zahlungstyp_kurzbz');
+
+ if (isset($zahlungstyp_kurzbz))
+ {
+ $result = $this->ZahlungstypModel->load($zahlungstyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZahlungstyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zahlungstyp_kurzbz']))
+ {
+ $result = $this->ZahlungstypModel->update($this->post()['zahlungstyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZahlungstypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zahlungstyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Akadgrad.php b/application/controllers/api/v1/codex/Akadgrad.php
new file mode 100644
index 000000000..659a3292b
--- /dev/null
+++ b/application/controllers/api/v1/codex/Akadgrad.php
@@ -0,0 +1,78 @@
+load->model('codex/akadgrad_model', 'AkadgradModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AkadgradModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAkadgrad()
+ {
+ $akadgradID = $this->get('akadgrad_id');
+
+ if (isset($akadgradID))
+ {
+ $result = $this->AkadgradModel->load($akadgradID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAkadgrad()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['akadgrad_id']))
+ {
+ $result = $this->AkadgradModel->update($this->post()['akadgrad_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AkadgradModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($akadgrad = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Archiv.php b/application/controllers/api/v1/codex/Archiv.php
new file mode 100644
index 000000000..be4c5dd76
--- /dev/null
+++ b/application/controllers/api/v1/codex/Archiv.php
@@ -0,0 +1,78 @@
+load->model('codex/archiv_model', 'ArchivModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ArchivModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getArchiv()
+ {
+ $archivID = $this->get('archiv_id');
+
+ if (isset($archivID))
+ {
+ $result = $this->ArchivModel->load($archivID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postArchiv()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['archiv_id']))
+ {
+ $result = $this->ArchivModel->update($this->post()['archiv_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ArchivModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($archiv = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Aufmerksamdurch.php b/application/controllers/api/v1/codex/Aufmerksamdurch.php
new file mode 100644
index 000000000..4b13a77c5
--- /dev/null
+++ b/application/controllers/api/v1/codex/Aufmerksamdurch.php
@@ -0,0 +1,78 @@
+load->model('codex/aufmerksamdurch_model', 'AufmerksamdurchModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AufmerksamdurchModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAufmerksamdurch()
+ {
+ $aufmerksamdurch_kurzbz = $this->get('aufmerksamdurch_kurzbz');
+
+ if (isset($aufmerksamdurch_kurzbz))
+ {
+ $result = $this->AufmerksamdurchModel->load($aufmerksamdurch_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAufmerksamdurch()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['aufmerksamdurch_kurzbz']))
+ {
+ $result = $this->AufmerksamdurchModel->update($this->post()['aufmerksamdurch_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->AufmerksamdurchModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($aufmerksamdurch = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Ausbildung.php b/application/controllers/api/v1/codex/Ausbildung.php
new file mode 100644
index 000000000..187026071
--- /dev/null
+++ b/application/controllers/api/v1/codex/Ausbildung.php
@@ -0,0 +1,78 @@
+load->model('codex/ausbildung_model', 'AusbildungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AusbildungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAusbildung()
+ {
+ $ausbildungcode = $this->get('ausbildungcode');
+
+ if (isset($ausbildungcode))
+ {
+ $result = $this->AusbildungModel->load($ausbildungcode);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAusbildung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['ausbildungcode']))
+ {
+ $result = $this->AusbildungModel->update($this->post()['ausbildungcode'], $this->post());
+ }
+ else
+ {
+ $result = $this->AusbildungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($ausbildung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Berufstaetigkeit.php b/application/controllers/api/v1/codex/Berufstaetigkeit.php
new file mode 100644
index 000000000..238b63b74
--- /dev/null
+++ b/application/controllers/api/v1/codex/Berufstaetigkeit.php
@@ -0,0 +1,78 @@
+load->model('codex/berufstaetigkeit_model', 'BerufstaetigkeitModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BerufstaetigkeitModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBerufstaetigkeit()
+ {
+ $berufstaetigkeit_code = $this->get('berufstaetigkeit_code');
+
+ if (isset($berufstaetigkeit_code))
+ {
+ $result = $this->BerufstaetigkeitModel->load($berufstaetigkeit_code);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBerufstaetigkeit()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['berufstaetigkeit_code']))
+ {
+ $result = $this->BerufstaetigkeitModel->update($this->post()['berufstaetigkeit_code'], $this->post());
+ }
+ else
+ {
+ $result = $this->BerufstaetigkeitModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($berufstaetigkeit = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Beschaeftigungsausmass.php b/application/controllers/api/v1/codex/Beschaeftigungsausmass.php
new file mode 100644
index 000000000..ec5b75b7c
--- /dev/null
+++ b/application/controllers/api/v1/codex/Beschaeftigungsausmass.php
@@ -0,0 +1,78 @@
+load->model('codex/beschaeftigungsausmass_model', 'BeschaeftigungsausmassModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BeschaeftigungsausmassModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBeschaeftigungsausmass()
+ {
+ $beschausmasscode = $this->get('beschausmasscode');
+
+ if (isset($beschausmasscode))
+ {
+ $result = $this->BeschaeftigungsausmassModel->load($beschausmasscode);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBeschaeftigungsausmass()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['beschausmasscode']))
+ {
+ $result = $this->BeschaeftigungsausmassModel->update($this->post()['beschausmasscode'], $this->post());
+ }
+ else
+ {
+ $result = $this->BeschaeftigungsausmassModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($beschaeftigungsausmass = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Besqual.php b/application/controllers/api/v1/codex/Besqual.php
new file mode 100644
index 000000000..e48a4307f
--- /dev/null
+++ b/application/controllers/api/v1/codex/Besqual.php
@@ -0,0 +1,78 @@
+load->model('codex/besqual_model', 'BesqualModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BesqualModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBesqual()
+ {
+ $besqualcode = $this->get('besqualcode');
+
+ if (isset($besqualcode))
+ {
+ $result = $this->BesqualModel->load($besqualcode);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBesqual()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['besqualcode']))
+ {
+ $result = $this->BesqualModel->update($this->post()['besqualcode'], $this->post());
+ }
+ else
+ {
+ $result = $this->BesqualModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($besqual = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Bisfunktion.php b/application/controllers/api/v1/codex/Bisfunktion.php
new file mode 100644
index 000000000..ab75641d3
--- /dev/null
+++ b/application/controllers/api/v1/codex/Bisfunktion.php
@@ -0,0 +1,79 @@
+load->model('codex/bisfunktion_model', 'BisfunktionModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BisfunktionModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBisfunktion()
+ {
+ $studiengang_kz = $this->get('studiengang_kz');
+ $bisverwendung_id = $this->get('bisverwendung_id');
+
+ if (isset($studiengang_kz) && isset($bisverwendung_id))
+ {
+ $result = $this->BisfunktionModel->load(array($studiengang_kz, $bisverwendung_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBisfunktion()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studiengang_kz']) && isset($this->post()['bisverwendung_id']))
+ {
+ $result = $this->BisfunktionModel->update(array($this->post()['studiengang_kz'], $this->post()['bisverwendung_id']), $this->post());
+ }
+ else
+ {
+ $result = $this->BisfunktionModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bisfunktion = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Bisio.php b/application/controllers/api/v1/codex/Bisio.php
new file mode 100644
index 000000000..6e519e8cb
--- /dev/null
+++ b/application/controllers/api/v1/codex/Bisio.php
@@ -0,0 +1,78 @@
+load->model('codex/bisio_model', 'BisioModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BisioModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBisio()
+ {
+ $bisioID = $this->get('bisio_id');
+
+ if (isset($bisioID))
+ {
+ $result = $this->BisioModel->load($bisioID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBisio()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bisio_id']))
+ {
+ $result = $this->BisioModel->update($this->post()['bisio_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BisioModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bisio = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Bisorgform.php b/application/controllers/api/v1/codex/Bisorgform.php
new file mode 100644
index 000000000..503d50fae
--- /dev/null
+++ b/application/controllers/api/v1/codex/Bisorgform.php
@@ -0,0 +1,78 @@
+load->model('codex/bisorgform_model', 'BisorgformModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BisorgformModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBisorgform()
+ {
+ $bisorgform_kurzbz = $this->get('bisorgform_kurzbz');
+
+ if (isset($bisorgform_kurzbz))
+ {
+ $result = $this->BisorgformModel->load($bisorgform_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBisorgform()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bisorgform_kurzbz']))
+ {
+ $result = $this->BisorgformModel->update($this->post()['bisorgform_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->BisorgformModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bisorgform = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Bisverwendung.php b/application/controllers/api/v1/codex/Bisverwendung.php
new file mode 100644
index 000000000..a01a775b6
--- /dev/null
+++ b/application/controllers/api/v1/codex/Bisverwendung.php
@@ -0,0 +1,78 @@
+load->model('codex/bisverwendung_model', 'BisverwendungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BisverwendungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBisverwendung()
+ {
+ $bisverwendungID = $this->get('bisverwendung_id');
+
+ if (isset($bisverwendungID))
+ {
+ $result = $this->BisverwendungModel->load($bisverwendungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBisverwendung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bisverwendung_id']))
+ {
+ $result = $this->BisverwendungModel->update($this->post()['bisverwendung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BisverwendungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bisverwendung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Studiengang.php b/application/controllers/api/v1/codex/Bundesland.php
similarity index 62%
rename from application/controllers/api/v1/organisation/Studiengang.php
rename to application/controllers/api/v1/codex/Bundesland.php
index 0659140af..023871501 100644
--- a/application/controllers/api/v1/organisation/Studiengang.php
+++ b/application/controllers/api/v1/codex/Bundesland.php
@@ -11,9 +11,10 @@
* @filesource
*/
// ------------------------------------------------------------------------
-if(!defined('BASEPATH')) exit('No direct script access allowed');
-class Studiengang extends APIv1_Controller
+if (!defined('BASEPATH')) exit('No direct script access allowed');
+
+class Bundesland extends APIv1_Controller
{
/**
* Course API constructor.
@@ -22,14 +23,14 @@ class Studiengang extends APIv1_Controller
{
parent::__construct();
// Load model PersonModel
- $this->load->model('organisation/studiengang_model', 'StudiengangModel');
+ $this->load->model('codex/bundesland_model', 'BundeslandModel');
// Load set the uid of the model to let to check the permissions
- $this->StudiengangModel->setUID($this->_getUID());
+ $this->BundeslandModel->setUID($this->_getUID());
}
- public function getAllForBewerbung()
+ public function getAll()
{
- $result = $this->StudiengangModel->getAllForBewerbung();
+ $result = $this->BundeslandModel->loadWhole();
$this->response($result, REST_Controller::HTTP_OK);
}
diff --git a/application/controllers/api/v1/codex/Entwicklungsteam.php b/application/controllers/api/v1/codex/Entwicklungsteam.php
new file mode 100644
index 000000000..b0364143d
--- /dev/null
+++ b/application/controllers/api/v1/codex/Entwicklungsteam.php
@@ -0,0 +1,79 @@
+load->model('codex/entwicklungsteam_model', 'EntwicklungsteamModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->EntwicklungsteamModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getEntwicklungsteam()
+ {
+ $studiengang_kz = $this->get('studiengang_kz');
+ $mitarbeiter_uid = $this->get('mitarbeiter_uid');
+
+ if (isset($studiengang_kz) && isset($mitarbeiter_uid))
+ {
+ $result = $this->EntwicklungsteamModel->load(array($studiengang_kz, $mitarbeiter_uid));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postEntwicklungsteam()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studiengang_kz']) && isset($this->post()['mitarbeiter_uid']))
+ {
+ $result = $this->EntwicklungsteamModel->update(array($this->post()['entwicklungsteam_id'], $this->post()['mitarbeiter_uid']), $this->post());
+ }
+ else
+ {
+ $result = $this->EntwicklungsteamModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($entwicklungsteam = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Gemeinde.php b/application/controllers/api/v1/codex/Gemeinde.php
new file mode 100644
index 000000000..72a21be3c
--- /dev/null
+++ b/application/controllers/api/v1/codex/Gemeinde.php
@@ -0,0 +1,78 @@
+load->model('codex/gemeinde_model', 'GemeindeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->GemeindeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getGemeinde()
+ {
+ $gemeindeID = $this->get('gemeinde_id');
+
+ if (isset($gemeindeID))
+ {
+ $result = $this->GemeindeModel->load($gemeindeID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postGemeinde()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['gemeinde_id']))
+ {
+ $result = $this->GemeindeModel->update($this->post()['gemeinde_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->GemeindeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($gemeinde = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Hauptberuf.php b/application/controllers/api/v1/codex/Hauptberuf.php
new file mode 100644
index 000000000..5adce00c0
--- /dev/null
+++ b/application/controllers/api/v1/codex/Hauptberuf.php
@@ -0,0 +1,78 @@
+load->model('codex/hauptberuf_model', 'HauptberufModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->HauptberufModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getHauptberuf()
+ {
+ $hauptberufcode = $this->get('hauptberufcode');
+
+ if (isset($hauptberufcode))
+ {
+ $result = $this->HauptberufModel->load($hauptberufcode);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postHauptberuf()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['hauptberufcode']))
+ {
+ $result = $this->HauptberufModel->update($this->post()['hauptberufcode'], $this->post());
+ }
+ else
+ {
+ $result = $this->HauptberufModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($hauptberuf = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Lehrform.php b/application/controllers/api/v1/codex/Lehrform.php
new file mode 100644
index 000000000..99bec18b8
--- /dev/null
+++ b/application/controllers/api/v1/codex/Lehrform.php
@@ -0,0 +1,78 @@
+load->model('codex/lehrform_model', 'LehrformModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehrformModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehrform()
+ {
+ $lehrform_kurzbz = $this->get('lehrform_kurzbz');
+
+ if (isset($lehrform_kurzbz))
+ {
+ $result = $this->LehrformModel->load($lehrform_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehrform()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehrform_kurzbz']))
+ {
+ $result = $this->LehrformModel->update($this->post()['lehrform_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->LehrformModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehrform = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Lgartcode.php b/application/controllers/api/v1/codex/Lgartcode.php
new file mode 100644
index 000000000..2c3dccb05
--- /dev/null
+++ b/application/controllers/api/v1/codex/Lgartcode.php
@@ -0,0 +1,78 @@
+load->model('codex/lgartcode_model', 'LgartcodeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LgartcodeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLgartcode()
+ {
+ $lgartcode = $this->get('lgartcode');
+
+ if (isset($lgartcode))
+ {
+ $result = $this->LgartcodeModel->load($lgartcode);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLgartcode()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lgartcode']))
+ {
+ $result = $this->LgartcodeModel->update($this->post()['lgartcode'], $this->post());
+ }
+ else
+ {
+ $result = $this->LgartcodeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lgartcode = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Mobilitaetsprogramm.php b/application/controllers/api/v1/codex/Mobilitaetsprogramm.php
new file mode 100644
index 000000000..440ee1b96
--- /dev/null
+++ b/application/controllers/api/v1/codex/Mobilitaetsprogramm.php
@@ -0,0 +1,78 @@
+load->model('codex/mobilitaetsprogramm_model', 'MobilitaetsprogrammModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->MobilitaetsprogrammModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getMobilitaetsprogramm()
+ {
+ $mobilitaetsprogramm_code = $this->get('mobilitaetsprogramm_code');
+
+ if (isset($mobilitaetsprogramm_code))
+ {
+ $result = $this->MobilitaetsprogrammModel->load($mobilitaetsprogramm_code);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postMobilitaetsprogramm()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['mobilitaetsprogramm_code']))
+ {
+ $result = $this->MobilitaetsprogrammModel->update($this->post()['mobilitaetsprogramm_code'], $this->post());
+ }
+ else
+ {
+ $result = $this->MobilitaetsprogrammModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($mobilitaetsprogramm = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Nation.php b/application/controllers/api/v1/codex/Nation.php
index 517a95c6d..2597b696e 100644
--- a/application/controllers/api/v1/codex/Nation.php
+++ b/application/controllers/api/v1/codex/Nation.php
@@ -12,7 +12,7 @@
*/
// ------------------------------------------------------------------------
-if(!defined('BASEPATH')) exit('No direct script access allowed');
+if (!defined('BASEPATH')) exit('No direct script access allowed');
class Nation extends APIv1_Controller
{
@@ -30,7 +30,7 @@ class Nation extends APIv1_Controller
public function getAll()
{
- if(!$this->get('orderEnglish'))
+ if (!$this->get('orderEnglish'))
{
$result = $this->NationModel->addOrder('kurztext');
}
@@ -39,9 +39,9 @@ class Nation extends APIv1_Controller
$result = $this->NationModel->addOrder('engltext');
}
- if($result->error == EXIT_SUCCESS)
+ if ($result->error == EXIT_SUCCESS)
{
- if($this->get('ohnesperre'))
+ if ($this->get('ohnesperre'))
{
$result = $this->NationModel->loadWhere('sperre IS NULL');
}
diff --git a/application/controllers/api/v1/codex/Note.php b/application/controllers/api/v1/codex/Note.php
new file mode 100644
index 000000000..a1e3543dd
--- /dev/null
+++ b/application/controllers/api/v1/codex/Note.php
@@ -0,0 +1,78 @@
+load->model('codex/note_model', 'NoteModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->NoteModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getNote()
+ {
+ $note = $this->get('note');
+
+ if (isset($note))
+ {
+ $result = $this->NoteModel->load($note);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postNote()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['note']))
+ {
+ $result = $this->NoteModel->update($this->post()['note'], $this->post());
+ }
+ else
+ {
+ $result = $this->NoteModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($note = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Orgform.php b/application/controllers/api/v1/codex/Orgform.php
new file mode 100644
index 000000000..82736830e
--- /dev/null
+++ b/application/controllers/api/v1/codex/Orgform.php
@@ -0,0 +1,78 @@
+load->model('codex/orgform_model', 'OrgformModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->OrgformModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getOrgform()
+ {
+ $orgform_kurzbz = $this->get('orgform_kurzbz');
+
+ if (isset($orgform_kurzbz))
+ {
+ $result = $this->OrgformModel->load($orgform_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postOrgform()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['orgform_kurzbz']))
+ {
+ $result = $this->OrgformModel->update($this->post()['orgform_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->OrgformModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($orgform = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Verwendung.php b/application/controllers/api/v1/codex/Verwendung.php
new file mode 100644
index 000000000..16ed77dcd
--- /dev/null
+++ b/application/controllers/api/v1/codex/Verwendung.php
@@ -0,0 +1,78 @@
+load->model('codex/verwendung_model', 'VerwendungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VerwendungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVerwendung()
+ {
+ $verwendung_code = $this->get('verwendung_code');
+
+ if (isset($verwendung_code))
+ {
+ $result = $this->VerwendungModel->load($verwendung_code);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVerwendung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['verwendung_code']))
+ {
+ $result = $this->VerwendungModel->update($this->post()['verwendung_code'], $this->post());
+ }
+ else
+ {
+ $result = $this->VerwendungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($verwendung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Zgv.php b/application/controllers/api/v1/codex/Zgv.php
new file mode 100644
index 000000000..39a51581f
--- /dev/null
+++ b/application/controllers/api/v1/codex/Zgv.php
@@ -0,0 +1,78 @@
+load->model('codex/zgv_model', 'ZgvModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZgvModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZgv()
+ {
+ $zgv_code = $this->get('zgv_code');
+
+ if (isset($zgv_code))
+ {
+ $result = $this->ZgvModel->load($zgv_code);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZgv()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zgv_code']))
+ {
+ $result = $this->ZgvModel->update($this->post()['zgv_code'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZgvModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zgv = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Zgvdoktor.php b/application/controllers/api/v1/codex/Zgvdoktor.php
new file mode 100644
index 000000000..44d6cc87b
--- /dev/null
+++ b/application/controllers/api/v1/codex/Zgvdoktor.php
@@ -0,0 +1,78 @@
+load->model('codex/zgvdoktor_model', 'ZgvdoktorModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZgvdoktorModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZgvdoktor()
+ {
+ $zgvdoktor_code = $this->get('zgvdoktor_code');
+
+ if (isset($zgvdoktor_code))
+ {
+ $result = $this->ZgvdoktorModel->load($zgvdoktor_code);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZgvdoktor()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zgvdoktor_code']))
+ {
+ $result = $this->ZgvdoktorModel->update($this->post()['zgvdoktor_code'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZgvdoktorModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zgvdoktor = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Zgvgruppe.php b/application/controllers/api/v1/codex/Zgvgruppe.php
new file mode 100644
index 000000000..4050387d2
--- /dev/null
+++ b/application/controllers/api/v1/codex/Zgvgruppe.php
@@ -0,0 +1,78 @@
+load->model('codex/zgvgruppe_model', 'ZgvgruppeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZgvgruppeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZgvgruppe()
+ {
+ $gruppe_kurzbz = $this->get('gruppe_kurzbz');
+
+ if (isset($gruppe_kurzbz))
+ {
+ $result = $this->ZgvgruppeModel->load($gruppe_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZgvgruppe()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zgvgruppe_id']))
+ {
+ $result = $this->ZgvgruppeModel->update($this->post()['zgvgruppe_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZgvgruppeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zgvgruppe = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Zgvmaster.php b/application/controllers/api/v1/codex/Zgvmaster.php
new file mode 100644
index 000000000..14b23824b
--- /dev/null
+++ b/application/controllers/api/v1/codex/Zgvmaster.php
@@ -0,0 +1,78 @@
+load->model('codex/zgvmaster_model', 'ZgvmasterModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZgvmasterModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZgvmaster()
+ {
+ $zgvmas_code = $this->get('zgvmas_code');
+
+ if (isset($zgvmas_code))
+ {
+ $result = $this->ZgvmasterModel->load($zgvmas_code);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZgvmaster()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zgvmas_code']))
+ {
+ $result = $this->ZgvmasterModel->update($this->post()['zgvmas_code'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZgvmasterModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zgvmaster = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/codex/Zweck.php b/application/controllers/api/v1/codex/Zweck.php
new file mode 100644
index 000000000..c7cc60353
--- /dev/null
+++ b/application/controllers/api/v1/codex/Zweck.php
@@ -0,0 +1,78 @@
+load->model('codex/zweck_model', 'ZweckModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZweckModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZweck()
+ {
+ $zweck_code = $this->get('zweck_code');
+
+ if (isset($zweck_code))
+ {
+ $result = $this->ZweckModel->load($zweck_code);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZweck()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zweck_code']))
+ {
+ $result = $this->ZweckModel->update($this->post()['zweck_code'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZweckModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zweck = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Ampel.php b/application/controllers/api/v1/content/Ampel.php
new file mode 100644
index 000000000..bec9c84de
--- /dev/null
+++ b/application/controllers/api/v1/content/Ampel.php
@@ -0,0 +1,78 @@
+load->model('content/ampel_model', 'AmpelModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AmpelModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAmpel()
+ {
+ $ampelID = $this->get('ampel_id');
+
+ if (isset($ampelID))
+ {
+ $result = $this->AmpelModel->load($ampelID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAmpel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['ampel_id']))
+ {
+ $result = $this->AmpelModel->update($this->post()['ampel_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AmpelModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($ampel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Content.php b/application/controllers/api/v1/content/Content.php
new file mode 100644
index 000000000..b67914b70
--- /dev/null
+++ b/application/controllers/api/v1/content/Content.php
@@ -0,0 +1,78 @@
+load->model('content/content_model', 'ContentModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ContentModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getContent()
+ {
+ $contentID = $this->get('content_id');
+
+ if (isset($contentID))
+ {
+ $result = $this->ContentModel->load($contentID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postContent()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['content_id']))
+ {
+ $result = $this->ContentModel->update($this->post()['content_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ContentModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($content = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Contentchild.php b/application/controllers/api/v1/content/Contentchild.php
new file mode 100644
index 000000000..802f65d0a
--- /dev/null
+++ b/application/controllers/api/v1/content/Contentchild.php
@@ -0,0 +1,78 @@
+load->model('content/contentchild_model', 'ContentchildModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ContentchildModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getContentchild()
+ {
+ $contentchildID = $this->get('contentchild_id');
+
+ if (isset($contentchildID))
+ {
+ $result = $this->ContentchildModel->load($contentchildID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postContentchild()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['contentchild_id']))
+ {
+ $result = $this->ContentchildModel->update($this->post()['contentchild_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ContentchildModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($contentchild = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Contentgruppe.php b/application/controllers/api/v1/content/Contentgruppe.php
new file mode 100644
index 000000000..f9b78b74f
--- /dev/null
+++ b/application/controllers/api/v1/content/Contentgruppe.php
@@ -0,0 +1,79 @@
+load->model('content/contentgruppe_model', 'ContentgruppeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ContentgruppeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getContentgruppe()
+ {
+ $gruppe_kurzbz = $this->get('gruppe_kurzbz');
+ $content_id = $this->get('content_id');
+
+ if (isset($gruppe_kurzbz) && isset($content_id))
+ {
+ $result = $this->ContentgruppeModel->load(array($gruppe_kurzbz, $content_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postContentgruppe()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['gruppe_kurzbz']) && isset($this->post()['content_id']))
+ {
+ $result = $this->ContentgruppeModel->update(array($this->post()['gruppe_kurzbz'], $this->post()['content_id']), $this->post());
+ }
+ else
+ {
+ $result = $this->ContentgruppeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($contentgruppe = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Contentlog.php b/application/controllers/api/v1/content/Contentlog.php
new file mode 100644
index 000000000..9faf3ad85
--- /dev/null
+++ b/application/controllers/api/v1/content/Contentlog.php
@@ -0,0 +1,78 @@
+load->model('content/contentlog_model', 'ContentlogModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ContentlogModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getContentlog()
+ {
+ $contentlogID = $this->get('contentlog_id');
+
+ if (isset($contentlogID))
+ {
+ $result = $this->ContentlogModel->load($contentlogID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postContentlog()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['contentlog_id']))
+ {
+ $result = $this->ContentlogModel->update($this->post()['contentlog_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ContentlogModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($contentlog = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Contentsprache.php b/application/controllers/api/v1/content/Contentsprache.php
new file mode 100644
index 000000000..aa02c5807
--- /dev/null
+++ b/application/controllers/api/v1/content/Contentsprache.php
@@ -0,0 +1,78 @@
+load->model('content/contentsprache_model', 'ContentspracheModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ContentspracheModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getContentsprache()
+ {
+ $contentspracheID = $this->get('contentsprache_id');
+
+ if (isset($contentspracheID))
+ {
+ $result = $this->ContentspracheModel->load($contentspracheID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postContentsprache()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['contentsprache_id']))
+ {
+ $result = $this->ContentspracheModel->update($this->post()['contentsprache_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ContentspracheModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($contentsprache = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Dms.php b/application/controllers/api/v1/content/Dms.php
new file mode 100644
index 000000000..e1891a6b9
--- /dev/null
+++ b/application/controllers/api/v1/content/Dms.php
@@ -0,0 +1,98 @@
+load->model('content/dms_model', 'DmsModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->DmsModel->setUID($this->_getUID());
+ }
+
+ /**
+ *
+ */
+ public function getDms()
+ {
+ $dms_id = $this->get('dms_id');
+ $version = $this->get('version');
+
+ if (isset($dms_id))
+ {
+ $result = $this->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
+ if ($result->error == EXIT_SUCCESS)
+ {
+ $result = $this->DmsModel->addOrder('version', 'DESC');
+ if ($result->error == EXIT_SUCCESS)
+ {
+ $result = $this->DmsModel->addLimit(1);
+ if ($result->error == EXIT_SUCCESS)
+ {
+ if (!isset($version))
+ {
+ $result = $this->DmsModel->loadWhere(array('dms_id' => $dms_id));
+ }
+ else
+ {
+ $result = $this->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
+ }
+ }
+ }
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ *
+ */
+ public function postDms()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['contentsprache_id']))
+ {
+ $result = $this->ContentspracheModel->update($this->post()['contentsprache_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ContentspracheModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($dms = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Infoscreen.php b/application/controllers/api/v1/content/Infoscreen.php
new file mode 100644
index 000000000..6e859ca5a
--- /dev/null
+++ b/application/controllers/api/v1/content/Infoscreen.php
@@ -0,0 +1,78 @@
+load->model('content/infoscreen_model', 'InfoscreenModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->InfoscreenModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getInfoscreen()
+ {
+ $infoscreenID = $this->get('infoscreen_id');
+
+ if (isset($infoscreenID))
+ {
+ $result = $this->InfoscreenModel->load($infoscreenID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postInfoscreen()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['infoscreen_id']))
+ {
+ $result = $this->InfoscreenModel->update($this->post()['infoscreen_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->InfoscreenModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($infoscreen = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/News.php b/application/controllers/api/v1/content/News.php
new file mode 100644
index 000000000..346faca11
--- /dev/null
+++ b/application/controllers/api/v1/content/News.php
@@ -0,0 +1,78 @@
+load->model('content/news_model', 'NewsModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->NewsModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getNews()
+ {
+ $newsID = $this->get('news_id');
+
+ if (isset($newsID))
+ {
+ $result = $this->NewsModel->load($newsID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postNews()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['news_id']))
+ {
+ $result = $this->NewsModel->update($this->post()['news_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->NewsModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($news = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Template.php b/application/controllers/api/v1/content/Template.php
new file mode 100644
index 000000000..5f67af4d0
--- /dev/null
+++ b/application/controllers/api/v1/content/Template.php
@@ -0,0 +1,78 @@
+load->model('content/template_model', 'TemplateModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->TemplateModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getTemplate()
+ {
+ $template_kurzbz = $this->get('template_kurzbz');
+
+ if (isset($template_kurzbz))
+ {
+ $result = $this->TemplateModel->load($template_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postTemplate()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['template_kurzbz']))
+ {
+ $result = $this->TemplateModel->update($this->post()['template_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->TemplateModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($template = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Veranstaltung.php b/application/controllers/api/v1/content/Veranstaltung.php
new file mode 100644
index 000000000..ea5ccc19f
--- /dev/null
+++ b/application/controllers/api/v1/content/Veranstaltung.php
@@ -0,0 +1,78 @@
+load->model('content/veranstaltung_model', 'VeranstaltungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VeranstaltungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVeranstaltung()
+ {
+ $veranstaltungID = $this->get('veranstaltung_id');
+
+ if (isset($veranstaltungID))
+ {
+ $result = $this->VeranstaltungModel->load($veranstaltungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVeranstaltung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['veranstaltung_id']))
+ {
+ $result = $this->VeranstaltungModel->update($this->post()['veranstaltung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->VeranstaltungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($veranstaltung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/content/Veranstaltungskategorie.php b/application/controllers/api/v1/content/Veranstaltungskategorie.php
new file mode 100644
index 000000000..ffc9a32bd
--- /dev/null
+++ b/application/controllers/api/v1/content/Veranstaltungskategorie.php
@@ -0,0 +1,78 @@
+load->model('content/veranstaltungskategorie_model', 'VeranstaltungskategorieModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VeranstaltungskategorieModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVeranstaltungskategorie()
+ {
+ $veranstaltungskategorie_kurzbz = $this->get('veranstaltungskategorie_kurzbz');
+
+ if (isset($veranstaltungskategorie_kurzbz))
+ {
+ $result = $this->VeranstaltungskategorieModel->load($veranstaltungskategorie_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVeranstaltungskategorie()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['veranstaltungskategorie_kurzbz']))
+ {
+ $result = $this->VeranstaltungskategorieModel->update($this->post()['veranstaltungskategorie_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->VeranstaltungskategorieModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($veranstaltungskategorie = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Akte.php b/application/controllers/api/v1/crm/Akte.php
new file mode 100644
index 000000000..cd52b97f5
--- /dev/null
+++ b/application/controllers/api/v1/crm/Akte.php
@@ -0,0 +1,78 @@
+load->model('crm/akte_model', 'AkteModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AkteModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAkte()
+ {
+ $akteID = $this->get('akte_id');
+
+ if (isset($akteID))
+ {
+ $result = $this->AkteModel->load($akteID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAkte()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['akte_id']))
+ {
+ $result = $this->AkteModel->update($this->post()['akte_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AkteModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($akte = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Aufnahmeschluessel.php b/application/controllers/api/v1/crm/Aufnahmeschluessel.php
new file mode 100644
index 000000000..935a89fb6
--- /dev/null
+++ b/application/controllers/api/v1/crm/Aufnahmeschluessel.php
@@ -0,0 +1,78 @@
+load->model('crm/aufnahmeschluessel_model', 'AufnahmeschluesselModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AufnahmeschluesselModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAufnahmeschluessel()
+ {
+ $aufnahmeschluessel = $this->get('aufnahmeschluessel');
+
+ if (isset($aufnahmeschluessel))
+ {
+ $result = $this->AufnahmeschluesselModel->load($aufnahmeschluessel);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAufnahmeschluessel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['aufnahmeschluessel']))
+ {
+ $result = $this->AufnahmeschluesselModel->update($this->post()['aufnahmeschluessel'], $this->post());
+ }
+ else
+ {
+ $result = $this->AufnahmeschluesselModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($aufnahmeschluessel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Aufnahmetermin.php b/application/controllers/api/v1/crm/Aufnahmetermin.php
new file mode 100644
index 000000000..1d96aface
--- /dev/null
+++ b/application/controllers/api/v1/crm/Aufnahmetermin.php
@@ -0,0 +1,78 @@
+load->model('crm/aufnahmetermin_model', 'AufnahmeterminModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AufnahmeterminModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAufnahmetermin()
+ {
+ $aufnahmeterminID = $this->get('aufnahmetermin_id');
+
+ if (isset($aufnahmeterminID))
+ {
+ $result = $this->AufnahmeterminModel->load($aufnahmeterminID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAufnahmetermin()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['aufnahmetermin_id']))
+ {
+ $result = $this->AufnahmeterminModel->update($this->post()['aufnahmetermin_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AufnahmeterminModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($aufnahmetermin = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Aufnahmetermintyp.php b/application/controllers/api/v1/crm/Aufnahmetermintyp.php
new file mode 100644
index 000000000..f7ffd419d
--- /dev/null
+++ b/application/controllers/api/v1/crm/Aufnahmetermintyp.php
@@ -0,0 +1,78 @@
+load->model('crm/aufnahmetermintyp_model', 'AufnahmetermintypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AufnahmetermintypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAufnahmetermintyp()
+ {
+ $aufnahmetermintyp_kurzbz = $this->get('aufnahmetermintyp_kurzbz');
+
+ if (isset($aufnahmetermintyp_kurzbz))
+ {
+ $result = $this->AufnahmetermintypModel->load($aufnahmetermintyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAufnahmetermintyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['aufnahmetermintyp_kurzbz']))
+ {
+ $result = $this->AufnahmetermintypModel->update($this->post()['aufnahmetermintyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->AufnahmetermintypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($aufnahmetermintyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Bewerbungstermine.php b/application/controllers/api/v1/crm/Bewerbungstermine.php
new file mode 100644
index 000000000..28c07dc98
--- /dev/null
+++ b/application/controllers/api/v1/crm/Bewerbungstermine.php
@@ -0,0 +1,78 @@
+load->model('crm/bewerbungstermine_model', 'BewerbungstermineModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BewerbungstermineModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBewerbungstermine()
+ {
+ $bewerbungstermineID = $this->get('bewerbungstermine_id');
+
+ if (isset($bewerbungstermineID))
+ {
+ $result = $this->BewerbungstermineModel->load($bewerbungstermineID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBewerbungstermine()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bewerbungstermine_id']))
+ {
+ $result = $this->BewerbungstermineModel->update($this->post()['bewerbungstermine_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BewerbungstermineModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bewerbungstermine = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Buchungstyp.php b/application/controllers/api/v1/crm/Buchungstyp.php
new file mode 100644
index 000000000..73be5f666
--- /dev/null
+++ b/application/controllers/api/v1/crm/Buchungstyp.php
@@ -0,0 +1,78 @@
+load->model('crm/buchungstyp_model', 'BuchungstypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BuchungstypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBuchungstyp()
+ {
+ $buchungstyp_kurzbz = $this->get('buchungstyp_kurzbz');
+
+ if (isset($buchungstyp_kurzbz))
+ {
+ $result = $this->BuchungstypModel->load($buchungstyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBuchungstyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['buchungstyp_kurzbz']))
+ {
+ $result = $this->BuchungstypModel->update($this->post()['buchungstyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->BuchungstypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($buchungstyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Dokument.php b/application/controllers/api/v1/crm/Dokument.php
new file mode 100644
index 000000000..fd8c80b37
--- /dev/null
+++ b/application/controllers/api/v1/crm/Dokument.php
@@ -0,0 +1,78 @@
+load->model('crm/dokument_model', 'DokumentModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->DokumentModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getDokument()
+ {
+ $dokument_kurzbz = $this->get('dokument_kurzbz');
+
+ if (isset($dokument_kurzbz))
+ {
+ $result = $this->DokumentModel->load($dokument_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postDokument()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['dokument_kurzbz']))
+ {
+ $result = $this->DokumentModel->update($this->post()['dokument_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->DokumentModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($dokument = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Dokumentprestudent.php b/application/controllers/api/v1/crm/Dokumentprestudent.php
new file mode 100644
index 000000000..7a9fe6c2c
--- /dev/null
+++ b/application/controllers/api/v1/crm/Dokumentprestudent.php
@@ -0,0 +1,79 @@
+load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->DokumentprestudentModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getDokumentprestudent()
+ {
+ $prestudent_id = $this->get('prestudent_id');
+ $dokument_kurzbz = $this->get('dokument_kurzbz');
+
+ if (isset($prestudent_id) && isset($dokument_kurzbz))
+ {
+ $result = $this->DokumentprestudentModel->load(array($prestudent_id, $dokument_kurzbz));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postDokumentprestudent()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['prestudent_id']) && isset($this->post()['dokument_kurzbz']))
+ {
+ $result = $this->DokumentprestudentModel->update(array($this->post()['prestudent_id'], $this->post()['dokument_kurzbz']), $this->post());
+ }
+ else
+ {
+ $result = $this->DokumentprestudentModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($dokumentprestudent = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Dokumentstudiengang.php b/application/controllers/api/v1/crm/Dokumentstudiengang.php
new file mode 100644
index 000000000..22fee1803
--- /dev/null
+++ b/application/controllers/api/v1/crm/Dokumentstudiengang.php
@@ -0,0 +1,79 @@
+load->model('crm/dokumentstudiengang_model', 'DokumentstudiengangModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->DokumentstudiengangModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getDokumentstudiengang()
+ {
+ $studiengang_kz = $this->get('studiengang_kz');
+ $dokument_kurzbz = $this->get('dokument_kurzbz');
+
+ if (isset($studiengang_kz) && isset($dokument_kurzbz))
+ {
+ $result = $this->DokumentstudiengangModel->load(array($studiengang_kz, $dokument_kurzbz));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postDokumentstudiengang()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studiengang_kz']) && isset($this->post()['dokument_kurzbz']))
+ {
+ $result = $this->DokumentstudiengangModel->update(array($this->post()['studiengang_kz'], $this->post()['dokument_kurzbz']), $this->post());
+ }
+ else
+ {
+ $result = $this->DokumentstudiengangModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($dokumentstudiengang = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Konto.php b/application/controllers/api/v1/crm/Konto.php
new file mode 100644
index 000000000..d63bee9b4
--- /dev/null
+++ b/application/controllers/api/v1/crm/Konto.php
@@ -0,0 +1,78 @@
+load->model('crm/konto_model', 'KontoModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->KontoModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getKonto()
+ {
+ $buchungsnr = $this->get('buchungsnr');
+
+ if (isset($buchungsnr))
+ {
+ $result = $this->KontoModel->load($buchungsnr);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postKonto()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['buchungsnr']))
+ {
+ $result = $this->KontoModel->update($this->post()['buchungsnr'], $this->post());
+ }
+ else
+ {
+ $result = $this->KontoModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($konto = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Preincoming.php b/application/controllers/api/v1/crm/Preincoming.php
new file mode 100644
index 000000000..f7df3c5f5
--- /dev/null
+++ b/application/controllers/api/v1/crm/Preincoming.php
@@ -0,0 +1,78 @@
+load->model('crm/preincoming_model', 'PreincomingModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PreincomingModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPreincoming()
+ {
+ $preincomingID = $this->get('preincoming_id');
+
+ if (isset($preincomingID))
+ {
+ $result = $this->PreincomingModel->load($preincomingID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPreincoming()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['preincoming_id']))
+ {
+ $result = $this->PreincomingModel->update($this->post()['preincoming_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PreincomingModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($preincoming = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Preinteressent.php b/application/controllers/api/v1/crm/Preinteressent.php
new file mode 100644
index 000000000..f6e781e60
--- /dev/null
+++ b/application/controllers/api/v1/crm/Preinteressent.php
@@ -0,0 +1,109 @@
+load->model('crm/preinteressent_model', 'PreinteressentModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PreinteressentModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPreinteressent()
+ {
+ $preinteressent_id = $this->get('preinteressent_id');
+
+ if (isset($preinteressent_id))
+ {
+ $result = $this->PreinteressentModel->load($preinteressent_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function getPreinteressentByPersonID()
+ {
+ $person_id = $this->get('person_id');
+
+ if (isset($person_id))
+ {
+ $result = $this->PreinteressentModel->load(array('person_id' => $person_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPreinteressent()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['preinteressent_id']))
+ {
+ $result = $this->PreinteressentModel->update($this->post()['preinteressent_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PreinteressentModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($preinteressent)
+ {
+ if ($preinteressent['person_id'] == '')
+ {
+ //$this->errormsg = 'Person_id muss angegeben werden';
+ return false;
+ }
+
+ if ($preinteressent['aufmerksamdurch_kurzbz'] == '')
+ {
+ //$this->errormsg = 'Aufmerksamdurch muss angegeben werden';
+ return false;
+ }
+
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Preinteressentstudiengang.php b/application/controllers/api/v1/crm/Preinteressentstudiengang.php
new file mode 100644
index 000000000..dc82971ba
--- /dev/null
+++ b/application/controllers/api/v1/crm/Preinteressentstudiengang.php
@@ -0,0 +1,79 @@
+load->model('crm/preinteressentstudiengang_model', 'PreinteressentstudiengangModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PreinteressentstudiengangModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPreinteressentstudiengang()
+ {
+ $preinteressent_id = $this->get('preinteressent_id');
+ $studiengang_kz = $this->get('studiengang_kz');
+
+ if (isset($preinteressent_id) && isset($studiengang_kz))
+ {
+ $result = $this->PreinteressentstudiengangModel->load(array($preinteressent_id, $studiengang_kz));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPreinteressentstudiengang()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['preinteressent_id']) && isset($this->post()['studiengang_kz']))
+ {
+ $result = $this->PreinteressentstudiengangModel->update(array($this->post()['preinteressent_id'], $this->post()['studiengang_kz']), $this->post());
+ }
+ else
+ {
+ $result = $this->PreinteressentstudiengangModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($preinteressentstudiengang = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Preoutgoing.php b/application/controllers/api/v1/crm/Preoutgoing.php
new file mode 100644
index 000000000..885b74c8d
--- /dev/null
+++ b/application/controllers/api/v1/crm/Preoutgoing.php
@@ -0,0 +1,78 @@
+load->model('crm/preoutgoing_model', 'PreoutgoingModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PreoutgoingModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPreoutgoing()
+ {
+ $preoutgoingID = $this->get('preoutgoing_id');
+
+ if (isset($preoutgoingID))
+ {
+ $result = $this->PreoutgoingModel->load($preoutgoingID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPreoutgoing()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['preoutgoing_id']))
+ {
+ $result = $this->PreoutgoingModel->update($this->post()['preoutgoing_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PreoutgoingModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($preoutgoing = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Prestudent.php b/application/controllers/api/v1/crm/Prestudent.php
new file mode 100644
index 000000000..d334cc709
--- /dev/null
+++ b/application/controllers/api/v1/crm/Prestudent.php
@@ -0,0 +1,97 @@
+load->model('crm/prestudent_model', 'PrestudentModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PrestudentModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPrestudent()
+ {
+ $prestudentID = $this->get('prestudent_id');
+
+ if (isset($prestudentID))
+ {
+ $result = $this->PrestudentModel->load($prestudentID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function getPrestudentByPersonID()
+ {
+ $person_id = $this->get('person_id');
+
+ if (isset($person_id))
+ {
+ $result = $this->PrestudentModel->load(array('person_id' => $person_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPrestudent()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['prestudent_id']))
+ {
+ $result = $this->PrestudentModel->update($this->post()['prestudent_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PrestudentModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($prestudent = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php
new file mode 100644
index 000000000..f1bfda16a
--- /dev/null
+++ b/application/controllers/api/v1/crm/Prestudentstatus.php
@@ -0,0 +1,92 @@
+load->model('crm/prestudentstatus_model', 'PrestudentstatusModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PrestudentstatusModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPrestudentstatus()
+ {
+ $ausbildungssemester = $this->get('ausbildungssemester');
+ $studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
+ $status_kurzbz = $this->get('status_kurzbz');
+ $prestudent_id = $this->get('prestudent_id');
+
+ if (isset($ausbildungssemester) && isset($studiensemester_kurzbz) && isset($status_kurzbz) && isset($prestudent_id))
+ {
+ $result = $this->PrestudentstatusModel->load(array($ausbildungssemester, $studiensemester_kurzbz, $status_kurzbz, $prestudent_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPrestudentstatus()
+ {
+ $prestudentstatus = $this->_parseData($this->post());
+
+ $this->response($prestudentstatus);
+
+ if ($this->_validate($prestudentstatus))
+ {
+ if (isset($prestudentstatus['ausbildungssemester']) && isset($prestudentstatus['studiensemester_kurzbz']) &&
+ isset($prestudentstatus['status_kurzbz']) && isset($prestudentstatus['prestudent_id']))
+ {
+ $pksArray = array($prestudentstatus['ausbildungssemester'],
+ $prestudentstatus['studiensemester_kurzbz'],
+ $prestudentstatus['status_kurzbz'],
+ $prestudentstatus['prestudent_id']
+ );
+
+ $result = $this->PrestudentstatusModel->update($pksArray, $prestudentstatus);
+ }
+ else
+ {
+ $result = $this->PrestudentstatusModel->insert($prestudentstatus);
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($prestudentstatus = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Reihungstest.php b/application/controllers/api/v1/crm/Reihungstest.php
new file mode 100644
index 000000000..60c521256
--- /dev/null
+++ b/application/controllers/api/v1/crm/Reihungstest.php
@@ -0,0 +1,78 @@
+load->model('crm/reihungstest_model', 'ReihungstestModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ReihungstestModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getReihungstest()
+ {
+ $reihungstestID = $this->get('reihungstest_id');
+
+ if (isset($reihungstestID))
+ {
+ $result = $this->ReihungstestModel->load($reihungstestID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postReihungstest()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['reihungstest_id']))
+ {
+ $result = $this->ReihungstestModel->update($this->post()['reihungstest_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ReihungstestModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($reihungstest = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Status.php b/application/controllers/api/v1/crm/Status.php
new file mode 100644
index 000000000..b7dda0cce
--- /dev/null
+++ b/application/controllers/api/v1/crm/Status.php
@@ -0,0 +1,78 @@
+load->model('crm/status_model', 'StatusModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StatusModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStatus()
+ {
+ $status_kurzbz = $this->get('status_kurzbz');
+
+ if (isset($status_kurzbz))
+ {
+ $result = $this->StatusModel->load($status_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStatus()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['status_kurzbz']))
+ {
+ $result = $this->StatusModel->update($this->post()['status_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->StatusModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($status = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/crm/Student.php b/application/controllers/api/v1/crm/Student.php
new file mode 100644
index 000000000..d0bd7c5a1
--- /dev/null
+++ b/application/controllers/api/v1/crm/Student.php
@@ -0,0 +1,78 @@
+load->model('crm/student_model', 'StudentModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudentModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudent()
+ {
+ $studentID = $this->get('student_id');
+
+ if (isset($studentID))
+ {
+ $result = $this->StudentModel->load($studentID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudent()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['student_id']))
+ {
+ $result = $this->StudentModel->update($this->post()['student_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->StudentModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($student = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Abgabe.php b/application/controllers/api/v1/education/Abgabe.php
new file mode 100644
index 000000000..a7604a264
--- /dev/null
+++ b/application/controllers/api/v1/education/Abgabe.php
@@ -0,0 +1,78 @@
+load->model('education/abgabe', 'AbgabeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AbgabeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAbgabe()
+ {
+ $abgabe_id = $this->get('abgabe_id');
+
+ if (isset($abgabe_id))
+ {
+ $result = $this->AbgabeModel->load($abgabe_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAbgabe()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['abgabe_id']))
+ {
+ $result = $this->AbgabeModel->update($this->post()['abgabe_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AbgabeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($abgabe = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Abschlussbeurteilung.php b/application/controllers/api/v1/education/Abschlussbeurteilung.php
new file mode 100644
index 000000000..6de5e6e46
--- /dev/null
+++ b/application/controllers/api/v1/education/Abschlussbeurteilung.php
@@ -0,0 +1,78 @@
+load->model('education/abschlussbeurteilung', 'AbschlussbeurteilungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AbschlussbeurteilungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAbschlussbeurteilung()
+ {
+ $abschlussbeurteilung_kurzbz = $this->get('abschlussbeurteilung_kurzbz');
+
+ if (isset($abschlussbeurteilung_kurzbz))
+ {
+ $result = $this->AbschlussbeurteilungModel->load($abschlussbeurteilung_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAbschlussbeurteilung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['$abschlussbeurteilung_kurzbz']))
+ {
+ $result = $this->AbschlussbeurteilungModel->update($this->post()['$abschlussbeurteilung_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->AbschlussbeurteilungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($abschlussbeurteilung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Abschlusspruefung.php b/application/controllers/api/v1/education/Abschlusspruefung.php
new file mode 100644
index 000000000..6c1f03caa
--- /dev/null
+++ b/application/controllers/api/v1/education/Abschlusspruefung.php
@@ -0,0 +1,78 @@
+load->model('education/abschlusspruefung', 'AbschlusspruefungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AbschlusspruefungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAbschlusspruefung()
+ {
+ $abschlusspruefung_id = $this->get('abschlusspruefung_id');
+
+ if (isset($abschlusspruefung_id))
+ {
+ $result = $this->AbschlusspruefungModel->load($abschlusspruefung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAbschlusspruefung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['abschlusspruefung_id']))
+ {
+ $result = $this->AbschlusspruefungModel->update($this->post()['abschlusspruefung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AbschlusspruefungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($abschlusspruefung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Anrechnung.php b/application/controllers/api/v1/education/Anrechnung.php
new file mode 100644
index 000000000..4d73de092
--- /dev/null
+++ b/application/controllers/api/v1/education/Anrechnung.php
@@ -0,0 +1,78 @@
+load->model('education/anrechnung', 'AnrechnungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AnrechnungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAnrechnung()
+ {
+ $anrechnung_id = $this->get('anrechnung_id');
+
+ if (isset($anrechnung_id))
+ {
+ $result = $this->AnrechnungModel->load($anrechnung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAnrechnung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['anrechnung_id']))
+ {
+ $result = $this->AnrechnungModel->update($this->post()['anrechnung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AnrechnungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($anrechnung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Anwesenheit.php b/application/controllers/api/v1/education/Anwesenheit.php
new file mode 100644
index 000000000..ff1be2316
--- /dev/null
+++ b/application/controllers/api/v1/education/Anwesenheit.php
@@ -0,0 +1,78 @@
+load->model('education/anwesenheit', 'AnwesenheitModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AnwesenheitModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAnwesenheit()
+ {
+ $anwesenheit_id = $this->get('anwesenheit_id');
+
+ if (isset($anwesenheit_id))
+ {
+ $result = $this->AnwesenheitModel->load($anwesenheit_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAnwesenheit()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['anwesenheit_id']))
+ {
+ $result = $this->AnwesenheitModel->update($this->post()['anwesenheit_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AnwesenheitModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($anwesenheit = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Beispiel.php b/application/controllers/api/v1/education/Beispiel.php
new file mode 100644
index 000000000..a1fa0df43
--- /dev/null
+++ b/application/controllers/api/v1/education/Beispiel.php
@@ -0,0 +1,78 @@
+load->model('education/beispiel', 'BeispielModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BeispielModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBeispiel()
+ {
+ $beispiel_id = $this->get('beispiel_id');
+
+ if (isset($beispiel_id))
+ {
+ $result = $this->BeispielModel->load($beispiel_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBeispiel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['beispiel_id']))
+ {
+ $result = $this->BeispielModel->update($this->post()['beispiel_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BeispielModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($beispiel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Betreuerart.php b/application/controllers/api/v1/education/Betreuerart.php
new file mode 100644
index 000000000..9ed23491d
--- /dev/null
+++ b/application/controllers/api/v1/education/Betreuerart.php
@@ -0,0 +1,78 @@
+load->model('education/betreuerart', 'BetreuerartModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BetreuerartModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBetreuerart()
+ {
+ $betreuerart_id = $this->get('betreuerart_kurzbz');
+
+ if (isset($betreuerart_id))
+ {
+ $result = $this->BetreuerartModel->load($betreuerart_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBetreuerart()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['betreuerart_kurzbz']))
+ {
+ $result = $this->BetreuerartModel->update($this->post()['betreuerart_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->BetreuerartModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($betreuerart = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Feedback.php b/application/controllers/api/v1/education/Feedback.php
new file mode 100644
index 000000000..3d62d7618
--- /dev/null
+++ b/application/controllers/api/v1/education/Feedback.php
@@ -0,0 +1,78 @@
+load->model('education/feedback', 'FeedbackModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FeedbackModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFeedback()
+ {
+ $feedback_id = $this->get('feedback_id');
+
+ if (isset($feedback_id))
+ {
+ $result = $this->FeedbackModel->load($feedback_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFeedback()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['feedback_id']))
+ {
+ $result = $this->FeedbackModel->update($this->post()['feedback_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->FeedbackModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($feedback = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/LeNotenschluessel.php b/application/controllers/api/v1/education/LeNotenschluessel.php
new file mode 100644
index 000000000..8d340ccc2
--- /dev/null
+++ b/application/controllers/api/v1/education/LeNotenschluessel.php
@@ -0,0 +1,79 @@
+load->model('education/lenotenschluessel', 'LeNotenschluesselModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LeNotenschluesselModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLeNotenschluessel()
+ {
+ $note = $this->get('note');
+ $lehreinheit_id = $this->get('lehreinheit_id');
+
+ if (isset($note) && isset($lehreinheit_id))
+ {
+ $result = $this->LeNotenschluesselModel->load(array($note, $lehreinheit_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLeNotenschluessel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['note']) && isset($this->post()['lehreinheit_id']))
+ {
+ $result = $this->LeNotenschluesselModel->update(array($this->post()['note'], $this->post()['lehreinheit_id']), $this->post());
+ }
+ else
+ {
+ $result = $this->LeNotenschluesselModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lenotenschluessel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/LePruefung.php b/application/controllers/api/v1/education/LePruefung.php
new file mode 100644
index 000000000..de7641a4c
--- /dev/null
+++ b/application/controllers/api/v1/education/LePruefung.php
@@ -0,0 +1,78 @@
+load->model('education/lepruefung', 'LePruefungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LePruefungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLePruefung()
+ {
+ $lepruefung_id = $this->get('lepruefung_id');
+
+ if (isset($lepruefung_id))
+ {
+ $result = $this->LePruefungModel->load($lepruefung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLePruefung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lepruefung_id']))
+ {
+ $result = $this->LePruefungModel->update($this->post()['lepruefung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->LePruefungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lepruefung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Legesamtnote.php b/application/controllers/api/v1/education/Legesamtnote.php
new file mode 100644
index 000000000..6f100b43a
--- /dev/null
+++ b/application/controllers/api/v1/education/Legesamtnote.php
@@ -0,0 +1,79 @@
+load->model('education/legesamtnote', 'LegesamtnoteModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LegesamtnoteModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLegesamtnote()
+ {
+ $lehreinheit_id = $this->get('lehreinheit_id');
+ $student_uid = $this->get('student_uid');
+
+ if (isset($lehreinheit_id) && isset($student_uid))
+ {
+ $result = $this->LegesamtnoteModel->load(array($lehreinheit_id, $student_uid));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLegesamtnote()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehreinheit_id']) && isset($this->post()['student_uid']))
+ {
+ $result = $this->LegesamtnoteModel->update(array($this->post()['lehreinheit_id'], $this->post()['student_uid']), $this->post());
+ }
+ else
+ {
+ $result = $this->LegesamtnoteModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($legesamtnote = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lehreinheit.php b/application/controllers/api/v1/education/Lehreinheit.php
new file mode 100644
index 000000000..30f0adc0f
--- /dev/null
+++ b/application/controllers/api/v1/education/Lehreinheit.php
@@ -0,0 +1,78 @@
+load->model('education/lehreinheit', 'LehreinheitModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehreinheitModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehreinheit()
+ {
+ $lehreinheit_id = $this->get('lehreinheit_id');
+
+ if (isset($lehreinheit_id))
+ {
+ $result = $this->LehreinheitModel->load($lehreinheit_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehreinheit()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehreinheit_id']))
+ {
+ $result = $this->LehreinheitModel->update($this->post()['lehreinheit_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->LehreinheitModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehreinheit = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lehreinheitgruppe.php b/application/controllers/api/v1/education/Lehreinheitgruppe.php
new file mode 100644
index 000000000..2a25f73f6
--- /dev/null
+++ b/application/controllers/api/v1/education/Lehreinheitgruppe.php
@@ -0,0 +1,78 @@
+load->model('education/lehreinheitgruppe', 'LehreinheitgruppeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehreinheitgruppeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehreinheitgruppe()
+ {
+ $lehreinheitgruppe_id = $this->get('lehreinheitgruppe_id');
+
+ if (isset($lehreinheitgruppe_id))
+ {
+ $result = $this->LehreinheitgruppeModel->load($lehreinheitgruppe_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehreinheitgruppe()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehreinheitgruppe_id']))
+ {
+ $result = $this->LehreinheitgruppeModel->update($this->post()['lehreinheitgruppe_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->LehreinheitgruppeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehreinheitgruppe = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php
new file mode 100644
index 000000000..fd20bb131
--- /dev/null
+++ b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php
@@ -0,0 +1,79 @@
+load->model('education/lehreinheitmitarbeiter', 'LehreinheitmitarbeiterModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehreinheitmitarbeiterModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehreinheitmitarbeiter()
+ {
+ $mitarbeiter_uid = $this->get('mitarbeiter_uid');
+ $lehreinheit_id = $this->get('lehreinheit_id');
+
+ if (isset($mitarbeiter_uid) && isset($lehreinheit_id))
+ {
+ $result = $this->LehreinheitmitarbeiterModel->load(array($mitarbeiter_uid, $lehreinheit_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehreinheitmitarbeiter()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['mitarbeiter_uid']) && isset($this->post()['lehreinheit_id']))
+ {
+ $result = $this->LehreinheitmitarbeiterModel->update(array($this->post()['mitarbeiter_uid'], $this->post()['lehreinheit_id']), $this->post());
+ }
+ else
+ {
+ $result = $this->LehreinheitmitarbeiterModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehreinheitmitarbeiter = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lehrfach.php b/application/controllers/api/v1/education/Lehrfach.php
new file mode 100644
index 000000000..f05b3c074
--- /dev/null
+++ b/application/controllers/api/v1/education/Lehrfach.php
@@ -0,0 +1,78 @@
+load->model('education/lehrfach', 'LehrfachModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehrfachModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehrfach()
+ {
+ $lehrfach_id = $this->get('lehrfach_id');
+
+ if (isset($lehrfach_id))
+ {
+ $result = $this->LehrfachModel->load($lehrfach_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehrfach()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehrfach_id']))
+ {
+ $result = $this->LehrfachModel->update($this->post()['lehrfach_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->LehrfachModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehrfach = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lehrfunktion.php b/application/controllers/api/v1/education/Lehrfunktion.php
new file mode 100644
index 000000000..3941327f2
--- /dev/null
+++ b/application/controllers/api/v1/education/Lehrfunktion.php
@@ -0,0 +1,78 @@
+load->model('education/lehrfunktion', 'LehrfunktionModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehrfunktionModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehrfunktion()
+ {
+ $lehrfunktion_kurzbz = $this->get('lehrfunktion_kurzbz');
+
+ if (isset($lehrfunktion_kurzbz))
+ {
+ $result = $this->LehrfunktionModel->load($lehrfunktion_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehrfunktion()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehrfunktion_kurzbz']))
+ {
+ $result = $this->LehrfunktionModel->update($this->post()['lehrfunktion_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->LehrfunktionModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehrfunktion = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lehrtyp.php b/application/controllers/api/v1/education/Lehrtyp.php
new file mode 100644
index 000000000..b084d65da
--- /dev/null
+++ b/application/controllers/api/v1/education/Lehrtyp.php
@@ -0,0 +1,78 @@
+load->model('education/lehrtyp', 'LehrtypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehrtypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehrtyp()
+ {
+ $lehrtyp_kurzbz = $this->get('lehrtyp_kurzbz');
+
+ if (isset($lehrtyp_kurzbz))
+ {
+ $result = $this->LehrtypModel->load($lehrtyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehrtyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehrtyp_kurzbz']))
+ {
+ $result = $this->LehrtypModel->update($this->post()['lehrtyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->LehrtypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehrtyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lehrveranstaltung.php b/application/controllers/api/v1/education/Lehrveranstaltung.php
new file mode 100644
index 000000000..fe88f2749
--- /dev/null
+++ b/application/controllers/api/v1/education/Lehrveranstaltung.php
@@ -0,0 +1,78 @@
+load->model('education/lehrveranstaltung', 'LehrveranstaltungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehrveranstaltungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehrveranstaltung()
+ {
+ $lehrveranstaltung_id = $this->get('lehrveranstaltung_id');
+
+ if (isset($lehrveranstaltung_id))
+ {
+ $result = $this->LehrveranstaltungModel->load($lehrveranstaltung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehrveranstaltung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehrveranstaltung_id']))
+ {
+ $result = $this->LehrveranstaltungModel->update($this->post()['lehrveranstaltung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->LehrveranstaltungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehrveranstaltung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lvangebot.php b/application/controllers/api/v1/education/Lvangebot.php
new file mode 100644
index 000000000..21ad945df
--- /dev/null
+++ b/application/controllers/api/v1/education/Lvangebot.php
@@ -0,0 +1,78 @@
+load->model('education/lvangebot', 'LvangebotModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LvangebotModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLvangebot()
+ {
+ $lvangebot_id = $this->get('lvangebot_id');
+
+ if (isset($lvangebot_id))
+ {
+ $result = $this->LvangebotModel->load($lvangebot_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLvangebot()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lvangebot_id']))
+ {
+ $result = $this->LvangebotModel->update($this->post()['lvangebot_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->LvangebotModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lvangebot = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lvgesamtnote.php b/application/controllers/api/v1/education/Lvgesamtnote.php
new file mode 100644
index 000000000..d9ea9ae06
--- /dev/null
+++ b/application/controllers/api/v1/education/Lvgesamtnote.php
@@ -0,0 +1,85 @@
+load->model('education/lvgesamtnote', 'LvgesamtnoteModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LvgesamtnoteModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLvgesamtnote()
+ {
+ $student_uid = $this->get('student_uid');
+ $studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
+ $lehrveranstaltung_id = $this->get('lehrveranstaltung_id');
+
+ if (isset($student_uid) && isset($studiensemester_kurzbz) && isset($lehrveranstaltung_id))
+ {
+ $result = $this->LvgesamtnoteModel->load(array($student_uid, $studiensemester_kurzbz, $lehrveranstaltung_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLvgesamtnote()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['student_uid']) && isset($this->post()['studiensemester_kurzbz']) && isset($this->post()['lehrveranstaltung_id']))
+ {
+ $pksArray = array($this->post()['student_uid'],
+ $this->post()['studiensemester_kurzbz'],
+ $this->post()['lehrveranstaltung_id']
+ );
+
+ $result = $this->LvgesamtnoteModel->update($pksArray, $this->post());
+ }
+ else
+ {
+ $result = $this->LvgesamtnoteModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lvgesamtnote = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lvinfo.php b/application/controllers/api/v1/education/Lvinfo.php
new file mode 100644
index 000000000..01d96ec92
--- /dev/null
+++ b/application/controllers/api/v1/education/Lvinfo.php
@@ -0,0 +1,79 @@
+load->model('education/lvinfo', 'LvinfoModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LvinfoModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLvinfo()
+ {
+ $sprache = $this->get('sprache');
+ $lehrveranstaltung_id = $this->get('lehrveranstaltung_id');
+
+ if (isset($sprache) && isset($lehrveranstaltung_id))
+ {
+ $result = $this->LvinfoModel->load(array($sprache, $lehrveranstaltung_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLvinfo()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['sprache']) && isset($this->post()['lehrveranstaltung_id']))
+ {
+ $result = $this->LvinfoModel->update(array($this->post()['sprache'], $this->post()['lehrveranstaltung_id']), $this->post());
+ }
+ else
+ {
+ $result = $this->LvinfoModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lvinfo = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lvregel.php b/application/controllers/api/v1/education/Lvregel.php
new file mode 100644
index 000000000..d0795813b
--- /dev/null
+++ b/application/controllers/api/v1/education/Lvregel.php
@@ -0,0 +1,78 @@
+load->model('education/lvregel', 'LvregelModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LvregelModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLvregel()
+ {
+ $lvregel_id = $this->get('lvregel_id');
+
+ if (isset($lvregel_id))
+ {
+ $result = $this->LvregelModel->load($lvregel_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLvregel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lvregel_id']))
+ {
+ $result = $this->LvregelModel->update($this->post()['lvregel_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->LvregelModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lvregel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Lvregeltyp.php b/application/controllers/api/v1/education/Lvregeltyp.php
new file mode 100644
index 000000000..f75be3c56
--- /dev/null
+++ b/application/controllers/api/v1/education/Lvregeltyp.php
@@ -0,0 +1,78 @@
+load->model('education/lvregeltyp', 'LvregeltypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LvregeltypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLvregeltyp()
+ {
+ $lvregeltyp_kurzbz = $this->get('lvregeltyp_kurzbz');
+
+ if (isset($lvregeltyp_kurzbz))
+ {
+ $result = $this->LvregeltypModel->load($lvregeltyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLvregeltyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lvregeltyp_kurzbz']))
+ {
+ $result = $this->LvregeltypModel->update($this->post()['lvregeltyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->LvregeltypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lvregeltyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Moodle.php b/application/controllers/api/v1/education/Moodle.php
new file mode 100644
index 000000000..6596e5ad1
--- /dev/null
+++ b/application/controllers/api/v1/education/Moodle.php
@@ -0,0 +1,78 @@
+load->model('education/moodle', 'MoodleModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->MoodleModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getMoodle()
+ {
+ $moodle_id = $this->get('moodle_id');
+
+ if (isset($moodle_id))
+ {
+ $result = $this->MoodleModel->load($moodle_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postMoodle()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['moodle_id']))
+ {
+ $result = $this->MoodleModel->update($this->post()['moodle_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->MoodleModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($moodle = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Notenschluessel.php b/application/controllers/api/v1/education/Notenschluessel.php
new file mode 100644
index 000000000..d3372375e
--- /dev/null
+++ b/application/controllers/api/v1/education/Notenschluessel.php
@@ -0,0 +1,78 @@
+load->model('education/notenschluessel', 'NotenschluesselModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->NotenschluesselModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getNotenschluessel()
+ {
+ $notenschluessel_kurzbz = $this->get('notenschluessel_kurzbz');
+
+ if (isset($notenschluessel_kurzbz))
+ {
+ $result = $this->NotenschluesselModel->load($notenschluessel_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postNotenschluessel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['notenschluessel_kurzbz']))
+ {
+ $result = $this->NotenschluesselModel->update($this->post()['notenschluessel_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->NotenschluesselModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($notenschluessel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Notenschluesselaufteilung.php b/application/controllers/api/v1/education/Notenschluesselaufteilung.php
new file mode 100644
index 000000000..d98a3c97b
--- /dev/null
+++ b/application/controllers/api/v1/education/Notenschluesselaufteilung.php
@@ -0,0 +1,78 @@
+load->model('education/notenschluesselaufteilung', 'NotenschluesselaufteilungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->NotenschluesselaufteilungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getNotenschluesselaufteilung()
+ {
+ $notenschluesselaufteilung_id = $this->get('notenschluesselaufteilung_id');
+
+ if (isset($notenschluesselaufteilung_id))
+ {
+ $result = $this->NotenschluesselaufteilungModel->load($notenschluesselaufteilung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postNotenschluesselaufteilung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['notenschluesselaufteilung_id']))
+ {
+ $result = $this->NotenschluesselaufteilungModel->update($this->post()['notenschluesselaufteilung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->NotenschluesselaufteilungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($notenschluesselaufteilung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Notenschluesseluebung.php b/application/controllers/api/v1/education/Notenschluesseluebung.php
new file mode 100644
index 000000000..2699dad58
--- /dev/null
+++ b/application/controllers/api/v1/education/Notenschluesseluebung.php
@@ -0,0 +1,79 @@
+load->model('education/notenschluesseluebung', 'NotenschluesseluebungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->NotenschluesseluebungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getNotenschluesseluebung()
+ {
+ $note = $this->get('note');
+ $uebung_id = $this->get('uebung_id');
+
+ if (isset($note) && isset($uebung_id))
+ {
+ $result = $this->NotenschluesseluebungModel->load(array($note, $uebung_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postNotenschluesseluebung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['note']) && isset($this->post()['uebung_id']))
+ {
+ $result = $this->NotenschluesseluebungModel->update(array($this->post()['note'], $this->post()['uebung_id']), $this->post());
+ }
+ else
+ {
+ $result = $this->NotenschluesseluebungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($notenschluesseluebung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Notenschluesselzuordnung.php b/application/controllers/api/v1/education/Notenschluesselzuordnung.php
new file mode 100644
index 000000000..1ee0ccce8
--- /dev/null
+++ b/application/controllers/api/v1/education/Notenschluesselzuordnung.php
@@ -0,0 +1,78 @@
+load->model('education/notenschluesselzuordnung', 'NotenschluesselzuordnungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->NotenschluesselzuordnungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getNotenschluesselzuordnung()
+ {
+ $notenschluesselzuordnung_id = $this->get('notenschluesselzuordnung_id');
+
+ if (isset($notenschluesselzuordnung_id))
+ {
+ $result = $this->NotenschluesselzuordnungModel->load($notenschluesselzuordnung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postNotenschluesselzuordnung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['notenschluesselzuordnung_id']))
+ {
+ $result = $this->NotenschluesselzuordnungModel->update($this->post()['notenschluesselzuordnung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->NotenschluesselzuordnungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($notenschluesselzuordnung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Paabgabe.php b/application/controllers/api/v1/education/Paabgabe.php
new file mode 100644
index 000000000..e67253fbb
--- /dev/null
+++ b/application/controllers/api/v1/education/Paabgabe.php
@@ -0,0 +1,78 @@
+load->model('education/paabgabe', 'PaabgabeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PaabgabeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPaabgabe()
+ {
+ $paabgabe_id = $this->get('paabgabe_id');
+
+ if (isset($paabgabe_id))
+ {
+ $result = $this->PaabgabeModel->load($paabgabe_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPaabgabe()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['paabgabe_id']))
+ {
+ $result = $this->PaabgabeModel->update($this->post()['paabgabe_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PaabgabeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($paabgabe = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Paabgabetyp.php b/application/controllers/api/v1/education/Paabgabetyp.php
new file mode 100644
index 000000000..5a93d9f08
--- /dev/null
+++ b/application/controllers/api/v1/education/Paabgabetyp.php
@@ -0,0 +1,78 @@
+load->model('education/paabgabetyp', 'PaabgabetypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PaabgabetypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPaabgabetyp()
+ {
+ $paabgabetyp_kurzbz = $this->get('paabgabetyp_kurzbz');
+
+ if (isset($paabgabetyp_kurzbz))
+ {
+ $result = $this->PaabgabetypModel->load($paabgabetyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPaabgabetyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['paabgabetyp_kurzbz']))
+ {
+ $result = $this->PaabgabetypModel->update($this->post()['paabgabetyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->PaabgabetypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($paabgabetyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Projektarbeit.php b/application/controllers/api/v1/education/Projektarbeit.php
new file mode 100644
index 000000000..28f7922f5
--- /dev/null
+++ b/application/controllers/api/v1/education/Projektarbeit.php
@@ -0,0 +1,78 @@
+load->model('education/projektarbeit', 'ProjektarbeitModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ProjektarbeitModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getProjektarbeit()
+ {
+ $projektarbeit_id = $this->get('projektarbeit_id');
+
+ if (isset($projektarbeit_id))
+ {
+ $result = $this->ProjektarbeitModel->load($projektarbeit_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postProjektarbeit()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['projektarbeit_id']))
+ {
+ $result = $this->ProjektarbeitModel->update($this->post()['projektarbeit_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ProjektarbeitModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($projektarbeit = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Projektbetreuer.php b/application/controllers/api/v1/education/Projektbetreuer.php
new file mode 100644
index 000000000..6cf01a208
--- /dev/null
+++ b/application/controllers/api/v1/education/Projektbetreuer.php
@@ -0,0 +1,85 @@
+load->model('education/projektbetreuer', 'ProjektbetreuerModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ProjektbetreuerModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getProjektbetreuer()
+ {
+ $betreuerart_kurzbz = $this->get('betreuerart_kurzbz');
+ $projektarbeit_id = $this->get('projektarbeit_id');
+ $person_id = $this->get('person_id');
+
+ if (isset($betreuerart_kurzbz) && isset($projektarbeit_id) && isset($person_id))
+ {
+ $result = $this->ProjektbetreuerModel->load(array($betreuerart_kurzbz, $projektarbeit_id, $person_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postProjektbetreuer()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['betreuerart_kurzbz']) && isset($this->post()['projektarbeit_id']) && isset($this->post()['person_id']))
+ {
+ $pksArray = array($this->post()['betreuerart_kurzbz'],
+ $this->post()['projektarbeit_id'],
+ $this->post()['person_id']
+ );
+
+ $result = $this->ProjektbetreuerModel->update($pksArray, $this->post());
+ }
+ else
+ {
+ $result = $this->ProjektbetreuerModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($projektbetreuer = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Projekttyp.php b/application/controllers/api/v1/education/Projekttyp.php
new file mode 100644
index 000000000..c254833a2
--- /dev/null
+++ b/application/controllers/api/v1/education/Projekttyp.php
@@ -0,0 +1,78 @@
+load->model('education/projekttyp', 'ProjekttypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ProjekttypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getProjekttyp()
+ {
+ $projekttyp_kurzbz = $this->get('projekttyp_kurzbz');
+
+ if (isset($projekttyp_kurzbz))
+ {
+ $result = $this->ProjekttypModel->load($projekttyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postProjekttyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['projekttyp_kurzbz']))
+ {
+ $result = $this->ProjekttypModel->update($this->post()['projekttyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->ProjekttypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($projekttyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Pruefung.php b/application/controllers/api/v1/education/Pruefung.php
new file mode 100644
index 000000000..6c0a44049
--- /dev/null
+++ b/application/controllers/api/v1/education/Pruefung.php
@@ -0,0 +1,78 @@
+load->model('education/pruefung', 'PruefungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PruefungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPruefung()
+ {
+ $pruefung_id = $this->get('pruefung_id');
+
+ if (isset($pruefung_id))
+ {
+ $result = $this->PruefungModel->load($pruefung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPruefung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['pruefung_id']))
+ {
+ $result = $this->PruefungModel->update($this->post()['pruefung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PruefungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($pruefung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Pruefungsanmeldung.php b/application/controllers/api/v1/education/Pruefungsanmeldung.php
new file mode 100644
index 000000000..a30d78680
--- /dev/null
+++ b/application/controllers/api/v1/education/Pruefungsanmeldung.php
@@ -0,0 +1,78 @@
+load->model('education/pruefungsanmeldung', 'PruefungsanmeldungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PruefungsanmeldungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPruefungsanmeldung()
+ {
+ $pruefungsanmeldung_id = $this->get('pruefungsanmeldung_id');
+
+ if (isset($pruefungsanmeldung_id))
+ {
+ $result = $this->PruefungsanmeldungModel->load($pruefungsanmeldung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPruefungsanmeldung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['pruefungsanmeldung_id']))
+ {
+ $result = $this->PruefungsanmeldungModel->update($this->post()['pruefungsanmeldung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PruefungsanmeldungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($pruefungsanmeldung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Pruefungsfenster.php b/application/controllers/api/v1/education/Pruefungsfenster.php
new file mode 100644
index 000000000..64e6fbbe7
--- /dev/null
+++ b/application/controllers/api/v1/education/Pruefungsfenster.php
@@ -0,0 +1,78 @@
+load->model('education/pruefungsfenster', 'PruefungsfensterModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PruefungsfensterModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPruefungsfenster()
+ {
+ $pruefungsfenster_id = $this->get('pruefungsfenster_id');
+
+ if (isset($pruefungsfenster_id))
+ {
+ $result = $this->PruefungsfensterModel->load($pruefungsfenster_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPruefungsfenster()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['pruefungsfenster_id']))
+ {
+ $result = $this->PruefungsfensterModel->update($this->post()['pruefungsfenster_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PruefungsfensterModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($pruefungsfenster = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Pruefungsstatus.php b/application/controllers/api/v1/education/Pruefungsstatus.php
new file mode 100644
index 000000000..5158cac10
--- /dev/null
+++ b/application/controllers/api/v1/education/Pruefungsstatus.php
@@ -0,0 +1,78 @@
+load->model('education/pruefungsstatus', 'PruefungsstatusModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PruefungsstatusModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPruefungsstatus()
+ {
+ $status_kurzbz = $this->get('status_kurzbz');
+
+ if (isset($status_kurzbz))
+ {
+ $result = $this->PruefungsstatusModel->load($status_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPruefungsstatus()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['status_kurzbz']))
+ {
+ $result = $this->PruefungsstatusModel->update($this->post()['status_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->PruefungsstatusModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($pruefungsstatus = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Pruefungstermin.php b/application/controllers/api/v1/education/Pruefungstermin.php
new file mode 100644
index 000000000..e3e1631bc
--- /dev/null
+++ b/application/controllers/api/v1/education/Pruefungstermin.php
@@ -0,0 +1,78 @@
+load->model('education/pruefungstermin', 'PruefungsterminModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PruefungsterminModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPruefungstermin()
+ {
+ $pruefungstermin_id = $this->get('pruefungstermin_id');
+
+ if (isset($pruefungstermin_id))
+ {
+ $result = $this->PruefungsterminModel->load($pruefungstermin_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPruefungstermin()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['pruefungstermin_id']))
+ {
+ $result = $this->PruefungsterminModel->update($this->post()['pruefungstermin_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PruefungsterminModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($pruefungstermin = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Pruefungstyp.php b/application/controllers/api/v1/education/Pruefungstyp.php
new file mode 100644
index 000000000..b4af31f8e
--- /dev/null
+++ b/application/controllers/api/v1/education/Pruefungstyp.php
@@ -0,0 +1,78 @@
+load->model('education/pruefungstyp', 'PruefungstypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PruefungstypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPruefungstyp()
+ {
+ $pruefungstyp_kurzbz = $this->get('pruefungstyp_kurzbz');
+
+ if (isset($pruefungstyp_kurzbz))
+ {
+ $result = $this->PruefungstypModel->load($pruefungstyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPruefungstyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['pruefungstyp_kurzbz']))
+ {
+ $result = $this->PruefungstypModel->update($this->post()['pruefungstyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->PruefungstypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($pruefungstyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Studentbeispiel.php b/application/controllers/api/v1/education/Studentbeispiel.php
new file mode 100644
index 000000000..02b626cfc
--- /dev/null
+++ b/application/controllers/api/v1/education/Studentbeispiel.php
@@ -0,0 +1,79 @@
+load->model('education/studentbeispiel', 'StudentbeispielModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudentbeispielModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudentbeispiel()
+ {
+ $beispiel_id = $this->get('beispiel_id');
+ $student_uid = $this->get('student_uid');
+
+ if (isset($beispiel_id) && isset($student_uid))
+ {
+ $result = $this->StudentbeispielModel->load(array($beispiel_id, $student_uid));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudentbeispiel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['beispiel_id']) && isset($this->post()['student_uid']))
+ {
+ $result = $this->StudentbeispielModel->update(array($this->post()['beispiel_id'], $this->post()['student_uid']), $this->post());
+ }
+ else
+ {
+ $result = $this->StudentbeispielModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studentbeispiel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Studentlehrverband.php b/application/controllers/api/v1/education/Studentlehrverband.php
new file mode 100644
index 000000000..5e9e8cac9
--- /dev/null
+++ b/application/controllers/api/v1/education/Studentlehrverband.php
@@ -0,0 +1,79 @@
+load->model('education/studentlehrverband', 'StudentlehrverbandModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudentlehrverbandModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudentlehrverband()
+ {
+ $studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
+ $student_uid = $this->get('student_uid');
+
+ if (isset($studiensemester_kurzbz) && isset($student_uid))
+ {
+ $result = $this->StudentlehrverbandModel->load(array($studiensemester_kurzbz, $student_uid));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudentlehrverband()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studiensemester_kurzbz']) && isset($this->post()['student_uid']))
+ {
+ $result = $this->StudentlehrverbandModel->update(array($this->post()['studiensemester_kurzbz'], $this->post()['student_uid']), $this->post());
+ }
+ else
+ {
+ $result = $this->StudentlehrverbandModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studentlehrverband = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Studentuebung.php b/application/controllers/api/v1/education/Studentuebung.php
new file mode 100644
index 000000000..cd386732b
--- /dev/null
+++ b/application/controllers/api/v1/education/Studentuebung.php
@@ -0,0 +1,79 @@
+load->model('education/studentuebung', 'StudentuebungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudentuebungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudentuebung()
+ {
+ $uebung_id = $this->get('uebung_id');
+ $student_uid = $this->get('student_uid');
+
+ if (isset($uebung_id) && isset($student_uid))
+ {
+ $result = $this->StudentuebungModel->load(array($uebung_id, $student_uid));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudentuebung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['uebung_id']) && isset($this->post()['student_uid']))
+ {
+ $result = $this->StudentuebungModel->update(array($this->post()['uebung_id'], $this->post()['student_uid']), $this->post());
+ }
+ else
+ {
+ $result = $this->StudentuebungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studentuebung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Uebung.php b/application/controllers/api/v1/education/Uebung.php
new file mode 100644
index 000000000..95d0fb52d
--- /dev/null
+++ b/application/controllers/api/v1/education/Uebung.php
@@ -0,0 +1,78 @@
+load->model('education/uebung', 'UebungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->UebungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getUebung()
+ {
+ $uebung_id = $this->get('uebung_id');
+
+ if (isset($uebung_id))
+ {
+ $result = $this->UebungModel->load($uebung_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postUebung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['uebung_id']))
+ {
+ $result = $this->UebungModel->update($this->post()['uebung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->UebungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($uebung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Zeugnis.php b/application/controllers/api/v1/education/Zeugnis.php
new file mode 100644
index 000000000..f9fbf74a5
--- /dev/null
+++ b/application/controllers/api/v1/education/Zeugnis.php
@@ -0,0 +1,78 @@
+load->model('education/zeugnis', 'ZeugnisModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZeugnisModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZeugnis()
+ {
+ $zeugnis_id = $this->get('zeugnis_id');
+
+ if (isset($zeugnis_id))
+ {
+ $result = $this->ZeugnisModel->load($zeugnis_id);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZeugnis()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zeugnis_id']))
+ {
+ $result = $this->ZeugnisModel->update($this->post()['zeugnis_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZeugnisModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zeugnis = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/education/Zeugnisnote.php b/application/controllers/api/v1/education/Zeugnisnote.php
new file mode 100644
index 000000000..7b6e602ab
--- /dev/null
+++ b/application/controllers/api/v1/education/Zeugnisnote.php
@@ -0,0 +1,85 @@
+load->model('education/zeugnisnote', 'ZeugnisnoteModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZeugnisnoteModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZeugnisnote()
+ {
+ $studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
+ $student_uid = $this->get('student_uid');
+ $lehrveranstaltung_id = $this->get('lehrveranstaltung_id');
+
+ if (isset($studiensemester_kurzbz) && isset($student_uid) && isset($lehrveranstaltung_id))
+ {
+ $result = $this->ZeugnisnoteModel->load(array($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZeugnisnote()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studiensemester_kurzbz']) && isset($this->post()['student_uid']) && isset($this->post()['lehrveranstaltung_id']))
+ {
+ $pksArray = array($this->post()['studiensemester_kurzbz'],
+ $this->post()['student_uid'],
+ $this->post()['lehrveranstaltung_id']
+ );
+
+ $result = $this->ZeugnisnoteModel->update($pksArray, $this->post());
+ }
+ else
+ {
+ $result = $this->ZeugnisnoteModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zeugnisnote = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Erhalter.php b/application/controllers/api/v1/organisation/Erhalter.php
new file mode 100644
index 000000000..1e6c730b4
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Erhalter.php
@@ -0,0 +1,78 @@
+load->model('organisation/erhalter_model', 'ErhalterModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ErhalterModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getErhalter()
+ {
+ $erhalter_kz = $this->get('erhalter_kz');
+
+ if (isset($erhalter_kz))
+ {
+ $result = $this->ErhalterModel->load($erhalter_kz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postErhalter()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['erhalter_kz']))
+ {
+ $result = $this->ErhalterModel->update($this->post()['erhalter_kz'], $this->post());
+ }
+ else
+ {
+ $result = $this->ErhalterModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($erhalter = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Fachbereich2.php b/application/controllers/api/v1/organisation/Fachbereich2.php
new file mode 100644
index 000000000..662298940
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Fachbereich2.php
@@ -0,0 +1,78 @@
+load->model('organisation/fachbereich_model', 'FachbereichModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FachbereichModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFachbereich()
+ {
+ $fachbereich_kurzbz = $this->get('fachbereich_kurzbz');
+
+ if (isset($fachbereich_kurzbz))
+ {
+ $result = $this->FachbereichModel->load($fachbereich_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFachbereich()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['fachbereich_id']))
+ {
+ $result = $this->FachbereichModel->update($this->post()['fachbereich_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->FachbereichModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($fachbereich = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Ferien.php b/application/controllers/api/v1/organisation/Ferien.php
new file mode 100644
index 000000000..5ecf54756
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Ferien.php
@@ -0,0 +1,79 @@
+load->model('organisation/ferien_model', 'FerienModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FerienModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFerien()
+ {
+ $studiengang_kz = $this->get('studiengang_kz');
+ $bezeichnung = $this->get('bezeichnung');
+
+ if (isset($studiengang_kz) && isset($bezeichnung))
+ {
+ $result = $this->FerienModel->load(array($studiengang_kz, $bezeichnung));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFerien()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studiengang_kz']) && isset($this->post()['bezeichnung']))
+ {
+ $result = $this->FerienModel->update(array($this->post()['ferien_id'], $this->post()['bezeichnung']), $this->post());
+ }
+ else
+ {
+ $result = $this->FerienModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($ferien = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Geschaeftsjahr2.php b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php
new file mode 100644
index 000000000..61579e457
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php
@@ -0,0 +1,78 @@
+load->model('organisation/geschaeftsjahr_model', 'GeschaeftsjahrModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->GeschaeftsjahrModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getGeschaeftsjahr()
+ {
+ $geschaeftsjahr_kurzbz = $this->get('geschaeftsjahr_kurzbz');
+
+ if (isset($geschaeftsjahr_kurzbz))
+ {
+ $result = $this->GeschaeftsjahrModel->load($geschaeftsjahr_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postGeschaeftsjahr()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['geschaeftsjahr_id']))
+ {
+ $result = $this->GeschaeftsjahrModel->update($this->post()['geschaeftsjahr_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->GeschaeftsjahrModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($geschaeftsjahr = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Gruppe.php b/application/controllers/api/v1/organisation/Gruppe.php
new file mode 100644
index 000000000..7bf01666a
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Gruppe.php
@@ -0,0 +1,78 @@
+load->model('organisation/gruppe_model', 'GruppeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->GruppeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getGruppe()
+ {
+ $gruppe_kurzbz = $this->get('gruppe_kurzbz');
+
+ if (isset($gruppe_kurzbz))
+ {
+ $result = $this->GruppeModel->load($gruppe_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postGruppe()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['gruppe_kurzbz']))
+ {
+ $result = $this->GruppeModel->update($this->post()['gruppe_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->GruppeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($gruppe = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Lehrverband.php b/application/controllers/api/v1/organisation/Lehrverband.php
new file mode 100644
index 000000000..ce4e04893
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Lehrverband.php
@@ -0,0 +1,88 @@
+load->model('organisation/lehrverband_model', 'LehrverbandModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehrverbandModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehrverband()
+ {
+ $gruppe = $this->get('gruppe');
+ $verband = $this->get('verband');
+ $semester = $this->get('semester');
+ $studiengang_kz = $this->get('studiengang_kz');
+
+ if (isset($gruppe) && isset($verband) && isset($semester) && isset($studiengang_kz))
+ {
+ $result = $this->LehrverbandModel->load(array($gruppe, $verband, $semester, $studiengang_kz));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehrverband()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['gruppe']) && isset($this->post()['verband']) &&
+ isset($this->post()['semester']) && isset($this->post()['studiengang_kz']))
+ {
+ $pksArray = array($this->post()['gruppe'],
+ $this->post()['verband'],
+ $this->post()['semester'],
+ $this->post()['studiengang_kz']
+ );
+
+ $result = $this->LehrverbandModel->update($pksArray, $this->post());
+ }
+ else
+ {
+ $result = $this->LehrverbandModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehrverband = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Organisationseinheit2.php b/application/controllers/api/v1/organisation/Organisationseinheit2.php
new file mode 100644
index 000000000..87fa0b2a9
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Organisationseinheit2.php
@@ -0,0 +1,78 @@
+load->model('organisation/organisationseinheit_model', 'OrganisationseinheitModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->OrganisationseinheitModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getOrganisationseinheit()
+ {
+ $oe_kurzbz = $this->get('oe_kurzbz');
+
+ if (isset($oe_kurzbz))
+ {
+ $result = $this->OrganisationseinheitModel->load($oe_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postOrganisationseinheit()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['organisationseinheit_id']))
+ {
+ $result = $this->OrganisationseinheitModel->update($this->post()['organisationseinheit_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->OrganisationseinheitModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($organisationseinheit = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Organisationseinheittyp.php b/application/controllers/api/v1/organisation/Organisationseinheittyp.php
new file mode 100644
index 000000000..79765ed68
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Organisationseinheittyp.php
@@ -0,0 +1,78 @@
+load->model('organisation/organisationseinheittyp_model', 'OrganisationseinheittypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->OrganisationseinheittypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getOrganisationseinheittyp()
+ {
+ $organisationseinheittyp_kurzbz = $this->get('organisationseinheittyp_kurzbz');
+
+ if (isset($organisationseinheittyp_kurzbz))
+ {
+ $result = $this->OrganisationseinheittypModel->load($organisationseinheittyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postOrganisationseinheittyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['organisationseinheittyp_kurzbz']))
+ {
+ $result = $this->OrganisationseinheittypModel->update($this->post()['organisationseinheittyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->OrganisationseinheittypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($organisationseinheittyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Semesterwochen.php b/application/controllers/api/v1/organisation/Semesterwochen.php
new file mode 100644
index 000000000..8ea889d25
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Semesterwochen.php
@@ -0,0 +1,79 @@
+load->model('organisation/semesterwochen_model', 'SemesterwochenModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->SemesterwochenModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getSemesterwochen()
+ {
+ $studiengang_kz = $this->get('studiengang_kz');
+ $semester = $this->get('semester');
+
+ if (isset($studiengang_kz) && isset($semester))
+ {
+ $result = $this->SemesterwochenModel->load(array($studiengang_kz, $semester));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postSemesterwochen()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studiengang_kz']) && isset($this->post()['semester']))
+ {
+ $result = $this->SemesterwochenModel->update(array($this->post()['studiengang_kz'], $this->post()['semester']), $this->post());
+ }
+ else
+ {
+ $result = $this->SemesterwochenModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($semesterwochen = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Service.php b/application/controllers/api/v1/organisation/Service.php
new file mode 100644
index 000000000..0d04e4cb7
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Service.php
@@ -0,0 +1,78 @@
+load->model('organisation/service_model', 'ServiceModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ServiceModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getService()
+ {
+ $serviceID = $this->get('service_id');
+
+ if (isset($serviceID))
+ {
+ $result = $this->ServiceModel->load($serviceID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postService()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['service_id']))
+ {
+ $result = $this->ServiceModel->update($this->post()['service_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ServiceModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($service = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Standort.php b/application/controllers/api/v1/organisation/Standort.php
new file mode 100644
index 000000000..a377684b9
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Standort.php
@@ -0,0 +1,78 @@
+load->model('organisation/standort_model', 'StandortModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StandortModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStandort()
+ {
+ $standortID = $this->get('standort_id');
+
+ if (isset($standortID))
+ {
+ $result = $this->StandortModel->load($standortID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStandort()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['standort_id']))
+ {
+ $result = $this->StandortModel->update($this->post()['standort_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->StandortModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($standort = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Statistik.php b/application/controllers/api/v1/organisation/Statistik.php
new file mode 100644
index 000000000..8d72fbadf
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Statistik.php
@@ -0,0 +1,78 @@
+load->model('organisation/statistik_model', 'StatistikModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StatistikModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStatistik()
+ {
+ $statistik_kurzbz = $this->get('statistik_kurzbz');
+
+ if (isset($statistik_kurzbz))
+ {
+ $result = $this->StatistikModel->load($statistik_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStatistik()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['statistik_kurzbz']))
+ {
+ $result = $this->StatistikModel->update($this->post()['statistik_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->StatistikModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($statistik = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Studiengang2.php b/application/controllers/api/v1/organisation/Studiengang2.php
new file mode 100644
index 000000000..4a19e3e96
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Studiengang2.php
@@ -0,0 +1,50 @@
+load->model('organisation/studiengang_model', 'StudiengangModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudiengangModel->setUID($this->_getUID());
+ }
+
+ public function getStudiengang()
+ {
+ $studiengang_kz = $this->get('studiengang_kz');
+
+ if (isset($studiengang_kz))
+ {
+ $result = $this->StudiengangModel->load($studiengang_kz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ public function getAllForBewerbung()
+ {
+ $this->response($this->StudiengangModel->getAllForBewerbung(), REST_Controller::HTTP_OK);
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Studiengangstyp.php b/application/controllers/api/v1/organisation/Studiengangstyp.php
new file mode 100644
index 000000000..45459c366
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Studiengangstyp.php
@@ -0,0 +1,78 @@
+load->model('organisation/studiengangstyp_model', 'StudiengangstypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudiengangstypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudiengangstyp()
+ {
+ $typ = $this->get('typ');
+
+ if (isset($typ))
+ {
+ $result = $this->StudiengangstypModel->load($typ);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudiengangstyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['typ']))
+ {
+ $result = $this->StudiengangstypModel->update($this->post()['typ'], $this->post());
+ }
+ else
+ {
+ $result = $this->StudiengangstypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studiengangstyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Studienjahr.php b/application/controllers/api/v1/organisation/Studienjahr.php
new file mode 100644
index 000000000..d66e26a05
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Studienjahr.php
@@ -0,0 +1,78 @@
+load->model('organisation/studienjahr_model', 'StudienjahrModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudienjahrModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudienjahr()
+ {
+ $studienjahr_kurzbz = $this->get('studienjahr_kurzbz');
+
+ if (isset($studienjahr_kurzbz))
+ {
+ $result = $this->StudienjahrModel->load($studienjahr_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudienjahr()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studienjahr_kurzbz']))
+ {
+ $result = $this->StudienjahrModel->update($this->post()['studienjahr_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->StudienjahrModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studienjahr = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Studienordnung.php b/application/controllers/api/v1/organisation/Studienordnung.php
new file mode 100644
index 000000000..10ea7248f
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Studienordnung.php
@@ -0,0 +1,78 @@
+load->model('organisation/studienordnung_model', 'StudienordnungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudienordnungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudienordnung()
+ {
+ $studienordnungID = $this->get('studienordnung_id');
+
+ if (isset($studienordnungID))
+ {
+ $result = $this->StudienordnungModel->load($studienordnungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudienordnung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studienordnung_id']))
+ {
+ $result = $this->StudienordnungModel->update($this->post()['studienordnung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->StudienordnungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studienordnung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Studienordnungstatus.php b/application/controllers/api/v1/organisation/Studienordnungstatus.php
new file mode 100644
index 000000000..02ee9b8bb
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Studienordnungstatus.php
@@ -0,0 +1,78 @@
+load->model('organisation/studienordnungstatus_model', 'StudienordnungstatusModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudienordnungstatusModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudienordnungstatus()
+ {
+ $status_kurzbz = $this->get('status_kurzbz');
+
+ if (isset($status_kurzbz))
+ {
+ $result = $this->StudienordnungstatusModel->load($status_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudienordnungstatus()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['status_kurzbz']))
+ {
+ $result = $this->StudienordnungstatusModel->update($this->post()['status_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->StudienordnungstatusModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studienordnungstatus = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Studienplan.php b/application/controllers/api/v1/organisation/Studienplan.php
index b4b2ffd8a..9f7913bba 100644
--- a/application/controllers/api/v1/organisation/Studienplan.php
+++ b/application/controllers/api/v1/organisation/Studienplan.php
@@ -12,7 +12,7 @@
*/
// ------------------------------------------------------------------------
-if(!defined('BASEPATH')) exit('No direct script access allowed');
+if (!defined('BASEPATH')) exit('No direct script access allowed');
class Studienplan extends APIv1_Controller
{
@@ -32,10 +32,10 @@ class Studienplan extends APIv1_Controller
{
$studiengang_kz = $this->get('studiengang_kz');
- if(isset($studiengang_kz))
+ if (isset($studiengang_kz))
{
$result = $this->StudienplanModel->addJoin('lehre.tbl_studienordnung', 'studienordnung_id');
- if($result->error == EXIT_SUCCESS)
+ if ($result->error == EXIT_SUCCESS)
{
$result = $this->StudienplanModel->loadWhere(array('studiengang_kz' => $this->get('studiengang_kz')));
}
diff --git a/application/controllers/api/v1/organisation/Studienplatz.php b/application/controllers/api/v1/organisation/Studienplatz.php
new file mode 100644
index 000000000..00e55a35b
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Studienplatz.php
@@ -0,0 +1,78 @@
+load->model('organisation/studienplatz_model', 'StudienplatzModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudienplatzModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudienplatz()
+ {
+ $studienplatzID = $this->get('studienplatz_id');
+
+ if (isset($studienplatzID))
+ {
+ $result = $this->StudienplatzModel->load($studienplatzID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudienplatz()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studienplatz_id']))
+ {
+ $result = $this->StudienplatzModel->update($this->post()['studienplatz_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->StudienplatzModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studienplatz = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/organisation/Studiensemester.php b/application/controllers/api/v1/organisation/Studiensemester.php
new file mode 100644
index 000000000..5b3228b92
--- /dev/null
+++ b/application/controllers/api/v1/organisation/Studiensemester.php
@@ -0,0 +1,78 @@
+load->model('organisation/studiensemester_model', 'StudiensemesterModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StudiensemesterModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStudiensemester()
+ {
+ $studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
+
+ if (isset($studiensemester_kurzbz))
+ {
+ $result = $this->StudiensemesterModel->load($studiensemester_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStudiensemester()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['studiensemester_kurzbz']))
+ {
+ $result = $this->StudiensemesterModel->update($this->post()['studiensemester_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->StudiensemesterModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($studiensemester = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Adresse.php b/application/controllers/api/v1/person/Adresse.php
new file mode 100644
index 000000000..6a0038865
--- /dev/null
+++ b/application/controllers/api/v1/person/Adresse.php
@@ -0,0 +1,70 @@
+load->model('person/adresse_model', 'AdresseModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AdresseModel->setUID($this->_getUID());
+ }
+
+ public function getAdresse()
+ {
+ $personID = $this->get("person_id");
+
+ if (isset($personID))
+ {
+ $result = $this->AdresseModel->loadWhere(array('person_id' => $personID));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ public function postAdresse()
+ {
+ $post = $this->post();
+
+ if (is_array($post))
+ {
+ if (isset($post['adresse_id']))
+ {
+ $result = $this->AdresseModel->update($post['adresse_id'], $post);
+ }
+ else
+ {
+ $result = $this->AdresseModel->insert($post);
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Bankverbindung.php b/application/controllers/api/v1/person/Bankverbindung.php
new file mode 100644
index 000000000..0355c3849
--- /dev/null
+++ b/application/controllers/api/v1/person/Bankverbindung.php
@@ -0,0 +1,78 @@
+load->model('person/bankverbindung_model', 'BankverbindungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BankverbindungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBankverbindung()
+ {
+ $bankverbindungID = $this->get('bankverbindung_id');
+
+ if (isset($bankverbindungID))
+ {
+ $result = $this->BankverbindungModel->load($bankverbindungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBankverbindung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['bankverbindung_id']))
+ {
+ $result = $this->BankverbindungModel->update($this->post()['bankverbindung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BankverbindungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($bankverbindung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Benutzer.php b/application/controllers/api/v1/person/Benutzer.php
new file mode 100644
index 000000000..35e31b66c
--- /dev/null
+++ b/application/controllers/api/v1/person/Benutzer.php
@@ -0,0 +1,78 @@
+load->model('person/benutzer_model', 'BenutzerModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BenutzerModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBenutzer()
+ {
+ $uid = $this->get('uid');
+
+ if (isset($uid))
+ {
+ $result = $this->BenutzerModel->load($uid);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBenutzer()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['uid']))
+ {
+ $result = $this->BenutzerModel->update($this->post()['uid'], $this->post());
+ }
+ else
+ {
+ $result = $this->BenutzerModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($benutzer = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Benutzerfunktion.php b/application/controllers/api/v1/person/Benutzerfunktion.php
new file mode 100644
index 000000000..0bc764d56
--- /dev/null
+++ b/application/controllers/api/v1/person/Benutzerfunktion.php
@@ -0,0 +1,78 @@
+load->model('person/benutzerfunktion_model', 'BenutzerfunktionModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BenutzerfunktionModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBenutzerfunktion()
+ {
+ $benutzerfunktionID = $this->get('benutzerfunktion_id');
+
+ if (isset($benutzerfunktionID))
+ {
+ $result = $this->BenutzerfunktionModel->load($benutzerfunktionID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBenutzerfunktion()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['benutzerfunktion_id']))
+ {
+ $result = $this->BenutzerfunktionModel->update($this->post()['benutzerfunktion_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BenutzerfunktionModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($benutzerfunktion = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Benutzergruppe.php b/application/controllers/api/v1/person/Benutzergruppe.php
new file mode 100644
index 000000000..3b499283a
--- /dev/null
+++ b/application/controllers/api/v1/person/Benutzergruppe.php
@@ -0,0 +1,79 @@
+load->model('person/benutzergruppe_model', 'BenutzergruppeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BenutzergruppeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBenutzergruppe()
+ {
+ $gruppe_kurzbz = $this->get('gruppe_kurzbz');
+ $uid = $this->get('uid');
+
+ if (isset($gruppe_kurzbz) && isset($uid))
+ {
+ $result = $this->BenutzergruppeModel->load(array($gruppe_kurzbz, $uid));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBenutzergruppe()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['benutzergruppe_id']))
+ {
+ $result = $this->BenutzergruppeModel->update($this->post()['benutzergruppe_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BenutzergruppeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($benutzergruppe = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Fotostatus.php b/application/controllers/api/v1/person/Fotostatus.php
new file mode 100644
index 000000000..fa3d9c8ae
--- /dev/null
+++ b/application/controllers/api/v1/person/Fotostatus.php
@@ -0,0 +1,78 @@
+load->model('person/fotostatus_model', 'FotostatusModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FotostatusModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFotostatus()
+ {
+ $fotostatus_kurzbz = $this->get('fotostatus_kurzbz');
+
+ if (isset($fotostatus_kurzbz))
+ {
+ $result = $this->FotostatusModel->load($fotostatus_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFotostatus()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['fotostatus_kurzbz']))
+ {
+ $result = $this->FotostatusModel->update($this->post()['fotostatus_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->FotostatusModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($fotostatus = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Freebusy.php b/application/controllers/api/v1/person/Freebusy.php
new file mode 100644
index 000000000..fb587e2dd
--- /dev/null
+++ b/application/controllers/api/v1/person/Freebusy.php
@@ -0,0 +1,78 @@
+load->model('person/freebusy_model', 'FreebusyModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FreebusyModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFreebusy()
+ {
+ $freebusyID = $this->get('freebusy_id');
+
+ if (isset($freebusyID))
+ {
+ $result = $this->FreebusyModel->load($freebusyID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFreebusy()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['freebusy_id']))
+ {
+ $result = $this->FreebusyModel->update($this->post()['freebusy_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->FreebusyModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($freebusy = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Freebusytyp.php b/application/controllers/api/v1/person/Freebusytyp.php
new file mode 100644
index 000000000..c9ceb47ce
--- /dev/null
+++ b/application/controllers/api/v1/person/Freebusytyp.php
@@ -0,0 +1,78 @@
+load->model('person/freebusytyp_model', 'FreebusytypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FreebusytypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFreebusytyp()
+ {
+ $freebusytyp_kurzbz = $this->get('freebusytyp_kurzbz');
+
+ if (isset($freebusytyp_kurzbz))
+ {
+ $result = $this->FreebusytypModel->load($freebusytyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFreebusytyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['freebusytyp_kurzbz']))
+ {
+ $result = $this->FreebusytypModel->update($this->post()['freebusytyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->FreebusytypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($freebusytyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Kontakt.php b/application/controllers/api/v1/person/Kontakt.php
new file mode 100644
index 000000000..00015ff78
--- /dev/null
+++ b/application/controllers/api/v1/person/Kontakt.php
@@ -0,0 +1,70 @@
+load->model('person/kontakt_model', 'KontaktModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->KontaktModel->setUID($this->_getUID());
+ }
+
+ public function getKontakt()
+ {
+ $personID = $this->get("person_id");
+
+ if (isset($personID))
+ {
+ $result = $this->KontaktModel->loadWhere(array('person_id' => $personID));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ public function postKontakt()
+ {
+ $post = $this->_parseData($this->post());
+
+ if (is_array($post))
+ {
+ if (isset($post['kontakt_id']))
+ {
+ $result = $this->KontaktModel->update($post['kontakt_id'], $post);
+ }
+ else
+ {
+ $result = $this->KontaktModel->insert($post);
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Kontaktmedium.php b/application/controllers/api/v1/person/Kontaktmedium.php
new file mode 100644
index 000000000..483ad7e2d
--- /dev/null
+++ b/application/controllers/api/v1/person/Kontaktmedium.php
@@ -0,0 +1,78 @@
+load->model('person/kontaktmedium_model', 'KontaktmediumModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->KontaktmediumModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getKontaktmedium()
+ {
+ $kontaktmedium_kurzbz = $this->get('kontaktmedium_kurzbz');
+
+ if (isset($kontaktmedium_kurzbz))
+ {
+ $result = $this->KontaktmediumModel->load($kontaktmedium_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postKontaktmedium()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['kontaktmedium_kurzbz']))
+ {
+ $result = $this->KontaktmediumModel->update($this->post()['kontaktmedium_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->KontaktmediumModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($kontaktmedium = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Kontakttyp.php b/application/controllers/api/v1/person/Kontakttyp.php
new file mode 100644
index 000000000..ef6edd8ea
--- /dev/null
+++ b/application/controllers/api/v1/person/Kontakttyp.php
@@ -0,0 +1,78 @@
+load->model('person/kontakttyp_model', 'KontakttypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->KontakttypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getKontakttyp()
+ {
+ $kontakttyp = $this->get('kontakttyp');
+
+ if (isset($kontakttyp))
+ {
+ $result = $this->KontakttypModel->load($kontakttyp);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postKontakttyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['kontakttyp']))
+ {
+ $result = $this->KontakttypModel->update($this->post()['kontakttyp'], $this->post());
+ }
+ else
+ {
+ $result = $this->KontakttypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($kontakttyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Notiz.php b/application/controllers/api/v1/person/Notiz.php
new file mode 100644
index 000000000..537d13979
--- /dev/null
+++ b/application/controllers/api/v1/person/Notiz.php
@@ -0,0 +1,78 @@
+load->model('person/notiz_model', 'NotizModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->NotizModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getNotiz()
+ {
+ $notizID = $this->get('notiz_id');
+
+ if (isset($notizID))
+ {
+ $result = $this->NotizModel->load($notizID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postNotiz()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['notiz_id']))
+ {
+ $result = $this->NotizModel->update($this->post()['notiz_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->NotizModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($notiz = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Notizzuordnung.php b/application/controllers/api/v1/person/Notizzuordnung.php
new file mode 100644
index 000000000..05494b50e
--- /dev/null
+++ b/application/controllers/api/v1/person/Notizzuordnung.php
@@ -0,0 +1,78 @@
+load->model('person/notizzuordnung_model', 'NotizzuordnungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->NotizzuordnungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getNotizzuordnung()
+ {
+ $notizzuordnungID = $this->get('notizzuordnung_id');
+
+ if (isset($notizzuordnungID))
+ {
+ $result = $this->NotizzuordnungModel->load($notizzuordnungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postNotizzuordnung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['notizzuordnung_id']))
+ {
+ $result = $this->NotizzuordnungModel->update($this->post()['notizzuordnung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->NotizzuordnungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($notizzuordnung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/person/Person.php b/application/controllers/api/v1/person/Person.php
index ea708f8e5..71edf5ef3 100644
--- a/application/controllers/api/v1/person/Person.php
+++ b/application/controllers/api/v1/person/Person.php
@@ -1,353 +1,336 @@
-load->model('person/person_model', 'PersonModel');
- // Load set the uid of the model to let to check the permissions
- $this->PersonModel->setUID($this->_getUID());
- }
-
- /**
- * @return void
- */
- public function getPerson()
- {
- $personID = $this->get('person_id');
- $code = $this->get('code');
- $email = $this->get('email');
-
- if(isset($code) || isset($email) || isset($personID))
- {
- if(isset($code) && isset($email))
- {
- $result = $this->PersonModel->addJoin('public.tbl_kontakt', 'person_id');
- if($result->error == EXIT_SUCCESS)
- {
- $result = $this->PersonModel->loadWhere(array('zugangscode' => $code, 'kontakt' => $email));
- }
- }
- elseif(isset($code))
- {
- $result = $this->PersonModel->loadWhere(array('zugangscode' => $code));
- }
- else
- {
- $result = $this->PersonModel->load($personID);
- }
-
- $this->response($result, REST_Controller::HTTP_OK);
- }
- else
- {
- $this->response();
- }
- }
-
- /**
- * @return void
- */
- public function postPerson()
- {
- if($this->_validate($this->post()))
- {
- if(isset($this->post()['person_id']))
- {
- $result = $this->PersonModel->update($this->post()['person_id'], $this->post());
- }
- else
- {
- $result = $this->PersonModel->insert($this->post());
- }
-
- $this->response($result, REST_Controller::HTTP_OK);
- }
- else
- {
- $this->response();
- }
- }
-
- /**
- * @return void
- */
- public function getCheckBewerbung()
- {
- $result = $this->PersonModel->checkBewerbung($this->get("email"), $this->get("studiensemester_kurzbz"));
- $httpstatus = REST_Controller::HTTP_OK;
- $payload = [
- 'success' => true,
- 'message' => 'Bewerbung exists.'
- ];
- $payload['data'] = $result;
- $this->response($payload, $httpstatus);
- }
-
- /**
- * @return void
- */
- public function getCheckZugangscodePerson()
- {
- $result = $this->PersonModel->checkZugangscodePerson($this->get("code"));
- $httpstatus = REST_Controller::HTTP_OK;
- if(!empty($result))
- {
- $payload = [
- 'success' => true,
- 'message' => 'Zugangscode exists.'
- ];
- $payload['data'] = $result;
- }
- else
- {
- $payload = [
- 'success' => false,
- 'message' => 'Zugangscode does not exist.'
- ];
- $httpstatus = REST_Controller::HTTP_OK;
- }
-
- $this->response($payload, $httpstatus);
- }
-
- private function _validate($person = NULL)
- {
- if(!isset($person))
- {
- return false;
- }
-
- $person['nachname'] = trim($person['nachname']);
- $person['vorname'] = trim($person['vorname']);
- $person['vornamen'] = trim($person['vornamen']);
- $person['anrede'] = trim($person['anrede']);
- $person['titelpost'] = trim($person['titelpost']);
- $person['titelpre'] = trim($person['titelpre']);
-
- if(mb_strlen($person['sprache']) > 16)
- {
- //$this->errormsg = 'Sprache darf nicht laenger als 16 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['anrede']) > 16)
- {
- //$this->errormsg = 'Anrede darf nicht laenger als 16 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['titelpost']) > 32)
- {
- //$this->errormsg = 'Titelpost darf nicht laenger als 32 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['titelpre']) > 64)
- {
- //$this->errormsg = 'Titelpre darf nicht laenger als 64 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['nachname']) > 64)
- {
- //$this->errormsg = 'Nachname darf nicht laenger als 64 Zeichen sein';
- return false;
- }
- if($person['nachname'] == '' || is_null($person['nachname']))
- {
- //$this->errormsg = 'Nachname muss eingegeben werden';
- return false;
- }
-
- if(mb_strlen($person['vorname']) > 32)
- {
- //$this->errormsg = 'Vorname darf nicht laenger als 32 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['vornamen']) > 128)
- {
- //$this->errormsg = 'Vornamen darf nicht laenger als 128 Zeichen sein';
- return false;
- }
- //ToDo Gebdatum pruefen -> laut bis muss student aelter als 10 Jahre sein
- /* if (strlen($person['gebdatum) == 0 || is_null($person['gebdatum))
- {
- //$this->errormsg = "Geburtsdatum muss eingegeben werden\n";
- return false;
- } */
- if(mb_strlen($person['gebort']) > 128)
- {
- //$this->errormsg = 'Geburtsort darf nicht laenger als 128 Zeichen sein';
- return false;
- }
-
- if(mb_strlen($person['homepage']) > 256)
- {
- //$this->errormsg = 'Homepage darf nicht laenger als 256 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['svnr']) > 16)
- {
- //$this->errormsg = 'SVNR darf nicht laenger als 16 Zeichen sein';
- return false;
- }
-
- if(mb_strlen($person['matr_nr']) > 32)
- {
- //$this->errormsg = 'Matrikelnummer darf nicht laenger als 32 Zeichen sein';
- return false;
- }
-
- if($person['svnr'] != '' && mb_strlen($person['svnr']) != 16 && mb_strlen($person['svnr']) != 10)
- {
- //$this->errormsg = 'SVNR muss 10 oder 16 Zeichen lang sein';
- return false;
- }
-
- if($person['svnr'] != '' && mb_strlen($person['svnr']) == 10)
- {
- //SVNR mit Pruefziffer pruefen
- //Die 4. Stelle in der SVNR ist die Pruefziffer
- //(Summe von (gewichtung[i]*svnr[i])) modulo 11 ergibt diese Pruefziffer
- //Falls nicht, ist die SVNR ungueltig
- $gewichtung = array(3, 7, 9, 0, 5, 8, 4, 2, 1, 6);
- $erg = 0;
- //Quersumme bilden
- for($i = 0; $i < 10; $i++)
- {
- $erg += $gewichtung[$i] * $person['svnr']{$i};
- }
-
- if($person['svnr']{3} != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11
- {
- //$this->errormsg = 'SVNR ist ungueltig';
- return false;
- }
- }
-
- if($person['svnr'] != '')
- {
- //Pruefen ob bereits ein Eintrag mit dieser SVNR vorhanden ist
- $qry = "SELECT person_id FROM public.tbl_person WHERE svnr=" . $person['svnr'];
- if(db_query($qry))
- {
- if($row = db_fetch_object())
- {
- if($row->person_id != $person['person_id'])
- {
- //$this->errormsg = 'Es existiert bereits eine Person mit dieser SVNR! Daten wurden NICHT gepeichert.';
- return false;
- }
- }
- }
- }
-
- if(mb_strlen($person['ersatzkennzeichen']) > 10)
- {
- //$this->errormsg = 'Ersatzkennzeichen darf nicht laenger als 10 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['familienstand']) > 1)
- {
- //$this->errormsg = 'Familienstand ist ungueltig';
- return false;
- }
- if($person['anzahlkinder'] != '' && !is_numeric($person['anzahlkinder']))
- {
- //$this->errormsg = 'Anzahl der Kinder ist ungueltig';
- return false;
- }
- if($person['aktiv'] != "t" && $person['aktiv'] != "f")
- {
- //$this->errormsg = 'Aktiv ist ungueltig';
- return false;
- }
- if(!isset($person['person_id']) && mb_strlen($person['insertvon']) > 32)
- {
- //$this->errormsg = 'Insertvon darf nicht laenger als 32 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['updatevon']) > 32)
- {
- //$this->errormsg = 'Updatevon darf nicht laenger als 32 Zeichen sein';
- return false;
- }
- /*if($person['ext_id'] != '' && !is_numeric($person['ext_id']))
- {
- //$this->errormsg = 'Ext_ID ist keine gueltige Zahl';
- return false;
- }*/
- if(mb_strlen($person['geschlecht']) > 1)
- {
- //$this->errormsg = 'Geschlecht darf nicht laenger als 1 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['geburtsnation']) > 3)
- {
- //$this->errormsg = 'Geburtsnation darf nicht laenger als 3 Zeichen sein';
- return false;
- }
- if(mb_strlen($person['staatsbuergerschaft']) > 3)
- {
- //$this->errormsg = 'Staatsbuergerschaft darf nicht laenger als 3 Zeichen sein';
- return false;
- }
- if($person['geschlecht'] != 'm' && $person['geschlecht'] != 'w' && $person['geschlecht'] != 'u')
- {
- //$this->errormsg = 'Geschlecht muss w, m oder u sein!';
- return false;
- }
-
- //Pruefen ob das Geburtsdatum mit der SVNR uebereinstimmt.
- if($person['svnr'] != '' && $person['gebdatum'] != '')
- {
- if(mb_ereg("([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})", $person['gebdatum'], $regs))
- {
- //$day = sprintf('%02s',$regs[1]);
- //$month = sprintf('%02s',$regs[2]);
- //$year = mb_substr($regs[3],2,2);
- }
- elseif(mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})", $person['gebdatum'], $regs))
- {
- //$day = sprintf('%02s',$regs[3]);
- //$month = sprintf('%02s',$regs[2]);
- //$year = mb_substr($regs[1],2,2);
- }
- else
- {
- //$this->errormsg = 'Format des Geburtsdatums ist ungueltig';
- return false;
- }
-
- /* das muss nicht immer so sein
- $day_svnr = mb_substr($person['svnr, 4, 2);
- $month_svnr = mb_substr($person['svnr, 6, 2);
- $year_svnr = mb_substr($person['svnr, 8, 2);
-
- if ($day_svnr!=$day || $month_svnr!=$month || $year_svnr!=$year)
- {
- //$this->errormsg = 'SVNR und Geburtsdatum passen nicht zusammen';
- return false;
- }
- */
- }
-
- return true;
- }
-}
\ No newline at end of file
+load->model('person/person_model', 'PersonModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PersonModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPerson()
+ {
+ $personID = $this->get('person_id');
+ $code = $this->get('code');
+ $email = $this->get('email');
+
+ if (isset($code) || isset($email) || isset($personID))
+ {
+ if (isset($code) && isset($email))
+ {
+ $result = $this->PersonModel->addJoin('public.tbl_kontakt', 'person_id');
+ if ($result->error == EXIT_SUCCESS)
+ {
+ $result = $this->PersonModel->loadWhere(array('zugangscode' => $code, 'kontakt' => $email));
+ }
+ }
+ elseif (isset($code))
+ {
+ $result = $this->PersonModel->loadWhere(array('zugangscode' => $code));
+ }
+ else
+ {
+ $result = $this->PersonModel->load($personID);
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPerson()
+ {
+ $person = $this->_parseData($this->post());
+
+ if($this->_validate($this->post()))
+ {
+ if(isset($person['person_id']) && !(is_null($person["person_id"])) && ($person["person_id"] != ""))
+ {
+ $result = $this->PersonModel->update($person['person_id'], $person);
+ }
+ else
+ {
+ $result = $this->PersonModel->insert($person);
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function getCheckBewerbung()
+ {
+ $email = $this->get('email');
+ $studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
+
+ if (isset($email))
+ {
+ $result = $this->PersonModel->checkBewerbung($email, $studiensemester_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($person = NULL)
+ {
+ if (!isset($person))
+ {
+ return false;
+ }
+
+ //TODO
+ return true;
+
+ $person['nachname'] = trim($person['nachname']);
+ $person['vorname'] = trim($person['vorname']);
+ $person['vornamen'] = trim($person['vornamen']);
+ $person['anrede'] = trim($person['anrede']);
+ $person['titelpost'] = trim($person['titelpost']);
+ $person['titelpre'] = trim($person['titelpre']);
+
+ if (mb_strlen($person['sprache']) > 16)
+ {
+ //$this->errormsg = 'Sprache darf nicht laenger als 16 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['anrede']) > 16)
+ {
+ //$this->errormsg = 'Anrede darf nicht laenger als 16 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['titelpost']) > 32)
+ {
+ //$this->errormsg = 'Titelpost darf nicht laenger als 32 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['titelpre']) > 64)
+ {
+ //$this->errormsg = 'Titelpre darf nicht laenger als 64 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['nachname']) > 64)
+ {
+ //$this->errormsg = 'Nachname darf nicht laenger als 64 Zeichen sein';
+ return false;
+ }
+ if ($person['nachname'] == '' || is_null($person['nachname']))
+ {
+ //$this->errormsg = 'Nachname muss eingegeben werden';
+ return false;
+ }
+
+ if (mb_strlen($person['vorname']) > 32)
+ {
+ //$this->errormsg = 'Vorname darf nicht laenger als 32 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['vornamen']) > 128)
+ {
+ //$this->errormsg = 'Vornamen darf nicht laenger als 128 Zeichen sein';
+ return false;
+ }
+ //ToDo Gebdatum pruefen -> laut bis muss student aelter als 10 Jahre sein
+ /* if (strlen($person['gebdatum) == 0 || is_null($person['gebdatum))
+ {
+ //$this->errormsg = "Geburtsdatum muss eingegeben werden\n";
+ return false;
+ } */
+ if (mb_strlen($person['gebort']) > 128)
+ {
+ //$this->errormsg = 'Geburtsort darf nicht laenger als 128 Zeichen sein';
+ return false;
+ }
+
+ if (mb_strlen($person['homepage']) > 256)
+ {
+ //$this->errormsg = 'Homepage darf nicht laenger als 256 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['svnr']) > 16)
+ {
+ //$this->errormsg = 'SVNR darf nicht laenger als 16 Zeichen sein';
+ return false;
+ }
+
+ if (mb_strlen($person['matr_nr']) > 32)
+ {
+ //$this->errormsg = 'Matrikelnummer darf nicht laenger als 32 Zeichen sein';
+ return false;
+ }
+
+ if ($person['svnr'] != '' && mb_strlen($person['svnr']) != 16 && mb_strlen($person['svnr']) != 10)
+ {
+ //$this->errormsg = 'SVNR muss 10 oder 16 Zeichen lang sein';
+ return false;
+ }
+
+ if ($person['svnr'] != '' && mb_strlen($person['svnr']) == 10)
+ {
+ //SVNR mit Pruefziffer pruefen
+ //Die 4. Stelle in der SVNR ist die Pruefziffer
+ //(Summe von (gewichtung[i]*svnr[i])) modulo 11 ergibt diese Pruefziffer
+ //Falls nicht, ist die SVNR ungueltig
+ $gewichtung = array(3, 7, 9, 0, 5, 8, 4, 2, 1, 6);
+ $erg = 0;
+ //Quersumme bilden
+ for ($i = 0; $i < 10; $i++)
+ {
+ $erg += $gewichtung[$i] * $person['svnr']{$i};
+ }
+
+ if ($person['svnr']{3} != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11
+ {
+ //$this->errormsg = 'SVNR ist ungueltig';
+ return false;
+ }
+ }
+
+ if ($person['svnr'] != '')
+ {
+ //Pruefen ob bereits ein Eintrag mit dieser SVNR vorhanden ist
+ $qry = "SELECT person_id FROM public.tbl_person WHERE svnr=" . $person['svnr'];
+ if (db_query($qry))
+ {
+ if ($row = db_fetch_object())
+ {
+ if ($row->person_id != $person['person_id'])
+ {
+ //$this->errormsg = 'Es existiert bereits eine Person mit dieser SVNR! Daten wurden NICHT gepeichert.';
+ return false;
+ }
+ }
+ }
+ }
+
+ if (mb_strlen($person['ersatzkennzeichen']) > 10)
+ {
+ //$this->errormsg = 'Ersatzkennzeichen darf nicht laenger als 10 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['familienstand']) > 1)
+ {
+ //$this->errormsg = 'Familienstand ist ungueltig';
+ return false;
+ }
+ if ($person['anzahlkinder'] != '' && !is_numeric($person['anzahlkinder']))
+ {
+ //$this->errormsg = 'Anzahl der Kinder ist ungueltig';
+ return false;
+ }
+ if ($person['aktiv'] != "t" && $person['aktiv'] != "f")
+ {
+ //$this->errormsg = 'Aktiv ist ungueltig';
+ return false;
+ }
+ if (!isset($person['person_id']) && mb_strlen($person['insertvon']) > 32)
+ {
+ //$this->errormsg = 'Insertvon darf nicht laenger als 32 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['updatevon']) > 32)
+ {
+ //$this->errormsg = 'Updatevon darf nicht laenger als 32 Zeichen sein';
+ return false;
+ }
+ /*if ($person['ext_id'] != '' && !is_numeric($person['ext_id']))
+ {
+ //$this->errormsg = 'Ext_ID ist keine gueltige Zahl';
+ return false;
+ }*/
+ if (mb_strlen($person['geschlecht']) > 1)
+ {
+ //$this->errormsg = 'Geschlecht darf nicht laenger als 1 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['geburtsnation']) > 3)
+ {
+ //$this->errormsg = 'Geburtsnation darf nicht laenger als 3 Zeichen sein';
+ return false;
+ }
+ if (mb_strlen($person['staatsbuergerschaft']) > 3)
+ {
+ //$this->errormsg = 'Staatsbuergerschaft darf nicht laenger als 3 Zeichen sein';
+ return false;
+ }
+ if ($person['geschlecht'] != 'm' && $person['geschlecht'] != 'w' && $person['geschlecht'] != 'u')
+ {
+ //$this->errormsg = 'Geschlecht muss w, m oder u sein!';
+ return false;
+ }
+
+ //Pruefen ob das Geburtsdatum mit der SVNR uebereinstimmt.
+ if ($person['svnr'] != '' && $person['gebdatum'] != '')
+ {
+ if (mb_ereg("([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})", $person['gebdatum'], $regs))
+ {
+ //$day = sprintf('%02s',$regs[1]);
+ //$month = sprintf('%02s',$regs[2]);
+ //$year = mb_substr($regs[3],2,2);
+ }
+ elseif (mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})", $person['gebdatum'], $regs))
+ {
+ //$day = sprintf('%02s',$regs[3]);
+ //$month = sprintf('%02s',$regs[2]);
+ //$year = mb_substr($regs[1],2,2);
+ }
+ else
+ {
+ //$this->errormsg = 'Format des Geburtsdatums ist ungueltig';
+ return false;
+ }
+
+ /* das muss nicht immer so sein
+ $day_svnr = mb_substr($person['svnr, 4, 2);
+ $month_svnr = mb_substr($person['svnr, 6, 2);
+ $year_svnr = mb_substr($person['svnr, 8, 2);
+
+ if ($day_svnr!=$day || $month_svnr!=$month || $year_svnr!=$year)
+ {
+ //$this->errormsg = 'SVNR und Geburtsdatum passen nicht zusammen';
+ return false;
+ }
+ */
+ }
+
+ return true;
+ }
+}
diff --git a/application/controllers/api/v1/project/Aktivitaet.php b/application/controllers/api/v1/project/Aktivitaet.php
new file mode 100644
index 000000000..685c2c212
--- /dev/null
+++ b/application/controllers/api/v1/project/Aktivitaet.php
@@ -0,0 +1,78 @@
+load->model('project/aktivitaet_model', 'AktivitaetModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AktivitaetModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAktivitaet()
+ {
+ $aktivitaet_kurzbz = $this->get('aktivitaet_kurzbz');
+
+ if (isset($aktivitaet_kurzbz))
+ {
+ $result = $this->AktivitaetModel->load($aktivitaet_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAktivitaet()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['aktivitaet_kurzbz']))
+ {
+ $result = $this->AktivitaetModel->update($this->post()['aktivitaet_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->AktivitaetModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($aktivitaet = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/project/Aufwandstyp.php b/application/controllers/api/v1/project/Aufwandstyp.php
new file mode 100644
index 000000000..02cb6d5ba
--- /dev/null
+++ b/application/controllers/api/v1/project/Aufwandstyp.php
@@ -0,0 +1,78 @@
+load->model('project/aufwandstyp_model', 'AufwandstypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AufwandstypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAufwandstyp()
+ {
+ $aufwandstyp_kurzbz = $this->get('aufwandstyp_kurzbz');
+
+ if (isset($aufwandstyp_kurzbz))
+ {
+ $result = $this->AufwandstypModel->load($aufwandstyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAufwandstyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['aufwandstyp_kurzbz']))
+ {
+ $result = $this->AufwandstypModel->update($this->post()['aufwandstyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->AufwandstypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($aufwandstyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/project/Projekt.php b/application/controllers/api/v1/project/Projekt.php
new file mode 100644
index 000000000..244b170d0
--- /dev/null
+++ b/application/controllers/api/v1/project/Projekt.php
@@ -0,0 +1,78 @@
+load->model('project/projekt_model', 'ProjektModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ProjektModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getProjekt()
+ {
+ $projekt_kurzbz = $this->get('projekt_kurzbz');
+
+ if (isset($projekt_kurzbz))
+ {
+ $result = $this->ProjektModel->load($projekt_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postProjekt()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['projekt_kurzbz']))
+ {
+ $result = $this->ProjektModel->update($this->post()['projekt_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->ProjektModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($projekt = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/project/Projekt_ressource.php b/application/controllers/api/v1/project/Projekt_ressource.php
new file mode 100644
index 000000000..688546dfe
--- /dev/null
+++ b/application/controllers/api/v1/project/Projekt_ressource.php
@@ -0,0 +1,78 @@
+load->model('project/projekt_ressource_model', 'Projekt_ressourceModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->Projekt_ressourceModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getProjekt_ressource()
+ {
+ $projekt_ressourceID = $this->get('projekt_ressource_id');
+
+ if (isset($projekt_ressourceID))
+ {
+ $result = $this->Projekt_ressourceModel->load($projekt_ressourceID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postProjekt_ressource()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['projekt_ressource_id']))
+ {
+ $result = $this->Projekt_ressourceModel->update($this->post()['projekt_ressource_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->Projekt_ressourceModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($projekt_ressource = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/project/Projektphase.php b/application/controllers/api/v1/project/Projektphase.php
new file mode 100644
index 000000000..04007e0d4
--- /dev/null
+++ b/application/controllers/api/v1/project/Projektphase.php
@@ -0,0 +1,78 @@
+load->model('project/projektphase_model', 'ProjektphaseModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ProjektphaseModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getProjektphase()
+ {
+ $projektphaseID = $this->get('projektphase_id');
+
+ if (isset($projektphaseID))
+ {
+ $result = $this->ProjektphaseModel->load($projektphaseID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postProjektphase()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['projektphase_id']))
+ {
+ $result = $this->ProjektphaseModel->update($this->post()['projektphase_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ProjektphaseModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($projektphase = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/project/Projekttask.php b/application/controllers/api/v1/project/Projekttask.php
new file mode 100644
index 000000000..30e78da3e
--- /dev/null
+++ b/application/controllers/api/v1/project/Projekttask.php
@@ -0,0 +1,78 @@
+load->model('project/projekttask_model', 'ProjekttaskModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ProjekttaskModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getProjekttask()
+ {
+ $projekttaskID = $this->get('projekttask_id');
+
+ if (isset($projekttaskID))
+ {
+ $result = $this->ProjekttaskModel->load($projekttaskID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postProjekttask()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['projekttask_id']))
+ {
+ $result = $this->ProjekttaskModel->update($this->post()['projekttask_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ProjekttaskModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($projekttask = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/project/Ressource.php b/application/controllers/api/v1/project/Ressource.php
new file mode 100644
index 000000000..00e923435
--- /dev/null
+++ b/application/controllers/api/v1/project/Ressource.php
@@ -0,0 +1,78 @@
+load->model('project/ressource_model', 'RessourceModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->RessourceModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getRessource()
+ {
+ $ressourceID = $this->get('ressource_id');
+
+ if (isset($ressourceID))
+ {
+ $result = $this->RessourceModel->load($ressourceID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postRessource()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['ressource_id']))
+ {
+ $result = $this->RessourceModel->update($this->post()['ressource_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->RessourceModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($ressource = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/project/Scrumsprint.php b/application/controllers/api/v1/project/Scrumsprint.php
new file mode 100644
index 000000000..4d64782fb
--- /dev/null
+++ b/application/controllers/api/v1/project/Scrumsprint.php
@@ -0,0 +1,78 @@
+load->model('project/scrumsprint_model', 'ScrumsprintModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ScrumsprintModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getScrumsprint()
+ {
+ $scrumsprintID = $this->get('scrumsprint_id');
+
+ if (isset($scrumsprintID))
+ {
+ $result = $this->ScrumsprintModel->load($scrumsprintID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postScrumsprint()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['scrumsprint_id']))
+ {
+ $result = $this->ScrumsprintModel->update($this->post()['scrumsprint_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ScrumsprintModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($scrumsprint = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/project/Scrumteam.php b/application/controllers/api/v1/project/Scrumteam.php
new file mode 100644
index 000000000..440e66165
--- /dev/null
+++ b/application/controllers/api/v1/project/Scrumteam.php
@@ -0,0 +1,78 @@
+load->model('project/scrumteam_model', 'ScrumteamModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ScrumteamModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getScrumteam()
+ {
+ $scrumteam_kurzbz = $this->get('scrumteam_kurzbz');
+
+ if (isset($scrumteam_kurzbz))
+ {
+ $result = $this->ScrumteamModel->load($scrumteam_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postScrumteam()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['scrumteam_kurzbz']))
+ {
+ $result = $this->ScrumteamModel->update($this->post()['scrumteam_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->ScrumteamModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($scrumteam = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Betriebsmittel.php b/application/controllers/api/v1/ressource/Betriebsmittel.php
new file mode 100644
index 000000000..a827a3265
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Betriebsmittel.php
@@ -0,0 +1,78 @@
+load->model('ressource/betriebsmittel_model', 'BetriebsmittelModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BetriebsmittelModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBetriebsmittel()
+ {
+ $betriebsmittelID = $this->get('betriebsmittel_id');
+
+ if (isset($betriebsmittelID))
+ {
+ $result = $this->BetriebsmittelModel->load($betriebsmittelID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBetriebsmittel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['betriebsmittel_id']))
+ {
+ $result = $this->BetriebsmittelModel->update($this->post()['betriebsmittel_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BetriebsmittelModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($betriebsmittel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Betriebsmittelperson2.php b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php
new file mode 100644
index 000000000..14baca485
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php
@@ -0,0 +1,78 @@
+load->model('ressource/betriebsmittelperson_model', 'BetriebsmittelpersonModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BetriebsmittelpersonModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBetriebsmittelperson()
+ {
+ $betriebsmittelpersonID = $this->get('betriebsmittelperson_id');
+
+ if (isset($betriebsmittelpersonID))
+ {
+ $result = $this->BetriebsmittelpersonModel->load($betriebsmittelpersonID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBetriebsmittelperson()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['betriebsmittelperson_id']))
+ {
+ $result = $this->BetriebsmittelpersonModel->update($this->post()['betriebsmittelperson_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BetriebsmittelpersonModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($betriebsmittelperson = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Betriebsmittelstatus.php b/application/controllers/api/v1/ressource/Betriebsmittelstatus.php
new file mode 100644
index 000000000..46d00c82c
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Betriebsmittelstatus.php
@@ -0,0 +1,78 @@
+load->model('ressource/betriebsmittelstatus_model', 'BetriebsmittelstatusModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BetriebsmittelstatusModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBetriebsmittelstatus()
+ {
+ $betriebsmittelstatus_kurzbz = $this->get('betriebsmittelstatus_kurzbz');
+
+ if (isset($betriebsmittelstatus_kurzbz))
+ {
+ $result = $this->BetriebsmittelstatusModel->load($betriebsmittelstatus_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBetriebsmittelstatus()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['betriebsmittelstatus_kurzbz']))
+ {
+ $result = $this->BetriebsmittelstatusModel->update($this->post()['betriebsmittelstatus_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->BetriebsmittelstatusModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($betriebsmittelstatus = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Betriebsmitteltyp.php b/application/controllers/api/v1/ressource/Betriebsmitteltyp.php
new file mode 100644
index 000000000..e23ed16d5
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Betriebsmitteltyp.php
@@ -0,0 +1,78 @@
+load->model('ressource/betriebsmitteltyp_model', 'BetriebsmitteltypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BetriebsmitteltypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBetriebsmitteltyp()
+ {
+ $betriebsmitteltyp = $this->get('betriebsmitteltyp');
+
+ if (isset($betriebsmitteltyp))
+ {
+ $result = $this->BetriebsmitteltypModel->load($betriebsmitteltyp);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBetriebsmitteltyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['betriebsmitteltyp']))
+ {
+ $result = $this->BetriebsmitteltypModel->update($this->post()['betriebsmitteltyp'], $this->post());
+ }
+ else
+ {
+ $result = $this->BetriebsmitteltypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($betriebsmitteltyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Coodle.php b/application/controllers/api/v1/ressource/Coodle.php
new file mode 100644
index 000000000..353828465
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Coodle.php
@@ -0,0 +1,78 @@
+load->model('ressource/coodle_model', 'CoodleModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->CoodleModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getCoodle()
+ {
+ $coodleID = $this->get('coodle_id');
+
+ if (isset($coodleID))
+ {
+ $result = $this->CoodleModel->load($coodleID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postCoodle()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['coodle_id']))
+ {
+ $result = $this->CoodleModel->update($this->post()['coodle_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->CoodleModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($coodle = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Erreichbarkeit.php b/application/controllers/api/v1/ressource/Erreichbarkeit.php
new file mode 100644
index 000000000..5a142757e
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Erreichbarkeit.php
@@ -0,0 +1,78 @@
+load->model('ressource/erreichbarkeit_model', 'ErreichbarkeitModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ErreichbarkeitModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getErreichbarkeit()
+ {
+ $erreichbarkeit_kurzbz = $this->get('erreichbarkeit_kurzbz');
+
+ if (isset($erreichbarkeit_kurzbz))
+ {
+ $result = $this->ErreichbarkeitModel->load($erreichbarkeit_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postErreichbarkeit()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['erreichbarkeit_kurzbz']))
+ {
+ $result = $this->ErreichbarkeitModel->update($this->post()['erreichbarkeit_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->ErreichbarkeitModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($erreichbarkeit = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Firma.php b/application/controllers/api/v1/ressource/Firma.php
new file mode 100644
index 000000000..64c33b344
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Firma.php
@@ -0,0 +1,78 @@
+load->model('ressource/firma_model', 'FirmaModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FirmaModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFirma()
+ {
+ $firmaID = $this->get('firma_id');
+
+ if (isset($firmaID))
+ {
+ $result = $this->FirmaModel->load($firmaID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFirma()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['firma_id']))
+ {
+ $result = $this->FirmaModel->update($this->post()['firma_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->FirmaModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($firma = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Firmatag.php b/application/controllers/api/v1/ressource/Firmatag.php
new file mode 100644
index 000000000..3fd939652
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Firmatag.php
@@ -0,0 +1,79 @@
+load->model('ressource/firmatag_model', 'FirmatagModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FirmatagModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFirmatag()
+ {
+ $tag = $this->get('tag');
+ $firma_id = $this->get('firma_id');
+
+ if (isset($tag) && isset($firma_id))
+ {
+ $result = $this->FirmatagModel->load(array($tag, $firma_id));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFirmatag()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['tag']) && isset($this->post()['firma_id']))
+ {
+ $result = $this->FirmatagModel->update(array($this->post()['tag'], $this->post()['firma_id']), $this->post());
+ }
+ else
+ {
+ $result = $this->FirmatagModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($firmatag = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Firmentyp.php b/application/controllers/api/v1/ressource/Firmentyp.php
new file mode 100644
index 000000000..3261ccb39
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Firmentyp.php
@@ -0,0 +1,78 @@
+load->model('ressource/firmentyp_model', 'FirmentypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FirmentypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFirmentyp()
+ {
+ $firmentyp_kurzbz = $this->get('firmentyp_kurzbz');
+
+ if (isset($firmentyp_kurzbz))
+ {
+ $result = $this->FirmentypModel->load($firmentyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFirmentyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['firmentyp_kurzbz']))
+ {
+ $result = $this->FirmentypModel->update($this->post()['firmentyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->FirmentypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($firmentyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Funktion.php b/application/controllers/api/v1/ressource/Funktion.php
new file mode 100644
index 000000000..3e33c3c20
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Funktion.php
@@ -0,0 +1,78 @@
+load->model('ressource/funktion_model', 'FunktionModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FunktionModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFunktion()
+ {
+ $funktion_kurzbz = $this->get('funktion_kurzbz');
+
+ if (isset($funktion_kurzbz))
+ {
+ $result = $this->FunktionModel->load($funktion_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFunktion()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['funktion_kurzbz']))
+ {
+ $result = $this->FunktionModel->update($this->post()['funktion_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->FunktionModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($funktion = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Lehrmittel.php b/application/controllers/api/v1/ressource/Lehrmittel.php
new file mode 100644
index 000000000..d874d53e5
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Lehrmittel.php
@@ -0,0 +1,78 @@
+load->model('ressource/lehrmittel_model', 'LehrmittelModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LehrmittelModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLehrmittel()
+ {
+ $lehrmittel_kurzbz = $this->get('lehrmittel_kurzbz');
+
+ if (isset($lehrmittel_kurzbz))
+ {
+ $result = $this->LehrmittelModel->load($lehrmittel_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLehrmittel()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['lehrmittel_kurzbz']))
+ {
+ $result = $this->LehrmittelModel->update($this->post()['lehrmittel_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->LehrmittelModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($lehrmittel = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Mitarbeiter.php b/application/controllers/api/v1/ressource/Mitarbeiter.php
new file mode 100644
index 000000000..8578ab12d
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Mitarbeiter.php
@@ -0,0 +1,78 @@
+load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->MitarbeiterModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getMitarbeiter()
+ {
+ $mitarbeiter_uid = $this->get('mitarbeiter_uid');
+
+ if (isset($mitarbeiter_uid))
+ {
+ $result = $this->MitarbeiterModel->load($mitarbeiter_uid);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postMitarbeiter()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['mitarbeiter_uid']))
+ {
+ $result = $this->MitarbeiterModel->update($this->post()['mitarbeiter_uid'], $this->post());
+ }
+ else
+ {
+ $result = $this->MitarbeiterModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($mitarbeiter = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Ort.php b/application/controllers/api/v1/ressource/Ort.php
new file mode 100644
index 000000000..022db2281
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Ort.php
@@ -0,0 +1,78 @@
+load->model('ressource/ort_model', 'OrtModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->OrtModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getOrt()
+ {
+ $ort_kurzbz = $this->get('ort_kurzbz');
+
+ if (isset($ort_kurzbz))
+ {
+ $result = $this->OrtModel->load($ort_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postOrt()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['ort_kurzbz']))
+ {
+ $result = $this->OrtModel->update($this->post()['ort_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->OrtModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($ort = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Ortraumtyp.php b/application/controllers/api/v1/ressource/Ortraumtyp.php
new file mode 100644
index 000000000..9d4cbd2db
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Ortraumtyp.php
@@ -0,0 +1,79 @@
+load->model('ressource/ortraumtyp_model', 'OrtraumtypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->OrtraumtypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getOrtraumtyp()
+ {
+ $hierarchie = $this->get('hierarchie');
+ $ort_kurzbz = $this->get('ort_kurzbz');
+
+ if (isset($hierarchie) && isset($ort_kurzbz))
+ {
+ $result = $this->OrtraumtypModel->load(array($hierarchie, $ort_kurzbz));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postOrtraumtyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['hierarchie']) && isset($this->post()['ort_kurzbz']))
+ {
+ $result = $this->OrtraumtypModel->update(array($this->post()['hierarchie'], $this->post()['ort_kurzbz']), $this->post());
+ }
+ else
+ {
+ $result = $this->OrtraumtypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($ortraumtyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Personfunktionstandort.php b/application/controllers/api/v1/ressource/Personfunktionstandort.php
new file mode 100644
index 000000000..e4c204716
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Personfunktionstandort.php
@@ -0,0 +1,78 @@
+load->model('ressource/personfunktionstandort_model', 'PersonfunktionstandortModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PersonfunktionstandortModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPersonfunktionstandort()
+ {
+ $personfunktionstandortID = $this->get('personfunktionstandort_id');
+
+ if (isset($personfunktionstandortID))
+ {
+ $result = $this->PersonfunktionstandortModel->load($personfunktionstandortID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPersonfunktionstandort()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['personfunktionstandort_id']))
+ {
+ $result = $this->PersonfunktionstandortModel->update($this->post()['personfunktionstandort_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PersonfunktionstandortModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($personfunktionstandort = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Raumtyp.php b/application/controllers/api/v1/ressource/Raumtyp.php
new file mode 100644
index 000000000..39751089d
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Raumtyp.php
@@ -0,0 +1,78 @@
+load->model('ressource/raumtyp_model', 'RaumtypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->RaumtypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getRaumtyp()
+ {
+ $raumtyp_kurzbz = $this->get('raumtyp_kurzbz');
+
+ if (isset($raumtyp_kurzbz))
+ {
+ $result = $this->RaumtypModel->load($raumtyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postRaumtyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['raumtyp_kurzbz']))
+ {
+ $result = $this->RaumtypModel->update($this->post()['raumtyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->RaumtypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($raumtyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Reservierung.php b/application/controllers/api/v1/ressource/Reservierung.php
new file mode 100644
index 000000000..8073e7c04
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Reservierung.php
@@ -0,0 +1,78 @@
+load->model('ressource/reservierung_model', 'ReservierungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ReservierungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getReservierung()
+ {
+ $reservierungID = $this->get('reservierung_id');
+
+ if (isset($reservierungID))
+ {
+ $result = $this->ReservierungModel->load($reservierungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postReservierung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['reservierung_id']))
+ {
+ $result = $this->ReservierungModel->update($this->post()['reservierung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ReservierungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($reservierung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Resturlaub.php b/application/controllers/api/v1/ressource/Resturlaub.php
new file mode 100644
index 000000000..16e2b2753
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Resturlaub.php
@@ -0,0 +1,78 @@
+load->model('ressource/resturlaub_model', 'ResturlaubModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ResturlaubModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getResturlaub()
+ {
+ $resturlaubID = $this->get('resturlaub_id');
+
+ if (isset($resturlaubID))
+ {
+ $result = $this->ResturlaubModel->load($resturlaubID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postResturlaub()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['resturlaub_id']))
+ {
+ $result = $this->ResturlaubModel->update($this->post()['resturlaub_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ResturlaubModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($resturlaub = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Stunde.php b/application/controllers/api/v1/ressource/Stunde.php
new file mode 100644
index 000000000..5470b2fca
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Stunde.php
@@ -0,0 +1,78 @@
+load->model('ressource/stunde_model', 'StundeModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StundeModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStunde()
+ {
+ $stunde = $this->get('stunde');
+
+ if (isset($stunde))
+ {
+ $result = $this->StundeModel->load($stunde);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStunde()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['stunde']))
+ {
+ $result = $this->StundeModel->update($this->post()['stunde'], $this->post());
+ }
+ else
+ {
+ $result = $this->StundeModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($stunde = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Stundenplan.php b/application/controllers/api/v1/ressource/Stundenplan.php
new file mode 100644
index 000000000..a22c90615
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Stundenplan.php
@@ -0,0 +1,78 @@
+load->model('ressource/stundenplan_model', 'StundenplanModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StundenplanModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStundenplan()
+ {
+ $stundenplanID = $this->get('stundenplan_id');
+
+ if (isset($stundenplanID))
+ {
+ $result = $this->StundenplanModel->load($stundenplanID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStundenplan()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['stundenplan_id']))
+ {
+ $result = $this->StundenplanModel->update($this->post()['stundenplan_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->StundenplanModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($stundenplan = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Stundenplandev.php b/application/controllers/api/v1/ressource/Stundenplandev.php
new file mode 100644
index 000000000..aa6f7fce8
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Stundenplandev.php
@@ -0,0 +1,78 @@
+load->model('ressource/stundenplandev_model', 'StundenplandevModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->StundenplandevModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getStundenplandev()
+ {
+ $stundenplandevID = $this->get('stundenplandev_id');
+
+ if (isset($stundenplandevID))
+ {
+ $result = $this->StundenplandevModel->load($stundenplandevID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postStundenplandev()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['stundenplandev_id']))
+ {
+ $result = $this->StundenplandevModel->update($this->post()['stundenplandev_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->StundenplandevModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($stundenplandev = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Zeitaufzeichnung.php b/application/controllers/api/v1/ressource/Zeitaufzeichnung.php
new file mode 100644
index 000000000..275f5704a
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Zeitaufzeichnung.php
@@ -0,0 +1,78 @@
+load->model('ressource/zeitaufzeichnung_model', 'ZeitaufzeichnungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZeitaufzeichnungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZeitaufzeichnung()
+ {
+ $zeitaufzeichnungID = $this->get('zeitaufzeichnung_id');
+
+ if (isset($zeitaufzeichnungID))
+ {
+ $result = $this->ZeitaufzeichnungModel->load($zeitaufzeichnungID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZeitaufzeichnung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zeitaufzeichnung_id']))
+ {
+ $result = $this->ZeitaufzeichnungModel->update($this->post()['zeitaufzeichnung_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZeitaufzeichnungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zeitaufzeichnung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Zeitfenster.php b/application/controllers/api/v1/ressource/Zeitfenster.php
new file mode 100644
index 000000000..c1b1ac09c
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Zeitfenster.php
@@ -0,0 +1,88 @@
+load->model('ressource/zeitfenster_model', 'ZeitfensterModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZeitfensterModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZeitfenster()
+ {
+ $wochentag = $this->get('wochentag');
+ $studiengang_kz = $this->get('studiengang_kz');
+ $ort_kurzbz = $this->get('ort_kurzbz');
+ $stunde = $this->get('stunde');
+
+ if (isset($wochentag) && isset($studiengang_kz) && isset($ort_kurzbz) && isset($stunde))
+ {
+ $result = $this->ZeitfensterModel->load(array($wochentag, $studiengang_kz, $ort_kurzbz, $stunde));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZeitfenster()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['wochentag']) && isset($this->post()['studiengang_kz']) &&
+ isset($this->post()['ort_kurzbz']) && isset($this->post()['stunde']))
+ {
+ $pksArray = array($this->post()['wochentag'],
+ $this->post()['studiengang_kz'],
+ $this->post()['ort_kurzbz'],
+ $this->post()['stunde']
+ );
+
+ $result = $this->ZeitfensterModel->update($pksArray, $this->post());
+ }
+ else
+ {
+ $result = $this->ZeitfensterModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zeitfenster = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Zeitsperre.php b/application/controllers/api/v1/ressource/Zeitsperre.php
new file mode 100644
index 000000000..42eaa9a32
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Zeitsperre.php
@@ -0,0 +1,78 @@
+load->model('ressource/zeitsperre_model', 'ZeitsperreModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZeitsperreModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZeitsperre()
+ {
+ $zeitsperreID = $this->get('zeitsperre_id');
+
+ if (isset($zeitsperreID))
+ {
+ $result = $this->ZeitsperreModel->load($zeitsperreID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZeitsperre()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zeitsperre_id']))
+ {
+ $result = $this->ZeitsperreModel->update($this->post()['zeitsperre_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZeitsperreModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zeitsperre = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Zeitsperretyp.php b/application/controllers/api/v1/ressource/Zeitsperretyp.php
new file mode 100644
index 000000000..dae492cbe
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Zeitsperretyp.php
@@ -0,0 +1,78 @@
+load->model('ressource/zeitsperretyp_model', 'ZeitsperretypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZeitsperretypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZeitsperretyp()
+ {
+ $zeitsperretyp_kurzbz = $this->get('zeitsperretyp_kurzbz');
+
+ if (isset($zeitsperretyp_kurzbz))
+ {
+ $result = $this->ZeitsperretypModel->load($zeitsperretyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZeitsperretyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['zeitsperretyp_kurzbz']))
+ {
+ $result = $this->ZeitsperretypModel->update($this->post()['zeitsperretyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->ZeitsperretypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zeitsperretyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/ressource/Zeitwunsch.php b/application/controllers/api/v1/ressource/Zeitwunsch.php
new file mode 100644
index 000000000..45c541b54
--- /dev/null
+++ b/application/controllers/api/v1/ressource/Zeitwunsch.php
@@ -0,0 +1,85 @@
+load->model('ressource/zeitwunsch_model', 'ZeitwunschModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ZeitwunschModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getZeitwunsch()
+ {
+ $tag = $this->get('tag');
+ $mitarbeiter_uid = $this->get('mitarbeiter_uid');
+ $stunde = $this->get('stunde');
+
+ if (isset($tag) && isset($mitarbeiter_uid) && isset($stunde))
+ {
+ $result = $this->ZeitwunschModel->load(array($tag, $mitarbeiter_uid, $stunde));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postZeitwunsch()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['tag']) && isset($this->post()['mitarbeiter_uid']) && isset($this->post()['stunde']))
+ {
+ $pksArray = array($this->post()['tag'],
+ $this->post()['mitarbeiter_uid'],
+ $this->post()['stunde']
+ );
+
+ $result = $this->ZeitwunschModel->update($pksArray, $this->post());
+ }
+ else
+ {
+ $result = $this->ZeitwunschModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($zeitwunsch = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Appdaten.php b/application/controllers/api/v1/system/Appdaten.php
new file mode 100644
index 000000000..5d45d8512
--- /dev/null
+++ b/application/controllers/api/v1/system/Appdaten.php
@@ -0,0 +1,78 @@
+load->model('system/appdaten_model', 'AppdatenModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AppdatenModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAppdaten()
+ {
+ $appdatenID = $this->get('appdaten_id');
+
+ if (isset($appdatenID))
+ {
+ $result = $this->AppdatenModel->load($appdatenID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAppdaten()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['appdaten_id']))
+ {
+ $result = $this->AppdatenModel->update($this->post()['appdaten_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AppdatenModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($appdaten = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Benutzerrolle.php b/application/controllers/api/v1/system/Benutzerrolle.php
new file mode 100644
index 000000000..e1aa8c9b7
--- /dev/null
+++ b/application/controllers/api/v1/system/Benutzerrolle.php
@@ -0,0 +1,78 @@
+load->model('system/benutzerrolle_model', 'BenutzerrolleModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BenutzerrolleModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBenutzerrolle()
+ {
+ $benutzerrolleID = $this->get('benutzerrolle_id');
+
+ if (isset($benutzerrolleID))
+ {
+ $result = $this->BenutzerrolleModel->load($benutzerrolleID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBenutzerrolle()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['benutzerrolle_id']))
+ {
+ $result = $this->BenutzerrolleModel->update($this->post()['benutzerrolle_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->BenutzerrolleModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($benutzerrolle = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Berechtigung.php b/application/controllers/api/v1/system/Berechtigung.php
new file mode 100644
index 000000000..54d639fa3
--- /dev/null
+++ b/application/controllers/api/v1/system/Berechtigung.php
@@ -0,0 +1,78 @@
+load->model('system/berechtigung_model', 'BerechtigungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->BerechtigungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getBerechtigung()
+ {
+ $berechtigung_kurzbz = $this->get('berechtigung_kurzbz');
+
+ if (isset($berechtigung_kurzbz))
+ {
+ $result = $this->BerechtigungModel->load($berechtigung_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postBerechtigung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['berechtigung_kurzbz']))
+ {
+ $result = $this->BerechtigungModel->update($this->post()['berechtigung_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->BerechtigungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($berechtigung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Cronjob.php b/application/controllers/api/v1/system/Cronjob.php
new file mode 100644
index 000000000..82c63ed81
--- /dev/null
+++ b/application/controllers/api/v1/system/Cronjob.php
@@ -0,0 +1,78 @@
+load->model('system/cronjob_model', 'CronjobModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->CronjobModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getCronjob()
+ {
+ $cronjobID = $this->get('cronjob_id');
+
+ if (isset($cronjobID))
+ {
+ $result = $this->CronjobModel->load($cronjobID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postCronjob()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['cronjob_id']))
+ {
+ $result = $this->CronjobModel->update($this->post()['cronjob_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->CronjobModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($cronjob = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Filter.php b/application/controllers/api/v1/system/Filter.php
new file mode 100644
index 000000000..49eac7d7e
--- /dev/null
+++ b/application/controllers/api/v1/system/Filter.php
@@ -0,0 +1,78 @@
+load->model('system/filter_model', 'FilterModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FilterModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFilter()
+ {
+ $filterID = $this->get('filter_id');
+
+ if (isset($filterID))
+ {
+ $result = $this->FilterModel->load($filterID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFilter()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['filter_id']))
+ {
+ $result = $this->FilterModel->update($this->post()['filter_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->FilterModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($filter = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Log.php b/application/controllers/api/v1/system/Log.php
new file mode 100644
index 000000000..c18da58fb
--- /dev/null
+++ b/application/controllers/api/v1/system/Log.php
@@ -0,0 +1,78 @@
+load->model('system/log_model', 'LogModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->LogModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getLog()
+ {
+ $logID = $this->get('log_id');
+
+ if (isset($logID))
+ {
+ $result = $this->LogModel->load($logID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postLog()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['log_id']))
+ {
+ $result = $this->LogModel->update($this->post()['log_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->LogModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($log = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Message.php b/application/controllers/api/v1/system/Message.php
new file mode 100644
index 000000000..b7f70e187
--- /dev/null
+++ b/application/controllers/api/v1/system/Message.php
@@ -0,0 +1,78 @@
+load->model('system/message_model', 'MessageModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->MessageModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getMessage()
+ {
+ $messageID = $this->get('message_id');
+
+ if (isset($messageID))
+ {
+ $result = $this->MessageModel->load($messageID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postMessage()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['message_id']))
+ {
+ $result = $this->MessageModel->update($this->post()['message_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->MessageModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($message = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Rolle.php b/application/controllers/api/v1/system/Rolle.php
new file mode 100644
index 000000000..0523d412f
--- /dev/null
+++ b/application/controllers/api/v1/system/Rolle.php
@@ -0,0 +1,78 @@
+load->model('system/rolle_model', 'RolleModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->RolleModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getRolle()
+ {
+ $rolle_kurzbz = $this->get('rolle_kurzbz');
+
+ if (isset($rolle_kurzbz))
+ {
+ $result = $this->RolleModel->load($rolle_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postRolle()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['rolle_kurzbz']))
+ {
+ $result = $this->RolleModel->update($this->post()['rolle_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->RolleModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($rolle = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Rolleberechtigung.php b/application/controllers/api/v1/system/Rolleberechtigung.php
new file mode 100644
index 000000000..13125c536
--- /dev/null
+++ b/application/controllers/api/v1/system/Rolleberechtigung.php
@@ -0,0 +1,79 @@
+load->model('system/rolleberechtigung_model', 'RolleberechtigungModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->RolleberechtigungModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getRolleberechtigung()
+ {
+ $rolle_kurzbz = $this->get('rolle_kurzbz');
+ $berechtigung_kurzbz = $this->get('berechtigung_kurzbz');
+
+ if (isset($rolle_kurzbz) && isset($berechtigung_kurzbz))
+ {
+ $result = $this->RolleberechtigungModel->load(array($rolle_kurzbz, $berechtigung_kurzbz));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postRolleberechtigung()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['rolle_kurzbz']) && isset($this->post()['berechtigung_kurzbz']))
+ {
+ $result = $this->RolleberechtigungModel->update(array($this->post()['rolle_kurzbz'], $this->post()['berechtigung_kurzbz']), $this->post());
+ }
+ else
+ {
+ $result = $this->RolleberechtigungModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($rolleberechtigung = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Server.php b/application/controllers/api/v1/system/Server.php
new file mode 100644
index 000000000..361ce2fb0
--- /dev/null
+++ b/application/controllers/api/v1/system/Server.php
@@ -0,0 +1,78 @@
+load->model('system/server_model', 'ServerModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ServerModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getServer()
+ {
+ $server_kurzbz = $this->get('server_kurzbz');
+
+ if (isset($server_kurzbz))
+ {
+ $result = $this->ServerModel->load($server_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postServer()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['server_id']))
+ {
+ $result = $this->ServerModel->update($this->post()['server_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ServerModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($server = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Sprache2.php b/application/controllers/api/v1/system/Sprache2.php
new file mode 100644
index 000000000..342c77d9c
--- /dev/null
+++ b/application/controllers/api/v1/system/Sprache2.php
@@ -0,0 +1,78 @@
+load->model('system/sprache_model', 'SpracheModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->SpracheModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getSprache()
+ {
+ $sprache = $this->get('sprache');
+
+ if (isset($sprache))
+ {
+ $result = $this->SpracheModel->load($sprache);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postSprache()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['sprache_id']))
+ {
+ $result = $this->SpracheModel->update($this->post()['sprache_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->SpracheModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($sprache = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Tag.php b/application/controllers/api/v1/system/Tag.php
new file mode 100644
index 000000000..f7b7bb7e0
--- /dev/null
+++ b/application/controllers/api/v1/system/Tag.php
@@ -0,0 +1,78 @@
+load->model('system/tag_model', 'TagModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->TagModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getTag()
+ {
+ $tag = $this->get('tag');
+
+ if (isset($tag))
+ {
+ $result = $this->TagModel->load($tag);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postTag()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['tag']))
+ {
+ $result = $this->TagModel->update($this->post()['tag'], $this->post());
+ }
+ else
+ {
+ $result = $this->TagModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($tag = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Thread.php b/application/controllers/api/v1/system/Thread.php
new file mode 100644
index 000000000..633e779e5
--- /dev/null
+++ b/application/controllers/api/v1/system/Thread.php
@@ -0,0 +1,78 @@
+load->model('system/thread_model', 'ThreadModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->ThreadModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getThread()
+ {
+ $threadID = $this->get('thread_id');
+
+ if (isset($threadID))
+ {
+ $result = $this->ThreadModel->load($threadID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postThread()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['thread_id']))
+ {
+ $result = $this->ThreadModel->update($this->post()['thread_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->ThreadModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($thread = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Variable.php b/application/controllers/api/v1/system/Variable.php
new file mode 100644
index 000000000..7567eca20
--- /dev/null
+++ b/application/controllers/api/v1/system/Variable.php
@@ -0,0 +1,79 @@
+load->model('system/variable_model', 'VariableModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VariableModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVariable()
+ {
+ $uid = $this->get('uid');
+ $name = $this->get('name');
+
+ if (isset($uid) && isset($name))
+ {
+ $result = $this->VariableModel->load(array($uid, $name));
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVariable()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['uid']) && isset($this->post()['name']))
+ {
+ $result = $this->VariableModel->update(array($this->post()['uid'], $this->post()['name']), $this->post());
+ }
+ else
+ {
+ $result = $this->VariableModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($variable = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Vorlage.php b/application/controllers/api/v1/system/Vorlage.php
new file mode 100644
index 000000000..0de44b90e
--- /dev/null
+++ b/application/controllers/api/v1/system/Vorlage.php
@@ -0,0 +1,78 @@
+load->model('system/vorlage_model', 'VorlageModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VorlageModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVorlage()
+ {
+ $vorlage_kurzbz = $this->get('vorlage_kurzbz');
+
+ if (isset($vorlage_kurzbz))
+ {
+ $result = $this->VorlageModel->load($vorlage_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVorlage()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['vorlage_kurzbz']))
+ {
+ $result = $this->VorlageModel->update($this->post()['vorlage_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->VorlageModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($vorlage = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Vorlagestudiengang.php b/application/controllers/api/v1/system/Vorlagestudiengang.php
new file mode 100644
index 000000000..4070dd819
--- /dev/null
+++ b/application/controllers/api/v1/system/Vorlagestudiengang.php
@@ -0,0 +1,78 @@
+load->model('system/vorlagestudiengang_model', 'VorlagestudiengangModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VorlagestudiengangModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVorlagestudiengang()
+ {
+ $vorlagestudiengangID = $this->get('vorlagestudiengang_id');
+
+ if (isset($vorlagestudiengangID))
+ {
+ $result = $this->VorlagestudiengangModel->load($vorlagestudiengangID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVorlagestudiengang()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['vorlagestudiengang_id']))
+ {
+ $result = $this->VorlagestudiengangModel->update($this->post()['vorlagestudiengang_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->VorlagestudiengangModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($vorlagestudiengang = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Webservicelog.php b/application/controllers/api/v1/system/Webservicelog.php
new file mode 100644
index 000000000..3bdf38517
--- /dev/null
+++ b/application/controllers/api/v1/system/Webservicelog.php
@@ -0,0 +1,78 @@
+load->model('system/webservicelog_model', 'WebservicelogModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->WebservicelogModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getWebservicelog()
+ {
+ $webservicelogID = $this->get('webservicelog_id');
+
+ if (isset($webservicelogID))
+ {
+ $result = $this->WebservicelogModel->load($webservicelogID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postWebservicelog()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['webservicelog_id']))
+ {
+ $result = $this->WebservicelogModel->update($this->post()['webservicelog_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->WebservicelogModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($webservicelog = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Webservicerecht.php b/application/controllers/api/v1/system/Webservicerecht.php
new file mode 100644
index 000000000..459f3d56a
--- /dev/null
+++ b/application/controllers/api/v1/system/Webservicerecht.php
@@ -0,0 +1,78 @@
+load->model('system/webservicerecht_model', 'WebservicerechtModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->WebservicerechtModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getWebservicerecht()
+ {
+ $webservicerechtID = $this->get('webservicerecht_id');
+
+ if (isset($webservicerechtID))
+ {
+ $result = $this->WebservicerechtModel->load($webservicerechtID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postWebservicerecht()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['webservicerecht_id']))
+ {
+ $result = $this->WebservicerechtModel->update($this->post()['webservicerecht_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->WebservicerechtModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($webservicerecht = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/Webservicetyp.php b/application/controllers/api/v1/system/Webservicetyp.php
new file mode 100644
index 000000000..e29a34d21
--- /dev/null
+++ b/application/controllers/api/v1/system/Webservicetyp.php
@@ -0,0 +1,78 @@
+load->model('system/webservicetyp_model', 'WebservicetypModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->WebservicetypModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getWebservicetyp()
+ {
+ $webservicetyp_kurzbz = $this->get('webservicetyp_kurzbz');
+
+ if (isset($webservicetyp_kurzbz))
+ {
+ $result = $this->WebservicetypModel->load($webservicetyp_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postWebservicetyp()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['webservicetyp_kurzbz']))
+ {
+ $result = $this->WebservicetypModel->update($this->post()['webservicetyp_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->WebservicetypModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($webservicetyp = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/system/message_old.php b/application/controllers/api/v1/system/message_old.php
new file mode 100644
index 000000000..e10b6014c
--- /dev/null
+++ b/application/controllers/api/v1/system/message_old.php
@@ -0,0 +1,78 @@
+load->model('system/message_old_model', 'message_oldModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->message_oldModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getmessage_old()
+ {
+ $message_oldID = $this->get('message_old_id');
+
+ if (isset($message_oldID))
+ {
+ $result = $this->message_oldModel->load($message_oldID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postmessage_old()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['message_old_id']))
+ {
+ $result = $this->message_oldModel->update($this->post()['message_old_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->message_oldModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($message_old = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/testtool/Ablauf.php b/application/controllers/api/v1/testtool/Ablauf.php
new file mode 100644
index 000000000..d3b0c2d1b
--- /dev/null
+++ b/application/controllers/api/v1/testtool/Ablauf.php
@@ -0,0 +1,78 @@
+load->model('testtool/ablauf_model', 'AblaufModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AblaufModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAblauf()
+ {
+ $ablaufID = $this->get('ablauf_id');
+
+ if (isset($ablaufID))
+ {
+ $result = $this->AblaufModel->load($ablaufID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAblauf()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['ablauf_id']))
+ {
+ $result = $this->AblaufModel->update($this->post()['ablauf_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AblaufModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($ablauf = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/testtool/Antwort.php b/application/controllers/api/v1/testtool/Antwort.php
new file mode 100644
index 000000000..127725c96
--- /dev/null
+++ b/application/controllers/api/v1/testtool/Antwort.php
@@ -0,0 +1,78 @@
+load->model('testtool/antwort_model', 'AntwortModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->AntwortModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getAntwort()
+ {
+ $antwortID = $this->get('antwort_id');
+
+ if (isset($antwortID))
+ {
+ $result = $this->AntwortModel->load($antwortID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postAntwort()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['antwort_id']))
+ {
+ $result = $this->AntwortModel->update($this->post()['antwort_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->AntwortModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($antwort = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/testtool/Frage.php b/application/controllers/api/v1/testtool/Frage.php
new file mode 100644
index 000000000..01d506fcc
--- /dev/null
+++ b/application/controllers/api/v1/testtool/Frage.php
@@ -0,0 +1,78 @@
+load->model('testtool/frage_model', 'FrageModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->FrageModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getFrage()
+ {
+ $frageID = $this->get('frage_id');
+
+ if (isset($frageID))
+ {
+ $result = $this->FrageModel->load($frageID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postFrage()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['frage_id']))
+ {
+ $result = $this->FrageModel->update($this->post()['frage_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->FrageModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($frage = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/testtool/Gebiet.php b/application/controllers/api/v1/testtool/Gebiet.php
new file mode 100644
index 000000000..51d671523
--- /dev/null
+++ b/application/controllers/api/v1/testtool/Gebiet.php
@@ -0,0 +1,78 @@
+load->model('testtool/gebiet_model', 'GebietModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->GebietModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getGebiet()
+ {
+ $gebietID = $this->get('gebiet_id');
+
+ if (isset($gebietID))
+ {
+ $result = $this->GebietModel->load($gebietID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postGebiet()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['gebiet_id']))
+ {
+ $result = $this->GebietModel->update($this->post()['gebiet_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->GebietModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($gebiet = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/testtool/Kategorie.php b/application/controllers/api/v1/testtool/Kategorie.php
new file mode 100644
index 000000000..ba835df85
--- /dev/null
+++ b/application/controllers/api/v1/testtool/Kategorie.php
@@ -0,0 +1,78 @@
+load->model('testtool/kategorie_model', 'KategorieModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->KategorieModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getKategorie()
+ {
+ $kategorie_kurzbz = $this->get('kategorie_kurzbz');
+
+ if (isset($kategorie_kurzbz))
+ {
+ $result = $this->KategorieModel->load($kategorie_kurzbz);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postKategorie()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['kategorie_kurzbz']))
+ {
+ $result = $this->KategorieModel->update($this->post()['kategorie_kurzbz'], $this->post());
+ }
+ else
+ {
+ $result = $this->KategorieModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($kategorie = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/testtool/Kriterien.php b/application/controllers/api/v1/testtool/Kriterien.php
new file mode 100644
index 000000000..850b973a4
--- /dev/null
+++ b/application/controllers/api/v1/testtool/Kriterien.php
@@ -0,0 +1,78 @@
+load->model('testtool/kriterien_model', 'KriterienModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->KriterienModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getKriterien()
+ {
+ $kriterienID = $this->get('kriterien_id');
+
+ if (isset($kriterienID))
+ {
+ $result = $this->KriterienModel->load($kriterienID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postKriterien()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['kriterien_id']))
+ {
+ $result = $this->KriterienModel->update($this->post()['kriterien_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->KriterienModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($kriterien = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/testtool/Pruefling.php b/application/controllers/api/v1/testtool/Pruefling.php
new file mode 100644
index 000000000..1d9144cdf
--- /dev/null
+++ b/application/controllers/api/v1/testtool/Pruefling.php
@@ -0,0 +1,78 @@
+load->model('testtool/pruefling_model', 'PrueflingModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->PrueflingModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getPruefling()
+ {
+ $prueflingID = $this->get('pruefling_id');
+
+ if (isset($prueflingID))
+ {
+ $result = $this->PrueflingModel->load($prueflingID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postPruefling()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['pruefling_id']))
+ {
+ $result = $this->PrueflingModel->update($this->post()['pruefling_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->PrueflingModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($pruefling = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/api/v1/testtool/Vorschlag.php b/application/controllers/api/v1/testtool/Vorschlag.php
new file mode 100644
index 000000000..cdd1fe439
--- /dev/null
+++ b/application/controllers/api/v1/testtool/Vorschlag.php
@@ -0,0 +1,78 @@
+load->model('testtool/vorschlag_model', 'VorschlagModel');
+ // Load set the uid of the model to let to check the permissions
+ $this->VorschlagModel->setUID($this->_getUID());
+ }
+
+ /**
+ * @return void
+ */
+ public function getVorschlag()
+ {
+ $vorschlagID = $this->get('vorschlag_id');
+
+ if (isset($vorschlagID))
+ {
+ $result = $this->VorschlagModel->load($vorschlagID);
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function postVorschlag()
+ {
+ if ($this->_validate($this->post()))
+ {
+ if (isset($this->post()['vorschlag_id']))
+ {
+ $result = $this->VorschlagModel->update($this->post()['vorschlag_id'], $this->post());
+ }
+ else
+ {
+ $result = $this->VorschlagModel->insert($this->post());
+ }
+
+ $this->response($result, REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $this->response();
+ }
+ }
+
+ private function _validate($vorschlag = NULL)
+ {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/message/Message.php b/application/controllers/system/Message.php
similarity index 89%
rename from application/controllers/message/Message.php
rename to application/controllers/system/Message.php
index 3f0f00721..8ed3331b6 100755
--- a/application/controllers/message/Message.php
+++ b/application/controllers/system/Message.php
@@ -1,5 +1,5 @@
load->library('session'); // -> autoload
- //$this->load->library('database'); -> autoload
+ function __construct()
+ {
+ parent::__construct();
+ //$this->load->library('session'); // -> autoload
+ //$this->load->library('database'); -> autoload
+
+ }
+
+ /**
+ *
+ * @param type $data
+ * @return typeparses empty string to NULL
+ */
+ protected function _parseData($data)
+ {
+ if(is_array($data))
+ {
+ foreach($data as $key=>$value)
+ {
+ if($value === "")
+ {
+ $data[$key] = NULL;
+ }
+ }
+ return $data;
+ }
+ elseif(is_object($data))
+ {
+ //TODO
+ }
+ else
+ {
+ if($data == "")
+ {
+ return NULL;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php
index c7b387faa..a1f6df4b3 100644
--- a/application/core/DB_Model.php
+++ b/application/core/DB_Model.php
@@ -24,7 +24,7 @@ class DB_Model extends FHC_Model
public function insert($data)
{
// Check Class-Attributes
- if(is_null($this->dbTable))
+ if (is_null($this->dbTable))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
// Check rights
@@ -47,7 +47,7 @@ class DB_Model extends FHC_Model
public function replace($data)
{
// Check Class-Attributes
- if(is_null($this->dbTable))
+ if (is_null($this->dbTable))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
// Check rights
@@ -71,9 +71,9 @@ class DB_Model extends FHC_Model
public function update($id, $data)
{
// Check Class-Attributes
- if(is_null($this->dbTable))
+ if (is_null($this->dbTable))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
- if(is_null($this->pk))
+ if (is_null($this->pk))
return $this->_error(lang('fhc_'.FHC_NOPK), FHC_MODEL_ERROR);
// Check rights
@@ -106,9 +106,9 @@ class DB_Model extends FHC_Model
public function load($id)
{
// Check Class-Attributes
- if(is_null($this->dbTable))
+ if (is_null($this->dbTable))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
- if(is_null($this->pk))
+ if (is_null($this->pk))
return $this->_error(lang('fhc_'.FHC_NOPK), FHC_MODEL_ERROR);
@@ -142,7 +142,7 @@ class DB_Model extends FHC_Model
public function loadWhere($where = null)
{
// Check Class-Attributes
- if(is_null($this->dbTable))
+ if (is_null($this->dbTable))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
// Check rights
@@ -169,9 +169,9 @@ class DB_Model extends FHC_Model
public function loadWhole()
{
// Check Class-Attributes
- if(is_null($this->dbTable))
+ if (is_null($this->dbTable))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
- if(is_null($this->pk))
+ if (is_null($this->pk))
return $this->_error(lang('fhc_'.FHC_NOPK), FHC_MODEL_ERROR);
@@ -196,7 +196,7 @@ class DB_Model extends FHC_Model
public function addJoin($joinTable = null, $cond = null, $type = '')
{
// Check parameters
- if(is_null($joinTable) || is_null($cond) || !in_array($type, array('', 'LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER')))
+ if (is_null($joinTable) || is_null($cond) || !in_array($type, array('', 'LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER')))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
// Check rights for joined table
@@ -216,13 +216,46 @@ class DB_Model extends FHC_Model
public function addOrder($field = null, $type = 'ASC')
{
// Check Class-Attributes and parameters
- if(is_null($field) || !in_array($type, array('ASC', 'DESC')))
+ if (is_null($field) || !in_array($type, array('ASC', 'DESC')))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
$this->db->order_by($field, $type);
return $this->_success(TRUE);
}
+
+ /** ---------------------------------------------------------------
+ * Add distinct clause
+ *
+ * @return void
+ */
+ public function addDistinct()
+ {
+ $this->db->distinct();
+ }
+
+ /** ---------------------------------------------------------------
+ * Add limit clause
+ *
+ * @return void
+ */
+ public function addLimit($start = null, $end = null)
+ {
+ // Check Class-Attributes and parameters
+ if (!is_numeric($start) || (is_numeric($start) && $start <= 0))
+ return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
+
+ if (is_numeric($end) && $end > $start)
+ {
+ $this->db->limit($start, $end);
+ }
+ else
+ {
+ $this->db->limit($start);
+ }
+
+ return $this->_success(TRUE);
+ }
/** ---------------------------------------------------------------
* Delete data from DB-Table
@@ -233,9 +266,9 @@ class DB_Model extends FHC_Model
public function delete($id)
{
// Check Class-Attributes
- if(is_null($this->dbTable))
+ if (is_null($this->dbTable))
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
- if(is_null($this->pk))
+ if (is_null($this->pk))
return $this->_error(lang('fhc_'.FHC_NOPK), FHC_MODEL_ERROR);
// Check rights
@@ -302,7 +335,7 @@ class DB_Model extends FHC_Model
$quote='';
$len = strlen($s);
$v = '';
- for($i=$start+1; $i<$len;$i++)
+ for ($i=$start+1; $i<$len;$i++)
{
$ch = $s[$i];
if (!$string && $ch=='}')
diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php
index b08696193..7c45a2fc3 100644
--- a/application/core/FHC_Controller.php
+++ b/application/core/FHC_Controller.php
@@ -1,5 +1,5 @@
load->helper('language');
$this->lang->load('fhc_model');
$this->lang->load('fhcomplete');
- $this->load->library('FHC_DB_ACL');
- //$this->load->library('session');
+
+ $uid = NULL;
+ if (is_null($uid) && isset($this->session->uid))
+ {
+ $uid = $this->session->uid;
+ }
+ $this->load->library('FHC_DB_ACL', array('uid' => $uid));
}
/** ---------------------------------------------------------------
@@ -54,4 +60,4 @@ class FHC_Model extends CI_Model
$return->retval = $retval;
return $return;
}
-}
\ No newline at end of file
+}
diff --git a/application/helpers/fhcauth_helper.php b/application/helpers/fhcauth_helper.php
index 645952841..1a904ee55 100644
--- a/application/helpers/fhcauth_helper.php
+++ b/application/helpers/fhcauth_helper.php
@@ -10,7 +10,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once 'include/authentication.class.php';
/**
diff --git a/application/helpers/fhcdb_helper.php b/application/helpers/fhcdb_helper.php
index c5eee6800..fd170c462 100644
--- a/application/helpers/fhcdb_helper.php
+++ b/application/helpers/fhcdb_helper.php
@@ -10,7 +10,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
//require_once 'include/basis.class.php';
/**
@@ -44,12 +44,12 @@ class basis_db
//Connection Herstellen
if (DB_CONNECT_PERSISTENT)
{
- if(!basis_db::$db_conn = pg_pconnect($conn_str))
+ if (!basis_db::$db_conn = pg_pconnect($conn_str))
die('Fehler beim Oeffnen der Datenbankverbindung');
}
else
{
- if(!basis_db::$db_conn = pg_connect($conn_str))
+ if (!basis_db::$db_conn = pg_connect($conn_str))
die('Fehler beim Oeffnen der Datenbankverbindung');
}
}
@@ -67,7 +67,7 @@ class basis_db
public function db_num_rows($result=null)
{
- if(is_null($result))
+ if (is_null($result))
return pg_num_rows($this->db_result);
else
return pg_num_rows($result);
@@ -75,16 +75,16 @@ class basis_db
public function db_fetch_object($result = null, $i=null)
{
- if(is_null($result))
+ if (is_null($result))
{
- if(is_null($i))
+ if (is_null($i))
return pg_fetch_object($this->db_result);
else
return pg_fetch_object($this->db_result, $i);
}
else
{
- if(is_null($i))
+ if (is_null($i))
return pg_fetch_object($result);
else
return pg_fetch_object($result, $i);
@@ -93,16 +93,16 @@ class basis_db
public function db_fetch_row($result = null, $i=null)
{
- if(is_null($result))
+ if (is_null($result))
{
- if(is_null($i))
+ if (is_null($i))
return pg_fetch_row($this->db_result);
else
return pg_fetch_row($this->db_result, $i);
}
else
{
- if(is_null($i))
+ if (is_null($i))
return pg_fetch_row($result);
else
return pg_fetch_row($result, $i);
@@ -111,16 +111,16 @@ class basis_db
public function db_fetch_assoc($result = null, $i=null)
{
- if(is_null($result))
+ if (is_null($result))
{
- if(is_null($i))
+ if (is_null($i))
return pg_fetch_assoc($this->db_result);
else
return pg_fetch_assoc($this->db_result, $i);
}
else
{
- if(is_null($i))
+ if (is_null($i))
return pg_fetch_row($result);
else
return pg_fetch_row($result, $i);
@@ -129,7 +129,7 @@ class basis_db
public function db_result($result = null, $i,$item)
{
- if(is_null($result))
+ if (is_null($result))
{
return pg_result($this->db_result, $i,$item);
}
@@ -142,9 +142,9 @@ class basis_db
public function db_getResultJSON($result = null)
{
$rows=array();
- if(is_null($result))
+ if (is_null($result))
{
- while($r = pg_fetch_assoc($this->db_result))
+ while ($r = pg_fetch_assoc($this->db_result))
$rows[] = $r;
//print json_encode($rows);
@@ -153,7 +153,7 @@ class basis_db
{
pg_result_seek($result, 0);
//var_dump($result);
- while($r = pg_fetch_assoc($result))
+ while ($r = pg_fetch_assoc($result))
{
$rows[] = $r;
}
@@ -170,7 +170,7 @@ class basis_db
public function db_affected_rows($result=null)
{
- if(is_null($result))
+ if (is_null($result))
return pg_affected_rows($this->db_result);
else
return pg_affected_rows($result);
@@ -178,7 +178,7 @@ class basis_db
public function db_result_seek($result=null, $offset)
{
- if(is_null($result))
+ if (is_null($result))
return pg_result_seek($this->db_result, $offset);
else
return pg_result_seek($result, $offset);
@@ -186,7 +186,7 @@ class basis_db
public function db_fetch_array($result=null)
{
- if(is_null($result))
+ if (is_null($result))
return pg_fetch_array($this->db_result);
else
return pg_fetch_array($result);
@@ -194,7 +194,7 @@ class basis_db
public function db_num_fields($result=null)
{
- if(is_null($result))
+ if (is_null($result))
return pg_num_fields($this->db_result);
else
return pg_num_fields($result);
@@ -205,7 +205,7 @@ class basis_db
*/
public function db_field_name($result=null, $i)
{
- if(is_null($result))
+ if (is_null($result))
return pg_field_name($this->db_result, $i);
else
return pg_field_name($result, $i);
@@ -217,7 +217,7 @@ class basis_db
*/
public function db_free_result($result = null)
{
- if(is_null($result))
+ if (is_null($result))
{
return pg_free_result($this->db_result);
}
@@ -256,7 +256,7 @@ class basis_db
*/
public function db_null_value($var, $qoute=true)
{
- if($qoute)
+ if ($qoute)
return ($var!==''?$this->db_qoute($var):'null');
else
return ($var!==''?$var:'null');
@@ -288,9 +288,9 @@ class basis_db
*/
public function db_add_param($var, $type=FHC_STRING, $nullable=true)
{
- if(($var==='' || is_null($var)) && $type!=FHC_BOOLEAN)
+ if (($var==='' || is_null($var)) && $type!=FHC_BOOLEAN)
{
- if($nullable)
+ if ($nullable)
return 'null';
else
return "''";
@@ -300,7 +300,7 @@ class basis_db
{
case FHC_INTEGER:
$var = $this->db_escape($var);
- if(!is_numeric($var) && $var!=='')
+ if (!is_numeric($var) && $var!=='')
die('Invalid Integer Parameter detected:'.$var);
$var = $this->db_null_value($var, false);
break;
@@ -315,7 +315,7 @@ class basis_db
foreach($languages as $sk => $sp)
{
- if(!$sp || !isset($buf[$sp]))
+ if (!$sp || !isset($buf[$sp]))
$var[$sk] = "";
else
$var[$sk] = $this->db_escape($buf[$sp]);
@@ -327,11 +327,11 @@ class basis_db
break;
case FHC_BOOLEAN:
- if($var===true)
+ if ($var===true)
$var='true';
- elseif($var===false)
+ elseif ($var===false)
$var='false';
- elseif($var=='' && $nullable)
+ elseif ($var=='' && $nullable)
$var = 'null';
else
die('Invalid Boolean Parameter detected');
@@ -351,11 +351,11 @@ class basis_db
*/
public function db_parse_bool($var)
{
- if($var=='t')
+ if ($var=='t')
return true;
- elseif($var=='f')
+ elseif ($var=='f')
return false;
- elseif($var=='')
+ elseif ($var=='')
return '';
else
die('Invalid DB Boolean. Wrong DB-Engine?');
@@ -370,7 +370,7 @@ class basis_db
$string = '';
foreach($array as $row)
{
- if($string!='')
+ if ($string!='')
$string.=',';
$string.=$this->db_add_param($row);
}
@@ -439,7 +439,7 @@ function dbImplode4SQL($array)
foreach($array as $row)
{
- if($string != '')
+ if ($string != '')
{
$string.=',';
}
diff --git a/application/language/de-AT/calendar_lang.php b/application/language/de-AT/calendar_lang.php
index 8af5e8056..222f4f65b 100644
--- a/application/language/de-AT/calendar_lang.php
+++ b/application/language/de-AT/calendar_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['cal_su'] = 'Su';
$lang['cal_mo'] = 'Mo';
diff --git a/application/language/de-AT/date_lang.php b/application/language/de-AT/date_lang.php
index 39af5a239..7ff441e0e 100644
--- a/application/language/de-AT/date_lang.php
+++ b/application/language/de-AT/date_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['date_year'] = 'Year';
$lang['date_years'] = 'Years';
diff --git a/application/language/de-AT/db_lang.php b/application/language/de-AT/db_lang.php
index ed93452b4..91e2f41d3 100644
--- a/application/language/de-AT/db_lang.php
+++ b/application/language/de-AT/db_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['db_invalid_connection_str'] = 'Unable to determine the database settings based on the connection string you submitted.';
$lang['db_unable_to_connect'] = 'Unable to connect to your database server using the provided settings.';
diff --git a/application/language/de-AT/email_lang.php b/application/language/de-AT/email_lang.php
index 84fb09109..1238962f8 100644
--- a/application/language/de-AT/email_lang.php
+++ b/application/language/de-AT/email_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['email_must_be_array'] = 'The email validation method must be passed an array.';
$lang['email_invalid_address'] = 'Invalid email address: %s';
diff --git a/application/language/de-AT/form_validation_lang.php b/application/language/de-AT/form_validation_lang.php
index 92d6d5ebb..ff8ff4ec2 100644
--- a/application/language/de-AT/form_validation_lang.php
+++ b/application/language/de-AT/form_validation_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['form_validation_required'] = 'The {field} field is required.';
$lang['form_validation_isset'] = 'The {field} field must have a value.';
diff --git a/application/language/de-AT/ftp_lang.php b/application/language/de-AT/ftp_lang.php
index 9e72bce42..a620e77d0 100644
--- a/application/language/de-AT/ftp_lang.php
+++ b/application/language/de-AT/ftp_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['ftp_no_connection'] = 'Unable to locate a valid connection ID. Please make sure you are connected before performing any file routines.';
$lang['ftp_unable_to_connect'] = 'Unable to connect to your FTP server using the supplied hostname.';
diff --git a/application/language/de-AT/imglib_lang.php b/application/language/de-AT/imglib_lang.php
index 7f23233b4..a034efc0d 100644
--- a/application/language/de-AT/imglib_lang.php
+++ b/application/language/de-AT/imglib_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['imglib_source_image_required'] = 'You must specify a source image in your preferences.';
$lang['imglib_gd_required'] = 'The GD image library is required for this feature.';
diff --git a/application/language/de-AT/number_lang.php b/application/language/de-AT/number_lang.php
index 0aaf51e72..197da7c2b 100644
--- a/application/language/de-AT/number_lang.php
+++ b/application/language/de-AT/number_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['terabyte_abbr'] = 'TB';
$lang['gigabyte_abbr'] = 'GB';
diff --git a/application/language/de-AT/pagination_lang.php b/application/language/de-AT/pagination_lang.php
index 4d36bdee8..4953c219b 100644
--- a/application/language/de-AT/pagination_lang.php
+++ b/application/language/de-AT/pagination_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['pagination_first_link'] = '‹ First';
$lang['pagination_next_link'] = '>';
diff --git a/application/language/de-AT/profiler_lang.php b/application/language/de-AT/profiler_lang.php
index 2d8fa51f4..b9cf41bed 100644
--- a/application/language/de-AT/profiler_lang.php
+++ b/application/language/de-AT/profiler_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['profiler_database'] = 'DATABASE';
$lang['profiler_controller_info'] = 'CLASS/METHOD';
diff --git a/application/language/de-AT/seed_lang.php b/application/language/de-AT/seed_lang.php
index 0dd2e014c..42735e0e1 100644
--- a/application/language/de-AT/seed_lang.php
+++ b/application/language/de-AT/seed_lang.php
@@ -3,7 +3,7 @@
* FH-Complete
*
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['seed_none_found'] = 'No seeds were found.';
$lang['seed_not_found'] = 'No seed could be found with the version number: %s.';
diff --git a/application/language/de-AT/unit_test_lang.php b/application/language/de-AT/unit_test_lang.php
index 29a4137a5..bad094cbc 100644
--- a/application/language/de-AT/unit_test_lang.php
+++ b/application/language/de-AT/unit_test_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['ut_test_name'] = 'Test Name';
$lang['ut_test_datatype'] = 'Test Datatype';
diff --git a/application/language/de-AT/upload_lang.php b/application/language/de-AT/upload_lang.php
index 058dca993..c2f7bffc2 100644
--- a/application/language/de-AT/upload_lang.php
+++ b/application/language/de-AT/upload_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['upload_userfile_not_set'] = 'Unable to find a post variable called userfile.';
$lang['upload_file_exceeds_limit'] = 'The uploaded file exceeds the maximum allowed size in your PHP configuration file.';
diff --git a/application/language/en-US/calendar_lang.php b/application/language/en-US/calendar_lang.php
index 8af5e8056..222f4f65b 100644
--- a/application/language/en-US/calendar_lang.php
+++ b/application/language/en-US/calendar_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['cal_su'] = 'Su';
$lang['cal_mo'] = 'Mo';
diff --git a/application/language/en-US/date_lang.php b/application/language/en-US/date_lang.php
index 39af5a239..7ff441e0e 100644
--- a/application/language/en-US/date_lang.php
+++ b/application/language/en-US/date_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['date_year'] = 'Year';
$lang['date_years'] = 'Years';
diff --git a/application/language/en-US/db_lang.php b/application/language/en-US/db_lang.php
index ed93452b4..91e2f41d3 100644
--- a/application/language/en-US/db_lang.php
+++ b/application/language/en-US/db_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['db_invalid_connection_str'] = 'Unable to determine the database settings based on the connection string you submitted.';
$lang['db_unable_to_connect'] = 'Unable to connect to your database server using the provided settings.';
diff --git a/application/language/en-US/email_lang.php b/application/language/en-US/email_lang.php
index 84fb09109..1238962f8 100644
--- a/application/language/en-US/email_lang.php
+++ b/application/language/en-US/email_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['email_must_be_array'] = 'The email validation method must be passed an array.';
$lang['email_invalid_address'] = 'Invalid email address: %s';
diff --git a/application/language/en-US/form_validation_lang.php b/application/language/en-US/form_validation_lang.php
index 92d6d5ebb..ff8ff4ec2 100644
--- a/application/language/en-US/form_validation_lang.php
+++ b/application/language/en-US/form_validation_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['form_validation_required'] = 'The {field} field is required.';
$lang['form_validation_isset'] = 'The {field} field must have a value.';
diff --git a/application/language/en-US/ftp_lang.php b/application/language/en-US/ftp_lang.php
index 9e72bce42..a620e77d0 100644
--- a/application/language/en-US/ftp_lang.php
+++ b/application/language/en-US/ftp_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['ftp_no_connection'] = 'Unable to locate a valid connection ID. Please make sure you are connected before performing any file routines.';
$lang['ftp_unable_to_connect'] = 'Unable to connect to your FTP server using the supplied hostname.';
diff --git a/application/language/en-US/imglib_lang.php b/application/language/en-US/imglib_lang.php
index 7f23233b4..a034efc0d 100644
--- a/application/language/en-US/imglib_lang.php
+++ b/application/language/en-US/imglib_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['imglib_source_image_required'] = 'You must specify a source image in your preferences.';
$lang['imglib_gd_required'] = 'The GD image library is required for this feature.';
diff --git a/application/language/en-US/migration_lang.php b/application/language/en-US/migration_lang.php
index bce9210d3..b067af819 100644
--- a/application/language/en-US/migration_lang.php
+++ b/application/language/en-US/migration_lang.php
@@ -35,7 +35,7 @@
* @since Version 3.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['migration_none_found'] = 'No migrations were found.';
$lang['migration_not_found'] = 'No migration could be found with the version number: %s.';
diff --git a/application/language/en-US/number_lang.php b/application/language/en-US/number_lang.php
index 0aaf51e72..197da7c2b 100644
--- a/application/language/en-US/number_lang.php
+++ b/application/language/en-US/number_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['terabyte_abbr'] = 'TB';
$lang['gigabyte_abbr'] = 'GB';
diff --git a/application/language/en-US/pagination_lang.php b/application/language/en-US/pagination_lang.php
index 4d36bdee8..4953c219b 100644
--- a/application/language/en-US/pagination_lang.php
+++ b/application/language/en-US/pagination_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['pagination_first_link'] = '‹ First';
$lang['pagination_next_link'] = '>';
diff --git a/application/language/en-US/profiler_lang.php b/application/language/en-US/profiler_lang.php
index 2d8fa51f4..b9cf41bed 100644
--- a/application/language/en-US/profiler_lang.php
+++ b/application/language/en-US/profiler_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['profiler_database'] = 'DATABASE';
$lang['profiler_controller_info'] = 'CLASS/METHOD';
diff --git a/application/language/en-US/seed_lang.php b/application/language/en-US/seed_lang.php
index 0dd2e014c..42735e0e1 100644
--- a/application/language/en-US/seed_lang.php
+++ b/application/language/en-US/seed_lang.php
@@ -3,7 +3,7 @@
* FH-Complete
*
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['seed_none_found'] = 'No seeds were found.';
$lang['seed_not_found'] = 'No seed could be found with the version number: %s.';
diff --git a/application/language/en-US/unit_test_lang.php b/application/language/en-US/unit_test_lang.php
index 29a4137a5..bad094cbc 100644
--- a/application/language/en-US/unit_test_lang.php
+++ b/application/language/en-US/unit_test_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['ut_test_name'] = 'Test Name';
$lang['ut_test_datatype'] = 'Test Datatype';
diff --git a/application/language/en-US/upload_lang.php b/application/language/en-US/upload_lang.php
index 058dca993..c2f7bffc2 100644
--- a/application/language/en-US/upload_lang.php
+++ b/application/language/en-US/upload_lang.php
@@ -35,7 +35,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
$lang['upload_userfile_not_set'] = 'Unable to find a post variable called userfile.';
$lang['upload_file_exceeds_limit'] = 'The uploaded file exceeds the maximum allowed size in your PHP configuration file.';
diff --git a/application/libraries/FHC_Auth.php b/application/libraries/FHC_Auth.php
index 83b76e755..255ff6b1d 100644
--- a/application/libraries/FHC_Auth.php
+++ b/application/libraries/FHC_Auth.php
@@ -10,7 +10,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once FCPATH.'include/authentication.class.php';
require_once FCPATH.'include/AddonAuthentication.php';
@@ -38,7 +38,7 @@ class FHC_Auth
public function basicAuthentication($username, $password)
{
$auth = new authentication();
- if($auth->checkpassword($username, $password))
+ if ($auth->checkpassword($username, $password))
{
return true;
}
diff --git a/application/libraries/FHC_DB_ACL.php b/application/libraries/FHC_DB_ACL.php
index 803d09683..702b193e7 100644
--- a/application/libraries/FHC_DB_ACL.php
+++ b/application/libraries/FHC_DB_ACL.php
@@ -10,7 +10,9 @@
* @since Version 1.0.0
* @filesource
*/
-defined('FCPATH') OR exit('No direct script access allowed');
+if (! defined('FCPATH'))
+ exit('No direct script access allowed');
+
require_once(FCPATH.'include/basis_db.class.php');
require_once(FCPATH.'include/organisationseinheit.class.php');
require_once(FCPATH.'include/studiengang.class.php');
@@ -43,9 +45,11 @@ class FHC_DB_ACL
* @param string $password
* @return bool
*/
- function __construct()
+ function __construct($param = null)
{
$this->bb = new benutzerberechtigung();
+ if (is_array($param) && isset($param['uid']))
+ $this->_uid = $param['uid'];
}
function isBerechtigt($berechtigung_kurzbz, $art=null, $oe_kurzbz=null, $kostenstelle_id=null)
@@ -64,4 +68,4 @@ class FHC_DB_ACL
{
return $this->_uid = $uid;
}
-}
\ No newline at end of file
+}
diff --git a/application/libraries/FHC_Seed.php b/application/libraries/FHC_Seed.php
index a7944bb74..065a19259 100644
--- a/application/libraries/FHC_Seed.php
+++ b/application/libraries/FHC_Seed.php
@@ -10,7 +10,7 @@
* @since Version 1.0.0
* @filesource
*/
-defined('BASEPATH') OR exit('No direct script access allowed');
+if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* FHC-Seed Library
diff --git a/application/libraries/Format.php b/application/libraries/Format.php
index 0d3bf7732..0f7ea4a87 100644
--- a/application/libraries/Format.php
+++ b/application/libraries/Format.php
@@ -1,6 +1,6 @@
display_as[$field_info->name] :
ucfirst(str_replace("_"," ",$field_info->name));
- if($this->change_field_type !== null && isset($this->change_field_type[$field_info->name]))
+ if ($this->change_field_type !== null && isset($this->change_field_type[$field_info->name]))
{
$field_type = $this->change_field_type[$field_info->name];
@@ -70,12 +70,12 @@ class grocery_CRUD_Field_Types
$real_type = $field_info->crud_type;
}
- elseif(isset($this->relation[$field_info->name]))
+ elseif (isset($this->relation[$field_info->name]))
{
$real_type = 'relation';
$field_info->crud_type = 'relation';
}
- elseif(isset($this->upload_fields[$field_info->name]))
+ elseif (isset($this->upload_fields[$field_info->name]))
{
$real_type = 'upload_file';
$field_info->crud_type = 'upload_file';
@@ -88,7 +88,7 @@ class grocery_CRUD_Field_Types
switch ($real_type) {
case 'text':
- if(!empty($this->unset_texteditor) && in_array($field_info->name,$this->unset_texteditor))
+ if (!empty($this->unset_texteditor) && in_array($field_info->name,$this->unset_texteditor))
$field_info->extras = false;
else
$field_info->extras = 'text_editor';
@@ -105,7 +105,7 @@ class grocery_CRUD_Field_Types
break;
default:
- if(empty($field_info->extras))
+ if (empty($field_info->extras))
$field_info->extras = false;
break;
}
@@ -113,7 +113,7 @@ class grocery_CRUD_Field_Types
$types[$field_info->name] = $field_info;
}
- if(!empty($this->relation_n_n))
+ if (!empty($this->relation_n_n))
{
foreach($this->relation_n_n as $field_name => $field_extras)
{
@@ -135,15 +135,15 @@ class grocery_CRUD_Field_Types
}
}
- if(!empty($this->add_fields))
+ if (!empty($this->add_fields))
foreach($this->add_fields as $field_object)
{
$field_name = isset($field_object->field_name) ? $field_object->field_name : $field_object;
- if(!isset($types[$field_name]))//Doesn't exist in the database? Create it for the CRUD
+ if (!isset($types[$field_name]))//Doesn't exist in the database? Create it for the CRUD
{
$extras = false;
- if($this->change_field_type !== null && isset($this->change_field_type[$field_name]))
+ if ($this->change_field_type !== null && isset($this->change_field_type[$field_name]))
{
$field_type = $this->change_field_type[$field_name];
$extras = $field_type->extras;
@@ -165,15 +165,15 @@ class grocery_CRUD_Field_Types
}
}
- if(!empty($this->edit_fields))
+ if (!empty($this->edit_fields))
foreach($this->edit_fields as $field_object)
{
$field_name = isset($field_object->field_name) ? $field_object->field_name : $field_object;
- if(!isset($types[$field_name]))//Doesn't exist in the database? Create it for the CRUD
+ if (!isset($types[$field_name]))//Doesn't exist in the database? Create it for the CRUD
{
$extras = false;
- if($this->change_field_type !== null && isset($this->change_field_type[$field_name]))
+ if ($this->change_field_type !== null && isset($this->change_field_type[$field_name]))
{
$field_type = $this->change_field_type[$field_name];
$extras = $field_type->extras;
@@ -264,9 +264,9 @@ class grocery_CRUD_Field_Types
break;
case 'true_false':
- if(is_array($field_info->extras) && array_key_exists($value,$field_info->extras)) {
+ if (is_array($field_info->extras) && array_key_exists($value,$field_info->extras)) {
$value = $field_info->extras[$value];
- } else if(isset($this->default_true_false_text[$value])) {
+ } else if (isset($this->default_true_false_text[$value])) {
$value = $this->default_true_false_text[$value];
}
break;
@@ -277,7 +277,7 @@ class grocery_CRUD_Field_Types
$value = $this->character_limiter(strip_tags($value),$this->character_limiter,"...");
break;
case 'date':
- if(!empty($value) && $value != '0000-00-00' && $value != '1970-01-01')
+ if (!empty($value) && $value != '0000-00-00' && $value != '1970-01-01')
{
list($year,$month,$day) = explode("-",$value);
@@ -289,7 +289,7 @@ class grocery_CRUD_Field_Types
}
break;
case 'datetime':
- if(!empty($value) && $value != '0000-00-00 00:00:00' && $value != '1970-01-01 00:00:00')
+ if (!empty($value) && $value != '0000-00-00 00:00:00' && $value != '1970-01-01 00:00:00')
{
list($year,$month,$day) = explode("-",$value);
list($hours,$minutes) = explode(":",substr($value,11));
@@ -327,7 +327,7 @@ class grocery_CRUD_Field_Types
break;
case 'upload_file':
- if(empty($value))
+ if (empty($value))
{
$value = "";
}
@@ -344,7 +344,7 @@ class grocery_CRUD_Field_Types
$file_url = base_url().$field_info->extras->upload_path."/$value";
$file_url_anchor = '';
}
@@ -409,7 +409,7 @@ class grocery_CRUD_Field_Types
protected function get_type($db_type)
{
$type = false;
- if(!empty($db_type->type))
+ if (!empty($db_type->type))
{
switch ($db_type->type) {
case '1':
@@ -418,7 +418,7 @@ class grocery_CRUD_Field_Types
case 'tinyint':
case 'mediumint':
case 'longint':
- if( $db_type->db_type == 'tinyint' && $db_type->db_max_length == 1)
+ if ( $db_type->db_type == 'tinyint' && $db_type->db_max_length == 1)
$type = 'true_false';
else
$type = 'integer';
@@ -426,13 +426,13 @@ class grocery_CRUD_Field_Types
case '254':
case 'string':
case 'enum':
- if($db_type->db_type != 'enum')
+ if ($db_type->db_type != 'enum')
$type = 'string';
else
$type = 'enum';
break;
case 'set':
- if($db_type->db_type != 'set')
+ if ($db_type->db_type != 'set')
$type = 'string';
else
$type = 'set';
@@ -488,41 +488,41 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function get_total_results()
{
- if(!empty($this->where))
+ if (!empty($this->where))
foreach($this->where as $where)
$this->basic_model->where($where[0],$where[1],$where[2]);
- if(!empty($this->or_where))
+ if (!empty($this->or_where))
foreach($this->or_where as $or_where)
$this->basic_model->or_where($or_where[0],$or_where[1],$or_where[2]);
- if(!empty($this->like))
+ if (!empty($this->like))
foreach($this->like as $like)
$this->basic_model->like($like[0],$like[1],$like[2]);
- if(!empty($this->or_like))
+ if (!empty($this->or_like))
foreach($this->or_like as $or_like)
$this->basic_model->or_like($or_like[0],$or_like[1],$or_like[2]);
- if(!empty($this->having))
+ if (!empty($this->having))
foreach($this->having as $having)
$this->basic_model->having($having[0],$having[1],$having[2]);
- if(!empty($this->or_having))
+ if (!empty($this->or_having))
foreach($this->or_having as $or_having)
$this->basic_model->or_having($or_having[0],$or_having[1],$or_having[2]);
- if(!empty($this->relation))
+ if (!empty($this->relation))
foreach($this->relation as $relation)
$this->basic_model->join_relation($relation[0],$relation[1],$relation[2]);
- if(!empty($this->relation_n_n))
+ if (!empty($this->relation_n_n))
{
$columns = $this->get_columns();
foreach($columns as $column)
{
//Use the relation_n_n ONLY if the column is called . The set_relation_n_n are slow and it will make the table slower without any reason as we don't need those queries.
- if(isset($this->relation_n_n[$column->field_name]))
+ if (isset($this->relation_n_n[$column->field_name]))
{
$this->basic_model->set_relation_n_n_field($this->relation_n_n[$column->field_name]);
}
@@ -553,9 +553,9 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function set_ajax_list_queries($state_info = null)
{
- if(!empty($state_info->per_page))
+ if (!empty($state_info->per_page))
{
- if(empty($state_info->page) || !is_numeric($state_info->page) )
+ if (empty($state_info->page) || !is_numeric($state_info->page) )
$this->limit($state_info->per_page);
else
{
@@ -564,12 +564,12 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if(!empty($state_info->order_by))
+ if (!empty($state_info->order_by))
{
$this->order_by($state_info->order_by[0],$state_info->order_by[1]);
}
- if(!empty($state_info->search))
+ if (!empty($state_info->search))
{
if (!empty($this->relation)) {
foreach ($this->relation as $relation_name => $relation_values) {
@@ -589,7 +589,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
} else {
$this->like($temp_relation[$search_field] , $search_text);
}
- } elseif(isset($this->relation_n_n[$search_field])) {
+ } elseif (isset($this->relation_n_n[$search_field])) {
$escaped_text = $this->basic_model->escape_str($search_text);
$this->having($search_field." LIKE '%".$escaped_text."%'");
} else {
@@ -608,7 +608,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
} else {
$this->like($temp_relation[$state_info->search->field] , $state_info->search->text);
}
- } elseif(isset($this->relation_n_n[$state_info->search->field])) {
+ } elseif (isset($this->relation_n_n[$state_info->search->field])) {
$escaped_text = $this->basic_model->escape_str($state_info->search->text);
$this->having($state_info->search->field." LIKE '%".$escaped_text."%'");
} else {
@@ -621,15 +621,15 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$search_text = $state_info->search->text;
- if(!empty($this->where))
+ if (!empty($this->where))
foreach($this->where as $where)
$this->basic_model->having($where[0],$where[1],$where[2]);
foreach($columns as $column)
{
- if(isset($temp_relation[$column->field_name]))
+ if (isset($temp_relation[$column->field_name]))
{
- if(is_array($temp_relation[$column->field_name]))
+ if (is_array($temp_relation[$column->field_name]))
{
foreach($temp_relation[$column->field_name] as $search_field)
{
@@ -641,7 +641,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$this->or_like($temp_relation[$column->field_name], $search_text);
}
}
- elseif(isset($this->relation_n_n[$column->field_name]))
+ elseif (isset($this->relation_n_n[$column->field_name]))
{
//@todo have a where for the relation_n_n statement
}
@@ -656,7 +656,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function table_exists($table_name = null)
{
- if($this->basic_model->db_table_exists($table_name))
+ if ($this->basic_model->db_table_exists($table_name))
return true;
return false;
}
@@ -665,7 +665,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
{
list($field_name , $related_table , $related_field_title, $where_clause, $order_by) = $relation_info;
- if($primary_key_value !== null)
+ if ($primary_key_value !== null)
{
$primary_key = $this->basic_model->get_primary_key($related_table);
@@ -696,12 +696,12 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$unique_fields = $this->_unique_fields;
$add_fields = $this->get_add_fields();
- if(!empty($required_fields))
+ if (!empty($required_fields))
{
foreach($add_fields as $add_field)
{
$field_name = $add_field->field_name;
- if(!isset($this->validation_rules[$field_name]) && in_array( $field_name, $required_fields) )
+ if (!isset($this->validation_rules[$field_name]) && in_array( $field_name, $required_fields) )
{
$this->set_rules( $field_name, $field_types[$field_name]->display_as, 'required');
}
@@ -710,14 +710,14 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
/** Checking for unique fields. If the field value is not unique then
* return a validation error straight away, if not continue... */
- if(!empty($unique_fields))
+ if (!empty($unique_fields))
{
$form_validation = $this->form_validation();
foreach($add_fields as $add_field)
{
$field_name = $add_field->field_name;
- if(in_array( $field_name, $unique_fields) )
+ if (in_array( $field_name, $unique_fields) )
{
$form_validation->set_rules( $field_name,
$field_types[$field_name]->display_as,
@@ -725,7 +725,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if(!$form_validation->run())
+ if (!$form_validation->run())
{
$validation_result->error_message = $form_validation->error_string();
$validation_result->error_fields = $form_validation->_error_array;
@@ -734,7 +734,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if(!empty($this->validation_rules))
+ if (!empty($this->validation_rules))
{
$form_validation = $this->form_validation();
@@ -743,14 +743,14 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
foreach($add_fields as $add_field)
{
$field_name = $add_field->field_name;
- if(isset($this->validation_rules[$field_name]))
+ if (isset($this->validation_rules[$field_name]))
{
$rule = $this->validation_rules[$field_name];
$form_validation->set_rules($rule['field'],$rule['label'],$rule['rules']);
}
}
- if($form_validation->run())
+ if ($form_validation->run())
{
$validation_result->success = true;
}
@@ -770,7 +770,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function form_validation()
{
- if($this->form_validation === null)
+ if ($this->form_validation === null)
{
$this->form_validation = new grocery_CRUD_Form_validation();
$ci = &get_instance();
@@ -789,12 +789,12 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$unique_fields = $this->_unique_fields;
$edit_fields = $this->get_edit_fields();
- if(!empty($required_fields))
+ if (!empty($required_fields))
{
foreach($edit_fields as $edit_field)
{
$field_name = $edit_field->field_name;
- if(!isset($this->validation_rules[$field_name]) && in_array( $field_name, $required_fields) )
+ if (!isset($this->validation_rules[$field_name]) && in_array( $field_name, $required_fields) )
{
$this->set_rules( $field_name, $field_types[$field_name]->display_as, 'required');
}
@@ -804,7 +804,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
/** Checking for unique fields. If the field value is not unique then
* return a validation error straight away, if not continue... */
- if(!empty($unique_fields))
+ if (!empty($unique_fields))
{
$form_validation = $this->form_validation();
@@ -813,7 +813,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
foreach($edit_fields as $edit_field)
{
$field_name = $edit_field->field_name;
- if(in_array( $field_name, $unique_fields) )
+ if (in_array( $field_name, $unique_fields) )
{
$state_info = $this->getStateInfo();
$primary_key = $this->get_primary_key();
@@ -822,7 +822,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$this->basic_model->where($primary_key,$state_info->primary_key);
$row = $this->basic_model->get_row();
- if(!isset($row->$field_name)) {
+ if (!isset($row->$field_name)) {
throw new Exception("The field name doesn't exist in the database. ".
"Please use the unique fields only for fields ".
"that exist in the database");
@@ -830,7 +830,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$previous_field_name_value = $row->$field_name;
- if(!empty($previous_field_name_value) && $previous_field_name_value != $field_name_value) {
+ if (!empty($previous_field_name_value) && $previous_field_name_value != $field_name_value) {
$form_validation->set_rules( $field_name,
$field_types[$field_name]->display_as,
'is_unique['.$this->basic_db_table.'.'.$field_name.']');
@@ -840,7 +840,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if($form_validation_check && !$form_validation->run())
+ if ($form_validation_check && !$form_validation->run())
{
$validation_result->error_message = $form_validation->error_string();
$validation_result->error_fields = $form_validation->_error_array;
@@ -849,7 +849,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if(!empty($this->validation_rules))
+ if (!empty($this->validation_rules))
{
$form_validation = $this->form_validation();
@@ -858,14 +858,14 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
foreach($edit_fields as $edit_field)
{
$field_name = $edit_field->field_name;
- if(isset($this->validation_rules[$field_name]))
+ if (isset($this->validation_rules[$field_name]))
{
$rule = $this->validation_rules[$field_name];
$form_validation->set_rules($rule['field'],$rule['label'],$rule['rules']);
}
}
- if($form_validation->run())
+ if ($form_validation->run())
{
$validation_result->success = true;
}
@@ -887,21 +887,21 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
{
$validation_result = $this->db_insert_validation();
- if($validation_result->success)
+ if ($validation_result->success)
{
$post_data = $state_info->unwrapped_data;
$add_fields = $this->get_add_fields();
- if($this->callback_insert === null)
+ if ($this->callback_insert === null)
{
- if($this->callback_before_insert !== null)
+ if ($this->callback_before_insert !== null)
{
$callback_return = call_user_func($this->callback_before_insert, $post_data);
- if(!empty($callback_return) && is_array($callback_return))
+ if (!empty($callback_return) && is_array($callback_return))
$post_data = $callback_return;
- elseif($callback_return === false)
+ elseif ($callback_return === false)
return false;
}
@@ -910,34 +910,34 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
foreach($add_fields as $num_row => $field)
{
/* If the multiselect or the set is empty then the browser doesn't send an empty array. Instead it sends nothing */
- if(isset($types[$field->field_name]->crud_type) && ($types[$field->field_name]->crud_type == 'set' || $types[$field->field_name]->crud_type == 'multiselect') && !isset($post_data[$field->field_name]))
+ if (isset($types[$field->field_name]->crud_type) && ($types[$field->field_name]->crud_type == 'set' || $types[$field->field_name]->crud_type == 'multiselect') && !isset($post_data[$field->field_name]))
{
$post_data[$field->field_name] = array();
}
- if(isset($post_data[$field->field_name]) && !isset($this->relation_n_n[$field->field_name]))
+ if (isset($post_data[$field->field_name]) && !isset($this->relation_n_n[$field->field_name]))
{
- if(isset($types[$field->field_name]->db_null) && $types[$field->field_name]->db_null && is_array($post_data[$field->field_name]) && empty($post_data[$field->field_name]))
+ if (isset($types[$field->field_name]->db_null) && $types[$field->field_name]->db_null && is_array($post_data[$field->field_name]) && empty($post_data[$field->field_name]))
{
$insert_data[$field->field_name] = null;
}
- elseif(isset($types[$field->field_name]->db_null) && $types[$field->field_name]->db_null && $post_data[$field->field_name] === '')
+ elseif (isset($types[$field->field_name]->db_null) && $types[$field->field_name]->db_null && $post_data[$field->field_name] === '')
{
$insert_data[$field->field_name] = null;
}
- elseif(isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'date')
+ elseif (isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'date')
{
$insert_data[$field->field_name] = $this->_convert_date_to_sql_date($post_data[$field->field_name]);
}
- elseif(isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'readonly')
+ elseif (isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'readonly')
{
//This empty if statement is to make sure that a readonly field will never inserted/updated
}
- elseif(isset($types[$field->field_name]->crud_type) && ($types[$field->field_name]->crud_type == 'set' || $types[$field->field_name]->crud_type == 'multiselect'))
+ elseif (isset($types[$field->field_name]->crud_type) && ($types[$field->field_name]->crud_type == 'set' || $types[$field->field_name]->crud_type == 'multiselect'))
{
$insert_data[$field->field_name] = !empty($post_data[$field->field_name]) ? implode(',',$post_data[$field->field_name]) : '';
}
- elseif(isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'datetime'){
+ elseif (isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'datetime'){
$insert_data[$field->field_name] = $this->_convert_date_to_sql_date(substr($post_data[$field->field_name],0,10)).
substr($post_data[$field->field_name],10);
}
@@ -950,7 +950,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$insert_result = $this->basic_model->db_insert($insert_data);
- if($insert_result !== false)
+ if ($insert_result !== false)
{
$insert_primary_key = $insert_result;
}
@@ -959,7 +959,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
return false;
}
- if(!empty($this->relation_n_n))
+ if (!empty($this->relation_n_n))
{
foreach($this->relation_n_n as $field_name => $field_info)
{
@@ -968,11 +968,11 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if($this->callback_after_insert !== null)
+ if ($this->callback_after_insert !== null)
{
$callback_return = call_user_func($this->callback_after_insert, $post_data, $insert_primary_key);
- if($callback_return === false)
+ if ($callback_return === false)
{
return false;
}
@@ -982,13 +982,13 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
{
$callback_return = call_user_func($this->callback_insert, $post_data);
- if($callback_return === false)
+ if ($callback_return === false)
{
return false;
}
}
- if(isset($insert_primary_key))
+ if (isset($insert_primary_key))
return $insert_primary_key;
else
return true;
@@ -1004,22 +1004,22 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$edit_fields = $this->get_edit_fields();
- if($validation_result->success)
+ if ($validation_result->success)
{
$post_data = $state_info->unwrapped_data;
$primary_key = $state_info->primary_key;
- if($this->callback_update === null)
+ if ($this->callback_update === null)
{
- if($this->callback_before_update !== null)
+ if ($this->callback_before_update !== null)
{
$callback_return = call_user_func($this->callback_before_update, $post_data, $primary_key);
- if(!empty($callback_return) && is_array($callback_return))
+ if (!empty($callback_return) && is_array($callback_return))
{
$post_data = $callback_return;
}
- elseif($callback_return === false)
+ elseif ($callback_return === false)
{
return false;
}
@@ -1031,34 +1031,34 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
foreach($edit_fields as $num_row => $field)
{
/* If the multiselect or the set is empty then the browser doesn't send an empty array. Instead it sends nothing */
- if(isset($types[$field->field_name]->crud_type) && ($types[$field->field_name]->crud_type == 'set' || $types[$field->field_name]->crud_type == 'multiselect') && !isset($post_data[$field->field_name]))
+ if (isset($types[$field->field_name]->crud_type) && ($types[$field->field_name]->crud_type == 'set' || $types[$field->field_name]->crud_type == 'multiselect') && !isset($post_data[$field->field_name]))
{
$post_data[$field->field_name] = array();
}
- if(isset($post_data[$field->field_name]) && !isset($this->relation_n_n[$field->field_name]))
+ if (isset($post_data[$field->field_name]) && !isset($this->relation_n_n[$field->field_name]))
{
- if(isset($types[$field->field_name]->db_null) && $types[$field->field_name]->db_null && is_array($post_data[$field->field_name]) && empty($post_data[$field->field_name]))
+ if (isset($types[$field->field_name]->db_null) && $types[$field->field_name]->db_null && is_array($post_data[$field->field_name]) && empty($post_data[$field->field_name]))
{
$update_data[$field->field_name] = null;
}
- elseif(isset($types[$field->field_name]->db_null) && $types[$field->field_name]->db_null && $post_data[$field->field_name] === '')
+ elseif (isset($types[$field->field_name]->db_null) && $types[$field->field_name]->db_null && $post_data[$field->field_name] === '')
{
$update_data[$field->field_name] = null;
}
- elseif(isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'date')
+ elseif (isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'date')
{
$update_data[$field->field_name] = $this->_convert_date_to_sql_date($post_data[$field->field_name]);
}
- elseif(isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'readonly')
+ elseif (isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'readonly')
{
//This empty if statement is to make sure that a readonly field will never inserted/updated
}
- elseif(isset($types[$field->field_name]->crud_type) && ($types[$field->field_name]->crud_type == 'set' || $types[$field->field_name]->crud_type == 'multiselect'))
+ elseif (isset($types[$field->field_name]->crud_type) && ($types[$field->field_name]->crud_type == 'set' || $types[$field->field_name]->crud_type == 'multiselect'))
{
$update_data[$field->field_name] = !empty($post_data[$field->field_name]) ? implode(',',$post_data[$field->field_name]) : '';
}
- elseif(isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'datetime'){
+ elseif (isset($types[$field->field_name]->crud_type) && $types[$field->field_name]->crud_type == 'datetime'){
$update_data[$field->field_name] = $this->_convert_date_to_sql_date(substr($post_data[$field->field_name],0,10)).
substr($post_data[$field->field_name],10);
}
@@ -1069,12 +1069,12 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if($this->basic_model->db_update($update_data, $primary_key) === false)
+ if ($this->basic_model->db_update($update_data, $primary_key) === false)
{
return false;
}
- if(!empty($this->relation_n_n))
+ if (!empty($this->relation_n_n))
{
foreach($this->relation_n_n as $field_name => $field_info)
{
@@ -1090,11 +1090,11 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if($this->callback_after_update !== null)
+ if ($this->callback_after_update !== null)
{
$callback_return = call_user_func($this->callback_after_update, $post_data, $primary_key);
- if($callback_return === false)
+ if ($callback_return === false)
{
return false;
}
@@ -1105,7 +1105,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
{
$callback_return = call_user_func($this->callback_update, $post_data, $primary_key);
- if($callback_return === false)
+ if ($callback_return === false)
{
return false;
}
@@ -1122,21 +1122,21 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function _convert_date_to_sql_date($date)
{
$date = substr($date,0,10);
- if(preg_match('/\d{4}-\d{2}-\d{2}/',$date))
+ if (preg_match('/\d{4}-\d{2}-\d{2}/',$date))
{
//If it's already a sql-date don't convert it!
return $date;
- }elseif(empty($date))
+ }elseif (empty($date))
{
return '';
}
$date_array = preg_split( '/[-\.\/ ]/', $date);
- if($this->php_date_format == 'd/m/Y')
+ if ($this->php_date_format == 'd/m/Y')
{
$sql_date = date('Y-m-d',mktime(0,0,0,$date_array[1],$date_array[0],$date_array[2]));
}
- elseif($this->php_date_format == 'm/d/Y')
+ elseif ($this->php_date_format == 'm/d/Y')
{
$sql_date = date('Y-m-d',mktime(0,0,0,$date_array[0],$date_array[1],$date_array[2]));
}
@@ -1150,7 +1150,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function _get_field_names_to_search(array $relation_values)
{
- if(!strstr($relation_values[2],'{'))
+ if (!strstr($relation_values[2],'{'))
return $this->_unique_join_name($relation_values[0]).'.'.$relation_values[2];
else
{
@@ -1192,20 +1192,20 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
{
$primary_key_value = $state_info->primary_key;
- if($this->callback_delete === null)
+ if ($this->callback_delete === null)
{
- if($this->callback_before_delete !== null)
+ if ($this->callback_before_delete !== null)
{
$callback_return = call_user_func($this->callback_before_delete, $primary_key_value);
- if($callback_return === false)
+ if ($callback_return === false)
{
return false;
}
}
- if(!empty($this->relation_n_n))
+ if (!empty($this->relation_n_n))
{
foreach($this->relation_n_n as $field_name => $field_info)
{
@@ -1215,16 +1215,16 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$delete_result = $this->basic_model->db_delete($primary_key_value);
- if($delete_result === false)
+ if ($delete_result === false)
{
return false;
}
- if($this->callback_after_delete !== null)
+ if ($this->callback_after_delete !== null)
{
$callback_return = call_user_func($this->callback_after_delete, $primary_key_value);
- if($callback_return === false)
+ if ($callback_return === false)
{
return false;
}
@@ -1235,7 +1235,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
{
$callback_return = call_user_func($this->callback_delete, $primary_key_value);
- if($callback_return === false)
+ if ($callback_return === false)
{
return false;
}
@@ -1256,44 +1256,44 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function get_list()
{
- if(!empty($this->order_by))
+ if (!empty($this->order_by))
$this->basic_model->order_by($this->order_by[0],$this->order_by[1]);
- if(!empty($this->where))
+ if (!empty($this->where))
foreach($this->where as $where)
$this->basic_model->where($where[0],$where[1],$where[2]);
- if(!empty($this->or_where))
+ if (!empty($this->or_where))
foreach($this->or_where as $or_where)
$this->basic_model->or_where($or_where[0],$or_where[1],$or_where[2]);
- if(!empty($this->like))
+ if (!empty($this->like))
foreach($this->like as $like)
$this->basic_model->like($like[0],$like[1],$like[2]);
- if(!empty($this->or_like))
+ if (!empty($this->or_like))
foreach($this->or_like as $or_like)
$this->basic_model->or_like($or_like[0],$or_like[1],$or_like[2]);
- if(!empty($this->having))
+ if (!empty($this->having))
foreach($this->having as $having)
$this->basic_model->having($having[0],$having[1],$having[2]);
- if(!empty($this->or_having))
+ if (!empty($this->or_having))
foreach($this->or_having as $or_having)
$this->basic_model->or_having($or_having[0],$or_having[1],$or_having[2]);
- if(!empty($this->relation))
+ if (!empty($this->relation))
foreach($this->relation as $relation)
$this->basic_model->join_relation($relation[0],$relation[1],$relation[2]);
- if(!empty($this->relation_n_n))
+ if (!empty($this->relation_n_n))
{
$columns = $this->get_columns();
foreach($columns as $column)
{
//Use the relation_n_n ONLY if the column is called . The set_relation_n_n are slow and it will make the table slower without any reason as we don't need those queries.
- if(isset($this->relation_n_n[$column->field_name]))
+ if (isset($this->relation_n_n[$column->field_name]))
{
$this->basic_model->set_relation_n_n_field($this->relation_n_n[$column->field_name]);
}
@@ -1301,12 +1301,12 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
- if($this->theme_config['crud_paging'] === true)
+ if ($this->theme_config['crud_paging'] === true)
{
- if($this->limit === null)
+ if ($this->limit === null)
{
$default_per_page = $this->config->default_per_page;
- if(is_numeric($default_per_page) && $default_per_page >1)
+ if (is_numeric($default_per_page) && $default_per_page >1)
{
$this->basic_model->limit($default_per_page);
}
@@ -1330,7 +1330,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
{
$values = $this->basic_model->get_edit_values($primary_key_value);
- if(!empty($this->relation_n_n))
+ if (!empty($this->relation_n_n))
{
foreach($this->relation_n_n as $field_name => $field_info)
{
@@ -1358,17 +1358,17 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function upload_file($state_info)
{
- if(isset($this->upload_fields[$state_info->field_name]) )
+ if (isset($this->upload_fields[$state_info->field_name]) )
{
- if($this->callback_upload === null)
+ if ($this->callback_upload === null)
{
- if($this->callback_before_upload !== null)
+ if ($this->callback_before_upload !== null)
{
$callback_before_upload_response = call_user_func($this->callback_before_upload, $_FILES, $this->upload_fields[$state_info->field_name]);
- if($callback_before_upload_response === false)
+ if ($callback_before_upload_response === false)
return false;
- elseif(is_string($callback_before_upload_response))
+ elseif (is_string($callback_before_upload_response))
return $callback_before_upload_response;
}
@@ -1385,7 +1385,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$allowed_files = $this->config->file_upload_allow_file_types;
$reg_exp = '';
- if(!empty($upload_info->allowed_file_types)){
+ if (!empty($upload_info->allowed_file_types)){
$reg_exp = '/(\\.|\\/)('.$upload_info->allowed_file_types.')$/i';
}else{
$reg_exp = '/(\\.|\\/)('.$allowed_files.')$/i';
@@ -1405,7 +1405,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
$upload_handler->default_config_path = $this->default_config_path;
$uploader_response = $upload_handler->post();
- if(is_array($uploader_response))
+ if (is_array($uploader_response))
{
foreach($uploader_response as &$response)
{
@@ -1414,15 +1414,15 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
}
}
- if($this->callback_after_upload !== null)
+ if ($this->callback_after_upload !== null)
{
$callback_after_upload_response = call_user_func($this->callback_after_upload, $uploader_response , $this->upload_fields[$state_info->field_name] , $_FILES );
- if($callback_after_upload_response === false)
+ if ($callback_after_upload_response === false)
return false;
- elseif(is_string($callback_after_upload_response))
+ elseif (is_string($callback_after_upload_response))
return $callback_after_upload_response;
- elseif(is_array($callback_after_upload_response))
+ elseif (is_array($callback_after_upload_response))
$uploader_response = $callback_after_upload_response;
}
@@ -1432,7 +1432,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
{
$upload_response = call_user_func($this->callback_upload, $_FILES, $this->upload_fields[$state_info->field_name] );
- if($upload_response === false)
+ if ($upload_response === false)
{
return false;
}
@@ -1451,13 +1451,13 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function delete_file($state_info)
{
- if(isset($state_info->field_name) && isset($this->upload_fields[$state_info->field_name]))
+ if (isset($state_info->field_name) && isset($this->upload_fields[$state_info->field_name]))
{
$upload_info = $this->upload_fields[$state_info->field_name];
- if(file_exists("{$upload_info->upload_path}/{$state_info->file_name}"))
+ if (file_exists("{$upload_info->upload_path}/{$state_info->file_name}"))
{
- if( unlink("{$upload_info->upload_path}/{$state_info->file_name}") )
+ if ( unlink("{$upload_info->upload_path}/{$state_info->file_name}") )
{
$this->basic_model->db_file_delete($state_info->field_name, $state_info->file_name);
@@ -1482,7 +1482,7 @@ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types
protected function ajax_relation($state_info)
{
- if(!isset($this->relation[$state_info->field_name]))
+ if (!isset($this->relation[$state_info->field_name]))
return false;
list($field_name, $related_table, $related_field_title, $where_clause, $order_by) = $this->relation[$state_info->field_name];
@@ -1536,7 +1536,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver
{
//var_dump($this->theme_path);
//var_dump($this->theme);
- if(!file_exists($this->theme_path.$this->theme.'/views/list_template.php'))
+ if (!file_exists($this->theme_path.$this->theme.'/views/list_template.php'))
{
throw new Exception('The template does not exist. Please check your files and try again.', 12);
die();
@@ -1586,7 +1586,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver
$data->paging_options = $this->config->paging_options;
$data->default_per_page = is_numeric($default_per_page) && $default_per_page >1 && in_array($default_per_page,$data->paging_options)? $default_per_page : 25;
- if($data->list === false)
+ if ($data->list === false)
{
throw new Exception('It is impossible to get data. Please check your model and try again.', 13);
$data->list = array();
@@ -1600,7 +1600,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver
$data->list[$num_row]->read_url = $data->read_url.'/'.$row->{$data->primary_key};
}
- if(!$ajax)
+ if (!$ajax)
{
$this->_add_js_vars(array('dialog_forms' => $this->config->dialog_forms));
@@ -1728,7 +1728,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver
$value = str_replace(array(" ","&",">","<"),array(" ","&",">","<"),$value);
//If the value has only spaces and nothing more then add the whitespace html character
- if(str_replace(" ","",$value) == "")
+ if (str_replace(" ","",$value) == "")
$value = " ";
return strip_tags($value);
@@ -1756,7 +1756,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver
protected function change_list_add_actions($list)
{
- if(empty($this->actions))
+ if (empty($this->actions))
return $list;
$primary_key = $this->get_primary_key();
@@ -1766,7 +1766,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver
$actions_urls = array();
foreach($this->actions as $unique_id => $action)
{
- if(!empty($action->url_callback))
+ if (!empty($action->url_callback))
{
$actions_urls[$unique_id] = call_user_func($action->url_callback, $row->$primary_key, $row);
}
@@ -1795,9 +1795,9 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver
{
$field_name = $column->field_name;
$field_value = isset( $row->{$column->field_name} ) ? $row->{$column->field_name} : null;
- if( $has_callbacks && isset($this->callback_column[$field_name]) )
+ if ( $has_callbacks && isset($this->callback_column[$field_name]) )
$list[$num_row]->$field_name = call_user_func($this->callback_column[$field_name], $field_value, $row);
- elseif(isset($types[$field_name]))
+ elseif (isset($types[$field_name]))
$list[$num_row]->$field_name = $this->change_list_value($types[$field_name] , $field_value);
else
$list[$num_row]->$field_name = $field_value;
@@ -1896,7 +1896,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver
protected function delete_layout($delete_result = true)
{
@ob_end_clean();
- if($delete_result === false)
+ if ($delete_result === false)
{
$error_message = ' '.$this->l('delete_error_message').'
'.$this->l('insert_success_message'); - if(!$this->unset_back_to_list && !empty($insert_result) && !$this->unset_edit) + if (!$this->unset_back_to_list && !empty($insert_result) && !$this->unset_edit) { $success_message .= " ".$this->l('form_edit')." {$this->subject} "; @@ -1950,7 +1950,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver } } - if(!$this->unset_back_to_list && !$this->_is_ajax()) + if (!$this->unset_back_to_list && !$this->_is_ajax()) { $success_message .= " ".$this->l('form_go_back_to_list').""; } @@ -1977,7 +1977,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver protected function upload_layout($upload_result, $field_name) { @ob_end_clean(); - if($upload_result !== false && !is_string($upload_result) && empty($upload_result[0]->error)) + if ($upload_result !== false && !is_string($upload_result) && empty($upload_result[0]->error)) { echo json_encode( (object)array( @@ -1988,9 +1988,9 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver else { $result = (object)array('success' => false); - if(is_string($upload_result)) + if (is_string($upload_result)) $result->message = $upload_result; - if(!empty($upload_result[0]->error)) + if (!empty($upload_result[0]->error)) $result->message = $upload_result[0]->error; echo json_encode($result); @@ -2002,7 +2002,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver protected function delete_file_layout($upload_result) { @ob_end_clean(); - if($upload_result !== false) + if ($upload_result !== false) { echo json_encode( (object)array( 'success' => true ) ); } @@ -2127,7 +2127,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver unset($css_files[sha1($this->default_theme_path.'/bootstrap/css/bootstrap/bootstrap.min.css')]); } - if($this->echo_and_die === false) + if ($this->echo_and_die === false) { /** Initialize JavaScript variables */ $js_vars = array( @@ -2147,7 +2147,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver 'output' => $this->views_as_string, ); } - elseif($this->echo_and_die === true) + elseif ($this->echo_and_die === true) { echo $this->views_as_string; die(); @@ -2157,14 +2157,14 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver protected function update_layout($update_result = false, $state_info = null) { @ob_end_clean(); - if($update_result === false) + if ($update_result === false) { echo json_encode(array('success' => $update_result)); } else { $success_message = '
'.$this->l('update_success_message'); - if(!$this->unset_back_to_list && !$this->_is_ajax()) + if (!$this->unset_back_to_list && !$this->_is_ajax()) { $success_message .= " ".$this->l('form_go_back_to_list').""; } @@ -2185,7 +2185,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver $this->set_js_lib($this->default_javascript_path.'/jquery_plugins/jquery.numeric.min.js'); $this->set_js_config($this->default_javascript_path.'/jquery_plugins/config/jquery.numeric.config.js'); $extra_attributes = ''; - if(!empty($field_info->db_max_length)) + if (!empty($field_info->db_max_length)) $extra_attributes .= "maxlength='{$field_info->db_max_length}'"; $input = ""; return $input; @@ -2237,7 +2237,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver protected function get_text_input($field_info,$value) { - if($field_info->extras == 'text_editor') + if ($field_info->extras == 'text_editor') { $editor = $this->config->default_text_editor; switch ($editor) { @@ -2280,19 +2280,19 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver $this->set_js_lib($this->default_javascript_path.'/jquery_plugins/ui/'.grocery_CRUD::JQUERY_UI_JS); $this->set_js_lib($this->default_javascript_path.'/jquery_plugins/jquery-ui-timepicker-addon.js'); - if($this->language !== 'english') + if ($this->language !== 'english') { include($this->default_config_path.'/language_alias.php'); - if(array_key_exists($this->language, $language_alias)) + if (array_key_exists($this->language, $language_alias)) { $i18n_date_js_file = $this->default_javascript_path.'/jquery_plugins/ui/i18n/datepicker/jquery.ui.datepicker-'.$language_alias[$this->language].'.js'; - if(file_exists($i18n_date_js_file)) + if (file_exists($i18n_date_js_file)) { $this->set_js_lib($i18n_date_js_file); } $i18n_datetime_js_file = $this->default_javascript_path.'/jquery_plugins/ui/i18n/timepicker/jquery-ui-timepicker-'.$language_alias[$this->language].'.js'; - if(file_exists($i18n_datetime_js_file)) + if (file_exists($i18n_datetime_js_file)) { $this->set_js_lib($i18n_datetime_js_file); } @@ -2301,7 +2301,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver $this->set_js_config($this->default_javascript_path.'/jquery_plugins/config/jquery-ui-timepicker-addon.config.js'); - if(!empty($value) && $value != '0000-00-00 00:00:00' && $value != '1970-01-01 00:00:00'){ + if (!empty($value) && $value != '0000-00-00 00:00:00' && $value != '1970-01-01 00:00:00'){ list($year,$month,$day) = explode('-',substr($value,0,10)); $date = date($this->php_date_format, mktime(0,0,0,$month,$day,$year)); $datetime = $date.substr($value,10); @@ -2318,7 +2318,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver protected function get_hidden_input($field_info,$value) { - if($field_info->extras !== null && $field_info->extras != false) + if ($field_info->extras !== null && $field_info->extras != false) $value = $field_info->extras; $input = ""; return $input; @@ -2329,7 +2329,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver $value = !is_string($value) ? '' : $value; $extra_attributes = ''; - if(!empty($field_info->db_max_length)) + if (!empty($field_info->db_max_length)) $extra_attributes .= "maxlength='{$field_info->db_max_length}'"; $input = ""; return $input; @@ -2340,13 +2340,13 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver $this->set_css($this->default_css_path.'/ui/simple/'.grocery_CRUD::JQUERY_UI_CSS); $this->set_js_lib($this->default_javascript_path.'/jquery_plugins/ui/'.grocery_CRUD::JQUERY_UI_JS); - if($this->language !== 'english') + if ($this->language !== 'english') { include($this->default_config_path.'/language_alias.php'); - if(array_key_exists($this->language, $language_alias)) + if (array_key_exists($this->language, $language_alias)) { $i18n_date_js_file = $this->default_javascript_path.'/jquery_plugins/ui/i18n/datepicker/jquery.ui.datepicker-'.$language_alias[$this->language].'.js'; - if(file_exists($i18n_date_js_file)) + if (file_exists($i18n_date_js_file)) { $this->set_js_lib($i18n_date_js_file); } @@ -2355,7 +2355,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver $this->set_js_config($this->default_javascript_path.'/jquery_plugins/config/jquery.datepicker.config.js'); - if(!empty($value) && $value != '0000-00-00' && $value != '1970-01-01') + if (!empty($value) && $value != '0000-00-00' && $value != '1970-01-01') { list($year,$month,$day) = explode('-',substr($value,0,10)); $date = date($this->php_date_format, mktime(0,0,0,$month,$day,$year)); @@ -2492,7 +2492,7 @@ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver $input = "