diff --git a/application/controllers/system/Filters.php b/application/controllers/system/Filters.php index fcf37f158..648868d61 100644 --- a/application/controllers/system/Filters.php +++ b/application/controllers/system/Filters.php @@ -39,11 +39,11 @@ class Filters extends VileSci_Controller $session = $this->_readSession($this->_getFilterUniqueId()); - $json->selectedFields = $session['selectedFields']; - $json->columnsAliases = $session['columnsAliases']; - $json->additionalColumns = $session['additionalColumns']; - $json->checkboxes = $session['checkboxes']; - $json->dataset = $session['dataset']; + $json->selectedFields = $this->_getFromSession('selectedFields'); + $json->columnsAliases = $this->_getFromSession('columnsAliases'); + $json->additionalColumns = $this->_getFromSession('additionalColumns'); + $json->checkboxes = $this->_getFromSession('checkboxes'); + $json->dataset = $this->_getFromSession('dataset'); $this->output->set_content_type('application/json')->set_output(json_encode($json)); } @@ -57,11 +57,11 @@ class Filters extends VileSci_Controller $session = $this->_readSession($this->_getFilterUniqueId()); - $json->allSelectedFields = $session['allSelectedFields']; - $json->allColumnsAliases = $session['allColumnsAliases']; + $json->allSelectedFields = $this->_getFromSession('allSelectedFields'); + $json->allColumnsAliases = $this->_getFromSession('allColumnsAliases'); - $json->selectedFields = $session['selectedFields']; - $json->columnsAliases = $session['columnsAliases']; + $json->selectedFields = $this->_getFromSession('selectedFields'); + $json->columnsAliases = $this->_getFromSession('columnsAliases'); $this->output->set_content_type('application/json')->set_output(json_encode($json)); } @@ -79,11 +79,11 @@ class Filters extends VileSci_Controller $session = $this->_readSession($filterUniqueId); - $allSelectedFields = $session['allSelectedFields']; - $allColumnsAliases = $session['allColumnsAliases']; + $allSelectedFields = $this->_getFromSession('allSelectedFields'); + $allColumnsAliases = $this->_getFromSession('allColumnsAliases'); - $json->selectedFields = $session['selectedFields']; - $json->columnsAliases = $session['columnsAliases']; + $json->selectedFields = $this->_getFromSession('selectedFields'); + $json->columnsAliases = $this->_getFromSession('columnsAliases'); if (isset($selectedFieldsLst) && is_array($selectedFieldsLst)) { @@ -121,10 +121,10 @@ class Filters extends VileSci_Controller $session = $this->_readSession($this->_getFilterUniqueId()); - $json->allSelectedFields = $session['allSelectedFields']; - $json->allColumnsAliases = $session['allColumnsAliases']; + $json->allSelectedFields = $this->_getFromSession('allSelectedFields'); + $json->allColumnsAliases = $this->_getFromSession('allColumnsAliases'); - $json->selectedFilters = $session['selectedFilters']; + $json->selectedFilters = $this->_getFromSession('selectedFilters'); $json->selectedFiltersAliases = array(); $json->selectedFiltersMetaData = array(); @@ -132,10 +132,10 @@ class Filters extends VileSci_Controller $json->selectedFiltersActiveFiltersOperation = array(); $json->selectedFiltersActiveFiltersOption = array(); - $metaData = $session['metaData']; - $activeFilters = $session['activeFilters']; - $activeFiltersOperation = $session['activeFiltersOperation']; - $activeFiltersOption = $session['activeFiltersOption']; + $metaData = $this->_getFromSession('metaData'); + $activeFilters = $this->_getFromSession('activeFilters'); + $activeFiltersOperation = $this->_getFromSession('activeFiltersOperation'); + $activeFiltersOption = $this->_getFromSession('activeFiltersOption'); for ($i = 0; $i < count($json->selectedFilters); $i++) { @@ -302,11 +302,11 @@ class Filters extends VileSci_Controller $session = $this->_readSession($filterUniqueId); - $allSelectedFields = $session['allSelectedFields']; - $allColumnsAliases = $session['allColumnsAliases']; + $allSelectedFields = $this->_getFromSession('allSelectedFields'); + $allColumnsAliases = $this->_getFromSession('allColumnsAliases'); - $selectedFields = $session['selectedFields']; - $columnsAliases = $session['columnsAliases']; + $selectedFields = $this->_getFromSession('selectedFields'); + $columnsAliases = $this->_getFromSession('columnsAliases'); if (($pos = array_search($fieldName, $selectedFields)) !== false) { @@ -341,10 +341,10 @@ class Filters extends VileSci_Controller $session = $this->_readSession($filterUniqueId); - $selectedFilters = $session['selectedFilters']; - $selectedFiltersActiveFilters = $session['activeFilters']; - $selectedFiltersActiveFiltersOperation = $session['activeFiltersOperation']; - $selectedFiltersActiveFiltersOption = $session['activeFiltersOption']; + $selectedFilters = $this->_getFromSession('selectedFilters'); + $selectedFiltersActiveFilters = $this->_getFromSession('activeFilters'); + $selectedFiltersActiveFiltersOperation = $this->_getFromSession('activeFiltersOperation'); + $selectedFiltersActiveFiltersOption = $this->_getFromSession('activeFiltersOption'); if (($pos = array_search($fieldName, $selectedFilters)) !== false) { @@ -379,11 +379,11 @@ class Filters extends VileSci_Controller $session = $this->_readSession($filterUniqueId); - $allSelectedFields = $session['allSelectedFields']; - $allColumnsAliases = $session['allColumnsAliases']; + $allSelectedFields = $this->_getFromSession('allSelectedFields'); + $allColumnsAliases = $this->_getFromSession('allColumnsAliases'); - $selectedFields = $session['selectedFields']; - $columnsAliases = $session['columnsAliases']; + $selectedFields = $this->_getFromSession('selectedFields'); + $columnsAliases = $this->_getFromSession('columnsAliases'); if (($pos = array_search($fieldName, $allSelectedFields)) !== false && array_search($fieldName, $selectedFields) === false) @@ -419,10 +419,10 @@ class Filters extends VileSci_Controller $session = $this->_readSession($filterUniqueId); - $selectedFilters = $session['selectedFilters']; - $selectedFiltersActiveFilters = $session['activeFilters']; - $selectedFiltersActiveFiltersOperation = $session['activeFiltersOperation']; - $selectedFiltersActiveFiltersOption = $session['activeFiltersOption']; + $selectedFilters = $this->_getFromSession('selectedFilters'); + $selectedFiltersActiveFilters = $this->_getFromSession('activeFilters'); + $selectedFiltersActiveFiltersOperation = $this->_getFromSession('activeFiltersOperation'); + $selectedFiltersActiveFiltersOption = $this->_getFromSession('activeFiltersOption'); if (!in_array($fieldName, $selectedFilters)) { @@ -487,7 +487,7 @@ class Filters extends VileSci_Controller $session = $this->_readSession($this->_getFilterUniqueId()); - $dataset = $session['dataset']; + $dataset = $this->_getFromSession('dataset'); if (is_array($dataset)) { @@ -540,4 +540,16 @@ class Filters extends VileSci_Controller return $_getFilterUniqueId; } + + /** + * + */ + private function _getFromSession($el) + { + $_getFromSession = null; + + if (isset($_SESSION[$el])) return $_SESSION[$el]; + + return $_getFromSession; + } } diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 35b4d2879..25a653eb1 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -95,7 +95,9 @@ class InfoCenter extends FHC_Controller if(!$this->permissionlib->isBerechtigt('basis/person')) show_error('You have no Permission! You need Infocenter Role'); - $this->_setControllerId(); // sets the controller id + $this->setControllerId(); // sets the controller id + + $this->fhc_controller_id = $this->getControllerId(); $this->setNavigationMenuArray(); // sets property navigationMenuArray } @@ -153,7 +155,7 @@ class InfoCenter extends FHC_Controller } /** - * unlocks page from edit by a person, redirects to overview filter page + * Unlocks page from edit by a person, redirects to overview filter page * @param $person_id */ public function unlockPerson($person_id) @@ -167,7 +169,7 @@ class InfoCenter extends FHC_Controller } /** - * Saves if a document has been formal geprueft. saves current timestamp if checked as geprueft, or null if not. + * Saves if a document has been formal geprueft. Saves current timestamp if checked as geprueft, or null if not. * @param $person_id */ public function saveFormalGeprueft($person_id) @@ -175,37 +177,36 @@ class InfoCenter extends FHC_Controller $akte_id = $this->input->post('akte_id'); $formalgeprueft = $this->input->post('formal_geprueft'); - if (!isset($akte_id) || !isset($formalgeprueft) || !isset($person_id)) - show_error('Parameters not set!'); + $json = false; - $akte = $this->AkteModel->load($akte_id); - - if (isError($akte)) + if (isset($akte_id) && isset($formalgeprueft) && isset($person_id)) { - show_error($akte->retval); + $akte = $this->AkteModel->load($akte_id); + + if (hasData($akte)) + { + $timestamp = ($formalgeprueft === 'true') ? date('Y-m-d H:i:s') : null; + $result = $this->AkteModel->update($akte_id, array('formal_geprueft_amum' => $timestamp)); + + if (isSuccess($result)) + { + $json = $timestamp; + + $this->_log( + $person_id, + 'saveformalgep', + array( + empty($akte->retval[0]->titel) ? $akte->retval[0]->bezeichnung : $akte->retval[0]->titel, + is_null($timestamp) ? 'NULL' : $timestamp + ) + ); + } + } } - $timestamp = ($formalgeprueft === 'true') ? date('Y-m-d H:i:s') : null; - $result = $this->AkteModel->update($akte_id, array('formal_geprueft_amum' => $timestamp)); - - if (isError($result)) - { - show_error($result->retval); - } - - //write person log - $this->_log( - $person_id, - 'saveformalgep', - array( - empty($akte->retval[0]->titel) ? $akte->retval[0]->bezeichnung : $akte->retval[0]->titel, - is_null($timestamp) ? 'NULL' : $timestamp - ) - ); - $this->output ->set_content_type('application/json') - ->set_output(json_encode($timestamp)); + ->set_output(json_encode($json)); } /** @@ -216,20 +217,13 @@ class InfoCenter extends FHC_Controller { $prestudent = $this->PrestudentModel->getLastPrestudent($person_id, true); - if (isError($prestudent)) - { - show_error($prestudent->retval); - } - - $jsonoutput = count($prestudent->retval) > 0 ? $prestudent->retval[0] : null; - $this->output ->set_content_type('application/json') - ->set_output(json_encode($jsonoutput)); + ->set_output(json_encode($prestudent)); } /** - * Gets Zugangsvoraussetzungen for a prestudents as a description text + * Gets Zugangsvoraussetzungen for a prestudent as a description text and shows them in a view * @param $prestudent_id */ public function getZgvInfoForPrestudent($prestudent_id) @@ -240,7 +234,11 @@ class InfoCenter extends FHC_Controller $studiengangkurzbz = $prestudentdata['studiengang_kurzbz']; $studiengangbezeichnung = $prestudentdata['studiengang_bezeichnung']; - $data = array('studiengang_bezeichnung' => $studiengangbezeichnung, 'studiengang_kurzbz' => $studiengangkurzbz, 'data' => null); + $data = array( + 'studiengang_bezeichnung' => $studiengangbezeichnung, + 'studiengang_kurzbz' => $studiengangkurzbz, + 'data' => null + ); if (hasData($studienordnung)) { @@ -253,54 +251,58 @@ class InfoCenter extends FHC_Controller } /** - * Saves a zgv for a prestudent. includes Ort, Datum, Nation for bachelor and master. + * Saves a ZGV for a prestudent, includes Ort, Datum, Nation for bachelor and master * @param $prestudent_id */ - public function saveZgvPruefung($prestudent_id) + public function saveZgvPruefung() { - // zgvdata - // Check for string null, in case dropdown changed to default value - $zgv_code = $this->input->post('zgv') === 'null' ? null : $this->input->post('zgv'); - $zgvort = $this->input->post('zgvort'); - $zgvdatum = $this->input->post('zgvdatum'); - $zgvdatum = empty($zgvdatum) ? null : date_format(date_create($zgvdatum), 'Y-m-d'); - $zgvnation_code = $this->input->post('zgvnation') === 'null' ? null : $this->input->post('zgvnation'); + $prestudent_id = $this->input->post('prestudentid'); - //zgvmasterdata - $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas'); - $zgvmaort = $this->input->post('zgvmaort'); - $zgvmadatum = $this->input->post('zgvmadatum'); - $zgvmadatum = empty($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d'); - $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation'); - - $result = $this->PrestudentModel->update( - $prestudent_id, - array( - 'zgv_code' => $zgv_code, - 'zgvort' => $zgvort, - 'zgvdatum' => $zgvdatum, - 'zgvnation' => $zgvnation_code, - 'zgvmas_code' => $zgvmas_code, - 'zgvmaort' => $zgvmaort, - 'zgvmadatum' => $zgvmadatum, - 'zgvmanation' => $zgvmanation_code, - 'updateamum' => date('Y-m-d H:i:s') - ) - ); - - if (isError($result)) + if (empty($prestudent_id)) + $result = error('Prestudentid missing'); + else { - show_error($result->retval); + // zgvdata + // Check for string null, in case dropdown changed to default value + $zgv_code = $this->input->post('zgv') === 'null' ? null : $this->input->post('zgv'); + $zgvort = $this->input->post('zgvort'); + $zgvdatum = $this->input->post('zgvdatum'); + $zgvdatum = empty($zgvdatum) ? null : date_format(date_create($zgvdatum), 'Y-m-d'); + $zgvnation_code = $this->input->post('zgvnation') === 'null' ? null : $this->input->post('zgvnation'); + + //zgvmasterdata + $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas'); + $zgvmaort = $this->input->post('zgvmaort'); + $zgvmadatum = $this->input->post('zgvmadatum'); + $zgvmadatum = empty($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d'); + $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation'); + + $result = $this->PrestudentModel->update( + $prestudent_id, + array( + 'zgv_code' => $zgv_code, + 'zgvort' => $zgvort, + 'zgvdatum' => $zgvdatum, + 'zgvnation' => $zgvnation_code, + 'zgvmas_code' => $zgvmas_code, + 'zgvmaort' => $zgvmaort, + 'zgvmadatum' => $zgvmadatum, + 'zgvmanation' => $zgvmanation_code, + 'updateamum' => date('Y-m-d H:i:s') + ) + ); + + if (isSuccess($result)) + { + //get extended Prestudent data for logging + $logdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + + $this->_log($logdata['person_id'], 'savezgv', array($logdata['studiengang_kurzbz'], $prestudent_id)); + } } - - //get extended Prestudent data for logging - $logdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); - - $this->_log($logdata['person_id'], 'savezgv', array($logdata['studiengang_kurzbz'], $prestudent_id)); - $this->output ->set_content_type('application/json') - ->set_output(json_encode($result->retval)); + ->set_output(json_encode($result)); } /** @@ -311,6 +313,7 @@ class InfoCenter extends FHC_Controller public function saveAbsage($prestudent_id) { $statusgrund = $this->input->post('statusgrund'); + $this->fhc_controller_id = $this->input->post('fhc_controller_id'); $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id); @@ -448,16 +451,14 @@ class InfoCenter extends FHC_Controller $result = $this->NotizModel->addNotizForPerson($person_id, $titel, $text, $erledigt, $this->uid); - if (isError($result)) + if (isSuccess($result)) { - show_error($result->retval); + $this->_log($person_id, 'savenotiz', array($titel)); } - $this->_log($person_id, 'savenotiz', array($titel)); - $this->output ->set_content_type('application/json') - ->set_output(json_encode($result->retval)); + ->set_output(json_encode($result)); } /** @@ -482,19 +483,15 @@ class InfoCenter extends FHC_Controller ) ); - $json = false; - if (isSuccess($result)) { - $json = true; - //set log "Notiz updated" $this->_log($person_id, 'updatenotiz', array($titel)); } $this->output ->set_content_type('application/json') - ->set_output(json_encode($json)); + ->set_output(json_encode($result)); } /** @@ -565,14 +562,18 @@ class InfoCenter extends FHC_Controller } /** - * Initializes parking of a person, i.e. a person is not expected to do any actions while it is parked + * Initializes parking of a person, i.e. a person is not expected to do any actions while parked */ public function park() { $person_id = $this->input->post('person_id'); $date = $this->input->post('parkdate'); - $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->uid); + $result = $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->uid); + + $this->output + ->set_content_type('application/json') + ->set_output(json_encode($result)); } /** @@ -582,7 +583,11 @@ class InfoCenter extends FHC_Controller { $person_id = $this->input->post('person_id'); - $this->personloglib->unPark($person_id); + $result = $this->personloglib->unPark($person_id); + + $this->output + ->set_content_type('application/json') + ->set_output(json_encode($result)); } /** @@ -1090,21 +1095,4 @@ class InfoCenter extends FHC_Controller $this->loglib->logError('Studiengang has no mail for sending Freigabe mail'); } } - - /** - * Sets the unique id for the called controller - */ - private function _setControllerId() - { - $fhc_controller_id = $this->input->get('fhc_controller_id'); - - if (!isset($fhc_controller_id) || empty($fhc_controller_id)) - { - $fhc_controller_id = uniqid(); - header('Location: '.$_SERVER['REQUEST_URI'].'?fhc_controller_id='.$fhc_controller_id); - exit; - } - - $this->fhc_controller_id = $fhc_controller_id; - } } diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php index 815c03da2..fc200d935 100644 --- a/application/core/FHC_Controller.php +++ b/application/core/FHC_Controller.php @@ -46,7 +46,15 @@ class FHC_Controller extends CI_Controller { $this->_controllerId = uniqid(); // generate a unique id // Redirect to the same URL, but giving FHC_CONTROLLER_ID as HTTP GET parameter - header(sprintf('Location: %s?%s=%s', $_SERVER['REQUEST_URI'], self::FHC_CONTROLLER_ID, $this->_controllerId)); + header( + sprintf( + 'Location: %s%s%s=%s', + $_SERVER['REQUEST_URI'], + strpos($_SERVER['REQUEST_URI'], '?') === false ? '?' : '&', // place the corret character to divide parameters + self::FHC_CONTROLLER_ID, + $this->_controllerId + ) + ); exit; // terminate immediately the execution of this controller } } diff --git a/application/libraries/PersonLogLib.php b/application/libraries/PersonLogLib.php index 8145b88ac..e933f532e 100644 --- a/application/libraries/PersonLogLib.php +++ b/application/libraries/PersonLogLib.php @@ -91,7 +91,7 @@ class PersonLogLib * @param string $app * @param null $oe_kurzbz * @param null $user - * @return bool wether parking was successfull + * @return insert object */ public function park($person_id, $date, $taetigkeit_kurzbz, $app = 'core', $oe_kurzbz = null, $user = null) { @@ -110,16 +110,13 @@ class PersonLogLib 'insertvon' => $user ); - $result = $this->ci->PersonLogModel->insert($data); - if (isSuccess($result)) - return true; - else - show_error($result->retval); + return $this->ci->PersonLogModel->insert($data); } /** * Unparks a person, i.e. removes all log entries in the future * @param $person_id + * @return array with deleted logids */ public function unPark($person_id) { @@ -127,24 +124,21 @@ class PersonLogLib $deleted = array(); - if (isSuccess($result)) + if (hasData($result)) { - if (count($result->retval) > 0) + foreach ($result->retval as $log) { - foreach ($result->retval as $log) + $logdata = json_decode($log->logdata); + if (isset($logdata->name) && $logdata->name === self::PARKED_LOGNAME) { - $logdata = json_decode($log->logdata); - if (isset($logdata->name) && $logdata->name === self::PARKED_LOGNAME) - { - $delresult = $this->ci->PersonLogModel->deleteLog($log->log_id); - if (isSuccess($delresult)) - $deleted[] = $log->log_id; - } + $delresult = $this->ci->PersonLogModel->deleteLog($log->log_id); + if (isSuccess($delresult)) + $deleted[] = $log->log_id; } } } - else - show_error($result->retval); + + return $deleted; } /** @@ -158,23 +152,18 @@ class PersonLogLib $parkeddate = null; - if (isSuccess($result)) + if (hasData($result)) { - if (count($result->retval) > 0) + foreach ($result->retval as $log) { - foreach ($result->retval as $log) + $logdata = json_decode($log->logdata); + if (isset($logdata->name) && $logdata->name === self::PARKED_LOGNAME) { - $logdata = json_decode($log->logdata); - if (isset($logdata->name) && $logdata->name === self::PARKED_LOGNAME) - { - $parkeddate = $log->zeitpunkt; - break; - } + $parkeddate = $log->zeitpunkt; + break; } } } - else - show_error($result->retval); return $parkeddate; } diff --git a/application/models/system/Filters_model.php b/application/models/system/Filters_model.php index d84cddf80..eb81dbb32 100644 --- a/application/models/system/Filters_model.php +++ b/application/models/system/Filters_model.php @@ -44,7 +44,6 @@ class Filters_model extends DB_Model $filterParametersArray = array( 'app' => $app, 'dataset_name' => $dataset_name, - 'default_filter' => false, 'array_length(description, 1) >' => 0, 'uid' => $uid ); diff --git a/application/views/system/infocenter/addNotiz.php b/application/views/system/infocenter/addNotiz.php index f8f02570a..56bccbfaf 100644 --- a/application/views/system/infocenter/addNotiz.php +++ b/application/views/system/infocenter/addNotiz.php @@ -2,11 +2,11 @@
- +
- +
@@ -21,8 +21,9 @@
- - + + +
- \ No newline at end of file + diff --git a/application/views/system/infocenter/anmerkungenZurBewerbung.php b/application/views/system/infocenter/anmerkungenZurBewerbung.php index ee21b55e8..85682d2a4 100644 --- a/application/views/system/infocenter/anmerkungenZurBewerbung.php +++ b/application/views/system/infocenter/anmerkungenZurBewerbung.php @@ -5,7 +5,7 @@ - + diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index b599b6b06..b7fbbd4a7 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -2,11 +2,11 @@
p->t('infocenter','anmerkungenZurBewerbung')) ?>p->t('infocenter','anmerkungenZurBewerbung')) ?>
- - - - - + + + + + @@ -35,14 +35,14 @@ 0): ?>
-

p->t('infocenter','nachzureichendeDokumente')) ?>

+

p->t('infocenter','nachzureichendeDokumente')) ?>

p->t('global','name')) ?>p->t('global','typ')) ?>p->t('global','uploaddatum')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('infocenter','formalGeprueft')) ?>p->t('global','name')) ?>p->t('global','typ')) ?>p->t('global','uploaddatum')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('infocenter','formalGeprueft')) ?>
- - - - + + + + diff --git a/application/views/system/infocenter/infocenter.php b/application/views/system/infocenter/infocenter.php index 9bc9ea20d..f33abff79 100644 --- a/application/views/system/infocenter/infocenter.php +++ b/application/views/system/infocenter/infocenter.php @@ -27,7 +27,7 @@
- +
diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index d33b33bd4..5ba35ed2d 100755 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -2,7 +2,6 @@ $APP = 'infocenter'; $NOTBEFORE = '2018-03-01 18:00:00'; - $filterWidgetArray = array( 'query' => ' SELECT @@ -83,7 +82,7 @@ FROM public.tbl_studiensemester WHERE ende >= NOW() ) - AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\') + AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\' and psss.studiensemester_kurzbz = \'WS2018\') LIMIT 1 ) AS "AnzahlAbgeschickt", array_to_string( @@ -104,7 +103,7 @@ FROM public.tbl_studiensemester WHERE ende >= NOW() ) - AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\') + AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\' and psss.studiensemester_kurzbz = \'WS2018\') LIMIT 1 ),\', \' ) AS "StgAbgeschickt", @@ -126,7 +125,7 @@ FROM public.tbl_studiensemester WHERE ende >= NOW() ) - AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\') + AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\' and psss.studiensemester_kurzbz = \'WS2018\') LIMIT 1 ),\', \' ) AS "StgNichtAbgeschickt", @@ -147,7 +146,7 @@ FROM public.tbl_studiensemester WHERE start >= NOW() ) - AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\') + AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\' and psss.studiensemester_kurzbz = \'WS2018\') LIMIT 1 ),\', \' ) AS "StgAktiv", @@ -221,7 +220,7 @@ 'Details', site_url('system/infocenter/InfoCenter/showDetails'), $datasetRaw->{'PersonId'}, - $this->input->get('fhc_controller_id') + (isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'') ); if ($datasetRaw->{'SendDate'} == null) diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index 5da3dc1c1..700c06569 100755 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -42,14 +42,14 @@
- p->t('global', 'wirdBearbeitetVon') . ':' ?> + p->t('global', 'wirdBearbeitetVon') . ':' ?>     p->t('ui', 'freigeben')) ?> + class="fa fa-sign-out"> p->t('ui', 'freigeben')) ?>
@@ -59,7 +59,7 @@
-

p->t('global','stammdaten')) ?>

+

p->t('global','stammdaten')) ?>

load->view('system/infocenter/stammdaten.php'); ?> load->view('system/infocenter/anmerkungenZurBewerbung.php'); ?> @@ -73,7 +73,7 @@
-

p->t('infocenter','dokumentenpruefung')) ?>

+

p->t('infocenter','dokumentenpruefung')) ?>

load->view('system/infocenter/dokpruefung.php'); ?>
@@ -87,7 +87,7 @@
-

p->t('infocenter', 'zgv') . ' - ' . ucfirst($this->p->t('lehre','pruefung'))?>

+

p->t('infocenter', 'zgv') . ' - ' . ucfirst($this->p->t('lehre','pruefung'))?>

load->view('system/infocenter/zgvpruefungen.php'); ?> @@ -102,7 +102,7 @@
-

p->t('global','nachrichten')) ?>

+

p->t('global','nachrichten')) ?>

@@ -121,7 +121,7 @@
-

p->t('global','notizen')) . ' & ' . ucfirst($this->p->t('global','aktivitaeten')) ?>

+

p->t('global','notizen')) . ' & ' . ucfirst($this->p->t('global','aktivitaeten')) ?>

diff --git a/application/views/system/infocenter/infocenterFreigegeben.php b/application/views/system/infocenter/infocenterFreigegeben.php old mode 100644 new mode 100755 index 03733efe1..f2c279b0f --- a/application/views/system/infocenter/infocenterFreigegeben.php +++ b/application/views/system/infocenter/infocenterFreigegeben.php @@ -69,7 +69,6 @@ INNER JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang USING(studiengang_kz) WHERE pss.status_kurzbz = \'Interessent\' - AND pss.bestaetigtam IS NULL AND ps.person_id = p.person_id AND tbl_studiengang.typ in(\'b\') AND studiensemester_kurzbz IN ( @@ -88,7 +87,6 @@ JOIN public.tbl_studiengang USING(studiengang_kz) WHERE pss.status_kurzbz = \'Interessent\' AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\') - AND pss.bestaetigtam IS NULL AND ps.person_id = p.person_id AND tbl_studiengang.typ in(\'b\') AND studiensemester_kurzbz IN ( @@ -107,7 +105,6 @@ JOIN public.tbl_studiengang USING(studiengang_kz) WHERE pss.status_kurzbz = \'Interessent\' AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\') - AND pss.bestaetigtam IS NULL AND ps.person_id = p.person_id AND tbl_studiengang.typ in(\'b\') AND studiensemester_kurzbz IN ( @@ -126,7 +123,6 @@ JOIN public.tbl_studiengang USING(studiengang_kz) WHERE pss.status_kurzbz = \'Interessent\' AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\') - AND pss.bestaetigtam IS NULL AND ps.person_id = p.person_id AND tbl_studiengang.typ in(\'b\') AND studiensemester_kurzbz IN ( @@ -150,11 +146,7 @@ WHERE person_id=p.person_id AND tbl_studiengang.typ in(\'b\') - AND \'Interessent\' = (SELECT status_kurzbz FROM public.tbl_prestudentstatus - WHERE prestudent_id=tbl_prestudent.prestudent_id - ORDER BY datum DESC, insertamum DESC, ext_id DESC - LIMIT 1 - ) + AND EXISTS ( SELECT 1 @@ -163,7 +155,7 @@ WHERE prestudent_id = tbl_prestudent.prestudent_id AND status_kurzbz = \'Interessent\' - AND (bestaetigtam IS NOT NULL AND (bewerbung_abgeschicktamum is null OR bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')) + AND (bestaetigtam IS NOT NULL AND bewerbung_abgeschicktamum >= \''.$NOTBEFORE.'\') AND studiensemester_kurzbz IN ( SELECT studiensemester_kurzbz FROM public.tbl_studiensemester @@ -171,7 +163,7 @@ ) ) ) - ORDER BY "LastAction" ASC + ORDER BY "LastAction" DESC ', 'checkboxes' => 'PersonId', 'additionalColumns' => array('Details'), @@ -183,7 +175,7 @@ 'Details', site_url('system/infocenter/InfoCenter/showDetails'), $datasetRaw->{'PersonId'}, - $this->input->get('fhc_controller_id') + (isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'') ); if ($datasetRaw->{'SendDate'} == null) diff --git a/application/views/system/infocenter/logs.php b/application/views/system/infocenter/logs.php index a45034818..de97d5055 100644 --- a/application/views/system/infocenter/logs.php +++ b/application/views/system/infocenter/logs.php @@ -1,8 +1,8 @@
p->t('global','typ')) ?>p->t('infocenter','nachzureichenAm')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('global','anmerkung')) ?>p->t('global','typ')) ?>p->t('infocenter','nachzureichenAm')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('global','anmerkung')) ?>
- - + + diff --git a/application/views/system/infocenter/notizen.php b/application/views/system/infocenter/notizen.php index d0c13e5ee..53d289721 100644 --- a/application/views/system/infocenter/notizen.php +++ b/application/views/system/infocenter/notizen.php @@ -1,8 +1,8 @@
p->t('global', 'datum')) ?>p->t('global', 'aktivitaet')) ?>p->t('global', 'datum')) ?>p->t('global', 'aktivitaet')) ?> User
- - + + diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index 45c2326e9..709370012 100755 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -2,41 +2,41 @@
p->t('global', 'datum')) ?>p->t('global', 'notiz')) ?>p->t('global', 'datum')) ?>p->t('global', 'notiz')) ?> User
- + - + - + - + - + - + - + - +
p->t('person','vorname')) ?>p->t('person','vorname')) ?> vorname ?>
p->t('person','nachname')) ?>p->t('person','nachname')) ?> nachname ?>
p->t('person','geburtsdatum')) ?>p->t('person','geburtsdatum')) ?> gebdatum), 'd.m.Y') ?>
p->t('person','svnr')) ?>p->t('person','svnr')) ?> svnr ?>
p->t('person','staatsbuergerschaft')) ?>p->t('person','staatsbuergerschaft')) ?> staatsbuergerschaft ?>
p->t('person','geschlecht')) ?>p->t('person','geschlecht')) ?> geschlecht ?>
p->t('person','geburtsnation')) ?>p->t('person','geburtsnation')) ?> geburtsnation ?>
p->t('person','geburtsort')) ?>p->t('person','geburtsort')) ?> gebort ?>
@@ -45,21 +45,21 @@ - + - - - + + + kontakte as $kontakt): ?> kontakttyp === 'email'): ?> - + kontakttyp === 'telefon'): ?> - +
p->t('global','kontakt')) ?>p->t('global','kontakt')) ?>
p->t('global','typ')) ?>p->t('global','kontakt')) ?>p->t('global','anmerkung')) ?>p->t('global','typ')) ?>p->t('global','kontakt')) ?>p->t('global','anmerkung')) ?>
p->t('person','email')) ?>p->t('person','email')) ?> p->t('person','telefon')) ?>p->t('person','telefon')) ?> kontakttyp.'">';?> @@ -80,7 +80,7 @@ adressen as $adresse): ?>
- p->t('person','adresse')) ?> + p->t('person','adresse')) ?> strasse.', '.$adresse->plz.' '.$adresse->ort : '' ?> @@ -101,13 +101,13 @@  p->t('ui','nachrichtSenden') ?> + class="fa fa-envelope"> p->t('ui','nachrichtSenden') ?> zugangscode)): ?>
 p->t('infocenter','zugangBewerbung') ?> + target='_blank'> p->t('infocenter','zugangBewerbung') ?>
diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 383dd5a62..82cc8c85f 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -27,7 +27,7 @@ prestudentstatus->bestaetigtam)): ?>
- p->t('global', 'anStudiengangFreigegeben') ?> + p->t('global', 'anStudiengangFreigegeben') ?>
@@ -49,7 +49,7 @@
- + prestudentstatus->status_kurzbz)) { @@ -60,7 +60,7 @@
- + prestudentstatus->studiensemester_kurzbz) ? $zgvpruefung->prestudentstatus->studiensemester_kurzbz : '' ?>
@@ -73,7 +73,7 @@
- + prestudentstatus->orgform)) ? ', ' : ''; @@ -90,18 +90,18 @@
- + zgv_bez; ?>
- +
- + zgvort); else: @@ -127,7 +127,7 @@
- + zgvdatum) ? "" : date_format(date_create($zgvpruefung->zgvdatum), 'd.m.Y'); if ($infoonly): @@ -143,7 +143,7 @@
- + zgvnation_bez; else @@ -159,7 +159,7 @@ studiengangtyp === 'm') : ?>
-
+
zgvmas_bez; @@ -173,7 +173,7 @@
- + zgvmaort; else: @@ -186,7 +186,7 @@
- + zgvmadatum) ? "" : date_format(date_create($zgvpruefung->zgvmadatum), 'd.m.Y'); if ($infoonly): @@ -201,7 +201,7 @@
-
+
zgvmanation_bez; @@ -220,12 +220,12 @@
@@ -243,12 +243,13 @@
+
- - - - - + + + + + diff --git a/application/views/system/messageWrite.php b/application/views/system/messageWrite.php index 85c003cfd..6b7b1a4ae 100644 --- a/application/views/system/messageWrite.php +++ b/application/views/system/messageWrite.php @@ -32,14 +32,14 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
- +
- +
- +
 
- +
- + 1) diff --git a/application/views/widgets/filter/filter.php b/application/views/widgets/filter/filter.php index ac29efe30..ef5da3c6c 100644 --- a/application/views/widgets/filter/filter.php +++ b/application/views/widgets/filter/filter.php @@ -1,13 +1,17 @@
- +
+ +
+ +
diff --git a/application/widgets/FilterWidget.php b/application/widgets/FilterWidget.php index 3bc76c8e6..fe74a661f 100644 --- a/application/widgets/FilterWidget.php +++ b/application/widgets/FilterWidget.php @@ -40,6 +40,7 @@ class FilterWidget extends Widget const ACTIVE_FILTERS_OPTION = 'activeFiltersOption'; const ACTIVE_FILTERS_OPERATION = 'activeFiltersOperation'; const FILTER_NAME = 'filterName'; + const FILTER_NAME_PHRASE = 'filterNamePhrase'; const ACTIVE_FILTER_OPTION_POSTFIX = '-option'; const ACTIVE_FILTER_OPERATION_POSTFIX = '-operation'; @@ -78,6 +79,7 @@ class FilterWidget extends Widget private $checkboxes; private $columnsAliases; private $filterName; + private $filterNamePhrase; private $dataset; private $metaData; @@ -123,8 +125,13 @@ class FilterWidget extends Widget $this->filterName = $filterSessionArray[self::FILTER_NAME]; } + if ($this->filterNamePhrase == null && isset($filterSessionArray[self::FILTER_NAME_PHRASE])) + { + $this->filterNamePhrase = $filterSessionArray[self::FILTER_NAME_PHRASE]; + } + // - if ($filterSessionArray[self::FILTER_ID] != $this->filterId) + if ($this->filterId <= 0 || $filterSessionArray[self::FILTER_ID] != $this->filterId) { // $this->_loadFilter(); @@ -136,75 +143,79 @@ class FilterWidget extends Widget // $this->FiltersModel->resetQuery(); - // - $this->dataset = @$this->FiltersModel->execReadOnlyQuery($this->_generateQuery()); - - // - $this->listFields = $this->FiltersModel->getExecutedQueryListFields(); - - // - $selectedFields = array(); - $filterSessionArray = $this->_readSession(); - if (isset($filterSessionArray[self::SELECTED_FIELDS])) + $query = $this->_generateQuery(); + if ($query != null) { - $selectedFields = $filterSessionArray[self::SELECTED_FIELDS]; - } + // + $this->dataset = @$this->FiltersModel->execReadOnlyQuery($query); - // - if (count($selectedFields) == 0) - { - $filterSessionArray[self::SELECTED_FIELDS] = $this->listFields; - } + // + $this->listFields = $this->FiltersModel->getExecutedQueryListFields(); - // - if ($this->columnsAliases != null && count($this->listFields) != count($this->columnsAliases)) - { - show_error('Parameter columnsAliases does not have a number of items equal to those returned by the query'); - } - - $filterSessionArray[self::COLUMNS_ALIASES] = $this->_getColumnAliasesFromPost(); - $filterSessionArray[self::CHECKBOXES] = $this->checkboxes; - - if ($this->app != null) - { - $filterSessionArray[self::APP_PARAMETER] = $this->app; - } - - if ($this->datasetName != null) - { - $filterSessionArray[self::DATASET_NAME_PARAMETER] = $this->datasetName; - } - - $filterSessionArray[self::ALL_SELECTED_FIELDS] = $this->listFields; - $filterSessionArray[self::ALL_COLUMNS_ALIASES] = $this->columnsAliases; - - /* ------------------------------------------------------------ */ - - $tmpDataset = null; - if (hasData($this->dataset)) - { - $tmpDataset = array(); - - for ($resultsCounter = 0; $resultsCounter < count($this->dataset->retval); $resultsCounter++) + // + $selectedFields = array(); + $filterSessionArray = $this->_readSession(); + if (isset($filterSessionArray[self::SELECTED_FIELDS])) { - $result = $this->dataset->retval[$resultsCounter]; - - $class = $this->_markRow($result); - $formattedResult = $this->_formatRaw($result); - $formattedResult->FILTER_CLASS_MARK_ROW = $class; - $tmpDataset[] = $formattedResult; + $selectedFields = $filterSessionArray[self::SELECTED_FIELDS]; } + + // + if (count($selectedFields) == 0) + { + $filterSessionArray[self::SELECTED_FIELDS] = $this->listFields; + } + + // + if ($this->columnsAliases != null && count($this->listFields) != count($this->columnsAliases)) + { + show_error('Parameter columnsAliases does not have a number of items equal to those returned by the query'); + } + + $filterSessionArray[self::COLUMNS_ALIASES] = $this->_getColumnAliasesFromPost(); + $filterSessionArray[self::CHECKBOXES] = $this->checkboxes; + + if ($this->app != null) + { + $filterSessionArray[self::APP_PARAMETER] = $this->app; + } + + if ($this->datasetName != null) + { + $filterSessionArray[self::DATASET_NAME_PARAMETER] = $this->datasetName; + } + + $filterSessionArray[self::ALL_SELECTED_FIELDS] = $this->listFields; + $filterSessionArray[self::ALL_COLUMNS_ALIASES] = $this->columnsAliases; + + /* ------------------------------------------------------------ */ + + $tmpDataset = null; + if (hasData($this->dataset)) + { + $tmpDataset = array(); + + for ($resultsCounter = 0; $resultsCounter < count($this->dataset->retval); $resultsCounter++) + { + $result = $this->dataset->retval[$resultsCounter]; + + $class = $this->_markRow($result); + $formattedResult = $this->_formatRaw($result); + $formattedResult->FILTER_CLASS_MARK_ROW = $class; + $tmpDataset[] = $formattedResult; + } + } + + $filterSessionArray[self::DATASET_PARAMETER] = $tmpDataset; + + /* ------------------------------------------------------------ */ + + // + $this->metaData = $this->FiltersModel->getExecutedQueryMetaData(); + + $filterSessionArray[self::METADATA_PARAMETER] = $this->metaData; } - $filterSessionArray[self::DATASET_PARAMETER] = $tmpDataset; - - /* ------------------------------------------------------------ */ - - // - $this->metaData = $this->FiltersModel->getExecutedQueryMetaData(); - - $filterSessionArray[self::METADATA_PARAMETER] = $this->metaData; - $this->_writeSession($filterSessionArray); // @@ -318,9 +329,13 @@ class FilterWidget extends Widget */ public static function displayFilterName() { - if (self::$FilterWidgetInstance->filterName != null && self::$FilterWidgetInstance->filterName != '') + if (self::$FilterWidgetInstance->filterNamePhrase != null && self::$FilterWidgetInstance->filterNamePhrase != '') { - echo '
'.self::$FilterWidgetInstance->filterName.'

'; + echo self::$FilterWidgetInstance->filterNamePhrase; + } + elseif (self::$FilterWidgetInstance->filterName != null && self::$FilterWidgetInstance->filterName != '') + { + echo self::$FilterWidgetInstance->filterName; } } @@ -506,6 +521,7 @@ class FilterWidget extends Widget $this->hideSave = false; $this->columnsAliases = null; $this->filterName = null; + $this->filterNamePhrase = null; $this->filterUniqueId = $this->_getFilterUniqueId(); @@ -619,12 +635,13 @@ class FilterWidget extends Widget $whereParameters = null; - if ($this->filterId == null) + if ($this->filterId <= 0) { + // Try to load the custom filter (person_id = logged user person_id) with the given "app" and "dataset_name" + // that is set as default filter (default_filter = true) $whereParameters = array( 'app' => $this->app, 'dataset_name' => $this->datasetName, - 'filter_kurzbz' => $this->filterKurzbz, 'uid' => getAuthUID(), 'default_filter' => true ); @@ -648,6 +665,24 @@ class FilterWidget extends Widget $jsonEncodedFilter = json_decode($filter->retval[0]->filter); } } + else // Try to load the global filter (person_id = null) with the given "app" and "dataset_name" that is set as + // default filter (default_filter = true) + { + $whereParameters = array( + 'app' => $this->app, + 'dataset_name' => $this->datasetName, + 'default_filter' => true + ); + + $filter = $this->FiltersModel->loadWhere($whereParameters); + if (hasData($filter)) + { + if (isset($filter->retval[0]->filter) && trim($filter->retval[0]->filter) != '') + { + $jsonEncodedFilter = json_decode($filter->retval[0]->filter); + } + } + } if ($jsonEncodedFilter != null) { @@ -657,6 +692,7 @@ class FilterWidget extends Widget $activeFiltersOperation = array(); $activeFiltersOption = array(); $filterName = null; + $filterNamePhrase = null; if (isset($jsonEncodedFilter->columns)) { @@ -695,7 +731,15 @@ class FilterWidget extends Widget $filterName = $jsonEncodedFilter->name; } + // Filter name from phrases system + if (isset($jsonEncodedFilter->namePhrase)) + { + $this->load->library('PhrasesLib', array('FilterWidget')); + $filterNamePhrase = $this->phraseslib->t('FilterWidget', $jsonEncodedFilter->namePhrase); + } + $this->filterName = $filterName; + $this->filterNamePhrase = $filterNamePhrase; $this->app = $filter->retval[0]->app; $filterSessionArray = array( @@ -1022,6 +1066,7 @@ class FilterWidget extends Widget $filterSessionArray[self::FILTER_ID] = $this->filterId; $filterSessionArray[self::FILTER_NAME] = $this->filterName; + $filterSessionArray[self::FILTER_NAME_PHRASE] = $this->filterNamePhrase; $this->_writeSession(array_merge($session, $filterSessionArray)); } @@ -1031,7 +1076,7 @@ class FilterWidget extends Widget */ private function _generateQuery() { - $query = $this->query; + $query = null;//$this->query; $activeFilters = array(); $activeFiltersOperation = array(); diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php index 40cefd67b..2ed3656c8 100644 --- a/cis/private/profile/index.php +++ b/cis/private/profile/index.php @@ -16,9 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * Authors: Christian Paminger , - * Andreas Oesterreicher , - * Rudolf Hangl and - * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at>. + * Andreas Oesterreicher , + * Rudolf Hangl and + * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at>. */ require_once('../../../config/cis.config.inc.php'); require_once('../../../config/global.config.inc.php'); @@ -42,7 +42,7 @@ require_once('../../../include/gruppe.class.php'); require_once('../../../include/adresse.class.php'); $sprache = getSprache(); -$p=new phrasen($sprache); +$p = new phrasen($sprache); if (!$db = new basis_db()) die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung')); @@ -51,39 +51,39 @@ $uid = get_uid(); $datum_obj = new datum(); -$ansicht=false; //Wenn ein anderer User sich das Profil ansieht (Bei Personensuche) -if(isset($_GET['uid'])) +$ansicht = false; //Wenn ein anderer User sich das Profil ansieht (Bei Personensuche) +if (isset($_GET['uid'])) { - $uid=stripslashes($_GET['uid']); - $ansicht=true; + $uid = stripslashes($_GET['uid']); + $ansicht = true; } -if(!$ansicht && isset($_GET['action'])) +if (!$ansicht && isset($_GET['action'])) { switch($_GET['action']) { case 'foto_freigabe': $benutzer = new benutzer(); - if($benutzer->load($uid)) + if ($benutzer->load($uid)) { $person = new person(); - if($person->load($benutzer->person_id)) + if ($person->load($benutzer->person_id)) { - $person->foto_sperre=false; - $person->new=false; + $person->foto_sperre = false; + $person->new = false; $person->save(); } } break; case 'foto_sperre': $benutzer = new benutzer(); - if($benutzer->load($uid)) + if ($benutzer->load($uid)) { $person = new person(); - if($person->load($benutzer->person_id)) + if ($person->load($benutzer->person_id)) { - $person->foto_sperre=true; - $person->new=false; + $person->foto_sperre = true; + $person->new = false; $person->save(); } } @@ -98,9 +98,9 @@ $stg_obj->getAll('typ, kurzbz', false); $stg_arr = array(); foreach ($stg_obj->result as $row) - $stg_arr[$row->studiengang_kz]=$row->kurzbzlang; + $stg_arr[$row->studiengang_kz] = $row->kurzbzlang; -if(check_lektor($uid)) +if (check_lektor($uid)) { $user = new mitarbeiter(); $type = 'mitarbeiter'; @@ -108,13 +108,13 @@ if(check_lektor($uid)) else { $user = new student(); - $type='student'; + $type = 'student'; } -if(!$user->load($uid)) +if (!$user->load($uid)) die($p->t('profil/esWurdenKeineProfileGefunden')); -if ($type=='mitarbeiter') +if ($type == 'mitarbeiter') { $vorwahl = ''; $kontakt = new kontakt(); @@ -130,11 +130,11 @@ echo ' - - - - - + + + + +
p->t('global','gesendetAm')) ?>p->t('global','sender')) ?>p->t('global','empfaenger')) ?>p->t('global','betreff')) ?>p->t('global','gelesenAm')) ?>p->t('global','gesendetAm')) ?>p->t('global','sender')) ?>p->t('global','empfaenger')) ?>p->t('global','betreff')) ?>p->t('global','gelesenAm')) ?>