From 1da4cdb9aa4ef62351a0f967e0b73117e3fcac8a Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 24 Apr 2019 19:46:19 +0200 Subject: [PATCH 01/84] - Removed languages files for CI file system based phrase system - Renamed application/language/de-AT/ to application/language/english/ - Kept language file rest_controller_lang.php to be used with the REST_Controller --- application/language/bg-BG/index.html | 11 --- .../language/bg-BG/rest_controller_lang.php | 17 ---- application/language/de-AT/calendar_lang.php | 84 ----------------- application/language/de-AT/date_lang.php | 94 ------------------- application/language/de-AT/db_lang.php | 63 ------------- application/language/de-AT/email_lang.php | 58 ------------ application/language/de-AT/fhc_model_lang.php | 16 ---- .../language/de-AT/fhcomplete_lang.php | 10 -- .../language/de-AT/form_validation_lang.php | 68 -------------- application/language/de-AT/ftp_lang.php | 51 ---------- application/language/de-AT/imglib_lang.php | 56 ----------- application/language/de-AT/index.html | 11 --- application/language/de-AT/message_lang.php | 28 ------ application/language/de-AT/migration_lang.php | 17 ---- application/language/de-AT/number_lang.php | 44 --------- .../language/de-AT/pagination_lang.php | 43 --------- application/language/de-AT/profiler_lang.php | 60 ------------ application/language/de-AT/seed_lang.php | 15 --- application/language/de-AT/unit_test_lang.php | 58 ------------ application/language/de-AT/upload_lang.php | 55 ----------- application/language/en-US/calendar_lang.php | 84 ----------------- application/language/en-US/date_lang.php | 94 ------------------- application/language/en-US/db_lang.php | 63 ------------- application/language/en-US/email_lang.php | 58 ------------ application/language/en-US/fhc_model_lang.php | 16 ---- .../language/en-US/fhcomplete_lang.php | 10 -- .../language/en-US/form_validation_lang.php | 68 -------------- application/language/en-US/ftp_lang.php | 51 ---------- application/language/en-US/imglib_lang.php | 56 ----------- application/language/en-US/index.html | 11 --- application/language/en-US/message_lang.php | 28 ------ application/language/en-US/migration_lang.php | 47 ---------- application/language/en-US/number_lang.php | 44 --------- .../language/en-US/pagination_lang.php | 43 --------- application/language/en-US/profiler_lang.php | 60 ------------ .../language/en-US/rest_controller_lang.php | 17 ---- application/language/en-US/seed_lang.php | 15 --- application/language/en-US/unit_test_lang.php | 58 ------------ application/language/en-US/upload_lang.php | 55 ----------- .../rest_controller_lang.php | 0 application/language/pt-BR/index.html | 11 --- .../language/pt-BR/rest_controller_lang.php | 17 ---- application/language/system/calendar_lang.php | 84 ----------------- application/language/system/date_lang.php | 94 ------------------- application/language/system/db_lang.php | 63 ------------- application/language/system/email_lang.php | 58 ------------ .../language/system/fhc_model_lang.php | 9 -- .../language/system/fhcomplete_lang.php | 10 -- .../language/system/form_validation_lang.php | 68 -------------- application/language/system/ftp_lang.php | 51 ---------- application/language/system/imglib_lang.php | 56 ----------- application/language/system/index.html | 11 --- application/language/system/message_lang.php | 27 ------ .../language/system/migration_lang.php | 17 ---- application/language/system/number_lang.php | 44 --------- .../language/system/pagination_lang.php | 43 --------- application/language/system/profiler_lang.php | 60 ------------ .../language/system/rest_controller_lang.php | 17 ---- application/language/system/seed_lang.php | 15 --- .../language/system/unit_test_lang.php | 58 ------------ application/language/system/upload_lang.php | 55 ----------- 61 files changed, 2605 deletions(-) delete mode 100644 application/language/bg-BG/index.html delete mode 100644 application/language/bg-BG/rest_controller_lang.php delete mode 100644 application/language/de-AT/calendar_lang.php delete mode 100644 application/language/de-AT/date_lang.php delete mode 100644 application/language/de-AT/db_lang.php delete mode 100644 application/language/de-AT/email_lang.php delete mode 100644 application/language/de-AT/fhc_model_lang.php delete mode 100644 application/language/de-AT/fhcomplete_lang.php delete mode 100644 application/language/de-AT/form_validation_lang.php delete mode 100644 application/language/de-AT/ftp_lang.php delete mode 100644 application/language/de-AT/imglib_lang.php delete mode 100644 application/language/de-AT/index.html delete mode 100644 application/language/de-AT/message_lang.php delete mode 100644 application/language/de-AT/migration_lang.php delete mode 100644 application/language/de-AT/number_lang.php delete mode 100644 application/language/de-AT/pagination_lang.php delete mode 100644 application/language/de-AT/profiler_lang.php delete mode 100644 application/language/de-AT/seed_lang.php delete mode 100644 application/language/de-AT/unit_test_lang.php delete mode 100644 application/language/de-AT/upload_lang.php delete mode 100644 application/language/en-US/calendar_lang.php delete mode 100644 application/language/en-US/date_lang.php delete mode 100644 application/language/en-US/db_lang.php delete mode 100644 application/language/en-US/email_lang.php delete mode 100644 application/language/en-US/fhc_model_lang.php delete mode 100644 application/language/en-US/fhcomplete_lang.php delete mode 100644 application/language/en-US/form_validation_lang.php delete mode 100644 application/language/en-US/ftp_lang.php delete mode 100644 application/language/en-US/imglib_lang.php delete mode 100644 application/language/en-US/index.html delete mode 100644 application/language/en-US/message_lang.php delete mode 100644 application/language/en-US/migration_lang.php delete mode 100644 application/language/en-US/number_lang.php delete mode 100644 application/language/en-US/pagination_lang.php delete mode 100644 application/language/en-US/profiler_lang.php delete mode 100644 application/language/en-US/rest_controller_lang.php delete mode 100644 application/language/en-US/seed_lang.php delete mode 100644 application/language/en-US/unit_test_lang.php delete mode 100644 application/language/en-US/upload_lang.php rename application/language/{de-AT => english}/rest_controller_lang.php (100%) delete mode 100644 application/language/pt-BR/index.html delete mode 100644 application/language/pt-BR/rest_controller_lang.php delete mode 100644 application/language/system/calendar_lang.php delete mode 100644 application/language/system/date_lang.php delete mode 100644 application/language/system/db_lang.php delete mode 100644 application/language/system/email_lang.php delete mode 100644 application/language/system/fhc_model_lang.php delete mode 100644 application/language/system/fhcomplete_lang.php delete mode 100644 application/language/system/form_validation_lang.php delete mode 100644 application/language/system/ftp_lang.php delete mode 100644 application/language/system/imglib_lang.php delete mode 100644 application/language/system/index.html delete mode 100644 application/language/system/message_lang.php delete mode 100644 application/language/system/migration_lang.php delete mode 100644 application/language/system/number_lang.php delete mode 100644 application/language/system/pagination_lang.php delete mode 100644 application/language/system/profiler_lang.php delete mode 100644 application/language/system/rest_controller_lang.php delete mode 100644 application/language/system/seed_lang.php delete mode 100644 application/language/system/unit_test_lang.php delete mode 100644 application/language/system/upload_lang.php diff --git a/application/language/bg-BG/index.html b/application/language/bg-BG/index.html deleted file mode 100644 index b702fbc39..000000000 --- a/application/language/bg-BG/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/bg-BG/rest_controller_lang.php b/application/language/bg-BG/rest_controller_lang.php deleted file mode 100644 index 6145307d4..000000000 --- a/application/language/bg-BG/rest_controller_lang.php +++ /dev/null @@ -1,17 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/de-AT/message_lang.php b/application/language/de-AT/message_lang.php deleted file mode 100644 index 02f98c1b7..000000000 --- a/application/language/de-AT/message_lang.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/en-US/message_lang.php b/application/language/en-US/message_lang.php deleted file mode 100644 index 02f98c1b7..000000000 --- a/application/language/en-US/message_lang.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/pt-BR/rest_controller_lang.php b/application/language/pt-BR/rest_controller_lang.php deleted file mode 100644 index 04bbf6e3c..000000000 --- a/application/language/pt-BR/rest_controller_lang.php +++ /dev/null @@ -1,17 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/system/message_lang.php b/application/language/system/message_lang.php deleted file mode 100644 index dd5cb55cf..000000000 --- a/application/language/system/message_lang.php +++ /dev/null @@ -1,27 +0,0 @@ - Date: Wed, 24 Apr 2019 19:48:21 +0200 Subject: [PATCH 02/84] - Renamed application/helpers/hlp_message_helper.php to application/helpers/hlp_return_object_helper.php - Added function _createReturnObject to hlp_return_object_helper.php --- ...elper.php => hlp_return_object_helper.php} | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) rename application/helpers/{hlp_message_helper.php => hlp_return_object_helper.php} (69%) diff --git a/application/helpers/hlp_message_helper.php b/application/helpers/hlp_return_object_helper.php similarity index 69% rename from application/helpers/hlp_message_helper.php rename to application/helpers/hlp_return_object_helper.php index 4470929df..03b56bbbc 100644 --- a/application/helpers/hlp_message_helper.php +++ b/application/helpers/hlp_return_object_helper.php @@ -20,23 +20,30 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); // ------------------------------------------------------------------------------------------------------- -// Collection of functions to handle successful and error messages that methods and functions can return +// Collection of functions to handle success and error objects that methods and functions can return // ------------------------------------------------------------------------------------------------------- +/** + * Used to create a return object, should not be used directly + */ +function _createReturnObject($code, $error, $retval) +{ + $returnObject = new stdClass(); + $returnObject->code = $code; + $returnObject->error = $error; + $returnObject->retval = $retval; + + return $returnObject; +} + /** * Success * * @return array */ -function success($retval, $code = null, $msg_indx_prefix = 'fhc_') +function success($retval = null, $code = null) { - $success = new stdClass(); - $success->error = EXIT_SUCCESS; - $success->fhcCode = $code; - if (!is_null($code)) $success->msg = lang($msg_indx_prefix . $code); - $success->retval = $retval; - - return $success; + return _createReturnObject($code, EXIT_SUCCESS, $retval); } /** @@ -44,15 +51,9 @@ function success($retval, $code = null, $msg_indx_prefix = 'fhc_') * * @return array */ -function error($retval = '', $code = null, $msg_indx_prefix = 'fhc_') +function error($retval = null, $code = null) { - $error = new stdClass(); - $error->error = EXIT_ERROR; - $error->fhcCode = $code; - if (!is_null($code)) $error->msg = lang($msg_indx_prefix . $code); - $error->retval = $retval; - - return $error; + return _createReturnObject($code, EXIT_ERROR, $retval); } /** @@ -111,15 +112,15 @@ function getData($result) } /** - * Returns the property fhcCode if present, otherwise null + * Returns the property code if present, otherwise null */ function getCode($result) { $code = null; - if (isset($result->fhcCode)) + if (isset($result->code)) { - $code = $result->fhcCode; + $code = $result->code; } return $code; From 1fe9a95236eb0b4264a698084a253d3b8e87446f Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 24 Apr 2019 19:49:34 +0200 Subject: [PATCH 03/84] Removed controllers/DBTools.php and core/FHC_Model.php --- application/controllers/DBTools.php | 591 ---------------------------- application/core/FHC_Model.php | 18 - 2 files changed, 609 deletions(-) delete mode 100644 application/controllers/DBTools.php delete mode 100644 application/core/FHC_Model.php diff --git a/application/controllers/DBTools.php b/application/controllers/DBTools.php deleted file mode 100644 index 1330c7ac8..000000000 --- a/application/controllers/DBTools.php +++ /dev/null @@ -1,591 +0,0 @@ -seed_path = APPPATH.'seeds/'; - - if ($this->input->is_cli_request()) - { - $cli = true; - - $this->load->database('system'); //Use the system-Connection for DB-Manipulation - $this->config->load('migration'); - $this->load->library('migration'); - - // If not set, set it - $this->seed_path !== '' OR $this->seed_path = APPPATH.'seeds/'; - // Add trailing slash if not set - $this->seed_path = rtrim($this->seed_path, '/').'/'; - - // Load seed language - $this->lang->load('seed'); - - // initiate faker - $this->faker = \Faker\Factory::create(); - - } - else - { - $this->output->set_status_header(403, 'Migrations must be run from the CLI'); - echo "Migrations must be run from the CLI"; - exit; - } - } - - /** - * Main function index as help - * - * @return void - */ - public function index() - { - $result = "The following are the available command line interface commands\n\n"; - $result .= "php index.ci.php DBTools migrate [\"version_number\"] Run migrations. (latest/current) "; - $result .= "The version number is optional.\n"; - $result .= "php index.ci.php DBTools seed [\"file_name\"] Run the specified seed (Name of Seed. expl: 'Organisation').\n"; - - echo $result.PHP_EOL; - } - - /** - * Migrate to latest or current version - * - * @param string $version [optional] One of either "latest" or "current" - * @return void - */ - public function migrate($version = 'latest') - { - echo 'DB-Migration'; - if ($version != 'latest' && $version != 'current') - { - $this->__failed('Migration version must be either latest or current'); - } - elseif ($this->cli && !$this->migration->$version()) - { - show_error($this->migration->error_string()); - } - elseif (!$this->migration->$version()) - { - $this->__failed(); - } - - $this->__succeeded(); - } - - - /** - * Migrate to a specific version - * - * @return void - */ - public function version() - { - if ($version == 'latest' || $version == 'current') - { - $this->index($version); - exit; - } - - if (!$this->migrate->version($version)) - { - $this->__failed(); - } - - $this->__succeeded(); - } - - /** - * Roll-back to the last version before current - * - * @param int $version The migration to rollback to, defaults to previous - * @return void - */ - public function rollback($version = null) - { - if (is_null($version)) - { - $version = $this->__getVersion() ?: 1; - $version--; - } - - // Check it's definitely false, we could be rolling back to v0 - if (false === $this->migration->version($version)) - { - $this->__failed(); - } - - $this->__succeeded('rolled back'); - } - - /** - * ROLLBACK ALL THE THINGS! - * - * @return void - */ - public function uninstall() - { - $this->rollback(0); - } - - /** - * Seeds DB with Testdata - * - * @param string $name Name of the seed file. - * @return bool - */ - public function seed($name = null) - { - $seeds = $this->findSeeds(); - - if (empty($seeds)) - { - $this->_error_string = $this->lang->line('seed_none_found'); - return false; - } - - $method = 'seed'; - $pending = array(); - - - foreach ($seeds as $number => $file) - { - include_once($file); - $class = 'Seed_'.ucfirst(strtolower($this->_getSeedName(basename($file, '.php')))); - - // Validate the seed file structure - if (! class_exists($class, false)) - { - $this->_error_string = sprintf($this->lang->line('seed_class_doesnt_exist'), $class); - return false; - } - // method_exists() returns true for non-public methods, - // while is_callable() can't be used without instantiating. - // Only get_class_methods() satisfies both conditions. - elseif (! in_array($method, array_map('strtolower', get_class_methods($class)))) - { - $this->_error_string = sprintf($this->lang->line('seed_missing_'.$method.'_method'), $class); - return false; - } - - $pending[$number] = array($class, $method); - } - - // Now just run the necessary seeds - foreach ($pending as $number => $seed) - { - if (is_null($name)) - { - log_message('debug', 'Seeding '.$method); - - $seed[0] = new $seed[0]; - call_user_func($seed); - } - elseif ($seed[0] == 'Seed_'.$name) - { - log_message('debug', 'Seeding '.$method); - - $seed[0] = new $seed[0]; - call_user_func($seed); - } - } - } - - /** - * Retrieves list of available seed files - * - * @return array list of seed file paths sorted by version - */ - public function findSeeds() - { - $seeds = array(); - - // Load all *_*.php files in the seeds path - foreach (glob($this->seed_path.'*_*.php') as $file) - { - $name = basename($file, '.php'); - - // Filter out non-seed files - if (preg_match($this->seed_regex, $name)) - { - $number = $this->_getSeedNumber($name); - - // There cannot be duplicate seed numbers - if (isset($seeds[$number])) - { - $this->_error_string = sprintf($this->lang->line('seed_multiple_version'), $number); - show_error($this->_error_string); - } - - $seeds[$number] = $file; - } - } - - ksort($seeds); - return $seeds; - } - -/** - * Truncate DB from Testdata - * - * @param string $name Name of the seed file. - * @return bool - */ - public function truncate($name) - { - $seeds = $this->findSeeds(); - - if (empty($name)) - { - $this->_error_string = $this->lang->line('seed_none_found'); - return false; - } - - $method = 'truncate'; - $pending = array(); - - - foreach ($seeds as $number => $file) - { - include_once($file); - $class = 'Seed_'.ucfirst(strtolower($this->_getSeedName(basename($file, '.php')))); - - // Validate the seed file structure - if (! class_exists($class, false)) - { - $this->_error_string = sprintf($this->lang->line('seed_class_doesnt_exist'), $class); - return false; - } - // method_exists() returns true for non-public methods, - // while is_callable() can't be used without instantiating. - // Only get_class_methods() satisfies both conditions. - elseif (! in_array($method, array_map('strtolower', get_class_methods($class)))) - { - $this->_error_string = sprintf($this->lang->line('seed_missing_'.$method.'_method'), $class); - return false; - } - - $pending[$number] = array($class, $method); - } - - // Now just run the necessary seeds - foreach ($pending as $number => $seed) - { - if (is_null($name)) - { - log_message('debug', 'Seeding '.$method); - - $seed[0] = new $seed[0]; - call_user_func($seed); - } - elseif ($seed[0] == 'Seed_'.$name) - { - log_message('debug', 'Seeding '.$method); - - $seed[0] = new $seed[0]; - call_user_func($seed); - } - } - } - /** - * Extracts the seed number from a filename - * - * @param string $seed Filename of the seed. - * @return string Numeric portion of a seed filename - */ - protected function _getSeedNumber($seed) - { - return sscanf($seed, '%[0-9]+', $number) - ? $number : '0'; - } - /** - * Extracts the seed class name from a filename - * - * @param string $seed Filename of the seed. - * @return string text portion of a migration filename - */ - protected function _getSeedName($seed) - { - $parts = explode('_', $seed); - array_shift($parts); - return implode('_', $parts); - } - - /** - * Yay, it worked! Tell the user. - * - * @param string $task What did we just do? We... - * @return void - */ - private function __succeeded($task = 'migrated') - { - $version = $this->__getVersion(); - exit('Successfully '.$task.' to version '.$version); - } - - /** - * Output an error message when it all goes tits up - * - * @param string $message Error to output (default to CI's migration error) - * @return void - */ - private function __failed($message = null) - { - $message = $message ?: $this->migration->error_string(); - show_error($message); - } - - /** - * Carbon copy of parent::__getVersion, but that's protected. - * - * @return int Currently installed migration number - */ - private function __getVersion() - { - $row = $this->db->get($this->config->item('migration_table'))->row(); - return $row ? $row->version : 0; - } - - /** - * Check DB for different things like permissions or roles - * - * @param string $action What to check. - * @return void - */ - public function check($action = 'schema') - { - echo 'DB-Check'; - switch ($action) - { - // **** Permission **** - // ToDo: Check Persmissions in the bottom of this file - case 'permissions': - echo ' Permissions!'; - //$this->config->load('roles'); - foreach ($this->config->item('fhc_acl') as $b) - { - $qry = "SELECT * FROM system.tbl_berechtigung - WHERE berechtigung_kurzbz='".$b."';"; - - if($result = $this->db->query($qry)) - { - if($result->num_rows($result)==0) - { - // Nicht vorhanden -> anlegen - $qry_insert="INSERT INTO system.tbl_berechtigung (berechtigung_kurzbz) VALUES('".$b."');"; - - if($this->db->query($qry_insert)) - { - echo '
Recht '.$b.' hinzugefügt'; - $neue=true; - } - else - echo '
Fehler: Recht '.$b.' hinzufügen nicht möglich'; - } - else - echo "- $b -"; - } - } - break; - // **** Roles **** - case 'roles': - echo ' Roles!'; - $this->config->load('roles'); - foreach ($this->config->item('roles') as $role) - { - echo "\n\n".'Check role '.$role['rolle_kurzbz']; - $qry = "SELECT * FROM system.tbl_rolle - WHERE rolle_kurzbz='".$role['rolle_kurzbz']."';"; - - if($result = $this->db->query($qry)) - { - if($result->num_rows($result)==0) - { - // Nicht vorhanden -> anlegen - $qry_insert="INSERT INTO system.tbl_rolle(rolle_kurzbz, beschreibung) VALUES ('".$role['rolle_kurzbz']."','".$role['rolle_kurzbz']."');"; - - if($this->db->query($qry_insert)) - { - echo "\nRolle ".$role['rolle_kurzbz'].' hinzugefügt'; - $neue=true; - } - else - { - echo "\nFehler: ".$role['rolle_kurzbz'].' Rolle hinzufügen nicht möglich'; - continue; - } - } - } - - foreach ($role['berechtigung'] as $b) - { - $qry = "SELECT * FROM system.tbl_rolleberechtigung - WHERE rolle_kurzbz='".$role['rolle_kurzbz']."' - AND berechtigung_kurzbz='".$b."';"; - - if($result = $this->db->query($qry)) - { - if($result->num_rows($result)==0) - { - // Nicht vorhanden -> anlegen - $qry_insert="INSERT INTO system.tbl_rolleberechtigung (rolle_kurzbz, berechtigung_kurzbz, art) VALUES ('".$role['rolle_kurzbz']."','".$b."', 'suid');"; - - if($this->db->query($qry_insert)) - { - echo "\n".$role['rolle_kurzbz'].' -> '.$b.' hinzugefügt'; - $neue=true; - } - else - echo "\nFehler: ".$role['rolle_kurzbz'].' -> '.$b.' hinzufügen nicht möglich'; - } - else - echo "\n- $b -"; - } - } - } - break; - // **** Default **** - default: echo ' what? roles or permisssions?'; - exit(); - } - - exit('Succesfully checked!'); - } - - /** - * Create User in DB - * - * @param string $action What to check. - * @return void - */ - public function createadminuser($uid, $person_id = 1) - { - echo 'Create User!'; - $qry = "SELECT * FROM public.tbl_benutzer - WHERE uid='".$uid."';"; - if ($result = $this->db->query($qry)) - { - if ($result->num_rows($result)==0) - { - // Nicht vorhanden -> anlegen - $qry_insert="INSERT INTO public.tbl_benutzer (uid, person_id) VALUES('".$uid."', ".$person_id.");"; - if($this->db->query($qry_insert)) - echo '
User '.$uid.' angelegt'; - else - echo '
Fehler: User '.$uid.' anlegen nicht möglich!'; - // Join Role Admin - $qry_insert="INSERT INTO system.tbl_benutzerrolle (rolle_kurzbz, uid) VALUES('admin','".$uid."');"; - if($this->db->query($qry_insert)) - echo '
Rolle Admin für User '.$uid.' hinzugefügt'; - else - echo '
Rolle Admin hinzufügen für User '.$b.' hinzufügen nicht möglich'; - } - } - - exit('Succesfully created User!'); - } -} - -/* Check also this permissions: -basis/fhausweis -> Verwaltungstools für FH Ausweis – Kartentausch, Bildpruefung, Druck hinzugefügt -buchung/typen -> Verwaltung von Buchungstypen hinzugefügt -buchung/mitarbeiter -> Verwaltung von Buchungen fuer Mitarbeiter hinzugefügt -inout/incoming -> Incomingverwaltung hinzugefügt -inout/outgoing -> Outgoingverwaltung hinzugefügt -inout/uebersicht -> Verbandsanzeige fuer Incoming/Outgoing im FAS hinzugefügt -lehre/lehrfach:begrenzt -> Lehrfachverwaltung - nur aktiv aenderbar, nur aktive LF werden angezeigt hinzugefügt -lehre/pruefungsanmeldungAdmin -> Erlaubt die Verwaltung der Prüfungsanmeldungen. hinzugefügt -lehre/pruefungsbeurteilung -> Erlaubt dem Benutzer Beurteilungen zu Prüfungen einzutragen. hinzugefügt -lehre/pruefungsbeurteilungAdmin -> Erlaubt dem Benutzer für alle Prüfungen Beurteilungen einzutragen. hinzugefügt -lehre/pruefungsterminAdmin -> Recht für jeden Lektor eine Prüfung anzulegen hinzugefügt -lehre/pruefungsfenster -> Erlaubt dem Benutzer Prüfungsfenster anzulegen. hinzugefügt -lv-plan/gruppenentfernen -> Erlaut das Entfernen von Gruppen aus LVPlan vom FAS aus hinzugefügt -lv-plan/lektorentfernen -> Erlaut das Entfernen von Lektoren aus LVPlan vom FAS aus hinzugefügt -mitarbeiter/bankdaten -> Bankdaten für Mitarbeiter und Studierende anzeigen hinzugefügt -mitarbeiter/personalnummer -> Editieren der Personalnummer im FAS hinzugefügt -mitarbeiter/urlaube -> Mit diesem Recht werden im CIS die Urlaube von allen Mitarbeiter sichtbar hinzugefügt -planner -> Planner Verwaltung hinzugefügt -reihungstest -> Recht für Anzeige des Reihungstests im Vilesci hinzugefügt -sdTools -> Recht für Anzeige der SD-Tools im Vilesci hinzugefügt -soap/lv -> Recht für LV Webservice hinzugefügt -soap/lvplan -> Recht für LV-Plan Webservice hinzugefügt -soap/mitarbeiter -> Recht für Mitarbeiter-Webservice hinzugefügt -soap/ort -> Recht für Ort Webservice hinzugefügt -soap/pruefungsfenster -> Recht für Pruefungsfenster Webservice hinzugefügt -soap/student -> Recht für Student Webservice hinzugefügt -soap/studienordnung -> Recht für Studienordnung Webservice hinzugefügt -soap/benutzer -> Berechtigung für Bentutzerabfrage Addon Kontoimport hinzugefügt -soap/buchungen -> Berechtigung für Buchungsabfrage Addon Kontoimport hinzugefügt -student/bankdaten -> Bankdaten des Studenten hinzugefügt -student/anrechnung -> Anrechnungen des Studenten hinzugefügt -student/anwesenheit -> Anwesenheiten im FAS hinzugefügt -system/developer -> Anzeige zusätzlicher Developerinfos hinzugefügt -system/loginasuser -> Berechtigung zum Einloggen als anderer User hinzugefügt -vertrag/mitarbeiter -> Verwalten von Vertraegen hinzugefügt -vertrag/typen -> Verwalten von Vertragstypen hinzugefügt -wawi/berichte -> Alle Berichte anzeigen hinzugefügt -wawi/delete_advanced -> Loeschen von freigegebenen Bestellungen hinzugefügt -Webservice Berechtigungen pruefen - -soap/studienordnung/load_lva_oe->lehrveranstaltung hinzugefügt -soap/studienordnung/load->lehrveranstaltung hinzugefügt -soap/studienordnung/deleteStudienplanLehrveranstaltung->studienplan hinzugefügt -soap/studienordnung/containsLehrveranstaltung->studienplan hinzugefügt -soap/studienordnung/loadStudienplanLehrveranstaltung->studienplan hinzugefügt -soap/studienordnung/saveStudienplanLehrveranstaltung->studienplan hinzugefügt -soap/studienordnung/loadStudienordnung->studienordnung hinzugefügt -soap/studienordnung/delete->lvregel hinzugefügt -soap/studienordnung/save->lvregel hinzugefügt -soap/studienordnung/load->lvregel hinzugefügt -soap/studienordnung/loadLVRegelTypen->lvregel hinzugefügt -soap/studienordnung/load_lva->lehrveranstaltung hinzugefügt -soap/studienordnung/getAll->lehrtyp hinzugefügt -soap/studienordnung/getAll->organisationseinheit hinzugefügt -soap/studienordnung/getLVRegelTree->lvregel hinzugefügt -soap/studienordnung/save->studienplan hinzugefügt -soap/studienordnung/save->studienordnung hinzugefügt -soap/studienordnung/loadStudienplanSTO->studienplan hinzugefügt -soap/studienordnung/loadStudienordnungSTG->studienordnung hinzugefügt -soap/studienordnung/loadStudienordnungSTGInaktiv->studienordnung hinzugefügt -soap/studienordnung/loadStudienplan->studienplan hinzugefügt -soap/studienordnung/saveSemesterZuordnung->studienordnung hinzugefügt -soap/studienordnung/deleteSemesterZuordnung->studienordnung hinzugefügt -soap/studienordnung/getLVkompatibel->lehrveranstaltung hinzugefügt -soap/studienordnung/getLvTree->lehrveranstaltung hinzugefügt -soap/pruefungsfenster/getByStudiensemester->pruefungsfenster hinzugefügt -soap/studienordnung/exists->lvregel hinzugefügt -soap/studienordnung/saveSortierung->studienplan hinzugefügt -soap/benutzer/search->benutzer hinzugefügt -soap/buchungen/getBuchungen-> */ diff --git a/application/core/FHC_Model.php b/application/core/FHC_Model.php deleted file mode 100644 index e31ff332d..000000000 --- a/application/core/FHC_Model.php +++ /dev/null @@ -1,18 +0,0 @@ -lang->load('fhc_model'); - $this->lang->load('fhcomplete'); - } -} From 699aca74d18b59eaed7cf83deca758551bc1a5e5 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 12:09:31 +0200 Subject: [PATCH 04/84] - Changed helper and language autoload - Changed language config - Removed never used constants - Changed rest_language in rest config file - Adapted models that where extending FHC_Model - Adapted code to load hlp_return_object - Adapted code to use exit status codes constants --- application/config/autoload.php | 5 +- application/config/config.php | 2 +- application/config/constants.php | 58 ++++--------------- application/config/rest.php | 2 +- .../controllers/api/v1/CheckUserAuth.php | 2 +- application/controllers/api/v1/Test.php | 4 +- application/core/DB_Model.php | 42 +++++++------- application/core/FHC_Controller.php | 2 +- application/core/FS_Model.php | 46 +++++++-------- application/core/REST_Controller.php | 2 +- application/libraries/DmsLib.php | 2 +- application/libraries/MessageLib.php | 13 ++--- application/libraries/PhrasesLib.php | 6 +- application/libraries/VorlageLib.php | 13 ++--- application/models/CL/Messages_model.php | 4 +- application/models/person/Notiz_model.php | 32 +++++----- application/models/system/Message_model.php | 4 +- application/views/system/udf.php | 2 +- 18 files changed, 97 insertions(+), 144 deletions(-) diff --git a/application/config/autoload.php b/application/config/autoload.php index aa6a8b40a..b30845f67 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -83,8 +83,7 @@ $autoload['drivers'] = array(); | | $autoload['helper'] = array('url', 'file'); */ -//$autoload['helper'] = array(); -$autoload['helper'] = array('url', 'language', 'hlp_session'); +$autoload['helper'] = array('url'); /* | ------------------------------------------------------------------- @@ -112,7 +111,7 @@ $autoload['config'] = array(); | "codeigniter_lang.php" would be referenced as array('codeigniter'); | */ -$autoload['language'] = array('fhcomplete'); +$autoload['language'] = array(); /* | ------------------------------------------------------------------- diff --git a/application/config/config.php b/application/config/config.php index d0bca14b9..1c0993c92 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -70,7 +70,7 @@ $config['url_suffix'] = ''; | than english. | */ -$config['language'] = 'de-AT'; +$config['language'] = ''; /* |-------------------------------------------------------------------------- diff --git a/application/config/constants.php b/application/config/constants.php index 26f2d655e..77f28b830 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -2,47 +2,23 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -/* -|-------------------------------------------------------------------------- -| FH-Complete constants -|-------------------------------------------------------------------------- -| -| These constants are used for internal messages. It are also be used -| and translated in the language files. -| -*/ -define('FHC_SUCCESS', 0); // General Success Message -define('FHC_ERROR', 1); // General Error Message -define('FHC_MODEL_ERROR', 2); // Model Error -define('FHC_DB_ERROR', 3); // Database Error -define('FHC_NODBTABLE', 4); // No DB-Table is set -define('FHC_NORIGHT', 5); // No rights -define('FHC_INVALIDID', 6); // Invalid or no ID (key) -define('FHC_NOPK', 7); // No primary key - /* |-------------------------------------------------------------------------- | Exit status codes |-------------------------------------------------------------------------- | | Used to indicate the conditions under which the script is exit()ing. -| While there is no universal standard for error codes, there are some -| broad conventions. Three such conventions are mentioned below, for -| those who wish to make use of them. The CodeIgniter defaults were -| chosen for the least overlap with these conventions, while still -| leaving room for others to be defined in future versions and user -| applications. | */ -define('EXIT_SUCCESS', 0); // no errors -define('EXIT_ERROR', 1); // generic error -define('EXIT_MODEL', 2); // model error -define('EXIT_CONFIG', 3); // configuration error -define('EXIT_UNKNOWN_FILE', 4); // file not found -define('EXIT_UNKNOWN_CLASS', 5); // unknown class -define('EXIT_UNKNOWN_METHOD', 6); // unknown class member -define('EXIT_USER_INPUT', 7); // invalid user input -define('EXIT_DATABASE', 8); // database error +define('EXIT_SUCCESS', 0); // no errors +define('EXIT_ERROR', 1); // generic error +define('EXIT_MODEL', 2); // model error +define('EXIT_CONFIG', 3); // configuration error +define('EXIT_UNKNOWN_FILE', 4); // file not found +define('EXIT_UNKNOWN_CLASS', 5); // unknown class +define('EXIT_UNKNOWN_METHOD', 6); // unknown class method +define('EXIT_USER_INPUT', 7); // invalid user input +define('EXIT_DATABASE', 8); // database error define('EXIT_VALIDATION_UDF', 10); // UDF validation has been failed define('EXIT_VALIDATION_UDF_MIN_VALUE', 11); // UDF validation has been failed -> MIN VALUE define('EXIT_VALIDATION_UDF_MAX_VALUE', 12); // UDF validation has been failed -> MAX VALUE @@ -52,8 +28,8 @@ define('EXIT_VALIDATION_UDF_REGEX', 15); // UDF validation has been failed -> define('EXIT_VALIDATION_UDF_REQUIRED', 16); // UDF validation has been failed -> REQUIRED define('EXIT_VALIDATION_UDF_NOT_VALID_VAL', 17); // UDF validation has been failed -> Not valid value, object or array -define('EXIT_AUTO_MIN', 1000); // lowest automatically-assigned error code -define('EXIT_AUTO_MAX', 2000); // highest automatically-assigned error code +define('EXIT_AUTO_MIN', 1000); // lowest automatically-assigned error code +define('EXIT_AUTO_MAX', 2000); // highest automatically-assigned error code /* |-------------------------------------------------------------------------- @@ -158,18 +134,6 @@ define('PRIORITY_NORMAL', 2); define('PRIORITY_HIGH', 3); define('PRIORITY_URGENT', 4); -// Status return message codes -define('MSG_SUCCESS', 0); -define('MSG_ERROR', 1); - -define('MSG_MESSAGE_SENT', 10); -define('MSG_STATUS_UPDATE', 11); - -define('MSG_PARTICIPANT_ADDED', 30); -define('MSG_ERR_PARTICIPANT_EXISTS', 31); -define('MSG_ERR_PARTICIPANT_NONSYSTEM', 32); -define('MSG_PARTICIPANT_REMOVED', 33); - define('MSG_ERR_SUBJECT_EMPTY', 40); define('MSG_ERR_BODY_EMPTY', 41); define('MSG_ERR_TEMPLATE_NOT_FOUND', 42); diff --git a/application/config/rest.php b/application/config/rest.php index 4f3a78972..9bbbf40ef 100644 --- a/application/config/rest.php +++ b/application/config/rest.php @@ -516,4 +516,4 @@ $config['rest_ajax_only'] = FALSE; | Language file to load from the language directory | */ -$config['rest_language'] = 'en-US'; +$config['rest_language'] = 'english'; diff --git a/application/controllers/api/v1/CheckUserAuth.php b/application/controllers/api/v1/CheckUserAuth.php index 69dc9cda6..4d6522fe2 100644 --- a/application/controllers/api/v1/CheckUserAuth.php +++ b/application/controllers/api/v1/CheckUserAuth.php @@ -13,7 +13,7 @@ class CheckUserAuth extends REST_Controller // Loads helper message to manage returning messages // NOTE: loaded here because it does not extend the APIv1_Controller - $this->load->helper('hlp_message'); + $this->load->helper('hlp_return_object'); } /** diff --git a/application/controllers/api/v1/Test.php b/application/controllers/api/v1/Test.php index 010314013..41feb1a16 100644 --- a/application/controllers/api/v1/Test.php +++ b/application/controllers/api/v1/Test.php @@ -2,8 +2,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); -require_once APPPATH.'/libraries/REST_Controller.php'; - /** * Testing class for REST calls and authentication */ @@ -14,7 +12,7 @@ class Test extends REST_Controller parent::__construct(); // Loads helper message to manage returning messages - $this->load->helper('hlp_message'); + $this->load->helper('hlp_return_object'); } /** diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index 16b9f2da9..199f81162 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -1,6 +1,6 @@ dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); // If this table has UDF and the validation of them is ok if (isError($validate = $this->_manageUDFs($data, $this->dbTable))) return $validate; @@ -100,7 +100,7 @@ class DB_Model extends FHC_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -114,8 +114,8 @@ class DB_Model extends FHC_Model public function update($id, $data) { // Check class properties - if (is_null($this->pk)) return error(FHC_MODEL_ERROR, FHC_NOPK); - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); // If this table has UDF and the validation of them is ok if (isError($validate = $this->_manageUDFs($data, $this->dbTable, $id))) return $validate; @@ -148,7 +148,7 @@ class DB_Model extends FHC_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -161,8 +161,8 @@ class DB_Model extends FHC_Model public function delete($id) { // Check class properties - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); - if (is_null($this->pk)) return error(FHC_MODEL_ERROR, FHC_NOPK); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); $tmpId = $id; @@ -190,7 +190,7 @@ class DB_Model extends FHC_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -203,8 +203,8 @@ class DB_Model extends FHC_Model public function load($id = null) { // Check class properties - if (is_null($this->pk)) return error(FHC_MODEL_ERROR, FHC_NOPK); - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); $tmpId = $id; @@ -232,7 +232,7 @@ class DB_Model extends FHC_Model public function loadWhere($where = null) { // Check class properties - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); // Execute query $result = $this->db->get_where($this->dbTable, $where); @@ -245,7 +245,7 @@ class DB_Model extends FHC_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -264,7 +264,7 @@ class DB_Model extends FHC_Model public function loadTree($mainTable, $sideTables, $where = null, $sideTablesAliases = null) { // Check class properties - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); // List of tables on which it will work $tables = array_merge(array($mainTable), $sideTables); @@ -405,7 +405,7 @@ class DB_Model extends FHC_Model || is_null($cond) || !in_array($type, array('', 'LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'))) { - return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + return error(EXIT_MODEL, EXIT_MODEL); } $this->db->join($joinTable, $cond, $type); @@ -421,7 +421,7 @@ class DB_Model extends FHC_Model public function addOrder($field = null, $type = 'ASC') { // Check class properties and parameters - if (is_null($field) || !in_array($type, array('ASC', 'DESC'))) return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + if (is_null($field) || !in_array($type, array('ASC', 'DESC'))) return error(EXIT_MODEL, EXIT_MODEL); $this->db->order_by($field, $type); @@ -436,7 +436,7 @@ class DB_Model extends FHC_Model public function addSelect($select, $escape = true) { // Check class properties and parameters - if (is_null($select) || $select == '') return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + if (is_null($select) || $select == '') return error(EXIT_MODEL, EXIT_MODEL); $this->db->select($select, $escape); @@ -461,7 +461,7 @@ class DB_Model extends FHC_Model public function addLimit($start = null, $end = null) { // Check class properties and parameters - if (!is_numeric($start) || (is_numeric($start) && $start <= 0)) return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + if (!is_numeric($start) || (is_numeric($start) && $start <= 0)) return error(EXIT_MODEL, EXIT_MODEL); if (is_numeric($end) && $end > $start) { @@ -485,7 +485,7 @@ class DB_Model extends FHC_Model $tmpTable = trim($table); // Check parameters - if (isEmptyString($tmpTable)) return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + if (isEmptyString($tmpTable)) return error(EXIT_MODEL, EXIT_MODEL); if (!isEmptyString($alias)) { @@ -509,7 +509,7 @@ class DB_Model extends FHC_Model || (is_array($fields) && count($fields) == 0) || (is_string($fields) && $fields == '')) { - return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + return error(EXIT_MODEL, EXIT_MODEL); } $this->db->group_by($fields); @@ -772,7 +772,7 @@ class DB_Model extends FHC_Model } else { - $result = error($this->db->error(), FHC_DB_ERROR); + $result = error($this->db->error(), EXIT_DATABASE); } } diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php index 7b29b43e7..db02be3c4 100644 --- a/application/core/FHC_Controller.php +++ b/application/core/FHC_Controller.php @@ -21,7 +21,7 @@ class FHC_Controller extends CI_Controller $this->_controllerId = null; // set _controllerId as null by default // Loads helper message to manage returning messages - $this->load->helper('hlp_message'); + $this->load->helper('hlp_return_object'); // Loads helper with generic utility function $this->load->helper('hlp_common'); diff --git a/application/core/FS_Model.php b/application/core/FS_Model.php index 7e2b2d7e2..bd3275110 100644 --- a/application/core/FS_Model.php +++ b/application/core/FS_Model.php @@ -1,6 +1,6 @@ filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); if (!is_null($data = $this->filesystemlib->read($this->filepath, $filename))) { @@ -36,7 +36,7 @@ class FS_Model extends FHC_Model } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } @@ -49,19 +49,19 @@ class FS_Model extends FHC_Model public function write($filename, $content) { // Check Class-Attributes - if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); - if (is_null($content)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($content)) return error(EXIT_MODEL, EXIT_ERROR); if ($this->filesystemlib->write($this->filepath, $filename, base64_decode($content)) === true) { - return success(FHC_SUCCESS); + return success(); } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } @@ -74,19 +74,19 @@ class FS_Model extends FHC_Model public function append($filename, $content) { // Check Class-Attributes - if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($content)) return error(FHC_MODEL_ERROR, FHC_ERROR); - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($content)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); if ($this->filesystemlib->append($this->filepath, $filename, base64_decode($content)) === true) { - return success(FHC_SUCCESS); + return success(); } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } @@ -99,18 +99,18 @@ class FS_Model extends FHC_Model public function remove($filename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); if ($this->filesystemlib->remove($this->filepath, $filename) === true) { - return success(FHC_SUCCESS); + return success(); } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } @@ -123,19 +123,19 @@ class FS_Model extends FHC_Model public function rename($filename, $newFilename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); - if (is_null($newFilename)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($newFilename)) return error(EXIT_MODEL, EXIT_ERROR); if ($this->filesystemlib->rename($this->filepath, $filename, $this->filepath, $newFilename) === true) { - return success(FHC_SUCCESS); + return success(); } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } } diff --git a/application/core/REST_Controller.php b/application/core/REST_Controller.php index 488892b60..0bcfe8276 100644 --- a/application/core/REST_Controller.php +++ b/application/core/REST_Controller.php @@ -361,7 +361,7 @@ abstract class REST_Controller extends CI_Controller { protected function early_checks() { // Loads helper message to manage returning messages - $this->load->helper('hlp_message'); + $this->load->helper('hlp_return_object'); // Loads helper with generic utility function $this->load->helper('hlp_common'); diff --git a/application/libraries/DmsLib.php b/application/libraries/DmsLib.php index 317b02157..6b86ce7f8 100644 --- a/application/libraries/DmsLib.php +++ b/application/libraries/DmsLib.php @@ -199,7 +199,7 @@ class DmsLib if ($this->ci->db->trans_status() === false || isError($result)) { $this->ci->db->trans_rollback(); - $result = error($result->msg, EXIT_ERROR); + $result = error('An error occurred while performing a delete operation', EXIT_ERROR); } else { diff --git a/application/libraries/MessageLib.php b/application/libraries/MessageLib.php index cb691ec93..0ccbfbefb 100644 --- a/application/libraries/MessageLib.php +++ b/application/libraries/MessageLib.php @@ -36,9 +36,6 @@ class MessageLib $this->_ci->load->model('system/MsgStatus_model', 'MsgStatusModel'); $this->_ci->load->model('system/Recipient_model', 'RecipientModel'); $this->_ci->load->model('system/Attachment_model', 'AttachmentModel'); - - // Loads phrases - $this->_ci->lang->load('message'); } //------------------------------------------------------------------------------------------------------------------ @@ -970,7 +967,7 @@ class MessageLib if ($this->_ci->db->trans_status() === false || isError($result)) { $this->_ci->db->trans_rollback(); - $result = $this->_error($result->msg, EXIT_ERROR); + $result = $this->_error('An error occurred while saving a message', EXIT_ERROR); } else { @@ -984,16 +981,16 @@ class MessageLib /** * Wrapper for function error */ - private function _error($retval = '', $code = null) + private function _error($retval, $code) { - return error($retval, $code, MessageLib::MSG_INDX_PREFIX); + return error($retval, $code); } /** * Wrapper for function success */ - private function _success($retval = '', $code = null) + private function _success($retval, $code = null) { - return success($retval, $code, MessageLib::MSG_INDX_PREFIX); + return success($retval, $code); } } diff --git a/application/libraries/PhrasesLib.php b/application/libraries/PhrasesLib.php index 6793f38e0..110e5b0c8 100644 --- a/application/libraries/PhrasesLib.php +++ b/application/libraries/PhrasesLib.php @@ -82,8 +82,7 @@ class PhrasesLib */ public function getPhrasentextById($phrasentext_id) { - if (isEmptyString($phrasentext_id)) - return error($this->_ci->lang->line('fhc_'.FHC_INVALIDID, false)); + if (isEmptyString($phrasentext_id)) return error('Not a valid phrasentext_id'); return $this->_ci->PhrasentextModel->load($phrasentext_id); } @@ -170,8 +169,7 @@ class PhrasesLib */ public function parseVorlagetext($text, $data = array()) { - if (isEmptyString($text)) - return error($this->_ci->lang->line('fhc_'.FHC_INVALIDID, false)); + if (isEmptyString($text)) return error('Not a valid text'); return $this->_ci->parser->parse_string($text, $data, true); } diff --git a/application/libraries/VorlageLib.php b/application/libraries/VorlageLib.php index 97ba591c9..d6c9d6a98 100644 --- a/application/libraries/VorlageLib.php +++ b/application/libraries/VorlageLib.php @@ -72,8 +72,7 @@ class VorlageLib */ public function getVorlagetextByVorlage($vorlage_kurzbz) { - if (isEmptyString($vorlage_kurzbz)) - return error($this->ci->lang->line('fhc_'.FHC_INVALIDID, false)); + if (isEmptyString($vorlage_kurzbz)) return error('Not a valid vorlage_kurzbz'); $vorlage = $this->ci->VorlageStudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz)); return $vorlage; @@ -90,8 +89,7 @@ class VorlageLib */ public function loadVorlagetext($vorlage_kurzbz, $oe_kurzbz = null, $orgform_kurzbz = null, $sprache = null) { - if (isEmptyString($vorlage_kurzbz)) - return error($this->ci->lang->line('fhc_'.FHC_INVALIDID, false)); + if (isEmptyString($vorlage_kurzbz)) return error('Not a valid vorlage_kurzbz'); // Try to search the template with the given vorlage_kurzbz and other parameters if present $queryParameters = array("vorlage_kurzbz" => $vorlage_kurzbz, "aktiv" => true); @@ -200,9 +198,8 @@ class VorlageLib */ public function parseVorlagetext($text, $data = array()) { - if (isEmptyString($text)) - return error($this->ci->lang->line('fhc_'.FHC_INVALIDID, false)); - $text = $this->ci->parser->parse_string($text, $data, true); - return $text; + if (isEmptyString($text)) return error('Not a valid text'); + + return $this->ci->parser->parse_string($text, $data, true); } } diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php index 5a0a77a31..5f3f40e6d 100644 --- a/application/models/CL/Messages_model.php +++ b/application/models/CL/Messages_model.php @@ -1,10 +1,10 @@ dbTable = 'public.tbl_notiz'; $this->pk = 'notiz_id'; } - + // ------------------------------------------------------------------------------------------------------ /** * Get a specialization for a prestudent @@ -20,10 +20,10 @@ class Notiz_model extends DB_Model { // Join with the table public.tbl_notizzuordnung using notiz_id $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); - + return $this->NotizModel->loadWhere(array('prestudent_id' => $prestudent_id, 'titel' => $titel)); } - + /** * Remove a specialization */ @@ -31,31 +31,31 @@ class Notiz_model extends DB_Model { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); - + // Start DB transaction $this->db->trans_start(false); - + $result = $this->delete(array('notiz_id' => $notiz_id)); if (isSuccess($result)) { $result = $this->NotizzuordnungModel->delete(array('notiz_id' => $notiz_id)); } - + // Transaction complete! $this->db->trans_complete(); - + // Check if everything went ok during the transaction if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error($result->msg, EXIT_ERROR); + $result = error('An error occurred while removing a specialization', EXIT_ERROR); } else { $this->db->trans_commit(); $result = success('Specialization successfully removed'); } - + return $result; } @@ -66,32 +66,32 @@ class Notiz_model extends DB_Model { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); - + // Start DB transaction $this->db->trans_start(false); - + $result = $this->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => true)); $notiz_id = $result->retval; if (isSuccess($result)) { $result = $this->NotizzuordnungModel->insert(array('notiz_id' => $notiz_id, 'prestudent_id' => $prestudent_id)); } - + // Transaction complete! $this->db->trans_complete(); - + // Check if everything went ok during the transaction if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error($result->msg, EXIT_ERROR); + $result = error('An error occurred while adding a specialization', EXIT_ERROR); } else { $this->db->trans_commit(); $result = success($notiz_id); } - + return $result; } @@ -122,7 +122,7 @@ class Notiz_model extends DB_Model if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error($result->msg, EXIT_ERROR); + $result = error('An error occurred while adding a note for a person', EXIT_ERROR); } else { diff --git a/application/models/system/Message_model.php b/application/models/system/Message_model.php index 764c3ae14..6f2ad01e2 100644 --- a/application/models/system/Message_model.php +++ b/application/models/system/Message_model.php @@ -151,7 +151,7 @@ class Message_model extends DB_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -168,7 +168,7 @@ class Message_model extends DB_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } diff --git a/application/views/system/udf.php b/application/views/system/udf.php index b2facc38c..10ba15698 100644 --- a/application/views/system/udf.php +++ b/application/views/system/udf.php @@ -31,7 +31,7 @@ { foreach ($error as $fieldError) { - echo $fieldError->msg . ' -> ' . $fieldError->retval . '
'; + echo $fieldError->code . ': ' . $fieldError->retval . '
'; } } } From 286114255e2a0fc629c51da37b7793279eaaf3c2 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 12:59:07 +0200 Subject: [PATCH 05/84] Better error messages in FS_Model --- application/core/FS_Model.php | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/application/core/FS_Model.php b/application/core/FS_Model.php index bd3275110..4081bf8f4 100644 --- a/application/core/FS_Model.php +++ b/application/core/FS_Model.php @@ -17,7 +17,7 @@ class FS_Model extends CI_Model $this->filepath = $filepath; } - /** --------------------------------------------------------------- + /** * Read data from file system * * @return array @@ -25,10 +25,10 @@ class FS_Model extends CI_Model public function read($filename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); if (!is_null($data = $this->filesystemlib->read($this->filepath, $filename))) { @@ -36,11 +36,11 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while reading a file', EXIT_ERROR); } } - /** --------------------------------------------------------------- + /** * Writing data to file system * * @param string $fileContent File content @@ -49,11 +49,11 @@ class FS_Model extends CI_Model public function write($filename, $content) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); - if (is_null($content)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($content)) return error('The given file content is not valid', EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); if ($this->filesystemlib->write($this->filepath, $filename, base64_decode($content)) === true) { @@ -61,11 +61,11 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while writing a file', EXIT_ERROR); } } - /** --------------------------------------------------------------- + /** * Append data to a file * * @param array $data File content @@ -74,11 +74,11 @@ class FS_Model extends CI_Model public function append($filename, $content) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($content)) return error(EXIT_MODEL, EXIT_ERROR); - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($content)) return error('The given file content is not valid', EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); if ($this->filesystemlib->append($this->filepath, $filename, base64_decode($content)) === true) { @@ -86,11 +86,11 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while appending to a file', EXIT_ERROR); } } - /** --------------------------------------------------------------- + /** * Delete data from file system * * @param string $id Primary Key for DELETE @@ -99,10 +99,10 @@ class FS_Model extends CI_Model public function remove($filename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); if ($this->filesystemlib->remove($this->filepath, $filename) === true) { @@ -110,11 +110,11 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while removing a file', EXIT_ERROR); } } - /** --------------------------------------------------------------- + /** * Rename a file * * @param string $id Primary Key for DELETE @@ -123,11 +123,11 @@ class FS_Model extends CI_Model public function rename($filename, $newFilename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); - if (is_null($newFilename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); + if (is_null($newFilename)) return error('The given new filename is not valid', EXIT_ERROR); if ($this->filesystemlib->rename($this->filepath, $filename, $this->filepath, $newFilename) === true) { @@ -135,7 +135,7 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while renaming a file', EXIT_ERROR); } } } From a0967588fbb83666f485e2ae549a9a9961f28fca Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 13:38:46 +0200 Subject: [PATCH 06/84] Better error messages in DB_Model --- application/core/DB_Model.php | 50 ++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index 199f81162..36474f9d3 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -64,7 +64,7 @@ class DB_Model extends CI_Model public function insert($data) { // Check class properties - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); // If this table has UDF and the validation of them is ok if (isError($validate = $this->_manageUDFs($data, $this->dbTable))) return $validate; @@ -114,8 +114,8 @@ class DB_Model extends CI_Model public function update($id, $data) { // Check class properties - if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->pk)) return error('The given primary key is not valid', EXIT_MODEL); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); // If this table has UDF and the validation of them is ok if (isError($validate = $this->_manageUDFs($data, $this->dbTable, $id))) return $validate; @@ -161,8 +161,8 @@ class DB_Model extends CI_Model public function delete($id) { // Check class properties - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); - if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); + if (is_null($this->pk)) return error('The given primary key is not valid', EXIT_MODEL); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); $tmpId = $id; @@ -203,8 +203,8 @@ class DB_Model extends CI_Model public function load($id = null) { // Check class properties - if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->pk)) return error('The given primary key is not valid', EXIT_MODEL); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); $tmpId = $id; @@ -232,7 +232,7 @@ class DB_Model extends CI_Model public function loadWhere($where = null) { // Check class properties - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); // Execute query $result = $this->db->get_where($this->dbTable, $where); @@ -264,7 +264,7 @@ class DB_Model extends CI_Model public function loadTree($mainTable, $sideTables, $where = null, $sideTablesAliases = null) { // Check class properties - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); // List of tables on which it will work $tables = array_merge(array($mainTable), $sideTables); @@ -405,12 +405,12 @@ class DB_Model extends CI_Model || is_null($cond) || !in_array($type, array('', 'LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'))) { - return error(EXIT_MODEL, EXIT_MODEL); + return error('The joining operation type is not valid', EXIT_MODEL); } $this->db->join($joinTable, $cond, $type); - return success(true); + return success(); } /** @@ -420,12 +420,13 @@ class DB_Model extends CI_Model */ public function addOrder($field = null, $type = 'ASC') { - // Check class properties and parameters - if (is_null($field) || !in_array($type, array('ASC', 'DESC'))) return error(EXIT_MODEL, EXIT_MODEL); + // Check parameters + if (is_null($field)) return error('The field parameter is not valid', EXIT_MODEL); + if (!in_array($type, array('ASC', 'DESC'))) return error('The order type is not valid', EXIT_MODEL); $this->db->order_by($field, $type); - return success(true); + return success(); } /** @@ -435,12 +436,12 @@ class DB_Model extends CI_Model */ public function addSelect($select, $escape = true) { - // Check class properties and parameters - if (is_null($select) || $select == '') return error(EXIT_MODEL, EXIT_MODEL); + // Check parameters + if (is_null($select) || $select == '') return error('The select parameter is not valid', EXIT_MODEL); $this->db->select($select, $escape); - return success(true); + return success(); } /** @@ -461,7 +462,8 @@ class DB_Model extends CI_Model public function addLimit($start = null, $end = null) { // Check class properties and parameters - if (!is_numeric($start) || (is_numeric($start) && $start <= 0)) return error(EXIT_MODEL, EXIT_MODEL); + if (!is_numeric($start) || (is_numeric($start) && $start <= 0)) + return error('The start parameter is not valid', EXIT_MODEL); if (is_numeric($end) && $end > $start) { @@ -472,7 +474,7 @@ class DB_Model extends CI_Model $this->db->limit($start); } - return success(true); + return success(); } /** @@ -485,7 +487,7 @@ class DB_Model extends CI_Model $tmpTable = trim($table); // Check parameters - if (isEmptyString($tmpTable)) return error(EXIT_MODEL, EXIT_MODEL); + if (isEmptyString($tmpTable)) return error('The table parameter is not valid', EXIT_MODEL); if (!isEmptyString($alias)) { @@ -494,7 +496,7 @@ class DB_Model extends CI_Model $this->db->from($tmpTable); - return success(true); + return success(); } /** @@ -509,12 +511,12 @@ class DB_Model extends CI_Model || (is_array($fields) && count($fields) == 0) || (is_string($fields) && $fields == '')) { - return error(EXIT_MODEL, EXIT_MODEL); + return error('The fields parameter is not valid', EXIT_MODEL); } $this->db->group_by($fields); - return success(true); + return success(); } /** @@ -827,7 +829,7 @@ class DB_Model extends CI_Model */ private function _manageUDFs(&$data, $schemaAndTable, $id = null) { - $manageUDFs = success(true); + $manageUDFs = success(); if ($this->hasUDF()) { From b0919a8740eca34f68ed01789ea6595017925342 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 13:52:06 +0200 Subject: [PATCH 07/84] Removed never used rdf/Basic controller --- application/controllers/rdf/Basic.php | 74 --------------------------- 1 file changed, 74 deletions(-) delete mode 100644 application/controllers/rdf/Basic.php diff --git a/application/controllers/rdf/Basic.php b/application/controllers/rdf/Basic.php deleted file mode 100644 index 0ff53a77d..000000000 --- a/application/controllers/rdf/Basic.php +++ /dev/null @@ -1,74 +0,0 @@ -load->library(array('rdf')); - $this->load->helper('form'); - } - - /** - * Load Basic View - * @return void - */ - public function index() - { - $this->load->library('Rdf'); - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/basic', $d, true); - $this->load->view('home', $d); - } - - /** - * Load Sparql-View - * @return void - */ - public function sparql() - { - $this->load->library('Rdf'); - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/basic_sparql', $d, true); - $this->load->view('home', $d); - } - - /** - * Load foaf-View - * @return void - */ - public function foafinfo() - { - $this->load->library('Rdf'); - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/foafinfo', $d, true); - $this->load->view('home', $d); - } - - /** - * Load foafmaker View - * @return void - */ - public function foafmaker() - { - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/foafmaker', $d, true); - $this->load->view('home', $d); - } - - /** - * Load converter View - * @return void - */ - public function converter() - { - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/converter', $d, true); - $this->load->view('home', $d); - } -} From 2cf15bcd74fff17b2879c70de4e22fc8ba87000b Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 14:53:35 +0200 Subject: [PATCH 08/84] REST_Controller now loads helper hlp_session --- application/core/REST_Controller.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/core/REST_Controller.php b/application/core/REST_Controller.php index 0bcfe8276..38eda47f7 100644 --- a/application/core/REST_Controller.php +++ b/application/core/REST_Controller.php @@ -363,6 +363,9 @@ abstract class REST_Controller extends CI_Controller { // Loads helper message to manage returning messages $this->load->helper('hlp_return_object'); + // Loads helper session to manage the php session + $this->load->helper('hlp_session'); + // Loads helper with generic utility function $this->load->helper('hlp_common'); } From 97af0bdc00c314ff38ba99f965fee8790d4d4480 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 17:23:39 +0200 Subject: [PATCH 09/84] Removed migrations and seeds directory --- application/migrations/001_init.php | 36 ---- application/migrations/002_pk_migrations.php | 36 ---- application/migrations/003_add_apikey.php | 60 ------- application/migrations/004_create_basedb.php | 34 ---- application/migrations/005_fhc30.php | 24 --- application/migrations/006_fhc31.php | 29 ---- application/migrations/007_fhc32.php | 29 ---- application/migrations/008_fhc33.php | 29 ---- application/seeds/001_organisation.php | 170 ------------------- application/seeds/002_studienordnung.php | 142 ---------------- application/seeds/003_person.php | 50 ------ application/seeds/004_prestudent.php | 58 ------- application/seeds/005_message.php | 55 ------ application/seeds/006_vorlage.php | 170 ------------------- 14 files changed, 922 deletions(-) delete mode 100644 application/migrations/001_init.php delete mode 100644 application/migrations/002_pk_migrations.php delete mode 100644 application/migrations/003_add_apikey.php delete mode 100644 application/migrations/004_create_basedb.php delete mode 100644 application/migrations/005_fhc30.php delete mode 100644 application/migrations/006_fhc31.php delete mode 100644 application/migrations/007_fhc32.php delete mode 100644 application/migrations/008_fhc33.php delete mode 100644 application/seeds/001_organisation.php delete mode 100644 application/seeds/002_studienordnung.php delete mode 100644 application/seeds/003_person.php delete mode 100644 application/seeds/004_prestudent.php delete mode 100644 application/seeds/005_message.php delete mode 100644 application/seeds/006_vorlage.php diff --git a/application/migrations/001_init.php b/application/migrations/001_init.php deleted file mode 100644 index 7cc9e6dad..000000000 --- a/application/migrations/001_init.php +++ /dev/null @@ -1,36 +0,0 @@ -load->database('system'); - // Schemas - echo '
'; - $this->db->query('CREATE SCHEMA IF NOT EXISTS public;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS addon;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS fue;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS lehre;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS system;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS bis;'); - } - - public function down() - { - /* $this->db->query(' - DROP SCHEMA IF EXISTS addon; - DROP SCHEMA IF EXISTS bis; - DROP SCHEMA IF EXISTS campus; - DROP SCHEMA IF EXISTS fue; - DROP SCHEMA IF EXISTS kommune; - DROP SCHEMA IF EXISTS lehre; - DROP SCHEMA IF EXISTS public; - DROP SCHEMA IF EXISTS sync; - DROP SCHEMA IF EXISTS system; - DROP SCHEMA IF EXISTS testtool; - DROP SCHEMA IF EXISTS wawi; - ');*/ - } -} \ No newline at end of file diff --git a/application/migrations/002_pk_migrations.php b/application/migrations/002_pk_migrations.php deleted file mode 100644 index d378b2a01..000000000 --- a/application/migrations/002_pk_migrations.php +++ /dev/null @@ -1,36 +0,0 @@ -startUP(); - - $this->addPrimaryKey( - "public", - "ci_migrations", - "pk_migrations", - array("version") - ); - - $this->endUP(); - } - - public function down() - { - $this->startDown(); - - $this->execQuery('ALTER TABLE ci_migrations DROP CONSTRAINT pk_migrations'); - - $this->endDown(); - } -} \ No newline at end of file diff --git a/application/migrations/003_add_apikey.php b/application/migrations/003_add_apikey.php deleted file mode 100644 index c44d43b4f..000000000 --- a/application/migrations/003_add_apikey.php +++ /dev/null @@ -1,60 +0,0 @@ -startUP(); - - // Create table public.ci_apikey - $fields = array( - "apikey_id" => array( - "type" => "serial" - ), - "key" => array( - "type" => "varchar(100)", - "null" => false - ), - "level" => array( - "type" => "integer", - "null" => true - ), - "ignore_limits" => array( - "type" => "integer", - "null" => true - ), - "date_created" => array( - "type" => "date DEFAULT NOW()", - "null" => true - ) - ); - $this->createTable("public", "ci_apikey", $fields); - $this->addPrimaryKey( - "public", - "ci_apikey", - "pk_ci_apikey", - array("apikey_id") - ); - $this->grantTable(array("SELECT"), "public", "ci_apikey", "vilesci"); - - $this->endUP(); - } - - public function down() - { - $this->startDown(); - - $this->dropTable("public", "ci_apikey"); - - $this->endDown(); - } -} \ No newline at end of file diff --git a/application/migrations/004_create_basedb.php b/application/migrations/004_create_basedb.php deleted file mode 100644 index 5170bfec1..000000000 --- a/application/migrations/004_create_basedb.php +++ /dev/null @@ -1,34 +0,0 @@ -load->database('system'); - if (!$this->db->table_exists('tbl_person')) - { - $this->load->helper('file'); - - $sqlfile = read_file('./system/fhcomplete3.0.sql'); - if (!$this->db->simple_query($sqlfile)) - { - echo "Error creating Basis DB-Schema!"; - } - } - } - - public function down() - { - /*$this->db->simple_query('DROP SCHEMA bis;'); - $this->db->simple_query('DROP SCHEMA campus;'); - $this->db->simple_query('DROP SCHEMA fue;'); - $this->db->simple_query('DROP SCHEMA kommune;'); - $this->db->simple_query('DROP SCHEMA lehre;'); - $this->db->simple_query('DROP SCHEMA sync;'); - $this->db->simple_query('DROP SCHEMA system;'); - $this->db->simple_query('DROP SCHEMA testtool;'); - $this->db->simple_query('DROP SCHEMA wawi;');*/ - } -} \ No newline at end of file diff --git a/application/migrations/005_fhc30.php b/application/migrations/005_fhc30.php deleted file mode 100644 index 96d366920..000000000 --- a/application/migrations/005_fhc30.php +++ /dev/null @@ -1,24 +0,0 @@ -

Update to FHC 3.0


'; - $this->db=$this->load->database('system', true); - $db = new basis_db($this); - require_once('./system/dbupdate_3.0.php'); - } - - public function down() - { - /*$this->db->simple_query('DROP TABLE fue.tbl_scrumteam;'); - $this->db->simple_query('DROP TABLE lehre.tbl_studienordnung;'); - $this->db->simple_query('DROP TABLE lehre.tbl_studienordnung_semester;'); - $this->db->simple_query('DROP TABLE lehre.tbl_studienplan;');*/ - } -} \ No newline at end of file diff --git a/application/migrations/006_fhc31.php b/application/migrations/006_fhc31.php deleted file mode 100644 index 5264bada1..000000000 --- a/application/migrations/006_fhc31.php +++ /dev/null @@ -1,29 +0,0 @@ -

Update to FHC 3.1


'; - $this->db=$this->load->database('system', true); - $db = new basis_db($this); - require_once('./system/dbupdate_3.1.php'); - } - - public function down() - { - /*$this->db->simple_query('DROP SCHEMA bis;'); - $this->db->simple_query('DROP SCHEMA campus;'); - $this->db->simple_query('DROP SCHEMA fue;'); - $this->db->simple_query('DROP SCHEMA kommune;'); - $this->db->simple_query('DROP SCHEMA lehre;'); - $this->db->simple_query('DROP SCHEMA sync;'); - $this->db->simple_query('DROP SCHEMA system;'); - $this->db->simple_query('DROP SCHEMA testtool;'); - $this->db->simple_query('DROP SCHEMA wawi;');*/ - } -} \ No newline at end of file diff --git a/application/migrations/007_fhc32.php b/application/migrations/007_fhc32.php deleted file mode 100644 index 2da5d429c..000000000 --- a/application/migrations/007_fhc32.php +++ /dev/null @@ -1,29 +0,0 @@ -

Update to FHC 3.2


'; - $this->db=$this->load->database('system', true); - $db = new basis_db($this); - require_once('./system/dbupdate_3.2.php'); - } - - public function down() - { - /*$this->db->simple_query('DROP SCHEMA bis;'); - $this->db->simple_query('DROP SCHEMA campus;'); - $this->db->simple_query('DROP SCHEMA fue;'); - $this->db->simple_query('DROP SCHEMA kommune;'); - $this->db->simple_query('DROP SCHEMA lehre;'); - $this->db->simple_query('DROP SCHEMA sync;'); - $this->db->simple_query('DROP SCHEMA system;'); - $this->db->simple_query('DROP SCHEMA testtool;'); - $this->db->simple_query('DROP SCHEMA wawi;');*/ - } -} \ No newline at end of file diff --git a/application/migrations/008_fhc33.php b/application/migrations/008_fhc33.php deleted file mode 100644 index bd4d7a040..000000000 --- a/application/migrations/008_fhc33.php +++ /dev/null @@ -1,29 +0,0 @@ -

Update to FHC 3.3


'; - $this->db=$this->load->database('system', true); - $db = new basis_db($this); - require_once('./system/dbupdate_3.3.php'); - } - - public function down() - { - /*$this->db->simple_query('DROP SCHEMA bis;'); - $this->db->simple_query('DROP SCHEMA campus;'); - $this->db->simple_query('DROP SCHEMA fue;'); - $this->db->simple_query('DROP SCHEMA kommune;'); - $this->db->simple_query('DROP SCHEMA lehre;'); - $this->db->simple_query('DROP SCHEMA sync;'); - $this->db->simple_query('DROP SCHEMA system;'); - $this->db->simple_query('DROP SCHEMA testtool;'); - $this->db->simple_query('DROP SCHEMA wawi;');*/ - } -} \ No newline at end of file diff --git a/application/seeds/001_organisation.php b/application/seeds/001_organisation.php deleted file mode 100644 index f19599b80..000000000 --- a/application/seeds/001_organisation.php +++ /dev/null @@ -1,170 +0,0 @@ -fhc =& get_instance(); - $this->fhc->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel'); - - $pre = 'INSERT INTO public.tbl_organisationseinheit VALUES ('; - $post = '; '; - - //$sql .= "INSERT INTO public.tbl_organisationseinheittyp VALUES ('Seminar'); "; - $sql = "INSERT INTO public.tbl_organisationseinheittyp VALUES ('Lehrgang'); "; - $sql .= "INSERT INTO public.tbl_studiengangstyp VALUES ('d', 'Diplom'); "; - - $sql .= "$pre 'fhstp', NULL, 'Fachhochschule St. Pölten', 'Erhalter', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL)$post"; - $sql .= "$pre 'depcon', 'fhstp', 'Studienzentrum', 'Studienzentrum', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL)$post"; - $sql .= "$pre 'depwi', 'depcon', 'Medien und Wirtschaft', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL)$post"; - $sql .= "$pre 'lmsc', 'depwi', 'LMSC', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'depgus', 'depcon', 'Gesundheit', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'ldem', 'depgus', 'LDEM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'depsoz', 'depcon', 'Soziales', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsbz', 'depsoz', 'LSBZ', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bum', 'depwi', 'BUM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmom', 'depwi', 'LMOM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmmo', 'depwi', 'LMMO', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmem', 'depwi', 'LMEM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bdi', 'depgus', 'BDI', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsom', 'depsoz', 'LSOM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'laet', 'depgus', 'LAET', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bpt', 'depgus', 'BPT', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'depet', 'depcon', 'Bahntechnologie und Mobilität', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mbm', 'depet', 'MBM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bmk', 'depwi', 'BMK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'deptech', 'depcon', 'Medien und Digitale Technologien', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'levd', 'deptech', 'LEVD', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bmt', 'deptech', 'BMT', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsma', 'depsoz', 'LSMA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'levm', 'depwi', 'LEVM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'dso', 'depsoz', 'DSO', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmev', 'depwi', 'LMEV', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'levt', 'deptech', 'LEVT', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lcma', 'depwi', 'LCMA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lpmf', 'deptech', 'LPMF', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mdh', 'deptech', 'MDH', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lafg', 'deptech', 'LAFG', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lpwk', 'deptech', 'LPWK', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lwkf', 'deptech', 'LWKF', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bdb', 'depwi', 'BDB', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'dtm', 'deptech', 'DTM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'dmm', 'depwi', 'DMM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'dcs', 'deptech', 'DCS', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bid', 'deptech', 'BID', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lvjg', 'depwi', 'LVJG', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lrdm', 'depwi', 'LRDM', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lptm', 'deptech', 'LPTM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mid', 'deptech', 'MID', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lebs', 'depet', 'LEBS', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'depit', 'depcon', 'Informatik und Security', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mis', 'depit', 'MIS', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bmm', 'depwi', 'BMM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bso', 'depsoz', 'BSO', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mmm', 'depwi', 'MMM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'msa', 'depsoz', 'MSA', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lfmr', 'depsoz', 'LFMR', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lspm', 'depsoz', 'LSPM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mso', 'depsoz', 'MSO', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsbl', 'depsoz', 'LSBL', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsbm', 'depsoz', 'LSBM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bbm', 'depet', 'BBM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mdm', 'deptech', 'MDM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mmk', 'depwi', 'MMK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bse', 'deptech', 'BSE', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lspa', 'depsoz', 'LSPA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'ltti', 'depet', 'LTTI', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lcmm', 'depwi', 'LCMM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmcm', 'depwi', 'LMCM', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lits', 'depit', 'LITS', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bis', 'depit', 'BIS', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bgk', 'depgus', 'BGK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lfea', 'depet', 'LFEA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsak', 'depsoz', 'LSAK', 'Seminar', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lksp', 'depsoz', 'LKSP', 'Seminar', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lpvp', 'depgus', 'LPVP', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'latm', 'deptech', 'LATM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lftm', 'deptech', 'LFTM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsmm', 'depsoz', 'LSMM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsbt', 'depet', 'LSBT', 'Seminar', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'gw', 'depgus', 'Institut für Gesundheitswissenschaften', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fhsc', 'fhstp', 'Services', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fhshsm', 'fhsc', 'Services für Hochschulmanagement und -Organisation', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'peui', 'fhshsm', 'Programmentwicklung und Innovation', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'pers_recht', 'fhshsm', 'Personal und Recht', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fhsl', 'fhsc', 'Services für Lehre', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'skill', 'fhsl', 'SKILL (Service- und Kompetenzzentrum für Innovatives Lehren und Lernen)', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mkt', 'fhshsm', 'Marketing und Unternehmenskommunikation', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'nsc', 'fhshsm', 'IT und Infrastruktur', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'qm', 'fhshsm', 'Qualitätsmanagement', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'frw', 'fhshsm', 'Finanzwesen und Controlling', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bibl', 'fhshsm', 'Bibliothek', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fhsfwt', 'fhsc', 'Services für Forschung und Wissenstransfer', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'csc', 'fhshsm', 'Campus Service Center', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'acc', 'fhshsm', 'Alumni und Career Center', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'luso', 'fhsl', 'Lehr- und Studienorganisation', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fh_kollegium', 'fhstp', 'FH-Kollegium', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'ro', 'fhsfwt', 'Forschung und Wissenstransfer', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'io', 'fhsfwt', 'International Office', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'recht', 'pers_recht', 'Recht', 'Lehrgang', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lppm', 'deptech', 'LPPM', 'Lehrgang', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mi', 'deptech', 'Medieninformatik', 'Institut', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'ia', 'depsoz', 'Ilse Arlt Institut für Soziale Inklusionsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'icmt', 'deptech', 'Institut für CreativeMediaTechnologies', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'gf', 'fhstp', 'Geschäftsführung', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'sf', 'depit', 'Institut für IT Sicherheitsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mw', 'depwi', 'Institut für Medienwirtschaft', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'crvg', 'depet', 'Carl Ritter von Ghega Institut für integrierte Mobilitätsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'hsm', 'fhstp', 'Hochschulmanagement', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'cr', 'fhstp', 'Campus Radio', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'abfctv', 'deptech', 'Ausbildungsfernsehen c-tv', 'Abteilung', true, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'jrz', 'depit', 'Josef Ressel-Zentrum für konsolidierte Erkennung gezielter Angriffe', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - - // Studiengaenge - $pre = 'INSERT INTO public.tbl_studiengang VALUES '; - $post = '; '; - - $sql .= "$pre (3, 'bum', 'BUM', 'b', 'BUM', 'BUM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (4, 'bdi', 'BDI', 'b', 'BDI', 'BDI', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (5, 'bpt', 'BPT', 'b', 'BPT', 'BPT', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (6, 'mbm', 'MBM', 'm', 'MBM', 'MBM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (7, 'bmk', 'BMK', 'b', 'BMK', 'BMK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (8, 'bmt', 'BMT', 'b', 'BMT', 'BMT', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (9, 'dso', 'DSO', 'd', 'DSO', 'DSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (10, 'mdh', 'MDH', 'm', 'MDH', 'MDH', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (11, 'bdb', 'BDB', 'b', 'BDB', 'BDB', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (12, 'dtm', 'DTM', 'd', 'DTM', 'DTM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (13, 'dmm', 'DMM', 'd', 'DMM', 'DMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (14, 'dcs', 'DCS', 'd', 'DCS', 'DCS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (15, 'bid', 'BID', 'b', 'BID', 'BID', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (16, 'mid', 'MID', 'm', 'MID', 'MID', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (17, 'mis', 'MIS', 'm', 'MIS', 'MIS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (18, 'bmm', 'BMM', 'b', 'BMM', 'BMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (19, 'bso', 'BSO', 'b', 'BSO', 'BSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (20, 'mmm', 'MMM', 'm', 'MMM', 'MMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (21, 'msa', 'MSA', 'm', 'MSA', 'MSA', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (22, 'mso', 'MSO', 'm', 'MSO', 'MSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (23, 'bbm', 'BBM', 'b', 'BBM', 'BBM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (24, 'mdm', 'MDM', 'm', 'MDM', 'MDM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (25, 'mmk', 'MMK', 'm', 'MMK', 'MMK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (26, 'bse', 'BSE', 'b', 'BSE', 'BSE', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (27, 'bis', 'BIS', 'b', 'BIS', 'BIS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (28, 'bgk', 'BGK', 'b', 'BGK', 'BGK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - - - $this->fhc->db->query($sql); - echo PHP_EOL; - - } - - public function truncate() - { - //$this->db->query('EMPTY TABLE public.person;'); - } -} - diff --git a/application/seeds/002_studienordnung.php b/application/seeds/002_studienordnung.php deleted file mode 100644 index fbe66f6a1..000000000 --- a/application/seeds/002_studienordnung.php +++ /dev/null @@ -1,142 +0,0 @@ -fhc =& get_instance(); - } - - public function seed($limit = 25) - { - // Studienordnung - echo "Seeding about $limit Studienordnungen
"; - $data = array('studiengang_kz' =>3, 'bezeichnung' => 'BUM-WS2016-VZ'); - $res = $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - if (! $res) - die($res); - else - $studienordnung_id = $this->fhc->db->insert_id(); - $data = array('studiengang_kz' =>4, 'bezeichnung' => 'BDI-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>5, 'bezeichnung' => 'BPT-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>6, 'bezeichnung' => 'MBM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>7, 'bezeichnung' => 'BMK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>8, 'bezeichnung' => 'BMT-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>9, 'bezeichnung' => 'DSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>10, 'bezeichnung' => 'MDH-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>11, 'bezeichnung' => 'BDB-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>12, 'bezeichnung' => 'DTM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>13, 'bezeichnung' => 'DMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>14, 'bezeichnung' => 'DCS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>15, 'bezeichnung' => 'BID-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>16, 'bezeichnung' => 'MID-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>17, 'bezeichnung' => 'MIS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>18, 'bezeichnung' => 'BMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>19, 'bezeichnung' => 'BSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>20, 'bezeichnung' => 'MMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>21, 'bezeichnung' => 'MSA-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>22, 'bezeichnung' => 'MSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>23, 'bezeichnung' => 'BBM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>24, 'bezeichnung' => 'MDM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>25, 'bezeichnung' => 'MMK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>26, 'bezeichnung' => 'BSE-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>27, 'bezeichnung' => 'BIS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>28, 'bezeichnung' => 'BGK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - - //Studienplan - echo "Seeding about $limit Studienplaene
"; - $data = array('studienordnung_id' => $studienordnung_id, 'bezeichnung' => 'BUM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+1, 'bezeichnung' => 'BDI-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+2, 'bezeichnung' => 'BPT-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+3, 'bezeichnung' => 'MBM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+4, 'bezeichnung' => 'BMK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+5, 'bezeichnung' => 'BMT-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+6, 'bezeichnung' => 'DSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+7, 'bezeichnung' => 'MDH-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+8, 'bezeichnung' => 'BDB-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+9, 'bezeichnung' => 'DTM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+10, 'bezeichnung' => 'DMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+11, 'bezeichnung' => 'DCS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+12, 'bezeichnung' => 'BID-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+13, 'bezeichnung' => 'MID-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+14, 'bezeichnung' => 'MIS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+15, 'bezeichnung' => 'BMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+16, 'bezeichnung' => 'BSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+17, 'bezeichnung' => 'MMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+18, 'bezeichnung' => 'MSA-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+19, 'bezeichnung' => 'MSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+20, 'bezeichnung' => 'BBM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+21, 'bezeichnung' => 'MDM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+22, 'bezeichnung' => 'MMK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+23, 'bezeichnung' => 'BSE-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+24, 'bezeichnung' => 'BIS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+25, 'bezeichnung' => 'BGK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - - // Studienplaene - - - echo PHP_EOL; - - } - - public function truncate() - { - echo "Truncating Studienordnungen and Studienplaene!"; - $this->fhc->db->query('DELETE FROM lehre.tbl_studienplan WHERE studienordnung_id>1;'); - $this->fhc->db->query('DELETE FROM lehre.tbl_studienordnung WHERE studienordnung_id>1;'); - } -} - diff --git a/application/seeds/003_person.php b/application/seeds/003_person.php deleted file mode 100644 index 511bffb02..000000000 --- a/application/seeds/003_person.php +++ /dev/null @@ -1,50 +0,0 @@ -fhc =& get_instance(); - } - - public function seed($limit = 200) - { - echo "Seeding $limit persons "; - - for ($i = 0; $i < $limit; $i++) - { - echo "."; - $data = array( - // 'username' => $this->faker->unique()->userName, // get a unique nickname - 'vorname' => $this->fhc->faker->firstName, - 'vornamen' => $this->fhc->faker->firstName, - 'nachname' => $this->fhc->faker->lastName, - //'address' => $this->faker->streetAddress, - 'gebort' => $this->fhc->faker->city, - //'state' => $this->faker->state, - //'country' => $this->faker->country, - //'postcode' => $this->faker->postcode, - //'email' => $this->faker->email, - //'email_verified' => mt_rand(0, 1) ? '0' : '1', - //'phone' => $this->faker->phoneNumber, - 'gebdatum' => $this->fhc->faker->dateTimeThisCentury->format('Y-m-d H:i:s'), - //'registration_date' => $this->faker->dateTimeThisYear->format('Y-m-d H:i:s'), - //'ip_address' => mt_rand(0, 1) ? $this->faker->ipv4 : $this->faker->ipv6, - ); - - $this->fhc->db->insert('public.tbl_person', $data); - } - - echo PHP_EOL; - - } - - public function truncate() - { - $this->fhc->db->query('DELETE FROM public.tbl_person WHERE person_id>2;'); - } -} - diff --git a/application/seeds/004_prestudent.php b/application/seeds/004_prestudent.php deleted file mode 100644 index 7be4e8651..000000000 --- a/application/seeds/004_prestudent.php +++ /dev/null @@ -1,58 +0,0 @@ -fhc =& get_instance(); - } - - public function seed($limit = 25) - { - echo "Seeding $limit prestudents "; - - $person = $this->fhc->db->query('SELECT person_id FROM public.tbl_person WHERE person_id>2 AND person_id%5!=0 LIMIT 100;'); - $studplan = $this->fhc->db->query('SELECT oe_kurzbz, studiengang_kz, studienplan_id from public.tbl_studiengang JOIN lehre.tbl_studienordnung USING (studiengang_kz) JOIN lehre.tbl_studienplan USING (studienordnung_id) LIMIT 100;'); - $studrows = $studplan->num_rows(); - $studplan = $studplan->result(); - - $i = 0; - foreach ($person->result() as $p) - { - $studrow = $i % $studrows; - - // Prestudent - $data = array( - 'person_id' => $p->person_id, - 'aufmerksamdurch_kurzbz' => 'k.A.', - 'studiengang_kz' => $studplan[$studrow]->studiengang_kz - ); - $this->fhc->db->insert('public.tbl_prestudent',$data); - $id = $this->fhc->db->insert_id(); - - // Prestudentstatus - $data = array( - 'prestudent_id' => $id, - 'status_kurzbz' => 'Interessent', - 'studiensemester_kurzbz' => 'WS2016', - 'datum' => 'now()', - 'studienplan_id' => $studplan[$studrow]->studienplan_id - ); - $this->fhc->db->insert('public.tbl_prestudentstatus',$data); - - echo "."; - if (++$i>$limit) - break; - } - - echo PHP_EOL; - } - - public function truncate() - { - $this->fhc->db->query('DELETE FROM public.tbl_prestudent;'); - } -} - diff --git a/application/seeds/005_message.php b/application/seeds/005_message.php deleted file mode 100644 index 8e6d6b50e..000000000 --- a/application/seeds/005_message.php +++ /dev/null @@ -1,55 +0,0 @@ -fhc =& get_instance(); - $this->fhc->load->helper('fhc'); - } - - public function seed($limit = 50) - { - echo "Seeding $limit messages "; - // fetch some persons - $db = $this->fhc->db->query('SELECT person_id FROM public.tbl_person LIMIT 100;'); - $person = $db->result(); - $num_persons = $db->num_rows(); - - for ($i = 0; $i < $limit; $i++) - { - echo "."; - - $data = array - ( - 'subject' => $this->fhc->faker->sentence(4, true), - 'body' => $this->fhc->faker->text(400), - 'person_id' => $person[$i%$num_persons]->person_id - ); - $this->fhc->db->insert('public.tbl_msg_message', $data); - $message_id = $this->fhc->db->insert_id(); - - $data = array - ( - 'message_id' => $message_id, - 'person_id' => $person[$i%($num_persons-1)+1]->person_id, - 'token' => generateToken(), - 'insertvon' => 'seed' - ); - $recipient = $this->fhc->db->insert('public.tbl_msg_recipient', $data); - if (!$recipient) - show_error($recipient); - } - - echo PHP_EOL; - - } - - public function truncate() - { - $this->fhc->db->query('DELETE FROM public.msg_message;'); - } -} diff --git a/application/seeds/006_vorlage.php b/application/seeds/006_vorlage.php deleted file mode 100644 index e52b5d8df..000000000 --- a/application/seeds/006_vorlage.php +++ /dev/null @@ -1,170 +0,0 @@ -fhc =& get_instance(); - } - - public function seed() - { - echo "Seeding Standard templates (Vorlage) "; - // OEen ohne Eltern holen - $query = 'SELECT oe_kurzbz FROM public.tbl_organisationseinheit WHERE oe_parent_kurzbz IS NULL;'; - $oe = $this->fhc->db->query($query)->result(); - - // ************** Mail Registration Conf ****************** - // Insert Template MailRegistrationConfirmation - $query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailRegistrationConfirmation', 'eMail zur Bestätigung der Registrierung', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"code\": { \"type\": \"string\", \"description\": \"Accesscode\", \"minLength\": 6, \"default\": \"1q2w3e4r5t6z7u8i9o0\" }, \"link\": { \"type\": \"string\", \"description\": \"LoginURL\", \"minLength\": 6, \"default\": \"https://demo.fhcomplete.org/addons/aufnahme/cis/index.php/\" } }}'); - "; - if (! $this->fhc->db->simple_query($query)) - echo "Error adding Template MailRegistrationConfirmation!"; - - // Insert Vorlagetext for MailRegistration - foreach ($oe as $o) - { - $query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailRegistrationConfirmation', 0, 1, '

Vielen Dank für Ihre Anmeldung!

-

Bitte klicken Sie folgenden Link, um Ihre Anmeldung zu bestätigen:
{link}

-

Ihre Anmeldedaten:
-Code: {code}
-eMail: {eMailAdresse}

-

Mit freundlichen Grüßen,
FH Complete

', '$o->oe_kurzbz','German','Registration'); - "; - if ($this->fhc->db->simple_query($query)) - echo 'Added Tamplate MailRegistrationConfirmation for OE:'.$o->oe_kurzbz.' '; - } - - // ************** Mail Application Conf ****************** - // Insert Template MailApplicationConfirmation - $query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailApplicationConfirmation', 'eMail zur Bestätigung der Bewerbung', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Max\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Mustermann\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Medientechnik\" } }}'); - "; - if (! $this->fhc->db->simple_query($query)) - echo "Error adding Template MailApplicationConfirmation!"; - - // Insert Vorlagetext for MailApplicationConfirmation - foreach ($oe as $o) - { - $query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailApplicationConfirmation', 0, 1, '

Sehr geehrter Herr {vorname} {nachname}!

-

Wir freuen uns über Ihre Bewerbung für das Studium {typ} {studiengang} an unserer Fachhochschule und bestätigen den Erhalt Ihrer Bewerbungsunterlagen. Ihre Bewerbung wird von uns bearbeitet und die Zugangsvoraussetzungen geprüft. Im Falle von Unklarheiten melden wir uns bei Ihnen.

-

Über die endgültige Aufnahme wird nach Abschluss des Aufnahmeverfahrens entschieden. - Bitte melden Sie sich für einen Aufnahmetermin an, sofern Sie das noch nicht erledigt haben.

-

Bei Fragen stehen wir Ihnen gerne zur Verfügung!

-

Mit freundlichen Grüßen
- FH Complete

- - Fachhochschule FHComplete
- Demostrasse 15,
- 1234 Ortsname
- T: +43/555/123 456 - 200
- F: +43/555/123 456 - 339
- M: bewerbung@example.com
- I: www.example.com
-
-
- ________________________ -
-

Dear {vorname} {nachname}!

-

Thank you for your application for  the degree program {typ} {studiengang} at our University, which we hereby confirm. Your application is currently being processed and the admission requirements checked. We will contact you if something is not clear. - Decisions concerning admission will be made after the application process has been finalized. We would ask you to register for an admission date if you have not already done so.

-

In the event of any questions, please do not hesitate to contact: -

Yours sincerely,
- FH Complete

- - Fachhochschule FHComplete
- Demostrasse 15,
- 1234 Ortsname
- T: +43/555/123 456 - 200
- F: +43/555/123 456 - 339
- M: bewerbung@example.com
- I: www.example.com
-
', '$o->oe_kurzbz','German','Registrierung'); - "; - if ($this->fhc->db->simple_query($query)) - echo 'Added Tamplate MailApplicationConfirmation for OE:'.$o->oe_kurzbz.' '; - } - - // ************** Mail Appointment Conf ****************** - // Insert Template MailAppointmentConfirmation - $query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailAppointmentConfirmation', 'eMail zur Bestätigung des Aufnahmetermins', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Studiengang\" }, \"orgform\": { \"type\": \"string\", \"description\": \"Organisationsform\", \"minLength\": 2, \"default\": \"Vollzeit\" }, \"termin\": { \"type\": \"string\", \"description\": \"Aufnahmetermin\", \"minLength\": 1, \"default\": \"Dummytermin:11.22.3333, 44:55\" } }}'); - "; - if (! $this->fhc->db->simple_query($query)) - echo "Error adding Template MailAppointmentConfirmation!"; - - // Insert Vorlagetext for MailAppointmentConfirmation - foreach ($oe as $o) - { - $query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailAppointmentConfirmation', 0, 1, '

Vielen Dank für Ihre Anmeldung zum Aufnahmetermin des {typ}-Studiengangs {studiengang} ({orgform})!

-

Sie haben folgenden Aufnahmetermin ausgewählt: - {termin}

-

Unser Aufnahmeverfahren besteht aus einem computergestützten, bildungsneutralen Test sowie einem Aufnahmegespräch. Informationen zum genauen Ablauf des Aufnahmetages erhalten Sie ca. eine Woche vor dem Termin per E-Mail. Bitte reservieren Sie sich aber vorerst den ganzen Tag. Die Einteilung ist abhängig von der Anzahl der BewerberInnen.

-

Wir bitten Sie, sich rechtzeitig zu Ihrem ausgewählten Termin am Fachhochschulstandort am Informationstreffpunkt im Erdgeschoß einzufinden. Die Registrierung zur Testteilnahme erfolgt jeweils 45 Min. vor Testbeginn. - Zur persönlichen Identifikation ist es erforderlich, einen aktuellen Lichtbildausweis (Führerschein oder Pass) vorzulegen.

-

Die Ergebnisse werden erst nach Abschluss des gesamten Aufnahmeverfahrens innerhalb von 14 Tagen nach dem letzten Aufnahmetermin bekannt gegeben.

-

Wir wünschen Ihnen viel Erfolg für das Aufnahmeverfahren!

- -

Bei Fragen stehen wir Ihnen gerne zur Verfügung!
- Mit freundlichen Grüßen,
- FH Complete

- - Fachhochschule FHComplete
- Demostrasse 15,
- 1234 Ortsname
- T: +43/555/123 456 - 200
- F: +43/555/123 456 - 339
- M: bewerbung@example.com
- I: www.example.com
-

Achtung!
- Antworten Sie nicht direkt auf diese Mail, da diese Mailadresse nur dem Versenden von Mails dient.
- Bitte wenden Sie sich direkt an das zuständige Studiengangssekretariat.', '$o->oe_kurzbz','German','Bestätigung Aufnahmetermin'); - "; - if ($this->fhc->db->simple_query($query)) - echo 'Added Tamplate MailAppointmentConfirmation for OE:'.$o->oe_kurzbz.' '; - } - - - // ************** Mail Status Confirmation Interessent ****************** - // Insert Template MailStatConfirmInteressent - $query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailStatConfirmInteressent', 'Zulassung zum Aufnahmeverfahren', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Studiengang\" }, \"orgform\": { \"type\": \"string\", \"description\": \"Organisationsform\", \"minLength\": 2, \"default\": \"Vollzeit\" }, \"stgMail\": { \"type\": \"string\", \"description\": \"StudiengangsMailAdresse\", \"minLength\": 1, \"default\": \"xxx@example.com\" } }}'); - "; - if (! $this->fhc->db->simple_query($query)) - echo "Error adding Template MailAppointmentConfirmation!"; - - // Insert Vorlagetext for MailAppointmentConfirmation - foreach ($oe as $o) - { - $query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailStatConfirmInteressent', 0, 1, 'Sehr geehrte/r {anrede} {vorname} {nachname}, - - Sie haben die notwendigen Zugangsvoraussetzungen zum {typ}-Studiengang {studiengang} ({orgform}) erfüllt und sind nun für das Aufnahmeverfahren zugelassen. - Bitte wählen Sie Ihren gewünschten Termin in der Online Bewerbung unter dem Menüpunkt „Aufnahmetermine“ aus. - Bei Fragen stehen wir Ihnen gerne unter {stgMail} zur Verfügung! - - Mit freundlichen Grüßen, - Studiengang {studiengang} - - Fachhochschule FHComplete
- Demostrasse 15,
- 1234 Ortsname
- T: +43/555/123 456 - 200
- F: +43/555/123 456 - 339
- M: bewerbung@example.com
- I: www.example.com
-
-

Achtung!
- Antworten Sie nicht direkt auf diese Mail, da diese Mailadresse nur dem Versenden von Mails dient.
- Bitte wenden Sie sich direkt an das zuständige Studiengangssekretariat. ({stgMail})', '$o->oe_kurzbz','German','Zulassung zum Aufnahmeverfahren'); - "; - if ($this->fhc->db->simple_query($query)) - echo 'Added Tamplate MailAppointmentConfirmation for OE:'.$o->oe_kurzbz.' '; - } - echo PHP_EOL; - } - - public function truncate() - { - //$this->fhc->db->query("DELETE FROM public.tbl_vorlage WHERE mimetype='text/html';"); - } -} From 50f3b95c89f3caa3060c631622d764e276c67b2f Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 26 Apr 2019 11:16:41 +0200 Subject: [PATCH 10/84] Deleted all not used models by this project and by extensions --- .../models/accounting/Aufteilung_model.php | 14 --- .../models/accounting/Bestelldetail_model.php | 14 --- .../accounting/Bestelldetailtag_model.php | 14 --- .../models/accounting/Bestellstatus_model.php | 14 --- .../models/accounting/Bestellung_model.php | 14 --- .../models/accounting/Bestellungtag_model.php | 14 --- .../models/accounting/Buchung_model.php | 14 --- .../models/accounting/Buchungstyp_model.php | 14 --- .../models/accounting/Budget_model.php | 14 --- .../models/accounting/Rechnung_model.php | 14 --- .../accounting/Rechnungsbetrag_model.php | 14 --- .../models/accounting/Rechnungstyp_model.php | 14 --- .../models/accounting/Vertrag_model.php | 14 --- .../accounting/Vertragsstatus_model.php | 14 --- .../models/accounting/Vertragstyp_model.php | 14 --- .../models/accounting/Zahlungstyp_model.php | 14 --- application/models/codex/Akadgrad_model.php | 14 --- application/models/codex/Archiv_model.php | 14 --- .../models/codex/Aufmerksamdurch_model.php | 14 --- application/models/codex/Ausbildung_model.php | 14 --- .../models/codex/Berufstaetigkeit_model.php | 14 --- .../codex/Beschaeftigungsausmass_model.php | 14 --- application/models/codex/Besqual_model.php | 14 --- .../models/codex/Bisfunktion_model.php | 14 --- application/models/codex/Bisio_model.php | 14 --- application/models/codex/Bisorgform_model.php | 14 --- .../models/codex/Bisverwendung_model.php | 14 --- application/models/codex/Bundesland_model.php | 14 --- .../models/codex/Entwicklungsteam_model.php | 14 --- application/models/codex/Gemeinde_model.php | 22 ----- application/models/codex/Hauptberuf_model.php | 14 --- application/models/codex/Lehrform_model.php | 14 --- application/models/codex/Lgartcode_model.php | 14 --- .../codex/Mobilitaetsprogramm_model.php | 14 --- application/models/codex/Nation_model.php | 14 --- application/models/codex/Note_model.php | 14 --- application/models/codex/Verwendung_model.php | 14 --- application/models/codex/Zgv_model.php | 14 --- application/models/codex/Zgvdoktor_model.php | 14 --- application/models/codex/Zgvgruppe_model.php | 13 --- application/models/codex/Zgvmaster_model.php | 14 --- application/models/codex/Zweck_model.php | 14 --- application/models/content/Content_model.php | 14 --- .../models/content/Contentchild_model.php | 14 --- .../models/content/Contentgruppe_model.php | 14 --- .../models/content/Contentlog_model.php | 14 --- .../models/content/Contentsprache_model.php | 14 --- .../models/content/Infoscreen_model.php | 14 --- application/models/content/News_model.php | 14 --- application/models/content/Template_model.php | 14 --- .../models/content/Veranstaltung_model.php | 14 --- .../content/Veranstaltungskategorie_model.php | 14 --- .../models/crm/Aufnahmeschluessel_model.php | 14 --- .../models/crm/Bewerbungstermine_model.php | 14 --- application/models/crm/Buchungstyp_model.php | 14 --- application/models/crm/Dokument_model.php | 14 --- .../models/crm/Dokumentprestudent_model.php | 71 --------------- application/models/crm/Konto_model.php | 14 --- application/models/crm/Preincoming_model.php | 14 --- .../models/crm/Preinteressent_model.php | 14 --- .../crm/Preinteressentstudiengang_model.php | 14 --- application/models/crm/Preoutgoing_model.php | 14 --- application/models/crm/Student_model.php | 48 ---------- application/models/education/Uebung_model.php | 14 --- .../models/organisation/Erhalter_model.php | 14 --- .../models/organisation/Fachbereich_model.php | 14 --- .../models/organisation/Ferien_model.php | 14 --- .../models/organisation/Lehrverband_model.php | 14 --- .../Organisationseinheittyp_model.php | 14 --- .../organisation/Semesterwochen_model.php | 14 --- .../models/organisation/Service_model.php | 14 --- .../models/organisation/Standort_model.php | 14 --- .../models/organisation/Statistik_model.php | 14 --- .../organisation/Studiengangstyp_model.php | 14 --- .../organisation/Studienordnung_model.php | 14 --- .../Studienordnungstatus_model.php | 14 --- .../organisation/Studienplatz_model.php | 14 --- .../models/person/Bankverbindung_model.php | 14 --- .../models/person/Benutzergruppe_model.php | 15 ---- .../models/person/Fotostatus_model.php | 14 --- application/models/person/Freebusy_model.php | 14 --- .../models/person/Freebusytyp_model.php | 14 --- .../models/person/Kontaktmedium_model.php | 14 --- .../models/person/Kontakttyp_model.php | 14 --- .../models/person/Notizzuordnung_model.php | 14 --- .../models/project/Aktivitaet_model.php | 14 --- .../models/project/Aufwandstyp_model.php | 14 --- .../project/Projekt_ressource_model.php | 14 --- .../models/project/Projektphase_model.php | 14 --- .../models/project/Projekttask_model.php | 14 --- .../models/project/Ressource_model.php | 14 --- .../models/project/Scrumsprint_model.php | 14 --- .../models/ressource/Betriebsmittel_model.php | 14 --- .../ressource/Betriebsmittelperson_model.php | 14 --- .../ressource/Betriebsmittelstatus_model.php | 14 --- .../ressource/Betriebsmitteltyp_model.php | 14 --- application/models/ressource/Coodle_model.php | 14 --- .../models/ressource/Erreichbarkeit_model.php | 14 --- application/models/ressource/Firma_model.php | 14 --- .../models/ressource/Firmatag_model.php | 14 --- .../models/ressource/Firmentyp_model.php | 14 --- .../models/ressource/Funktion_model.php | 14 --- .../models/ressource/Lehrmittel_model.php | 14 --- .../models/ressource/Mitarbeiter_model.php | 14 --- application/models/ressource/Ort_model.php | 23 ----- .../models/ressource/Ortraumtyp_model.php | 14 --- .../Personfunktionstandort_model.php | 14 --- .../models/ressource/Raumtyp_model.php | 14 --- .../models/ressource/Reservierung_model.php | 14 --- application/models/ressource/Stunde_model.php | 14 --- .../models/ressource/Stundenplan_model.php | 14 --- .../ressource/Zeitaufzeichnung_model.php | 14 --- .../models/ressource/Zeitsperre_model.php | 14 --- .../models/ressource/Zeitsperretyp_model.php | 14 --- .../models/ressource/Zeitwunsch_model.php | 14 --- application/models/system/App_model.php | 15 ---- .../models/system/Berechtigung_model.php | 14 --- application/models/system/Cronjob_model.php | 14 --- application/models/system/Filter_model.php | 14 --- application/models/system/Log_model.php | 14 --- .../models/system/PersonLock_model.php | 88 ------------------- application/models/system/Rolle_model.php | 14 --- .../models/system/Rolleberechtigung_model.php | 14 --- application/models/system/Server_model.php | 14 --- application/models/system/Tag_model.php | 14 --- application/models/system/Variable_model.php | 14 --- .../models/system/Webservicelog_model.php | 14 --- .../models/system/Webservicerecht_model.php | 14 --- .../models/system/Webservicetyp_model.php | 14 --- application/models/testtool/Ablauf_model.php | 14 --- application/models/testtool/Antwort_model.php | 14 --- application/models/testtool/Frage_model.php | 14 --- application/models/testtool/Gebiet_model.php | 14 --- .../models/testtool/Kategorie_model.php | 14 --- .../models/testtool/Kriterien_model.php | 14 --- .../models/testtool/Pruefling_model.php | 14 --- .../models/testtool/Vorschlag_model.php | 14 --- 137 files changed, 2101 deletions(-) delete mode 100644 application/models/accounting/Aufteilung_model.php delete mode 100644 application/models/accounting/Bestelldetail_model.php delete mode 100644 application/models/accounting/Bestelldetailtag_model.php delete mode 100644 application/models/accounting/Bestellstatus_model.php delete mode 100644 application/models/accounting/Bestellung_model.php delete mode 100644 application/models/accounting/Bestellungtag_model.php delete mode 100644 application/models/accounting/Buchung_model.php delete mode 100644 application/models/accounting/Buchungstyp_model.php delete mode 100644 application/models/accounting/Budget_model.php delete mode 100644 application/models/accounting/Rechnung_model.php delete mode 100644 application/models/accounting/Rechnungsbetrag_model.php delete mode 100644 application/models/accounting/Rechnungstyp_model.php delete mode 100644 application/models/accounting/Vertrag_model.php delete mode 100644 application/models/accounting/Vertragsstatus_model.php delete mode 100644 application/models/accounting/Vertragstyp_model.php delete mode 100644 application/models/accounting/Zahlungstyp_model.php delete mode 100644 application/models/codex/Akadgrad_model.php delete mode 100644 application/models/codex/Archiv_model.php delete mode 100644 application/models/codex/Aufmerksamdurch_model.php delete mode 100644 application/models/codex/Ausbildung_model.php delete mode 100644 application/models/codex/Berufstaetigkeit_model.php delete mode 100644 application/models/codex/Beschaeftigungsausmass_model.php delete mode 100644 application/models/codex/Besqual_model.php delete mode 100644 application/models/codex/Bisfunktion_model.php delete mode 100644 application/models/codex/Bisio_model.php delete mode 100644 application/models/codex/Bisorgform_model.php delete mode 100644 application/models/codex/Bisverwendung_model.php delete mode 100644 application/models/codex/Bundesland_model.php delete mode 100644 application/models/codex/Entwicklungsteam_model.php delete mode 100644 application/models/codex/Gemeinde_model.php delete mode 100644 application/models/codex/Hauptberuf_model.php delete mode 100644 application/models/codex/Lehrform_model.php delete mode 100644 application/models/codex/Lgartcode_model.php delete mode 100644 application/models/codex/Mobilitaetsprogramm_model.php delete mode 100644 application/models/codex/Nation_model.php delete mode 100644 application/models/codex/Note_model.php delete mode 100644 application/models/codex/Verwendung_model.php delete mode 100644 application/models/codex/Zgv_model.php delete mode 100644 application/models/codex/Zgvdoktor_model.php delete mode 100644 application/models/codex/Zgvgruppe_model.php delete mode 100644 application/models/codex/Zgvmaster_model.php delete mode 100644 application/models/codex/Zweck_model.php delete mode 100644 application/models/content/Content_model.php delete mode 100644 application/models/content/Contentchild_model.php delete mode 100644 application/models/content/Contentgruppe_model.php delete mode 100644 application/models/content/Contentlog_model.php delete mode 100644 application/models/content/Contentsprache_model.php delete mode 100644 application/models/content/Infoscreen_model.php delete mode 100644 application/models/content/News_model.php delete mode 100644 application/models/content/Template_model.php delete mode 100644 application/models/content/Veranstaltung_model.php delete mode 100644 application/models/content/Veranstaltungskategorie_model.php delete mode 100644 application/models/crm/Aufnahmeschluessel_model.php delete mode 100644 application/models/crm/Bewerbungstermine_model.php delete mode 100644 application/models/crm/Buchungstyp_model.php delete mode 100644 application/models/crm/Dokument_model.php delete mode 100644 application/models/crm/Dokumentprestudent_model.php delete mode 100644 application/models/crm/Konto_model.php delete mode 100644 application/models/crm/Preincoming_model.php delete mode 100644 application/models/crm/Preinteressent_model.php delete mode 100644 application/models/crm/Preinteressentstudiengang_model.php delete mode 100644 application/models/crm/Preoutgoing_model.php delete mode 100644 application/models/crm/Student_model.php delete mode 100644 application/models/education/Uebung_model.php delete mode 100644 application/models/organisation/Erhalter_model.php delete mode 100644 application/models/organisation/Fachbereich_model.php delete mode 100644 application/models/organisation/Ferien_model.php delete mode 100644 application/models/organisation/Lehrverband_model.php delete mode 100644 application/models/organisation/Organisationseinheittyp_model.php delete mode 100644 application/models/organisation/Semesterwochen_model.php delete mode 100644 application/models/organisation/Service_model.php delete mode 100644 application/models/organisation/Standort_model.php delete mode 100644 application/models/organisation/Statistik_model.php delete mode 100644 application/models/organisation/Studiengangstyp_model.php delete mode 100644 application/models/organisation/Studienordnung_model.php delete mode 100644 application/models/organisation/Studienordnungstatus_model.php delete mode 100644 application/models/organisation/Studienplatz_model.php delete mode 100644 application/models/person/Bankverbindung_model.php delete mode 100644 application/models/person/Benutzergruppe_model.php delete mode 100644 application/models/person/Fotostatus_model.php delete mode 100644 application/models/person/Freebusy_model.php delete mode 100644 application/models/person/Freebusytyp_model.php delete mode 100644 application/models/person/Kontaktmedium_model.php delete mode 100644 application/models/person/Kontakttyp_model.php delete mode 100644 application/models/person/Notizzuordnung_model.php delete mode 100644 application/models/project/Aktivitaet_model.php delete mode 100644 application/models/project/Aufwandstyp_model.php delete mode 100644 application/models/project/Projekt_ressource_model.php delete mode 100644 application/models/project/Projektphase_model.php delete mode 100644 application/models/project/Projekttask_model.php delete mode 100644 application/models/project/Ressource_model.php delete mode 100644 application/models/project/Scrumsprint_model.php delete mode 100644 application/models/ressource/Betriebsmittel_model.php delete mode 100644 application/models/ressource/Betriebsmittelperson_model.php delete mode 100644 application/models/ressource/Betriebsmittelstatus_model.php delete mode 100644 application/models/ressource/Betriebsmitteltyp_model.php delete mode 100644 application/models/ressource/Coodle_model.php delete mode 100644 application/models/ressource/Erreichbarkeit_model.php delete mode 100644 application/models/ressource/Firma_model.php delete mode 100644 application/models/ressource/Firmatag_model.php delete mode 100644 application/models/ressource/Firmentyp_model.php delete mode 100644 application/models/ressource/Funktion_model.php delete mode 100644 application/models/ressource/Lehrmittel_model.php delete mode 100644 application/models/ressource/Mitarbeiter_model.php delete mode 100644 application/models/ressource/Ort_model.php delete mode 100644 application/models/ressource/Ortraumtyp_model.php delete mode 100644 application/models/ressource/Personfunktionstandort_model.php delete mode 100644 application/models/ressource/Raumtyp_model.php delete mode 100644 application/models/ressource/Reservierung_model.php delete mode 100644 application/models/ressource/Stunde_model.php delete mode 100644 application/models/ressource/Stundenplan_model.php delete mode 100644 application/models/ressource/Zeitaufzeichnung_model.php delete mode 100644 application/models/ressource/Zeitsperre_model.php delete mode 100644 application/models/ressource/Zeitsperretyp_model.php delete mode 100644 application/models/ressource/Zeitwunsch_model.php delete mode 100644 application/models/system/App_model.php delete mode 100644 application/models/system/Berechtigung_model.php delete mode 100644 application/models/system/Cronjob_model.php delete mode 100644 application/models/system/Filter_model.php delete mode 100644 application/models/system/Log_model.php delete mode 100644 application/models/system/PersonLock_model.php delete mode 100644 application/models/system/Rolle_model.php delete mode 100644 application/models/system/Rolleberechtigung_model.php delete mode 100644 application/models/system/Server_model.php delete mode 100644 application/models/system/Tag_model.php delete mode 100644 application/models/system/Variable_model.php delete mode 100644 application/models/system/Webservicelog_model.php delete mode 100644 application/models/system/Webservicerecht_model.php delete mode 100644 application/models/system/Webservicetyp_model.php delete mode 100644 application/models/testtool/Ablauf_model.php delete mode 100644 application/models/testtool/Antwort_model.php delete mode 100644 application/models/testtool/Frage_model.php delete mode 100644 application/models/testtool/Gebiet_model.php delete mode 100644 application/models/testtool/Kategorie_model.php delete mode 100644 application/models/testtool/Kriterien_model.php delete mode 100644 application/models/testtool/Pruefling_model.php delete mode 100644 application/models/testtool/Vorschlag_model.php diff --git a/application/models/accounting/Aufteilung_model.php b/application/models/accounting/Aufteilung_model.php deleted file mode 100644 index bacd50404..000000000 --- a/application/models/accounting/Aufteilung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_aufteilung'; - $this->pk = 'aufteilung_id'; - } -} diff --git a/application/models/accounting/Bestelldetail_model.php b/application/models/accounting/Bestelldetail_model.php deleted file mode 100644 index dd57002d1..000000000 --- a/application/models/accounting/Bestelldetail_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestelldetail'; - $this->pk = 'bestelldetail_id'; - } -} diff --git a/application/models/accounting/Bestelldetailtag_model.php b/application/models/accounting/Bestelldetailtag_model.php deleted file mode 100644 index a760c26a2..000000000 --- a/application/models/accounting/Bestelldetailtag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestelldetailtag'; - $this->pk = array('bestelldetail_id', 'tag'); - } -} diff --git a/application/models/accounting/Bestellstatus_model.php b/application/models/accounting/Bestellstatus_model.php deleted file mode 100644 index 0f9810818..000000000 --- a/application/models/accounting/Bestellstatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestellstatus'; - $this->pk = 'bestellstatus_kurzbz'; - } -} diff --git a/application/models/accounting/Bestellung_model.php b/application/models/accounting/Bestellung_model.php deleted file mode 100644 index 0d0ea37f8..000000000 --- a/application/models/accounting/Bestellung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestellung'; - $this->pk = 'bestellung_id'; - } -} diff --git a/application/models/accounting/Bestellungtag_model.php b/application/models/accounting/Bestellungtag_model.php deleted file mode 100644 index 77c7416f5..000000000 --- a/application/models/accounting/Bestellungtag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestellungtag'; - $this->pk = array('bestellung_id', 'tag'); - } -} diff --git a/application/models/accounting/Buchung_model.php b/application/models/accounting/Buchung_model.php deleted file mode 100644 index adc700dfc..000000000 --- a/application/models/accounting/Buchung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_buchung'; - $this->pk = 'buchung_id'; - } -} diff --git a/application/models/accounting/Buchungstyp_model.php b/application/models/accounting/Buchungstyp_model.php deleted file mode 100644 index 7ed47217d..000000000 --- a/application/models/accounting/Buchungstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_buchungstyp'; - $this->pk = 'buchungstyp_kurzbz'; - } -} diff --git a/application/models/accounting/Budget_model.php b/application/models/accounting/Budget_model.php deleted file mode 100644 index f425f3479..000000000 --- a/application/models/accounting/Budget_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_budget'; - $this->pk = array('kostenstelle_id', 'geschaeftsjahr_kurzbz'); - } -} diff --git a/application/models/accounting/Rechnung_model.php b/application/models/accounting/Rechnung_model.php deleted file mode 100644 index 6e5ddcf83..000000000 --- a/application/models/accounting/Rechnung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_rechnung'; - $this->pk = 'rechnung_id'; - } -} diff --git a/application/models/accounting/Rechnungsbetrag_model.php b/application/models/accounting/Rechnungsbetrag_model.php deleted file mode 100644 index 11617429c..000000000 --- a/application/models/accounting/Rechnungsbetrag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_rechnungsbetrag'; - $this->pk = 'rechnungsbetrag_id'; - } -} diff --git a/application/models/accounting/Rechnungstyp_model.php b/application/models/accounting/Rechnungstyp_model.php deleted file mode 100644 index 3f1e0633e..000000000 --- a/application/models/accounting/Rechnungstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_rechnungstyp'; - $this->pk = 'rechnungstyp_kurzbz'; - } -} diff --git a/application/models/accounting/Vertrag_model.php b/application/models/accounting/Vertrag_model.php deleted file mode 100644 index cd4b466d6..000000000 --- a/application/models/accounting/Vertrag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_vertrag'; - $this->pk = 'vertrag_id'; - } -} diff --git a/application/models/accounting/Vertragsstatus_model.php b/application/models/accounting/Vertragsstatus_model.php deleted file mode 100644 index 21367b84a..000000000 --- a/application/models/accounting/Vertragsstatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_vertragsstatus'; - $this->pk = 'vertragsstatus_kurzbz'; - } -} diff --git a/application/models/accounting/Vertragstyp_model.php b/application/models/accounting/Vertragstyp_model.php deleted file mode 100644 index 42d248217..000000000 --- a/application/models/accounting/Vertragstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_vertragstyp'; - $this->pk = 'vertragstyp_kurzbz'; - } -} diff --git a/application/models/accounting/Zahlungstyp_model.php b/application/models/accounting/Zahlungstyp_model.php deleted file mode 100644 index 5ab7350ab..000000000 --- a/application/models/accounting/Zahlungstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_zahlungstyp'; - $this->pk = 'zahlungstyp_kurzbz'; - } -} diff --git a/application/models/codex/Akadgrad_model.php b/application/models/codex/Akadgrad_model.php deleted file mode 100644 index 0623ef3ab..000000000 --- a/application/models/codex/Akadgrad_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_akadgrad'; - $this->pk = 'akadgrad_id'; - } -} diff --git a/application/models/codex/Archiv_model.php b/application/models/codex/Archiv_model.php deleted file mode 100644 index 45cde5a00..000000000 --- a/application/models/codex/Archiv_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_archiv'; - $this->pk = 'archiv_id'; - } -} diff --git a/application/models/codex/Aufmerksamdurch_model.php b/application/models/codex/Aufmerksamdurch_model.php deleted file mode 100644 index 2c5f5d2c6..000000000 --- a/application/models/codex/Aufmerksamdurch_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_aufmerksamdurch'; - $this->pk = 'aufmerksamdurch_kurzbz'; - } -} diff --git a/application/models/codex/Ausbildung_model.php b/application/models/codex/Ausbildung_model.php deleted file mode 100644 index 8cadcb92d..000000000 --- a/application/models/codex/Ausbildung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_ausbildung'; - $this->pk = 'ausbildungcode'; - } -} diff --git a/application/models/codex/Berufstaetigkeit_model.php b/application/models/codex/Berufstaetigkeit_model.php deleted file mode 100644 index 59b39d775..000000000 --- a/application/models/codex/Berufstaetigkeit_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_berufstaetigkeit'; - $this->pk = 'berufstaetigkeit_code'; - } -} diff --git a/application/models/codex/Beschaeftigungsausmass_model.php b/application/models/codex/Beschaeftigungsausmass_model.php deleted file mode 100644 index 3b54fa310..000000000 --- a/application/models/codex/Beschaeftigungsausmass_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_beschaeftigungsausmass'; - $this->pk = 'beschausmasscode'; - } -} diff --git a/application/models/codex/Besqual_model.php b/application/models/codex/Besqual_model.php deleted file mode 100644 index b89cb123a..000000000 --- a/application/models/codex/Besqual_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_besqual'; - $this->pk = 'besqualcode'; - } -} diff --git a/application/models/codex/Bisfunktion_model.php b/application/models/codex/Bisfunktion_model.php deleted file mode 100644 index 72135ecc0..000000000 --- a/application/models/codex/Bisfunktion_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bisfunktion'; - $this->pk = array('studiengang_kz', 'bisverwendung_id'); - } -} diff --git a/application/models/codex/Bisio_model.php b/application/models/codex/Bisio_model.php deleted file mode 100644 index 5f35aec9a..000000000 --- a/application/models/codex/Bisio_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bisio'; - $this->pk = 'bisio_id'; - } -} diff --git a/application/models/codex/Bisorgform_model.php b/application/models/codex/Bisorgform_model.php deleted file mode 100644 index c489c849c..000000000 --- a/application/models/codex/Bisorgform_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bisorgform'; - $this->pk = 'bisorgform_kurzbz'; - } -} diff --git a/application/models/codex/Bisverwendung_model.php b/application/models/codex/Bisverwendung_model.php deleted file mode 100644 index fa2cf84d0..000000000 --- a/application/models/codex/Bisverwendung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bisverwendung'; - $this->pk = 'bisverwendung_id'; - } -} diff --git a/application/models/codex/Bundesland_model.php b/application/models/codex/Bundesland_model.php deleted file mode 100644 index 03a4774ce..000000000 --- a/application/models/codex/Bundesland_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bundesland'; - $this->pk = 'bundesland_code'; - } -} diff --git a/application/models/codex/Entwicklungsteam_model.php b/application/models/codex/Entwicklungsteam_model.php deleted file mode 100644 index 5cf21c23b..000000000 --- a/application/models/codex/Entwicklungsteam_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_entwicklungsteam'; - $this->pk = array('studiengang_kz', 'mitarbeiter_uid'); - } -} diff --git a/application/models/codex/Gemeinde_model.php b/application/models/codex/Gemeinde_model.php deleted file mode 100644 index c782346a0..000000000 --- a/application/models/codex/Gemeinde_model.php +++ /dev/null @@ -1,22 +0,0 @@ -dbTable = "bis.tbl_gemeinde"; - $this->pk = "gemeinde_id"; - } - - public function getGemeindeByPlz($plz) - { - $this->addSelect("DISTINCT ON (ortschaftsname) ortschaftsname, gemeinde_id, plz, name, ortschaftskennziffer, bulacode, bulabez, kennziffer"); - $this->addOrder("ortschaftsname"); - - return $this->loadWhere(array("plz" => $plz)); - } -} \ No newline at end of file diff --git a/application/models/codex/Hauptberuf_model.php b/application/models/codex/Hauptberuf_model.php deleted file mode 100644 index 7ae7ee44d..000000000 --- a/application/models/codex/Hauptberuf_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_hauptberuf'; - $this->pk = 'hauptberufcode'; - } -} diff --git a/application/models/codex/Lehrform_model.php b/application/models/codex/Lehrform_model.php deleted file mode 100644 index dc53b3085..000000000 --- a/application/models/codex/Lehrform_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_lehrform'; - $this->pk = 'lehrform_kurzbz'; - } -} diff --git a/application/models/codex/Lgartcode_model.php b/application/models/codex/Lgartcode_model.php deleted file mode 100644 index a2c09c00e..000000000 --- a/application/models/codex/Lgartcode_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_lgartcode'; - $this->pk = 'lgartcode'; - } -} diff --git a/application/models/codex/Mobilitaetsprogramm_model.php b/application/models/codex/Mobilitaetsprogramm_model.php deleted file mode 100644 index 5fd46e725..000000000 --- a/application/models/codex/Mobilitaetsprogramm_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_mobilitaetsprogramm'; - $this->pk = 'mobilitaetsprogramm_code'; - } -} diff --git a/application/models/codex/Nation_model.php b/application/models/codex/Nation_model.php deleted file mode 100644 index 239639795..000000000 --- a/application/models/codex/Nation_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_nation'; - $this->pk = 'nation_code'; - } -} \ No newline at end of file diff --git a/application/models/codex/Note_model.php b/application/models/codex/Note_model.php deleted file mode 100644 index e83ee2f48..000000000 --- a/application/models/codex/Note_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_note'; - $this->pk = 'note'; - } -} diff --git a/application/models/codex/Verwendung_model.php b/application/models/codex/Verwendung_model.php deleted file mode 100644 index 509b0388b..000000000 --- a/application/models/codex/Verwendung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_verwendung'; - $this->pk = 'verwendung_code'; - } -} diff --git a/application/models/codex/Zgv_model.php b/application/models/codex/Zgv_model.php deleted file mode 100644 index 1e1ba99ad..000000000 --- a/application/models/codex/Zgv_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_zgv'; - $this->pk = 'zgv_code'; - } -} diff --git a/application/models/codex/Zgvdoktor_model.php b/application/models/codex/Zgvdoktor_model.php deleted file mode 100644 index 8caf397e0..000000000 --- a/application/models/codex/Zgvdoktor_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_zgvdoktor'; - $this->pk = 'zgvdoktor_code'; - } -} diff --git a/application/models/codex/Zgvgruppe_model.php b/application/models/codex/Zgvgruppe_model.php deleted file mode 100644 index 69da70271..000000000 --- a/application/models/codex/Zgvgruppe_model.php +++ /dev/null @@ -1,13 +0,0 @@ -dbTable = 'bis.tbl_zgvgruppe'; - $this->pk = 'gruppe_kurzbz'; - } -} \ No newline at end of file diff --git a/application/models/codex/Zgvmaster_model.php b/application/models/codex/Zgvmaster_model.php deleted file mode 100644 index 38f8a0dcb..000000000 --- a/application/models/codex/Zgvmaster_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_zgvmaster'; - $this->pk = 'zgvmas_code'; - } -} diff --git a/application/models/codex/Zweck_model.php b/application/models/codex/Zweck_model.php deleted file mode 100644 index 600e9fb40..000000000 --- a/application/models/codex/Zweck_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_zweck'; - $this->pk = 'zweck_code'; - } -} diff --git a/application/models/content/Content_model.php b/application/models/content/Content_model.php deleted file mode 100644 index ee4315ebd..000000000 --- a/application/models/content/Content_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_content'; - $this->pk = 'content_id'; - } -} diff --git a/application/models/content/Contentchild_model.php b/application/models/content/Contentchild_model.php deleted file mode 100644 index 11738d144..000000000 --- a/application/models/content/Contentchild_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_contentchild'; - $this->pk = 'contentchild_id'; - } -} diff --git a/application/models/content/Contentgruppe_model.php b/application/models/content/Contentgruppe_model.php deleted file mode 100644 index 03efc87b1..000000000 --- a/application/models/content/Contentgruppe_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_contentgruppe'; - $this->pk = array('gruppe_kurzbz', 'content_id'); - } -} diff --git a/application/models/content/Contentlog_model.php b/application/models/content/Contentlog_model.php deleted file mode 100644 index 025cb94aa..000000000 --- a/application/models/content/Contentlog_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_contentlog'; - $this->pk = 'contentlog_id'; - } -} diff --git a/application/models/content/Contentsprache_model.php b/application/models/content/Contentsprache_model.php deleted file mode 100644 index eb7e257b2..000000000 --- a/application/models/content/Contentsprache_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_contentsprache'; - $this->pk = 'contentsprache_id'; - } -} diff --git a/application/models/content/Infoscreen_model.php b/application/models/content/Infoscreen_model.php deleted file mode 100644 index c4134ff06..000000000 --- a/application/models/content/Infoscreen_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_infoscreen'; - $this->pk = 'infoscreen_id'; - } -} diff --git a/application/models/content/News_model.php b/application/models/content/News_model.php deleted file mode 100644 index 8d636d808..000000000 --- a/application/models/content/News_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_news'; - $this->pk = 'news_id'; - } -} diff --git a/application/models/content/Template_model.php b/application/models/content/Template_model.php deleted file mode 100644 index 6f452e23c..000000000 --- a/application/models/content/Template_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_template'; - $this->pk = 'template_kurzbz'; - } -} diff --git a/application/models/content/Veranstaltung_model.php b/application/models/content/Veranstaltung_model.php deleted file mode 100644 index 48e7bc2cc..000000000 --- a/application/models/content/Veranstaltung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_veranstaltung'; - $this->pk = 'veranstaltung_id'; - } -} diff --git a/application/models/content/Veranstaltungskategorie_model.php b/application/models/content/Veranstaltungskategorie_model.php deleted file mode 100644 index 85d069735..000000000 --- a/application/models/content/Veranstaltungskategorie_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_veranstaltungskategorie'; - $this->pk = 'veranstaltungskategorie_kurzbz'; - } -} diff --git a/application/models/crm/Aufnahmeschluessel_model.php b/application/models/crm/Aufnahmeschluessel_model.php deleted file mode 100644 index df74791bb..000000000 --- a/application/models/crm/Aufnahmeschluessel_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_aufnahmeschluessel'; - $this->pk = 'aufnahmeschluessel'; - } -} diff --git a/application/models/crm/Bewerbungstermine_model.php b/application/models/crm/Bewerbungstermine_model.php deleted file mode 100644 index 74326a702..000000000 --- a/application/models/crm/Bewerbungstermine_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_bewerbungstermine'; - $this->pk = 'bewerbungstermin_id'; - } -} diff --git a/application/models/crm/Buchungstyp_model.php b/application/models/crm/Buchungstyp_model.php deleted file mode 100644 index f06e45eb2..000000000 --- a/application/models/crm/Buchungstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_buchungstyp'; - $this->pk = 'buchungstyp_kurzbz'; - } -} diff --git a/application/models/crm/Dokument_model.php b/application/models/crm/Dokument_model.php deleted file mode 100644 index 7ef2be716..000000000 --- a/application/models/crm/Dokument_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_dokument'; - $this->pk = 'dokument_kurzbz'; - } -} diff --git a/application/models/crm/Dokumentprestudent_model.php b/application/models/crm/Dokumentprestudent_model.php deleted file mode 100644 index ab4764479..000000000 --- a/application/models/crm/Dokumentprestudent_model.php +++ /dev/null @@ -1,71 +0,0 @@ -dbTable = 'public.tbl_dokumentprestudent'; - $this->pk = array('prestudent_id', 'dokument_kurzbz'); - } - - /** - * setAccepted - */ - public function setAccepted($prestudent_id, $studiengang_kz) - { - $result = null; - - if (is_numeric($prestudent_id) && is_numeric($studiengang_kz)) - { - $query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) ( - SELECT ds.dokument_kurzbz, - p.prestudent_id, - NOW() AS insertamum - FROM (SELECT DISTINCT person_id, dokument_kurzbz FROM public.tbl_akte) a - INNER JOIN public.tbl_prestudent p USING(person_id) - INNER JOIN public.tbl_dokumentstudiengang ds USING(dokument_kurzbz, studiengang_kz) - LEFT JOIN public.tbl_dokumentprestudent dp USING(dokument_kurzbz, prestudent_id) - WHERE ds.onlinebewerbung IS TRUE - AND (dp.dokument_kurzbz IS NULL AND dp.prestudent_id IS NULL) - AND p.prestudent_id = ? - AND ds.studiengang_kz = ? - )'; - - $result = $this->execQuery($query, array($prestudent_id, $studiengang_kz)); - } - - return $result; - } - - /** - * setAcceptedDocuments - */ - public function setAcceptedDocuments($prestudent_id, $dokument_kurzbz) - { - $result = null; - - if (is_numeric($prestudent_id) && is_array($dokument_kurzbz) && count($dokument_kurzbz) > 0) - { - $query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) ( - SELECT d.dokument_kurzbz, - ? AS prestudent_id, - NOW() AS insertamum - FROM public.tbl_dokument d - WHERE d.dokument_kurzbz IN ? - AND d.dokument_kurzbz NOT IN ( - SELECT dokument_kurzbz - FROM public.tbl_dokumentprestudent - WHERE prestudent_id = ? - ) - )'; - - $result = $this->execQuery($query, array($prestudent_id, $dokument_kurzbz, $prestudent_id)); - } - - return $result; - } -} diff --git a/application/models/crm/Konto_model.php b/application/models/crm/Konto_model.php deleted file mode 100644 index 286d3189e..000000000 --- a/application/models/crm/Konto_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_konto'; - $this->pk = 'buchungsnr'; - } -} diff --git a/application/models/crm/Preincoming_model.php b/application/models/crm/Preincoming_model.php deleted file mode 100644 index f9906781f..000000000 --- a/application/models/crm/Preincoming_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_preincoming'; - $this->pk = 'preincoming_id'; - } -} diff --git a/application/models/crm/Preinteressent_model.php b/application/models/crm/Preinteressent_model.php deleted file mode 100644 index bfc2a8afa..000000000 --- a/application/models/crm/Preinteressent_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_preinteressent'; - $this->pk = 'preinteressent_id'; - } -} diff --git a/application/models/crm/Preinteressentstudiengang_model.php b/application/models/crm/Preinteressentstudiengang_model.php deleted file mode 100644 index 4ed665840..000000000 --- a/application/models/crm/Preinteressentstudiengang_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_preinteressentstudiengang'; - $this->pk = array('preinteressent_id', 'studiengang_kz'); - } -} diff --git a/application/models/crm/Preoutgoing_model.php b/application/models/crm/Preoutgoing_model.php deleted file mode 100644 index e9e8e76fd..000000000 --- a/application/models/crm/Preoutgoing_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_preoutgoing'; - $this->pk = 'preoutgoing_id'; - } -} diff --git a/application/models/crm/Student_model.php b/application/models/crm/Student_model.php deleted file mode 100644 index 532658208..000000000 --- a/application/models/crm/Student_model.php +++ /dev/null @@ -1,48 +0,0 @@ -dbTable = 'public.tbl_student'; - $this->pk = array('student_uid'); - $this->hasSequence = false; - } - - // **** - // * Generiert die Matrikelnummer - // * FORMAT: 0710254001 - // * 07 = Jahr - // * 1/2/0 = WS/SS/incoming - // * 0254 = Studiengangskennzahl vierstellig - // * 001 = Laufende Nummer - // **** - public function generateMatrikelnummer($studiengang_kz, $studiensemester_kurzbz) - { - $jahr = mb_substr($studiensemester_kurzbz, 4); - $sem = mb_substr($studiensemester_kurzbz, 0, 2); - if ($sem == 'SS') - $jahr = $jahr - 1; - $art = 0; - - $matrikelnummer = sprintf("%02d", $jahr).$art.sprintf("%04d", $studiengang_kz); - - $qry = "SELECT matrikelnr FROM public.tbl_student WHERE matrikelnr LIKE ? ORDER BY matrikelnr DESC LIMIT 1"; - - $matrikelnrres = $this->execQuery($qry, array($matrikelnummer.'%')); - - if (hasData($matrikelnrres)) - { - $max = mb_substr($matrikelnrres->retval[0]->matrikelnr, 7); - } - else - $max = 0; - - $max += 1; - return $matrikelnummer.sprintf("%03d", $max); - } -} diff --git a/application/models/education/Uebung_model.php b/application/models/education/Uebung_model.php deleted file mode 100644 index 199328225..000000000 --- a/application/models/education/Uebung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_uebung'; - $this->pk = 'uebung_id'; - } -} diff --git a/application/models/organisation/Erhalter_model.php b/application/models/organisation/Erhalter_model.php deleted file mode 100644 index 607d9ccd9..000000000 --- a/application/models/organisation/Erhalter_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_erhalter'; - $this->pk = 'erhalter_kz'; - } -} diff --git a/application/models/organisation/Fachbereich_model.php b/application/models/organisation/Fachbereich_model.php deleted file mode 100644 index e69565364..000000000 --- a/application/models/organisation/Fachbereich_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_fachbereich'; - $this->pk = 'fachbereich_kurzbz'; - } -} diff --git a/application/models/organisation/Ferien_model.php b/application/models/organisation/Ferien_model.php deleted file mode 100644 index 2ade75aa4..000000000 --- a/application/models/organisation/Ferien_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_ferien'; - $this->pk = array('studiengang_kz', 'bezeichnung'); - } -} diff --git a/application/models/organisation/Lehrverband_model.php b/application/models/organisation/Lehrverband_model.php deleted file mode 100644 index 953e4b7b2..000000000 --- a/application/models/organisation/Lehrverband_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_lehrverband'; - $this->pk = array('gruppe', 'verband', 'semester', 'studiengang_kz'); - } -} diff --git a/application/models/organisation/Organisationseinheittyp_model.php b/application/models/organisation/Organisationseinheittyp_model.php deleted file mode 100644 index 6355758b6..000000000 --- a/application/models/organisation/Organisationseinheittyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_organisationseinheittyp'; - $this->pk = 'organisationseinheittyp_kurzbz'; - } -} diff --git a/application/models/organisation/Semesterwochen_model.php b/application/models/organisation/Semesterwochen_model.php deleted file mode 100644 index 32666804d..000000000 --- a/application/models/organisation/Semesterwochen_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_semesterwochen'; - $this->pk = array('studiengang_kz', 'semester'); - } -} diff --git a/application/models/organisation/Service_model.php b/application/models/organisation/Service_model.php deleted file mode 100644 index 5f692e707..000000000 --- a/application/models/organisation/Service_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_service'; - $this->pk = 'service_id'; - } -} diff --git a/application/models/organisation/Standort_model.php b/application/models/organisation/Standort_model.php deleted file mode 100644 index 382236e2f..000000000 --- a/application/models/organisation/Standort_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_standort'; - $this->pk = 'standort_id'; - } -} diff --git a/application/models/organisation/Statistik_model.php b/application/models/organisation/Statistik_model.php deleted file mode 100644 index b72ac0577..000000000 --- a/application/models/organisation/Statistik_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_statistik'; - $this->pk = 'statistik_kurzbz'; - } -} diff --git a/application/models/organisation/Studiengangstyp_model.php b/application/models/organisation/Studiengangstyp_model.php deleted file mode 100644 index 9a6b5df22..000000000 --- a/application/models/organisation/Studiengangstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_studiengangstyp'; - $this->pk = 'typ'; - } -} diff --git a/application/models/organisation/Studienordnung_model.php b/application/models/organisation/Studienordnung_model.php deleted file mode 100644 index fc2e28d4b..000000000 --- a/application/models/organisation/Studienordnung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_studienordnung'; - $this->pk = 'studienordnung_id'; - } -} diff --git a/application/models/organisation/Studienordnungstatus_model.php b/application/models/organisation/Studienordnungstatus_model.php deleted file mode 100644 index 8b6417ab1..000000000 --- a/application/models/organisation/Studienordnungstatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_studienordnungstatus'; - $this->pk = 'status_kurzbz'; - } -} diff --git a/application/models/organisation/Studienplatz_model.php b/application/models/organisation/Studienplatz_model.php deleted file mode 100644 index 7bfd8b13b..000000000 --- a/application/models/organisation/Studienplatz_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_studienplatz'; - $this->pk = 'studienplatz_id'; - } -} diff --git a/application/models/person/Bankverbindung_model.php b/application/models/person/Bankverbindung_model.php deleted file mode 100644 index 193aad257..000000000 --- a/application/models/person/Bankverbindung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_bankverbindung'; - $this->pk = 'bankverbindung_id'; - } -} diff --git a/application/models/person/Benutzergruppe_model.php b/application/models/person/Benutzergruppe_model.php deleted file mode 100644 index e569094c4..000000000 --- a/application/models/person/Benutzergruppe_model.php +++ /dev/null @@ -1,15 +0,0 @@ -dbTable = 'public.tbl_benutzergruppe'; - $this->pk = array('gruppe_kurzbz', 'uid'); - $this->hasSequence = false; - } -} diff --git a/application/models/person/Fotostatus_model.php b/application/models/person/Fotostatus_model.php deleted file mode 100644 index eb2b43e51..000000000 --- a/application/models/person/Fotostatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_fotostatus'; - $this->pk = 'fotostatus_kurzbz'; - } -} diff --git a/application/models/person/Freebusy_model.php b/application/models/person/Freebusy_model.php deleted file mode 100644 index 01969dfc1..000000000 --- a/application/models/person/Freebusy_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_freebusy'; - $this->pk = 'freebusy_id'; - } -} diff --git a/application/models/person/Freebusytyp_model.php b/application/models/person/Freebusytyp_model.php deleted file mode 100644 index d5207850c..000000000 --- a/application/models/person/Freebusytyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_freebusytyp'; - $this->pk = 'freebusytyp_kurzbz'; - } -} diff --git a/application/models/person/Kontaktmedium_model.php b/application/models/person/Kontaktmedium_model.php deleted file mode 100644 index cc330ddd7..000000000 --- a/application/models/person/Kontaktmedium_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_kontaktmedium'; - $this->pk = 'kontaktmedium_kurzbz'; - } -} diff --git a/application/models/person/Kontakttyp_model.php b/application/models/person/Kontakttyp_model.php deleted file mode 100644 index d32cded13..000000000 --- a/application/models/person/Kontakttyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_kontakttyp'; - $this->pk = 'kontakttyp'; - } -} diff --git a/application/models/person/Notizzuordnung_model.php b/application/models/person/Notizzuordnung_model.php deleted file mode 100644 index 187a8399b..000000000 --- a/application/models/person/Notizzuordnung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_notizzuordnung'; - $this->pk = 'notizzuordnung_id'; - } -} diff --git a/application/models/project/Aktivitaet_model.php b/application/models/project/Aktivitaet_model.php deleted file mode 100644 index 529040aa3..000000000 --- a/application/models/project/Aktivitaet_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_aktivitaet'; - $this->pk = 'aktivitaet_kurzbz'; - } -} diff --git a/application/models/project/Aufwandstyp_model.php b/application/models/project/Aufwandstyp_model.php deleted file mode 100644 index 2f20600ce..000000000 --- a/application/models/project/Aufwandstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_aufwandstyp'; - $this->pk = 'aufwandstyp_kurzbz'; - } -} diff --git a/application/models/project/Projekt_ressource_model.php b/application/models/project/Projekt_ressource_model.php deleted file mode 100644 index d641556fd..000000000 --- a/application/models/project/Projekt_ressource_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_projekt_ressource'; - $this->pk = 'projekt_ressource_id'; - } -} diff --git a/application/models/project/Projektphase_model.php b/application/models/project/Projektphase_model.php deleted file mode 100644 index 4980ed64b..000000000 --- a/application/models/project/Projektphase_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_projektphase'; - $this->pk = 'projektphase_id'; - } -} diff --git a/application/models/project/Projekttask_model.php b/application/models/project/Projekttask_model.php deleted file mode 100644 index 64ea94089..000000000 --- a/application/models/project/Projekttask_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_projekttask'; - $this->pk = 'projekttask_id'; - } -} diff --git a/application/models/project/Ressource_model.php b/application/models/project/Ressource_model.php deleted file mode 100644 index 35eb4eb97..000000000 --- a/application/models/project/Ressource_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_ressource'; - $this->pk = 'ressource_id'; - } -} diff --git a/application/models/project/Scrumsprint_model.php b/application/models/project/Scrumsprint_model.php deleted file mode 100644 index c2c8a60a1..000000000 --- a/application/models/project/Scrumsprint_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_scrumsprint'; - $this->pk = 'scrumsprint_id'; - } -} diff --git a/application/models/ressource/Betriebsmittel_model.php b/application/models/ressource/Betriebsmittel_model.php deleted file mode 100644 index 849a9199f..000000000 --- a/application/models/ressource/Betriebsmittel_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_betriebsmittel'; - $this->pk = 'betriebsmittel_id'; - } -} diff --git a/application/models/ressource/Betriebsmittelperson_model.php b/application/models/ressource/Betriebsmittelperson_model.php deleted file mode 100644 index 924f670e0..000000000 --- a/application/models/ressource/Betriebsmittelperson_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_betriebsmittelperson'; - $this->pk = 'betriebsmittelperson_id'; - } -} diff --git a/application/models/ressource/Betriebsmittelstatus_model.php b/application/models/ressource/Betriebsmittelstatus_model.php deleted file mode 100644 index 7b4f70c59..000000000 --- a/application/models/ressource/Betriebsmittelstatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_betriebsmittelstatus'; - $this->pk = 'betriebsmittelstatus_kurzbz'; - } -} diff --git a/application/models/ressource/Betriebsmitteltyp_model.php b/application/models/ressource/Betriebsmitteltyp_model.php deleted file mode 100644 index 23bec97a8..000000000 --- a/application/models/ressource/Betriebsmitteltyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_betriebsmitteltyp'; - $this->pk = 'betriebsmitteltyp'; - } -} diff --git a/application/models/ressource/Coodle_model.php b/application/models/ressource/Coodle_model.php deleted file mode 100644 index 1382bf7a0..000000000 --- a/application/models/ressource/Coodle_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_coodle'; - $this->pk = 'coodle_id'; - } -} diff --git a/application/models/ressource/Erreichbarkeit_model.php b/application/models/ressource/Erreichbarkeit_model.php deleted file mode 100644 index b16b1614f..000000000 --- a/application/models/ressource/Erreichbarkeit_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_erreichbarkeit'; - $this->pk = 'erreichbarkeit_kurzbz'; - } -} diff --git a/application/models/ressource/Firma_model.php b/application/models/ressource/Firma_model.php deleted file mode 100644 index 1b8dfb51d..000000000 --- a/application/models/ressource/Firma_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_firma'; - $this->pk = 'firma_id'; - } -} diff --git a/application/models/ressource/Firmatag_model.php b/application/models/ressource/Firmatag_model.php deleted file mode 100644 index 582ea0679..000000000 --- a/application/models/ressource/Firmatag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_firmatag'; - $this->pk = array('tag', 'firma_id'); - } -} diff --git a/application/models/ressource/Firmentyp_model.php b/application/models/ressource/Firmentyp_model.php deleted file mode 100644 index a9aa93705..000000000 --- a/application/models/ressource/Firmentyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_firmentyp'; - $this->pk = 'firmentyp_kurzbz'; - } -} diff --git a/application/models/ressource/Funktion_model.php b/application/models/ressource/Funktion_model.php deleted file mode 100644 index 43908167c..000000000 --- a/application/models/ressource/Funktion_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_funktion'; - $this->pk = 'funktion_kurzbz'; - } -} diff --git a/application/models/ressource/Lehrmittel_model.php b/application/models/ressource/Lehrmittel_model.php deleted file mode 100644 index b21e91764..000000000 --- a/application/models/ressource/Lehrmittel_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_lehrmittel'; - $this->pk = 'lehrmittel_kurzbz'; - } -} diff --git a/application/models/ressource/Mitarbeiter_model.php b/application/models/ressource/Mitarbeiter_model.php deleted file mode 100644 index 1e03a0ecd..000000000 --- a/application/models/ressource/Mitarbeiter_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_mitarbeiter'; - $this->pk = 'mitarbeiter_uid'; - } -} diff --git a/application/models/ressource/Ort_model.php b/application/models/ressource/Ort_model.php deleted file mode 100644 index 59b213a54..000000000 --- a/application/models/ressource/Ort_model.php +++ /dev/null @@ -1,23 +0,0 @@ -dbTable = "public.tbl_ort"; - $this->pk = "ort_kurzbz"; - } - - public function getAll($raumtyp_kurzbz) - { - $this->addOrder("ort_kurzbz"); - - $this->addJoin("public.tbl_ortraumtyp", "ort_kurzbz"); - - return $this->OrtModel->loadWhere(array("raumtyp_kurzbz" => $raumtyp_kurzbz)); - } -} \ No newline at end of file diff --git a/application/models/ressource/Ortraumtyp_model.php b/application/models/ressource/Ortraumtyp_model.php deleted file mode 100644 index af0d3cb09..000000000 --- a/application/models/ressource/Ortraumtyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_ortraumtyp'; - $this->pk = array('hierarchie', 'ort_kurzbz'); - } -} diff --git a/application/models/ressource/Personfunktionstandort_model.php b/application/models/ressource/Personfunktionstandort_model.php deleted file mode 100644 index addbb760a..000000000 --- a/application/models/ressource/Personfunktionstandort_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_personfunktionstandort'; - $this->pk = 'personfunktionstandort_id'; - } -} diff --git a/application/models/ressource/Raumtyp_model.php b/application/models/ressource/Raumtyp_model.php deleted file mode 100644 index afc8a7cc3..000000000 --- a/application/models/ressource/Raumtyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_raumtyp'; - $this->pk = 'raumtyp_kurzbz'; - } -} diff --git a/application/models/ressource/Reservierung_model.php b/application/models/ressource/Reservierung_model.php deleted file mode 100644 index 37d0cb376..000000000 --- a/application/models/ressource/Reservierung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_reservierung'; - $this->pk = 'reservierung_id'; - } -} diff --git a/application/models/ressource/Stunde_model.php b/application/models/ressource/Stunde_model.php deleted file mode 100644 index 05a9cddff..000000000 --- a/application/models/ressource/Stunde_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_stunde'; - $this->pk = 'stunde'; - } -} diff --git a/application/models/ressource/Stundenplan_model.php b/application/models/ressource/Stundenplan_model.php deleted file mode 100644 index be3d520b5..000000000 --- a/application/models/ressource/Stundenplan_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_stundenplan'; - $this->pk = 'stundenplan_id'; - } -} diff --git a/application/models/ressource/Zeitaufzeichnung_model.php b/application/models/ressource/Zeitaufzeichnung_model.php deleted file mode 100644 index f887a20a0..000000000 --- a/application/models/ressource/Zeitaufzeichnung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_zeitaufzeichnung'; - $this->pk = 'zeitaufzeichnung_id'; - } -} diff --git a/application/models/ressource/Zeitsperre_model.php b/application/models/ressource/Zeitsperre_model.php deleted file mode 100644 index 07889e349..000000000 --- a/application/models/ressource/Zeitsperre_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_zeitsperre'; - $this->pk = 'zeitsperre_id'; - } -} diff --git a/application/models/ressource/Zeitsperretyp_model.php b/application/models/ressource/Zeitsperretyp_model.php deleted file mode 100644 index ef54571e8..000000000 --- a/application/models/ressource/Zeitsperretyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_zeitsperretyp'; - $this->pk = 'zeitsperretyp_kurzbz'; - } -} diff --git a/application/models/ressource/Zeitwunsch_model.php b/application/models/ressource/Zeitwunsch_model.php deleted file mode 100644 index ea2ec698a..000000000 --- a/application/models/ressource/Zeitwunsch_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_zeitwunsch'; - $this->pk = array('tag', 'mitarbeiter_uid', 'stunde'); - } -} diff --git a/application/models/system/App_model.php b/application/models/system/App_model.php deleted file mode 100644 index e0fd19c75..000000000 --- a/application/models/system/App_model.php +++ /dev/null @@ -1,15 +0,0 @@ -dbTable = 'system.tbl_app'; - $this->pk = 'app'; - } - -} diff --git a/application/models/system/Berechtigung_model.php b/application/models/system/Berechtigung_model.php deleted file mode 100644 index 9bd572614..000000000 --- a/application/models/system/Berechtigung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_berechtigung'; - $this->pk = 'berechtigung_kurzbz'; - } -} diff --git a/application/models/system/Cronjob_model.php b/application/models/system/Cronjob_model.php deleted file mode 100644 index e47ea5bef..000000000 --- a/application/models/system/Cronjob_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_cronjob'; - $this->pk = 'cronjob_id'; - } -} diff --git a/application/models/system/Filter_model.php b/application/models/system/Filter_model.php deleted file mode 100644 index 5d44e0052..000000000 --- a/application/models/system/Filter_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_filter'; - $this->pk = 'filter_id'; - } -} diff --git a/application/models/system/Log_model.php b/application/models/system/Log_model.php deleted file mode 100644 index 8b27f6c53..000000000 --- a/application/models/system/Log_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_log'; - $this->pk = 'log_id'; - } -} diff --git a/application/models/system/PersonLock_model.php b/application/models/system/PersonLock_model.php deleted file mode 100644 index 1d106b789..000000000 --- a/application/models/system/PersonLock_model.php +++ /dev/null @@ -1,88 +0,0 @@ -dbTable = 'system.tbl_person_lock'; - $this->pk = 'lock_id'; - } - - /** - * Checks if a specific person is locked. By default, looks for entries with no app in locktable for the person. - * Alternatively, looks only for locks in a certain app. - * @param $person_id - * @param null $app - * @return array all locks for a person if locked, null otherwise - */ - public function checkIfLocked($person_id, $app = null) - { - $lockdata = array('person_id' => $person_id, 'app' => $app); - - $result = $this->loadWhere($lockdata); - - if ($result->error) - return error($result->retval); - - if (count($result->retval) > 0) - return success($result->retval); - else - return success(null); - } - - /** - * Locks a person. Returns null if person was not locked (e.g. when already locked). - * @param $person_id - * @param $uid user who locks the person - * @param $app optional, application in which person is locked - * @return array inserted lock id if person was locked, null otherwise - */ - public function lockPerson($person_id, $uid, $app = null) - { - $locked = $this->checkIfLocked($person_id, $app); - - if ($locked->error) - return error($locked->retval); - - //insert only if not already locked - if ($locked->retval === null) - return $this->insert(array('person_id' => $person_id, 'uid' => $uid, 'app' => $app)); - else - return success(null); - } - - /** - * Remove a lock for a person. By default, removes any entries in locktable for the person. - * Alternatively, removes only locks in a certain app. - * @param $person_id - * @param null $app - * @return array deleted lock ids if person was locked, null otherwise - */ - public function unlockPerson($person_id, $app = null) - { - $deleted = array(); - $locks = $this->checkIfLocked($person_id, $app); - - if ($locks->retval === null) - return success(null); - - foreach ($locks->retval as $lock) - { - $result = $this->delete($lock->lock_id); - if ($result->error) - return error($result->retval); - - $deleted[] = $lock; - } - - return success($deleted); - } -} diff --git a/application/models/system/Rolle_model.php b/application/models/system/Rolle_model.php deleted file mode 100644 index 5ba085853..000000000 --- a/application/models/system/Rolle_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_rolle'; - $this->pk = 'rolle_kurzbz'; - } -} diff --git a/application/models/system/Rolleberechtigung_model.php b/application/models/system/Rolleberechtigung_model.php deleted file mode 100644 index 0b08da1ca..000000000 --- a/application/models/system/Rolleberechtigung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_rolleberechtigung'; - $this->pk = array('rolle_kurzbz', 'berechtigung_kurzbz'); - } -} diff --git a/application/models/system/Server_model.php b/application/models/system/Server_model.php deleted file mode 100644 index 4521e1fd4..000000000 --- a/application/models/system/Server_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_server'; - $this->pk = 'server_kurzbz'; - } -} \ No newline at end of file diff --git a/application/models/system/Tag_model.php b/application/models/system/Tag_model.php deleted file mode 100644 index 94434da45..000000000 --- a/application/models/system/Tag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_tag'; - $this->pk = 'tag'; - } -} diff --git a/application/models/system/Variable_model.php b/application/models/system/Variable_model.php deleted file mode 100644 index 9800999fe..000000000 --- a/application/models/system/Variable_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_variable'; - $this->pk = array('uid', 'name'); - } -} diff --git a/application/models/system/Webservicelog_model.php b/application/models/system/Webservicelog_model.php deleted file mode 100644 index dc45b13a7..000000000 --- a/application/models/system/Webservicelog_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_webservicelog'; - $this->pk = 'webservicelog_id'; - } -} diff --git a/application/models/system/Webservicerecht_model.php b/application/models/system/Webservicerecht_model.php deleted file mode 100644 index a5bd036f0..000000000 --- a/application/models/system/Webservicerecht_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_webservicerecht'; - $this->pk = 'webservicerecht_id'; - } -} diff --git a/application/models/system/Webservicetyp_model.php b/application/models/system/Webservicetyp_model.php deleted file mode 100644 index 5d989de2a..000000000 --- a/application/models/system/Webservicetyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_webservicetyp'; - $this->pk = 'webservicetyp_kurzbz'; - } -} diff --git a/application/models/testtool/Ablauf_model.php b/application/models/testtool/Ablauf_model.php deleted file mode 100644 index 748926658..000000000 --- a/application/models/testtool/Ablauf_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_ablauf'; - $this->pk = 'ablauf_id'; - } -} diff --git a/application/models/testtool/Antwort_model.php b/application/models/testtool/Antwort_model.php deleted file mode 100644 index 1594be6c3..000000000 --- a/application/models/testtool/Antwort_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_antwort'; - $this->pk = 'antwort_id'; - } -} diff --git a/application/models/testtool/Frage_model.php b/application/models/testtool/Frage_model.php deleted file mode 100644 index de64c303b..000000000 --- a/application/models/testtool/Frage_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_frage'; - $this->pk = 'frage_id'; - } -} diff --git a/application/models/testtool/Gebiet_model.php b/application/models/testtool/Gebiet_model.php deleted file mode 100644 index 202d6a4aa..000000000 --- a/application/models/testtool/Gebiet_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_gebiet'; - $this->pk = 'gebiet_id'; - } -} diff --git a/application/models/testtool/Kategorie_model.php b/application/models/testtool/Kategorie_model.php deleted file mode 100644 index 10e450651..000000000 --- a/application/models/testtool/Kategorie_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_kategorie'; - $this->pk = 'kategorie_kurzbz'; - } -} diff --git a/application/models/testtool/Kriterien_model.php b/application/models/testtool/Kriterien_model.php deleted file mode 100644 index 83d0fb97c..000000000 --- a/application/models/testtool/Kriterien_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_kriterien'; - $this->pk = 'kategorie_kurzbz'; - } -} diff --git a/application/models/testtool/Pruefling_model.php b/application/models/testtool/Pruefling_model.php deleted file mode 100644 index da131ba4a..000000000 --- a/application/models/testtool/Pruefling_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_pruefling'; - $this->pk = 'pruefling_id'; - } -} diff --git a/application/models/testtool/Vorschlag_model.php b/application/models/testtool/Vorschlag_model.php deleted file mode 100644 index 853852da2..000000000 --- a/application/models/testtool/Vorschlag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_vorschlag'; - $this->pk = 'vorschlag_id'; - } -} From f0fe4bc2393a13be6fa98e840e2c7a6e3fba73b8 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 26 Apr 2019 11:27:39 +0200 Subject: [PATCH 11/84] Removed not used config files --- application/config/grocery_crud.php | 35 ---------------- application/config/migration.php | 34 +++++++-------- application/config/pagination.php | 37 ----------------- application/config/roles.php | 62 ---------------------------- application/config/smileys.php | 64 ----------------------------- application/config/template.php | 15 ------- 6 files changed, 17 insertions(+), 230 deletions(-) delete mode 100644 application/config/grocery_crud.php delete mode 100644 application/config/pagination.php delete mode 100644 application/config/roles.php delete mode 100644 application/config/smileys.php delete mode 100644 application/config/template.php diff --git a/application/config/grocery_crud.php b/application/config/grocery_crud.php deleted file mode 100644 index 57caddd15..000000000 --- a/application/config/grocery_crud.php +++ /dev/null @@ -1,35 +0,0 @@ -migration->current() this is the version that schema will -| be upgraded / downgraded to. -| -*/ -$config['migration_version'] = '014'; +$config['migration_enabled'] = FALSE; /* |-------------------------------------------------------------------------- @@ -41,7 +30,7 @@ $config['migration_version'] = '014'; | defaults to 'sequential' for backward compatibility with CI2. | */ -$config['migration_type'] = 'sequential'; +$config['migration_type'] = 'timestamp'; /* |-------------------------------------------------------------------------- @@ -55,8 +44,7 @@ $config['migration_type'] = 'sequential'; | will migrate up. This must be set. | */ -//$config['migration_table'] = 'system.ci_migrations'; // A missing feature or a bug cannot use another schema than public. Bug: tableExists only looks in the public schema. -$config['migration_table'] = 'ci_migrations'; +$config['migration_table'] = 'migrations'; /* |-------------------------------------------------------------------------- @@ -72,6 +60,18 @@ $config['migration_table'] = 'ci_migrations'; */ $config['migration_auto_latest'] = FALSE; +/* +|-------------------------------------------------------------------------- +| Migrations version +|-------------------------------------------------------------------------- +| +| This is used to set migration version that the file system should be on. +| If you run $this->migration->current() this is the version that schema will +| be upgraded / downgraded to. +| +*/ +$config['migration_version'] = 0; + /* |-------------------------------------------------------------------------- | Migrations Path diff --git a/application/config/pagination.php b/application/config/pagination.php deleted file mode 100644 index 229036a0f..000000000 --- a/application/config/pagination.php +++ /dev/null @@ -1,37 +0,0 @@ -

    '; -$config['full_tag_close'] = '
'; - -$config['first_link'] = 'First'; -$config['first_tag_open'] = '
  • '; -$config['first_tag_close'] = '
  • '; - -$config['last_link'] = 'Last'; -$config['last_tag_open'] = '
  • '; -$config['last_tag_close'] = '
  • '; - -$config['next_link'] = 'Next'; -$config['next_tag_open'] = '
  • '; -$config['next_tag_close'] = '
  • '; - -$config['prev_link'] = 'Prev'; -$config['prev_tag_open'] = '
  • '; -$config['prev_tag_close'] = '
  • '; - -$config['cur_tag_open'] = '
  • '; -$config['cur_tag_close'] = '
  • '; - -$config['num_tag_open'] = '
  • '; -$config['num_tag_close'] = '
  • '; - - -/* End of file pagination.php */ -/* Location: ./application/config/pagination.php */ diff --git a/application/config/roles.php b/application/config/roles.php deleted file mode 100644 index 75a928db0..000000000 --- a/application/config/roles.php +++ /dev/null @@ -1,62 +0,0 @@ - 'admin', - 'berechtigung' => array - ( - 'admin', 'assistenz', 'basis/addon', 'basis/ampel', 'basis/ampeluebersicht', - 'basis/benutzer', 'basis/berechtigung', 'basis/betriebsmittel', 'basis/cms', - 'basis/cms_review', 'basis/cms_sperrfreigabe', 'basis/cronjob', 'basis/dms', - 'basis/fas', 'basis/ferien', 'basis/fhausweis','basis/firma', - 'basis/infoscreen', 'basis/moodle', 'basis/moodle','basis/news', 'basis/notiz', - 'basis/organisationseinheit', 'basis/ort', 'basis/person', 'basis/planner', - 'basis/service', 'basis/statistik', 'basis/studiengang', 'basis/studiensemester', 'basis/tempus', - 'basis/testtool', 'basis/variable', 'basis/vilesci', 'buchung/typen', - 'buchung/mitarbeiter', 'inout/incoming', 'inout/outgoing', 'inout/uebersicht', - 'lehre', 'lehre/abgabetool', 'lehre/freifach', 'lehre/lehrfach', - 'lehre/lehrveranstaltung', 'lehre/lvplan', 'lehre/lvinfo', - 'lehre/pruefungsanmeldungAdmin', 'lehre/pruefungsbeurteilung', - 'lehre/pruefungsbeurteilungAdmin', 'lehre/pruefungsterminAdmin', - 'lehre/pruefungsfenster', 'lehre/reihungstest', 'lehre/reservierung', - 'lehre/studienordnung', 'lehre/studienordnungInaktiv', 'lehre/studienplan', - 'lehre/vorrueckung', 'lv-plan', 'lv-plan/gruppenentfernen', - 'lv-plan/lektorentfernen', 'mitarbeiter', 'mitarbeiter/bankdaten', - 'mitarbeiter/personalnummer', 'mitarbeiter/stammdaten', 'mitarbeiter/urlaube', - 'mitarbeiter/zeitsperre', 'news', 'planner', 'preinteressent', 'raumres', - 'reihungstest', 'sdTools', 'soap/lv', 'soap/lvplan', 'soap/mitarbeiter', - 'soap/ort', 'soap/pruefungsfenster', 'soap/student', 'soap/studienordnung', - 'soap/benutzer', 'soap/buchungen', 'student/bankdaten', 'student/anrechnung', - 'student/anwesenheit', 'student/dokumente', 'student/noten', 'system/phrase', - 'system/vorlage', 'system/vorlagestudiengang', 'student/stammdaten', - 'student/vorrueckung', 'system/developer', 'system/loginasuser', - 'user', 'veranstaltung', 'vertrag/mitarbeiter', 'vertrag/typen', - 'wawi/berichte', 'wawi/bestellung', 'wawi/bestellung_advanced', 'wawi/budget', - 'wawi/delete_advanced', 'wawi/firma', 'wawi/freigabe', - 'wawi/freigabe_advanced', 'wawi/inventar', 'wawi/konto', 'wawi/kostenstelle', - 'wawi/rechnung', 'wawi/rechnung_freigeben', 'wawi/rechnung_transfer', - 'wawi/storno' - ) - ), - array - ( - 'rolle_kurzbz' => 'infocenter', - 'berechtigung' => array - ( - 'basis/adresse','basis/akte','basis/kontakt','basis/log','basis/nation','basis/notiz','basis/notizzuordnung', - 'basis/person','basis/prestudent','basis/prestudentstatus','basis/status','basis/zgv','basis/zgvmaster', - 'lehre/studienplan','system/filters','fs/dms','basis/message','basis/benutzerrolle', 'basis/sprache', - 'system/personlock','basis/benutzerfunktion','system/vorlagestudiengang', 'basis/bewerbungstermine' - ) - ) -); diff --git a/application/config/smileys.php b/application/config/smileys.php deleted file mode 100644 index 272be2fcd..000000000 --- a/application/config/smileys.php +++ /dev/null @@ -1,64 +0,0 @@ - array('grin.gif', '19', '19', 'grin'), - ':lol:' => array('lol.gif', '19', '19', 'LOL'), - ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), - ':)' => array('smile.gif', '19', '19', 'smile'), - ';-)' => array('wink.gif', '19', '19', 'wink'), - ';)' => array('wink.gif', '19', '19', 'wink'), - ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), - ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), - ':-S' => array('confused.gif', '19', '19', 'confused'), - ':wow:' => array('surprise.gif', '19', '19', 'surprised'), - ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), - ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), - '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), - ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), - ':P' => array('raspberry.gif', '19', '19', 'raspberry'), - ':blank:' => array('blank.gif', '19', '19', 'blank stare'), - ':long:' => array('longface.gif', '19', '19', 'long face'), - ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), - ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), - ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), - '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), - ':down:' => array('downer.gif', '19', '19', 'downer'), - ':red:' => array('embarrassed.gif', '19', '19', 'red face'), - ':sick:' => array('sick.gif', '19', '19', 'sick'), - ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), - ':-/' => array('hmm.gif', '19', '19', 'hmmm'), - '>:(' => array('mad.gif', '19', '19', 'mad'), - ':mad:' => array('mad.gif', '19', '19', 'mad'), - '>:-(' => array('angry.gif', '19', '19', 'angry'), - ':angry:' => array('angry.gif', '19', '19', 'angry'), - ':zip:' => array('zip.gif', '19', '19', 'zipper'), - ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), - ':ahhh:' => array('shock.gif', '19', '19', 'shock'), - ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), - ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), - ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), - ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), - ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), - ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), - ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), - ':snake:' => array('snake.gif', '19', '19', 'snake'), - ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), - ':question:' => array('question.gif', '19', '19', 'question') - -); diff --git a/application/config/template.php b/application/config/template.php deleted file mode 100644 index d47a13d4f..000000000 --- a/application/config/template.php +++ /dev/null @@ -1,15 +0,0 @@ - Date: Fri, 26 Apr 2019 11:38:28 +0200 Subject: [PATCH 12/84] Removed not used libraries and views --- application/libraries/Format.php | 531 --------------------- application/views/rdf/basic.php | 54 --- application/views/rdf/basic_sparql.php | 74 --- application/views/rdf/converter.php | 112 ----- application/views/rdf/foafinfo.php | 124 ----- application/views/rdf/foafmaker.php | 121 ----- application/views/rdf/form.php | 121 ----- application/views/rdf/html_tag_helpers.php | 218 --------- 8 files changed, 1355 deletions(-) delete mode 100644 application/libraries/Format.php delete mode 100644 application/views/rdf/basic.php delete mode 100644 application/views/rdf/basic_sparql.php delete mode 100644 application/views/rdf/converter.php delete mode 100644 application/views/rdf/foafinfo.php delete mode 100644 application/views/rdf/foafmaker.php delete mode 100644 application/views/rdf/form.php delete mode 100644 application/views/rdf/html_tag_helpers.php diff --git a/application/libraries/Format.php b/application/libraries/Format.php deleted file mode 100644 index 0f7ea4a87..000000000 --- a/application/libraries/Format.php +++ /dev/null @@ -1,531 +0,0 @@ -_CI = &get_instance(); - - // Load the inflector helper - $this->_CI->load->helper('inflector'); - - // If the provided data is already formatted we should probably convert it to an array - if ($from_type !== NULL) - { - if (method_exists($this, '_from_' . $from_type)) - { - $data = call_user_func([$this, '_from_' . $from_type], $data); - } - else - { - throw new Exception('Format class does not support conversion from "' . $from_type . '".'); - } - } - - // Set the member variable to the data passed - $this->_data = $data; - } - - /** - * Create an instance of the format class - * e.g: echo $this->format->factory(['foo' => 'bar'])->to_csv(); - * - * @param mixed $data Data to convert/parse - * @param string $from_type Type to convert from e.g. json, csv, html - * - * @return object Instance of the format class - */ - public function factory($data, $from_type = NULL) - { - // $class = __CLASS__; - // return new $class(); - - return new static($data, $from_type); - } - - // FORMATTING OUTPUT --------------------------------------------------------- - - /** - * Format data as an array - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return array Data parsed as an array; otherwise, an empty array - */ - public function to_array($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // Cast as an array if not already - if (is_array($data) === FALSE) - { - $data = (array) $data; - } - - $array = []; - foreach ((array) $data as $key => $value) - { - if (is_object($value) === TRUE || is_array($value) === TRUE) - { - $array[$key] = $this->to_array($value); - } - else - { - $array[$key] = $value; - } - } - - return $array; - } - - /** - * Format data as XML - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @param NULL $structure - * @param string $basenode - * @return mixed - */ - public function to_xml($data = NULL, $structure = NULL, $basenode = 'xml') - { - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // turn off compatibility mode as simple xml throws a wobbly if you don't. - if (ini_get('zend.ze1_compatibility_mode') == 1) - { - ini_set('zend.ze1_compatibility_mode', 0); - } - - if ($structure === NULL) - { - $structure = simplexml_load_string("<$basenode />"); - } - - // Force it to be something useful - if (is_array($data) === FALSE && is_object($data) === FALSE) - { - $data = (array) $data; - } - - foreach ($data as $key => $value) - { - - //change false/true to 0/1 - if (is_bool($value)) - { - $value = (int) $value; - } - - // no numeric keys in our xml please! - if (is_numeric($key)) - { - // make string key... - $key = (singular($basenode) != $basenode) ? singular($basenode) : 'item'; - } - - // replace anything not alpha numeric - $key = preg_replace('/[^a-z_\-0-9]/i', '', $key); - - if ($key === '_attributes' && (is_array($value) || is_object($value))) - { - $attributes = $value; - if (is_object($attributes)) - { - $attributes = get_object_vars($attributes); - } - - foreach ($attributes as $attribute_name => $attribute_value) - { - $structure->addAttribute($attribute_name, $attribute_value); - } - } - // if there is another array found recursively call this function - elseif (is_array($value) || is_object($value)) - { - $node = $structure->addChild($key); - - // recursive call. - $this->to_xml($value, $node, $key); - } - else - { - // add single node. - $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'); - - $structure->addChild($key, $value); - } - } - - return $structure->asXML(); - } - - /** - * Format data as HTML - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return mixed - */ - public function to_html($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // Cast as an array if not already - if (is_array($data) === FALSE) - { - $data = (array) $data; - } - - // Check if it's a multi-dimensional array - if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) - { - // Multi-dimensional array - $headings = array_keys($data[0]); - } - else - { - // Single array - $headings = array_keys($data); - $data = [$data]; - } - - // Load the table library - $this->_CI->load->library('table'); - - $this->_CI->table->set_heading($headings); - - foreach ($data as $row) - { - // Suppressing the "array to string conversion" notice - // Keep the "evil" @ here - $row = @array_map('strval', $row); - - $this->_CI->table->add_row($row); - } - - return $this->_CI->table->generate(); - } - - /** - * @link http://www.metashock.de/2014/02/create-csv-file-in-memory-php/ - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @param string $delimiter The optional delimiter parameter sets the field - * delimiter (one character only). NULL will use the default value (,) - * @param string $enclosure The optional enclosure parameter sets the field - * enclosure (one character only). NULL will use the default value (") - * @return string A csv string - */ - public function to_csv($data = NULL, $delimiter = ',', $enclosure = '"') - { - // Use a threshold of 1 MB (1024 * 1024) - $handle = fopen('php://temp/maxmemory:1048576', 'w'); - if ($handle === FALSE) - { - return NULL; - } - - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // If NULL, then set as the default delimiter - if ($delimiter === NULL) - { - $delimiter = ','; - } - - // If NULL, then set as the default enclosure - if ($enclosure === NULL) - { - $enclosure = '"'; - } - - // Cast as an array if not already - if (is_array($data) === FALSE) - { - $data = (array) $data; - } - - // Check if it's a multi-dimensional array - if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) - { - // Multi-dimensional array - $headings = array_keys($data[0]); - } - else - { - // Single array - $headings = array_keys($data); - $data = [$data]; - } - - // Apply the headings - fputcsv($handle, $headings, $delimiter, $enclosure); - - foreach ($data as $record) - { - // If the record is not an array, then break. This is because the 2nd param of - // fputcsv() should be an array - if (is_array($record) === FALSE) - { - break; - } - - // Suppressing the "array to string conversion" notice. - // Keep the "evil" @ here. - $record = @ array_map('strval', $record); - - // Returns the length of the string written or FALSE - fputcsv($handle, $record, $delimiter, $enclosure); - } - - // Reset the file pointer - rewind($handle); - - // Retrieve the csv contents - $csv = stream_get_contents($handle); - - // Close the handle - fclose($handle); - - return $csv; - } - - /** - * Encode data as json - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return string Json representation of a value - */ - public function to_json($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // Get the callback parameter (if set) - $callback = $this->_CI->input->get('callback'); - - if (empty($callback) === TRUE) - { - return json_encode($data); - } - - // We only honour a jsonp callback which are valid javascript identifiers - elseif (preg_match('/^[a-z_\$][a-z0-9\$_]*(\.[a-z_\$][a-z0-9\$_]*)*$/i', $callback)) - { - // Return the data as encoded json with a callback - return $callback . '(' . json_encode($data) . ');'; - } - - // An invalid jsonp callback function provided. - // Though I don't believe this should be hardcoded here - $data['warning'] = 'INVALID JSONP CALLBACK: ' . $callback; - - return json_encode($data); - } - - /** - * Encode data as a serialized array - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return string Serialized data - */ - public function to_serialized($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - return serialize($data); - } - - /** - * Format data using a PHP structure - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return mixed String representation of a variable - */ - public function to_php($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - return var_export($data, TRUE); - } - - // INTERNAL FUNCTIONS - - /** - * @param $data XML string - * @return SimpleXMLElement XML element object; otherwise, empty array - */ - protected function _from_xml($data) - { - return $data ? (array) simplexml_load_string($data, 'SimpleXMLElement', LIBXML_NOCDATA) : []; - } - - /** - * @param string $data CSV string - * @param string $delimiter The optional delimiter parameter sets the field - * delimiter (one character only). NULL will use the default value (,) - * @param string $enclosure The optional enclosure parameter sets the field - * enclosure (one character only). NULL will use the default value (") - * @return array A multi-dimensional array with the outer array being the number of rows - * and the inner arrays the individual fields - */ - protected function _from_csv($data, $delimiter = ',', $enclosure = '"') - { - // If NULL, then set as the default delimiter - if ($delimiter === NULL) - { - $delimiter = ','; - } - - // If NULL, then set as the default enclosure - if ($enclosure === NULL) - { - $enclosure = '"'; - } - - return str_getcsv($data, $delimiter, $enclosure); - } - - /** - * @param $data Encoded json string - * @return mixed Decoded json string with leading and trailing whitespace removed - */ - protected function _from_json($data) - { - return json_decode(trim($data)); - } - - /** - * @param string Data to unserialized - * @return mixed Unserialized data - */ - protected function _from_serialize($data) - { - return unserialize(trim($data)); - } - - /** - * @param $data Data to trim leading and trailing whitespace - * @return string Data with leading and trailing whitespace removed - */ - protected function _from_php($data) - { - return trim($data); - } - -} diff --git a/application/views/rdf/basic.php b/application/views/rdf/basic.php deleted file mode 100644 index 2fd6ed3f7..000000000 --- a/application/views/rdf/basic.php +++ /dev/null @@ -1,54 +0,0 @@ - -
    -

    -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - primaryTopic(); -?> - - - - - - - - - - -
    NameGive NameFamily Name
    get('foaf:name') ?> get('foaf:givenName') ?> get('foaf:familyName') ?>
    - - - -
    \ No newline at end of file diff --git a/application/views/rdf/basic_sparql.php b/application/views/rdf/basic_sparql.php deleted file mode 100644 index 91ca04e85..000000000 --- a/application/views/rdf/basic_sparql.php +++ /dev/null @@ -1,74 +0,0 @@ - -
    -

    -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - -query( - 'SELECT * WHERE {'. - ' ?country rdf:type dbo:Country .'. - ' ?country rdfs:label ?label .'. - ' ?country dc:subject category:Member_states_of_the_United_Nations .'. - ' FILTER ( lang(?label) = "en" )'. - '} ORDER BY ?label' - ); - -?> - Total number of countries: numRows() ?> - - - - - - - - - - - - -
    LabelCountry
    label ?> country ?>
    - - - -
    diff --git a/application/views/rdf/converter.php b/application/views/rdf/converter.php deleted file mode 100644 index b8c0b9ae3..000000000 --- a/application/views/rdf/converter.php +++ /dev/null @@ -1,112 +0,0 @@ -
    -

    Converter

    -
    -
    -
    -
    - -
    -
    - - - -load->view('rdf/html_tag_helpers'); - - $input_format_options = array('Guess' => 'guess'); - $output_format_options = array(); - foreach (EasyRdf_Format::getFormats() as $format) { - if ($format->getSerialiserClass()) { - $output_format_options[$format->getLabel()] = $format->getName(); - } - if ($format->getParserClass()) { - $input_format_options[$format->getLabel()] = $format->getName(); - } - } - - // Stupid PHP :( - if (get_magic_quotes_gpc() and isset($_REQUEST['data'])) { - $_REQUEST['data'] = stripslashes($_REQUEST['data']); - } - - // Default to Guess input and Turtle output - if (!isset($_REQUEST['output_format'])) { - $_REQUEST['output_format'] = 'turtle'; - } - if (!isset($_REQUEST['input_format'])) { - $_REQUEST['input_format'] = 'guess'; - } - - // Display the form, if raw option isn't set - if (!isset($_REQUEST['raw'])) { - print "\n"; - print "EasyRdf Converter\n"; - print "\n"; - print "

    EasyRdf Converter

    \n"; - - print "
    \n"; - print form_tag(); - print label_tag('data', 'Input Data: ').'
    '.text_area_tag('data', '', array('cols'=>30, 'rows'=>10)) . "
    \n"; - print label_tag('uri', 'or Uri: ').text_field_tag('uri', 'http://www.dajobe.org/foaf.rdf', array('size'=>80)) . "
    \n"; - print label_tag('input_format', 'Input Format: ').select_tag('input_format', $input_format_options) . "
    \n"; - print label_tag('output_format', 'Output Format: ').select_tag('output_format', $output_format_options) . "
    \n"; - print label_tag('raw', 'Raw Output: ').check_box_tag('raw') . "
    \n"; - print reset_tag() . submit_tag(); - print form_end_tag(); - print "
    \n"; - } - - if (isset($_REQUEST['uri']) or isset($_REQUEST['data'])) { - // Parse the input - $graph = new EasyRdf_Graph($_REQUEST['uri']); - if (empty($_REQUEST['data'])) { - $graph->load($_REQUEST['uri'], $_REQUEST['input_format']); - } else { - $graph->parse($_REQUEST['data'], $_REQUEST['input_format'], $_REQUEST['uri']); - } - - // Lookup the output format - $format = EasyRdf_Format::getFormat($_REQUEST['output_format']); - - // Serialise to the new output format - $output = $graph->serialise($format); - if (!is_scalar($output)) { - $output = var_export($output, true); - } - - // Send the output back to the client - if (isset($_REQUEST['raw'])) { - header('Content-Type: '.$format->getDefaultMimeType()); - print $output; - } else { - print '
    '.htmlspecialchars($output).'
    '; - } - } - - if (!isset($_REQUEST['raw'])) { - print "\n"; - print "\n"; - } - -?> -
    \ No newline at end of file diff --git a/application/views/rdf/foafinfo.php b/application/views/rdf/foafinfo.php deleted file mode 100644 index 54cceec9b..000000000 --- a/application/views/rdf/foafinfo.php +++ /dev/null @@ -1,124 +0,0 @@ - -
    -

    -
    -
    -
    -
    - -
    -
    - - -
    - -
    - -
    - -
    -
    -
    -
    - -
    -
    -
    -

    FOAF me

    -load->view('rdf/html_tag_helpers'); - - - if (isset($_REQUEST['uri'])): ?> - - - - - - - type() == 'foaf:PersonalProfileDocument'): ?> - primaryTopic(); ?> - type() == 'foaf:Person'): ?> - resource(); ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameHomepage
    get('foaf:name') ?> get('foaf:homepage') ?>
    - - - - -

    Known Person

    - - all('foaf:knows') as $friend) { - $label = $friend->label(); - - if (!$label) { - $label = $friend->getUri(); - } - ?> - - - - - - - - - - isBNode()): ?> - - - - ".link_to_self($label, 'uri='.urlencode($friend)).""; ?> - - - - - - - - - -
    - - - - - - -
    - - - - - - \ No newline at end of file diff --git a/application/views/rdf/foafmaker.php b/application/views/rdf/foafmaker.php deleted file mode 100644 index c79f9f838..000000000 --- a/application/views/rdf/foafmaker.php +++ /dev/null @@ -1,121 +0,0 @@ -
    -

    EasyRdf FOAF Maker Example

    -
    -
    -
    -
    - -
    -
    -load->view('rdf/html_tag_helpers'); - - if (isset($_REQUEST['enable_arc']) && $_REQUEST['enable_arc']) { - require_once "EasyRdf/Serialiser/Arc.php"; - EasyRdf_Format::registerSerialiser('ntriples', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('posh', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Arc'); - } - - if (isset($_REQUEST['enable_rapper']) && $_REQUEST['enable_rapper']) { - require_once "EasyRdf/Serialiser/Rapper.php"; - EasyRdf_Format::registerSerialiser('dot', 'EasyRdf_Serialiser_Rapper'); - EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_Rapper'); - EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Rapper'); - } - - $format_options = array(); - foreach (EasyRdf_Format::getFormats() as $format) { - if ($format->getSerialiserClass()) { - $format_options[$format->getLabel()] = $format->getName(); - } - } -?> - -

    - - 'POST')) ?> - -

    Your Identifier

    -40)) ?>
    - -

    Your details

    -8)) ?>
    -
    -
    -
    -
    -40)) ?>
    - -

    People you know

    -40)) ?>
    -40)) ?>
    -40)) ?>
    -40)) ?>
    - -

    Output

    -Enable Arc 2?
    -Enable Rapper?
    -
    - - - - - -resource($_REQUEST['uri'], 'foaf:Person'); - $me->set('foaf:name', $_REQUEST['title'].' '.$_REQUEST['given_name'].' '.$_REQUEST['family_name']); - if ($_REQUEST['email']) { - $email = $graph->resource("mailto:".$_REQUEST['email']); - $me->add('foaf:mbox', $email); - } - if ($_REQUEST['homepage']) { - $homepage = $graph->resource($_REQUEST['homepage']); - $me->add('foaf:homepage', $homepage); - } - - # 2nd Technique - $graph->addLiteral($_REQUEST['uri'], 'foaf:title', $_REQUEST['title']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:givenname', $_REQUEST['given_name']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:family_name', $_REQUEST['family_name']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:nick', $_REQUEST['nickname']); - - # Add friends - for ($i=1; $i<=4; $i++) { - if ($_REQUEST["person_$i"]) { - $person = $graph->resource($_REQUEST["person_$i"]); - $graph->add($me, 'foaf:knows', $person); - } - } - - # Finally output the graph - $data = $graph->serialise($_REQUEST['format']); - if (!is_scalar($data)) { - $data = var_export($data, true); - } - print "
    ".htmlspecialchars($data)."
    "; - } - -?> - -
    \ No newline at end of file diff --git a/application/views/rdf/form.php b/application/views/rdf/form.php deleted file mode 100644 index ad0c704b5..000000000 --- a/application/views/rdf/form.php +++ /dev/null @@ -1,121 +0,0 @@ -
    -

    EasyRdf FOAF Maker Example

    -
    -
    -
    -
    - -
    -
    -load->view('rdf/html_tag_helpers'); - - if (isset($_REQUEST['enable_arc']) && $_REQUEST['enable_arc']) { - require_once "EasyRdf/Serialiser/Arc.php"; - EasyRdf_Format::registerSerialiser('ntriples', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('posh', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Arc'); - } - - if (isset($_REQUEST['enable_rapper']) && $_REQUEST['enable_rapper']) { - require_once "EasyRdf/Serialiser/Rapper.php"; - EasyRdf_Format::registerSerialiser('dot', 'EasyRdf_Serialiser_Rapper'); - EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_Rapper'); - EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Rapper'); - } - - $format_options = array(); - foreach (EasyRdf_Format::getFormats() as $format) { - if ($format->getSerialiserClass()) { - $format_options[$format->getLabel()] = $format->getName(); - } - } -?> - -

    - - 'POST')) ?> - -

    Your Identifier

    -40)) ?>
    - -

    Your details

    -8)) ?>
    -
    -
    -
    -
    -40)) ?>
    - -

    People you know

    -40)) ?>
    -40)) ?>
    -40)) ?>
    -40)) ?>
    - -

    Output

    -Enable Arc 2?
    -Enable Rapper?
    -
    - - - - - -resource($_REQUEST['uri'], 'foaf:Person'); - $me->set('foaf:name', $_REQUEST['title'].' '.$_REQUEST['given_name'].' '.$_REQUEST['family_name']); - if ($_REQUEST['email']) { - $email = $graph->resource("mailto:".$_REQUEST['email']); - $me->add('foaf:mbox', $email); - } - if ($_REQUEST['homepage']) { - $homepage = $graph->resource($_REQUEST['homepage']); - $me->add('foaf:homepage', $homepage); - } - - # 2nd Technique - $graph->addLiteral($_REQUEST['uri'], 'foaf:title', $_REQUEST['title']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:givenname', $_REQUEST['given_name']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:family_name', $_REQUEST['family_name']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:nick', $_REQUEST['nickname']); - - # Add friends - for ($i=1; $i<=4; $i++) { - if ($_REQUEST["person_$i"]) { - $person = $graph->resource($_REQUEST["person_$i"]); - $graph->add($me, 'foaf:knows', $person); - } - } - - # Finally output the graph - $data = $graph->serialise($_REQUEST['format']); - if (!is_scalar($data)) { - $data = var_export($data, true); - } - print "
    ".htmlspecialchars($data)."
    "; - } - -?> - -
    \ No newline at end of file diff --git a/application/views/rdf/html_tag_helpers.php b/application/views/rdf/html_tag_helpers.php deleted file mode 100644 index 0cdcdddac..000000000 --- a/application/views/rdf/html_tag_helpers.php +++ /dev/null @@ -1,218 +0,0 @@ -'foo')); - -echo tag('br'); -echo link_to('Hyperlink', 'http://www.example.com/?a=1&b=2'); -echo tag('br'); - -echo form_tag(); - - echo label_tag('first_name').text_field_tag('first_name', 'Joe').tag('br'); - echo label_tag('password').password_field_tag().tag('br'); - - echo label_tag('radio1_value1', 'Radio 1').radio_button_tag('radio1', 'value1').tag('br'); - echo label_tag('radio1_value2', 'Radio 2').radio_button_tag('radio1', 'value2', true).tag('br'); - echo label_tag('radio1_value3', 'Radio 3').radio_button_tag('radio1', 'value3').tag('br'); - - echo label_tag('check1', 'Check 1').check_box_tag('check1', 'value1').tag('br'); - echo label_tag('check2', 'Check 2').check_box_tag('check2', 'value2', true).tag('br'); - echo label_tag('check3', 'Check 3').check_box_tag('check3', 'value3').tag('br'); - - $options = array('Label 1' => 'value1', 'Label 2' => 'value2', 'Label 3' => 'value3'); - echo label_tag('select1', 'Select Something:'); - echo select_tag('select1', $options, 'value2').tag('br'); - - echo label_tag('textarea1', 'Type Something:'); - echo text_area_tag('textarea1', "Hello World!").tag('br'); - - echo submit_tag(); - -echo form_end_tag(); - -*/ - - -function tag_options($options) -{ - $html = ""; - foreach ($options as $key => $value) { - if ($key and $value) { - $html .= " ".htmlspecialchars($key)."=\"". - htmlspecialchars($value)."\""; - } - } - return $html; -} - -function tag($name, $options = array(), $open = false) -{ - return "<$name".tag_options($options).($open ? ">" : " />"); -} - -function content_tag($name, $content = null, $options = array()) -{ - return "<$name".tag_options($options).">". - htmlspecialchars($content).""; -} - -function link_to($text, $uri = null, $options = array()) -{ - if ($uri == null) $uri = $text; - $options = array_merge(array('href' => $uri), $options); - return content_tag('a', $text, $options); -} - -function link_to_self($text, $query_string, $options = array()) -{ - return link_to($text, $_SERVER['PHP_SELF'].'?'.$query_string, $options); -} - -function image_tag($src, $options = array()) -{ - $options = array_merge(array('src' => $src), $options); - return tag('img', $options); -} - -function input_tag($type, $name, $value = null, $options = array()) -{ - $options = array_merge( - array( - 'type' => $type, - 'name' => $name, - 'id' => $name, - 'value' => $value - ), - $options - ); - return tag('input', $options); -} - -function text_field_tag($name, $default = null, $options = array()) -{ - $value = isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default; - return input_tag('text', $name, $value, $options); -} - -function text_area_tag($name, $default = null, $options = array()) -{ - $content = isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default; - $options = array_merge( - array( - 'name' => $name, - 'id' => $name, - 'cols' => 60, - 'rows' => 5 - ), - $options - ); - return content_tag('textarea', $content, $options); -} - -function hidden_field_tag($name, $default = null, $options = array()) -{ - $value = isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default; - return input_tag('hidden', $name, $value, $options); -} - -function password_field_tag($name = 'password', $default = null, $options = array()) -{ - $value = isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default; - return input_tag('password', $name, $value, $options); -} - -function radio_button_tag($name, $value, $default = false, $options = array()) -{ - if ((isset($_REQUEST[$name]) and $_REQUEST[$name] == $value) or - (!isset($_REQUEST[$name]) and $default)) - { - $options = array_merge(array('checked' => 'checked'), $options); - } - $options = array_merge(array('id' => $name.'_'.$value), $options); - return input_tag('radio', $name, $value, $options); -} - -function check_box_tag($name, $value = '1', $default = false, $options = array()) -{ - if ((isset($_REQUEST[$name]) and $_REQUEST[$name] == $value) or - (!isset($_REQUEST['submit']) and $default)) - { - $options = array_merge(array('checked' => 'checked'),$options); - } - return input_tag('checkbox', $name, $value, $options); -} - -function submit_tag($name = '', $value = 'Submit', $options = array()) -{ - return input_tag('submit', $name, $value, $options); -} - -function reset_tag($name = '', $value = 'Reset', $options = array()) -{ - return input_tag('reset', $name, $value, $options); -} - -function label_tag($name, $text = null, $options = array()) -{ - if ($text == null) { - $text = ucwords(str_replace('_', ' ', $name)).': '; - } - $options = array_merge( - array('for' => $name, 'id' => "label_for_$name"), - $options - ); - return content_tag('label', $text, $options); -} - -function labeled_text_field_tag($name, $default = null, $options = array()) -{ - return label_tag($name).text_field_tag($name, $default, $options); -} - -function select_tag($name, $options, $default = null, $html_options = array()) -{ - $opts = ''; - foreach ($options as $key => $value) { - $arr = array('value' => $value); - if ((isset($_REQUEST[$name]) and $_REQUEST[$name] == $value) or - (!isset($_REQUEST[$name]) and $default == $value)) - { - $arr = array_merge(array('selected' => 'selected'),$arr); - } - $opts .= content_tag('option', $key, $arr); - } - $html_options = array_merge( - array('name' => $name, 'id' => $name), - $html_options - ); - return "$opts"; -} - -function form_tag($uri = null, $options = array()) -{ - if ($uri == null) { - $uri = $_SERVER['PHP_SELF']; - } - $options = array_merge( - array('method' => 'get', 'action' => $uri), - $options - ); - return tag('form', $options, true); -} - -function form_end_tag() -{ - return ""; -} From c84c484a2a7b06a17f24952292dc0d82a475190d Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 26 Apr 2019 12:43:51 +0200 Subject: [PATCH 13/84] Fixed models --- .../controllers/api/v1/codex/Nation.php | 16 ++-- application/controllers/api/v1/codex/Zgv.php | 2 +- .../api/v1/crm/Bewerbungstermine.php | 2 +- .../api/v1/crm/Dokumentprestudent.php | 2 +- .../api/v1/person/Notizzuordnung.php | 2 +- .../system/infocenter/InfoCenter.php | 20 ++--- application/models/CL/Messages_model.php | 4 +- .../models/accounting/Aufteilung_model.php | 14 +++ .../models/accounting/Bestelldetail_model.php | 14 +++ .../accounting/Bestelldetailtag_model.php | 14 +++ .../models/accounting/Bestellstatus_model.php | 14 +++ .../models/accounting/Bestellung_model.php | 14 +++ .../models/accounting/Bestellungtag_model.php | 14 +++ .../models/accounting/Buchung_model.php | 14 +++ .../models/accounting/Buchungstyp_model.php | 14 +++ .../models/accounting/Budget_model.php | 14 +++ .../models/accounting/Rechnung_model.php | 14 +++ .../accounting/Rechnungsbetrag_model.php | 14 +++ .../models/accounting/Rechnungstyp_model.php | 14 +++ .../models/accounting/Vertrag_model.php | 14 +++ .../accounting/Vertragsstatus_model.php | 14 +++ .../models/accounting/Vertragstyp_model.php | 14 +++ .../models/accounting/Zahlungstyp_model.php | 14 +++ application/models/codex/Akadgrad_model.php | 14 +++ application/models/codex/Archiv_model.php | 14 +++ .../models/codex/Aufmerksamdurch_model.php | 14 +++ application/models/codex/Ausbildung_model.php | 14 +++ .../models/codex/Berufstaetigkeit_model.php | 14 +++ .../codex/Beschaeftigungsausmass_model.php | 14 +++ application/models/codex/Besqual_model.php | 14 +++ .../models/codex/Bisfunktion_model.php | 14 +++ application/models/codex/Bisio_model.php | 14 +++ application/models/codex/Bisorgform_model.php | 14 +++ .../models/codex/Bisverwendung_model.php | 14 +++ application/models/codex/Bundesland_model.php | 14 +++ .../models/codex/Entwicklungsteam_model.php | 14 +++ application/models/codex/Gemeinde_model.php | 22 +++++ application/models/codex/Hauptberuf_model.php | 14 +++ application/models/codex/Lehrform_model.php | 14 +++ application/models/codex/Lgartcode_model.php | 14 +++ .../codex/Mobilitaetsprogramm_model.php | 14 +++ application/models/codex/Nation_model.php | 14 +++ application/models/codex/Note_model.php | 14 +++ application/models/codex/Verwendung_model.php | 14 +++ application/models/codex/Zgv_model.php | 14 +++ application/models/codex/Zgvdoktor_model.php | 14 +++ application/models/codex/Zgvgruppe_model.php | 13 +++ application/models/codex/Zgvmaster_model.php | 14 +++ application/models/codex/Zweck_model.php | 14 +++ application/models/content/Content_model.php | 14 +++ .../models/content/Contentchild_model.php | 14 +++ .../models/content/Contentgruppe_model.php | 14 +++ .../models/content/Contentlog_model.php | 14 +++ .../models/content/Contentsprache_model.php | 14 +++ .../models/content/Infoscreen_model.php | 14 +++ application/models/content/News_model.php | 14 +++ application/models/content/Template_model.php | 14 +++ .../models/content/Veranstaltung_model.php | 14 +++ .../content/Veranstaltungskategorie_model.php | 14 +++ .../models/crm/Aufnahmeschluessel_model.php | 14 +++ .../models/crm/Bewerbungstermine_model.php | 14 +++ application/models/crm/Buchungstyp_model.php | 14 +++ application/models/crm/Dokument_model.php | 14 +++ .../models/crm/Dokumentprestudent_model.php | 71 +++++++++++++++ application/models/crm/Konto_model.php | 14 +++ application/models/crm/Preincoming_model.php | 14 +++ .../models/crm/Preinteressent_model.php | 14 +++ .../crm/Preinteressentstudiengang_model.php | 14 +++ application/models/crm/Preoutgoing_model.php | 14 +++ application/models/crm/Student_model.php | 48 ++++++++++ application/models/education/Uebung_model.php | 14 +++ .../models/organisation/Erhalter_model.php | 14 +++ .../models/organisation/Fachbereich_model.php | 14 +++ .../models/organisation/Ferien_model.php | 14 +++ .../models/organisation/Lehrverband_model.php | 14 +++ .../Organisationseinheittyp_model.php | 14 +++ .../organisation/Semesterwochen_model.php | 14 +++ .../models/organisation/Service_model.php | 14 +++ .../models/organisation/Standort_model.php | 14 +++ .../models/organisation/Statistik_model.php | 14 +++ .../organisation/Studiengangstyp_model.php | 14 +++ .../organisation/Studienordnung_model.php | 14 +++ .../Studienordnungstatus_model.php | 14 +++ .../organisation/Studienplatz_model.php | 14 +++ .../models/person/Bankverbindung_model.php | 14 +++ .../models/person/Benutzergruppe_model.php | 15 ++++ .../models/person/Fotostatus_model.php | 14 +++ application/models/person/Freebusy_model.php | 14 +++ .../models/person/Freebusytyp_model.php | 14 +++ .../models/person/Kontaktmedium_model.php | 14 +++ .../models/person/Kontakttyp_model.php | 14 +++ application/models/person/Notiz_model.php | 32 +++---- .../models/person/Notizzuordnung_model.php | 14 +++ .../models/project/Aktivitaet_model.php | 14 +++ .../models/project/Aufwandstyp_model.php | 14 +++ .../project/Projekt_ressource_model.php | 14 +++ .../models/project/Projektphase_model.php | 14 +++ .../models/project/Projekttask_model.php | 14 +++ .../models/project/Ressource_model.php | 14 +++ .../models/project/Scrumsprint_model.php | 14 +++ .../models/ressource/Betriebsmittel_model.php | 14 +++ .../ressource/Betriebsmittelperson_model.php | 14 +++ .../ressource/Betriebsmittelstatus_model.php | 14 +++ .../ressource/Betriebsmitteltyp_model.php | 14 +++ application/models/ressource/Coodle_model.php | 14 +++ .../models/ressource/Erreichbarkeit_model.php | 14 +++ application/models/ressource/Firma_model.php | 14 +++ .../models/ressource/Firmatag_model.php | 14 +++ .../models/ressource/Firmentyp_model.php | 14 +++ .../models/ressource/Funktion_model.php | 14 +++ .../models/ressource/Lehrmittel_model.php | 14 +++ .../models/ressource/Mitarbeiter_model.php | 14 +++ application/models/ressource/Ort_model.php | 23 +++++ .../models/ressource/Ortraumtyp_model.php | 14 +++ .../Personfunktionstandort_model.php | 14 +++ .../models/ressource/Raumtyp_model.php | 14 +++ .../models/ressource/Reservierung_model.php | 14 +++ application/models/ressource/Stunde_model.php | 14 +++ .../models/ressource/Stundenplan_model.php | 14 +++ .../ressource/Zeitaufzeichnung_model.php | 14 +++ .../models/ressource/Zeitsperre_model.php | 14 +++ .../models/ressource/Zeitsperretyp_model.php | 14 +++ .../models/ressource/Zeitwunsch_model.php | 14 +++ .../models/system/Berechtigung_model.php | 14 +++ application/models/system/Cronjob_model.php | 14 +++ application/models/system/Filter_model.php | 14 +++ application/models/system/Log_model.php | 14 +++ application/models/system/Message_model.php | 4 +- .../models/system/PersonLock_model.php | 88 +++++++++++++++++++ application/models/system/Rolle_model.php | 14 +++ .../models/system/Rolleberechtigung_model.php | 14 +++ application/models/system/Server_model.php | 14 +++ application/models/system/Tag_model.php | 14 +++ application/models/system/Variable_model.php | 14 +++ .../models/system/Webservicelog_model.php | 14 +++ .../models/system/Webservicerecht_model.php | 14 +++ .../models/system/Webservicetyp_model.php | 14 +++ application/models/testtool/Ablauf_model.php | 14 +++ application/models/testtool/Antwort_model.php | 14 +++ application/models/testtool/Frage_model.php | 14 +++ application/models/testtool/Gebiet_model.php | 14 +++ .../models/testtool/Kategorie_model.php | 14 +++ .../models/testtool/Kriterien_model.php | 14 +++ .../models/testtool/Pruefling_model.php | 14 +++ .../models/testtool/Vorschlag_model.php | 14 +++ application/widgets/Nation_widget.php | 4 +- application/widgets/Zgv_widget.php | 4 +- 147 files changed, 2132 insertions(+), 46 deletions(-) create mode 100644 application/models/accounting/Aufteilung_model.php create mode 100644 application/models/accounting/Bestelldetail_model.php create mode 100644 application/models/accounting/Bestelldetailtag_model.php create mode 100644 application/models/accounting/Bestellstatus_model.php create mode 100644 application/models/accounting/Bestellung_model.php create mode 100644 application/models/accounting/Bestellungtag_model.php create mode 100644 application/models/accounting/Buchung_model.php create mode 100644 application/models/accounting/Buchungstyp_model.php create mode 100644 application/models/accounting/Budget_model.php create mode 100644 application/models/accounting/Rechnung_model.php create mode 100644 application/models/accounting/Rechnungsbetrag_model.php create mode 100644 application/models/accounting/Rechnungstyp_model.php create mode 100644 application/models/accounting/Vertrag_model.php create mode 100644 application/models/accounting/Vertragsstatus_model.php create mode 100644 application/models/accounting/Vertragstyp_model.php create mode 100644 application/models/accounting/Zahlungstyp_model.php create mode 100644 application/models/codex/Akadgrad_model.php create mode 100644 application/models/codex/Archiv_model.php create mode 100644 application/models/codex/Aufmerksamdurch_model.php create mode 100644 application/models/codex/Ausbildung_model.php create mode 100644 application/models/codex/Berufstaetigkeit_model.php create mode 100644 application/models/codex/Beschaeftigungsausmass_model.php create mode 100644 application/models/codex/Besqual_model.php create mode 100644 application/models/codex/Bisfunktion_model.php create mode 100644 application/models/codex/Bisio_model.php create mode 100644 application/models/codex/Bisorgform_model.php create mode 100644 application/models/codex/Bisverwendung_model.php create mode 100644 application/models/codex/Bundesland_model.php create mode 100644 application/models/codex/Entwicklungsteam_model.php create mode 100644 application/models/codex/Gemeinde_model.php create mode 100644 application/models/codex/Hauptberuf_model.php create mode 100644 application/models/codex/Lehrform_model.php create mode 100644 application/models/codex/Lgartcode_model.php create mode 100644 application/models/codex/Mobilitaetsprogramm_model.php create mode 100644 application/models/codex/Nation_model.php create mode 100644 application/models/codex/Note_model.php create mode 100644 application/models/codex/Verwendung_model.php create mode 100644 application/models/codex/Zgv_model.php create mode 100644 application/models/codex/Zgvdoktor_model.php create mode 100644 application/models/codex/Zgvgruppe_model.php create mode 100644 application/models/codex/Zgvmaster_model.php create mode 100644 application/models/codex/Zweck_model.php create mode 100644 application/models/content/Content_model.php create mode 100644 application/models/content/Contentchild_model.php create mode 100644 application/models/content/Contentgruppe_model.php create mode 100644 application/models/content/Contentlog_model.php create mode 100644 application/models/content/Contentsprache_model.php create mode 100644 application/models/content/Infoscreen_model.php create mode 100644 application/models/content/News_model.php create mode 100644 application/models/content/Template_model.php create mode 100644 application/models/content/Veranstaltung_model.php create mode 100644 application/models/content/Veranstaltungskategorie_model.php create mode 100644 application/models/crm/Aufnahmeschluessel_model.php create mode 100644 application/models/crm/Bewerbungstermine_model.php create mode 100644 application/models/crm/Buchungstyp_model.php create mode 100644 application/models/crm/Dokument_model.php create mode 100644 application/models/crm/Dokumentprestudent_model.php create mode 100644 application/models/crm/Konto_model.php create mode 100644 application/models/crm/Preincoming_model.php create mode 100644 application/models/crm/Preinteressent_model.php create mode 100644 application/models/crm/Preinteressentstudiengang_model.php create mode 100644 application/models/crm/Preoutgoing_model.php create mode 100644 application/models/crm/Student_model.php create mode 100644 application/models/education/Uebung_model.php create mode 100644 application/models/organisation/Erhalter_model.php create mode 100644 application/models/organisation/Fachbereich_model.php create mode 100644 application/models/organisation/Ferien_model.php create mode 100644 application/models/organisation/Lehrverband_model.php create mode 100644 application/models/organisation/Organisationseinheittyp_model.php create mode 100644 application/models/organisation/Semesterwochen_model.php create mode 100644 application/models/organisation/Service_model.php create mode 100644 application/models/organisation/Standort_model.php create mode 100644 application/models/organisation/Statistik_model.php create mode 100644 application/models/organisation/Studiengangstyp_model.php create mode 100644 application/models/organisation/Studienordnung_model.php create mode 100644 application/models/organisation/Studienordnungstatus_model.php create mode 100644 application/models/organisation/Studienplatz_model.php create mode 100644 application/models/person/Bankverbindung_model.php create mode 100644 application/models/person/Benutzergruppe_model.php create mode 100644 application/models/person/Fotostatus_model.php create mode 100644 application/models/person/Freebusy_model.php create mode 100644 application/models/person/Freebusytyp_model.php create mode 100644 application/models/person/Kontaktmedium_model.php create mode 100644 application/models/person/Kontakttyp_model.php create mode 100644 application/models/person/Notizzuordnung_model.php create mode 100644 application/models/project/Aktivitaet_model.php create mode 100644 application/models/project/Aufwandstyp_model.php create mode 100644 application/models/project/Projekt_ressource_model.php create mode 100644 application/models/project/Projektphase_model.php create mode 100644 application/models/project/Projekttask_model.php create mode 100644 application/models/project/Ressource_model.php create mode 100644 application/models/project/Scrumsprint_model.php create mode 100644 application/models/ressource/Betriebsmittel_model.php create mode 100644 application/models/ressource/Betriebsmittelperson_model.php create mode 100644 application/models/ressource/Betriebsmittelstatus_model.php create mode 100644 application/models/ressource/Betriebsmitteltyp_model.php create mode 100644 application/models/ressource/Coodle_model.php create mode 100644 application/models/ressource/Erreichbarkeit_model.php create mode 100644 application/models/ressource/Firma_model.php create mode 100644 application/models/ressource/Firmatag_model.php create mode 100644 application/models/ressource/Firmentyp_model.php create mode 100644 application/models/ressource/Funktion_model.php create mode 100644 application/models/ressource/Lehrmittel_model.php create mode 100644 application/models/ressource/Mitarbeiter_model.php create mode 100644 application/models/ressource/Ort_model.php create mode 100644 application/models/ressource/Ortraumtyp_model.php create mode 100644 application/models/ressource/Personfunktionstandort_model.php create mode 100644 application/models/ressource/Raumtyp_model.php create mode 100644 application/models/ressource/Reservierung_model.php create mode 100644 application/models/ressource/Stunde_model.php create mode 100644 application/models/ressource/Stundenplan_model.php create mode 100644 application/models/ressource/Zeitaufzeichnung_model.php create mode 100644 application/models/ressource/Zeitsperre_model.php create mode 100644 application/models/ressource/Zeitsperretyp_model.php create mode 100644 application/models/ressource/Zeitwunsch_model.php create mode 100644 application/models/system/Berechtigung_model.php create mode 100644 application/models/system/Cronjob_model.php create mode 100644 application/models/system/Filter_model.php create mode 100644 application/models/system/Log_model.php create mode 100644 application/models/system/PersonLock_model.php create mode 100644 application/models/system/Rolle_model.php create mode 100644 application/models/system/Rolleberechtigung_model.php create mode 100644 application/models/system/Server_model.php create mode 100644 application/models/system/Tag_model.php create mode 100644 application/models/system/Variable_model.php create mode 100644 application/models/system/Webservicelog_model.php create mode 100644 application/models/system/Webservicerecht_model.php create mode 100644 application/models/system/Webservicetyp_model.php create mode 100644 application/models/testtool/Ablauf_model.php create mode 100644 application/models/testtool/Antwort_model.php create mode 100644 application/models/testtool/Frage_model.php create mode 100644 application/models/testtool/Gebiet_model.php create mode 100644 application/models/testtool/Kategorie_model.php create mode 100644 application/models/testtool/Kriterien_model.php create mode 100644 application/models/testtool/Pruefling_model.php create mode 100644 application/models/testtool/Vorschlag_model.php diff --git a/application/controllers/api/v1/codex/Nation.php b/application/controllers/api/v1/codex/Nation.php index a8074bd82..ad6c5e10e 100644 --- a/application/controllers/api/v1/codex/Nation.php +++ b/application/controllers/api/v1/codex/Nation.php @@ -23,17 +23,17 @@ class Nation extends APIv1_Controller { parent::__construct(array('Nation' => 'basis/nation:r', 'All' => 'basis/nation:r')); // Load model NationModel - $this->load->model('codex/nation_model', 'NationModel'); + $this->load->model('codex/Nation_model', 'NationModel'); } - + public function getNation() { $nation_code = $this->get("nation_code"); - + if (isset($nation_code)) { $result = $this->NationModel->loadWhere(array('nation_code' => $nation_code)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -41,7 +41,7 @@ class Nation extends APIv1_Controller $this->response(); } } - + public function getAll() { if (!$this->get('orderEnglish')) @@ -52,7 +52,7 @@ class Nation extends APIv1_Controller { $result = $this->NationModel->addOrder('engltext'); } - + if (isSuccess($result)) { if ($this->get('ohnesperre')) @@ -64,7 +64,7 @@ class Nation extends APIv1_Controller $result = $this->NationModel->load(); } } - + $this->response($result, REST_Controller::HTTP_OK); } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Zgv.php b/application/controllers/api/v1/codex/Zgv.php index d042b2b56..b1a0981dc 100644 --- a/application/controllers/api/v1/codex/Zgv.php +++ b/application/controllers/api/v1/codex/Zgv.php @@ -23,7 +23,7 @@ class Zgv extends APIv1_Controller { parent::__construct(array('Zgv' => 'basis/zgv:rw')); // Load model ZgvModel - $this->load->model('codex/zgv_model', 'ZgvModel'); + $this->load->model('codex/Zgv_model', 'ZgvModel'); } /** diff --git a/application/controllers/api/v1/crm/Bewerbungstermine.php b/application/controllers/api/v1/crm/Bewerbungstermine.php index 8d3c8b774..55d49ff58 100644 --- a/application/controllers/api/v1/crm/Bewerbungstermine.php +++ b/application/controllers/api/v1/crm/Bewerbungstermine.php @@ -30,7 +30,7 @@ class Bewerbungstermine extends APIv1_Controller ) ); // Load model BewerbungstermineModel - $this->load->model('crm/bewerbungstermine_model', 'BewerbungstermineModel'); + $this->load->model('crm/Bewerbungstermine_model', 'BewerbungstermineModel'); } diff --git a/application/controllers/api/v1/crm/Dokumentprestudent.php b/application/controllers/api/v1/crm/Dokumentprestudent.php index 020a876cd..e05815d33 100644 --- a/application/controllers/api/v1/crm/Dokumentprestudent.php +++ b/application/controllers/api/v1/crm/Dokumentprestudent.php @@ -29,7 +29,7 @@ class Dokumentprestudent extends APIv1_Controller ) ); // Load model DokumentprestudentModel - $this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel'); + $this->load->model('crm/Dokumentprestudent_model', 'DokumentprestudentModel'); } /** diff --git a/application/controllers/api/v1/person/Notizzuordnung.php b/application/controllers/api/v1/person/Notizzuordnung.php index c5dab8cbe..da185e20f 100644 --- a/application/controllers/api/v1/person/Notizzuordnung.php +++ b/application/controllers/api/v1/person/Notizzuordnung.php @@ -23,7 +23,7 @@ class Notizzuordnung extends APIv1_Controller { parent::__construct(array('Notizzuordnung' => 'basis/notizzuordnung:rw')); // Load model NotizzuordnungModel - $this->load->model('person/notizzuordnung_model', 'NotizzuordnungModel'); + $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); } diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 3dc2919e1..575f1f23b 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -102,15 +102,15 @@ class InfoCenter extends Auth_Controller ); // Loads models - $this->load->model('crm/akte_model', 'AkteModel'); - $this->load->model('crm/prestudent_model', 'PrestudentModel'); - $this->load->model('crm/prestudentstatus_model', 'PrestudentstatusModel'); - $this->load->model('crm/statusgrund_model', 'StatusgrundModel'); - $this->load->model('person/notiz_model', 'NotizModel'); - $this->load->model('person/person_model', 'PersonModel'); - $this->load->model('system/message_model', 'MessageModel'); - $this->load->model('system/filters_model', 'FiltersModel'); - $this->load->model('system/personLock_model', 'PersonLockModel'); + $this->load->model('crm/Akte_model', 'AkteModel'); + $this->load->model('crm/Prestudent_model', 'PrestudentModel'); + $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); + $this->load->model('crm/Statusgrund_model', 'StatusgrundModel'); + $this->load->model('person/Notiz_model', 'NotizModel'); + $this->load->model('person/Person_model', 'PersonModel'); + $this->load->model('system/Message_model', 'MessageModel'); + $this->load->model('system/Filters_model', 'FiltersModel'); + $this->load->model('system/PersonLock_model', 'PersonLockModel'); // Loads libraries $this->load->library('PersonLogLib'); @@ -522,7 +522,7 @@ class InfoCenter extends Auth_Controller if (isSuccess($result)) { - $this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel'); + $this->load->model('crm/Dokumentprestudent_model', 'DokumentprestudentModel'); //set documents which have been formal geprüft to accepted $dokument_kurzbzs = array(); diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php index 5f3f40e6d..5a0a77a31 100644 --- a/application/models/CL/Messages_model.php +++ b/application/models/CL/Messages_model.php @@ -1,10 +1,10 @@ dbTable = 'wawi.tbl_aufteilung'; + $this->pk = 'aufteilung_id'; + } +} diff --git a/application/models/accounting/Bestelldetail_model.php b/application/models/accounting/Bestelldetail_model.php new file mode 100644 index 000000000..dd57002d1 --- /dev/null +++ b/application/models/accounting/Bestelldetail_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestelldetail'; + $this->pk = 'bestelldetail_id'; + } +} diff --git a/application/models/accounting/Bestelldetailtag_model.php b/application/models/accounting/Bestelldetailtag_model.php new file mode 100644 index 000000000..a760c26a2 --- /dev/null +++ b/application/models/accounting/Bestelldetailtag_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestelldetailtag'; + $this->pk = array('bestelldetail_id', 'tag'); + } +} diff --git a/application/models/accounting/Bestellstatus_model.php b/application/models/accounting/Bestellstatus_model.php new file mode 100644 index 000000000..0f9810818 --- /dev/null +++ b/application/models/accounting/Bestellstatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestellstatus'; + $this->pk = 'bestellstatus_kurzbz'; + } +} diff --git a/application/models/accounting/Bestellung_model.php b/application/models/accounting/Bestellung_model.php new file mode 100644 index 000000000..0d0ea37f8 --- /dev/null +++ b/application/models/accounting/Bestellung_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestellung'; + $this->pk = 'bestellung_id'; + } +} diff --git a/application/models/accounting/Bestellungtag_model.php b/application/models/accounting/Bestellungtag_model.php new file mode 100644 index 000000000..77c7416f5 --- /dev/null +++ b/application/models/accounting/Bestellungtag_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestellungtag'; + $this->pk = array('bestellung_id', 'tag'); + } +} diff --git a/application/models/accounting/Buchung_model.php b/application/models/accounting/Buchung_model.php new file mode 100644 index 000000000..adc700dfc --- /dev/null +++ b/application/models/accounting/Buchung_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_buchung'; + $this->pk = 'buchung_id'; + } +} diff --git a/application/models/accounting/Buchungstyp_model.php b/application/models/accounting/Buchungstyp_model.php new file mode 100644 index 000000000..7ed47217d --- /dev/null +++ b/application/models/accounting/Buchungstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_buchungstyp'; + $this->pk = 'buchungstyp_kurzbz'; + } +} diff --git a/application/models/accounting/Budget_model.php b/application/models/accounting/Budget_model.php new file mode 100644 index 000000000..f425f3479 --- /dev/null +++ b/application/models/accounting/Budget_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_budget'; + $this->pk = array('kostenstelle_id', 'geschaeftsjahr_kurzbz'); + } +} diff --git a/application/models/accounting/Rechnung_model.php b/application/models/accounting/Rechnung_model.php new file mode 100644 index 000000000..6e5ddcf83 --- /dev/null +++ b/application/models/accounting/Rechnung_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_rechnung'; + $this->pk = 'rechnung_id'; + } +} diff --git a/application/models/accounting/Rechnungsbetrag_model.php b/application/models/accounting/Rechnungsbetrag_model.php new file mode 100644 index 000000000..11617429c --- /dev/null +++ b/application/models/accounting/Rechnungsbetrag_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_rechnungsbetrag'; + $this->pk = 'rechnungsbetrag_id'; + } +} diff --git a/application/models/accounting/Rechnungstyp_model.php b/application/models/accounting/Rechnungstyp_model.php new file mode 100644 index 000000000..3f1e0633e --- /dev/null +++ b/application/models/accounting/Rechnungstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_rechnungstyp'; + $this->pk = 'rechnungstyp_kurzbz'; + } +} diff --git a/application/models/accounting/Vertrag_model.php b/application/models/accounting/Vertrag_model.php new file mode 100644 index 000000000..cd4b466d6 --- /dev/null +++ b/application/models/accounting/Vertrag_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_vertrag'; + $this->pk = 'vertrag_id'; + } +} diff --git a/application/models/accounting/Vertragsstatus_model.php b/application/models/accounting/Vertragsstatus_model.php new file mode 100644 index 000000000..21367b84a --- /dev/null +++ b/application/models/accounting/Vertragsstatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_vertragsstatus'; + $this->pk = 'vertragsstatus_kurzbz'; + } +} diff --git a/application/models/accounting/Vertragstyp_model.php b/application/models/accounting/Vertragstyp_model.php new file mode 100644 index 000000000..42d248217 --- /dev/null +++ b/application/models/accounting/Vertragstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_vertragstyp'; + $this->pk = 'vertragstyp_kurzbz'; + } +} diff --git a/application/models/accounting/Zahlungstyp_model.php b/application/models/accounting/Zahlungstyp_model.php new file mode 100644 index 000000000..5ab7350ab --- /dev/null +++ b/application/models/accounting/Zahlungstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_zahlungstyp'; + $this->pk = 'zahlungstyp_kurzbz'; + } +} diff --git a/application/models/codex/Akadgrad_model.php b/application/models/codex/Akadgrad_model.php new file mode 100644 index 000000000..0623ef3ab --- /dev/null +++ b/application/models/codex/Akadgrad_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_akadgrad'; + $this->pk = 'akadgrad_id'; + } +} diff --git a/application/models/codex/Archiv_model.php b/application/models/codex/Archiv_model.php new file mode 100644 index 000000000..45cde5a00 --- /dev/null +++ b/application/models/codex/Archiv_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_archiv'; + $this->pk = 'archiv_id'; + } +} diff --git a/application/models/codex/Aufmerksamdurch_model.php b/application/models/codex/Aufmerksamdurch_model.php new file mode 100644 index 000000000..2c5f5d2c6 --- /dev/null +++ b/application/models/codex/Aufmerksamdurch_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_aufmerksamdurch'; + $this->pk = 'aufmerksamdurch_kurzbz'; + } +} diff --git a/application/models/codex/Ausbildung_model.php b/application/models/codex/Ausbildung_model.php new file mode 100644 index 000000000..8cadcb92d --- /dev/null +++ b/application/models/codex/Ausbildung_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_ausbildung'; + $this->pk = 'ausbildungcode'; + } +} diff --git a/application/models/codex/Berufstaetigkeit_model.php b/application/models/codex/Berufstaetigkeit_model.php new file mode 100644 index 000000000..59b39d775 --- /dev/null +++ b/application/models/codex/Berufstaetigkeit_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_berufstaetigkeit'; + $this->pk = 'berufstaetigkeit_code'; + } +} diff --git a/application/models/codex/Beschaeftigungsausmass_model.php b/application/models/codex/Beschaeftigungsausmass_model.php new file mode 100644 index 000000000..3b54fa310 --- /dev/null +++ b/application/models/codex/Beschaeftigungsausmass_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_beschaeftigungsausmass'; + $this->pk = 'beschausmasscode'; + } +} diff --git a/application/models/codex/Besqual_model.php b/application/models/codex/Besqual_model.php new file mode 100644 index 000000000..b89cb123a --- /dev/null +++ b/application/models/codex/Besqual_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_besqual'; + $this->pk = 'besqualcode'; + } +} diff --git a/application/models/codex/Bisfunktion_model.php b/application/models/codex/Bisfunktion_model.php new file mode 100644 index 000000000..72135ecc0 --- /dev/null +++ b/application/models/codex/Bisfunktion_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisfunktion'; + $this->pk = array('studiengang_kz', 'bisverwendung_id'); + } +} diff --git a/application/models/codex/Bisio_model.php b/application/models/codex/Bisio_model.php new file mode 100644 index 000000000..5f35aec9a --- /dev/null +++ b/application/models/codex/Bisio_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisio'; + $this->pk = 'bisio_id'; + } +} diff --git a/application/models/codex/Bisorgform_model.php b/application/models/codex/Bisorgform_model.php new file mode 100644 index 000000000..c489c849c --- /dev/null +++ b/application/models/codex/Bisorgform_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisorgform'; + $this->pk = 'bisorgform_kurzbz'; + } +} diff --git a/application/models/codex/Bisverwendung_model.php b/application/models/codex/Bisverwendung_model.php new file mode 100644 index 000000000..fa2cf84d0 --- /dev/null +++ b/application/models/codex/Bisverwendung_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisverwendung'; + $this->pk = 'bisverwendung_id'; + } +} diff --git a/application/models/codex/Bundesland_model.php b/application/models/codex/Bundesland_model.php new file mode 100644 index 000000000..03a4774ce --- /dev/null +++ b/application/models/codex/Bundesland_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bundesland'; + $this->pk = 'bundesland_code'; + } +} diff --git a/application/models/codex/Entwicklungsteam_model.php b/application/models/codex/Entwicklungsteam_model.php new file mode 100644 index 000000000..5cf21c23b --- /dev/null +++ b/application/models/codex/Entwicklungsteam_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_entwicklungsteam'; + $this->pk = array('studiengang_kz', 'mitarbeiter_uid'); + } +} diff --git a/application/models/codex/Gemeinde_model.php b/application/models/codex/Gemeinde_model.php new file mode 100644 index 000000000..c782346a0 --- /dev/null +++ b/application/models/codex/Gemeinde_model.php @@ -0,0 +1,22 @@ +dbTable = "bis.tbl_gemeinde"; + $this->pk = "gemeinde_id"; + } + + public function getGemeindeByPlz($plz) + { + $this->addSelect("DISTINCT ON (ortschaftsname) ortschaftsname, gemeinde_id, plz, name, ortschaftskennziffer, bulacode, bulabez, kennziffer"); + $this->addOrder("ortschaftsname"); + + return $this->loadWhere(array("plz" => $plz)); + } +} \ No newline at end of file diff --git a/application/models/codex/Hauptberuf_model.php b/application/models/codex/Hauptberuf_model.php new file mode 100644 index 000000000..7ae7ee44d --- /dev/null +++ b/application/models/codex/Hauptberuf_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_hauptberuf'; + $this->pk = 'hauptberufcode'; + } +} diff --git a/application/models/codex/Lehrform_model.php b/application/models/codex/Lehrform_model.php new file mode 100644 index 000000000..dc53b3085 --- /dev/null +++ b/application/models/codex/Lehrform_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_lehrform'; + $this->pk = 'lehrform_kurzbz'; + } +} diff --git a/application/models/codex/Lgartcode_model.php b/application/models/codex/Lgartcode_model.php new file mode 100644 index 000000000..a2c09c00e --- /dev/null +++ b/application/models/codex/Lgartcode_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_lgartcode'; + $this->pk = 'lgartcode'; + } +} diff --git a/application/models/codex/Mobilitaetsprogramm_model.php b/application/models/codex/Mobilitaetsprogramm_model.php new file mode 100644 index 000000000..5fd46e725 --- /dev/null +++ b/application/models/codex/Mobilitaetsprogramm_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_mobilitaetsprogramm'; + $this->pk = 'mobilitaetsprogramm_code'; + } +} diff --git a/application/models/codex/Nation_model.php b/application/models/codex/Nation_model.php new file mode 100644 index 000000000..239639795 --- /dev/null +++ b/application/models/codex/Nation_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_nation'; + $this->pk = 'nation_code'; + } +} \ No newline at end of file diff --git a/application/models/codex/Note_model.php b/application/models/codex/Note_model.php new file mode 100644 index 000000000..e83ee2f48 --- /dev/null +++ b/application/models/codex/Note_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_note'; + $this->pk = 'note'; + } +} diff --git a/application/models/codex/Verwendung_model.php b/application/models/codex/Verwendung_model.php new file mode 100644 index 000000000..509b0388b --- /dev/null +++ b/application/models/codex/Verwendung_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_verwendung'; + $this->pk = 'verwendung_code'; + } +} diff --git a/application/models/codex/Zgv_model.php b/application/models/codex/Zgv_model.php new file mode 100644 index 000000000..1e1ba99ad --- /dev/null +++ b/application/models/codex/Zgv_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_zgv'; + $this->pk = 'zgv_code'; + } +} diff --git a/application/models/codex/Zgvdoktor_model.php b/application/models/codex/Zgvdoktor_model.php new file mode 100644 index 000000000..8caf397e0 --- /dev/null +++ b/application/models/codex/Zgvdoktor_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_zgvdoktor'; + $this->pk = 'zgvdoktor_code'; + } +} diff --git a/application/models/codex/Zgvgruppe_model.php b/application/models/codex/Zgvgruppe_model.php new file mode 100644 index 000000000..69da70271 --- /dev/null +++ b/application/models/codex/Zgvgruppe_model.php @@ -0,0 +1,13 @@ +dbTable = 'bis.tbl_zgvgruppe'; + $this->pk = 'gruppe_kurzbz'; + } +} \ No newline at end of file diff --git a/application/models/codex/Zgvmaster_model.php b/application/models/codex/Zgvmaster_model.php new file mode 100644 index 000000000..38f8a0dcb --- /dev/null +++ b/application/models/codex/Zgvmaster_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_zgvmaster'; + $this->pk = 'zgvmas_code'; + } +} diff --git a/application/models/codex/Zweck_model.php b/application/models/codex/Zweck_model.php new file mode 100644 index 000000000..600e9fb40 --- /dev/null +++ b/application/models/codex/Zweck_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_zweck'; + $this->pk = 'zweck_code'; + } +} diff --git a/application/models/content/Content_model.php b/application/models/content/Content_model.php new file mode 100644 index 000000000..ee4315ebd --- /dev/null +++ b/application/models/content/Content_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_content'; + $this->pk = 'content_id'; + } +} diff --git a/application/models/content/Contentchild_model.php b/application/models/content/Contentchild_model.php new file mode 100644 index 000000000..11738d144 --- /dev/null +++ b/application/models/content/Contentchild_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_contentchild'; + $this->pk = 'contentchild_id'; + } +} diff --git a/application/models/content/Contentgruppe_model.php b/application/models/content/Contentgruppe_model.php new file mode 100644 index 000000000..03efc87b1 --- /dev/null +++ b/application/models/content/Contentgruppe_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_contentgruppe'; + $this->pk = array('gruppe_kurzbz', 'content_id'); + } +} diff --git a/application/models/content/Contentlog_model.php b/application/models/content/Contentlog_model.php new file mode 100644 index 000000000..025cb94aa --- /dev/null +++ b/application/models/content/Contentlog_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_contentlog'; + $this->pk = 'contentlog_id'; + } +} diff --git a/application/models/content/Contentsprache_model.php b/application/models/content/Contentsprache_model.php new file mode 100644 index 000000000..eb7e257b2 --- /dev/null +++ b/application/models/content/Contentsprache_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_contentsprache'; + $this->pk = 'contentsprache_id'; + } +} diff --git a/application/models/content/Infoscreen_model.php b/application/models/content/Infoscreen_model.php new file mode 100644 index 000000000..c4134ff06 --- /dev/null +++ b/application/models/content/Infoscreen_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_infoscreen'; + $this->pk = 'infoscreen_id'; + } +} diff --git a/application/models/content/News_model.php b/application/models/content/News_model.php new file mode 100644 index 000000000..8d636d808 --- /dev/null +++ b/application/models/content/News_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_news'; + $this->pk = 'news_id'; + } +} diff --git a/application/models/content/Template_model.php b/application/models/content/Template_model.php new file mode 100644 index 000000000..6f452e23c --- /dev/null +++ b/application/models/content/Template_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_template'; + $this->pk = 'template_kurzbz'; + } +} diff --git a/application/models/content/Veranstaltung_model.php b/application/models/content/Veranstaltung_model.php new file mode 100644 index 000000000..48e7bc2cc --- /dev/null +++ b/application/models/content/Veranstaltung_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_veranstaltung'; + $this->pk = 'veranstaltung_id'; + } +} diff --git a/application/models/content/Veranstaltungskategorie_model.php b/application/models/content/Veranstaltungskategorie_model.php new file mode 100644 index 000000000..85d069735 --- /dev/null +++ b/application/models/content/Veranstaltungskategorie_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_veranstaltungskategorie'; + $this->pk = 'veranstaltungskategorie_kurzbz'; + } +} diff --git a/application/models/crm/Aufnahmeschluessel_model.php b/application/models/crm/Aufnahmeschluessel_model.php new file mode 100644 index 000000000..df74791bb --- /dev/null +++ b/application/models/crm/Aufnahmeschluessel_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_aufnahmeschluessel'; + $this->pk = 'aufnahmeschluessel'; + } +} diff --git a/application/models/crm/Bewerbungstermine_model.php b/application/models/crm/Bewerbungstermine_model.php new file mode 100644 index 000000000..74326a702 --- /dev/null +++ b/application/models/crm/Bewerbungstermine_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_bewerbungstermine'; + $this->pk = 'bewerbungstermin_id'; + } +} diff --git a/application/models/crm/Buchungstyp_model.php b/application/models/crm/Buchungstyp_model.php new file mode 100644 index 000000000..f06e45eb2 --- /dev/null +++ b/application/models/crm/Buchungstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_buchungstyp'; + $this->pk = 'buchungstyp_kurzbz'; + } +} diff --git a/application/models/crm/Dokument_model.php b/application/models/crm/Dokument_model.php new file mode 100644 index 000000000..7ef2be716 --- /dev/null +++ b/application/models/crm/Dokument_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_dokument'; + $this->pk = 'dokument_kurzbz'; + } +} diff --git a/application/models/crm/Dokumentprestudent_model.php b/application/models/crm/Dokumentprestudent_model.php new file mode 100644 index 000000000..ab4764479 --- /dev/null +++ b/application/models/crm/Dokumentprestudent_model.php @@ -0,0 +1,71 @@ +dbTable = 'public.tbl_dokumentprestudent'; + $this->pk = array('prestudent_id', 'dokument_kurzbz'); + } + + /** + * setAccepted + */ + public function setAccepted($prestudent_id, $studiengang_kz) + { + $result = null; + + if (is_numeric($prestudent_id) && is_numeric($studiengang_kz)) + { + $query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) ( + SELECT ds.dokument_kurzbz, + p.prestudent_id, + NOW() AS insertamum + FROM (SELECT DISTINCT person_id, dokument_kurzbz FROM public.tbl_akte) a + INNER JOIN public.tbl_prestudent p USING(person_id) + INNER JOIN public.tbl_dokumentstudiengang ds USING(dokument_kurzbz, studiengang_kz) + LEFT JOIN public.tbl_dokumentprestudent dp USING(dokument_kurzbz, prestudent_id) + WHERE ds.onlinebewerbung IS TRUE + AND (dp.dokument_kurzbz IS NULL AND dp.prestudent_id IS NULL) + AND p.prestudent_id = ? + AND ds.studiengang_kz = ? + )'; + + $result = $this->execQuery($query, array($prestudent_id, $studiengang_kz)); + } + + return $result; + } + + /** + * setAcceptedDocuments + */ + public function setAcceptedDocuments($prestudent_id, $dokument_kurzbz) + { + $result = null; + + if (is_numeric($prestudent_id) && is_array($dokument_kurzbz) && count($dokument_kurzbz) > 0) + { + $query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) ( + SELECT d.dokument_kurzbz, + ? AS prestudent_id, + NOW() AS insertamum + FROM public.tbl_dokument d + WHERE d.dokument_kurzbz IN ? + AND d.dokument_kurzbz NOT IN ( + SELECT dokument_kurzbz + FROM public.tbl_dokumentprestudent + WHERE prestudent_id = ? + ) + )'; + + $result = $this->execQuery($query, array($prestudent_id, $dokument_kurzbz, $prestudent_id)); + } + + return $result; + } +} diff --git a/application/models/crm/Konto_model.php b/application/models/crm/Konto_model.php new file mode 100644 index 000000000..286d3189e --- /dev/null +++ b/application/models/crm/Konto_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_konto'; + $this->pk = 'buchungsnr'; + } +} diff --git a/application/models/crm/Preincoming_model.php b/application/models/crm/Preincoming_model.php new file mode 100644 index 000000000..f9906781f --- /dev/null +++ b/application/models/crm/Preincoming_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_preincoming'; + $this->pk = 'preincoming_id'; + } +} diff --git a/application/models/crm/Preinteressent_model.php b/application/models/crm/Preinteressent_model.php new file mode 100644 index 000000000..bfc2a8afa --- /dev/null +++ b/application/models/crm/Preinteressent_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_preinteressent'; + $this->pk = 'preinteressent_id'; + } +} diff --git a/application/models/crm/Preinteressentstudiengang_model.php b/application/models/crm/Preinteressentstudiengang_model.php new file mode 100644 index 000000000..4ed665840 --- /dev/null +++ b/application/models/crm/Preinteressentstudiengang_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_preinteressentstudiengang'; + $this->pk = array('preinteressent_id', 'studiengang_kz'); + } +} diff --git a/application/models/crm/Preoutgoing_model.php b/application/models/crm/Preoutgoing_model.php new file mode 100644 index 000000000..e9e8e76fd --- /dev/null +++ b/application/models/crm/Preoutgoing_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_preoutgoing'; + $this->pk = 'preoutgoing_id'; + } +} diff --git a/application/models/crm/Student_model.php b/application/models/crm/Student_model.php new file mode 100644 index 000000000..532658208 --- /dev/null +++ b/application/models/crm/Student_model.php @@ -0,0 +1,48 @@ +dbTable = 'public.tbl_student'; + $this->pk = array('student_uid'); + $this->hasSequence = false; + } + + // **** + // * Generiert die Matrikelnummer + // * FORMAT: 0710254001 + // * 07 = Jahr + // * 1/2/0 = WS/SS/incoming + // * 0254 = Studiengangskennzahl vierstellig + // * 001 = Laufende Nummer + // **** + public function generateMatrikelnummer($studiengang_kz, $studiensemester_kurzbz) + { + $jahr = mb_substr($studiensemester_kurzbz, 4); + $sem = mb_substr($studiensemester_kurzbz, 0, 2); + if ($sem == 'SS') + $jahr = $jahr - 1; + $art = 0; + + $matrikelnummer = sprintf("%02d", $jahr).$art.sprintf("%04d", $studiengang_kz); + + $qry = "SELECT matrikelnr FROM public.tbl_student WHERE matrikelnr LIKE ? ORDER BY matrikelnr DESC LIMIT 1"; + + $matrikelnrres = $this->execQuery($qry, array($matrikelnummer.'%')); + + if (hasData($matrikelnrres)) + { + $max = mb_substr($matrikelnrres->retval[0]->matrikelnr, 7); + } + else + $max = 0; + + $max += 1; + return $matrikelnummer.sprintf("%03d", $max); + } +} diff --git a/application/models/education/Uebung_model.php b/application/models/education/Uebung_model.php new file mode 100644 index 000000000..199328225 --- /dev/null +++ b/application/models/education/Uebung_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_uebung'; + $this->pk = 'uebung_id'; + } +} diff --git a/application/models/organisation/Erhalter_model.php b/application/models/organisation/Erhalter_model.php new file mode 100644 index 000000000..607d9ccd9 --- /dev/null +++ b/application/models/organisation/Erhalter_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_erhalter'; + $this->pk = 'erhalter_kz'; + } +} diff --git a/application/models/organisation/Fachbereich_model.php b/application/models/organisation/Fachbereich_model.php new file mode 100644 index 000000000..e69565364 --- /dev/null +++ b/application/models/organisation/Fachbereich_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_fachbereich'; + $this->pk = 'fachbereich_kurzbz'; + } +} diff --git a/application/models/organisation/Ferien_model.php b/application/models/organisation/Ferien_model.php new file mode 100644 index 000000000..2ade75aa4 --- /dev/null +++ b/application/models/organisation/Ferien_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_ferien'; + $this->pk = array('studiengang_kz', 'bezeichnung'); + } +} diff --git a/application/models/organisation/Lehrverband_model.php b/application/models/organisation/Lehrverband_model.php new file mode 100644 index 000000000..953e4b7b2 --- /dev/null +++ b/application/models/organisation/Lehrverband_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_lehrverband'; + $this->pk = array('gruppe', 'verband', 'semester', 'studiengang_kz'); + } +} diff --git a/application/models/organisation/Organisationseinheittyp_model.php b/application/models/organisation/Organisationseinheittyp_model.php new file mode 100644 index 000000000..6355758b6 --- /dev/null +++ b/application/models/organisation/Organisationseinheittyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_organisationseinheittyp'; + $this->pk = 'organisationseinheittyp_kurzbz'; + } +} diff --git a/application/models/organisation/Semesterwochen_model.php b/application/models/organisation/Semesterwochen_model.php new file mode 100644 index 000000000..32666804d --- /dev/null +++ b/application/models/organisation/Semesterwochen_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_semesterwochen'; + $this->pk = array('studiengang_kz', 'semester'); + } +} diff --git a/application/models/organisation/Service_model.php b/application/models/organisation/Service_model.php new file mode 100644 index 000000000..5f692e707 --- /dev/null +++ b/application/models/organisation/Service_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_service'; + $this->pk = 'service_id'; + } +} diff --git a/application/models/organisation/Standort_model.php b/application/models/organisation/Standort_model.php new file mode 100644 index 000000000..382236e2f --- /dev/null +++ b/application/models/organisation/Standort_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_standort'; + $this->pk = 'standort_id'; + } +} diff --git a/application/models/organisation/Statistik_model.php b/application/models/organisation/Statistik_model.php new file mode 100644 index 000000000..b72ac0577 --- /dev/null +++ b/application/models/organisation/Statistik_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_statistik'; + $this->pk = 'statistik_kurzbz'; + } +} diff --git a/application/models/organisation/Studiengangstyp_model.php b/application/models/organisation/Studiengangstyp_model.php new file mode 100644 index 000000000..9a6b5df22 --- /dev/null +++ b/application/models/organisation/Studiengangstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_studiengangstyp'; + $this->pk = 'typ'; + } +} diff --git a/application/models/organisation/Studienordnung_model.php b/application/models/organisation/Studienordnung_model.php new file mode 100644 index 000000000..fc2e28d4b --- /dev/null +++ b/application/models/organisation/Studienordnung_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_studienordnung'; + $this->pk = 'studienordnung_id'; + } +} diff --git a/application/models/organisation/Studienordnungstatus_model.php b/application/models/organisation/Studienordnungstatus_model.php new file mode 100644 index 000000000..8b6417ab1 --- /dev/null +++ b/application/models/organisation/Studienordnungstatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_studienordnungstatus'; + $this->pk = 'status_kurzbz'; + } +} diff --git a/application/models/organisation/Studienplatz_model.php b/application/models/organisation/Studienplatz_model.php new file mode 100644 index 000000000..7bfd8b13b --- /dev/null +++ b/application/models/organisation/Studienplatz_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_studienplatz'; + $this->pk = 'studienplatz_id'; + } +} diff --git a/application/models/person/Bankverbindung_model.php b/application/models/person/Bankverbindung_model.php new file mode 100644 index 000000000..193aad257 --- /dev/null +++ b/application/models/person/Bankverbindung_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_bankverbindung'; + $this->pk = 'bankverbindung_id'; + } +} diff --git a/application/models/person/Benutzergruppe_model.php b/application/models/person/Benutzergruppe_model.php new file mode 100644 index 000000000..e569094c4 --- /dev/null +++ b/application/models/person/Benutzergruppe_model.php @@ -0,0 +1,15 @@ +dbTable = 'public.tbl_benutzergruppe'; + $this->pk = array('gruppe_kurzbz', 'uid'); + $this->hasSequence = false; + } +} diff --git a/application/models/person/Fotostatus_model.php b/application/models/person/Fotostatus_model.php new file mode 100644 index 000000000..eb2b43e51 --- /dev/null +++ b/application/models/person/Fotostatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_fotostatus'; + $this->pk = 'fotostatus_kurzbz'; + } +} diff --git a/application/models/person/Freebusy_model.php b/application/models/person/Freebusy_model.php new file mode 100644 index 000000000..01969dfc1 --- /dev/null +++ b/application/models/person/Freebusy_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_freebusy'; + $this->pk = 'freebusy_id'; + } +} diff --git a/application/models/person/Freebusytyp_model.php b/application/models/person/Freebusytyp_model.php new file mode 100644 index 000000000..d5207850c --- /dev/null +++ b/application/models/person/Freebusytyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_freebusytyp'; + $this->pk = 'freebusytyp_kurzbz'; + } +} diff --git a/application/models/person/Kontaktmedium_model.php b/application/models/person/Kontaktmedium_model.php new file mode 100644 index 000000000..cc330ddd7 --- /dev/null +++ b/application/models/person/Kontaktmedium_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_kontaktmedium'; + $this->pk = 'kontaktmedium_kurzbz'; + } +} diff --git a/application/models/person/Kontakttyp_model.php b/application/models/person/Kontakttyp_model.php new file mode 100644 index 000000000..d32cded13 --- /dev/null +++ b/application/models/person/Kontakttyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_kontakttyp'; + $this->pk = 'kontakttyp'; + } +} diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index a66a881c2..a5453aaa1 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -11,7 +11,7 @@ class Notiz_model extends DB_Model $this->dbTable = 'public.tbl_notiz'; $this->pk = 'notiz_id'; } - + // ------------------------------------------------------------------------------------------------------ /** * Get a specialization for a prestudent @@ -20,10 +20,10 @@ class Notiz_model extends DB_Model { // Join with the table public.tbl_notizzuordnung using notiz_id $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); - + return $this->NotizModel->loadWhere(array('prestudent_id' => $prestudent_id, 'titel' => $titel)); } - + /** * Remove a specialization */ @@ -31,31 +31,31 @@ class Notiz_model extends DB_Model { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); - + // Start DB transaction $this->db->trans_start(false); - + $result = $this->delete(array('notiz_id' => $notiz_id)); if (isSuccess($result)) { $result = $this->NotizzuordnungModel->delete(array('notiz_id' => $notiz_id)); } - + // Transaction complete! $this->db->trans_complete(); - + // Check if everything went ok during the transaction if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error('An error occurred while removing a specialization', EXIT_ERROR); + $result = error($result->msg, EXIT_ERROR); } else { $this->db->trans_commit(); $result = success('Specialization successfully removed'); } - + return $result; } @@ -66,32 +66,32 @@ class Notiz_model extends DB_Model { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); - + // Start DB transaction $this->db->trans_start(false); - + $result = $this->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => true)); $notiz_id = $result->retval; if (isSuccess($result)) { $result = $this->NotizzuordnungModel->insert(array('notiz_id' => $notiz_id, 'prestudent_id' => $prestudent_id)); } - + // Transaction complete! $this->db->trans_complete(); - + // Check if everything went ok during the transaction if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error('An error occurred while adding a specialization', EXIT_ERROR); + $result = error($result->msg, EXIT_ERROR); } else { $this->db->trans_commit(); $result = success($notiz_id); } - + return $result; } @@ -122,7 +122,7 @@ class Notiz_model extends DB_Model if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error('An error occurred while adding a note for a person', EXIT_ERROR); + $result = error($result->msg, EXIT_ERROR); } else { diff --git a/application/models/person/Notizzuordnung_model.php b/application/models/person/Notizzuordnung_model.php new file mode 100644 index 000000000..187a8399b --- /dev/null +++ b/application/models/person/Notizzuordnung_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_notizzuordnung'; + $this->pk = 'notizzuordnung_id'; + } +} diff --git a/application/models/project/Aktivitaet_model.php b/application/models/project/Aktivitaet_model.php new file mode 100644 index 000000000..529040aa3 --- /dev/null +++ b/application/models/project/Aktivitaet_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_aktivitaet'; + $this->pk = 'aktivitaet_kurzbz'; + } +} diff --git a/application/models/project/Aufwandstyp_model.php b/application/models/project/Aufwandstyp_model.php new file mode 100644 index 000000000..2f20600ce --- /dev/null +++ b/application/models/project/Aufwandstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_aufwandstyp'; + $this->pk = 'aufwandstyp_kurzbz'; + } +} diff --git a/application/models/project/Projekt_ressource_model.php b/application/models/project/Projekt_ressource_model.php new file mode 100644 index 000000000..d641556fd --- /dev/null +++ b/application/models/project/Projekt_ressource_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_projekt_ressource'; + $this->pk = 'projekt_ressource_id'; + } +} diff --git a/application/models/project/Projektphase_model.php b/application/models/project/Projektphase_model.php new file mode 100644 index 000000000..4980ed64b --- /dev/null +++ b/application/models/project/Projektphase_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_projektphase'; + $this->pk = 'projektphase_id'; + } +} diff --git a/application/models/project/Projekttask_model.php b/application/models/project/Projekttask_model.php new file mode 100644 index 000000000..64ea94089 --- /dev/null +++ b/application/models/project/Projekttask_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_projekttask'; + $this->pk = 'projekttask_id'; + } +} diff --git a/application/models/project/Ressource_model.php b/application/models/project/Ressource_model.php new file mode 100644 index 000000000..35eb4eb97 --- /dev/null +++ b/application/models/project/Ressource_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_ressource'; + $this->pk = 'ressource_id'; + } +} diff --git a/application/models/project/Scrumsprint_model.php b/application/models/project/Scrumsprint_model.php new file mode 100644 index 000000000..c2c8a60a1 --- /dev/null +++ b/application/models/project/Scrumsprint_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_scrumsprint'; + $this->pk = 'scrumsprint_id'; + } +} diff --git a/application/models/ressource/Betriebsmittel_model.php b/application/models/ressource/Betriebsmittel_model.php new file mode 100644 index 000000000..849a9199f --- /dev/null +++ b/application/models/ressource/Betriebsmittel_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_betriebsmittel'; + $this->pk = 'betriebsmittel_id'; + } +} diff --git a/application/models/ressource/Betriebsmittelperson_model.php b/application/models/ressource/Betriebsmittelperson_model.php new file mode 100644 index 000000000..924f670e0 --- /dev/null +++ b/application/models/ressource/Betriebsmittelperson_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_betriebsmittelperson'; + $this->pk = 'betriebsmittelperson_id'; + } +} diff --git a/application/models/ressource/Betriebsmittelstatus_model.php b/application/models/ressource/Betriebsmittelstatus_model.php new file mode 100644 index 000000000..7b4f70c59 --- /dev/null +++ b/application/models/ressource/Betriebsmittelstatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_betriebsmittelstatus'; + $this->pk = 'betriebsmittelstatus_kurzbz'; + } +} diff --git a/application/models/ressource/Betriebsmitteltyp_model.php b/application/models/ressource/Betriebsmitteltyp_model.php new file mode 100644 index 000000000..23bec97a8 --- /dev/null +++ b/application/models/ressource/Betriebsmitteltyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_betriebsmitteltyp'; + $this->pk = 'betriebsmitteltyp'; + } +} diff --git a/application/models/ressource/Coodle_model.php b/application/models/ressource/Coodle_model.php new file mode 100644 index 000000000..1382bf7a0 --- /dev/null +++ b/application/models/ressource/Coodle_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_coodle'; + $this->pk = 'coodle_id'; + } +} diff --git a/application/models/ressource/Erreichbarkeit_model.php b/application/models/ressource/Erreichbarkeit_model.php new file mode 100644 index 000000000..b16b1614f --- /dev/null +++ b/application/models/ressource/Erreichbarkeit_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_erreichbarkeit'; + $this->pk = 'erreichbarkeit_kurzbz'; + } +} diff --git a/application/models/ressource/Firma_model.php b/application/models/ressource/Firma_model.php new file mode 100644 index 000000000..1b8dfb51d --- /dev/null +++ b/application/models/ressource/Firma_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_firma'; + $this->pk = 'firma_id'; + } +} diff --git a/application/models/ressource/Firmatag_model.php b/application/models/ressource/Firmatag_model.php new file mode 100644 index 000000000..582ea0679 --- /dev/null +++ b/application/models/ressource/Firmatag_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_firmatag'; + $this->pk = array('tag', 'firma_id'); + } +} diff --git a/application/models/ressource/Firmentyp_model.php b/application/models/ressource/Firmentyp_model.php new file mode 100644 index 000000000..a9aa93705 --- /dev/null +++ b/application/models/ressource/Firmentyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_firmentyp'; + $this->pk = 'firmentyp_kurzbz'; + } +} diff --git a/application/models/ressource/Funktion_model.php b/application/models/ressource/Funktion_model.php new file mode 100644 index 000000000..43908167c --- /dev/null +++ b/application/models/ressource/Funktion_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_funktion'; + $this->pk = 'funktion_kurzbz'; + } +} diff --git a/application/models/ressource/Lehrmittel_model.php b/application/models/ressource/Lehrmittel_model.php new file mode 100644 index 000000000..b21e91764 --- /dev/null +++ b/application/models/ressource/Lehrmittel_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_lehrmittel'; + $this->pk = 'lehrmittel_kurzbz'; + } +} diff --git a/application/models/ressource/Mitarbeiter_model.php b/application/models/ressource/Mitarbeiter_model.php new file mode 100644 index 000000000..1e03a0ecd --- /dev/null +++ b/application/models/ressource/Mitarbeiter_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_mitarbeiter'; + $this->pk = 'mitarbeiter_uid'; + } +} diff --git a/application/models/ressource/Ort_model.php b/application/models/ressource/Ort_model.php new file mode 100644 index 000000000..59b213a54 --- /dev/null +++ b/application/models/ressource/Ort_model.php @@ -0,0 +1,23 @@ +dbTable = "public.tbl_ort"; + $this->pk = "ort_kurzbz"; + } + + public function getAll($raumtyp_kurzbz) + { + $this->addOrder("ort_kurzbz"); + + $this->addJoin("public.tbl_ortraumtyp", "ort_kurzbz"); + + return $this->OrtModel->loadWhere(array("raumtyp_kurzbz" => $raumtyp_kurzbz)); + } +} \ No newline at end of file diff --git a/application/models/ressource/Ortraumtyp_model.php b/application/models/ressource/Ortraumtyp_model.php new file mode 100644 index 000000000..af0d3cb09 --- /dev/null +++ b/application/models/ressource/Ortraumtyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_ortraumtyp'; + $this->pk = array('hierarchie', 'ort_kurzbz'); + } +} diff --git a/application/models/ressource/Personfunktionstandort_model.php b/application/models/ressource/Personfunktionstandort_model.php new file mode 100644 index 000000000..addbb760a --- /dev/null +++ b/application/models/ressource/Personfunktionstandort_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_personfunktionstandort'; + $this->pk = 'personfunktionstandort_id'; + } +} diff --git a/application/models/ressource/Raumtyp_model.php b/application/models/ressource/Raumtyp_model.php new file mode 100644 index 000000000..afc8a7cc3 --- /dev/null +++ b/application/models/ressource/Raumtyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_raumtyp'; + $this->pk = 'raumtyp_kurzbz'; + } +} diff --git a/application/models/ressource/Reservierung_model.php b/application/models/ressource/Reservierung_model.php new file mode 100644 index 000000000..37d0cb376 --- /dev/null +++ b/application/models/ressource/Reservierung_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_reservierung'; + $this->pk = 'reservierung_id'; + } +} diff --git a/application/models/ressource/Stunde_model.php b/application/models/ressource/Stunde_model.php new file mode 100644 index 000000000..05a9cddff --- /dev/null +++ b/application/models/ressource/Stunde_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_stunde'; + $this->pk = 'stunde'; + } +} diff --git a/application/models/ressource/Stundenplan_model.php b/application/models/ressource/Stundenplan_model.php new file mode 100644 index 000000000..be3d520b5 --- /dev/null +++ b/application/models/ressource/Stundenplan_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_stundenplan'; + $this->pk = 'stundenplan_id'; + } +} diff --git a/application/models/ressource/Zeitaufzeichnung_model.php b/application/models/ressource/Zeitaufzeichnung_model.php new file mode 100644 index 000000000..f887a20a0 --- /dev/null +++ b/application/models/ressource/Zeitaufzeichnung_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitaufzeichnung'; + $this->pk = 'zeitaufzeichnung_id'; + } +} diff --git a/application/models/ressource/Zeitsperre_model.php b/application/models/ressource/Zeitsperre_model.php new file mode 100644 index 000000000..07889e349 --- /dev/null +++ b/application/models/ressource/Zeitsperre_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitsperre'; + $this->pk = 'zeitsperre_id'; + } +} diff --git a/application/models/ressource/Zeitsperretyp_model.php b/application/models/ressource/Zeitsperretyp_model.php new file mode 100644 index 000000000..ef54571e8 --- /dev/null +++ b/application/models/ressource/Zeitsperretyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitsperretyp'; + $this->pk = 'zeitsperretyp_kurzbz'; + } +} diff --git a/application/models/ressource/Zeitwunsch_model.php b/application/models/ressource/Zeitwunsch_model.php new file mode 100644 index 000000000..ea2ec698a --- /dev/null +++ b/application/models/ressource/Zeitwunsch_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitwunsch'; + $this->pk = array('tag', 'mitarbeiter_uid', 'stunde'); + } +} diff --git a/application/models/system/Berechtigung_model.php b/application/models/system/Berechtigung_model.php new file mode 100644 index 000000000..9bd572614 --- /dev/null +++ b/application/models/system/Berechtigung_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_berechtigung'; + $this->pk = 'berechtigung_kurzbz'; + } +} diff --git a/application/models/system/Cronjob_model.php b/application/models/system/Cronjob_model.php new file mode 100644 index 000000000..e47ea5bef --- /dev/null +++ b/application/models/system/Cronjob_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_cronjob'; + $this->pk = 'cronjob_id'; + } +} diff --git a/application/models/system/Filter_model.php b/application/models/system/Filter_model.php new file mode 100644 index 000000000..5d44e0052 --- /dev/null +++ b/application/models/system/Filter_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_filter'; + $this->pk = 'filter_id'; + } +} diff --git a/application/models/system/Log_model.php b/application/models/system/Log_model.php new file mode 100644 index 000000000..8b27f6c53 --- /dev/null +++ b/application/models/system/Log_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_log'; + $this->pk = 'log_id'; + } +} diff --git a/application/models/system/Message_model.php b/application/models/system/Message_model.php index 6f2ad01e2..764c3ae14 100644 --- a/application/models/system/Message_model.php +++ b/application/models/system/Message_model.php @@ -151,7 +151,7 @@ class Message_model extends DB_Model } else { - return error($this->db->error(), EXIT_DATABASE); + return error($this->db->error(), FHC_DB_ERROR); } } @@ -168,7 +168,7 @@ class Message_model extends DB_Model } else { - return error($this->db->error(), EXIT_DATABASE); + return error($this->db->error(), FHC_DB_ERROR); } } diff --git a/application/models/system/PersonLock_model.php b/application/models/system/PersonLock_model.php new file mode 100644 index 000000000..1d106b789 --- /dev/null +++ b/application/models/system/PersonLock_model.php @@ -0,0 +1,88 @@ +dbTable = 'system.tbl_person_lock'; + $this->pk = 'lock_id'; + } + + /** + * Checks if a specific person is locked. By default, looks for entries with no app in locktable for the person. + * Alternatively, looks only for locks in a certain app. + * @param $person_id + * @param null $app + * @return array all locks for a person if locked, null otherwise + */ + public function checkIfLocked($person_id, $app = null) + { + $lockdata = array('person_id' => $person_id, 'app' => $app); + + $result = $this->loadWhere($lockdata); + + if ($result->error) + return error($result->retval); + + if (count($result->retval) > 0) + return success($result->retval); + else + return success(null); + } + + /** + * Locks a person. Returns null if person was not locked (e.g. when already locked). + * @param $person_id + * @param $uid user who locks the person + * @param $app optional, application in which person is locked + * @return array inserted lock id if person was locked, null otherwise + */ + public function lockPerson($person_id, $uid, $app = null) + { + $locked = $this->checkIfLocked($person_id, $app); + + if ($locked->error) + return error($locked->retval); + + //insert only if not already locked + if ($locked->retval === null) + return $this->insert(array('person_id' => $person_id, 'uid' => $uid, 'app' => $app)); + else + return success(null); + } + + /** + * Remove a lock for a person. By default, removes any entries in locktable for the person. + * Alternatively, removes only locks in a certain app. + * @param $person_id + * @param null $app + * @return array deleted lock ids if person was locked, null otherwise + */ + public function unlockPerson($person_id, $app = null) + { + $deleted = array(); + $locks = $this->checkIfLocked($person_id, $app); + + if ($locks->retval === null) + return success(null); + + foreach ($locks->retval as $lock) + { + $result = $this->delete($lock->lock_id); + if ($result->error) + return error($result->retval); + + $deleted[] = $lock; + } + + return success($deleted); + } +} diff --git a/application/models/system/Rolle_model.php b/application/models/system/Rolle_model.php new file mode 100644 index 000000000..5ba085853 --- /dev/null +++ b/application/models/system/Rolle_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_rolle'; + $this->pk = 'rolle_kurzbz'; + } +} diff --git a/application/models/system/Rolleberechtigung_model.php b/application/models/system/Rolleberechtigung_model.php new file mode 100644 index 000000000..0b08da1ca --- /dev/null +++ b/application/models/system/Rolleberechtigung_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_rolleberechtigung'; + $this->pk = array('rolle_kurzbz', 'berechtigung_kurzbz'); + } +} diff --git a/application/models/system/Server_model.php b/application/models/system/Server_model.php new file mode 100644 index 000000000..4521e1fd4 --- /dev/null +++ b/application/models/system/Server_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_server'; + $this->pk = 'server_kurzbz'; + } +} \ No newline at end of file diff --git a/application/models/system/Tag_model.php b/application/models/system/Tag_model.php new file mode 100644 index 000000000..94434da45 --- /dev/null +++ b/application/models/system/Tag_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_tag'; + $this->pk = 'tag'; + } +} diff --git a/application/models/system/Variable_model.php b/application/models/system/Variable_model.php new file mode 100644 index 000000000..9800999fe --- /dev/null +++ b/application/models/system/Variable_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_variable'; + $this->pk = array('uid', 'name'); + } +} diff --git a/application/models/system/Webservicelog_model.php b/application/models/system/Webservicelog_model.php new file mode 100644 index 000000000..dc45b13a7 --- /dev/null +++ b/application/models/system/Webservicelog_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_webservicelog'; + $this->pk = 'webservicelog_id'; + } +} diff --git a/application/models/system/Webservicerecht_model.php b/application/models/system/Webservicerecht_model.php new file mode 100644 index 000000000..a5bd036f0 --- /dev/null +++ b/application/models/system/Webservicerecht_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_webservicerecht'; + $this->pk = 'webservicerecht_id'; + } +} diff --git a/application/models/system/Webservicetyp_model.php b/application/models/system/Webservicetyp_model.php new file mode 100644 index 000000000..5d989de2a --- /dev/null +++ b/application/models/system/Webservicetyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_webservicetyp'; + $this->pk = 'webservicetyp_kurzbz'; + } +} diff --git a/application/models/testtool/Ablauf_model.php b/application/models/testtool/Ablauf_model.php new file mode 100644 index 000000000..748926658 --- /dev/null +++ b/application/models/testtool/Ablauf_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_ablauf'; + $this->pk = 'ablauf_id'; + } +} diff --git a/application/models/testtool/Antwort_model.php b/application/models/testtool/Antwort_model.php new file mode 100644 index 000000000..1594be6c3 --- /dev/null +++ b/application/models/testtool/Antwort_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_antwort'; + $this->pk = 'antwort_id'; + } +} diff --git a/application/models/testtool/Frage_model.php b/application/models/testtool/Frage_model.php new file mode 100644 index 000000000..de64c303b --- /dev/null +++ b/application/models/testtool/Frage_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_frage'; + $this->pk = 'frage_id'; + } +} diff --git a/application/models/testtool/Gebiet_model.php b/application/models/testtool/Gebiet_model.php new file mode 100644 index 000000000..202d6a4aa --- /dev/null +++ b/application/models/testtool/Gebiet_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_gebiet'; + $this->pk = 'gebiet_id'; + } +} diff --git a/application/models/testtool/Kategorie_model.php b/application/models/testtool/Kategorie_model.php new file mode 100644 index 000000000..10e450651 --- /dev/null +++ b/application/models/testtool/Kategorie_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_kategorie'; + $this->pk = 'kategorie_kurzbz'; + } +} diff --git a/application/models/testtool/Kriterien_model.php b/application/models/testtool/Kriterien_model.php new file mode 100644 index 000000000..83d0fb97c --- /dev/null +++ b/application/models/testtool/Kriterien_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_kriterien'; + $this->pk = 'kategorie_kurzbz'; + } +} diff --git a/application/models/testtool/Pruefling_model.php b/application/models/testtool/Pruefling_model.php new file mode 100644 index 000000000..da131ba4a --- /dev/null +++ b/application/models/testtool/Pruefling_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_pruefling'; + $this->pk = 'pruefling_id'; + } +} diff --git a/application/models/testtool/Vorschlag_model.php b/application/models/testtool/Vorschlag_model.php new file mode 100644 index 000000000..853852da2 --- /dev/null +++ b/application/models/testtool/Vorschlag_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_vorschlag'; + $this->pk = 'vorschlag_id'; + } +} diff --git a/application/widgets/Nation_widget.php b/application/widgets/Nation_widget.php index 79059c84f..c99ac9fef 100644 --- a/application/widgets/Nation_widget.php +++ b/application/widgets/Nation_widget.php @@ -5,7 +5,7 @@ class Nation_widget extends DropdownWidget public function display($widgetData) { // Nation - $this->load->model('codex/nation_model', 'NationModel'); + $this->load->model('codex/Nation_model', 'NationModel'); $this->NationModel->addOrder('nation_code'); $this->addSelectToModel($this->NationModel, 'nation_code', 'kurztext'); @@ -18,4 +18,4 @@ class Nation_widget extends DropdownWidget $this->loadDropDownView($widgetData); } -} \ No newline at end of file +} diff --git a/application/widgets/Zgv_widget.php b/application/widgets/Zgv_widget.php index b34bb27b6..f0af7b256 100644 --- a/application/widgets/Zgv_widget.php +++ b/application/widgets/Zgv_widget.php @@ -5,7 +5,7 @@ class Zgv_widget extends DropdownWidget public function display($widgetData) { // Zgv - $this->load->model('codex/zgv_model', 'ZgvModel'); + $this->load->model('codex/Zgv_model', 'ZgvModel'); $this->ZgvModel->addOrder('zgv_bez'); $this->addSelectToModel($this->ZgvModel, 'zgv_code', 'zgv_bez'); @@ -18,4 +18,4 @@ class Zgv_widget extends DropdownWidget $this->loadDropDownView($widgetData); } -} \ No newline at end of file +} From e1ed8b55f52ce61b2e39163297c6e49a33f119c8 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 26 Apr 2019 12:51:02 +0200 Subject: [PATCH 14/84] Fixed models --- application/models/CL/Messages_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php index 5a0a77a31..5f3f40e6d 100644 --- a/application/models/CL/Messages_model.php +++ b/application/models/CL/Messages_model.php @@ -1,10 +1,10 @@ Date: Mon, 6 May 2019 15:48:57 +0200 Subject: [PATCH 15/84] Translated new text components in RT-Tool starting page . Translated new text components into English. Now the starting page is available in German and English. . Minor HTML-tag correction at login.php. --- cis/testtool/frage.php | 2 -- cis/testtool/login.php | 61 ++++++++++++++++++++++----------------- locale/de-AT/testtool.php | 3 ++ locale/en-US/testtool.php | 5 +++- 4 files changed, 41 insertions(+), 30 deletions(-) diff --git a/cis/testtool/frage.php b/cis/testtool/frage.php index 95ff2e77c..ec1f57ca0 100644 --- a/cis/testtool/frage.php +++ b/cis/testtool/frage.php @@ -361,7 +361,6 @@ if($result_pruefling = $db->db_query($qry_pruefling)) { if($row_pruefling = $db->db_fetch_object($result_pruefling)) { - /*$info = "$row_pruefling->vorname $row_pruefling->nachname, $row_pruefling->bezeichnung $row_pruefling->stg_bez";*/ $info = "$row_pruefling->vorname $row_pruefling->nachname"; } } @@ -401,7 +400,6 @@ if($levelgebiet) '; $fortschrittsbalken .= ' '.$aktuell.' / '.$max.' ['.number_format($psolved,1,'.','').'%]'; - } //Zeit des Gebietes holen echo ' diff --git a/cis/testtool/login.php b/cis/testtool/login.php index 013bd137b..0ef8aab15 100644 --- a/cis/testtool/login.php +++ b/cis/testtool/login.php @@ -429,25 +429,26 @@ if (isset($prestudent_id)) '; echo '
    '; echo ' -

    Für folgende Studiengänge haben Sie sich zum Reihungstest angemeldet:


    - - - - - +

    '. $p->t('testtool/fuerFolgendeStgAngemeldet'). '


    + +
    Studiengang
    + + + - - - + + + + '; - // * wenn Prestudent an mehreren Bachelor-Studiengängen interessiert ist, dann alle STG anführen + // * wenn Prestudent an 1 - n Bachelor-Studiengängen interessiert ist, dann STG anführen if ($typ->typ == 'b') { - $ps_arr = new Prestudent(); - $ps_arr->getActualInteressenten($prestudent_id, false, 'b'); + $ps_arr = new Prestudent(); + $ps_arr->getActualInteressenten($prestudent_id, false, 'b'); - if (count($ps_arr->result) > 1) + if (count($ps_arr->result) > 0) { // Jeweils letzten Status ermitteln (ob Interessent oder Abgewiesener) foreach ($ps_arr->result as $ps_obj) @@ -473,13 +474,13 @@ if (isset($prestudent_id)) echo ''; if($ps_obj->ausbildungssemester == '1') { - echo ''; + echo ''; echo ''; } elseif($ps_obj->ausbildungssemester == '3') { - echo ''; - echo ''; + echo ''; + echo ''; } } // wenn letzter Status \'Abgewiesener\' ist, dann als solchen kennzeichnen @@ -492,14 +493,8 @@ if (isset($prestudent_id)) '; } echo ''; - } } - // * wenn Prestudent nur an einem Bachelor-Studiengang interessiert ist, dann nur den einen STG anführen - else - { - echo '>'; - } } // * wenn Prestudent an einem Master-Studiengang interessiert ist, dann nur den einen STG anführen else @@ -512,9 +507,10 @@ if (isset($prestudent_id)) echo ''; } - echo ' -
    '. $p->t('global/studiengang'). ' StatusReihungstest
    '. $p->t('testtool/reihungstest'). '
    '. $ps_obj->typ_bz .' '. ($sprache_user == 'English' ? $stg->english : $stg->bezeichnung). 'Regulärer Einstieg (1. Semester)'. $p->t('testtool/regulaererEinstieg'). ' (1. Semester)BasicQuereinsteiger (3.Semester)Basic + Quereinsteiger'. $p->t('testtool/Quereinsteiger'). ' (3.Semester)Basic + '. $p->t('testtool/Quereinsteiger'). '
    '. $typ->bezeichnung.' '.($sprache_user=='English'?$stg_obj->english:$stg_obj->bezeichnung).'Basic
    - '; + echo ' + + + '; echo '
    '; @@ -547,16 +543,27 @@ if (isset($prestudent_id)) { echo '

    '. $p->t('testtool/spracheDerTestfragen').':


    -
    '; while($row = $db->db_fetch_object($result)) { $selected = ($_SESSION['sprache'] == $row->sprache) ? 'active' : ''; + $row_sprache = $row->sprache; + if ($sprache_user == 'German') + { + if($row->sprache == 'English') + { + $row_sprache = 'Englisch'; + } + elseif ($row->sprache == 'German') + { + $row_sprache = 'Deutsch'; + } + } echo " "; } diff --git a/locale/de-AT/testtool.php b/locale/de-AT/testtool.php index ef01e13d6..497b3adf5 100644 --- a/locale/de-AT/testtool.php +++ b/locale/de-AT/testtool.php @@ -8,6 +8,8 @@ $this->phrasen['testtool/willkommenstextTitel']='Herzlich Willkommen zum Reihung $this->phrasen['testtool/willkommenstext']='Bitte warten Sie mit dem Login auf die Anweisung der Aufsichtsperson.

    Wir wünschen Ihnen einen erfolgreichen Start ins Studium.'; $this->phrasen['testtool/nameAuswaehlen']='Name auswählen...'; +$this->phrasen['testtool/reihungstest']= 'Reihungstest'; +$this->phrasen['testtool/regulaererEinstieg']='Regulärer Einstieg'; $this->phrasen['testtool/quereinstieg']='(Quereinstieg)'; $this->phrasen['testtool/quereinsteiger']='Quereinsteiger'; $this->phrasen['testtool/basic']='Basic'; @@ -43,4 +45,5 @@ $this->phrasen['testtool/dieseFrageIstNichtFuerSieBestimmt']='Diese Frage ist ni $this->phrasen['testtool/fehlerBeimSpeichernDerErstansicht']='Fehler beim Speichern der Erstansicht'; $this->phrasen['testtool/startDrueckenUmZuBeginnen']='Um dieses Teilgebiet zu starten, drücken Sie bitte links oben auf Gebiet starten.'; $this->phrasen['testtool/keinPrueflingseintragVorhanden']='Kein Prüflingseintrag vorhanden'; +$this->phrasen['testtool/fuerFolgendeStgAngemeldet']='Für folgende Studiengänge haben Sie sich angemeldet:'; ?> diff --git a/locale/en-US/testtool.php b/locale/en-US/testtool.php index d8154245e..d1339e65d 100644 --- a/locale/en-US/testtool.php +++ b/locale/en-US/testtool.php @@ -8,6 +8,8 @@ $this->phrasen['testtool/willkommenstextTitel']='Welcome to the placement test.' $this->phrasen['testtool/willkommenstext']='Please wait for the tutor\'s instructions before you log in.

    We wish you a good start to your studies.'; $this->phrasen['testtool/nameAuswaehlen']='Choose name...'; +$this->phrasen['testtool/reihungstest']= 'Placement test'; +$this->phrasen['testtool/regulaererEinstieg']='Regular entry'; $this->phrasen['testtool/quereinstieg']='(Lateral entry)'; $this->phrasen['testtool/quereinsteiger']='Lateral entry'; $this->phrasen['testtool/basic']='Basic'; @@ -16,7 +18,7 @@ $this->phrasen['testtool/reihungstestNichtFreigeschalten']='The entrance examina $this->phrasen['testtool/reihungstestKannNichtGeladenWerden']='The entrance examination assigned to you can not be loaded.'; $this->phrasen['testtool/geburtsdatumStimmtNichtUeberein']='Your date of birth does not correspond to the data we have. Please speak to the supervisor. '; $this->phrasen['testtool/home']='Home'; -$this->phrasen['testtool/klickenSieAufEinTeilgebiet']='Select a topic on the left side'; +$this->phrasen['testtool/klickenSieAufEinTeilgebiet']='Select a topic on the left side.
    '; $this->phrasen['testtool/gebietStarten']='Start section'; $this->phrasen['testtool/startseite']='Startpage'; $this->phrasen['testtool/zurueckZurStartseite']='Back to startpage';; @@ -43,4 +45,5 @@ $this->phrasen['testtool/dieseFrageIstNichtFuerSieBestimmt']='This question is n $this->phrasen['testtool/fehlerBeimSpeichernDerErstansicht']='Error in saving the initial view'; $this->phrasen['testtool/startDrueckenUmZuBeginnen']='To start this section, please click on Start section in the top left corner.'; $this->phrasen['testtool/keinPrueflingseintragVorhanden']='No candidate entry available.'; +$this->phrasen['testtool/fuerFolgendeStgAngemeldet']='You have applied for the following degree programs:'; ?> \ No newline at end of file From c2a4c3413e9749498856f837f205cf910c87814e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 7 May 2019 11:05:43 +0200 Subject: [PATCH 16/84] Removed dependencies from mcrypt Library to work with PHP7.2 --- include/Crypt_CHAP-1.5.0/CHAP.php | 463 ------------------ .../Crypt_CHAP-1.5.0/tests/Crypt_CHAP.phpt | 119 ----- include/functions.inc.php | 27 +- include/tw/passwort.inc.php | 1 - system/environment.php | 1 - 5 files changed, 18 insertions(+), 593 deletions(-) delete mode 100644 include/Crypt_CHAP-1.5.0/CHAP.php delete mode 100644 include/Crypt_CHAP-1.5.0/tests/Crypt_CHAP.phpt diff --git a/include/Crypt_CHAP-1.5.0/CHAP.php b/include/Crypt_CHAP-1.5.0/CHAP.php deleted file mode 100644 index 473433b9a..000000000 --- a/include/Crypt_CHAP-1.5.0/CHAP.php +++ /dev/null @@ -1,463 +0,0 @@ - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This code cannot simply be copied and put under the GNU Public License or -any other GPL-like (LGPL, GPL2) License. - - $Id: CHAP.php 302857 2010-08-28 21:12:59Z mbretter $ -*/ - -require_once 'PEAR.php'; - -/** -* Classes for generating packets for various CHAP Protocols: -* CHAP-MD5: RFC1994 -* MS-CHAPv1: RFC2433 -* MS-CHAPv2: RFC2759 -* -* @package Crypt_CHAP -* @author Michael Bretterklieber -* @access public -* @version $Revision: 302857 $ -*/ - -/** - * class Crypt_CHAP - * - * Abstract base class for CHAP - * - * @package Crypt_CHAP - */ -class Crypt_CHAP extends PEAR -{ - /** - * Random binary challenge - * @var string - */ - var $challenge = null; - - /** - * Binary response - * @var string - */ - var $response = null; - - /** - * User password - * @var string - */ - var $password = null; - - /** - * Id of the authentication request. Should incremented after every request. - * @var integer - */ - var $chapid = 1; - - /** - * Constructor - * - * Generates a random challenge - * @return void - */ - function Crypt_CHAP() - { - $this->PEAR(); - $this->generateChallenge(); - } - - /** - * Generates a random binary challenge - * - * @param string $varname Name of the property - * @param integer $size Size of the challenge in Bytes - * @return void - */ - function generateChallenge($varname = 'challenge', $size = 8) - { - $this->$varname = ''; - for ($i = 0; $i < $size; $i++) { - $this->$varname .= pack('C', 1 + mt_rand() % 255); - } - return $this->$varname; - } - - /** - * Generates the response. Overwrite this. - * - * @return void - */ - function challengeResponse() - { - } - -} - -/** - * class Crypt_CHAP_MD5 - * - * Generate CHAP-MD5 Packets - * - * @package Crypt_CHAP - */ -class Crypt_CHAP_MD5 extends Crypt_CHAP -{ - - /** - * Generates the response. - * - * CHAP-MD5 uses MD5-Hash for generating the response. The Hash consists - * of the chapid, the plaintext password and the challenge. - * - * @return string - */ - function challengeResponse() - { - return pack('H*', md5(pack('C', $this->chapid) . $this->password . $this->challenge)); - } -} - -/** - * class Crypt_CHAP_MSv1 - * - * Generate MS-CHAPv1 Packets. MS-CHAP doesen't use the plaintext password, it uses the - * NT-HASH wich is stored in the SAM-Database or in the smbpasswd, if you are using samba. - * The NT-HASH is MD4(str2unicode(plaintextpass)). - * You need the hash extension for this class. - * - * @package Crypt_CHAP - */ -class Crypt_CHAP_MSv1 extends Crypt_CHAP -{ - /** - * Wether using deprecated LM-Responses or not. - * 0 = use LM-Response, 1 = use NT-Response - * @var bool - */ - var $flags = 1; - - /** - * Constructor - * - * Loads the hash extension - * @return void - */ - function Crypt_CHAP_MSv1() - { - $this->Crypt_CHAP(); - $this->loadExtension('hash'); - } - - /** - * Generates the NT-HASH from the given plaintext password. - * - * @access public - * @return string - */ - function ntPasswordHash($password = null) - { - if (isset($password)) { - return pack('H*',hash('md4', $this->str2unicode($password))); - } else { - return pack('H*',hash('md4', $this->str2unicode($this->password))); - } - } - - /** - * Converts ascii to unicode. - * - * @access public - * @return string - */ - function str2unicode($str) - { - $uni = ''; - $str = (string) $str; - for ($i = 0; $i < strlen($str); $i++) { - $a = ord($str{$i}) << 8; - $uni .= sprintf("%X", $a); - } - return pack('H*', $uni); - } - - /** - * Generates the NT-Response. - * - * @access public - * @return string - */ - function challengeResponse() - { - return $this->_challengeResponse(); - } - - /** - * Generates the NT-Response. - * - * @access public - * @return string - */ - function ntChallengeResponse() - { - return $this->_challengeResponse(false); - } - - /** - * Generates the LAN-Manager-Response. - * - * @access public - * @return string - */ - function lmChallengeResponse() - { - return $this->_challengeResponse(true); - } - - /** - * Generates the response. - * - * Generates the response using DES. - * - * @param bool $lm wether generating LAN-Manager-Response - * @access private - * @return string - */ - function _challengeResponse($lm = false) - { - if ($lm) { - $hash = $this->lmPasswordHash(); - } else { - $hash = $this->ntPasswordHash(); - } - - while (strlen($hash) < 21) { - $hash .= "\0"; - } - - $td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, ''); - $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND); - $key = $this->_desAddParity(substr($hash, 0, 7)); - mcrypt_generic_init($td, $key, $iv); - $resp1 = mcrypt_generic($td, $this->challenge); - mcrypt_generic_deinit($td); - - $key = $this->_desAddParity(substr($hash, 7, 7)); - mcrypt_generic_init($td, $key, $iv); - $resp2 = mcrypt_generic($td, $this->challenge); - mcrypt_generic_deinit($td); - - $key = $this->_desAddParity(substr($hash, 14, 7)); - mcrypt_generic_init($td, $key, $iv); - $resp3 = mcrypt_generic($td, $this->challenge); - mcrypt_generic_deinit($td); - mcrypt_module_close($td); - - return $resp1 . $resp2 . $resp3; - } - - /** - * Generates the LAN-Manager-HASH from the given plaintext password. - * - * @access public - * @return string - */ - function lmPasswordHash($password = null) - { - $plain = isset($password) ? $password : $this->password; - - $plain = substr(strtoupper($plain), 0, 14); - while (strlen($plain) < 14) { - $plain .= "\0"; - } - - return $this->_desHash(substr($plain, 0, 7)) . $this->_desHash(substr($plain, 7, 7)); - } - - /** - * Generates an irreversible HASH. - * - * @access private - * @return string - */ - function _desHash($plain) - { - $key = $this->_desAddParity($plain); - $td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, ''); - $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND); - mcrypt_generic_init($td, $key, $iv); - $hash = mcrypt_generic($td, 'KGS!@#$%'); - mcrypt_generic_deinit($td); - mcrypt_module_close($td); - return $hash; - } - - /** - * Adds the parity bit to the given DES key. - * - * @access private - * @param string $key 7-Bytes Key without parity - * @return string - */ - function _desAddParity($key) - { - static $odd_parity = array( - 1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14, - 16, 16, 19, 19, 21, 21, 22, 22, 25, 25, 26, 26, 28, 28, 31, 31, - 32, 32, 35, 35, 37, 37, 38, 38, 41, 41, 42, 42, 44, 44, 47, 47, - 49, 49, 50, 50, 52, 52, 55, 55, 56, 56, 59, 59, 61, 61, 62, 62, - 64, 64, 67, 67, 69, 69, 70, 70, 73, 73, 74, 74, 76, 76, 79, 79, - 81, 81, 82, 82, 84, 84, 87, 87, 88, 88, 91, 91, 93, 93, 94, 94, - 97, 97, 98, 98,100,100,103,103,104,104,107,107,109,109,110,110, - 112,112,115,115,117,117,118,118,121,121,122,122,124,124,127,127, - 128,128,131,131,133,133,134,134,137,137,138,138,140,140,143,143, - 145,145,146,146,148,148,151,151,152,152,155,155,157,157,158,158, - 161,161,162,162,164,164,167,167,168,168,171,171,173,173,174,174, - 176,176,179,179,181,181,182,182,185,185,186,186,188,188,191,191, - 193,193,194,194,196,196,199,199,200,200,203,203,205,205,206,206, - 208,208,211,211,213,213,214,214,217,217,218,218,220,220,223,223, - 224,224,227,227,229,229,230,230,233,233,234,234,236,236,239,239, - 241,241,242,242,244,244,247,247,248,248,251,251,253,253,254,254); - - $bin = ''; - for ($i = 0; $i < strlen($key); $i++) { - $bin .= sprintf('%08s', decbin(ord($key{$i}))); - } - - $str1 = explode('-', substr(chunk_split($bin, 7, '-'), 0, -1)); - $x = ''; - foreach($str1 as $s) { - $x .= sprintf('%02s', dechex($odd_parity[bindec($s . '0')])); - } - - return pack('H*', $x); - - } - - /** - * Generates the response-packet. - * - * @param bool $lm wether including LAN-Manager-Response - * @access private - * @return string - */ - function response($lm = false) - { - $ntresp = $this->ntChallengeResponse(); - if ($lm) { - $lmresp = $this->lmChallengeResponse(); - } else { - $lmresp = str_repeat ("\0", 24); - } - - // Response: LM Response, NT Response, flags (0 = use LM Response, 1 = use NT Response) - return $lmresp . $ntresp . pack('C', !$lm); - } -} - -/** - * class Crypt_CHAP_MSv2 - * - * Generate MS-CHAPv2 Packets. This version of MS-CHAP uses a 16 Bytes authenticator - * challenge and a 16 Bytes peer Challenge. LAN-Manager responses no longer exists - * in this version. The challenge is already a SHA1 challenge hash of both challenges - * and of the username. - * - * @package Crypt_CHAP - */ -class Crypt_CHAP_MSv2 extends Crypt_CHAP_MSv1 -{ - /** - * The username - * @var string - */ - var $username = null; - - /** - * The 16 Bytes random binary peer challenge - * @var string - */ - var $peerChallenge = null; - - /** - * The 16 Bytes random binary authenticator challenge - * @var string - */ - var $authChallenge = null; - - /** - * Constructor - * - * Generates the 16 Bytes peer and authentication challenge - * @return void - */ - function Crypt_CHAP_MSv2() - { - $this->Crypt_CHAP_MSv1(); - $this->generateChallenge('peerChallenge', 16); - $this->generateChallenge('authChallenge', 16); - } - - /** - * Generates a hash from the NT-HASH. - * - * @access public - * @param string $nthash The NT-HASH - * @return string - */ - function ntPasswordHashHash($nthash) - { - return pack('H*',hash('md4', $nthash)); - } - - /** - * Generates the challenge hash from the peer and the authenticator challenge and - * the username. SHA1 is used for this, but only the first 8 Bytes are used. - * - * @access public - * @return string - */ - function challengeHash() - { - return substr(pack('H*',hash('sha1', $this->peerChallenge . $this->authChallenge . $this->username)), 0, 8); - } - - /** - * Generates the response. - * - * @access public - * @return string - */ - function challengeResponse() - { - $this->challenge = $this->challengeHash(); - return $this->_challengeResponse(); - } -} - - -?> diff --git a/include/Crypt_CHAP-1.5.0/tests/Crypt_CHAP.phpt b/include/Crypt_CHAP-1.5.0/tests/Crypt_CHAP.phpt deleted file mode 100644 index b2b8c2651..000000000 --- a/include/Crypt_CHAP-1.5.0/tests/Crypt_CHAP.phpt +++ /dev/null @@ -1,119 +0,0 @@ ---TEST-- -Crypt_CHAP: simple test ---SKIPIF-- - ---FILE-- - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This code cannot simply be copied and put under the GNU Public License or -any other GPL-like (LGPL, GPL2) License. - - $Id: chaptest.php 231819 2007-03-14 07:39:07Z mbretter $ -*/ -chdir (dirname(__FILE__)); -if (file_exists('../CHAP.php')) { - require_once '../CHAP.php'; -} else { - require_once 'Crypt/CHAP.php'; -} - -echo "CHAP-MD5 TEST\n"; -$crpt = new Crypt_CHAP_MD5; -$crpt->password = 'MyPw'; -$crpt->chapid = 1; -$crpt->challenge = pack('H*', '102DB5DF085D3041'); -printf ("ChallResp : %s\n", bin2hex($crpt->challengeResponse())); -echo "\n"; - -echo "CHAP-MD5 TEST 2\n"; -$crpt = new Crypt_CHAP_MD5; -$crpt->password = 'sepp'; -$crpt->chapid = 1; -$crpt->challenge = pack('H*', '102DB5DF085D3041'); -printf ("ChallResp : %s\n", bin2hex($crpt->challengeResponse())); -echo "\n"; - -echo "MS-CHAPv1 str2unicode\n"; -$crpt = new Crypt_CHAP_MSv1; -printf("Passed 123 as Number:%s\n", bin2hex($crpt->str2unicode(123))); -printf("Passed 123 as String:%s\n", bin2hex($crpt->str2unicode('123'))); -echo "\n"; - -echo "MS-CHAPv1 TEST\n"; -$crpt->password = 'MyPw'; -$crpt->challenge = pack('H*', '102DB5DF085D3041'); -$unipw = $crpt->str2unicode($crpt->password); -printf ("Unicode PW: %s\n", bin2hex($unipw)); -printf ("NT HASH : %s\n", bin2hex($crpt->ntPasswordHash())); -printf ("NT Resp : %s\n", bin2hex($crpt->challengeResponse())); -printf ("LM HASH : %s\n", bin2hex($crpt->lmPasswordHash())); -printf ("LM Resp : %s\n", bin2hex($crpt->lmChallengeResponse())); -//printf ("Response : %s\nexpected : unknown\n", bin2hex($crpt->response())); -echo "\n"; - -echo "MS-CHAPv2 TEST\n"; -$crpt = new Crypt_CHAP_MSv2; -$crpt->username = 'User'; -$crpt->password = 'clientPass'; -printf ("Username : %s\n", bin2hex($crpt->username)); -$crpt->authChallenge = pack('H*', '5b5d7c7d7b3f2f3e3c2c602132262628'); -$crpt->peerChallenge = pack('H*', '21402324255E262A28295F2B3A337C7E'); -$nthash = $crpt->ntPasswordHash(); -printf ("NT HASH : %s\n", bin2hex($nthash)); -$nthashhash = $crpt->ntPasswordHashHash($nthash); -printf ("NT HASH-HASH : %s\n", bin2hex($nthashhash)); -printf ("ChallResp : %s\n", bin2hex($crpt->challengeResponse())); -printf ("Challenge : %s\n", bin2hex($crpt->challenge)); -echo "\n"; -?> ---EXPECT-- -CHAP-MD5 TEST -ChallResp : 8f028814450d66d94c72331ef455a172 - -CHAP-MD5 TEST 2 -ChallResp : d39bfaf5d6855a948c8c81a85947502c - -MS-CHAPv1 str2unicode -Passed 123 as Number:310032003300 -Passed 123 as String:310032003300 - -MS-CHAPv1 TEST -Unicode PW: 4d00790050007700 -NT HASH : fc156af7edcd6c0edde3337d427f4eac -NT Resp : 4e9d3c8f9cfd385d5bf4d3246791956ca4c351ab409a3d61 -LM HASH : 75ba30198e6d1975aad3b435b51404ee -LM Resp : 91881d0152ab0c33c524135ec24a95ee64e23cdc2d33347d - -MS-CHAPv2 TEST -Username : 55736572 -NT HASH : 44ebba8d5312b8d611474411f56989ae -NT HASH-HASH : 41c00c584bd2d91c4017a2a12fa59f3f -ChallResp : 82309ecd8d708b5ea08faa3981cd83544233114a3d85d6df -Challenge : d02e4386bce91226 - diff --git a/include/functions.inc.php b/include/functions.inc.php index dc896d3b9..534f11f28 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -855,11 +855,17 @@ function encryptData($value,$key) return false; } - $text = $value; - $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); - $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); - $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv); - return trim(safe_b64encode($crypttext)); + require_once(dirname(__FILE__)."/../vendor/autoload.php"); + + $cipher = new phpseclib\Crypt\Rijndael(phpseclib\Crypt\Rijndael::MODE_ECB); + $cipher->setKey($key); + $cipher->disablePadding(); + $length = strlen($value); + $pad = 32 - ($length % 32); + $value = str_pad($value, $length + $pad, chr(0)); + $cipher->setBlockLength(256); + + return trim(safe_b64encode($cipher->encrypt($value))); } function decryptData($value,$key) @@ -869,11 +875,14 @@ function decryptData($value,$key) return false; } + require_once(dirname(__FILE__)."/../vendor/autoload.php"); $crypttext = safe_b64decode($value); - $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); - $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); - $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $crypttext, MCRYPT_MODE_ECB, $iv); - return trim($decrypttext); + $cipher = new phpseclib\Crypt\Rijndael(phpseclib\Crypt\Rijndael::MODE_ECB); + $cipher->disablePadding(); + $cipher->setBlockLength(256); + $cipher->setKey($key); + + return trim($cipher->decrypt($crypttext)); } function clearHtmlTags($text) diff --git a/include/tw/passwort.inc.php b/include/tw/passwort.inc.php index c5b170cbf..b798623fa 100644 --- a/include/tw/passwort.inc.php +++ b/include/tw/passwort.inc.php @@ -21,7 +21,6 @@ * Funktionen zum Pruefen der Passwort Policy und setzen des Passworts */ require_once(dirname(__FILE__).'/../addon.class.php'); -//require_once(dirname(__FILE__).'/../Crypt_CHAP-1.5.0/CHAP.php'); // die aktiven Addons werden durchsucht, ob eines davon eine eigene UID Generierung vorsieht // falls ja, wird die Version des Addons genommen, ansonsten die Default Generierung diff --git a/system/environment.php b/system/environment.php index 8300c3fa4..a7a9b9a9d 100644 --- a/system/environment.php +++ b/system/environment.php @@ -83,7 +83,6 @@ printValue("php-xsl", extension_loaded('xsl')); printValue("php-gd", extension_loaded('gd')); printValue("php-pgsql", extension_loaded('pgsql')); printValue("php-ldap", extension_loaded('ldap')); -printValue("php-mcrypt", extension_loaded('mcrypt')); printValue("php-mbstring", extension_loaded('mbstring')); printValue("php-soap", extension_loaded('soap')); printValue("php-curl", extension_loaded('curl')); From 3c2e02c3aa57d6013b23a1a3ab5e268a76790c07 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 7 May 2019 14:55:43 +0200 Subject: [PATCH 17/84] orgform for RT Freigabe Message retrieved only from Studienplan, otherwise empty string --- public/js/infocenter/infocenterDetails.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 2b9401d29..e05b772ce 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -560,7 +560,7 @@ var InfocenterDetails = { var ausbildungssemester = receiverPrestudentstatus.ausbildungssemester; var studiengangbezeichnung = receiverPrestudentstatus.studiengangbezeichnung; var studiengangbezeichnung_englisch = receiverPrestudentstatus.studiengangbezeichnung_englisch; - var orgform = typeof receiverPrestudentstatus.orgform === 'string' ? receiverPrestudentstatus.orgform : receiverPrestudentstatus.orgform_kurzbz; + var orgform = typeof receiverPrestudentstatus.orgform === 'string' ? receiverPrestudentstatus.orgform : ""; var msgvars = {}; if (rtfreigabe) From a9d59918cea6b9c000fe86d385675435534a86aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 8 May 2019 11:28:14 +0200 Subject: [PATCH 18/84] =?UTF-8?q?Abgabetool=20-=20Handbuch=20verlinkt=20au?= =?UTF-8?q?f=20Wiki=20-=20Fehler=20behoben=20wodurch=20Projektarbeiten=20d?= =?UTF-8?q?oppelt=20in=20der=20Studierendensicht=20angezeigt=20wurden=20-?= =?UTF-8?q?=20Hinweis=20beim=20Upload=20hinzugef=C3=BCgt=20damit=20keine?= =?UTF-8?q?=20Unterschriebenen=20Dokumente=20hochgeladen=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/lehre/abgabe_lektor.php | 38 ++++++------- cis/private/lehre/abgabe_student.php | 79 ++++++++++++++-------------- locale/de-AT/abgabetool.php | 6 ++- locale/de-AT/dms_link.php | 6 +-- 4 files changed, 65 insertions(+), 64 deletions(-) diff --git a/cis/private/lehre/abgabe_lektor.php b/cis/private/lehre/abgabe_lektor.php index cf5037435..414c5e423 100644 --- a/cis/private/lehre/abgabe_lektor.php +++ b/cis/private/lehre/abgabe_lektor.php @@ -22,7 +22,7 @@ */ /******************************************************************************************************* * abgabe_lektor - * abgabe_lektor ist die Lektorenmaske des Abgabesystems + * abgabe_lektor ist die Lektorenmaske des Abgabesystems * fuer Diplom- und Bachelorarbeiten *******************************************************************************************************/ @@ -37,7 +37,7 @@ require_once('../../../include/benutzerberechtigung.class.php'); if (!$db = new basis_db()) die('Fehler beim Herstellen der Datenbankverbindung'); - + $getuid=get_uid(); $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($getuid); @@ -55,29 +55,29 @@ $p = new phrasen($sprache); $htmlstr = ""; $showall=isset($_GET['showall']); - -$sql_query = "SELECT + +$sql_query = "SELECT * - FROM + FROM (SELECT tbl_person.vorname, tbl_person.nachname, tbl_studiengang.typ, tbl_studiengang.kurzbz, tbl_projektarbeit.projekttyp_kurzbz, tbl_projekttyp.bezeichnung, tbl_projektarbeit.titel, tbl_projektarbeit.projektarbeit_id, tbl_projektbetreuer.betreuerart_kurzbz, tbl_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz - FROM lehre.tbl_projektarbeit LEFT JOIN lehre.tbl_projektbetreuer using(projektarbeit_id) + FROM lehre.tbl_projektarbeit LEFT JOIN lehre.tbl_projektbetreuer using(projektarbeit_id) LEFT JOIN public.tbl_benutzer on(uid=student_uid) LEFT JOIN public.tbl_student on(public.tbl_benutzer.uid=public.tbl_student.student_uid) LEFT JOIN public.tbl_person on(tbl_benutzer.person_id=tbl_person.person_id) - LEFT JOIN lehre.tbl_lehreinheit using(lehreinheit_id) - LEFT JOIN lehre.tbl_lehrveranstaltung using(lehrveranstaltung_id) + LEFT JOIN lehre.tbl_lehreinheit using(lehreinheit_id) + LEFT JOIN lehre.tbl_lehrveranstaltung using(lehrveranstaltung_id) LEFT JOIN public.tbl_studiengang on(lehre.tbl_lehrveranstaltung.studiengang_kz=public.tbl_studiengang.studiengang_kz) LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz) WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') - AND tbl_projektbetreuer.person_id IN (SELECT person_id FROM public.tbl_benutzer - WHERE public.tbl_benutzer.person_id=lehre.tbl_projektbetreuer.person_id + AND tbl_projektbetreuer.person_id IN (SELECT person_id FROM public.tbl_benutzer + WHERE public.tbl_benutzer.person_id=lehre.tbl_projektbetreuer.person_id AND public.tbl_benutzer.uid=".$db->db_add_param($getuid).") ".($showall?'':' AND public.tbl_benutzer.aktiv AND lehre.tbl_projektarbeit.note IS NULL ')." - AND (betreuerart_kurzbz='Betreuer' OR betreuerart_kurzbz='Begutachter' OR betreuerart_kurzbz='Erstbegutachter' - OR betreuerart_kurzbz='Zweitbegutachter' OR betreuerart_kurzbz='Erstbetreuer') - ORDER BY tbl_projektarbeit.projektarbeit_id, betreuerart_kurzbz desc) as xy + AND (betreuerart_kurzbz='Betreuer' OR betreuerart_kurzbz='Begutachter' OR betreuerart_kurzbz='Erstbegutachter' + OR betreuerart_kurzbz='Zweitbegutachter' OR betreuerart_kurzbz='Erstbetreuer') + ORDER BY tbl_projektarbeit.projektarbeit_id, betreuerart_kurzbz desc) as xy ORDER BY nachname"; if(!$erg=$db->db_query($sql_query)) @@ -141,22 +141,22 @@ echo ' return true; return false; } - - $(document).ready(function() - { + + $(document).ready(function() + { $("#t1").tablesorter( { sortList: [[4,0]], widgets: ["zebra"] - }); - + }); + }); '; -echo "

    ".$p->t('abgabetool/ueberschrift')." ($getuid)

    "; +echo "

    ".$p->t('abgabetool/ueberschrift')." ($getuid)

    "; echo $htmlstr; diff --git a/cis/private/lehre/abgabe_student.php b/cis/private/lehre/abgabe_student.php index 963a11301..a1a6c9b34 100644 --- a/cis/private/lehre/abgabe_student.php +++ b/cis/private/lehre/abgabe_student.php @@ -36,7 +36,7 @@ $p = new phrasen($sprache); if (!$db = new basis_db()) die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung')); - + $getuid=get_uid(); $uid=$getuid; @@ -46,31 +46,31 @@ if(isset($_GET['uid'])) $uid = $_GET['uid']; //Rechte Pruefen $allowed=false; - + $student = new student(); if(!$student->load($uid)) die($p->t('global/fehlerBeimErmittelnDerUID')); - + $stg_obj = new studiengang(); if(!$stg_obj->load($student->studiengang_kz)) die($p->t('global/fehlerBeimLesenAusDatenbank')); - + //Berechtigung ueber das Berechtigungssystem $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($getuid); if($rechte->isBerechtigt('lehre/abgabetool',$stg_obj->oe_kurzbz,'s')) $allowed=true; - + //oder Lektor mit Betreuung dieses Studenten $qry = "SELECT 1 - FROM - lehre.tbl_projektarbeit - JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id) + FROM + lehre.tbl_projektarbeit + JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id) JOIN campus.vw_benutzer on(vw_benutzer.person_id=tbl_projektbetreuer.person_id) WHERE tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." AND vw_benutzer.uid=".$db->db_add_param($getuid).";"; - + if($result = $db->db_query($qry)) { if($db->db_num_rows($result)>0) @@ -78,11 +78,11 @@ if(isset($_GET['uid'])) $allowed=true; } } - + if(!$allowed) { die($p->t('abgabetool/keineBerechtigungStudentenansicht')); - } + } } $htmlstr = ''; $htmlstr1 = ''; @@ -90,33 +90,32 @@ $vorname=''; $nachname=''; $zweitbetreuer = ''; -$sql_query = "SELECT (SELECT nachname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bnachname, - (SELECT vorname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bvorname, - (SELECT titelpre FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpre, - (SELECT titelpost FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpost, +$sql_query = "SELECT (SELECT nachname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bnachname, + (SELECT vorname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bvorname, + (SELECT titelpre FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpre, + (SELECT titelpost FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpost, (SELECT person_id FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_person_id, (SELECT betreuerart_kurzbz FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_betreuerart_kurzbz, - tbl_projektbetreuer.person_id AS betreuer_person_id, - tbl_projekttyp.bezeichnung AS prjbez, * - FROM lehre.tbl_projektarbeit - LEFT JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id) - LEFT JOIN public.tbl_benutzer ON(uid=student_uid) - LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id) - LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) - LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) + tbl_projektbetreuer.person_id AS betreuer_person_id, + tbl_projekttyp.bezeichnung AS prjbez, * + FROM lehre.tbl_projektarbeit + LEFT JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id) + LEFT JOIN public.tbl_benutzer ON(uid=student_uid) + LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id) + LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) LEFT JOIN public.tbl_studiengang USING(studiengang_kz) LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz) - WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') - AND (tbl_projektbetreuer.betreuerart_kurzbz='Betreuer' - OR tbl_projektbetreuer.betreuerart_kurzbz='Begutachter' - OR tbl_projektbetreuer.betreuerart_kurzbz='Erstbetreuer' - OR tbl_projektbetreuer.betreuerart_kurzbz='Erstbegutachter' - OR tbl_projektbetreuer.betreuerart_kurzbz='Zweitbegutachter') - AND tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." - AND public.tbl_benutzer.aktiv - AND lehre.tbl_projektarbeit.note IS NULL + WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') + AND (tbl_projektbetreuer.betreuerart_kurzbz='Betreuer' + OR tbl_projektbetreuer.betreuerart_kurzbz='Begutachter' + OR tbl_projektbetreuer.betreuerart_kurzbz='Erstbetreuer' + OR tbl_projektbetreuer.betreuerart_kurzbz='Erstbegutachter') + AND tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." + AND public.tbl_benutzer.aktiv + AND lehre.tbl_projektarbeit.note IS NULL ORDER BY studiensemester_kurzbz desc, tbl_lehrveranstaltung.kurzbz"; //AND tbl_projektarbeit.student_uid='$getuid' 'ie07m102'; @@ -161,8 +160,8 @@ else $htmlstr .= " ".strtoupper($row->typ.$row->kurzbz)."\n"; $htmlstr .= " "; - $qry_betr="SELECT mitarbeiter_uid FROM public.tbl_person - JOIN public.tbl_benutzer USING(person_id) + $qry_betr="SELECT mitarbeiter_uid FROM public.tbl_person + JOIN public.tbl_benutzer USING(person_id) JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid) WHERE person_id=".$db->db_add_param($row->betreuer_person_id, FHC_INTEGER).";"; if($result_betr=$db->db_query($qry_betr)) @@ -171,7 +170,7 @@ else { $htmlstr.="email"; } - else + else { $htmlstr.="UID unknown!"; } @@ -201,14 +200,14 @@ echo ' @@ -217,7 +216,7 @@ echo ' echo '

    '.$p->t('abgabetool/ueberschrift'); if(trim($uid)!='') - echo " ($uid $vorname $nachname)
    "; + echo " ($uid $vorname $nachname)

    "; echo ''; echo $htmlstr; echo ' diff --git a/locale/de-AT/abgabetool.php b/locale/de-AT/abgabetool.php index 9a9c8f87d..1d103abf3 100644 --- a/locale/de-AT/abgabetool.php +++ b/locale/de-AT/abgabetool.php @@ -69,10 +69,12 @@ $this->phrasen['abgabetool/fehlerTerminVorbei']='Die Abgabefrist für diesen Ter $this->phrasen['abgabetool/eidesstattlicheErklaerung']='Ich erkläre hiermit an Eides statt, dass ich die vorliegende Arbeit selbständig angefertigt habe. Die aus fremden Quellen direkt oder indirekt übernommenen Gedanken sind als solche kenntlich gemacht. -Die Arbeit wurde bisher weder in gleicher noch in ähnlicher Form einer anderen Prüfungsbehörde vorgelegt und auch noch nicht veröffentlicht.
    +Die Arbeit wurde bisher weder in gleicher noch in ähnlicher Form einer anderen Prüfungsbehörde vorgelegt und auch noch nicht veröffentlicht.

    Ich räume der Fachhochschule Technikum Wien das Recht ein, das/die übermittelte/n Dokument/e elektronisch zu speichern und in Datennetzen öffentlich zugänglich zu machen. Ich räume der Fachhochschule Technikum Wien ferner das Recht zur Konvertierung zum Zwecke der Langzeitarchivierung unter Beachtung der Bewahrung des Inhalts ein. -Ich erkläre außerdem, dass von mir die urheber- und lizenzrechtliche Seite (Copyright) geklärt wurde und Rechte Dritter der Publikation nicht entgegenstehen.'; +Ich erkläre außerdem, dass von mir die urheber- und lizenzrechtliche Seite (Copyright) geklärt wurde und Rechte Dritter der Publikation nicht entgegenstehen.

    +Bei den Master Arbeiten dürfen ausschließlich Dokumente hochgeladen werden, bei denen die `Eidesstattliche Erklärung´ nicht unterschrieben ist (Datenschutz). +Sollten Sie trotzdem die `Eidesstattliche Erklärung´ samt Unterschrift hochladen, wird seitens der FH Technikum Wien davon ausgegangen, dass Sie keinen Wert auf Schutz Ihrer Unterschrift legen.'; $this->phrasen['abgabetool/gelesenUndAkzeptiert']='Gelesen und akzeptiert'; $this->phrasen['abgabetool/erklaerungNichtAkzeptiert']='Erklärung nicht akzeptiert'; $this->phrasen['abgabetool/downloadProjektarbeit']='Dokument herunterladen'; diff --git a/locale/de-AT/dms_link.php b/locale/de-AT/dms_link.php index 4e4296038..a642a0d51 100644 --- a/locale/de-AT/dms_link.php +++ b/locale/de-AT/dms_link.php @@ -7,9 +7,6 @@ $this->phrasen['dms_link/cisHandbuch']='764'; //CIS-Handbuch, welches im Head-Fr $this->phrasen['dms_link/benotungstoolHandbuch']='32'; //Handbuch Benotungstool $this->phrasen['dms_link/moodleHandbuch']='33'; //Moodle Handbuch $this->phrasen['dms_link/moodleHandbuch24']='1426'; //Moodle Handbuch -$this->phrasen['dms_link/abgabetoolLektorHandbuch']='28'; //Abgabetool Handbuch fuer LektorInnen -$this->phrasen['dms_link/abgabetoolStudentHandbuch']='27'; //Abgabetool Handbuch fuer Studierende -$this->phrasen['dms_link/abgabetoolAssistenzHandbuch']='28'; //Abgabetool Handbuch fuer Assistenz $this->phrasen['dms_link/iconPDF']='46'; //PDF Icon $this->phrasen['dms_link/bedienungsanleitungMailverteiler']='1474'; //Bedienungsanleitung Mailverteiler $this->phrasen['dms_link/berechtigungskonzeptMailverteiler']='1475'; //Berechtigungskonzept Mailverteiler @@ -36,4 +33,7 @@ $this->phrasen['dms_link/lvevaluierungMitarbeiterCMS']=''; //Beschreibung des Ab //Links auf externe Seiten $this->phrasen['dms_link/dokuwikiGesamtnote']='http://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:gesamtnote'; //Link ins Dokuwiki zur Anleitung Gesamtnote +$this->phrasen['dms_link/abgabetoolLektorHandbuch']='https://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:abgabetool_fuer_lektoren'; //Abgabetool Handbuch fuer LektorInnen +$this->phrasen['dms_link/abgabetoolStudentHandbuch']='https://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:abgabetool_fuer_studierende'; //Abgabetool Handbuch fuer Studierende +$this->phrasen['dms_link/abgabetoolAssistenzHandbuch']='https://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:abgabetool_fuer_lektoren'; //Abgabetool Handbuch fuer Assistenz ?> From 35c6322bbd9970ce51d300b9973eb8921d7d337a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 8 May 2019 11:40:35 +0200 Subject: [PATCH 19/84] =?UTF-8?q?Abgabetool=20-=20Handbuch=20zum=20Abgabet?= =?UTF-8?q?ool=20f=C3=BCr=20Assistenz=20verlinkt=20jetzt=20ins=20Wiki=20-?= =?UTF-8?q?=20Fehlerhaften=20Tooltiptext=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/en-US/abgabetool.php | 6 ++++-- locale/en-US/dms_link.php | 8 ++++---- vilesci/lehre/abgabe_assistenz.php | 8 ++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/locale/en-US/abgabetool.php b/locale/en-US/abgabetool.php index 1de161280..a5e201e22 100644 --- a/locale/en-US/abgabetool.php +++ b/locale/en-US/abgabetool.php @@ -69,10 +69,12 @@ $this->phrasen['abgabetool/fehlerTerminVorbei']='The deadline for this upload ha $this->phrasen['abgabetool/eidesstattlicheErklaerung']='I confirm that this paper is entirely my own work. All sources and quotations have been fully acknowledged in the appropriate places with adequate footnotes and citations. Quotations have been properly acknowledged and marked with appropriate punctuation. The works consulted are listed in the bibliography. -This paper has not been submitted to another examination panel in the same or a similar form, and has not been published.
    +This paper has not been submitted to another examination panel in the same or a similar form, and has not been published.

    I grant the University Of Applied Sciences Technikum Wien the right to store the uploaded file(s) in electronic form and to make them publicly available in data networks. I further grant the University of Applied Sciences Technikum Wien the right to convert the file(s) for long term preservation purposes. -I declare that copyright and licensing issues related to my work have been resolved and that therefore no rights on the part of any third parties impede the publication.'; +I declare that copyright and licensing issues related to my work have been resolved and that therefore no rights on the part of any third parties impede the publication.

    +Bei den Master Arbeiten dürfen ausschließlich Dokumente hochgeladen werden, bei denen die `Eidesstattliche Erklärung´ nicht unterschrieben ist (Datenschutz). +Sollten Sie trotzdem die `Eidesstattliche Erklärung´ samt Unterschrift hochladen, wird seitens der FH Technikum Wien davon ausgegangen, dass Sie keinen Wert auf Schutz Ihrer Unterschrift legen.'; $this->phrasen['abgabetool/gelesenUndAkzeptiert']='Read and accepted'; $this->phrasen['abgabetool/erklaerungNichtAkzeptiert']='Declaration not accepted'; $this->phrasen['abgabetool/downloadProjektarbeit']='Download File'; diff --git a/locale/en-US/dms_link.php b/locale/en-US/dms_link.php index 80e95529e..700a38f22 100644 --- a/locale/en-US/dms_link.php +++ b/locale/en-US/dms_link.php @@ -7,9 +7,6 @@ $this->phrasen['dms_link/cisHandbuch']='825'; //CIS-Handbuch, welches im Head-Fr $this->phrasen['dms_link/benotungstoolHandbuch']='824'; //Handbuch Benotungstool $this->phrasen['dms_link/moodleHandbuch']='33'; //Moodle Handbuch $this->phrasen['dms_link/moodleHandbuch24']='1426'; //Moodle Handbuch -$this->phrasen['dms_link/abgabetoolLektorHandbuch']='874'; //Abgabetool Handbuch fuer LektorInnen -$this->phrasen['dms_link/abgabetoolStudentHandbuch']='875'; //Abgabetool Handbuch fuer Studierende -$this->phrasen['dms_link/abgabetoolAssistenzHandbuch']='874'; //Abgabetool Handbuch fuer Assistenz $this->phrasen['dms_link/iconPDF']='46'; //PDF Icon $this->phrasen['dms_link/bedienungsanleitungMailverteiler']='1474'; //Bedienungsanleitung Mailverteiler $this->phrasen['dms_link/berechtigungskonzeptMailverteiler']='1475'; //Berechtigungskonzept Mailverteiler @@ -31,4 +28,7 @@ $this->phrasen['dms_link/anleitungMailverteiler']='7578'; //Anleitung für die B //Links auf externe Seiten $this->phrasen['dms_link/dokuwikiGesamtnote']='http://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:gesamtnote'; //Link ins Dokuwiki zur Anleitung Gesamtnote -?> \ No newline at end of file +$this->phrasen['dms_link/abgabetoolLektorHandbuch']='https://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:abgabetool_fuer_lektoren'; //Abgabetool Handbuch fuer LektorInnen +$this->phrasen['dms_link/abgabetoolStudentHandbuch']='https://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:abgabetool_fuer_studierende'; //Abgabetool Handbuch fuer Studierende +$this->phrasen['dms_link/abgabetoolAssistenzHandbuch']='https://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:abgabetool_fuer_lektoren'; //Abgabetool Handbuch fuer Assistenz +?> diff --git a/vilesci/lehre/abgabe_assistenz.php b/vilesci/lehre/abgabe_assistenz.php index 29cabf174..3c939a330 100644 --- a/vilesci/lehre/abgabe_assistenz.php +++ b/vilesci/lehre/abgabe_assistenz.php @@ -105,7 +105,7 @@ if(!$erg=$db->db_query($sql_query)) else { //$htmlstr .= "
    "; - $htmlstr .= "
    "; + $htmlstr .= ""; //$htmlstr .= "\n"; $htmlstr .= "
    \n"; $htmlstr .= "\n"; @@ -154,9 +154,9 @@ else OR tbl_projektbetreuer.betreuerart_kurzbz = 'Betreuer' OR tbl_projektbetreuer.betreuerart_kurzbz = 'Begutachter' ) - + UNION - + SELECT '' AS first, trim(COALESCE(nachname, '') || ', ' || COALESCE(titelpre, '') || ' ' || COALESCE(vorname, '') || ' ' || COALESCE(titelpost, '')) AS second, PUBLIC.tbl_mitarbeiter.mitarbeiter_uid, @@ -451,7 +451,7 @@ function btserienmail(trenner, stgbez)
    Bachelor-/Masterarbeitsbetreuungen (Studiengang $stg_kz, $stgbez)
    "; +echo "

    Bachelor-/Masterarbeitsbetreuungen (Studiengang $stg_kz, $stgbez)

    "; echo $htmlstr; ?> From 1c81705e3d66be57ec1c3c4dfffcf721e90af8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 8 May 2019 15:10:42 +0200 Subject: [PATCH 20/84] =?UTF-8?q?Aufnahmetermine:=20Ist=20bereits=20eine?= =?UTF-8?q?=20Raumzuordnung=20f=C3=BCr=20einen=20Reihungstest=20erfolgt=20?= =?UTF-8?q?und=20der=20Reihungstest=20wird=20im=20FAS=20auf=20einen=20neue?= =?UTF-8?q?n=20Reihungstesttermin=20ge=C3=A4ndert,=20dann=20wird=20die=20v?= =?UTF-8?q?orhandene=20Raumzuordnung=20der=20Person=20entfernt=20und=20ein?= =?UTF-8?q?=20entsprechender=20Hinweis=20angezeigt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/student/studentDBDML.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index 02fa0deab..5deced246 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -4027,6 +4027,7 @@ if(!$error) } $warnung_zu_viele_teilnehmer = false; + $warnung_raumzuordnungentfernt = false; if($reihungstest->reihungstest_id != $rt_id) { // Wenn ein neuer Reihungstesttermin ausgewählt wird, dann wird geprueft ob @@ -4043,6 +4044,12 @@ if(!$error) } if($max_teilnehmer!='' && $aktuelle_anzahl >= $max_teilnehmer) $warnung_zu_viele_teilnehmer = true; + + if ($reihungstest->ort_kurzbz != '') + { + $reihungstest->ort_kurzbz = ''; + $warnung_raumzuordnungentfernt = true; + } } $reihungstest->reihungstest_id = $rt_id; $reihungstest->person_id = $person_id; @@ -4063,8 +4070,15 @@ if(!$error) { $return = false; $error = true; - $errormsg = 'Achtung - die Maximalanzahl der Teilnehmer wurde überschritten;'. - ' Prüfen Sie ob genug Platz zur Verfügung steht - Zuteilung wurde erfolgreich gespeichert'; + $errormsg .= ' - Achtung - die Maximalanzahl der Teilnehmer wurde überschritten;'. + ' Prüfen Sie ob genug Platz zur Verfügung steht'; + } + if ($warnung_raumzuordnungentfernt) + { + $return = false; + $error = true; + $errormsg .= ' - Achtung - Die Person war bereits einem Raum für den Reihungstest zugeordnet.'. + 'Die Raumzuordnung wurde entfernt.'; } } else From 3f423898f993c2ef23f58ed1740c1a9402755502 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 9 May 2019 12:49:20 +0200 Subject: [PATCH 21/84] Added alert when test includes MathML format and browser is not Firefox By the moment applicants should absolve the tests using Firefox Browser to ensure the correct display MathML. If they use another browser, they will now get an alert. --- cis/testtool/login.php | 3 +- cis/testtool/menu.php | 34 +++++++++++++++++++++- include/gebiet.class.php | 63 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 3 deletions(-) diff --git a/cis/testtool/login.php b/cis/testtool/login.php index 0ef8aab15..e46e6679c 100644 --- a/cis/testtool/login.php +++ b/cis/testtool/login.php @@ -577,11 +577,10 @@ if (isset($prestudent_id)) '.$p->t('testtool/klickenSieAufEinTeilgebiet').' '; - if($pruefling->pruefling_id!='') { $_SESSION['pruefling_id']=$pruefling->pruefling_id; - echo ''; + //echo ''; } } else diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index 1f364cc6f..84cddcdc3 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -283,7 +283,7 @@ if (isset($_SESSION['pruefling_id'])) $result = $db->db_query($qry); $lastsemester = ''; $quereinsteiger_stg = ''; - + $gebiet_hasMathML = false; // true, wenn irgendein Gebiet eine/n Frage/Vorschlag im MathML-Format enthält while($row = $db->db_fetch_object($result)) { //Jedes Semester in einer eigenen Tabelle anzeigen @@ -323,6 +323,13 @@ if (isset($_SESSION['pruefling_id'])) } $gebiet = new gebiet(); + + // Prüfen, ob das Gebiet eine/n Frage/Vorschlag im MathML-Format enthält + if (!$gebiet_hasMathML) // sobald nur ein MathML Format gefunden, variable nicht mehr überschreiben + { + $gebiet_hasMathML = $gebiet->hasMathML($row->gebiet_id); + } + if($gebiet->check_gebiet($row->gebiet_id)) { //Status der Gebiete Pruefen @@ -401,4 +408,29 @@ else } ?> + + diff --git a/include/gebiet.class.php b/include/gebiet.class.php index 8983100ce..d421a9d4c 100644 --- a/include/gebiet.class.php +++ b/include/gebiet.class.php @@ -825,5 +825,68 @@ class gebiet extends basis_db return true; } } + + /** + * Prueft, ob das Gebiet zumindest eine Frage oder einen Vorschlag im MathML Format hat. + * @param $gebiet_id + * return true, wenn Gebiet eine/n Frage/Vorschlag im MathML Format enthält. + */ + public function hasMathML($gebiet_id) + { + if (is_numeric($gebiet_id)) + { + $qry = ' + WITH + fragen AS ( + SELECT DISTINCT + frage_id + FROM + testtool.tbl_frage + JOIN + testtool.tbl_gebiet USING (gebiet_id) + WHERE + tbl_gebiet.gebiet_id = '. $this->db_add_param($gebiet_id, FHC_INTEGER). ' + ), + vorschlaege AS ( + SELECT DISTINCT + vorschlag_id + FROM + testtool.tbl_vorschlag + JOIN + fragen USING (frage_id) + ) + + SELECT + 1 + FROM + testtool.tbl_frage_sprache + JOIN + fragen USING (frage_id) + WHERE + SUBSTRING(text, \'MathML\') IS NOT NULL + + UNION + + SELECT + 1 + FROM + testtool.tbl_vorschlag_sprache + JOIN + vorschlaege USING (vorschlag_id) + WHERE + SUBSTRING(text, \'MathML\') IS NOT NULL + '; + + if($result = $this->db_query($qry)) + { + return ($this->db_num_rows($result) > 0); + } + } + else + { + $this->errormsg = 'Eine numerische gebiet_id muss übergeben werden.'; + return false; + } + } } ?> From 0136d78cfd71bd705c7f2504a3cf3955546d471c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 10 May 2019 07:53:39 +0200 Subject: [PATCH 22/84] Aligned ECTS in Gradelist --- application/views/person/gradelist/course.php | 6 ++++++ application/views/person/gradelist/semester.php | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/application/views/person/gradelist/course.php b/application/views/person/gradelist/course.php index 1f1f1911b..4b4b41d0f 100644 --- a/application/views/person/gradelist/course.php +++ b/application/views/person/gradelist/course.php @@ -7,6 +7,12 @@ else + - + + @@ -79,6 +85,12 @@ + From 61f387e9f7615e7a9aeb38bcee664fa5d6a28901 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 10 May 2019 19:02:33 +0200 Subject: [PATCH 23/84] Added Format library needed by REST_Controller --- application/libraries/Format.php | 531 +++++++++++++++++++++++++++++++ 1 file changed, 531 insertions(+) create mode 100644 application/libraries/Format.php diff --git a/application/libraries/Format.php b/application/libraries/Format.php new file mode 100644 index 000000000..0f7ea4a87 --- /dev/null +++ b/application/libraries/Format.php @@ -0,0 +1,531 @@ +_CI = &get_instance(); + + // Load the inflector helper + $this->_CI->load->helper('inflector'); + + // If the provided data is already formatted we should probably convert it to an array + if ($from_type !== NULL) + { + if (method_exists($this, '_from_' . $from_type)) + { + $data = call_user_func([$this, '_from_' . $from_type], $data); + } + else + { + throw new Exception('Format class does not support conversion from "' . $from_type . '".'); + } + } + + // Set the member variable to the data passed + $this->_data = $data; + } + + /** + * Create an instance of the format class + * e.g: echo $this->format->factory(['foo' => 'bar'])->to_csv(); + * + * @param mixed $data Data to convert/parse + * @param string $from_type Type to convert from e.g. json, csv, html + * + * @return object Instance of the format class + */ + public function factory($data, $from_type = NULL) + { + // $class = __CLASS__; + // return new $class(); + + return new static($data, $from_type); + } + + // FORMATTING OUTPUT --------------------------------------------------------- + + /** + * Format data as an array + * + * @param mixed|NULL $data Optional data to pass, so as to override the data passed + * to the constructor + * @return array Data parsed as an array; otherwise, an empty array + */ + public function to_array($data = NULL) + { + // If no data is passed as a parameter, then use the data passed + // via the constructor + if ($data === NULL && func_num_args() === 0) + { + $data = $this->_data; + } + + // Cast as an array if not already + if (is_array($data) === FALSE) + { + $data = (array) $data; + } + + $array = []; + foreach ((array) $data as $key => $value) + { + if (is_object($value) === TRUE || is_array($value) === TRUE) + { + $array[$key] = $this->to_array($value); + } + else + { + $array[$key] = $value; + } + } + + return $array; + } + + /** + * Format data as XML + * + * @param mixed|NULL $data Optional data to pass, so as to override the data passed + * to the constructor + * @param NULL $structure + * @param string $basenode + * @return mixed + */ + public function to_xml($data = NULL, $structure = NULL, $basenode = 'xml') + { + if ($data === NULL && func_num_args() === 0) + { + $data = $this->_data; + } + + // turn off compatibility mode as simple xml throws a wobbly if you don't. + if (ini_get('zend.ze1_compatibility_mode') == 1) + { + ini_set('zend.ze1_compatibility_mode', 0); + } + + if ($structure === NULL) + { + $structure = simplexml_load_string("<$basenode />"); + } + + // Force it to be something useful + if (is_array($data) === FALSE && is_object($data) === FALSE) + { + $data = (array) $data; + } + + foreach ($data as $key => $value) + { + + //change false/true to 0/1 + if (is_bool($value)) + { + $value = (int) $value; + } + + // no numeric keys in our xml please! + if (is_numeric($key)) + { + // make string key... + $key = (singular($basenode) != $basenode) ? singular($basenode) : 'item'; + } + + // replace anything not alpha numeric + $key = preg_replace('/[^a-z_\-0-9]/i', '', $key); + + if ($key === '_attributes' && (is_array($value) || is_object($value))) + { + $attributes = $value; + if (is_object($attributes)) + { + $attributes = get_object_vars($attributes); + } + + foreach ($attributes as $attribute_name => $attribute_value) + { + $structure->addAttribute($attribute_name, $attribute_value); + } + } + // if there is another array found recursively call this function + elseif (is_array($value) || is_object($value)) + { + $node = $structure->addChild($key); + + // recursive call. + $this->to_xml($value, $node, $key); + } + else + { + // add single node. + $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'); + + $structure->addChild($key, $value); + } + } + + return $structure->asXML(); + } + + /** + * Format data as HTML + * + * @param mixed|NULL $data Optional data to pass, so as to override the data passed + * to the constructor + * @return mixed + */ + public function to_html($data = NULL) + { + // If no data is passed as a parameter, then use the data passed + // via the constructor + if ($data === NULL && func_num_args() === 0) + { + $data = $this->_data; + } + + // Cast as an array if not already + if (is_array($data) === FALSE) + { + $data = (array) $data; + } + + // Check if it's a multi-dimensional array + if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) + { + // Multi-dimensional array + $headings = array_keys($data[0]); + } + else + { + // Single array + $headings = array_keys($data); + $data = [$data]; + } + + // Load the table library + $this->_CI->load->library('table'); + + $this->_CI->table->set_heading($headings); + + foreach ($data as $row) + { + // Suppressing the "array to string conversion" notice + // Keep the "evil" @ here + $row = @array_map('strval', $row); + + $this->_CI->table->add_row($row); + } + + return $this->_CI->table->generate(); + } + + /** + * @link http://www.metashock.de/2014/02/create-csv-file-in-memory-php/ + * @param mixed|NULL $data Optional data to pass, so as to override the data passed + * to the constructor + * @param string $delimiter The optional delimiter parameter sets the field + * delimiter (one character only). NULL will use the default value (,) + * @param string $enclosure The optional enclosure parameter sets the field + * enclosure (one character only). NULL will use the default value (") + * @return string A csv string + */ + public function to_csv($data = NULL, $delimiter = ',', $enclosure = '"') + { + // Use a threshold of 1 MB (1024 * 1024) + $handle = fopen('php://temp/maxmemory:1048576', 'w'); + if ($handle === FALSE) + { + return NULL; + } + + // If no data is passed as a parameter, then use the data passed + // via the constructor + if ($data === NULL && func_num_args() === 0) + { + $data = $this->_data; + } + + // If NULL, then set as the default delimiter + if ($delimiter === NULL) + { + $delimiter = ','; + } + + // If NULL, then set as the default enclosure + if ($enclosure === NULL) + { + $enclosure = '"'; + } + + // Cast as an array if not already + if (is_array($data) === FALSE) + { + $data = (array) $data; + } + + // Check if it's a multi-dimensional array + if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) + { + // Multi-dimensional array + $headings = array_keys($data[0]); + } + else + { + // Single array + $headings = array_keys($data); + $data = [$data]; + } + + // Apply the headings + fputcsv($handle, $headings, $delimiter, $enclosure); + + foreach ($data as $record) + { + // If the record is not an array, then break. This is because the 2nd param of + // fputcsv() should be an array + if (is_array($record) === FALSE) + { + break; + } + + // Suppressing the "array to string conversion" notice. + // Keep the "evil" @ here. + $record = @ array_map('strval', $record); + + // Returns the length of the string written or FALSE + fputcsv($handle, $record, $delimiter, $enclosure); + } + + // Reset the file pointer + rewind($handle); + + // Retrieve the csv contents + $csv = stream_get_contents($handle); + + // Close the handle + fclose($handle); + + return $csv; + } + + /** + * Encode data as json + * + * @param mixed|NULL $data Optional data to pass, so as to override the data passed + * to the constructor + * @return string Json representation of a value + */ + public function to_json($data = NULL) + { + // If no data is passed as a parameter, then use the data passed + // via the constructor + if ($data === NULL && func_num_args() === 0) + { + $data = $this->_data; + } + + // Get the callback parameter (if set) + $callback = $this->_CI->input->get('callback'); + + if (empty($callback) === TRUE) + { + return json_encode($data); + } + + // We only honour a jsonp callback which are valid javascript identifiers + elseif (preg_match('/^[a-z_\$][a-z0-9\$_]*(\.[a-z_\$][a-z0-9\$_]*)*$/i', $callback)) + { + // Return the data as encoded json with a callback + return $callback . '(' . json_encode($data) . ');'; + } + + // An invalid jsonp callback function provided. + // Though I don't believe this should be hardcoded here + $data['warning'] = 'INVALID JSONP CALLBACK: ' . $callback; + + return json_encode($data); + } + + /** + * Encode data as a serialized array + * + * @param mixed|NULL $data Optional data to pass, so as to override the data passed + * to the constructor + * @return string Serialized data + */ + public function to_serialized($data = NULL) + { + // If no data is passed as a parameter, then use the data passed + // via the constructor + if ($data === NULL && func_num_args() === 0) + { + $data = $this->_data; + } + + return serialize($data); + } + + /** + * Format data using a PHP structure + * + * @param mixed|NULL $data Optional data to pass, so as to override the data passed + * to the constructor + * @return mixed String representation of a variable + */ + public function to_php($data = NULL) + { + // If no data is passed as a parameter, then use the data passed + // via the constructor + if ($data === NULL && func_num_args() === 0) + { + $data = $this->_data; + } + + return var_export($data, TRUE); + } + + // INTERNAL FUNCTIONS + + /** + * @param $data XML string + * @return SimpleXMLElement XML element object; otherwise, empty array + */ + protected function _from_xml($data) + { + return $data ? (array) simplexml_load_string($data, 'SimpleXMLElement', LIBXML_NOCDATA) : []; + } + + /** + * @param string $data CSV string + * @param string $delimiter The optional delimiter parameter sets the field + * delimiter (one character only). NULL will use the default value (,) + * @param string $enclosure The optional enclosure parameter sets the field + * enclosure (one character only). NULL will use the default value (") + * @return array A multi-dimensional array with the outer array being the number of rows + * and the inner arrays the individual fields + */ + protected function _from_csv($data, $delimiter = ',', $enclosure = '"') + { + // If NULL, then set as the default delimiter + if ($delimiter === NULL) + { + $delimiter = ','; + } + + // If NULL, then set as the default enclosure + if ($enclosure === NULL) + { + $enclosure = '"'; + } + + return str_getcsv($data, $delimiter, $enclosure); + } + + /** + * @param $data Encoded json string + * @return mixed Decoded json string with leading and trailing whitespace removed + */ + protected function _from_json($data) + { + return json_decode(trim($data)); + } + + /** + * @param string Data to unserialized + * @return mixed Unserialized data + */ + protected function _from_serialize($data) + { + return unserialize(trim($data)); + } + + /** + * @param $data Data to trim leading and trailing whitespace + * @return string Data with leading and trailing whitespace removed + */ + protected function _from_php($data) + { + return trim($data); + } + +} From 83607fcfbcd71a3da6c0304cacfdb2ed0bdd2fb9 Mon Sep 17 00:00:00 2001 From: Andreas Oesterreicher Date: Mon, 13 May 2019 15:28:49 +0200 Subject: [PATCH 24/84] =?UTF-8?q?Erinnerungsmail=20f=C3=BCr=20Lehrauftr?= =?UTF-8?q?=C3=A4ge=20wird=20nur=20noch=20an=20aktive=20Studieng=C3=A4nge?= =?UTF-8?q?=20verschickt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/erinnerungsmail_sek_lehrauftrag.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/erinnerungsmail_sek_lehrauftrag.php b/system/erinnerungsmail_sek_lehrauftrag.php index 3213eeff2..6e1e5d075 100644 --- a/system/erinnerungsmail_sek_lehrauftrag.php +++ b/system/erinnerungsmail_sek_lehrauftrag.php @@ -29,7 +29,7 @@ require_once('../include/mail.class.php'); $db = new basis_db(); -$qry = "SELECT distinct email FROM public.tbl_studiengang WHERE studiengang_kz!=0 AND email is not null"; +$qry = "SELECT distinct email FROM public.tbl_studiengang WHERE studiengang_kz!=0 AND email is not null AND aktiv"; $message = "Dies ist eine automatische eMail!\n\nAm 20. jedes Monats wird die Lehrauftragsliste automatisch an die Geschäftsführung geschickt. Bitte führen Sie bis dahin noch alle anstehenden Korrekturen durch!\n\nBesten Dank,\nGeschäftsführung"; $subject = "Erinnerung Lehrauftragsliste"; @@ -47,4 +47,4 @@ if($result = $db->db_query($qry)) echo "Fehler beim Versenden des Erinnerungsmails an $to\n"; } } -?> \ No newline at end of file +?> From b0cabff783a9edacecb9c05d1a4e354796329020 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 14 May 2019 10:57:03 +0200 Subject: [PATCH 25/84] Optimized GUI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Widened left navigation width to avoid width scrolling. - Removed column 'Reihungstest' informing what kind of test needs to be solved (Basic / Quereinstieg) - Status now multilingual - Renamend 'Quereinsteiger' to 'Quereinstieg' - Nav-button of Quereinsteiger-Studiengänge in new color --- cis/testtool/index.html | 2 +- cis/testtool/login.php | 13 ++++--------- cis/testtool/menu.php | 6 ++---- locale/de-AT/testtool.php | 2 +- locale/en-US/testtool.php | 2 +- skin/styles/tw.css | 10 ++++++++-- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/cis/testtool/index.html b/cis/testtool/index.html index 88660a778..64ca9a205 100644 --- a/cis/testtool/index.html +++ b/cis/testtool/index.html @@ -8,7 +8,7 @@ - + diff --git a/cis/testtool/login.php b/cis/testtool/login.php index e46e6679c..c354bb938 100644 --- a/cis/testtool/login.php +++ b/cis/testtool/login.php @@ -436,7 +436,6 @@ if (isset($prestudent_id)) - @@ -457,13 +456,13 @@ if (isset($prestudent_id)) $ps_tmp->getLastStatus($ps_obj->prestudent_id); $ps_obj->lastStatus = $ps_tmp->status_kurzbz; // letzten Status dem result array hinzufügen + $ps_obj->status_mehrsprachig = $ps_tmp->status_mehrsprachig; } // Falls Status 'Abgewiesene' vorhanden, nach hinten reihen usort($ps_arr->result, function($a, $b){ return strcmp($b->lastStatus, $a->lastStatus); // Order by DESC }); - foreach ($ps_arr->result as $ps_obj) { echo ''; @@ -475,12 +474,10 @@ if (isset($prestudent_id)) if($ps_obj->ausbildungssemester == '1') { echo ''; - echo ''; } elseif($ps_obj->ausbildungssemester == '3') { - echo ''; - echo ''; + echo ''; } } // wenn letzter Status \'Abgewiesener\' ist, dann als solchen kennzeichnen @@ -488,8 +485,7 @@ if (isset($prestudent_id)) { echo ' - - + '; } echo ''; @@ -503,8 +499,7 @@ if (isset($prestudent_id)) $ps_master = new Prestudent(); $ps_master->getLastStatus($prestudent_id); echo ''; - echo ''; - echo ''; + echo ''; } echo ' diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index 84cddcdc3..112f5d0b1 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -291,14 +291,12 @@ if (isset($_SESSION['pruefling_id'])) { if($lastsemester!='') { - //echo ''; echo '
    p->t('lehre','lehrveranstaltung');?>p->t('lehre','ects');?>p->t('lehre','ects');?> p->t('lehre','note');?>
    p->t('lehre','lehrveranstaltung');?> p->t('lehre','ects');?> p->t('lehre','note');?>
    '. $p->t('global/studiengang'). ' Status'. $p->t('testtool/reihungstest'). '
    '. $p->t('testtool/regulaererEinstieg'). ' (1. Semester)Basic'. $p->t('testtool/Quereinsteiger'). ' (3.Semester)Basic + '. $p->t('testtool/Quereinsteiger'). ''. $p->t('testtool/quereinstieg'). ' (3.Semester)'. $ps_obj->typ_bz .' '. ($sprache_user == 'English' ? $stg->english : $stg->bezeichnung). ''. $ps_obj->lastStatus. '-'. $ps_obj->status_mehrsprachig[$sprache_user]. '
    '. $typ->bezeichnung.' '.($sprache_user=='English'?$stg_obj->english:$stg_obj->bezeichnung).''. $ps_master->status_kurzbz.'Basic'. $ps_master->status_mehrsprachig[$sprache_user]. '
     
    '; } $lastsemester = $row->semester; echo ''; - /*echo '';*/ - echo ''; + echo ''; } // Bei Quereinstiegsgebieten nach STG clustern und die STG anzeigen @@ -318,7 +316,7 @@ if (isset($_SESSION['pruefling_id'])) $quereinsteiger_stg_string .= $stg->bezeichnung; $cnt++; } - echo ''; + echo ''; } } diff --git a/locale/de-AT/testtool.php b/locale/de-AT/testtool.php index 497b3adf5..1f4092900 100644 --- a/locale/de-AT/testtool.php +++ b/locale/de-AT/testtool.php @@ -10,7 +10,7 @@ $this->phrasen['testtool/willkommenstext']='Bitte warten Sie mit dem Login auf d $this->phrasen['testtool/nameAuswaehlen']='Name auswählen...'; $this->phrasen['testtool/reihungstest']= 'Reihungstest'; $this->phrasen['testtool/regulaererEinstieg']='Regulärer Einstieg'; -$this->phrasen['testtool/quereinstieg']='(Quereinstieg)'; +$this->phrasen['testtool/quereinstieg']='Quereinstieg'; $this->phrasen['testtool/quereinsteiger']='Quereinsteiger'; $this->phrasen['testtool/basic']='Basic'; $this->phrasen['testtool/semester']='Semester'; diff --git a/locale/en-US/testtool.php b/locale/en-US/testtool.php index d1339e65d..1e87fea3f 100644 --- a/locale/en-US/testtool.php +++ b/locale/en-US/testtool.php @@ -10,7 +10,7 @@ $this->phrasen['testtool/willkommenstext']='Please wait for the tutor\'s instruc $this->phrasen['testtool/nameAuswaehlen']='Choose name...'; $this->phrasen['testtool/reihungstest']= 'Placement test'; $this->phrasen['testtool/regulaererEinstieg']='Regular entry'; -$this->phrasen['testtool/quereinstieg']='(Lateral entry)'; +$this->phrasen['testtool/quereinstieg']='Lateral entry'; $this->phrasen['testtool/quereinsteiger']='Lateral entry'; $this->phrasen['testtool/basic']='Basic'; $this->phrasen['testtool/semester']='Semester'; diff --git a/skin/styles/tw.css b/skin/styles/tw.css index 8adbcf7da..b9fca3cc7 100644 --- a/skin/styles/tw.css +++ b/skin/styles/tw.css @@ -407,6 +407,12 @@ TABLE#tabterm { margin:auto; } + +.well +{ + background-color: white; + border: 2px solid #add4ea; +} td.rand /* Seitenraender des CIS */ { font-size: 11px; @@ -458,8 +464,8 @@ td.HeaderTesttool /*fuer die Button-Optik beim Testtool*/ } td.HeaderTesttoolSTG /*fuer die Button-Optik der Quereinstiegs-Studiengänge beim Testtool*/ { - color: #00639C; - border: 2px solid #00639C; + color: white; + border: 2px solid #add4ea; padding: 10px; max-width: 100px; overflow: hidden; From e3ace2c46271d5115333c5a10a6498c788c6614e Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 14 May 2019 11:01:52 +0200 Subject: [PATCH 26/84] Gebiete Navigation: Filtered out rejected studies Fixed SQL query. Now rejected studies are filtered out and will not be shown up in the navigation. --- cis/testtool/menu.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index 112f5d0b1..76646d444 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -150,7 +150,7 @@ if (isset($_SESSION['pruefling_id'])) tbl_studiengangstyp.bezeichnung AS typ_bz, ausbildungssemester AS semester FROM - public.tbl_prestudentstatus + public.tbl_prestudentstatus AS ps_status JOIN public.tbl_prestudent USING (prestudent_id) JOIN @@ -178,6 +178,18 @@ if (isset($_SESSION['pruefling_id'])) ende > now() ) + /* Filter out all Abgewiesene */ + AND NOT EXISTS ( + SELECT + 1 + FROM + tbl_prestudentstatus + WHERE + status_kurzbz = 'Abgewiesener' + AND + prestudent_id = ps_status.prestudent_id + ) + AND status_kurzbz = 'Interessent'"; @@ -200,8 +212,8 @@ if (isset($_SESSION['pruefling_id'])) ORDER BY prestudent_id, datum DESC, - tbl_prestudentstatus.insertamum DESC, - tbl_prestudentstatus.ext_id DESC + ps_status.insertamum DESC, + ps_status.ext_id DESC ) @@ -211,7 +223,7 @@ if (isset($_SESSION['pruefling_id'])) gebiet_id, STRING_AGG(studiengang_kz::TEXT, ', ' ORDER BY studiengang_kz) AS studiengang_kz_list, bezeichnung, - reihung, + MIN(reihung) AS reihung, ". $bezeichnung_mehrsprachig_sel. " FROM ( SELECT @@ -268,7 +280,6 @@ if (isset($_SESSION['pruefling_id'])) semester, gebiet_id, bezeichnung, - reihung, bezeichnung_mehrsprachig_1, bezeichnung_mehrsprachig_2, bezeichnung_mehrsprachig_3, @@ -276,8 +287,7 @@ if (isset($_SESSION['pruefling_id'])) ORDER BY semester, - gebiet_id, - reihung + gebiet_id "; $result = $db->db_query($qry); From d6576dbd49a040948b210e55c8178d15febc9f7b Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 14 May 2019 13:01:25 +0200 Subject: [PATCH 27/84] Updated composer files --- composer.json | 173 ++++++++++++++++++++---------------------- composer.lock | 203 +++++++++++++++++++++++--------------------------- 2 files changed, 176 insertions(+), 200 deletions(-) diff --git a/composer.json b/composer.json index f8e26e736..4dee6d438 100644 --- a/composer.json +++ b/composer.json @@ -30,10 +30,10 @@ { "type": "package", "package": { - "name": "codeigniter-restserver", - "version": "2.6", + "name": "alvaro-prieto/colResizable", + "version": "1.6", "dist": { - "url": "https://github.com/chriskacerguis/codeigniter-restserver/archive/master.zip", + "url": "https://github.com/alvaro-prieto/colResizable/archive/1.6.zip", "type": "zip" } } @@ -41,21 +41,10 @@ { "type": "package", "package": { - "name": "jsoneditor", - "version": "5.5.6", + "name": "BlackrockDigital/startbootstrap-sb-admin-2", + "version": "3.3.7.1", "dist": { - "url": "https://github.com/josdejong/jsoneditor/archive/v5.5.6.zip", - "type": "zip" - } - } - }, - { - "type": "package", - "package": { - "name": "json-forms", - "version": "1.4.0", - "dist": { - "url": "https://github.com/brutusin/json-forms/archive/v1.4.0.zip", + "url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/archive/v3.3.7+1.zip", "type": "zip" } } @@ -71,13 +60,37 @@ } } }, + { "type": "package", "package": { - "name": "rmariuzzo/jquery-checkboxes", - "version": "1.0.7", + "name": "fgelinas/timepicker", + "version": "0.3.3", + "source": { + "url": "https://github.com/fgelinas/timepicker", + "type": "git", + "reference": "9aebe413b784696639220bc36b7c1e8a30fda129" + } + } + }, + { + "type": "package", + "package": { + "name": "joeldbirch/superfish", + "version": "1.7.9", "dist": { - "url": "https://github.com/rmariuzzo/checkboxes.js/archive/v1.0.7.zip", + "url": "https://github.com/joeldbirch/superfish/archive/v1.7.9.zip", + "type": "zip" + } + } + }, + { + "type": "package", + "package": { + "name": "jquery/sizzle", + "version": "1.0", + "dist": { + "url": "https://github.com/jquery/sizzle/archive/1.0.0.zip", "type": "zip" } } @@ -107,54 +120,22 @@ { "type": "package", "package": { - "name": "fgelinas/timepicker", - "version": "0.3.3", - "dist": { - "url": "https://fgelinas.com/code/timepicker/releases/jquery-ui-timepicker-0.3.3.zip", - "type": "zip" - } - } - }, - { - "type": "package", - "package": { - "name": "alvaro-prieto/colResizable", - "version": "1.6", - "dist": { - "url": "https://github.com/alvaro-prieto/colResizable/archive/1.6.zip", - "type": "zip" - } - } - }, - { - "type": "package", - "package": { - "name": "tapmodo/Jcrop", - "version": "2.0.4", - "dist": { - "url": "https://github.com/tapmodo/Jcrop/archive/v2.0.4.zip", - "type": "zip" - } - } - }, - { - "type": "package", - "package": { - "name": "joeldbirch/superfish", - "version": "1.7.9", - "dist": { - "url": "https://github.com/joeldbirch/superfish/archive/v1.7.9.zip", - "type": "zip" - } - } - }, - { - "type": "package", - "package": { - "name": "jquery/sizzle", + "name": "jquery-archive/jquery-metadata", "version": "1.0", + "source": { + "url": "https://github.com/jquery-archive/jquery-metadata.git", + "type": "git", + "reference": "e5a9e4315675bf4d68716872ca754e858088f8ab" + } + } + }, + { + "type": "package", + "package": { + "name": "json-forms", + "version": "1.4.0", "dist": { - "url": "https://github.com/jquery/sizzle/archive/1.0.0.zip", + "url": "https://github.com/brutusin/json-forms/archive/v1.4.0.zip", "type": "zip" } } @@ -162,21 +143,10 @@ { "type": "package", "package": { - "name": "nicolaskruchten/pivottable", - "version": "2.15.0", + "name": "jsoneditor", + "version": "5.5.6", "dist": { - "url": "https://github.com/nicolaskruchten/pivottable/archive/v2.15.0.zip", - "type": "zip" - } - } - }, - { - "type": "package", - "package": { - "name": "BlackrockDigital/startbootstrap-sb-admin-2", - "version": "3.3.7.1", - "dist": { - "url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/archive/v3.3.7+1.zip", + "url": "https://github.com/josdejong/jsoneditor/archive/v5.5.6.zip", "type": "zip" } } @@ -192,6 +162,28 @@ } } }, + { + "type": "package", + "package": { + "name": "nicolaskruchten/pivottable", + "version": "2.15.0", + "dist": { + "url": "https://github.com/nicolaskruchten/pivottable/archive/v2.15.0.zip", + "type": "zip" + } + } + }, + { + "type": "package", + "package": { + "name": "rmariuzzo/jquery-checkboxes", + "version": "1.0.7", + "dist": { + "url": "https://github.com/rmariuzzo/checkboxes.js/archive/v1.0.7.zip", + "type": "zip" + } + } + }, { "type": "package", "package": { @@ -206,12 +198,11 @@ { "type": "package", "package": { - "name": "jquery-archive/jquery-metadata", - "version": "1.0", - "source": { - "url": "https://github.com/jquery-archive/jquery-metadata.git", - "type": "git", - "reference": "e5a9e4315675bf4d68716872ca754e858088f8ab" + "name": "tapmodo/Jcrop", + "version": "2.0.4", + "dist": { + "url": "https://github.com/tapmodo/Jcrop/archive/v2.0.4.zip", + "type": "zip" } } }, @@ -229,7 +220,7 @@ } ], "require": { - "php": ">=5.4.0", + "php": ">=5.6.40", "afarkas/html5shiv": "^3.7", "alvaro-prieto/colResizable": "^1.6", @@ -239,7 +230,6 @@ "christianbach/tablesorter": "^1.0", "codeigniter/framework": "3.*", - "codeigniter-restserver": "2.6", "components/jquery": "^3.2", "components/jqueryui": "^1.12", "components/font-awesome": "^4.7", @@ -255,7 +245,6 @@ "jquery/jqueryV2": "^2.2", "jquery/sizzle": "^1.0", "jquery-archive/jquery-metadata": "^1.0", - "json-forms": "1.4.0", "jsoneditor": "5.5.6", @@ -268,10 +257,11 @@ "mottie/tablesorter": "^2.29", "nategood/httpful": "^0.2.20", - "netcarver/textile": "^3.5", "nicolaskruchten/pivottable": "^2.15.0", + "phpseclib/phpseclib": "^2.0", + "rmariuzzo/jquery-checkboxes": "1.0.7", "rougin/combustor": "1.1.*", "rougin/refinery": "*", @@ -286,8 +276,7 @@ "zetacomponents/workflow": "1.*", "zetacomponents/document": "1.*", "zetacomponents/workflow-database-tiein": "1.*", - "zetacomponents/workflow-event-log-tiein": "1.*", - "phpseclib/phpseclib": "^2.0" + "zetacomponents/workflow-event-log-tiein": "1.*" }, "require-dev": { "squizlabs/php_codesniffer": "2.*" diff --git a/composer.lock b/composer.lock index a160578ea..e22b4e733 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "e5e3e110545316baa4087a8e1a283a7c", - "content-hash": "e191f9af8e2103de78eaa130122ec72b", + "hash": "5cc3ff3f9a49ae251ef22baabfd33768", + "content-hash": "7b2f22ffd076c3cf329fe7d2c01a174d", "packages": [ { "name": "BlackrockDigital/startbootstrap-sb-admin-2", @@ -89,29 +89,18 @@ "notification-url": "https://packagist.org/downloads/", "time": "2016-09-02 11:31:54" }, - { - "name": "codeigniter-restserver", - "version": "2.6", - "dist": { - "type": "zip", - "url": "https://github.com/chriskacerguis/codeigniter-restserver/archive/master.zip", - "reference": null, - "shasum": null - }, - "type": "library" - }, { "name": "codeigniter/framework", - "version": "3.1.9", + "version": "3.1.10", "source": { "type": "git", "url": "https://github.com/bcit-ci/CodeIgniter.git", - "reference": "30e2eafa86c4c7b6b39cea3e7089a90df9f603fb" + "reference": "c576995304fc3609cca0b7b92d1b2cd611ec82f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/30e2eafa86c4c7b6b39cea3e7089a90df9f603fb", - "reference": "30e2eafa86c4c7b6b39cea3e7089a90df9f603fb", + "url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/c576995304fc3609cca0b7b92d1b2cd611ec82f5", + "reference": "c576995304fc3609cca0b7b92d1b2cd611ec82f5", "shasum": "" }, "require": { @@ -131,7 +120,7 @@ ], "description": "The CodeIgniter framework", "homepage": "https://codeigniter.com", - "time": "2018-06-12 13:45:46" + "time": "2019-01-16 15:49:35" }, { "name": "components/angular.js", @@ -664,11 +653,10 @@ { "name": "fgelinas/timepicker", "version": "0.3.3", - "dist": { - "type": "zip", - "url": "https://fgelinas.com/code/timepicker/releases/jquery-ui-timepicker-0.3.3.zip", - "reference": null, - "shasum": null + "source": { + "type": "git", + "url": "https://github.com/fgelinas/timepicker", + "reference": "9aebe413b784696639220bc36b7c1e8a30fda129" }, "type": "library" }, @@ -1060,17 +1048,16 @@ }, { "name": "ml/json-ld", - "version": "1.0.8", - "target-dir": "ML/JsonLD", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/lanthaler/JsonLD.git", - "reference": "da8efc590273f0420e79cb110778508875690bde" + "reference": "b5f82820c255cb64067b1c7adbb819cad4afa70a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/da8efc590273f0420e79cb110778508875690bde", - "reference": "da8efc590273f0420e79cb110778508875690bde", + "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/b5f82820c255cb64067b1c7adbb819cad4afa70a", + "reference": "b5f82820c255cb64067b1c7adbb819cad4afa70a", "shasum": "" }, "require": { @@ -1084,8 +1071,8 @@ }, "type": "library", "autoload": { - "psr-0": { - "ML\\JsonLD": "" + "psr-4": { + "ML\\JsonLD\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1106,20 +1093,20 @@ "JSON-LD", "jsonld" ], - "time": "2018-01-28 12:53:52" + "time": "2018-11-18 20:26:18" }, { "name": "mottie/tablesorter", - "version": "v2.30.7", + "version": "v2.31.1", "source": { "type": "git", "url": "https://github.com/Mottie/tablesorter.git", - "reference": "90f7326819c573ee5ab333f4a0672623d7c52e1e" + "reference": "fa56764ad5630ed3ab9da4a30fdb8dd34bfbaf1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Mottie/tablesorter/zipball/90f7326819c573ee5ab333f4a0672623d7c52e1e", - "reference": "90f7326819c573ee5ab333f4a0672623d7c52e1e", + "url": "https://api.github.com/repos/Mottie/tablesorter/zipball/fa56764ad5630ed3ab9da4a30fdb8dd34bfbaf1f", + "reference": "fa56764ad5630ed3ab9da4a30fdb8dd34bfbaf1f", "shasum": "" }, "require": { @@ -1157,7 +1144,7 @@ "sorting", "table" ], - "time": "2018-07-10 13:32:19" + "time": "2018-11-20 21:54:28" }, { "name": "nategood/httpful", @@ -1211,36 +1198,36 @@ }, { "name": "netcarver/textile", - "version": "v3.6.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/textile/php-textile.git", - "reference": "bac6381fcab28cf6b6ae3d0e61b6a8c8d6adca13" + "reference": "377933125dd30d708804c545bf33da87a3c1b0f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/textile/php-textile/zipball/bac6381fcab28cf6b6ae3d0e61b6a8c8d6adca13", - "reference": "bac6381fcab28cf6b6ae3d0e61b6a8c8d6adca13", + "url": "https://api.github.com/repos/textile/php-textile/zipball/377933125dd30d708804c545bf33da87a3c1b0f4", + "reference": "377933125dd30d708804c545bf33da87a3c1b0f4", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*", - "satooshi/php-coveralls": "0.6.*", - "squizlabs/php_codesniffer": "1.5.*", + "php-coveralls/php-coveralls": "2.1.*", + "phpunit/phpunit": "5.7.*", + "squizlabs/php_codesniffer": "3.*", "symfony/yaml": "2.4.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.6-dev" + "dev-master": "3.7-dev" } }, "autoload": { - "psr-0": { - "Netcarver\\Textile": "src/" + "psr-4": { + "Netcarver\\Textile\\": "src/Netcarver/Textile/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1260,7 +1247,7 @@ "plaintext", "textile" ], - "time": "2016-11-17 14:18:12" + "time": "2019-01-26 17:03:58" }, { "name": "nicolaskruchten/pivottable", @@ -1275,16 +1262,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.11", + "version": "2.0.15", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "7053f06f91b3de78e143d430e55a8f7889efc08b" + "reference": "11cf67cf78dc4acb18dc9149a57be4aee5036ce0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/7053f06f91b3de78e143d430e55a8f7889efc08b", - "reference": "7053f06f91b3de78e143d430e55a8f7889efc08b", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/11cf67cf78dc4acb18dc9149a57be4aee5036ce0", + "reference": "11cf67cf78dc4acb18dc9149a57be4aee5036ce0", "shasum": "" }, "require": { @@ -1363,20 +1350,20 @@ "x.509", "x509" ], - "time": "2018-04-15 16:55:05" + "time": "2019-03-10 16:53:45" }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -1410,7 +1397,7 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2018-11-20 15:27:04" }, { "name": "rdlowrey/auryn", @@ -1724,12 +1711,12 @@ "source": { "type": "git", "url": "https://github.com/rougin/spark-plug.git", - "reference": "1e62ad1b2d206e0e82978da4259616315e680023" + "reference": "71b7bafacf2854d4dc296cfdf354a6cf54417f9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rougin/spark-plug/zipball/1e62ad1b2d206e0e82978da4259616315e680023", - "reference": "1e62ad1b2d206e0e82978da4259616315e680023", + "url": "https://api.github.com/repos/rougin/spark-plug/zipball/71b7bafacf2854d4dc296cfdf354a6cf54417f9b", + "reference": "71b7bafacf2854d4dc296cfdf354a6cf54417f9b", "shasum": "" }, "require": { @@ -1790,16 +1777,16 @@ }, { "name": "symfony/console", - "version": "v2.8.44", + "version": "v2.8.50", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc" + "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", - "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", + "url": "https://api.github.com/repos/symfony/console/zipball/cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", + "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", "shasum": "" }, "require": { @@ -1847,7 +1834,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-07-26 11:13:39" + "time": "2018-11-20 15:55:20" }, { "name": "symfony/debug", @@ -1908,16 +1895,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.9.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + "reference": "82ebae02209c21113908c229e9883c419720738a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", "shasum": "" }, "require": { @@ -1929,7 +1916,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -1962,20 +1949,20 @@ "polyfill", "portable" ], - "time": "2018-08-06 14:22:27" + "time": "2019-02-06 07:57:58" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.9.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", "shasum": "" }, "require": { @@ -1987,7 +1974,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -2021,20 +2008,20 @@ "portable", "shim" ], - "time": "2018-08-06 14:22:27" + "time": "2019-02-06 07:57:58" }, { "name": "symfony/yaml", - "version": "v2.8.44", + "version": "v2.8.50", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "fbf876678e29dc634430dcf0096e216eb0004467" + "reference": "02c1859112aa779d9ab394ae4f3381911d84052b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/fbf876678e29dc634430dcf0096e216eb0004467", - "reference": "fbf876678e29dc634430dcf0096e216eb0004467", + "url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b", + "reference": "02c1859112aa779d9ab394ae4f3381911d84052b", "shasum": "" }, "require": { @@ -2071,7 +2058,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-07-26 09:03:18" + "time": "2018-11-11 11:18:13" }, { "name": "tapmodo/Jcrop", @@ -2086,16 +2073,16 @@ }, { "name": "tinymce/tinymce", - "version": "4.8.1", + "version": "4.9.4", "source": { "type": "git", "url": "https://github.com/tinymce/tinymce-dist.git", - "reference": "66308359bd3ff09996ed0e4121ca777c7f4ab508" + "reference": "3a997f24eb54d890b1c88f22cff03092e0b73378" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/66308359bd3ff09996ed0e4121ca777c7f4ab508", - "reference": "66308359bd3ff09996ed0e4121ca777c7f4ab508", + "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/3a997f24eb54d890b1c88f22cff03092e0b73378", + "reference": "3a997f24eb54d890b1c88f22cff03092e0b73378", "shasum": "" }, "type": "component", @@ -2128,7 +2115,7 @@ "tinymce", "wysiwyg" ], - "time": "2018-07-26 06:38:42" + "time": "2019-03-20 13:56:58" }, { "name": "tomazdragar/SimpleCropper", @@ -2142,16 +2129,16 @@ }, { "name": "twbs/bootstrap", - "version": "v3.3.7", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/twbs/bootstrap.git", - "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" + "reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twbs/bootstrap/zipball/0b9c4a4007c44201dce9a6cc1a38407005c26c86", - "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/68b0d231a13201eb14acd3dc84e51543d16e5f7e", + "reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e", "shasum": "" }, "replace": { @@ -2160,7 +2147,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3.x-dev" + "dev-master": "3.4.x-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -2178,7 +2165,7 @@ } ], "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", - "homepage": "http://getbootstrap.com", + "homepage": "https://getbootstrap.com/", "keywords": [ "JS", "css", @@ -2189,35 +2176,35 @@ "responsive", "web" ], - "time": "2016-07-25 15:51:55" + "time": "2019-02-13 15:55:38" }, { "name": "twig/twig", - "version": "v1.35.4", + "version": "v1.40.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a" + "reference": "35889516bbd6bbe46a600c2c33b03515df4a076e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", - "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/35889516bbd6bbe46a600c2c33b03515df4a076e", + "reference": "35889516bbd6bbe46a600c2c33b03515df4a076e", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.4.0", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "psr/container": "^1.0", "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.3" + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.35-dev" + "dev-master": "1.40-dev" } }, "autoload": { @@ -2255,7 +2242,7 @@ "keywords": [ "templating" ], - "time": "2018-07-13 07:12:17" + "time": "2019-04-29 14:12:28" }, { "name": "zetacomponents/base", @@ -2646,16 +2633,16 @@ "packages-dev": [ { "name": "squizlabs/php_codesniffer", - "version": "2.9.1", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", "shasum": "" }, "require": { @@ -2720,7 +2707,7 @@ "phpcs", "standards" ], - "time": "2017-05-22 02:43:20" + "time": "2018-11-07 22:31:41" } ], "aliases": [], @@ -2729,7 +2716,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.4.0" + "php": ">=5.6.40" }, "platform-dev": [] } From 6cc99bf2b97035932d9943aa83fc27aba38bb3fa Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 14 May 2019 15:25:51 +0200 Subject: [PATCH 28/84] Appended errormessage when retrieving invalid Gebiete Now if the method check_gebiete() returns false, a userfriendly errormessage will be displayed. --- cis/testtool/login.php | 2 +- cis/testtool/menu.php | 29 ++++++++++++++++++++++------- locale/de-AT/errors.php | 1 + locale/de-AT/testtool.php | 1 + locale/en-US/errors.php | 1 + locale/en-US/testtool.php | 1 + skin/styles/tw.css | 1 + 7 files changed, 28 insertions(+), 8 deletions(-) diff --git a/cis/testtool/login.php b/cis/testtool/login.php index c354bb938..349e272e6 100644 --- a/cis/testtool/login.php +++ b/cis/testtool/login.php @@ -434,7 +434,7 @@ if (isset($prestudent_id))
    '.$row->semester.'. '.$p->t('testtool/semester').' '.($row->semester!='1'?$p->t('testtool/quereinstieg'):'').'
    '. ($row->semester == '1' ? strtoupper($p->t('testtool/basic')) : strtoupper($p->t('testtool/quereinsteiger'))).'
    '. ($row->semester == '1' ? strtoupper($p->t('testtool/basic')) : strtoupper($p->t('testtool/quereinstieg'))).'
    '. $quereinsteiger_stg_string. '
    '. $quereinsteiger_stg_string. '
    - + diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index 76646d444..17f6e5f8b 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -82,6 +82,9 @@ session_start(); + + + @@ -106,7 +109,7 @@ if (isset($_SESSION['pruefling_id'])) if($content_id->content_id!='') { echo ' - '; @@ -228,7 +231,7 @@ if (isset($_SESSION['pruefling_id'])) FROM ( SELECT * - FROM ( + FROM ( (SELECT prestudent_data.semester AS ps_sem, gebiet_id, @@ -294,6 +297,7 @@ if (isset($_SESSION['pruefling_id'])) $lastsemester = ''; $quereinsteiger_stg = ''; $gebiet_hasMathML = false; // true, wenn irgendein Gebiet eine/n Frage/Vorschlag im MathML-Format enthält + $invalid_gebiete = false; while($row = $db->db_fetch_object($result)) { //Jedes Semester in einer eigenen Tabelle anzeigen @@ -394,11 +398,7 @@ if (isset($_SESSION['pruefling_id'])) } else { - echo ' - - '; + $invalid_gebiete = true; } } echo '
    '. $p->t('global/studiengang'). ''. $p->t('global/studiengang'). ' Status
    +
    '.$p->t('testtool/einleitung').'
    -  '.$row->gebiet_bez.' (invalid) -
    '; @@ -440,5 +440,20 @@ else } } } + + // Error massage if check_gebiet function returns false + $(function() { + var invalid_gebiete = ""; + if(invalid_gebiete == true) + { + $('#tr-einleitung').append('' + + '' + + '' + + ''); + } + }); diff --git a/locale/de-AT/errors.php b/locale/de-AT/errors.php index f28e731a9..6612e9963 100644 --- a/locale/de-AT/errors.php +++ b/locale/de-AT/errors.php @@ -1,4 +1,5 @@ phrasen['errors/rolleExistiertBereits']='Diese Rolle existiert bereits'; +$this->phrasen['errors/achtung']='Achtung!'; ?> diff --git a/locale/de-AT/testtool.php b/locale/de-AT/testtool.php index 1f4092900..ba50793be 100644 --- a/locale/de-AT/testtool.php +++ b/locale/de-AT/testtool.php @@ -46,4 +46,5 @@ $this->phrasen['testtool/fehlerBeimSpeichernDerErstansicht']='Fehler beim Speich $this->phrasen['testtool/startDrueckenUmZuBeginnen']='Um dieses Teilgebiet zu starten, drücken Sie bitte links oben auf Gebiet starten.'; $this->phrasen['testtool/keinPrueflingseintragVorhanden']='Kein Prüflingseintrag vorhanden'; $this->phrasen['testtool/fuerFolgendeStgAngemeldet']='Für folgende Studiengänge haben Sie sich angemeldet:'; +$this->phrasen['testtool/invalideGebiete']='Ein oder mehrere Fragengebiet/e inkorrekt!
    Bitte melden Sie dies der Betreuungsperson.'; ?> diff --git a/locale/en-US/errors.php b/locale/en-US/errors.php index 936f16af8..7eca12a00 100644 --- a/locale/en-US/errors.php +++ b/locale/en-US/errors.php @@ -1,4 +1,5 @@ phrasen['errors/rolleExistiertBereits']='This role is already selected'; +$this->phrasen['errors/achtung']='Attention!'; ?> diff --git a/locale/en-US/testtool.php b/locale/en-US/testtool.php index 1e87fea3f..6bb0fa982 100644 --- a/locale/en-US/testtool.php +++ b/locale/en-US/testtool.php @@ -46,4 +46,5 @@ $this->phrasen['testtool/fehlerBeimSpeichernDerErstansicht']='Error in saving th $this->phrasen['testtool/startDrueckenUmZuBeginnen']='To start this section, please click on Start section in the top left corner.'; $this->phrasen['testtool/keinPrueflingseintragVorhanden']='No candidate entry available.'; $this->phrasen['testtool/fuerFolgendeStgAngemeldet']='You have applied for the following degree programs:'; +$this->phrasen['testtool/invalideGebiete']='One or more question areas incorrect!
    Please inform an assisting person.'; ?> \ No newline at end of file diff --git a/skin/styles/tw.css b/skin/styles/tw.css index b9fca3cc7..7c0c4a452 100644 --- a/skin/styles/tw.css +++ b/skin/styles/tw.css @@ -461,6 +461,7 @@ td.HeaderTesttool /*fuer die Button-Optik beim Testtool*/ line-height: 25px; box-shadow: inset 0 0 2px #FFFFFF; padding: 10px; + width: 170px; } td.HeaderTesttoolSTG /*fuer die Button-Optik der Quereinstiegs-Studiengänge beim Testtool*/ { From dcdfbbe0d7f47169fd9e589125e6dbe2a71508b1 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 14 May 2019 15:50:04 +0200 Subject: [PATCH 29/84] - Added new constants LANG_SESSION_NAME and LANG_SESSION_INDEXES to constants.php - Added new function getPhraseByLanguage to helpers/hlp_language_helper.php --- application/config/constants.php | 8 +++ application/helpers/hlp_language_helper.php | 58 ++++++++++++++++++++- application/models/system/Sprache_model.php | 2 +- 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/application/config/constants.php b/application/config/constants.php index 77f28b830..ac2ecc649 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -58,6 +58,14 @@ define('AUTH_INVALID_CREDENTIALS', 2); define('LDAP_NO_USER_DN', 10); define('LDAP_TOO_MANY_USER_DN', 11); +/* +|-------------------------------------------------------------------------- +| Language constants +|-------------------------------------------------------------------------- +*/ +define('LANG_SESSION_NAME', 'LANGUAGE'); +define('LANG_SESSION_INDEXES', 'LANGUAGE_INDEXES'); + /* |-------------------------------------------------------------------------- | File and directory modes diff --git a/application/helpers/hlp_language_helper.php b/application/helpers/hlp_language_helper.php index d80175fa7..4dfb53c7b 100644 --- a/application/helpers/hlp_language_helper.php +++ b/application/helpers/hlp_language_helper.php @@ -13,7 +13,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); // ------------------------------------------------------------------------ -// Functions needed to manage the user language preference +// Functions needed to manage multi lingual contents // ------------------------------------------------------------------------ /** @@ -44,3 +44,59 @@ function getUserLanguage($language = null) return $language; } + +/** + * Function to retrieve a phrase from an array of phrases (same phrase in more languages) using the given language as parameter + * The given $phraseLanguagesArray parameter contains more translations of the same phrase + * $language parameter contains the language used to get the phrase + * The first time this function is called an array, that has the language as its key and the language index as its value, + * is retrived from database and then stored in the user session. + * All subsequent calls retrieves this array from the session itself. + */ +function getPhraseByLanguage($phraseLanguagesArray, $language) +{ + $phrase = null; + $ci =& get_instance(); // get CI instance + + // Try to get the language session + $langArray = getSessionElement(LANG_SESSION_NAME, LANG_SESSION_INDEXES); + if ($langArray == null) // If not already loaded in session + { + // Loads the Sprache_model to retrieve the language settings from the DB + // NOTE: Stores the loaded model with the alias SpracheModelLanguage to avoid to overwrite + // an already loaded SpracheModel used somewhere else + $ci->load->model('system/Sprache_model', 'SpracheModelLanguage'); + + // Add order clause by index and select only the sprache column + $ci->SpracheModelLanguage->addOrder('index'); + $ci->SpracheModelLanguage->addSelect('sprache'); + + // Retrieves from public.tbl_sprache + $dbLanguages = $ci->SpracheModelLanguage->load(); + if (hasData($dbLanguages)) // If everything is ok and contains data + { + $index = 0; // Incremental integer + $languageIndexes = array(); // Array that will contains languages and their indexes + + // Loops through database results + foreach (getData($dbLanguages) as $dbLanguage) + { + $languageIndexes[$dbLanguage->sprache] = $index++; // set $languageIndexes array elements + } + } + + $langArray = $languageIndexes; // copy $languageIndexes to $langArray + // Set session element $_SESSION['LANG']['LANG_INDEXES'] with $languageIndexes + setSessionElement(LANG_SESSION_NAME, LANG_SESSION_INDEXES, $langArray); + } + + // Checks to avoid ugly php error messages + if (!isEmptyArray($phraseLanguagesArray) && !isEmptyArray($langArray) + && isset($langArray[$language]) && isset($phraseLanguagesArray[$langArray[$language]])) + { + // If everything is ok then set phrase + $phrase = $phraseLanguagesArray[$langArray[$language]]; + } + + return $phrase; +} diff --git a/application/models/system/Sprache_model.php b/application/models/system/Sprache_model.php index 30736f0c8..202157a83 100644 --- a/application/models/system/Sprache_model.php +++ b/application/models/system/Sprache_model.php @@ -1,7 +1,7 @@ Date: Tue, 14 May 2019 16:34:37 +0200 Subject: [PATCH 30/84] Fixed to get question in language of the actual logged-in Master study When logging in with a Master study, the system was retrieving the studyplan/study of the highest priored applied Master study. This behaviour should only occure for Bachelor studies and was leading to incorrect language setting. Now if user logs in with a Master study, the actual studyplan/study and the correct language setting are retrieved. --- cis/testtool/login.php | 14 +++++++++++++- include/prestudent.class.php | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cis/testtool/login.php b/cis/testtool/login.php index 349e272e6..dd4115ed7 100644 --- a/cis/testtool/login.php +++ b/cis/testtool/login.php @@ -177,12 +177,24 @@ if (isset($_POST['prestudent']) && isset($gebdatum)) $_SESSION['sprache']=$stg_obj->sprache; $_SESSION['semester']=$semester; + $stg_obj->getStudiengangTyp($stg_obj->typ); // STG und Studienplan mit der höchsten Prio ermitteln $firstPrio_studienplan_id = ''; $firstPrio_studiengang_kz = ''; - $ps->getActualInteressenten($_POST['prestudent'], true); + // * wenn STG des eingeloggten Prestudenten vom Typ Bachelor ist, dann höchste Prio aller + // Bachelor-STG ermitteln, an denen die Person noch interessiert ist + // Wenn STG vom Typ Master, dann wird als firstPrio der STPL bzw. der STG des MasterSTG gesetzt. + if ($stg_obj->typ == 'b') + { + $ps->getActualInteressenten($_POST['prestudent'], true); + } + elseif ($stg_obj->typ == 'm') + { + $ps->getActualInteressenten($_POST['prestudent'], false, 'm', $studiengang); + } + foreach($ps->result as $row) { if(isset($row->studiengang_kz)) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 35d16dd0d..4304e5341 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -424,6 +424,8 @@ class prestudent extends person * Laedt über einen Prestudenten alle anderen Prestudenten einer Person, die aktuell an STG interessiert sind. * @integer $prestudent_id Prestudent ID, über die alle weiteren Prestudenten ermittelt werden sollen. * @boolean $prio Wenn true, dann wird nur der Prestudent mit dem am höchsten priorisierten Studiengang zurückgegeben. + * @string $typ Ergebnis nach STG-Typ filtern. + * @string $studiengang_kz Ergebnis nach STG-Kennzahl filtern. * return Objekt-Array mit allen Prestudenten einer Person, die aktuell an STG interessiert sind. */ public function getActualInteressenten($prestudent_id, $prio = false, $typ = NULL, $studiengang_kz = NULL) From 1121eb8352ba11f87e02d00e18f9f08c77f5262f Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 16 May 2019 12:58:59 +0200 Subject: [PATCH 31/84] - Updated composer.json and composer.lock - Changed phpci.yml to be used with the new CI machine --- composer.json | 3 - composer.lock | 97 +++------------------------------ phpci.yml | 148 ++++++++++++++++++++++++++++++++++---------------- 3 files changed, 111 insertions(+), 137 deletions(-) diff --git a/composer.json b/composer.json index 4dee6d438..d763dc5ad 100644 --- a/composer.json +++ b/composer.json @@ -278,9 +278,6 @@ "zetacomponents/workflow-database-tiein": "1.*", "zetacomponents/workflow-event-log-tiein": "1.*" }, - "require-dev": { - "squizlabs/php_codesniffer": "2.*" - }, "config": { "bin-dir": "vendor/bin" } diff --git a/composer.lock b/composer.lock index e22b4e733..8fc88ce07 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "5cc3ff3f9a49ae251ef22baabfd33768", - "content-hash": "7b2f22ffd076c3cf329fe7d2c01a174d", + "hash": "ddbbad487c655512e6983408339cb85f", + "content-hash": "b5902c71fe21cd14397101dba5a3080c", "packages": [ { "name": "BlackrockDigital/startbootstrap-sb-admin-2", @@ -2180,16 +2180,16 @@ }, { "name": "twig/twig", - "version": "v1.40.1", + "version": "v1.41.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "35889516bbd6bbe46a600c2c33b03515df4a076e" + "reference": "575cd5028362da591facde1ef5d7b94553c375c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/35889516bbd6bbe46a600c2c33b03515df4a076e", - "reference": "35889516bbd6bbe46a600c2c33b03515df4a076e", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/575cd5028362da591facde1ef5d7b94553c375c9", + "reference": "575cd5028362da591facde1ef5d7b94553c375c9", "shasum": "" }, "require": { @@ -2204,7 +2204,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.40-dev" + "dev-master": "1.41-dev" } }, "autoload": { @@ -2242,7 +2242,7 @@ "keywords": [ "templating" ], - "time": "2019-04-29 14:12:28" + "time": "2019-05-14 11:59:08" }, { "name": "zetacomponents/base", @@ -2630,86 +2630,7 @@ "time": "2007-12-17 09:04:44" } ], - "packages-dev": [ - { - "name": "squizlabs/php_codesniffer", - "version": "2.9.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2018-11-07 22:31:41" - } - ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/phpci.yml b/phpci.yml index b8942d4aa..1edfb36d4 100644 --- a/phpci.yml +++ b/phpci.yml @@ -1,55 +1,111 @@ +# Globally valid entries build_settings: - verbose: false - prefer_symlink: false - ignore: + ignore: # Ignores vendor and tests folders - "vendor" - "tests" - pgsql: - host: 'localhost;dbname=template1' - user: 'fhcomplete' - pass: 'fhcomplete' + pgsql: # PostgreSQL connection parameters + host: "localhost;dbname=template1" # Connects to the template1 database to be able to drop database fhcomplete + user: "fhcomplete" + pass: "fhcomplete" -setup: - composer: +setup: # First! + pgsql: # Close previous connections to database -> drop database -> create database + - "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'fhcomplete';" + - "DROP DATABASE IF EXISTS fhcomplete;" + - "CREATE DATABASE fhcomplete;" + composer: # Run composer to install all the required 3rd party software action: "install" - prefer_dist: true - no_dev: true - pgsql: - - "UPDATE pg_database SET datallowconn = 'false' WHERE datname = 'fhctest';" # Stops connections to database - - "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'fhctest';" # Close previous connections to database - - "DROP DATABASE IF EXISTS fhctest;" # Drops database - - "CREATE DATABASE fhctest OWNER fhcomplete;" # Creates database shell: - - "rm -f /var/www/html/build" # Remove the previous soft link, if exists, to the build directory - - "ln -s %BUILD_PATH% /var/www/html/build" # Create a new soft link to the actual build directory - # Copies configuration files - - "cp /home/phpci/config/*.inc.php %BUILD_PATH%/config/" - - "cp /home/phpci/config/*.php %BUILD_PATH%/application/config/" - - "cd %BUILD_PATH% && php index.ci.php DBTools migrate" # Install Database -test: - lint: - directories: - - "application/" - recursive: true - codeception: + # Install addons + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Abrechnung.git %BUILD_PATH%/addons/abrechnung" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Asterisk.git %BUILD_PATH%/addons/asterisk" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Aufnahme.git %BUILD_PATH%/addons/aufnahme" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Bewerbung.git %BUILD_PATH%/addons/bewerbung" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-CaseTime.git %BUILD_PATH%/addons/casetime" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-LDAP.git %BUILD_PATH%/addons/ldap" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Lehrmittel.git %BUILD_PATH%/addons/lehrmittel" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-LV-Evaluierung.git %BUILD_PATH%/addons/lvevaluierung" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-LVInfo.git %BUILD_PATH%/addons/lvinfo" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Kompetenzen.git %BUILD_PATH%/addons/kompetenzen" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Moodle.git %BUILD_PATH%/addons/moodle" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Reports.git %BUILD_PATH%/addons/reports" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Studiengangsverwaltung.git %BUILD_PATH%/addons/studiengangsverwaltung" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-Textbausteine.git %BUILD_PATH%/addons/textbausteine" + - "git clone --quiet https://github.com/FH-Complete/FHC-AddOn-WaWi.git %BUILD_PATH%/addons/wawi" + # Copy addons configs + - "cp -R /var/www/configs/fhc/abrechnung/* %BUILD_PATH%/addons/abrechnung" + - "cp -R /var/www/configs/fhc/asterisk/* %BUILD_PATH%/addons/asterisk" + - "cp -R /var/www/configs/fhc/bewerbung/* %BUILD_PATH%/addons/bewerbung" + - "cp -R /var/www/configs/fhc/casetime/* %BUILD_PATH%/addons/casetime" + - "cp -R /var/www/configs/fhc/lehrmittel/* %BUILD_PATH%/addons/lehrmittel" + - "cp -R /var/www/configs/fhc/lvinfo/* %BUILD_PATH%/addons/lvinfo" + - "cp -R /var/www/configs/fhc/reports/* %BUILD_PATH%/addons/reports" + - "cp -R /var/www/configs/fhc/wawi/* %BUILD_PATH%/addons/wawi" + # Copy core configs and .htaccess + - "cp -R /var/www/configs/fhc/configs/* ./config" + - "cp /var/www/configs/fhc/configs/.htaccess ./cis/private/" + - "cp /var/www/configs/fhc/configs/.htaccess ./content" + - "cp /var/www/configs/fhc/configs/.htaccess ./rdf" + - "cp /var/www/configs/fhc/configs/.htaccess ./system" + - "cp /var/www/configs/fhc/configs/.htaccess ./vilesci" + # Create core directories + - "mkdir documents" + - "mkdir documents/csv_import" + - "mkdir documents/dms" + - "mkdir documents/import" + - "mkdir documents/benotungstool" + - "mkdir paabgabe" + # Copy codeigniter configs + - "mkdir ./application/config/development" + - "cp -R /var/www/configs/ci/* ./application/config/development" + # Clone extensions + - "git clone --quiet https://github.com/FH-Complete/FHC-Core-MobilityOnline.git /tmp/FHC-Core-MobilityOnline" + - "git clone --quiet https://github.com/FH-Complete/FHC-Core-Budget.git /tmp/FHC-Core-Budget" + - "git clone --quiet https://github.com/FH-Complete/FHC-Core-DSMS.git /tmp/FHC-Core-DSMS" + - "git clone --quiet https://github.com/FH-Complete/FHC-Core-Nextcloud.git /tmp/FHC-Core-Nextcloud" + # Create extensions archives + - "tar cfzP /tmp/FHC-Core-MobilityOnline.tgz /tmp/FHC-Core-MobilityOnline/" + - "tar cfzP /tmp/FHC-Core-Budget.tgz /tmp/FHC-Core-Budget/" + - "tar cfzP /tmp/FHC-Core-DSMS.tgz /tmp/FHC-Core-DSMS/" + - "tar cfzP /tmp/FHC-Core-Nextcloud.tgz /tmp/FHC-Core-Nextcloud/" + # Install extensions + - "php index.ci.php system/extensions/CLI_Manager uploadExtension FHC-Core-MobilityOnline /tmp/FHC-Core-MobilityOnline.tgz" + - "php index.ci.php system/extensions/CLI_Manager uploadExtension FHC-Core-Budget /tmp/FHC-Core-Budget.tgz" + - "php index.ci.php system/extensions/CLI_Manager uploadExtension FHC-Core-DSMS /tmp/FHC-Core-DSMS.tgz" + - "php index.ci.php system/extensions/CLI_Manager uploadExtension FHC-Core-Nextcloud /tmp/FHC-Core-Nextcloud.tgz" + # Remove temporary files + - "rm -fR /tmp/FHC-Core-MobilityOnline*" + - "rm -fR /tmp/FHC-Core-Budget*" + - "rm -fR /tmp/FHC-Core-DSMS*" + - "rm -fR /tmp/FHC-Core-Nextcloud*" + # Change files permissions + - "chmod -R 0770 *" + - "find . -type f -exec chmod 0644 {} \\;" + # Create a symlink to the current build folder + - "ln -s %BUILD_PATH% ../fhcomplete" + +test: # Run tests + php_parallel_lint: # Lint + allow_failures: true + php_mess_detector: # Mess detector + allow_failures: true + php_cpd: # Copy/paste detector + allow_failures: true + php_code_sniffer: # Code sniffer + standard: "tests/codesniffer/FHComplete" + allow_failures: true + codeception: # Codeception config: "tests/codeception/" path: "tests/codeception/_output/" -# php_docblock_checker: -# path: "application/controllers/" -# allowed_warnings: 100 -# skip_classes: false -# php_code_sniffer: -# path: "application/controllers/" -# standard: "tests/codesniffer/FHComplete" -# allowed_errors: 200 -# allowed_warnings: 200 -# php_unit: -# directory: "tests/phpunit/" + allow_failures: true -complete: - pgsql: - - "UPDATE pg_database SET datallowconn = 'false' WHERE datname = 'fhctest';" # Stops connections to database - - "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'fhctest';" # Close previous connections to database - - "DROP DATABASE IF EXISTS fhctest;" # Drops database - shell: - - "rm -f /var/www/html/build" # Remove the previous soft link, if exists, to the build directory \ No newline at end of file +failure: # On failure + email: # Send an email to warn the team + default_mailto_address: systementwicklung@technikum-wien.at + +complete: # Last! + pgsql: # Close previous connections to database -> drop database + - "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'fhcomplete';" + - "DROP DATABASE IF EXISTS fhcomplete;" + shell: # Remove the previously created symlink + - "rm ../fhcomplete" From f7a4c5795b577e58a59bdec47c36ed1bdbfab00b Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 16 May 2019 17:27:38 +0200 Subject: [PATCH 32/84] =?UTF-8?q?-=20displaying=20Phrase=20"meine=20Reserv?= =?UTF-8?q?ierungen=20anzeigen"=20instead=20of=20"Meine=20Reservierungen?= =?UTF-8?q?=20l=C3=B6schen"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/lvplan/index.php | 2 +- locale/de-AT/lvplan.php | 1 + locale/en-US/lvplan.php | 1 + locale/it-IT/lvplan.php | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cis/private/lvplan/index.php b/cis/private/lvplan/index.php index 73f417adf..ddbddf586 100644 --- a/cis/private/lvplan/index.php +++ b/cis/private/lvplan/index.php @@ -346,7 +346,7 @@ function LoadGruppe(type) if ($raumres) { - echo '

    '.$p->t("lvplan/reservierungenLoeschen").'
    '; + echo '

    '.$p->t("lvplan/meineReservierungenAnzeigen").'
    '; } echo' diff --git a/locale/de-AT/lvplan.php b/locale/de-AT/lvplan.php index 4c386aa23..6f7d3b58c 100644 --- a/locale/de-AT/lvplan.php +++ b/locale/de-AT/lvplan.php @@ -10,6 +10,7 @@ $this->phrasen['lvplan/saal']='Saal'; $this->phrasen['lvplan/lektor']='LektorIn'; $this->phrasen['lvplan/reservierungsliste']='Reservierungsliste'; $this->phrasen['lvplan/reservierungenLoeschen']='Reservierungen löschen'; +$this->phrasen['lvplan/meineReservierungenAnzeigen']='Meine Reservierungen anzeigen'; $this->phrasen['lvplan/raumsuche']='Raumsuche'; $this->phrasen['lvplan/lehrverband']='Lehr-Verband'; $this->phrasen['lvplan/stg']='Stg'; diff --git a/locale/en-US/lvplan.php b/locale/en-US/lvplan.php index 2e098e41d..e40e1f9e0 100644 --- a/locale/en-US/lvplan.php +++ b/locale/en-US/lvplan.php @@ -10,6 +10,7 @@ $this->phrasen['lvplan/saal']='Room'; $this->phrasen['lvplan/lektor']='Lector'; $this->phrasen['lvplan/reservierungsliste']='Reservation list'; $this->phrasen['lvplan/reservierungenLoeschen']='Delete room reservations'; +$this->phrasen['lvplan/meineReservierungenAnzeigen']='Show my room reservations'; $this->phrasen['lvplan/raumsuche']='Room search'; $this->phrasen['lvplan/lehrverband']='Teaching Group'; $this->phrasen['lvplan/stg']='Dp'; //Degree Program diff --git a/locale/it-IT/lvplan.php b/locale/it-IT/lvplan.php index b16a4c013..026caf68e 100644 --- a/locale/it-IT/lvplan.php +++ b/locale/it-IT/lvplan.php @@ -57,6 +57,7 @@ $this->phrasen['lvplan/raumsuche']=''; $this->phrasen['lvplan/raumtyp']=''; $this->phrasen['lvplan/reservierungen']=''; $this->phrasen['lvplan/reservierungenLoeschen']=''; +$this->phrasen['lvplan/meineReservierungenAnzeigen']=''; $this->phrasen['lvplan/reservierungsliste']=''; $this->phrasen['lvplan/reservierungWurdeGeloescht']=''; $this->phrasen['lvplan/saal']=''; From c0b448125de7b37c4c13926916846144bd964c89 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 16 May 2019 17:32:34 +0200 Subject: [PATCH 33/84] CIS Wochenplan Reservierung update - Mitarbeiter autocomplete for reserving one hour for multiple Mitarbeiter at same time - possible to delete Reservations directly in Wochenplan --- cis/private/lvplan/lvplan_autocomplete.php | 24 ++++ cis/private/lvplan/stpl_week.php | 121 ++++++++++++++++++--- include/wochenplan.class.php | 99 ++++++++++++----- skin/styles/tw.css | 26 +++++ 4 files changed, 231 insertions(+), 39 deletions(-) diff --git a/cis/private/lvplan/lvplan_autocomplete.php b/cis/private/lvplan/lvplan_autocomplete.php index 1dec4a52b..d4ac826a3 100644 --- a/cis/private/lvplan/lvplan_autocomplete.php +++ b/cis/private/lvplan/lvplan_autocomplete.php @@ -21,6 +21,7 @@ require_once('../../../config/cis.config.inc.php'); require_once('../../../include/basis_db.class.php'); require_once('../../../include/benutzer.class.php'); +require_once('../../../include/mitarbeiter.class.php'); require_once('../../../include/studiengang.class.php'); require_once('../../../include/functions.inc.php'); require_once('../../../include/lehrverband.class.php'); @@ -56,7 +57,30 @@ switch($_REQUEST['autocomplete']) echo json_encode($result_obj); } break; + case 'mitarbeiter': + $search=trim((isset($_REQUEST['term']) ? $_REQUEST['term']:'')); + if (is_null($search) ||$search=='') + exit(); + $mitarbeiter = new mitarbeiter(); + $searchItems = explode(' ',$search); + + foreach ($searchItems as $searchItem) + { + if ($mitarbeiter->search($searchItem)) + { + $result_obj = array(); + foreach ($mitarbeiter->result as $row) + { + $item['vorname'] = html_entity_decode($row->vorname); + $item['nachname'] = html_entity_decode($row->nachname); + $item['uid'] = html_entity_decode($row->uid); + $result_obj[] = $item; + } + } + } + echo json_encode($result_obj); + break; case 'getSemester': $studiengang = new studiengang(); $data = array(); diff --git a/cis/private/lvplan/stpl_week.php b/cis/private/lvplan/stpl_week.php index c0ac5f152..d2c02dece 100644 --- a/cis/private/lvplan/stpl_week.php +++ b/cis/private/lvplan/stpl_week.php @@ -121,7 +121,7 @@ if (isset($_POST['titel'])) <?php echo $p->t('lvplan/lehrveranstaltungsplan').' '.CAMPUS_NAME;?> - + ")');}return l&&new g(l.contentWindow.document);},copyAttributes:function(l,m){var s=this;var n=s.$.attributes;m=m||{};for(var o=0;o0&&m)m=m.childNodes[l.shift()];return m?new d.node(m):null;},getChildCount:function(){return this.$.childNodes.length;},disableContextMenu:function(){this.on('contextmenu',function(l){if(!l.data.getTarget().hasClass('cke_enable_context_menu'))l.data.preventDefault();});},getDirection:function(l){var m=this;return l?m.getComputedStyle('direction')||m.getDirection()||m.getDocument().$.dir||m.getDocument().getBody().getDirection(1):m.getStyle('direction')||m.getAttribute('dir');},data:function(l,m){l='data-'+l;if(m===undefined)return this.getAttribute(l);else if(m===false)this.removeAttribute(l);else this.setAttribute(l,m);return null;}});var i={width:['border-left-width','border-right-width','padding-left','padding-right'],height:['border-top-width','border-bottom-width','padding-top','padding-bottom']}; -function j(l){var m=['top','left','right','bottom'],n;if(l=='border')n=['color','style','width'];var o=[];for(var p=0;p',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,templates,toolbar,undo,wsc,wysiwygarea',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000}; -var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getChild(1).addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language||k;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o){var p=typeof l=='string';if(p)l=[l];if(!n)n=a;var q=l.length,r=[],s=[],t=function(y){if(m)if(p)m.call(n,y);else m.call(n,r,s);};if(q===0){t(true);return;}var u=function(y,z){(z?r:s).push(y);if(--q<=0){o&&a.document.getDocumentElement().removeStyle('cursor');t(z);}},v=function(y,z){j[y]=1;var A=k[y];delete k[y];for(var B=0;B1)return;var A=new h('script');A.setAttributes({type:'text/javascript',src:y});if(m)if(c)A.$.onreadystatechange=function(){if(A.$.readyState=='loaded'||A.$.readyState=='complete'){A.$.onreadystatechange=null;v(y,true);}};else{A.$.onload=function(){setTimeout(function(){v(y,true);},0);};A.$.onerror=function(){v(y,false);};}A.appendTo(a.document.getHead());};o&&a.document.getDocumentElement().setStyle('cursor','wait');for(var x=0;x1)return;var w=!p.css||!p.css.length,x=!p.js||!p.js.length,y=function(){if(w&&x){p._isLoaded=1;for(var B=0;B=0?x.langCode:J[0];if(!I.langEntries||!I.langEntries[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.langEntries[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))",'g')};};(function(){var l=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){var A=this;var o,p,q=0,r;while(o=A._.htmlPartsRegex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s);if(r)r.push(t);else A.onText(t);}q=A._.htmlPartsRegex.lastIndex;if(p=o[1]){p=p.toLowerCase();if(r&&f.$cdata[p]){A.onCDATA(r.join(''));r=null;}if(!r){A.onTagClose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.toLowerCase();if(/="/.test(p))continue; -var u={},v,w=o[4],x=!!(w&&w.charAt(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].toLowerCase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}A.onTagOpen(p,u,x);if(!r&&f.$cdata[p])r=[];continue;}if(p=o[2])A.onComment(p);}if(n.length>q)A.onText(n.substring(q,n.length));}};})();a.htmlParser.comment=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.comment.prototype={type:8,writeHtml:function(l,m){var n=this.value;if(m){if(!(n=m.onComment(n,this)))return;if(typeof n!='string'){n.parent=this.parent;n.writeHtml(l,m);return;}}l.comment(n);}};(function(){a.htmlParser.text=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.text.prototype={type:3,writeHtml:function(l,m){var n=this.value;if(m&&!(n=m.onText(n,this)))return;l.text(n);}};})();(function(){a.htmlParser.cdata=function(l){this.value=l;};a.htmlParser.cdata.prototype={type:3,writeHtml:function(l){l.write(this.value);}};})();a.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var l=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),m=c&&b.version<8?{dd:1,dt:1}:{},n={ol:1,ul:1},o=e.extend({},{html:1},f.html,f.body,f.head,{style:1,script:1});function p(q){return q.name=='a'&&q.attributes.href||f.$removeEmpty[q.name];};a.htmlParser.fragment.fromHtml=function(q,r,s){var t=new a.htmlParser(),u=s||new a.htmlParser.fragment(),v=[],w=[],x=u,y=false,z=false;function A(D){var E;if(v.length>0)for(var F=0;F=0;E--){if(D==v[E].name){v.splice(E,1);return;}}var F=[],G=[],H=x;while(H!=u&&H.name!=D){if(!H._.isBlockLike)G.unshift(H);F.push(H);H=H.returnPoint||H.parent;}if(H!=u){for(E=0;E0?t.children[r-1]:null;if(s){if(q._.isBlockLike&&s.type==3){s.value=e.rtrim(s.value);if(s.value.length===0){t.children.pop();t.add(q);return;}}s.next=q;}q.previous=s;q.parent=t;t.children.splice(r,0,q);t._.hasInlineStarted=q.type==3||q.type==1&&!q._.isBlockLike;},writeHtml:function(q,r){var s;this.filterChildren=function(){var t=new a.htmlParser.basicWriter();this.writeChildrenHtml.call(this,t,r,true);var u=t.getHtml();this.children=new a.htmlParser.fragment.fromHtml(u).children;s=1;};!this.name&&r&&r.onFragment(this);this.writeChildrenHtml(q,s?null:r);},writeChildrenHtml:function(q,r){for(var s=0;sn?1:0;};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes);},writeHtml:function(m,n){var o=this.attributes,p=this,q=p.name,r,s,t,u;p.filterChildren=function(){if(!u){var B=new a.htmlParser.basicWriter();a.htmlParser.fragment.prototype.writeChildrenHtml.call(p,B,n);p.children=new a.htmlParser.fragment.fromHtml(B.getHtml(),0,p.clone()).children;u=1;}};if(n){for(;;){if(!(q=n.onElementName(q)))return;p.name=q;if(!(p=n.onElement(p)))return;p.parent=this.parent;if(p.name==q)break;if(p.type!=1){p.writeHtml(m,n);return;}q=p.name;if(!q){for(var v=0,w=this.children.length;v=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=q.type||q instanceof a.htmlParser.fragment;for(var s=0;s');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('');},write:function(l){this._.output.push(l); -},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.on('instanceDestroyed',function(){if(e.isEmpty(this.instances))a.fire('reset');});a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);d.domObject.call(this,l);};d.comment.prototype=new d.node();e.extend(d.comment.prototype,{type:8,getOuterHtml:function(){return '';}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1,legend:1,caption:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,form:1,fieldset:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q0)v=v.getChild(z-1);else v=A(v,true)===false?null:v.getPreviousSourceNode(true,C,A);}else{v=w;if(v.type==1)if(!(v=v.getChild(y)))v=A(w,true)===false?null:w.getNextSourceNode(true,C,A);}if(v&&A(v)===false)v=null;}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!t)return v;}else if(t&&this.evaluator)return false;v=v[D](false,C,A);}this.end();return this.current=null;};function m(s){var t,u=null;while(t=l.call(this,s))u=t;return u;};d.walker=e.createClass({$:function(s){this.range=s;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,1);},checkForward:function(){return l.call(this,0,1)!==false;},checkBackward:function(){return l.call(this,1,1)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,1);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1};h.prototype.isBlockBoundary=function(s){var t=s?e.extend({},f.$block,s||{}):f.$block; -return this.getComputedStyle('float')=='none'&&n[this.getComputedStyle('display')]||t[this.getName()];};d.walker.blockBoundary=function(s){return function(t,u){return!(t.type==1&&t.isBlockBoundary(s));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmark=function(s,t){function u(v){return v&&v.getName&&v.getName()=='span'&&v.data('cke-bookmark');};return function(v){var w,x;w=v&&!v.getName&&(x=v.getParent())&&u(x);w=s?w:w||u(v);return!!(t^w);};};d.walker.whitespaces=function(s){return function(t){var u;if(t&&t.type==3)u=!e.trim(t.getText())||b.webkit&&t.getText()=='​';return!!(s^u);};};d.walker.invisible=function(s){var t=d.walker.whitespaces();return function(u){var v;if(t(u))v=1;else{if(u.type==3)u=u.getParent();v=!u.$.offsetHeight;}return!!(s^v);};};d.walker.nodeType=function(s,t){return function(u){return!!(t^u.type==s);};};d.walker.bogus=function(s){function t(u){return!p(u)&&!q(u);};return function(u){var v=!c?u.is&&u.is('br'):u.getText&&o.test(u.getText());if(v){var w=u.getParent(),x=u.getNext(t);v=w.isBlockBoundary()&&(!x||x.type==1&&x.isBlockBoundary());}return!!(s^v);};};var o=/^[\t\r\n ]*(?: |\xa0)$/,p=d.walker.whitespaces(),q=d.walker.bookmark(),r=function(s){return q(s)||p(s)||s.type==1&&s.getName() in f.$inline&&!(s.getName() in f.$empty);};h.prototype.getBogus=function(){var s=this;do s=s.getPreviousSourceNode();while(r(s));if(s&&(!c?s.is&&s.is('br'):s.getText&&o.test(s.getText())))return s;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(v){v.collapsed=v.startContainer&&v.endContainer&&v.startContainer.equals(v.endContainer)&&v.startOffset==v.endOffset;},m=function(v,w,x,y){v.optimizeBookmark();var z=v.startContainer,A=v.endContainer,B=v.startOffset,C=v.endOffset,D,E;if(A.type==3)A=A.split(C);else if(A.getChildCount()>0)if(C>=A.getChildCount()){A=A.append(v.document.createText(''));E=true;}else A=A.getChild(C);if(z.type==3){z.split(B);if(z.equals(A))A=z.getNext();}else if(!B){z=z.getFirst().insertBeforeMe(v.document.createText(''));D=true;}else if(B>=z.getChildCount()){z=z.append(v.document.createText(''));D=true;}else z=z.getChild(B).getPrevious();var F=z.getParents(),G=A.getParents(),H,I,J;for(H=0;H0&&!L.equals(A))M=K.append(L.clone());if(!F[Q]||L.$.parentNode!=F[Q].$.parentNode){N=L.getPrevious();while(N){if(N.equals(F[Q])||N.equals(z))break;O=N.getPrevious();if(w==2)K.$.insertBefore(N.$.cloneNode(true),K.$.firstChild);else{N.remove();if(w==1)K.$.insertBefore(N.$,K.$.firstChild);}N=O;}}if(K)K=M;}if(w==2){var R=v.startContainer;if(R.type==3){R.$.data+=R.$.nextSibling.data;R.$.parentNode.removeChild(R.$.nextSibling);}var S=v.endContainer;if(S.type==3&&S.$.nextSibling){S.$.data+=S.$.nextSibling.data;S.$.parentNode.removeChild(S.$.nextSibling);}}else{if(I&&J&&(z.$.parentNode!=I.$.parentNode||A.$.parentNode!=J.$.parentNode)){var T=J.getIndex();if(D&&J.$.parentNode==z.$.parentNode)T--;if(y&&I.type==1){var U=h.createFromHtml(' ',v.document);U.insertAfter(I);I.mergeSiblings(false);v.moveToBookmark({startNode:U});}else v.setStart(J.getParent(),T);}v.collapse(true);}if(D)z.remove();if(E&&A.$.parentNode)A.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(){var v=false,w=d.walker.whitespaces(),x=d.walker.bookmark(true),y=d.walker.bogus();return function(z){if(x(z)||w(z))return true;if(y(z)&&!v){v=true;return true;}if(z.type==3&&(z.hasAscendant('pre')||e.trim(z.getText()).length))return false;if(z.type==1&&!n[z.getName()])return false;return true;};};var p=d.walker.bogus();function q(v){var w=d.walker.whitespaces(),x=d.walker.bookmark(1);return function(y){if(x(y)||w(y))return true;return!v&&p(y)||y.type==1&&y.getName() in f.$removeEmpty;};};var r=new d.walker.whitespaces(),s=new d.walker.bookmark(),t=/^[\t\r\n ]*(?: |\xa0)$/;function u(v){return!r(v)&&!s(v);};d.range.prototype={clone:function(){var w=this;var v=new d.range(w.document);v.startContainer=w.startContainer;v.startOffset=w.startOffset;v.endContainer=w.endContainer;v.endOffset=w.endOffset;v.collapsed=w.collapsed;return v;},collapse:function(v){var w=this;if(v){w.endContainer=w.startContainer;w.endOffset=w.startOffset;}else{w.startContainer=w.endContainer;w.startOffset=w.endOffset;}w.collapsed=true;},cloneContents:function(){var v=new d.documentFragment(this.document);if(!this.collapsed)m(this,2,v);return v;},deleteContents:function(v){if(this.collapsed)return; -m(this,0,null,v);},extractContents:function(v){var w=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,w,v);return w;},createBookmark:function(v){var B=this;var w,x,y,z,A=B.collapsed;w=B.document.createElement('span');w.data('cke-bookmark',1);w.setStyle('display','none');w.setHtml(' ');if(v){y='cke_bm_'+e.getNextNumber();w.setAttribute('id',y+(A?'C':'S'));}if(!A){x=w.clone();x.setHtml(' ');if(v)x.setAttribute('id',y+'E');z=B.clone();z.collapse();z.insertNode(x);}z=B.clone();z.collapse(true);z.insertNode(w);if(x){B.setStartAfter(w);B.setEndBefore(x);}else B.moveToPosition(w,4);return{startNode:v?y+(A?'C':'S'):w,endNode:v?y+'E':x,serializable:v,collapsed:A};},createBookmark2:function(v){var D=this;var w=D.startContainer,x=D.endContainer,y=D.startOffset,z=D.endOffset,A=D.collapsed,B,C;if(!w||!x)return{start:0,end:0};if(v){if(w.type==1){B=w.getChild(y);if(B&&B.type==3&&y>0&&B.getPrevious().type==3){w=B;y=0;}if(B&&B.type==1)y=B.getIndex(1);}while(w.type==3&&(C=w.getPrevious())&&C.type==3){w=C;y+=C.getLength();}if(!A){if(x.type==1){B=x.getChild(z);if(B&&B.type==3&&z>0&&B.getPrevious().type==3){x=B;z=0;}if(B&&B.type==1)z=B.getIndex(1);}while(x.type==3&&(C=x.getPrevious())&&C.type==3){x=C;z+=C.getLength();}}}return{start:w.getAddress(v),end:A?null:x.getAddress(v),startOffset:y,endOffset:z,normalized:v,collapsed:A,is2:true};},moveToBookmark:function(v){var D=this;if(v.is2){var w=D.document.getByAddress(v.start,v.normalized),x=v.startOffset,y=v.end&&D.document.getByAddress(v.end,v.normalized),z=v.endOffset;D.setStart(w,x);if(y)D.setEnd(y,z);else D.collapse(true);}else{var A=v.serializable,B=A?D.document.getById(v.startNode):v.startNode,C=A?D.document.getById(v.endNode):v.endNode;D.setStartBefore(B);B.remove();if(C){D.setEndBefore(C);C.remove();}else D.collapse(true);}},getBoundaryNodes:function(){var A=this;var v=A.startContainer,w=A.endContainer,x=A.startOffset,y=A.endOffset,z;if(v.type==1){z=v.getChildCount();if(z>x)v=v.getChild(x);else if(z<1)v=v.getPreviousSourceNode();else{v=v.$;while(v.lastChild)v=v.lastChild;v=new d.node(v);v=v.getNextSourceNode()||v;}}if(w.type==1){z=w.getChildCount();if(z>y)w=w.getChild(y).getPreviousSourceNode(true);else if(z<1)w=w.getPreviousSourceNode();else{w=w.$;while(w.lastChild)w=w.lastChild;w=new d.node(w);}}if(v.getPosition(w)&2)v=w;return{startNode:v,endNode:w};},getCommonAncestor:function(v,w){var A=this;var x=A.startContainer,y=A.endContainer,z;if(x.equals(y)){if(v&&x.type==1&&A.startOffset==A.endOffset-1)z=x.getChild(A.startOffset); -else z=x;}else z=x.getCommonAncestor(y);return w&&!z.is?z.getParent():z;},optimize:function(){var x=this;var v=x.startContainer,w=x.startOffset;if(v.type!=1)if(!w)x.setStartBefore(v);else if(w>=v.getLength())x.setStartAfter(v);v=x.endContainer;w=x.endOffset;if(v.type!=1)if(!w)x.setEndBefore(v);else if(w>=v.getLength())x.setEndAfter(v);},optimizeBookmark:function(){var x=this;var v=x.startContainer,w=x.endContainer;if(v.is&&v.is('span')&&v.data('cke-bookmark'))x.setStartAt(v,3);if(w&&w.is&&w.is('span')&&w.data('cke-bookmark'))x.setEndAt(w,4);},trim:function(v,w){var D=this;var x=D.startContainer,y=D.startOffset,z=D.collapsed;if((!v||z)&&x&&x.type==3){if(!y){y=x.getIndex();x=x.getParent();}else if(y>=x.getLength()){y=x.getIndex()+1;x=x.getParent();}else{var A=x.split(y);y=x.getIndex()+1;x=x.getParent();if(D.startContainer.equals(D.endContainer))D.setEnd(A,D.endOffset-D.startOffset);else if(x.equals(D.endContainer))D.endOffset+=1;}D.setStart(x,y);if(z){D.collapse(true);return;}}var B=D.endContainer,C=D.endOffset;if(!(w||z)&&B&&B.type==3){if(!C){C=B.getIndex();B=B.getParent();}else if(C>=B.getLength()){C=B.getIndex()+1;B=B.getParent();}else{B.split(C);C=B.getIndex()+1;B=B.getParent();}D.setEnd(B,C);}},enlarge:function(v,w){switch(v){case 1:if(this.collapsed)return;var x=this.getCommonAncestor(),y=this.document.getBody(),z,A,B,C,D,E=false,F,G,H=this.startContainer,I=this.startOffset;if(H.type==3){if(I){H=!e.trim(H.substring(0,I)).length&&H;E=!!H;}if(H)if(!(C=H.getPrevious()))B=H.getParent();}else{if(I)C=H.getChild(I-1)||H.getLast();if(!C)B=H;}while(B||C){if(B&&!C){if(!D&&B.equals(x))D=true;if(!y.contains(B))break;if(!E||B.getComputedStyle('display')!='inline'){E=false;if(D)z=B;else this.setStartBefore(B);}C=B.getPrevious();}while(C){F=false;if(C.type==8){C=C.getPrevious();continue;}else if(C.type==3){G=C.getText();if(/[^\s\ufeff]/.test(G))C=null;F=/[\s\ufeff]$/.test(G);}else if((C.$.offsetWidth>0||w&&C.is('br'))&&!C.data('cke-bookmark'))if(E&&f.$removeEmpty[C.getName()]){G=C.getText();if(/[^\s\ufeff]/.test(G))C=null;else{var J=C.$.getElementsByTagName('*');for(var K=0,L;L=J[K++];){if(!f.$removeEmpty[L.nodeName.toLowerCase()]){C=null;break;}}}if(C)F=!!G.length;}else C=null;if(F)if(E){if(D)z=B;else if(B)this.setStartBefore(B);}else E=true;if(C){var M=C.getPrevious();if(!B&&!M){B=C;C=null;break;}C=M;}else B=null;}if(B)B=B.getParent();}H=this.endContainer;I=this.endOffset;B=C=null;D=E=false;if(H.type==3){H=!e.trim(H.substring(I)).length&&H;E=!(H&&H.getLength());if(H)if(!(C=H.getNext()))B=H.getParent(); -}else{C=H.getChild(I);if(!C)B=H;}while(B||C){if(B&&!C){if(!D&&B.equals(x))D=true;if(!y.contains(B))break;if(!E||B.getComputedStyle('display')!='inline'){E=false;if(D)A=B;else if(B)this.setEndAfter(B);}C=B.getNext();}while(C){F=false;if(C.type==3){G=C.getText();if(/[^\s\ufeff]/.test(G))C=null;F=/^[\s\ufeff]/.test(G);}else if(C.type==1){if((C.$.offsetWidth>0||w&&C.is('br'))&&!C.data('cke-bookmark'))if(E&&f.$removeEmpty[C.getName()]){G=C.getText();if(/[^\s\ufeff]/.test(G))C=null;else{J=C.$.getElementsByTagName('*');for(K=0;L=J[K++];){if(!f.$removeEmpty[L.nodeName.toLowerCase()]){C=null;break;}}}if(C)F=!!G.length;}else C=null;}else F=1;if(F)if(E)if(D)A=B;else this.setEndAfter(B);if(C){M=C.getNext();if(!B&&!M){B=C;C=null;break;}C=M;}else B=null;}if(B)B=B.getParent();}if(z&&A){x=z.contains(A)?A:z;this.setStartBefore(x);this.setEndAfter(x);}break;case 2:case 3:var N=new d.range(this.document);y=this.document.getBody();N.setStartAt(y,1);N.setEnd(this.startContainer,this.startOffset);var O=new d.walker(N),P,Q,R=d.walker.blockBoundary(v==3?{br:1}:null),S=function(Y){var Z=R(Y);if(!Z)P=Y;return Z;},T=function(Y){var Z=S(Y);if(!Z&&Y.is&&Y.is('br'))Q=Y;return Z;};O.guard=S;B=O.lastBackward();P=P||y;this.setStartAt(P,!P.is('br')&&(!B&&this.checkStartOfBlock()||B&&P.contains(B))?1:4);if(v==3){var U=this.clone();O=new d.walker(U);var V=d.walker.whitespaces(),W=d.walker.bookmark();O.evaluator=function(Y){return!V(Y)&&!W(Y);};var X=O.previous();if(X&&X.type==1&&X.is('br'))return;}N=this.clone();N.collapse();N.setEndAt(y,2);O=new d.walker(N);O.guard=v==3?T:S;P=null;B=O.lastForward();P=P||y;this.setEndAt(P,!B&&this.checkEndOfBlock()||B&&P.contains(B)?2:3);if(Q)this.setEndAfter(Q);}},shrink:function(v,w){if(!this.collapsed){v=v||2;var x=this.clone(),y=this.startContainer,z=this.endContainer,A=this.startOffset,B=this.endOffset,C=this.collapsed,D=1,E=1;if(y&&y.type==3)if(!A)x.setStartBefore(y);else if(A>=y.getLength())x.setStartAfter(y);else{x.setStartBefore(y);D=0;}if(z&&z.type==3)if(!B)x.setEndBefore(z);else if(B>=z.getLength())x.setEndAfter(z);else{x.setEndAfter(z);E=0;}var F=new d.walker(x),G=d.walker.bookmark();F.evaluator=function(K){return K.type==(v==1?1:3);};var H;F.guard=function(K,L){if(G(K))return true;if(v==1&&K.type==3)return false;if(L&&K.equals(H))return false;if(!L&&K.type==1)H=K;return true;};if(D){var I=F[v==1?'lastForward':'next']();I&&this.setStartAt(I,w?1:3);}if(E){F.reset();var J=F[v==1?'lastBackward':'previous']();J&&this.setEndAt(J,w?2:4);}return!!(D||E); -}},insertNode:function(v){var z=this;z.optimizeBookmark();z.trim(false,true);var w=z.startContainer,x=z.startOffset,y=w.getChild(x);if(y)v.insertBefore(y);else w.append(v);if(v.getParent().equals(z.endContainer))z.endOffset++;z.setStartBefore(v);},moveToPosition:function(v,w){this.setStartAt(v,w);this.collapse(true);},selectNodeContents:function(v){this.setStart(v,0);this.setEnd(v,v.type==3?v.getLength():v.getChildCount());},setStart:function(v,w){var x=this;if(v.type==1&&f.$empty[v.getName()])w=v.getIndex(),v=v.getParent();x.startContainer=v;x.startOffset=w;if(!x.endContainer){x.endContainer=v;x.endOffset=w;}l(x);},setEnd:function(v,w){var x=this;if(v.type==1&&f.$empty[v.getName()])w=v.getIndex()+1,v=v.getParent();x.endContainer=v;x.endOffset=w;if(!x.startContainer){x.startContainer=v;x.startOffset=w;}l(x);},setStartAfter:function(v){this.setStart(v.getParent(),v.getIndex()+1);},setStartBefore:function(v){this.setStart(v.getParent(),v.getIndex());},setEndAfter:function(v){this.setEnd(v.getParent(),v.getIndex()+1);},setEndBefore:function(v){this.setEnd(v.getParent(),v.getIndex());},setStartAt:function(v,w){var x=this;switch(w){case 1:x.setStart(v,0);break;case 2:if(v.type==3)x.setStart(v,v.getLength());else x.setStart(v,v.getChildCount());break;case 3:x.setStartBefore(v);break;case 4:x.setStartAfter(v);}l(x);},setEndAt:function(v,w){var x=this;switch(w){case 1:x.setEnd(v,0);break;case 2:if(v.type==3)x.setEnd(v,v.getLength());else x.setEnd(v,v.getChildCount());break;case 3:x.setEndBefore(v);break;case 4:x.setEndAfter(v);}l(x);},fixBlock:function(v,w){var z=this;var x=z.createBookmark(),y=z.document.createElement(w);z.collapse(v);z.enlarge(2);z.extractContents().appendTo(y);y.trim();if(!c)y.appendBogus();z.insertNode(y);z.moveToBookmark(x);return y;},splitBlock:function(v){var F=this;var w=new d.elementPath(F.startContainer),x=new d.elementPath(F.endContainer),y=w.blockLimit,z=x.blockLimit,A=w.block,B=x.block,C=null;if(!y.equals(z))return null;if(v!='br'){if(!A){A=F.fixBlock(true,v);B=new d.elementPath(F.endContainer).block;}if(!B)B=F.fixBlock(false,v);}var D=A&&F.checkStartOfBlock(),E=B&&F.checkEndOfBlock();F.deleteContents();if(A&&A.equals(B))if(E){C=new d.elementPath(F.startContainer);F.moveToPosition(B,4);B=null;}else if(D){C=new d.elementPath(F.startContainer);F.moveToPosition(A,3);A=null;}else{B=F.splitElement(A);if(!c&&!A.is('ul','ol'))A.appendBogus();}return{previousBlock:A,nextBlock:B,wasStartOfBlock:D,wasEndOfBlock:E,elementPath:C};},splitElement:function(v){var y=this; -if(!y.collapsed)return null;y.setEndAt(v,2);var w=y.extractContents(),x=v.clone(false);w.appendTo(x);x.insertAfter(v);y.moveToPosition(v,4);return x;},checkBoundaryOfElement:function(v,w){var x=w==1,y=this.clone();y.collapse(x);y[x?'setStartAt':'setEndAt'](v,x?1:2);var z=new d.walker(y);z.evaluator=q(x);return z[x?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var B=this;var v=B.startContainer,w=B.startOffset;if(c&&w&&v.type==3){var x=e.ltrim(v.substring(0,w));if(t.test(x))B.trim(0,1);}var y=new d.elementPath(B.startContainer),z=B.clone();z.collapse(true);z.setStartAt(y.block||y.blockLimit,1);var A=new d.walker(z);A.evaluator=o();return A.checkBackward();},checkEndOfBlock:function(){var B=this;var v=B.endContainer,w=B.endOffset;if(c&&v.type==3){var x=e.rtrim(v.substring(w));if(t.test(x))B.trim(1,0);}var y=new d.elementPath(B.endContainer),z=B.clone();z.collapse(false);z.setEndAt(y.block||y.blockLimit,2);var A=new d.walker(z);A.evaluator=o();return A.checkForward();},getPreviousNode:function(v,w,x){var y=this.clone();y.collapse(1);y.setStartAt(x||this.document.getBody(),1);var z=new d.walker(y);z.evaluator=v;z.guard=w;return z.previous();},getNextNode:function(v,w,x){var y=this.clone();y.collapse();y.setEndAt(x||this.document.getBody(),2);var z=new d.walker(y);z.evaluator=v;z.guard=w;return z.next();},checkReadOnly:(function(){function v(w,x){while(w){if(w.type==1)if(w.getAttribute('contentEditable')=='false'&&!w.data('cke-editable'))return 0;else if(w.is('html')||w.getAttribute('contentEditable')=='true'&&(w.contains(x)||w.equals(x)))break;w=w.getParent();}return 1;};return function(){var w=this.startContainer,x=this.endContainer;return!(v(w,x)&&v(x,w));};})(),moveToElementEditablePosition:function(v,w){function x(z,A){var B;if(z.type==1&&z.isEditable(false))B=z[w?'getLast':'getFirst'](u);if(!A&&!B)B=z[w?'getPrevious':'getNext'](u);return B;};if(v.type==1&&!v.isEditable(false)){this.moveToPosition(v,w?4:3);return true;}var y=0;while(v){if(v.type==3){if(w&&this.checkEndOfBlock()&&t.test(v.getText()))this.moveToPosition(v,3);else this.moveToPosition(v,w?4:3);y=1;break;}if(v.type==1)if(v.isEditable()){this.moveToPosition(v,w?2:1);y=1;}else if(w&&v.is('br')&&this.checkEndOfBlock())this.moveToPosition(v,3);v=x(v,y);}return!!y;},moveToElementEditStart:function(v){return this.moveToElementEditablePosition(v);},moveToElementEditEnd:function(v){return this.moveToElementEditablePosition(v,true);},getEnclosedNode:function(){var v=this.clone();v.optimize(); -if(v.startContainer.type!=1||v.endContainer.type!=1)return null;var w=new d.walker(v),x=d.walker.bookmark(true),y=d.walker.whitespaces(true),z=function(B){return y(B)&&x(B);};v.evaluator=z;var A=w.next();w.reset();return A&&A.equals(w.previous())?A:null;},getTouchedStartNode:function(){var v=this.startContainer;if(this.collapsed||v.type!=1)return v;return v.getChild(this.startOffset)||v;},getTouchedEndNode:function(){var v=this.endContainer;if(this.collapsed||v.type!=1)return v;return v.getChild(this.endOffset-1)||v;}};})();a.POSITION_AFTER_START=1;a.POSITION_BEFORE_END=2;a.POSITION_BEFORE_START=3;a.POSITION_AFTER_END=4;a.ENLARGE_ELEMENT=1;a.ENLARGE_BLOCK_CONTENTS=2;a.ENLARGE_LIST_ITEM_CONTENTS=3;a.START=1;a.END=2;a.STARTEND=3;a.SHRINK_ELEMENT=1;a.SHRINK_TEXT=2;(function(){d.rangeList=function(n){if(n instanceof d.rangeList)return n;if(!n)n=[];else if(n instanceof d.range)n=[n];return e.extend(n,l);};var l={createIterator:function(){var n=this,o=d.walker.bookmark(),p=function(s){return!(s.is&&s.is('tr'));},q=[],r;return{getNextRange:function(s){r=r==undefined?0:r+1;var t=n[r];if(t&&n.length>1){if(!r)for(var u=n.length-1;u>=0;u--)q.unshift(n[u].createBookmark(true));if(s){var v=0;while(n[r+v+1]){var w=t.document,x=0,y=w.getById(q[v].endNode),z=w.getById(q[v+1].startNode),A;while(1){A=y.getNextSourceNode(false);if(!z.equals(A)){if(o(A)||A.type==1&&A.isBlockBoundary()){y=A;continue;}}else x=1;break;}if(!x)break;v++;}}t.moveToBookmark(q.shift());while(v--){A=n[++r];A.moveToBookmark(q.shift());t.setEnd(A.endContainer,A.endOffset);}}return t;}};},createBookmarks:function(n){var s=this;var o=[],p;for(var q=0;q',a.document);l.appendTo(a.document.getHead());try{b.hc=l.getComputedStyle('border-top-color')==l.getComputedStyle('border-right-color');}catch(m){b.hc=false;}if(b.hc)b.cssClass+=' cke_hc';l.remove();})();j.load(i.corePlugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m0){z=A.shift();while(!z.getParent().equals(D))z=z.getParent();if(!z.equals(H))E.push(z);H=z;}while(E.length>0){z=E.shift();if(z.getName()=='blockquote'){var I=new d.documentFragment(q.document);while(z.getFirst()){I.append(z.getFirst().remove());A.push(I.getLast());}I.replace(z);}else A.push(z);}var J=q.document.createElement('blockquote');J.insertBefore(A[0]);while(A.length>0){z=A.shift();J.append(z);}}else if(r==1){var K=[],L={};while(z=y.getNextParagraph()){var M=null,N=null;while(z.getParent()){if(z.getParent().getName()=='blockquote'){M=z.getParent();N=z;break;}z=z.getParent();}if(M&&N&&!N.getCustomData('blockquote_moveout')){K.push(N);h.setMarker(L,N,'blockquote_moveout',true);}}h.clearAllMarkers(L);var O=[],P=[];L={};while(K.length>0){var Q=K.shift();J=Q.getParent();if(!Q.getPrevious())Q.remove().insertBefore(J);else if(!Q.getNext())Q.remove().insertAfter(J);else{Q.breakParent(Q.getParent());P.push(Q.getNext());}if(!J.getCustomData('blockquote_processed')){P.push(J);h.setMarker(L,J,'blockquote_processed',true);}O.push(Q);}h.clearAllMarkers(L);for(F=P.length-1;F>=0;F--){J=P[F];if(o(J))J.remove();}if(q.config.enterMode==2){var R=true;while(O.length){Q=O.shift();if(Q.getName()=='div'){I=new d.documentFragment(q.document);var S=R&&Q.getPrevious()&&!(Q.getPrevious().type==1&&Q.getPrevious().isBlockBoundary());if(S)I.append(q.document.createElement('br'));var T=Q.getNext()&&!(Q.getNext().type==1&&Q.getNext().isBlockBoundary());while(Q.getFirst())Q.getFirst().remove().appendTo(I);if(T)I.append(q.document.createElement('br'));I.replace(Q);R=false;}}}}s.selectBookmarks(u);q.focus();}};j.add('blockquote',{init:function(q){q.addCommand('blockquote',p);q.ui.addButton('Blockquote',{label:q.lang.blockquote,command:'blockquote'});q.on('selectionChange',n);},requires:['domiterator']});})();j.add('button',{beforeInit:function(m){m.ui.addHandler('button',k.button.handler);}});a.UI_BUTTON='button';k.button=function(m){e.extend(this,m,{title:m.label,className:m.className||m.command&&'cke_button_'+m.command||'',click:m.click||(function(n){n.execCommand(m.command); -})});this._={};};k.button.handler={create:function(m){return new k.button(m);}};(function(){k.button.prototype={render:function(m,n){var o=b,p=this._.id=e.getNextId(),q='',r=this.command,s;this._.editor=m;var t={id:p,button:this,editor:m,focus:function(){var z=a.document.getById(p);z.focus();},execute:function(){if(c&&b.version<7)e.setTimeout(function(){this.button.click(m);},0,this);else this.button.click(m);}},u=e.addFunction(function(z){if(t.onkey){z=new d.event(z);return t.onkey(t,z.getKeystroke())!==false;}}),v=e.addFunction(function(z){var A;if(t.onfocus)A=t.onfocus(t,new d.event(z))!==false;if(b.gecko&&b.version<10900)z.preventBubble();return A;});t.clickFn=s=e.addFunction(t.execute,t);if(this.modes){var w={};function x(){var z=m.mode;if(z){var A=this.modes[z]?w[z]!=undefined?w[z]:2:0;this.setState(m.readOnly&&!this.readOnly?0:A);}};m.on('beforeModeUnload',function(){if(m.mode&&this._.state!=0)w[m.mode]=this._.state;},this);m.on('mode',x,this);!this.readOnly&&m.on('readOnly',x,this);}else if(r){r=m.getCommand(r);if(r){r.on('state',function(){this.setState(r.state);},this);q+='cke_'+(r.state==1?'on':r.state==0?'disabled':'off');}}if(!r)q+='cke_off';if(this.className)q+=' '+this.className;n.push('','=10900&&!o.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+p+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(o.opera||o.gecko&&o.mac)n.push(' onkeypress="return false;"');if(o.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="return CKEDITOR.tools.callFunction(',u,', event);" onfocus="return CKEDITOR.tools.callFunction(',v,', event);" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',s,', this); return false;"> ',this.label,'');if(this.hasArrow)n.push(''+(b.hc?'▼':' ')+'');n.push('','');if(this.onRender)this.onRender();return t;},setState:function(m){if(this._.state==m)return false;this._.state=m;var n=a.document.getById(this._.id);if(n){n.setState(m); -m==0?n.setAttribute('aria-disabled',true):n.removeAttribute('aria-disabled');m==1?n.setAttribute('aria-pressed',true):n.removeAttribute('aria-pressed');return true;}else return false;}};})();k.prototype.addButton=function(m,n){this.add(m,'button',n);};(function(){var m=function(y,z){var A=y.document,B=A.getBody(),C=false,D=function(){C=true;};B.on(z,D);(b.version>7?A.$:A.$.selection.createRange()).execCommand(z);B.removeListener(z,D);return C;},n=c?function(y,z){return m(y,z);}:function(y,z){try{return y.document.$.execCommand(z,false,null);}catch(A){return false;}},o=function(y){var z=this;z.type=y;z.canUndo=z.type=='cut';z.startDisabled=true;};o.prototype={exec:function(y,z){this.type=='cut'&&t(y);var A=n(y,this.type);if(!A)alert(y.lang.clipboard[this.type+'Error']);return A;}};var p={canUndo:false,exec:c?function(y){y.focus();if(!y.document.getBody().fire('beforepaste')&&!m(y,'paste')){y.fire('pasteDialog');return false;}}:function(y){try{if(!y.document.getBody().fire('beforepaste')&&!y.document.$.execCommand('Paste',false,null))throw 0;}catch(z){setTimeout(function(){y.fire('pasteDialog');},0);return false;}}},q=function(y){if(this.mode!='wysiwyg')return;switch(y.data.keyCode){case 1114112+86:case 2228224+45:var z=this.document.getBody();if(b.opera||b.gecko)z.fire('paste');return;case 1114112+88:case 2228224+46:var A=this;this.fire('saveSnapshot');setTimeout(function(){A.fire('saveSnapshot');},0);}};function r(y){y.cancel();};function s(y,z,A){var B=this.document;if(B.getById('cke_pastebin'))return;if(z=='text'&&y.data&&y.data.$.clipboardData){var C=y.data.$.clipboardData.getData('text/plain');if(C){y.data.preventDefault();A(C);return;}}var D=this.getSelection(),E=new d.range(B),F=new h(z=='text'?'textarea':b.webkit?'body':'div',B);F.setAttribute('id','cke_pastebin');b.webkit&&F.append(B.createText('\xa0'));B.getBody().append(F);F.setStyles({position:'absolute',top:D.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});F.setStyle(this.config.contentsLangDirection=='ltr'?'left':'right','-1000px');var G=D.createBookmarks();this.on('selectionChange',r,null,null,0);if(z=='text')F.$.focus();else{E.setStartAt(F,1);E.setEndAt(F,2);E.select(true);}var H=this;window.setTimeout(function(){H.document.getBody().focus();H.removeListener('selectionChange',r);if(b.ie7Compat){D.selectBookmarks(G);F.remove();}else{F.remove();D.selectBookmarks(G);}var I;F=b.webkit&&(I=F.getFirst())&&I.is&&I.hasClass('Apple-style-span')?I:F;A(F['get'+(z=='text'?'Value':'Html')]()); -},0);};function t(y){if(!c||b.quirks)return;var z=y.getSelection(),A;if(z.getType()==3&&(A=z.getSelectedElement())){var B=z.getRanges()[0],C=y.document.createText('');C.insertBefore(A);B.setStartBefore(C);B.setEndAfter(A);z.selectRanges([B]);setTimeout(function(){if(A.getParent()){C.remove();z.selectElement(A);}},0);}};var u,v;function w(y,z){var A;if(v&&y in {Paste:1,Cut:1})return 0;if(y=='Paste'){c&&(u=1);try{A=z.document.$.queryCommandEnabled(y)||b.webkit;}catch(D){}u=0;}else{var B=z.getSelection(),C=B&&B.getRanges();A=B&&!(C.length==1&&C[0].collapsed);}return A?2:0;};function x(){var z=this;if(z.mode!='wysiwyg')return;var y=w('Paste',z);z.getCommand('cut').setState(w('Cut',z));z.getCommand('copy').setState(w('Copy',z));z.getCommand('paste').setState(y);z.fire('pasteState',y);};j.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(y){y.on('paste',function(A){var B=A.data;if(B.html)y.insertHtml(B.html);else if(B.text)y.insertText(B.text);setTimeout(function(){y.fire('afterPaste');},0);},null,null,1000);y.on('pasteDialog',function(A){setTimeout(function(){y.openDialog('paste');},0);});y.on('pasteState',function(A){y.getCommand('paste').setState(A.data);});function z(A,B,C,D){var E=y.lang[B];y.addCommand(B,C);y.ui.addButton(A,{label:E,command:B});if(y.addMenuItems)y.addMenuItem(B,{label:E,command:B,group:'clipboard',order:D});};z('Cut','cut',new o('cut'),1);z('Copy','copy',new o('copy'),4);z('Paste','paste',p,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));y.on('key',q,y);y.on('contentDom',function(){var A=y.document.getBody();A.on(!c?'paste':'beforepaste',function(B){if(u)return;var C=B.data&&B.data.$;if(c&&C&&!C.ctrlKey)return;var D={mode:'html'};y.fire('beforePaste',D);s.call(y,B,D.mode,function(E){if(!(E=e.trim(E.replace(/]+data-cke-bookmark[^<]*?<\/span>/ig,''))))return;var F={};F[D.mode]=E;y.fire('paste',F);});});if(c){A.on('contextmenu',function(){u=1;setTimeout(function(){u=0;},0);});A.on('paste',function(B){if(!y.document.getById('cke_pastebin')){B.data.preventDefault();u=0;p.exec(y);}});}A.on('beforecut',function(){!u&&t(y);});A.on('mouseup',function(){setTimeout(function(){x.call(y);},0);},y);A.on('keyup',x,y);});y.on('selectionChange',function(A){v=A.data.selection.getRanges()[0].checkReadOnly();x.call(y);});if(y.contextMenu)y.contextMenu.addListener(function(A,B){var C=B.getRanges()[0].checkReadOnly();return{cut:w('Cut',y),copy:w('Copy',y),paste:w('Paste',y)};});}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(m){var n=m.config,o=m.lang.colorButton,p; -if(!b.hc){q('TextColor','fore',o.textColorTitle);q('BGColor','back',o.bgColorTitle);}function q(t,u,v){var w=e.getNextId()+'_colorBox';m.ui.add(t,'panelbutton',{label:v,title:v,className:'cke_button_'+t.toLowerCase(),modes:{wysiwyg:1},panel:{css:m.skin.editor.css,attributes:{role:'listbox','aria-label':o.panelTitle}},onBlock:function(x,y){y.autoSize=true;y.element.addClass('cke_colorblock');y.element.setHtml(r(x,u,w));y.element.getDocument().getBody().setStyle('overflow','hidden');k.fire('ready',this);var z=y.keys,A=m.lang.dir=='rtl';z[A?37:39]='next';z[40]='next';z[9]='next';z[A?39:37]='prev';z[38]='prev';z[2228224+9]='prev';z[32]='click';},onOpen:function(){var x=m.getSelection(),y=x&&x.getStartElement(),z=new d.elementPath(y),A;y=z.block||z.blockLimit||m.document.getBody();do A=y&&y.getComputedStyle(u=='back'?'background-color':'color')||'transparent';while(u=='back'&&A=='transparent'&&y&&(y=y.getParent()));if(!A||A=='transparent')A='#ffffff';this._.panel._.iframe.getFrameDocument().getById(w).setStyle('background-color',A);}});};function r(t,u,v){var w=[],x=n.colorButton_colors.split(','),y=e.addFunction(function(E,F){if(E=='?'){var G=arguments.callee;function H(J){this.removeListener('ok',H);this.removeListener('cancel',H);J.name=='ok'&&G(this.getContentElement('picker','selectedColor').getValue(),F);};m.openDialog('colordialog',function(){this.on('ok',H);this.on('cancel',H);});return;}m.focus();t.hide(false);m.fire('saveSnapshot');new a.style(n['colorButton_'+F+'Style'],{color:'inherit'}).remove(m.document);if(E){var I=n['colorButton_'+F+'Style'];I.childRule=F=='back'?function(J){return s(J);}:function(J){return!(J.is('a')||J.getElementsByTag('a').count())||s(J);};new a.style(I,{color:E}).apply(m.document);}m.fire('saveSnapshot');});w.push('
    ',o.auto,'
    ');for(var z=0;z');var A=x[z].split('/'),B=A[0],C=A[1]||B;if(!A[1])B='#'+B.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var D=m.lang.colors[C]||C;w.push(''); -}if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push('');w.push('
    ',o.more,'
    ');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};j.colordialog={requires:['dialog'],init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);j.add('contextmenu',{requires:['menu'],onLoad:function(){j.contextMenu=e.createClass({base:a.menu,$:function(m){this.base.call(this,m,{panel:{className:m.skinClass+' cke_contextmenu',attributes:{'aria-label':m.lang.contextmenu.options}}});},proto:{addTarget:function(m,n){if(b.opera&&!('oncontextmenu' in document.body)){var o;m.on('mousedown',function(s){s=s.data;if(s.$.button!=2){if(s.getKeystroke()==1114112+1)m.fire('contextmenu',s);return;}if(n&&(b.mac?s.$.metaKey:s.$.ctrlKey))return;var t=s.getTarget();if(!o){var u=t.getDocument();o=u.createElement('input');o.$.type='button';u.getBody().append(o);}o.setAttribute('style','position:absolute;top:'+(s.$.clientY-2)+'px;left:'+(s.$.clientX-2)+'px;width:5px;height:5px;opacity:0.01');});m.on('mouseup',function(s){if(o){o.remove();o=undefined;m.fire('contextmenu',s.data);}});}m.on('contextmenu',function(s){var t=s.data;if(n&&(b.webkit?p:b.mac?t.$.metaKey:t.$.ctrlKey))return;t.preventDefault();var u=t.getTarget().getDocument().getDocumentElement(),v=t.$.clientX,w=t.$.clientY;e.setTimeout(function(){this.open(u,null,v,w);},c?200:0,this);},this);if(b.opera)m.on('keypress',function(s){var t=s.data;if(t.$.keyCode===0)t.preventDefault();});if(b.webkit){var p,q=function(s){p=b.mac?s.data.$.metaKey:s.data.$.ctrlKey;},r=function(){p=0;};m.on('keydown',q);m.on('keyup',r); -m.on('contextmenu',r);}},open:function(m,n,o,p){this.editor.focus();m=m||a.document.getDocumentElement();this.show(m,n,o,p);}}});},beforeInit:function(m){m.contextMenu=new j.contextMenu(m);m.addCommand('contextMenu',{exec:function(){m.contextMenu.open(m.document.getBody());}});}});(function(){function m(o){var p=this.att,q=o&&o.hasAttribute(p)&&o.getAttribute(p)||'';if(q!==undefined)this.setValue(q);};function n(){var o;for(var p=0;p ';j.add('elementspath',{requires:['selection'],init:function(o){var p='cke_path_'+o.name,q,r=function(){if(!q)q=a.document.getById(p);return q;},s='cke_elementspath_'+e.getNextNumber()+'_';o._.elementsPath={idBase:s,filters:[]};o.on('themeSpace',function(x){if(x.data.space=='bottom')x.data.html+=''+o.lang.elementsPath.eleLabel+''+'
    '+n+'
    ';});function t(x){o.focus();var y=o._.elementsPath.list[x];if(y.is('body')){var z=new d.range(o.document);z.selectNodeContents(y);z.select();}else o.getSelection().selectElement(y);};var u=e.addFunction(t),v=e.addFunction(function(x,y){var z=o._.elementsPath.idBase,A;y=new d.event(y);var B=o.lang.dir=='rtl';switch(y.getKeystroke()){case B?39:37:case 9:A=a.document.getById(z+(x+1));if(!A)A=a.document.getById(z+'0');A.focus();return false;case B?37:39:case 2228224+9:A=a.document.getById(z+(x-1));if(!A)A=a.document.getById(z+(o._.elementsPath.list.length-1));A.focus();return false;case 27:o.focus();return false;case 13:case 32:t(x);return false;}return true;});o.on('selectionChange',function(x){var y=b,z=x.data.selection,A=z.getStartElement(),B=[],C=x.editor,D=C._.elementsPath.list=[],E=C._.elementsPath.filters;while(A){var F=0,G;if(A.data('cke-display-name'))G=A.data('cke-display-name');else if(A.data('cke-real-element-type'))G=A.data('cke-real-element-type');else G=A.getName();for(var H=0;H',G,''+L+'','');}if(G=='body')break;A=A.getParent();}var M=r();M.setHtml(B.join('')+n);C.fire('elementsPathUpdate',{space:M});});function w(){q&&q.setHtml(n);delete o._.elementsPath.list;};o.on('readOnly',w);o.on('contentDomUnload',w);o.addCommand('elementsPathFocus',m.toolbarFocus);}});})();(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(t){t.addCommand('enter',{modes:{wysiwyg:1},editorFocus:false,exec:function(v){r(v);}});t.addCommand('shiftEnter',{modes:{wysiwyg:1},editorFocus:false,exec:function(v){q(v);}});var u=t.keystrokeHandler.keystrokes;u[13]='enter';u[2228224+13]='shiftEnter';}});j.enterkey={enterBlock:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document,y=v.checkStartOfBlock(),z=v.checkEndOfBlock(),A=new d.elementPath(v.startContainer),B=A.block;if(y&&z){if(B&&(B.is('li')||B.getParent().is('li'))){t.execCommand('outdent');return;}if(B&&B.getParent().is('blockquote')){B.breakParent(B.getParent());if(!B.getPrevious().getFirst(d.walker.invisible(1)))B.getPrevious().remove();if(!B.getNext().getFirst(d.walker.invisible(1)))B.getNext().remove();v.moveToElementEditStart(B);v.select();return;}}else if(B&&B.is('pre')){if(!z){n(t,u,v,w);return;}}else if(B&&f.$captionBlock[B.getName()]){n(t,u,v,w);return;}var C=u==3?'div':'p',D=v.splitBlock(C);if(!D)return;var E=D.previousBlock,F=D.nextBlock,G=D.wasStartOfBlock,H=D.wasEndOfBlock,I;if(F){I=F.getParent();if(I.is('li')){F.breakParent(I);F.move(F.getNext(),1);}}else if(E&&(I=E.getParent())&&I.is('li')){E.breakParent(I);I=E.getNext();v.moveToElementEditStart(I);E.move(E.getPrevious());}if(!G&&!H){if(F.is('li')&&(I=F.getFirst(d.walker.invisible(true)))&&I.is&&I.is('ul','ol'))(c?x.createText('\xa0'):x.createElement('br')).insertBefore(I);if(F)v.moveToElementEditStart(F);}else{var J,K;if(E){if(E.is('li')||!(p.test(E.getName())||E.is('pre')))J=E.clone();}else if(F)J=F.clone();if(!J){if(I&&I.is('li'))J=I;else{J=x.createElement(C);if(E&&(K=E.getDirection()))J.setAttribute('dir',K); -}}else if(w&&!J.is('li'))J.renameNode(C);var L=D.elementPath;if(L)for(var M=0,N=L.elements.length;M0;v--)u[v].deleteContents();return u[0];};})();(function(){var m='nbsp,gt,lt,amp',n='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',o='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',p='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv'; -function q(r,s){var t={},u=[],v={nbsp:'\xa0',shy:'­',gt:'>',lt:'<',amp:'&',apos:"'",quot:'"'};r=r.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(A,B){var C=s?'&'+B+';':v[B],D=s?v[B]:'&'+B+';';t[C]=D;u.push(C);return '';});if(!s&&r){r=r.split(',');var w=document.createElement('div'),x;w.innerHTML='&'+r.join(';&')+';';x=w.innerHTML;w=null;for(var y=0;y0;case 'checked':return!!q.$.checked;case 'value':var p=q.getAttribute('type');return p=='checkbox'||p=='radio'?q.$.value!='on':q.$.value;}return m.apply(q,arguments);};});(function(){var m={canUndo:false,exec:function(o){var p=o.document.createElement('hr');o.insertElement(p);}},n='horizontalrule';j.add(n,{init:function(o){o.addCommand(n,m);o.ui.addButton('HorizontalRule',{label:o.lang.horizontalrule,command:n});}});})();(function(){var m=/^[\t\r\n ]*(?: |\xa0)$/,n='{cke_protected}';function o(U){var V=U.children.length,W=U.children[V-1];while(W&&W.type==3&&!e.trim(W.value))W=U.children[--V];return W;};function p(U){var V=U.parent;return V?e.indexOf(V.children,U):-1;};function q(U,V){var W=U.children,X=o(U);if(X){if((V||!c)&&X.type==1&&X.name=='br')W.pop();if(X.type==3&&m.test(X.value))W.pop();}};function r(U,V,W){if(!V&&(!W||typeof W=='function'&&W(U)===false))return false;if(V&&c&&(document.documentMode>7||U.name in f.tr||U.name in f.$listItem))return false;var X=o(U);return!X||X&&(X.type==1&&X.name=='br'||U.name=='form'&&X.name=='input');};function s(U,V){return function(W){q(W,!U);if(r(W,!U,V))if(U||c)W.add(new a.htmlParser.text('\xa0'));else W.add(new a.htmlParser.element('br',{}));};};var t=f,u=['caption','colgroup','col','thead','tfoot','tbody'],v=e.extend({},t.$block,t.$listItem,t.$tableContent);for(var w in v){if(!('br' in t[w]))delete v[w];}delete v.pre;var x={elements:{},attributeNames:[[/^on/,'data-cke-pa-on']]},y={elements:{}};for(w in v)y.elements[w]=s();var z={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^data-cke-(saved|pa)-/,''],[/^data-cke-.*/,''],['hidefocus','']],elements:{$:function(U){var V=U.attributes; -if(V){if(V['data-cke-temp'])return false;var W=['name','href','src'],X;for(var Y=0;Y-1&&Z>-1&&Y!=Z)){Y=p(W);Z=p(X);}return Y>Z?1:-1;});},embed:function(U){var V=U.parent;if(V&&V.name=='object'){var W=V.attributes.width,X=V.attributes.height;W&&(U.attributes.width=W);X&&(U.attributes.height=X);}},param:function(U){U.children=[];U.isEmpty=true;return U;},a:function(U){if(!(U.children.length||U.attributes.name||U.attributes['data-cke-saved-name']))return false;},span:function(U){if(U.attributes['class']=='Apple-style-span')delete U.name;},pre:function(U){c&&q(U);},html:function(U){delete U.attributes.contenteditable;delete U.attributes['class'];},body:function(U){delete U.attributes.spellcheck;delete U.attributes.contenteditable;},style:function(U){var V=U.children[0];V&&V.value&&(V.value=e.trim(V.value));if(!U.attributes.type)U.attributes.type='text/css';},title:function(U){var V=U.children[0];V&&(V.value=U.attributes['data-cke-title']||'');}},attributes:{'class':function(U,V){return e.ltrim(U.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}}};if(c)z.attributes.style=function(U,V){return U.replace(/(^|;)([^\:]+)/g,function(W){return W.toLowerCase();});};function A(U){var V=U.attributes;if(V.contenteditable!='false')V['data-cke-editable']=V.contenteditable?'true':1;V.contenteditable='false';};function B(U){var V=U.attributes;switch(V['data-cke-editable']){case 'true':V.contenteditable='true';break;case '1':delete V.contenteditable;break;}};for(w in {input:1,textarea:1}){x.elements[w]=A;z.elements[w]=B;}var C=/<(a|area|img|input|source)\b([^>]*)>/gi,D=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,E=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,F=/([^<]*)<\/cke:encoded>/gi,G=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,H=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,I=/]*?)\/?>(?!\s*<\/cke:\1)/gi;function J(U){return U.replace(C,function(V,W,X){return '<'+W+X.replace(D,function(Y,Z){if(!/^on/.test(Z)&&X.indexOf('data-cke-saved-'+Z)==-1)return ' data-cke-saved-'+Y+' data-cke-'+a.rnd+'-'+Y;return Y;})+'>';});};function K(U){return U.replace(E,function(V){return ''+encodeURIComponent(V)+'';});};function L(U){return U.replace(F,function(V,W){return decodeURIComponent(W); -});};function M(U){return U.replace(G,'$1cke:$2');};function N(U){return U.replace(H,'$1$2');};function O(U){return U.replace(I,'');};function P(U){return U.replace(/(]*>)(\r\n|\n)/g,'$1$2$2');};function Q(U){return U.replace(//g,function(V){return '';});};function R(U){return U.replace(//g,function(V,W){return decodeURIComponent(W);});};function S(U,V){var W=V._.dataStore;return U.replace(//g,function(X,Y){return decodeURIComponent(Y);}).replace(/\{cke_protected_(\d+)\}/g,function(X,Y){return W&&W[Y]||'';});};function T(U,V){var W=[],X=V.config.protectedSource,Y=V._.dataStore||(V._.dataStore={id:1}),Z=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,aa=[//gi,//gi].concat(X);U=U.replace(//g,function(ac){return '';});for(var ab=0;ab';});U=U.replace(Z,function(ac,ad,ae){return '';});return U.replace(/(['"]).*?\1/g,function(ac){return ac.replace(//g,function(ad,ae){Y[Y.id]=decodeURIComponent(ae);return '{cke_protected_'+Y.id++ +'}';});});};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(U){var V=U.dataProcessor=new a.htmlDataProcessor(U);V.writer.forceSimpleAmpersand=U.config.forceSimpleAmpersand;V.dataFilter.addRules(x);V.dataFilter.addRules(y);V.htmlFilter.addRules(z);var W={elements:{}};for(w in v)W.elements[w]=s(true,U.config.fillEmptyBlocks);V.htmlFilter.addRules(W);},onLoad:function(){!('fillEmptyBlocks' in i)&&(i.fillEmptyBlocks=1);}});a.htmlDataProcessor=function(U){var V=this;V.editor=U;V.writer=new a.htmlWriter();V.dataFilter=new a.htmlParser.filter();V.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(U,V){U=T(U,this.editor);U=J(U);U=K(U);U=M(U);U=O(U);U=P(U);var W=new h('div');W.setHtml('a'+U);U=W.getHtml().substr(1);U=U.replace(new RegExp(' data-cke-'+a.rnd+'-','ig'),' ');U=N(U);U=L(U);U=R(U);var X=a.htmlParser.fragment.fromHtml(U,V),Y=new a.htmlParser.basicWriter();X.writeHtml(Y,this.dataFilter);U=Y.getHtml(true);U=Q(U); -return U;},toDataFormat:function(U,V){var W=this.writer,X=a.htmlParser.fragment.fromHtml(U,V);W.reset();X.writeHtml(W,this.htmlFilter);var Y=W.getHtml(true);Y=R(Y);Y=S(Y,this.editor);return Y;}};})();(function(){j.add('iframe',{requires:['dialog','fakeobjects'],init:function(m){var n='iframe',o=m.lang.iframe;a.dialog.add(n,this.path+'dialogs/iframe.js');m.addCommand(n,new a.dialogCommand(n));m.addCss('img.cke_iframe{background-image: url('+a.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');m.ui.addButton('Iframe',{label:o.toolbar,command:n});m.on('doubleclick',function(p){var q=p.data.element;if(q.is('img')&&q.data('cke-real-element-type')=='iframe')p.data.dialog='iframe';});if(m.addMenuItems)m.addMenuItems({iframe:{label:o.title,command:'iframe',group:'image'}});if(m.contextMenu)m.contextMenu.addListener(function(p,q){if(p&&p.is('img')&&p.data('cke-real-element-type')=='iframe')return{iframe:2};});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.dataFilter;if(o)o.addRules({elements:{iframe:function(p){return m.createFakeParserElement(p,'cke_iframe','iframe',true);}}});}});})();(function(){j.add('image',{requires:['dialog'],init:function(o){var p='image';a.dialog.add(p,this.path+'dialogs/image.js');o.addCommand(p,new a.dialogCommand(p));o.ui.addButton('Image',{label:o.lang.common.image,command:p});o.on('doubleclick',function(q){var r=q.data.element;if(r.is('img')&&!r.data('cke-realelement')&&!r.isReadOnly())q.data.dialog='image';});if(o.addMenuItems)o.addMenuItems({image:{label:o.lang.image.menu,command:'image',group:'image'}});if(o.contextMenu)o.contextMenu.addListener(function(q,r){if(m(o,q))return{image:2};});},afterInit:function(o){p('left');p('right');p('center');p('block');function p(q){var r=o.getCommand('justify'+q);if(r){if(q=='left'||q=='right')r.on('exec',function(s){var t=m(o),u;if(t){u=n(t);if(u==q){t.removeStyle('float');if(q==n(t))t.removeAttribute('align');}else t.setStyle('float',q);s.cancel();}});r.on('refresh',function(s){var t=m(o),u;if(t){u=n(t);this.setState(u==q?1:q=='right'||q=='left'?2:0);s.cancel();}});}};}});function m(o,p){if(!p){var q=o.getSelection();p=q.getType()==3&&q.getSelectedElement();}if(p&&p.is('img')&&!p.data('cke-realelement')&&!p.isReadOnly())return p;};function n(o){var p=o.getStyle('float');if(p=='inherit'||p=='none')p=0;if(!p)p=o.getAttribute('align');return p;};})();i.image_removeLinkByEmptyURL=true; -(function(){var m={ol:1,ul:1},n=d.walker.whitespaces(true),o=d.walker.bookmark(false,true);function p(t){var B=this;if(t.editor.readOnly)return null;var u=t.editor,v=t.data.path,w=v&&v.contains(m),x=v.block||v.blockLimit;if(w)return B.setState(2);if(!B.useIndentClasses&&B.name=='indent')return B.setState(2);if(!x)return B.setState(0);if(B.useIndentClasses){var y=x.$.className.match(B.classNameRegex),z=0;if(y){y=y[1];z=B.indentClassMap[y];}if(B.name=='outdent'&&!z||B.name=='indent'&&z==u.config.indentClasses.length)return B.setState(0);return B.setState(2);}else{var A=parseInt(x.getStyle(r(x)),10);if(isNaN(A))A=0;if(A<=0)return B.setState(0);return B.setState(2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)');w.indentClassMap={};for(var v=0;v0){var Z=X[T].parent;X[T].parent=new h(Z.getName(),Z.getDocument());}}for(T=W.getCustomData('listarray_index')+1;TY;T++)X[T].indent+=U;var aa=j.list.arrayToList(X,v,null,t.config.enterMode,M.getDirection());if(u.name=='outdent'){var ab;if((ab=M.getParent())&&ab.is('li')){var ac=aa.listNode.getChildren(),ad=[],ae=ac.count(),af;for(T=ae-1;T>=0;T--){if((af=ac.getItem(T))&&af.is&&af.is('li'))ad.push(af);}}}if(aa)aa.listNode.replace(M);if(ad&&ad.length)for(T=0;T0)M.addClass(t.config.indentClasses[P-1]);}else{var Q=r(M,N),R=parseInt(M.getStyle(Q),10);if(isNaN(R))R=0;var S=t.config.indentOffset||40;R+=(u.name=='indent'?1:-1)*S;if(R<0)return false;R=Math.max(R,0);R=Math.ceil(R/S)*S;M.setStyle(Q,R?R+(t.config.indentUnit||'px'):'');if(M.getAttribute('style')==='')M.removeAttribute('style');}h.setMarker(v,M,'indent_processed',1);return true;};var z=t.getSelection(),A=z.createBookmarks(1),B=z&&z.getRanges(1),C,D=B.createIterator();while(C=D.getNextRange()){var E=C.getCommonAncestor(),F=E;while(F&&!(F.type==1&&m[F.getName()]))F=F.getParent();if(!F){var G=C.getEnclosedNode();if(G&&G.type==1&&G.getName() in m){C.setStartAt(G,1);C.setEndAt(G,2);F=G;}}if(F&&C.startContainer.type==1&&C.startContainer.getName() in m){var H=new d.walker(C);H.evaluator=s;C.startContainer=H.next();}if(F&&C.endContainer.type==1&&C.endContainer.getName() in m){H=new d.walker(C);H.evaluator=s;C.endContainer=H.previous();}if(F){var I=F.getFirst(s),J=!!I.getNext(s),K=C.startContainer,L=I.equals(K)||I.contains(K);if(!(L&&(u.name=='indent'||u.useIndentClasses||parseInt(F.getStyle(r(F)),10))&&y(F,!J&&I.getDirection())))w(F);}else x();}h.clearAllMarkers(v);t.forceNextSelectionCheck();z.selectBookmarks(A);}};j.add('indent',{init:function(t){var u=t.addCommand('indent',new q(t,'indent')),v=t.addCommand('outdent',new q(t,'outdent'));t.ui.addButton('Indent',{label:t.lang.indent,command:'indent'});t.ui.addButton('Outdent',{label:t.lang.outdent,command:'outdent'});t.on('selectionChange',e.bind(p,u));t.on('selectionChange',e.bind(p,v));if(b.ie6Compat||b.ie7Compat)t.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');t.on('dirChanged',function(w){var x=new d.range(t.document);x.setStartBefore(w.data.node);x.setEndAfter(w.data.node);var y=new d.walker(x),z;while(z=y.next()){if(z.type==1){if(!z.equals(w.data.node)&&z.getDirection()){x.setStartAfter(z);y=new d.walker(x);continue;}var A=t.config.indentClasses;if(A){var B=w.data.dir=='ltr'?['_rtl','']:['','_rtl']; -for(var C=0;C=0;z--){w=u[z].createIterator();w.enlargeBr=s!=2;while(x=w.getNextParagraph(s==1?'p':'div')){x.removeAttribute('align');x.removeStyle('text-align');var A=v&&(x.$.className=e.ltrim(x.$.className.replace(C.cssClassRegex,''))),B=C.state==2&&(!y||m(x,true)!=C.value);if(v){if(B)x.addClass(v);else if(!A)x.removeAttribute('class');}else if(B)x.setStyle('text-align',C.value);}}q.focus();q.forceNextSelectionCheck();r.selectBookmarks(t);},refresh:function(q){var r=q.block||q.blockLimit;this.setState(r.getName()!='body'&&m(r,this.editor.config.useComputedState)==this.value?1:2); -}};j.add('justify',{init:function(q){var r=new o(q,'justifyleft','left'),s=new o(q,'justifycenter','center'),t=new o(q,'justifyright','right'),u=new o(q,'justifyblock','justify');q.addCommand('justifyleft',r);q.addCommand('justifycenter',s);q.addCommand('justifyright',t);q.addCommand('justifyblock',u);q.ui.addButton('JustifyLeft',{label:q.lang.justify.left,command:'justifyleft'});q.ui.addButton('JustifyCenter',{label:q.lang.justify.center,command:'justifycenter'});q.ui.addButton('JustifyRight',{label:q.lang.justify.right,command:'justifyright'});q.ui.addButton('JustifyBlock',{label:q.lang.justify.block,command:'justifyblock'});q.on('selectionChange',e.bind(n,r));q.on('selectionChange',e.bind(n,t));q.on('selectionChange',e.bind(n,s));q.on('selectionChange',e.bind(n,u));q.on('dirChanged',p);},requires:['domiterator']});})();j.add('keystrokes',{beforeInit:function(m){m.keystrokeHandler=new a.keystrokeHandler(m);m.specialKeys={};},init:function(m){var n=m.config.keystrokes,o=m.config.blockedKeystrokes,p=m.keystrokeHandler.keystrokes,q=m.keystrokeHandler.blockedKeystrokes;for(var r=0;r7))Y.append(T.createText('\xa0'));Y.append(af.listNode);W=af.nextIndex;}else if(ac.indent==-1&&!P&&ad){if(m[ad.getName()]){Y=ac.element.clone(false,true);if(Z!=ad.getDirection(1))Y.setAttribute('dir',Z);}else Y=new d.documentFragment(T);var ag=ad.getDirection(1)!=Z,ah=ac.element,ai=ah.getAttribute('class'),aj=ah.getAttribute('style'),ak=Y.type==11&&(Q!=2||ag||aj||ai),al,am=ac.contents.length;for(S=0;SQ[S-1].indent+1){var W=Q[S-1].indent+1-Q[S].indent,X=Q[S].indent;while(Q[S]&&Q[S].indent>=X){Q[S].indent+=W;S++;}S--;}}var Y=j.list.arrayToList(Q,P,null,N.config.enterMode,O.root.getAttribute('dir')),Z=Y.listNode,aa,ab;function ac(ad){if((aa=Z[ad?'getFirst':'getLast']())&&!(aa.is&&aa.isBlockBoundary())&&(ab=O.root[ad?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&!(ab.is&&ab.isBlockBoundary({br:1})))N.document.createElement('br')[ad?'insertBefore':'insertAfter'](aa); -};ac(true);ac();Z.replace(O.root);};function z(N,O){this.name=N;this.type=O;};var A=d.walker.nodeType(1);function B(N,O,P,Q){var R,S;while(R=N[Q?'getLast':'getFirst'](A)){if((S=R.getDirection(1))!==O.getDirection(1))R.setAttribute('dir',S);R.remove();P?R[Q?'insertBefore':'insertAfter'](P):O.append(R,Q);}};z.prototype={exec:function(N){var aq=this;var O=N.document,P=N.config,Q=N.getSelection(),R=Q&&Q.getRanges(true);if(!R||R.length<1)return;if(aq.state==2){var S=O.getBody();if(!S.getFirst(q)){P.enterMode==2?S.appendBogus():R[0].fixBlock(1,P.enterMode==1?'p':'div');Q.selectRanges(R);}else{var T=R.length==1&&R[0],U=T&&T.getEnclosedNode();if(U&&U.is&&aq.type==U.getName())aq.setState(1);}}var V=Q.createBookmarks(true),W=[],X={},Y=R.createIterator(),Z=0;while((T=Y.getNextRange())&&++Z){var aa=T.getBoundaryNodes(),ab=aa.startNode,ac=aa.endNode;if(ab.type==1&&ab.getName()=='td')T.setStartAt(aa.startNode,1);if(ac.type==1&&ac.getName()=='td')T.setEndAt(aa.endNode,2);var ad=T.createIterator(),ae;ad.forceBrBreak=aq.state==2;while(ae=ad.getNextParagraph()){if(ae.getCustomData('list_block'))continue;else h.setMarker(X,ae,'list_block',1);var af=new d.elementPath(ae),ag=af.elements,ah=ag.length,ai=null,aj=0,ak=af.blockLimit,al;for(var am=ah-1;am>=0&&(al=ag[am]);am--){if(m[al.getName()]&&ak.contains(al)){ak.removeCustomData('list_group_object_'+Z);var an=al.getCustomData('list_group_object');if(an)an.contents.push(ae);else{an={root:al,contents:[ae]};W.push(an);h.setMarker(X,al,'list_group_object',an);}aj=1;break;}}if(aj)continue;var ao=ak;if(ao.getCustomData('list_group_object_'+Z))ao.getCustomData('list_group_object_'+Z).contents.push(ae);else{an={root:ao,contents:[ae]};h.setMarker(X,ao,'list_group_object_'+Z,an);W.push(an);}}}var ap=[];while(W.length>0){an=W.shift();if(aq.state==2){if(m[an.root.getName()])v.call(aq,N,an,X,ap);else x.call(aq,N,an,ap);}else if(aq.state==1&&m[an.root.getName()])y.call(aq,N,an,X);}for(am=0;am0)for(var u=t.length-1;u>=0;u--){var v=t[u][0],w=t[u][1];if(w)v.insertBefore(w);else v.appendTo(s);}};function o(s,t){var u=m(s),v={},w=s.$;if(!t){v['class']=w.className||'';w.className='';}v.inline=w.style.cssText||'';if(!t)w.style.cssText='position: static; overflow: visible';n(u);return v;};function p(s,t){var u=m(s),v=s.$;if('class' in t)v.className=t['class'];if('inline' in t)v.style.cssText=t.inline;n(u);};function q(s){var t=a.instances;for(var u in t){var v=t[u];if(v.mode=='wysiwyg'&&!v.readOnly){var w=v.document.getBody();w.setAttribute('contentEditable',false);w.setAttribute('contentEditable',true);}}if(s.focusManager.hasFocus){s.toolbox.focus();s.focus();}};function r(s){if(!c||b.version>6)return null;var t=h.createFromHtml('');return s.append(t,true);};j.add('maximize',{init:function(s){var t=s.lang,u=a.document,v=u.getWindow(),w,x,y,z;function A(){var C=v.getViewPaneSize();z&&z.setStyles({width:C.width+'px',height:C.height+'px'});s.resize(C.width,C.height,null,true);};var B=2;s.addCommand('maximize',{modes:{wysiwyg:!b.iOS,source:!b.iOS},readOnly:1,editorFocus:false,exec:function(){var C=s.container.getChild(1),D=s.getThemeSpace('contents');if(s.mode=='wysiwyg'){var E=s.getSelection();w=E&&E.getRanges();x=v.getScrollPosition();}else{var F=s.textarea.$;w=!c&&[F.selectionStart,F.selectionEnd];x=[F.scrollLeft,F.scrollTop];}if(this.state==2){v.on('resize',A);y=v.getScrollPosition();var G=s.container;while(G=G.getParent()){G.setCustomData('maximize_saved_styles',o(G));G.setStyle('z-index',s.config.baseFloatZIndex-1);}D.setCustomData('maximize_saved_styles',o(D,true));C.setCustomData('maximize_saved_styles',o(C,true));var H={overflow:b.webkit?'':'hidden',width:0,height:0};u.getDocumentElement().setStyles(H);!b.gecko&&u.getDocumentElement().setStyle('position','fixed');!(b.gecko&&b.quirks)&&u.getBody().setStyles(H);c?setTimeout(function(){v.$.scrollTo(0,0);},0):v.$.scrollTo(0,0);C.setStyle('position',b.gecko&&b.quirks?'fixed':'absolute');C.$.offsetLeft;C.setStyles({'z-index':s.config.baseFloatZIndex-1,left:'0px',top:'0px'});z=r(C);C.addClass('cke_maximized');A();var I=C.getDocumentPosition();C.setStyles({left:-1*I.x+'px',top:-1*I.y+'px'}); -b.gecko&&q(s);}else if(this.state==1){v.removeListener('resize',A);var J=[D,C];for(var K=0;K ');s.children.length=0;s.add(u);var v=s.attributes;delete v['aria-label'];delete v.contenteditable;delete v.title;}return t;}}},5);if(p)p.addRules({elements:{div:function(r){var s=r.attributes,t=s&&s.style,u=t&&r.children.length==1&&r.children[0],v=u&&u.name=='span'&&u.attributes.style;if(v&&/page-break-after\s*:\s*always/i.test(t)&&/display\s*:\s*none/i.test(v)){s.contenteditable='false';s['class']='cke_pagebreak';s['data-cke-display-name']='pagebreak';s['aria-label']=n;s.title=n;r.children.length=0;}}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(m){var n=m.lang.pagebreakAlt,o=h.createFromHtml('
    '+'
    ',m.document),p=m.getSelection().getRanges(true);m.fire('saveSnapshot');for(var q,r=p.length-1;r>=0;r--){q=p[r];if(r1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.width*parseInt(n,10)/100,10);if(typeof o=='string'&&o.length>1&&o.substr(o.length-1,1)=='%')o=parseInt(window.screen.height*parseInt(o,10)/100,10);if(n<640)n=640;if(o<420)o=420;var q=parseInt((window.screen.height-o)/2,10),r=parseInt((window.screen.width-n)/2,10);p=(p||'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes')+',width='+n+',height='+o+',top='+q+',left='+r;var s=window.open('',null,p,true);if(!s)return false;try{var t=navigator.userAgent.toLowerCase();if(t.indexOf(' chrome/')==-1){s.moveTo(r,q);s.resizeTo(n,o);}s.focus();s.location.href=m;}catch(u){s=window.open(m,null,p,true);}return true;}});(function(){var m,n={modes:{wysiwyg:1,source:1},canUndo:false,readOnly:1,exec:function(p){var q,r=p.config,s=r.baseHref?'':'',t=b.isCustomDomain();if(r.fullPage)q=p.getData().replace(//,'$&'+s).replace(/[^>]*(?=<\/title>)/,'$& — '+p.lang.preview);else{var u=''+''+s+''+p.lang.preview+''+e.buildStyleHtml(p.config.contentsCss)+''+u+p.getData()+'';}var w=640,x=420,y=80;try{var z=window.screen;w=Math.round(z.width*0.8);x=Math.round(z.height*0.7);y=Math.round(z.width*0.1);}catch(D){}var A='';if(t){window._cke_htmlToLoad=q;A='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )'; -}if(b.gecko){window._cke_htmlToLoad=q;A=m+'preview.html';}var B=window.open(A,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+w+',height='+x+',left='+y);if(!t&&!b.gecko){var C=B.document;C.open();C.write(q);C.close();b.webkit&&setTimeout(function(){C.body.innerHTML+='';},0);}}},o='preview';j.add(o,{init:function(p){m=this.path;p.addCommand(o,n);p.ui.addButton('Preview',{label:p.lang.preview,command:o});}});})();j.add('print',{init:function(m){var n='print',o=m.addCommand(n,j.print);m.ui.addButton('Print',{label:m.lang.print,command:n});}});j.print={exec:function(m){if(b.opera)return;else if(b.gecko)m.window.$.print();else m.document.$.execCommand('Print');},canUndo:false,readOnly:1,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(m){m.addCommand('removeFormat',j.removeformat.commands.removeformat);m.ui.addButton('RemoveFormat',{label:m.lang.removeFormat,command:'removeFormat'});m._.removeFormat={filters:[]};}});j.removeformat={commands:{removeformat:{exec:function(m){var n=m._.removeFormatRegex||(m._.removeFormatRegex=new RegExp('^(?:'+m.config.removeFormatTags.replace(/,/g,'|')+')$','i')),o=m._.removeAttributes||(m._.removeAttributes=m.config.removeFormatAttributes.split(',')),p=j.removeformat.filter,q=m.getSelection().getRanges(1),r=q.createIterator(),s;while(s=r.getNextRange()){if(!s.collapsed)s.enlarge(1);var t=s.createBookmark(),u=t.startNode,v=t.endNode,w,x=function(z){var A=new d.elementPath(z),B=A.elements;for(var C=1,D;D=B[C];C++){if(D.equals(A.block)||D.equals(A.blockLimit))break;if(n.test(D.getName())&&p(m,D))z.breakParent(D);}};x(u);if(v){x(v);w=u.getNextSourceNode(true,1);while(w){if(w.equals(v))break;var y=w.getNextSourceNode(false,1);if(!(w.getName()=='img'&&w.data('cke-realelement'))&&p(m,w))if(n.test(w.getName()))w.remove(1);else{w.removeAttributes(o);m.fire('removeFormatCleanup',w);}w=y;}}s.moveToBookmark(t);}m.getSelection().selectRanges(q);}}},filter:function(m,n){var o=m._.removeFormat.filters;for(var p=0;pr.width&&(n.resize_minWidth=r.width);n.resize_minHeight>r.height&&(n.resize_minHeight=r.height);a.document.on('mousemove',u);a.document.on('mouseup',v);if(m.document){m.document.on('mousemove',u);m.document.on('mouseup',v);}});m.on('destroy',function(){e.removeFunction(w);});m.on('themeSpace',function(x){if(x.data.space=='bottom'){var y='';if(s&&!t)y=' cke_resizer_horizontal';if(!s&&t)y=' cke_resizer_vertical';var z='
    ';o=='ltr'&&y=='ltr'?x.data.html+=z:x.data.html=z+x.data.html;}},m,null,100);}}});(function(){var m={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(o){var p=o.element.$.form;if(p)try{p.submit();}catch(q){if(p.submit.click)p.submit.click();}}},n='save';j.add(n,{init:function(o){var p=o.addCommand(n,m);p.modes={wysiwyg:!!o.element.$.form};o.ui.addButton('Save',{label:o.lang.save,command:n});}});})();(function(){var m='scaytcheck',n='';function o(t,u){var v=0,w;for(w in u){if(u[w]==t){v=1;break;}}return v;};var p=function(){var t=this,u=function(){var y=t.config,z={};z.srcNodeRef=t.document.getWindow().$.frameElement;z.assocApp='CKEDITOR.'+a.version+'@'+a.revision;z.customerid=y.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';z.customDictionaryIds=y.scayt_customDictionaryIds||'';z.userDictionaryName=y.scayt_userDictionaryName||'';z.sLang=y.scayt_sLang||'en_US'; -z.onLoad=function(){if(!(c&&b.version<8))this.addStyle(this.selectorCss(),'padding-bottom: 2px !important;');if(t.focusManager.hasFocus&&!q.isControlRestored(t))this.focus();};z.onBeforeChange=function(){if(q.getScayt(t)&&!t.checkDirty())setTimeout(function(){t.resetDirty();},0);};var A=window.scayt_custom_params;if(typeof A=='object')for(var B in A)z[B]=A[B];if(q.getControlId(t))z.id=q.getControlId(t);var C=new window.scayt(z);C.afterMarkupRemove.push(function(E){new h(E,C.document).mergeSiblings();});var D=q.instances[t.name];if(D){C.sLang=D.sLang;C.option(D.option());C.paused=D.paused;}q.instances[t.name]=C;try{C.setDisabled(q.isPaused(t)===false);}catch(E){}t.fire('showScaytState');};t.on('contentDom',u);t.on('contentDomUnload',function(){var y=a.document.getElementsByTag('script'),z=/^dojoIoScript(\d+)$/i,A=/^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var B=0;B=0){this.setState(0);q.loadEngine(t);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(t){var u=t.config.scayt_contextMenuItemsOrder||'suggest|moresuggest|control',v='';u=u.split('|');if(u&&u.length)for(var w=0;w tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');n=o.replace(/%2/g,m).replace(/%1/g,'cke_show_borders ');var p={preserveState:true,editorFocus:false,readOnly:1,exec:function(q){this.toggleState();this.refresh(q);},refresh:function(q){if(q.document){var r=this.state==1?'addClass':'removeClass';q.document.getBody()[r]('cke_show_borders');}}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(q){var r=q.addCommand('showborders',p);r.canUndo=false;if(q.config.startupShowBorders!==false)r.setState(1);q.addCss(n);q.on('mode',function(){if(r.state!=0)r.refresh(q);},null,null,100);q.on('contentDom',function(){if(r.state!=0)r.refresh(q);});q.on('removeFormatCleanup',function(s){var t=s.data;if(q.getCommand('showborders').state==1&&t.is('table')&&(!t.hasAttribute('border')||parseInt(t.getAttribute('border'),10)<=0))t.addClass(m);});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter,t=r&&r.htmlFilter; -if(s)s.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'],x=parseInt(v.border,10);if((!x||x<=0)&&(!w||w.indexOf(m)==-1))v['class']=(w||'')+' '+m;}}});if(t)t.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'];w&&(v['class']=w.replace(m,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(q){var r=q.data.name;if(r=='table'||r=='tableProperties'){var s=q.data.definition,t=s.getContents('info'),u=t.get('txtBorder'),v=u.commit;u.commit=e.override(v,function(y){return function(z,A){y.apply(this,arguments);var B=parseInt(this.getValue(),10);A[!B||B<=0?'addClass':'removeClass'](m);};});var w=s.getContents('advanced'),x=w&&w.get('advCSSClasses');if(x){x.setup=e.override(x.setup,function(y){return function(){y.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});x.commit=e.override(x.commit,function(y){return function(z,A){y.apply(this,arguments);if(!parseInt(A.getAttribute('border'),10))A.addClass('cke_show_border');};});}}});})();j.add('sourcearea',{requires:['editingblock'],init:function(m){var n=j.sourcearea,o=a.document.getWindow();m.on('editingBlockReady',function(){var p,q;m.addMode('source',{load:function(r,s){if(c&&b.version<8)r.setStyle('position','relative');m.textarea=p=new h('textarea');p.setAttributes({dir:'ltr',tabIndex:b.webkit?-1:m.tabIndex,role:'textbox','aria-label':m.lang.editorTitle.replace('%1',m.name)});p.addClass('cke_source');p.addClass('cke_enable_context_menu');m.readOnly&&p.setAttribute('readOnly','readonly');var t={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){q=function(){p.hide();p.setStyle('height',r.$.clientHeight+'px');p.setStyle('width',r.$.clientWidth+'px');p.show();};m.on('resize',q);o.on('resize',q);setTimeout(q,0);}r.setHtml('');r.append(p);p.setStyles(t);m.fire('ariaWidget',p);p.on('blur',function(){m.focusManager.blur();});p.on('focus',function(){m.focusManager.focus();});m.mayBeDirty=true;this.loadData(s);var u=m.keystrokeHandler;if(u)u.attach(p);setTimeout(function(){m.mode='source';m.fire('mode',{previousMode:m._.previousMode});},b.gecko||b.webkit?100:0);},loadData:function(r){p.setValue(r);m.fire('dataReady');},getData:function(){return p.getValue();},getSnapshotData:function(){return p.getValue();},unload:function(r){p.clearCustomData();m.textarea=p=null;if(q){m.removeListener('resize',q);o.removeListener('resize',q);}if(c&&b.version<8)r.removeStyle('position'); -},focus:function(){p.focus();}});});m.on('readOnly',function(){if(m.mode=='source')if(m.readOnly)m.textarea.setAttribute('readOnly','readonly');else m.textarea.removeAttribute('readOnly');});m.addCommand('source',n.commands.source);if(m.ui.addButton)m.ui.addButton('Source',{label:m.lang.source,command:'source'});m.on('mode',function(){m.getCommand('source').setState(m.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,readOnly:1,exec:function(m){if(m.mode=='wysiwyg')m.fire('saveSnapshot');m.getCommand('source').setState(0);m.setMode(m.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(n){var o=n.config,p=n.lang.stylesCombo,q={},r=[],s;function t(u){n.getStylesSet(function(v){if(!r.length){var w,x;for(var y=0,z=v.length;y0)return;if(S.type==1&&m.test(S.getName())&&!S.getCustomData('selected_cell')){h.setMarker(J,S,'selected_cell',true);I.push(S);}};for(var L=0;L1&&V&&U[Y]==V[Y]){Z=U[Y];Z.rowSpan+=1;}else{Z=new h(U[Y]).clone();Z.removeAttribute('rowSpan');!c&&Z.appendBogus();X.append(Z);Z=Z.$;}Y+=Z.colSpan-1;}H?X.insertBefore(S):X.insertAfter(S);};function q(G){if(G instanceof d.selection){var H=n(G),I=H[0],J=I.getAscendant('table'),K=e.buildTableMap(J),L=H[0].getParent(),M=L.$.rowIndex,N=H[H.length-1],O=N.getParent().$.rowIndex+N.$.rowSpan-1,P=[]; -for(var Q=M;Q<=O;Q++){var R=K[Q],S=new h(J.$.rows[Q]);for(var T=0;T0?X[M-1]:null)||J.$.parentNode);for(Q=P.length;Q>=0;Q--)q(P[Q]);return Y;}else if(G instanceof h){J=G.getAscendant('table');if(J.$.rows.length==1)J.remove();else G.remove();}return null;};function r(G,H){var I=G.getParent(),J=I.$.cells,K=0;for(var L=0;LI)I=K;}return I;};function t(G,H){var I=n(G),J=I[0],K=J.getAscendant('table'),L=s(I,1),M=s(I),N=H?L:M,O=e.buildTableMap(K),P=[],Q=[],R=O.length;for(var S=0;S1&&Q[S]==P[S]){U=P[S];U.colSpan+=1;}else{U=new h(P[S]).clone();U.removeAttribute('colSpan');!c&&U.appendBogus();U[H?'insertBefore':'insertAfter'].call(U,new h(P[S]));U=U.$;}S+=U.rowSpan-1;}};function u(G){var H=n(G),I=H[0],J=H[H.length-1],K=I.getAscendant('table'),L=e.buildTableMap(K),M,N,O=[];for(var P=0,Q=L.length;P1){L=H[J-1]+1;break;}}if(!L)L=H[0]>0?H[0]-1:H[H.length-1]+1;var N=I.$.rows;for(J=0,K=N.length;J=0;K--)x(H[K]);if(J)z(J,true);else if(I)I.remove();}else if(G instanceof h){var L=G.getParent();if(L.getChildCount()==1)L.remove(); -else G.remove();}};function y(G){var H=G.getBogus();H&&H.remove();G.trim();};function z(G,H){var I=new d.range(G.getDocument());if(!I['moveToElementEdit'+(H?'End':'Start')](G)){I.selectNodeContents(G);I.collapse(H?false:true);}I.select(true);};function A(G,H,I){var J=G[H];if(typeof I=='undefined')return J;for(var K=0;J&&K1)J+=K[H].rowSpan-1;}return I;};function C(G,H,I){var J=n(G),K;if((H?J.length!=1:J.length<2)||(K=G.getCommonAncestor())&&K.type==1&&K.is('table'))return false;var L,M=J[0],N=M.getAscendant('table'),O=e.buildTableMap(N),P=O.length,Q=O[0].length,R=M.getParent().$.rowIndex,S=A(O,R,M);if(H){var T;try{var U=parseInt(M.getAttribute('rowspan'),10)||1,V=parseInt(M.getAttribute('colspan'),10)||1;T=O[H=='up'?R-U:H=='down'?R+U:R][H=='left'?S-V:H=='right'?S+V:S];}catch(an){return false;}if(!T||M.$==T)return false;J[H=='up'||H=='left'?'unshift':'push'](new h(T));}var W=M.getDocument(),X=R,Y=0,Z=0,aa=!I&&new d.documentFragment(W),ab=0;for(var ac=0;ac=Q)M.removeAttribute('rowSpan');else M.$.rowSpan=Y;if(Y>=P)M.removeAttribute('colSpan');else M.$.colSpan=Z;var ak=new d.nodeList(N.$.rows),al=ak.count();for(ac=al-1;ac>=0;ac--){var am=ak.getItem(ac);if(!am.$.cells.length){am.remove();al++;continue;}}return M;}else return Y*Z==ab;};function D(G,H){var I=n(G);if(I.length>1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.rowSpan,Q,R,S,T;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);T=N+R;var U=new h(L.$.rows[T]),V=A(M,T),W;Q=J.clone();for(var X=0;XO){Q.insertBefore(new h(W));break;}else W=null;}if(!W)U.append(Q,true);}else{S=R=1;U=K.clone();U.insertAfter(K);U.append(Q=J.clone());var Y=A(M,N);for(var Z=0;Z1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.colSpan,Q,R,S;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);}else{S=R=1;var T=B(M,O);for(var U=0;U0?2:0}; -}},tablecell_insertBefore:{label:H.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:H.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:H.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_merge:{label:H.cell.merge,group:'tablecell',command:'cellMerge',order:16},tablecell_merge_right:{label:H.cell.mergeRight,group:'tablecell',command:'cellMergeRight',order:17},tablecell_merge_down:{label:H.cell.mergeDown,group:'tablecell',command:'cellMergeDown',order:18},tablecell_split_horizontal:{label:H.cell.splitHorizontal,group:'tablecell',command:'cellHorizontalSplit',order:19},tablecell_split_vertical:{label:H.cell.splitVertical,group:'tablecell',command:'cellVerticalSplit',order:20},tablecell_properties:{label:H.cell.title,group:'tablecellproperties',command:'cellProperties',order:21},tablerow:{label:H.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};}},tablerow_insertBefore:{label:H.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:H.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:H.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:H.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:H.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:H.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:H.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(G.contextMenu)G.contextMenu.addListener(function(I,J){if(!I||I.isReadOnly())return null;while(I){if(I.getName() in F)return{tablecell:2,tablerow:2,tablecolumn:2};I=I.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();e.buildTableMap=function(m){var n=m.$.rows,o=-1,p=[];for(var q=0;qp&&(!s||!t||vt){s=v;t=u;}}else{if(q&&u==p){s=v;break;}if(ut)){s=v;t=u;}}}if(s)s.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(o){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));o.addCommand('templates',new a.dialogCommand('templates')); -o.ui.addButton('Templates',{label:o.lang.templates.button,command:'templates'});}});var m={},n={};a.addTemplates=function(o,p){m[o]=p;};a.getTemplates=function(o){return m[o];};a.loadTemplates=function(o,p){var q=[];for(var r=0,s=o.length;r':' style="display:none">');t.push('',o.lang.toolbars,'');var w=o.toolbox.toolbars,x=o.config.toolbar instanceof Array?o.config.toolbar:o.config['toolbar_'+o.config.toolbar];for(var y=0;y');v=0;}if(C==='/'){t.push('
    ');continue;}D=C.items||C;for(var E=0;E');B&&t.push('',B,'');t.push('');var I=w.push(A)-1;if(I>0){A.previous=w[I-1];A.previous.next=A;}}if(H){if(!v){t.push('');v=1;}}else if(v){t.push('');v=0;}var J=F.render(o,t);I=A.items.push(J)-1;if(I>0){J.previous=A.items[I-1];J.previous.next=J;}J.toolbar=A;J.onkey=q;J.onfocus=function(){if(!o.toolbox.focusCommandExecuted)o.focus();};}}if(v){t.push('');v=0;}if(A)t.push('');}t.push('');if(o.config.toolbarCanCollapse){var K=e.addFunction(function(){o.execCommand('toolbarCollapse');});o.on('destroy',function(){e.removeFunction(K);});var L=e.getNextId();o.addCommand('toolbarCollapse',{readOnly:1,exec:function(M){var N=a.document.getById(L),O=N.getPrevious(),P=M.getThemeSpace('contents'),Q=O.getParent(),R=parseInt(P.$.style.height,10),S=Q.$.offsetHeight,T=!O.isVisible();if(!T){O.hide();N.addClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarExpand);}else{O.show();N.removeClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarCollapse);}N.getFirst().setText(T?'▲':'◀');var U=Q.$.offsetHeight-S;P.setStyle('height',R-U+'px');M.fire('resize');},modes:{wysiwyg:1,source:1}});t.push('','','');}r.data.html+=t.join('');}});o.on('destroy',function(){var r,s=0,t,u,v;r=this.toolbox.toolbars;for(;s');return{};}};}});}});})();a.UI_SEPARATOR='separator';i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[{name:'document',items:['Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates']},{name:'clipboard',items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},{name:'editing',items:['Find','Replace','-','SelectAll','-','SpellChecker','Scayt']},{name:'forms',items:['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField']},'/',{name:'basicstyles',items:['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']},{name:'paragraph',items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},{name:'links',items:['Link','Unlink','Anchor']},{name:'insert',items:['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']},'/',{name:'styles',items:['Styles','Format','Font','FontSize']},{name:'colors',items:['TextColor','BGColor']},{name:'tools',items:['Maximize','ShowBlocks','-','About']}]; -i.toolbar='Full';i.toolbarCanCollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(s){var t=new o(s),u=s.addCommand('undo',{exec:function(){if(t.undo()){s.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),v=s.addCommand('redo',{exec:function(){if(t.redo()){s.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});t.onChange=function(){u.setState(t.undoable()?2:0);v.setState(t.redoable()?2:0);};function w(x){if(t.enabled&&x.data.command.canUndo!==false)t.save();};s.on('beforeCommandExec',w);s.on('afterCommandExec',w);s.on('saveSnapshot',function(x){t.save(x.data&&x.data.contentOnly);});s.on('contentDom',function(){s.document.on('keydown',function(x){if(!x.data.$.ctrlKey&&!x.data.$.metaKey)t.type(x);});});s.on('beforeModeUnload',function(){s.mode=='wysiwyg'&&t.save(true);});s.on('mode',function(){t.enabled=s.readOnly?false:s.mode=='wysiwyg';t.onChange();});s.ui.addButton('Undo',{label:s.lang.undo,command:'undo'});s.ui.addButton('Redo',{label:s.lang.redo,command:'redo'});s.resetUndo=function(){t.reset();s.fire('saveSnapshot');};s.on('updateSnapshot',function(){if(t.currentImage)t.update();});}});j.undo={};var m=j.undo.Image=function(s){this.editor=s;s.fire('beforeUndoImage');var t=s.getSnapshot(),u=t&&s.getSelection();c&&t&&(t=t.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=t;this.bookmarks=u&&u.createBookmarks2(true);s.fire('afterUndoImage');},n=/\b(?:href|src|name)="[^"]*?"/gi;m.prototype={equals:function(s,t){var u=this.contents,v=s.contents;if(c&&(b.ie7Compat||b.ie6Compat)){u=u.replace(n,'');v=v.replace(n,'');}if(u!=v)return false;if(t)return true;var w=this.bookmarks,x=s.bookmarks;if(w||x){if(!w||!x||w.length!=x.length)return false;for(var y=0;y25){this.save(false,null,false);this.modifiersCount=1;}}else if(!y){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var s=this;s.lastKeystroke=0;s.snapshots=[];s.index=-1;s.limit=s.editor.config.undoStackSize||20;s.currentImage=null;s.hasUndo=false;s.hasRedo=false;s.resetType();},resetType:function(){var s=this;s.typing=false;delete s.lastKeystroke;s.typesCount=0;s.modifiersCount=0;},fireChange:function(){var s=this;s.hasUndo=!!s.getNextImage(true);s.hasRedo=!!s.getNextImage(false);s.resetType();s.onChange();},save:function(s,t,u){var w=this;var v=w.snapshots;if(!t)t=new m(w.editor);if(t.contents===false)return false;if(w.currentImage&&t.equals(w.currentImage,s))return false;v.splice(w.index+1,v.length-w.index-1);if(v.length==w.limit)v.shift();w.index=v.push(t)-1;w.currentImage=t;if(u!==false)w.fireChange();return true;},restoreImage:function(s){var w=this;var t=w.editor,u;if(s.bookmarks){t.focus();u=t.getSelection();}w.editor.loadSnapshot(s.contents);if(s.bookmarks)u.selectBookmarks(s.bookmarks);else if(c){var v=w.editor.document.getBody().$.createTextRange();v.collapse(true);v.select();}w.index=s.index;w.update();w.fireChange();},getNextImage:function(s){var x=this;var t=x.snapshots,u=x.currentImage,v,w;if(u)if(s)for(w=x.index-1;w>=0;w--){v=t[w];if(!u.equals(v,true)){v.index=w;return v;}}else for(w=x.index+1;w]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,n=d.walker.whitespaces(true),o=d.walker.bogus(true),p=function(E){return n(E)&&o(E);};function q(E){return E.isBlockBoundary()&&f.$empty[E.getName()];};function r(E){return function(F){if(this.mode=='wysiwyg'){this.focus(); -var G=this.getSelection(),H=G.isLocked;H&&G.unlock();this.fire('saveSnapshot');E.call(this,F.data);H&&this.getSelection().lock();var I=this;setTimeout(function(){try{I.fire('saveSnapshot');}catch(J){setTimeout(function(){I.fire('saveSnapshot');},200);}},0);}};};function s(E){var N=this;if(N.dataProcessor)E=N.dataProcessor.toHtml(E);if(!E)return;var F=N.getSelection(),G=F.getRanges()[0];if(G.checkReadOnly())return;if(b.opera){var H=new d.elementPath(G.startContainer);if(H.block){var I=a.htmlParser.fragment.fromHtml(E,false).children;for(var J=0,K=I.length;J'+Q+'';});I=I.replace(/\n/g,'
    ');if(!(H||c))I=I.replace(new RegExp('
    (?=)'),function(O){return e.repeat(O,2);});if(b.gecko||b.webkit){var K=new d.elementPath(F.getStartElement()),L=[];for(var M=0;M/));else if(N in f.$block)break;}I=L.join('')+I;}s.call(this,I);};function u(E){var F=this.getSelection(),G=F.getRanges(),H=E.getName(),I=f.$block[H],J=F.isLocked;if(J)F.unlock();var K,L,M,N;for(var O=G.length-1;O>=0;O--){K=G[O];if(!K.checkReadOnly()){K.deleteContents(1);L=!O&&E||E.clone(1);var P,Q;if(I)while((P=K.getCommonAncestor(0,1))&&(Q=f[P.getName()])&&!(Q&&Q[H])){if(P.getName() in f.span)K.splitElement(P);else if(K.checkStartOfBlock()&&K.checkEndOfBlock()){K.setStartBefore(P);K.collapse(true);P.remove();}else K.splitBlock();}K.insertNode(L); -if(!M)M=L;}}if(M){K.moveToPosition(M,4);if(I){var R=M.getNext(p),S=R&&R.type==1&&R.getName();if(S&&f.$block[S]){if(f[S]['#'])K.moveToElementEditStart(R);else K.moveToElementEditEnd(M);}else if(!R){R=K.fixBlock(true,this.config.enterMode==3?'div':'p');K.moveToElementEditStart(R);}}}F.selectRanges([K]);if(J)this.getSelection().lock();};function v(E){if(!E.checkDirty())setTimeout(function(){E.resetDirty();},0);};var w=d.walker.whitespaces(true),x=d.walker.bookmark(false,true);function y(E){return w(E)&&x(E);};function z(E){return E.type==3&&e.trim(E.getText()).match(/^(?: |\xa0)$/);};function A(E){if(E.isLocked){E.unlock();setTimeout(function(){E.lock();},0);}};function B(E){return E.getOuterHtml().match(m);};w=d.walker.whitespaces(true);function C(E){var F=E.window,G=E.document,H=E.document.getBody(),I=H.getFirst(),J=H.getChildren().count();if(!J||J==1&&I.type==1&&I.hasAttribute('_moz_editor_bogus_node')){v(E);var K=E.element.getDocument(),L=K.getDocumentElement(),M=L.$.scrollTop,N=L.$.scrollLeft,O=G.$.createEvent('KeyEvents');O.initKeyEvent('keypress',true,true,F.$,false,false,false,false,0,32);G.$.dispatchEvent(O);if(M!=L.$.scrollTop||N!=L.$.scrollLeft)K.getWindow().$.scrollTo(N,M);J&&H.getFirst().remove();G.getBody().appendBogus();var P=new d.range(G);P.setStartAt(H,1);P.select();}};function D(E){var F=E.editor,G=E.data.path,H=G.blockLimit,I=E.data.selection,J=I.getRanges()[0],K=F.document.getBody(),L=F.config.enterMode;if(b.gecko){var M=G.block||G.blockLimit,N=M&&M.getLast(y);if(M&&M.isBlockBoundary()&&!(N&&N.type==1&&N.isBlockBoundary())&&!M.is('pre')&&!M.getBogus())M.appendBogus();}if(F.config.autoParagraph!==false&&L!=2&&J.collapsed&&H.getName()=='body'&&!G.block){var O=J.fixBlock(true,F.config.enterMode==3?'div':'p');if(c){var P=O.getFirst(y);P&&z(P)&&P.remove();}if(B(O)){var Q=O.getNext(w);if(Q&&Q.type==1&&!q(Q)){J.moveToElementEditStart(Q);O.remove();}else{Q=O.getPrevious(w);if(Q&&Q.type==1&&!q(Q)){J.moveToElementEditEnd(Q);O.remove();}}}J.select();E.cancel();}var R=new d.range(F.document);R.moveToElementEditEnd(F.document.getBody());var S=new d.elementPath(R.startContainer);if(!S.blockLimit.is('body')){var T;if(L!=2)T=K.append(F.document.createElement(L==1?'p':'div'));else T=K;if(!c)T.appendBogus();}};j.add('wysiwygarea',{requires:['editingblock'],init:function(E){var F=E.config.enterMode!=2&&E.config.autoParagraph!==false?E.config.enterMode==3?'div':'p':false,G=E.lang.editorTitle.replace('%1',E.name),H=E.lang.editorHelp;if(c)G+=', '+H;var I=a.document.getWindow(),J; -E.on('editingBlockReady',function(){var M,N,O,P,Q,R,S,T=b.isCustomDomain(),U=function(X){if(N)N.remove();var Y='document.open();'+(T?'document.domain="'+document.domain+'";':'')+'document.close();';Y=b.air?'javascript:void(0)':c?'javascript:void(function(){'+encodeURIComponent(Y)+'}())':'';var Z=e.getNextId();N=h.createFromHtml('');if(document.location.protocol=='chrome:')a.event.useCapture=true;N.on('load',function(aa){Q=1;aa.removeListener();var ab=N.getFrameDocument();ab.write(X);b.air&&W(ab.getWindow().$);});if(document.location.protocol=='chrome:')a.event.useCapture=false;M.append(h.createFromHtml(''+H+''));M.append(N);if(b.webkit){S=function(){M.setStyle('width','100%');N.hide();N.setSize('width',M.getSize('width'));M.removeStyle('width');N.show();};I.on('resize',S);}};J=e.addFunction(W);var V='';function W(X){if(!Q)return;Q=0;E.fire('ariaWidget',N);var Y=X.document,Z=Y.body,aa=Y.getElementById('cke_actscrpt');aa&&aa.parentNode.removeChild(aa);Z.spellcheck=!E.config.disableNativeSpellChecker;var ab=!E.readOnly;if(c){Z.hideFocus=true;Z.disabled=true;Z.contentEditable=ab;Z.removeAttribute('disabled');}else setTimeout(function(){if(b.gecko&&b.version>=10900||b.opera)Y.$.body.contentEditable=ab;else if(b.webkit)Y.$.body.parentNode.contentEditable=ab;else Y.$.designMode=ab?'off':'on';},0);ab&&b.gecko&&e.setTimeout(C,0,null,E);X=E.window=new d.window(X);Y=E.document=new g(Y);ab&&Y.on('dblclick',function(ag){var ah=ag.data.getTarget(),ai={element:ah,dialog:''};E.fire('doubleclick',ai);ai.dialog&&E.openDialog(ai.dialog);});c&&Y.on('click',function(ag){var ah=ag.data.getTarget();if(ah.is('input')){var ai=ah.getAttribute('type');if(ai=='submit'||ai=='reset')ag.data.preventDefault();}});if(!(c||b.opera))Y.on('mousedown',function(ag){var ah=ag.data.getTarget();if(ah.is('img','hr','input','textarea','select'))E.getSelection().selectElement(ah);});if(b.gecko)Y.on('mouseup',function(ag){if(ag.data.$.button==2){var ah=ag.data.getTarget();if(!ah.getOuterHtml().replace(m,'')){var ai=new d.range(Y);ai.moveToElementEditStart(ah);ai.select(true);}}}); -Y.on('click',function(ag){ag=ag.data;if(ag.getTarget().is('a')&&ag.$.button!=2)ag.preventDefault();});if(b.webkit){Y.on('mousedown',function(){ad=1;});Y.on('click',function(ag){if(ag.data.getTarget().is('input','select'))ag.data.preventDefault();});Y.on('mouseup',function(ag){if(ag.data.getTarget().is('input','textarea'))ag.data.preventDefault();});}var ac=c?N:X;ac.on('blur',function(){E.focusManager.blur();});var ad;ac.on('focus',function(){var ag=E.document;if(b.gecko||b.opera)ag.getBody().focus();else if(b.webkit)if(!ad){E.document.getDocumentElement().focus();ad=1;}E.focusManager.focus();});var ae=E.keystrokeHandler;ae.blockedKeystrokes[8]=!ab;ae.attach(Y);Y.getDocumentElement().addClass(Y.$.compatMode);E.on('key',function(ag){if(E.mode!='wysiwyg')return;var ah=ag.data.keyCode;if(ah in {8:1,46:1}){var ai=E.getSelection(),aj=ai.getSelectedElement(),ak=ai.getRanges()[0],al=new d.elementPath(ak.startContainer),am,an,ao,ap=ah==8;if(aj){E.fire('saveSnapshot');ak.moveToPosition(aj,3);aj.remove();ak.select();E.fire('saveSnapshot');ag.cancel();}else if(ak.collapsed)if((am=al.block)&&ak[ap?'checkStartOfBlock':'checkEndOfBlock']()&&(ao=am[ap?'getPrevious':'getNext'](n))&&ao.is('table')){E.fire('saveSnapshot');if(ak[ap?'checkEndOfBlock':'checkStartOfBlock']())am.remove();ak['moveToElementEdit'+(ap?'End':'Start')](ao);ak.select();E.fire('saveSnapshot');ag.cancel();}else if(al.blockLimit.is('td')&&(an=al.blockLimit.getAscendant('table'))&&ak.checkBoundaryOfElement(an,ap?1:2)&&(ao=an[ap?'getPrevious':'getNext'](n))){E.fire('saveSnapshot');ak['moveToElementEdit'+(ap?'End':'Start')](ao);if(ak.checkStartOfBlock()&&ak.checkEndOfBlock())ao.remove();else ak.select();E.fire('saveSnapshot');ag.cancel();}}if(ah==33||ah==34)if(b.gecko){var aq=Y.getBody();if(X.$.innerHeight>aq.$.offsetHeight){ak=new d.range(Y);ak[ah==33?'moveToElementEditStart':'moveToElementEditEnd'](aq);ak.select();ag.cancel();}}});if(c&&Y.$.compatMode=='CSS1Compat'){var af={33:1,34:1};Y.on('keydown',function(ag){if(ag.data.getKeystroke() in af)setTimeout(function(){E.getSelection().scrollIntoView();},0);});}if(c&&E.config.enterMode!=1)Y.on('selectionchange',function(){var ag=Y.getBody(),ah=E.getSelection(),ai=ah&&ah.getRanges()[0];if(ai&&ag.getHtml().match(/^

     <\/p>$/i)&&ai.startContainer.equals(ag))setTimeout(function(){ai=E.getSelection().getRanges()[0];if(!ai.startContainer.equals('body')){ag.getFirst().remove(1);ai.moveToElementEditEnd(ag);ai.select(1);}},0);});if(E.contextMenu)E.contextMenu.addTarget(Y,E.config.browserContextMenuOnCtrl!==false); -setTimeout(function(){E.fire('contentDom');if(R){E.mode='wysiwyg';E.fire('mode',{previousMode:E._.previousMode});R=false;}O=false;if(P){E.focus();P=false;}setTimeout(function(){E.fire('dataReady');},0);try{E.document.$.execCommand('2D-position',false,true);}catch(ag){}try{E.document.$.execCommand('enableInlineTableEditing',false,!E.config.disableNativeTableHandles);}catch(ah){}if(E.config.disableObjectResizing)try{E.document.$.execCommand('enableObjectResizing',false,false);}catch(ai){E.document.getBody().on(c?'resizestart':'resize',function(aj){aj.data.preventDefault();});}if(c)setTimeout(function(){if(E.document){var aj=E.document.$.body;aj.runtimeStyle.marginBottom='0px';aj.runtimeStyle.marginBottom='';}},1000);},0);};E.addMode('wysiwyg',{load:function(X,Y,Z){M=X;if(c&&b.quirks)X.setStyle('position','relative');E.mayBeDirty=true;R=true;if(Z)this.loadSnapshotData(Y);else this.loadData(Y);},loadData:function(X){O=true;E._.dataStore={id:1};var Y=E.config,Z=Y.fullPage,aa=Y.docType,ab='';!Z&&(ab=e.buildStyleHtml(E.config.contentsCss)+ab);var ac=Y.baseHref?'':'';if(Z)X=X.replace(/]*>/i,function(ad){E.docType=aa=ad;return '';}).replace(/<\?xml\s[^\?]*\?>/i,function(ad){E.xmlDeclaration=ad;return '';});if(E.dataProcessor)X=E.dataProcessor.toHtml(X,F);if(Z){if(!/]/.test(X))X=''+X;if(!/]/.test(X))X=''+X+'';if(!/]/.test(X))X=X.replace(/]*>/,'$&');else if(!/]/.test(X))X=X.replace(/]*>/,'$&');ac&&(X=X.replace(//,'$&'+ac));X=X.replace(/<\/head\s*>/,ab+'$&');X=aa+X;}else X=Y.docType+''+''+''+G+''+ac+ab+''+''+X+'';if(b.gecko)X=X.replace(/
    (?=\s*<\/(:?html|body)>)/,'$&
    ');X+=V;this.onDispose();U(X);},getData:function(){var X=E.config,Y=X.fullPage,Z=Y&&E.docType,aa=Y&&E.xmlDeclaration,ab=N.getFrameDocument(),ac=Y?ab.getDocumentElement().getOuterHtml():ab.getBody().getHtml();if(b.gecko)ac=ac.replace(/
    (?=\s*(:?$|<\/body>))/,'');if(E.dataProcessor)ac=E.dataProcessor.toDataFormat(ac,F);if(X.ignoreEmptyParagraph)ac=ac.replace(m,function(ad,ae){return ae;});if(aa)ac=aa+'\n'+ac;if(Z)ac=Z+'\n'+ac; -return ac;},getSnapshotData:function(){return N.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(X){N.getFrameDocument().getBody().setHtml(X);},onDispose:function(){if(!E.document)return;E.document.getDocumentElement().clearCustomData();E.document.getBody().clearCustomData();E.window.clearCustomData();E.document.clearCustomData();N.clearCustomData();N.remove();},unload:function(X){this.onDispose();if(S)I.removeListener('resize',S);E.window=E.document=N=M=P=null;E.fire('contentDomUnload');},focus:function(){var X=E.window;if(O)P=true;else if(X){var Y=E.getSelection(),Z=Y&&Y.getNative();if(Z&&Z.type=='Control')return;b.air?setTimeout(function(){X.focus();},0):X.focus();E.selectionChange();}}});E.on('insertHtml',r(s),null,null,20);E.on('insertElement',r(u),null,null,20);E.on('insertText',r(t),null,null,20);E.on('selectionChange',function(X){if(E.readOnly)return;var Y=E.getSelection();if(Y&&!Y.isLocked){var Z=E.checkDirty();E.fire('saveSnapshot',{contentOnly:1});D.call(this,X);E.fire('updateSnapshot');!Z&&E.resetDirty();}},null,null,1);});E.on('contentDom',function(){var M=E.document.getElementsByTag('title').getItem(0);M.data('cke-title',E.document.$.title);c&&(E.document.$.title=G);});E.on('readOnly',function(){if(E.mode=='wysiwyg'){var M=E.getMode();M.loadData(M.getData());}});if(a.document.$.documentMode>=8){E.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var K=[];for(var L in f.$removeEmpty)K.push('html.CSS1Compat '+L+'[contenteditable=false]');E.addCss(K.join(',')+'{ display:inline-block;}');}else if(b.gecko){E.addCss('html { height: 100% !important; }');E.addCss('img:-moz-broken { -moz-force-broken-image-icon : 1;\tmin-width : 24px; min-height : 24px; }');}E.addCss('html {\t_overflow-y: scroll; cursor: text;\t*cursor:auto;}');E.addCss('img, input, textarea { cursor: default;}');E.on('insertElement',function(M){var N=M.data;if(N.type==1&&(N.is('input')||N.is('textarea'))){var O=N.getAttribute('contenteditable')=='false';if(!O){N.data('cke-editable',N.hasAttribute('contenteditable')?'true':'1');N.setAttribute('contenteditable',false);}}});}});if(b.gecko)(function(){var E=document.body;if(!E)window.addEventListener('load',arguments.callee,false);else{var F=E.getAttribute('onpageshow');E.setAttribute('onpageshow',(F?F+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();'); -}})();})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{requires:['dialog'],init:function(m){var n='checkspell',o=m.addCommand(n,new a.dialogCommand(n));o.modes={wysiwyg:!b.opera&&!b.air&&document.domain==window.location.hostname};m.ui.addButton('SpellChecker',{label:m.lang.spellCheck.toolbar,command:n});a.dialog.add(n,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;a.DIALOG_RESIZE_NONE=0;a.DIALOG_RESIZE_WIDTH=1;a.DIALOG_RESIZE_HEIGHT=2;a.DIALOG_RESIZE_BOTH=3;(function(){var m=e.cssLength;function n(R){return!!this._.tabs[R][0].$.offsetHeight;};function o(){var V=this;var R=V._.currentTabId,S=V._.tabIdList.length,T=e.indexOf(V._.tabIdList,R)+S;for(var U=T-1;U>T-S;U--){if(n.call(V,V._.tabIdList[U%S]))return V._.tabIdList[U%S];}return null;};function p(){var V=this;var R=V._.currentTabId,S=V._.tabIdList.length,T=e.indexOf(V._.tabIdList,R);for(var U=T+1;U1){ah._.tabBarMode=true; -ah._.tabs[ah._.currentTabId][0].focus();Z=1;}else if((as==37||as==39)&&ah._.tabBarMode){aw=as==(at?39:37)?o.call(ah):p.call(ah);ah.selectPage(aw);ah._.tabs[aw][0].focus();Z=1;}else if((as==13||as==32)&&ah._.tabBarMode){ay.selectPage(ay._.currentTabId);ay._.tabBarMode=false;ay._.currentFocusIndex=-1;ak(1);Z=1;}else if(as==13){var ax=ar.data.getTarget();if(!ax.is('a','button','select','textarea')&&(!ax.is('input')||ax.$.type!='button')){au=ay.getButton('ok');au&&e.setTimeout(au.click,0,au);Z=1;}aa=1;}else if(as==27){au=ay.getButton('cancel');if(au)e.setTimeout(au.click,0,au);else if(ay.fire('cancel',{hide:true}).hide!==false)ay.hide();aa=1;}else return;am(ar);};function am(ar){if(Z)ar.data.preventDefault(1);else if(aa)ar.data.stopPropagation();};var an=this._.element;this.on('show',function(){an.on('keydown',al,this);if(b.opera||b.gecko)an.on('keypress',am,this);});this.on('hide',function(){an.removeListener('keydown',al);if(b.opera||b.gecko)an.removeListener('keypress',am);ai(function(ar){s.apply(ar);});});this.on('iframeAdded',function(ar){var as=new g(ar.data.iframe.$.contentWindow.document);as.on('keydown',al,this,null,0);});this.on('show',function(){var av=this;aj();if(R.config.dialog_startupFocusTab&&ah._.pageCount>1){ah._.tabBarMode=true;ah._.tabs[ah._.currentTabId][0].focus();}else if(!av._.hasFocus){av._.currentFocusIndex=-1;if(T.onFocus){var ar=T.onFocus.call(av);ar&&ar.focus();}else ak(1);if(av._.editor.mode=='wysiwyg'&&c){var as=R.document.$.selection,at=as.createRange();if(at)if(at.parentElement&&at.parentElement().ownerDocument==R.document.$||at.item&&at.item(0).ownerDocument==R.document.$){var au=document.body.createTextRange();au.moveToElementText(av.getElement().getFirst().$);au.collapse(true);au.select();}}}},this,null,4294967295);if(b.ie6Compat)this.on('load',function(ar){var as=this.getElement(),at=as.getFirst();at.remove();at.appendTo(as);},this);B(this);C(this);new d.text(T.title,a.document).appendTo(this.parts.title);for(Y=0;Y0?S:0)+'px'};aa[V?'right':'left']=(R>0?R:0)+'px';U.setStyles(aa);T&&(ab._.moved=1);},getPosition:function(){return e.extend({},this._.position);},show:function(){var R=this._.element,S=this.definition;if(!(R.getParent()&&R.getParent().equals(a.document.getBody())))R.appendTo(a.document.getBody());else R.setStyle('display','block');if(b.gecko&&b.version<10900){var T=this.parts.dialog;T.setStyle('position','absolute');setTimeout(function(){T.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||S.width||S.minWidth,this._.contentSize&&this._.contentSize.height||S.height||S.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(a.dialog._.currentZIndex===null)a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex; -this._.element.getFirst().setStyle('z-index',a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this;this._.parentDialog=null;H(this._.editor);}else{this._.parentDialog=a.dialog._.currentTop;var U=this._.parentDialog.getElement().getFirst();U.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}R.on('keydown',L);R.on(b.opera?'keypress':'keyup',M);this._.hasFocus=false;e.setTimeout(function(){this.layout();u(this);this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});k.fire('ready',this);this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(V){V.setInitValue&&V.setInitValue();});},100,this);},layout:function(){var X=this;var R=X.parts.dialog,S=X.getSize(),T=a.document.getWindow(),U=T.getViewPaneSize(),V=(U.width-S.width)/2,W=(U.height-S.height)/2;if(!b.ie6Compat)if(S.height+(W>0?W:0)>U.height||S.width+(V>0?V:0)>U.width)R.setStyle('position','absolute');else R.setStyle('position','fixed');X.move(X._.moved?X._.position.x:V,X._.moved?X._.position.y:W);},foreach:function(R){var U=this;for(var S in U._.contents)for(var T in U._.contents[S])R.call(U,U._.contents[S][T]);return U;},reset:(function(){var R=function(S){if(S.reset)S.reset(1);};return function(){this.foreach(R);return this;};})(),setupContent:function(){var R=arguments;this.foreach(function(S){if(S.setup)S.setup.apply(S,R);});},commitContent:function(){var R=arguments;this.foreach(function(S){if(c&&this._.currentFocusIndex==S.focusIndex)S.getInputElement().$.blur();if(S.commit)S.commit.apply(S,R);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);this.selectPage(this._.tabIdList[0]);var R=this._.element;R.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');O(this);while(a.dialog._.currentTop!=this)a.dialog._.currentTop.hide();if(!this._.parentDialog)I();else{var S=this._.parentDialog.getElement().getFirst();S.setStyle('z-index',parseInt(S.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;R.removeListener('keydown',L);R.removeListener(b.opera?'keypress':'keyup',M);var T=this._.editor;T.focus();if(T.mode=='wysiwyg'&&c){var U=T.getSelection();U&&U.unlock(true);}}else a.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(V){V.resetInitValue&&V.resetInitValue(); -});},addPage:function(R){var ad=this;var S=[],T=R.label?' title="'+e.htmlEncode(R.label)+'"':'',U=R.elements,V=a.dialog._.uiElementBuilders.vbox.build(ad,{type:'vbox',className:'cke_dialog_page_contents',children:R.elements,expand:!!R.expand,padding:R.padding,style:R.style||'width: 100%;height:100%'},S),W=h.createFromHtml(S.join(''));W.setAttribute('role','tabpanel');var X=b,Y='cke_'+R.id+'_'+e.getNextNumber(),Z=h.createFromHtml(['0?' cke_last':'cke_first',T,!!R.hidden?' style="display:none"':'',' id="',Y,'"',X.gecko&&X.version>=10900&&!X.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',R.label,''].join(''));W.setAttribute('aria-labelledby',Y);ad._.tabs[R.id]=[Z,W];ad._.tabIdList.push(R.id);!R.hidden&&ad._.pageCount++;ad._.lastTab=Z;ad.updateStyle();var aa=ad._.contents[R.id]={},ab,ac=V.getChild();while(ab=ac.shift()){aa[ab.id]=ab;if(typeof ab.getChild=='function')ac.push.apply(ac,ab.getChild());}W.setAttribute('name',R.id);W.appendTo(ad.parts.contents);Z.unselectable();ad.parts.tabs.append(Z);if(R.accessKey){N(ad,ad,'CTRL+'+R.accessKey,Q,P);ad._.accessKeyMap['CTRL+'+R.accessKey]=R.id;}},selectPage:function(R){if(this._.currentTabId==R)return;if(this.fire('selectPage',{page:R,currentPage:this._.currentTabId})===true)return;for(var S in this._.tabs){var T=this._.tabs[S][0],U=this._.tabs[S][1];if(S!=R){T.removeClass('cke_dialog_tab_selected');U.hide();}U.setAttribute('aria-hidden',S!=R);}var V=this._.tabs[R];V[0].addClass('cke_dialog_tab_selected');if(b.ie6Compat||b.ie7Compat){q(V[1]);V[1].show();setTimeout(function(){q(V[1],1);},0);}else V[1].show();this._.currentTabId=R;this._.currentTabIndex=e.indexOf(this._.tabIdList,R);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(R){var T=this;var S=T._.tabs[R]&&T._.tabs[R][0];if(!S||T._.pageCount==1||!S.isVisible())return;else if(R==T._.currentTabId)T.selectPage(o.call(T));S.hide();T._.pageCount--;T.updateStyle();},showPage:function(R){var T=this;var S=T._.tabs[R]&&T._.tabs[R][0];if(!S)return;S.show();T._.pageCount++;T.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(R,S){var T=this._.contents[R];return T&&T[S];},getValueOf:function(R,S){return this.getContentElement(R,S).getValue();},setValueOf:function(R,S,T){return this.getContentElement(R,S).setValue(T);},getButton:function(R){return this._.buttons[R]; -},click:function(R){return this._.buttons[R].click();},disableButton:function(R){return this._.buttons[R].disable();},enableButton:function(R){return this._.buttons[R].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(R,S){var U=this;if(typeof S=='undefined'){S=U._.focusList.length;U._.focusList.push(new t(U,R,S));}else{U._.focusList.splice(S,0,new t(U,R,S));for(var T=S+1;Tac.width-ab.width-W)ah=ac.width-ab.width+(V.lang.dir=='rtl'?0:X[1]);else ah=T.x;if(T.y+X[0]ac.height-ab.height-W)ai=ac.height-ab.height+X[2];else ai=T.y;R.move(ah,ai,1);aa.data.preventDefault();};function Z(aa){a.document.removeListener('mousemove',Y);a.document.removeListener('mouseup',Z);if(b.ie6Compat){var ab=F.getChild(0).getFrameDocument();ab.removeListener('mousemove',Y);ab.removeListener('mouseup',Z);}};R.parts.title.on('mousedown',function(aa){S={x:aa.data.$.screenX,y:aa.data.$.screenY};a.document.on('mousemove',Y);a.document.on('mouseup',Z);T=R.getPosition();if(b.ie6Compat){var ab=F.getChild(0).getFrameDocument();ab.on('mousemove',Y);ab.on('mouseup',Z);}aa.data.preventDefault();},R);};function C(R){var S=R.definition,T=S.resizable;if(T==0)return;var U=R.getParentEditor(),V,W,X,Y,Z,aa,ab=e.addFunction(function(ae){Z=R.getSize();var af=R.parts.contents,ag=af.$.getElementsByTagName('iframe').length;if(ag){aa=h.createFromHtml('

    ');af.append(aa);}W=Z.height-R.parts.contents.getSize('height',!(b.gecko||b.opera||c&&b.quirks));V=Z.width-R.parts.contents.getSize('width',1);Y={x:ae.screenX,y:ae.screenY};X=a.document.getWindow().getViewPaneSize();a.document.on('mousemove',ac);a.document.on('mouseup',ad);if(b.ie6Compat){var ah=F.getChild(0).getFrameDocument();ah.on('mousemove',ac);ah.on('mouseup',ad);}ae.preventDefault&&ae.preventDefault();});R.on('load',function(){var ae='';if(T==1)ae=' cke_resizer_horizontal';else if(T==2)ae=' cke_resizer_vertical';var af=h.createFromHtml('
    '); -R.parts.footer.append(af,1);});U.on('destroy',function(){e.removeFunction(ab);});function ac(ae){var af=U.lang.dir=='rtl',ag=(ae.data.$.screenX-Y.x)*(af?-1:1),ah=ae.data.$.screenY-Y.y,ai=Z.width,aj=Z.height,ak=ai+ag*(R._.moved?1:2),al=aj+ah*(R._.moved?1:2),am=R._.element.getFirst(),an=af&&am.getComputedStyle('right'),ao=R.getPosition();if(ao.y+al>X.height)al=X.height-ao.y;if((af?an:ao.x)+ak>X.width)ak=X.width-(af?an:ao.x);if(T==1||T==3)ai=Math.max(S.minWidth||0,ak-V);if(T==2||T==3)aj=Math.max(S.minHeight||0,al-W);R.resize(ai,aj);if(!R._.moved)R.layout();ae.data.preventDefault();};function ad(){a.document.removeListener('mouseup',ad);a.document.removeListener('mousemove',ac);if(aa){aa.remove();aa=null;}if(b.ie6Compat){var ae=F.getChild(0).getFrameDocument();ae.removeListener('mouseup',ad);ae.removeListener('mousemove',ac);}};};var D,E={},F;function G(R){R.data.preventDefault(1);};function H(R){var S=a.document.getWindow(),T=R.config,U=T.dialog_backgroundCoverColor||'white',V=T.dialog_backgroundCoverOpacity,W=T.baseFloatZIndex,X=e.genKey(U,V,W),Y=E[X];if(!Y){var Z=['
    '];if(b.ie6Compat){var aa=b.isCustomDomain(),ab="";Z.push('');}Z.push('
    ');Y=h.createFromHtml(Z.join(''));Y.setOpacity(V!=undefined?V:0.5);Y.on('keydown',G);Y.on('keypress',G);Y.on('keyup',G);Y.appendTo(a.document.getBody());E[X]=Y;}else Y.show();F=Y;var ac=function(){var af=S.getViewPaneSize();Y.setStyles({width:af.width+'px',height:af.height+'px'});},ad=function(){var af=S.getScrollPosition(),ag=a.dialog._.currentTop;Y.setStyles({left:af.x+'px',top:af.y+'px'});if(ag)do{var ah=ag.getPosition();ag.move(ah.x,ah.y);}while(ag=ag._.parentDialog)};D=ac;S.on('resize',ac);ac();if(!(b.mac&&b.webkit))Y.focus();if(b.ie6Compat){var ae=function(){ad();arguments.callee.prevScrollHandler.apply(this,arguments);};S.$.setTimeout(function(){ae.prevScrollHandler=window.onscroll||(function(){}); -window.onscroll=ae;},0);ad();}};function I(){if(!F)return;var R=a.document.getWindow();F.hide();R.removeListener('resize',D);if(b.ie6Compat)R.$.setTimeout(function(){var S=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=S||null;},0);D=null;};function J(){for(var R in E)E[R].remove();E={};};var K={},L=function(R){var S=R.data.$.ctrlKey||R.data.$.metaKey,T=R.data.$.altKey,U=R.data.$.shiftKey,V=String.fromCharCode(R.data.$.keyCode),W=K[(S?'CTRL+':'')+(T?'ALT+':'')+(U?'SHIFT+':'')+V];if(!W||!W.length)return;W=W[W.length-1];W.keydown&&W.keydown.call(W.uiElement,W.dialog,W.key);R.data.preventDefault();},M=function(R){var S=R.data.$.ctrlKey||R.data.$.metaKey,T=R.data.$.altKey,U=R.data.$.shiftKey,V=String.fromCharCode(R.data.$.keyCode),W=K[(S?'CTRL+':'')+(T?'ALT+':'')+(U?'SHIFT+':'')+V];if(!W||!W.length)return;W=W[W.length-1];if(W.keyup){W.keyup.call(W.uiElement,W.dialog,W.key);R.data.preventDefault();}},N=function(R,S,T,U,V){var W=K[T]||(K[T]=[]);W.push({uiElement:R,dialog:S,key:T,keyup:V||R.accessKeyUp,keydown:U||R.accessKeyDown});},O=function(R){for(var S in K){var T=K[S];for(var U=T.length-1;U>=0;U--){if(T[U].dialog==R||T[U].uiElement==R)T.splice(U,1);}if(T.length===0)delete K[S];}},P=function(R,S){if(R._.accessKeyMap[S])R.selectPage(R._.accessKeyMap[S]);},Q=function(R,S){};(function(){k.dialog={uiElement:function(R,S,T,U,V,W,X){if(arguments.length<4)return;var Y=(U.call?U(S):U)||'div',Z=['<',Y,' '],aa=(V&&V.call?V(S):V)||{},ab=(W&&W.call?W(S):W)||{},ac=(X&&X.call?X.call(this,R,S):X)||'',ad=this.domId=ab.id||e.getNextId()+'_uiElement',ae=this.id=S.id,af;ab.id=ad;var ag={};if(S.type)ag['cke_dialog_ui_'+S.type]=1;if(S.className)ag[S.className]=1;if(S.disabled)ag.cke_disabled=1;var ah=ab['class']&&ab['class'].split?ab['class'].split(' '):[];for(af=0;af=0;af--){if(aj[af]==='')aj.splice(af,1);}if(aj.length>0)ab.style=(ab.style?ab.style+'; ':'')+aj.join('; ');for(af in ab)Z.push(af+'="'+e.htmlEncode(ab[af])+'" ');Z.push('>',ac,'');T.push(Z.join(''));(this._||(this._={})).dialog=R;if(typeof S.isChanged=='boolean')this.isChanged=function(){return S.isChanged;};if(typeof S.isChanged=='function')this.isChanged=S.isChanged; -if(typeof S.setValue=='function')this.setValue=e.override(this.setValue,function(am){return function(an){am.call(this,S.setValue.call(this,an));};});if(typeof S.getValue=='function')this.getValue=e.override(this.getValue,function(am){return function(){return S.getValue.call(this,am.call(this));};});a.event.implementOn(this);this.registerEvents(S);if(this.accessKeyUp&&this.accessKeyDown&&S.accessKey)N(this,R,'CTRL+'+S.accessKey);var al=this;R.on('load',function(){var am=al.getInputElement();if(am){var an=al.type in {checkbox:1,ratio:1}&&c&&b.version<8?'cke_dialog_ui_focused':'';am.on('focus',function(){R._.tabBarMode=false;R._.hasFocus=true;al.fire('focus');an&&this.addClass(an);});am.on('blur',function(){al.fire('blur');an&&this.removeClass(an);});}});if(this.keyboardFocusable){this.tabIndex=S.tabIndex||0;this.focusIndex=R._.focusList.push(this)-1;this.on('focus',function(){R._.currentFocusIndex=al.focusIndex;});}e.extend(this,S);},hbox:function(R,S,T,U,V){if(arguments.length<4)return;this._||(this._={});var W=this._.children=S,X=V&&V.widths||null,Y=V&&V.height||null,Z={},aa,ab=function(){var ad=[''];for(aa=0;aa0)ad.push('style="'+af.join('; ')+'" ');ad.push('>',T[aa],'');}ad.push('');return ad.join('');},ac={role:'presentation'};V&&V.align&&(ac.align=V.align);k.dialog.uiElement.call(this,R,V||{type:'hbox'},U,'table',Z,ac,ab);},vbox:function(R,S,T,U,V){if(arguments.length<3)return;this._||(this._={});var W=this._.children=S,X=V&&V.width||null,Y=V&&V.heights||null,Z=function(){var aa=['');for(var ab=0;ab');}aa.push('
    0)aa.push('style="',ac.join('; '),'" ');aa.push(' class="cke_dialog_ui_vbox_child">',T[ab],'
    ');return aa.join('');};k.dialog.uiElement.call(this,R,V||{type:'vbox'},U,'div',null,{role:'presentation'},Z);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(R,S){this.getInputElement().setValue(R);!S&&this.fire('change',{value:R});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var U=this;var R=U.getInputElement(),S=R,T;while((S=S.getParent())&&S.$.className.search('cke_dialog_page_contents')==-1){}if(!S)return U;T=S.getAttribute('name');if(U._.dialog._.currentTabId!=T)U._.dialog.selectPage(T);return U;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(R){var S=/^on([A-Z]\w+)/,T,U=function(W,X,Y,Z){X.on('load',function(){W.getInputElement().on(Y,Z,W);});};for(var V in R){if(!(T=V.match(S)))continue;if(this.eventProcessors[V])this.eventProcessors[V].call(this,this._.dialog,R[V]);else U(this,this._.dialog,T[1].toLowerCase(),R[V]);}return this;},eventProcessors:{onLoad:function(R,S){R.on('load',S,this);},onShow:function(R,S){R.on('show',S,this);},onHide:function(R,S){R.on('hide',S,this);}},accessKeyDown:function(R,S){this.focus();},accessKeyUp:function(R,S){},disable:function(){var R=this.getElement(),S=this.getInputElement();S.setAttribute('disabled','true');R.addClass('cke_disabled');},enable:function(){var R=this.getElement(),S=this.getInputElement();S.removeAttribute('disabled');R.removeClass('cke_disabled');},isEnabled:function(){return!this.getElement().hasClass('cke_disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement(),{getChild:function(R){var S=this;if(arguments.length<1)return S._.children.concat();if(!R.splice)R=[R];if(R.length<2)return S._.children[R[0]];else return S._.children[R[0]]&&S._.children[R[0]].getChild?S._.children[R[0]].getChild(R.slice(1,R.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox(); -(function(){var R={build:function(S,T,U){var V=T.children,W,X=[],Y=[];for(var Z=0;Z',T||U.name,'');return V.join('');}};a.style.getStyleText=function(T){var U=T._ST;if(U)return U;U=T.styles;var V=T.attributes&&T.attributes.style||'',W='';if(V.length)V=V.replace(o,';');for(var X in U){var Y=U[X],Z=(X+':'+Y).replace(o,';');if(Y=='inherit')W+=Z;else V+=Z;}if(V.length)V=P(V);V+=W;return T._ST=V;};function s(T){var U,V;while(T=T.getParent()){if(T.getName()=='body')break;if(T.getAttribute('data-nostyle'))U=T;else if(!V){var W=T.getAttribute('contentEditable');if(W=='false')U=T;else if(W=='true')V=1;}}return U;};function t(T){var ay=this;var U=T.document;if(T.collapsed){var V=J(ay,U);T.insertNode(V);T.moveToPosition(V,2);return;}var W=ay.element,X=ay._.definition,Y,Z=X.ignoreReadonly,aa=Z||X.includeReadonly;if(aa==undefined)aa=U.getCustomData('cke_includeReadonly');var ab=f[W]||(Y=true,f.span);T.enlarge(1,1);T.trim();var ac=T.createBookmark(),ad=ac.startNode,ae=ac.endNode,af=ad,ag;if(!Z){var ah=s(ad),ai=s(ae);if(ah)af=ah.getNextSourceNode(true);if(ai)ae=ai;}if(af.getPosition(ae)==2)af=0;while(af){var aj=false;if(af.equals(ae)){af=null;aj=true;}else{var ak=af.type,al=ak==1?af.getName():null,am=al&&af.getAttribute('contentEditable')=='false',an=al&&af.getAttribute('data-nostyle');if(al&&af.data('cke-bookmark')){af=af.getNextSourceNode(true);continue;}if(!al||ab[al]&&!an&&(!am||aa)&&(af.getPosition(ae)|4|0|8)==4+0+8&&(!X.childRule||X.childRule(af))){var ao=af.getParent(); -if(ao&&((ao.getDtd()||f.span)[W]||Y)&&(!X.parentRule||X.parentRule(ao))){if(!ag&&(!al||!f.$removeEmpty[al]||(af.getPosition(ae)|4|0|8)==4+0+8)){ag=new d.range(U);ag.setStartBefore(af);}if(ak==3||am||ak==1&&!af.getChildCount()){var ap=af,aq;while((aj=!ap.getNext(q))&&(aq=ap.getParent(),ab[aq.getName()])&&(aq.getPosition(ad)|2|0|8)==2+0+8&&(!X.childRule||X.childRule(aq)))ap=aq;ag.setEndAfter(ap);}}else aj=true;}else aj=true;af=af.getNextSourceNode(an||am);}if(aj&&ag&&!ag.collapsed){var ar=J(ay,U),as=ar.hasAttributes(),at=ag.getCommonAncestor(),au={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},av,aw,ax;while(ar&&at){if(at.getName()==W){for(av in X.attributes){if(au.blockedAttrs[av]||!(ax=at.getAttribute(aw)))continue;if(ar.getAttribute(av)==ax)au.attrs[av]=1;else au.blockedAttrs[av]=1;}for(aw in X.styles){if(au.blockedStyles[aw]||!(ax=at.getStyle(aw)))continue;if(ar.getStyle(aw)==ax)au.styles[aw]=1;else au.blockedStyles[aw]=1;}}at=at.getParent();}for(av in au.attrs)ar.removeAttribute(av);for(aw in au.styles)ar.removeStyle(aw);if(as&&!ar.hasAttributes())ar=null;if(ar){ag.extractContents().appendTo(ar);G(ay,ar);ag.insertNode(ar);ar.mergeSiblings();if(!c)ar.$.normalize();}else{ar=new h('span');ag.extractContents().appendTo(ar);ag.insertNode(ar);G(ay,ar);ar.remove(true);}ag=null;}}T.moveToBookmark(ac);T.shrink(2);};function u(T){T.enlarge(1,1);var U=T.createBookmark(),V=U.startNode;if(T.collapsed){var W=new d.elementPath(V.getParent()),X;for(var Y=0,Z;Y'+V+'';else T.setHtml(V);U.remove();};function B(T){var U=/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,V=T.getName(),W=C(T.getOuterHtml(),U,function(Y,Z,aa){return Z+''+aa+'
    ';}),X=[];W.replace(/([\s\S]*?)<\/pre>/gi,function(Y,Z){X.push(Z);});return X;};function C(T,U,V){var W='',X='';T=T.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(Y,Z,aa){Z&&(W=Z);aa&&(X=aa);return '';});return W+T.replace(U,V)+X;};function D(T,U){var V;if(T.length>1)V=new d.documentFragment(U.getDocument());for(var W=0;W');X=X.replace(/[ \t]{2,}/g,function(Z){return e.repeat(' ',Z.length-1)+' ';});if(V){var Y=U.clone();Y.setHtml(X);V.append(Y);}else U.setHtml(X);}return V||U;};function E(T,U){var V=T.getBogus();V&&V.remove();var W=T.getHtml();W=C(W,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');W=W.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');W=W.replace(/([ \t\n\r]+| )/g,' ');W=W.replace(/]*>/gi,'\n');if(c){var X=T.getDocument().createElement('div');X.append(U);U.$.outerHTML='
    '+W+'
    ';U.copyAttributes(X.getFirst());U=X.getFirst().remove();}else U.setHtml(W);return U;};function F(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T)[U.getName()],Z=e.isEmpty(W)&&e.isEmpty(X);for(var aa in W){if((aa=='class'||T._.definition.fullMatch)&&U.getAttribute(aa)!=O(aa,W[aa]))continue;Z=U.hasAttribute(aa);U.removeAttribute(aa);}for(var ab in X){if(T._.definition.fullMatch&&U.getStyle(ab)!=O(ab,X[ab],true))continue;Z=Z||!!U.getStyle(ab);U.removeStyle(ab);}H(U,Y,m[U.getName()]);if(Z)!f.$block[U.getName()]||T._.enterMode==2&&!U.hasAttributes()?I(U):U.renameNode(T._.enterMode==1?'p':'div');};function G(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T),Z=U.getElementsByTag(T.element);for(var aa=Z.count();--aa>=0;)F(T,Z.getItem(aa));for(var ab in Y){if(ab!=T.element){Z=U.getElementsByTag(ab);for(aa=Z.count()-1;aa>=0;aa--){var ac=Z.getItem(aa);H(ac,Y[ab]);}}}};function H(T,U,V){var W=U&&U.attributes;if(W)for(var X=0;X0)H+=(F.$.offsetWidth||0)-(F.$.clientWidth||0)+3;H+=4;F.setStyle('width',H+'px');v.element.addClass('cke_frameLoaded');var I=v.element.$.scrollHeight;if(c&&b.quirks&&I>0)I+=(F.$.offsetHeight||0)-(F.$.clientHeight||0)+3;F.setStyle('height',I+'px');u._.currentBlock.element.setStyle('display','none').removeStyle('display');}else F.removeStyle('height');if(A)B-=w.$.offsetWidth;w.setStyle('left',B+'px');var J=u.element,K=J.getWindow(),L=w.$.getBoundingClientRect(),M=K.getViewPaneSize(),N=L.width||L.right-L.left,O=L.height||L.bottom-L.top,P=A?L.right:M.width-L.left,Q=A?M.width-L.right:L.left;if(A){if(PN)B+=N;else if(M.width>N)B-=L.left;else B=B-L.right+M.width;}else if(PN)B-=N;else if(M.width>N)B=B-L.right+M.width;else B-=L.left; -var R=M.height-L.top,S=L.top;if(RO)C-=O;else if(M.height>O)C=C-L.bottom+M.height;else C-=L.top;if(c){var T=new h(w.$.offsetParent),U=T;if(U.getName()=='html')U=U.getDocument().getBody();if(U.getComputedStyle('direction')=='rtl')if(b.ie8Compat)B-=w.getDocument().getDocumentElement().$.scrollLeft*2;else B-=T.$.scrollWidth-T.$.clientWidth;}var V=w.getFirst(),W;if(W=V.getCustomData('activePanel'))W.onHide&&W.onHide.call(this,1);V.setCustomData('activePanel',this);w.setStyles({top:C+'px',left:B+'px'});w.setOpacity(1);},this);u.isLoaded?E():u.onLoad=E;e.setTimeout(function(){x.$.contentWindow.focus();this.allowBlur(true);},0,this);},b.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);n=0;},hide:function(p){var r=this;if(r.visible&&(!r.onHide||r.onHide.call(r)!==true)){r.hideChild();b.gecko&&r._.iframe.getFrameDocument().$.activeElement.blur();r.element.setStyle('display','none');r.visible=0;r.element.getFirst().removeCustomData('activePanel');var q=p!==false&&r._.returnFocus;if(q){if(b.webkit&&q.type)q.getWindow().$.focus();q.focus();}}},allowBlur:function(p){var q=this._.panel;if(p!=undefined)q.allowBlur=p;return q.allowBlur;},showAsChild:function(p,q,r,s,t,u){if(this._.activeChild==p&&p._.panel._.offsetParentId==r.getId())return;this.hideChild();p.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=p;this._.focused=false;p.showBlock(q,r,s,t,u);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){p.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var p=this._.activeChild;if(p){delete p.onHide;delete p._.returnFocus;delete this._.activeChild;p.hide();}}}});a.on('instanceDestroyed',function(){var p=e.isEmpty(a.instances);for(var q in m){var r=m[q];if(p)r.destroy();else r.element.hide();}p&&(m={});});})();j.add('menu',{beforeInit:function(m){var n=m.config.menu_groups.split(','),o=m._.menuGroups={},p=m._.menuItems={};for(var q=0;q'],B=r.length,C=B&&r[0].group;for(var D=0;D');C=E.group;}E.render(this,D,A);}A.push('');u.setHtml(A.join(''));k.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(t,this.id,n,o,p,q);else t.showBlock(this.id,n,o,p,q);s.fire('menuShow',[t]);},addListener:function(n){this._.listeners.push(n);},hide:function(n){var o=this;o._.onHide&&o._.onHide();o._.panel&&o._.panel.hide(n);}}});function m(n){n.sort(function(o,p){if(o.groupp.group)return 1;return o.orderp.order?1:0;});};a.menuItem=e.createClass({$:function(n,o,p){var q=this;e.extend(q,p,{order:0,className:'cke_button_'+o});q.group=n._.menuGroups[q.group];q.editor=n;q.name=o;},proto:{render:function(n,o,p){var w=this;var q=n.id+String(o),r=typeof w.state=='undefined'?2:w.state,s=' cke_'+(r==1?'on':r==0?'disabled':'off'),t=w.label;if(w.className)s+=' '+w.className;var u=w.getItems;p.push(''+''+'');if(u)p.push('','&#',w.editor.lang.dir=='rtl'?'9668':'9658',';','');p.push(t,'');}}});})();i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div'; -(function(){var m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
    ';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);});n.on('afterSetData',function(){if(!m){function o(){m=true;n.getMode().loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){if(n.mode){o();n.removeListener('mode',arguments.callee);}});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(n.getMode().getData(),null,1);m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=n.getMode().getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)n.getMode().loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();b.webkit&&n.container.on('focus',function(){n.focus();});if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);},0);});n.on('destroy',function(){var o=this;if(o.mode)o._.modes[o.mode].unload(o.getThemeSpace('contents'));});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){this.fire('beforeSetMode',{newMode:n});var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this._.previousMode=this.mode;this.fire('beforeModeUnload');var r=this.getMode();o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=this.getMode(n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.getMode=function(n){return this._.modes&&this._.modes[n||this.mode];};a.editor.prototype.focus=function(){this.forceNextSelectionCheck();var n=this.getMode();if(n)n.focus();};})();i.startupMode='wysiwyg';i.editingBlock=true;(function(){function m(){var G=this;try{var D=G.getSelection();if(!D||!D.document.getWindow().$)return;var E=D.getStartElement(),F=new d.elementPath(E);if(!F.compare(G._.selectionPreviousPath)){G._.selectionPreviousPath=F;G.fire('selectionChange',{selection:D,path:F,element:E});}}catch(H){}};var n,o;function p(){o=true;if(n)return;q.call(this);n=e.setTimeout(q,200,this);};function q(){n=null;if(o){e.setTimeout(m,0,this);o=false;}};function r(D){function E(I,J){if(!I||I.type==3)return false; -var K=D.clone();return K['moveToElementEdit'+(J?'End':'Start')](I);};var F=D.startContainer,G=D.getPreviousNode(A,null,F),H=D.getNextNode(A,null,F);if(E(G)||E(H,1))return true;if(!(G||H)&&!(F.type==1&&F.isBlockBoundary()&&F.getBogus()))return true;return false;};var s={modes:{wysiwyg:1,source:1},readOnly:c||b.webkit,exec:function(D){switch(D.mode){case 'wysiwyg':D.document.$.execCommand('SelectAll',false,null);D.forceNextSelectionCheck();D.selectionChange();break;case 'source':var E=D.textarea.$;if(c)E.createTextRange().execCommand('SelectAll');else{E.selectionStart=0;E.selectionEnd=E.value.length;}E.focus();}},canUndo:false};function t(D){w(D);var E=D.createText('​');D.setCustomData('cke-fillingChar',E);return E;};function u(D){return D&&D.getCustomData('cke-fillingChar');};function v(D){var E=D&&u(D);if(E)if(E.getCustomData('ready'))w(D);else E.setCustomData('ready',1);};function w(D){var E=D&&D.removeCustomData('cke-fillingChar');if(E){var F,G=D.getSelection().getNative(),H=G&&G.type!='None'&&G.getRangeAt(0);if(E.getLength()>1&&H&&H.intersectsNode(E.$)){F=[G.anchorOffset,G.focusOffset];var I=G.anchorNode==E.$&&G.anchorOffset>0,J=G.focusNode==E.$&&G.focusOffset>0;I&&F[0]--;J&&F[1]--;x(G)&&F.unshift(F.pop());}E.setText(E.getText().replace(/\u200B/g,''));if(F){var K=G.getRangeAt(0);K.setStart(K.startContainer,F[0]);K.setEnd(K.startContainer,F[1]);G.removeAllRanges();G.addRange(K);}}};function x(D){if(!D.isCollapsed){var E=D.getRangeAt(0);E.setStart(D.anchorNode,D.anchorOffset);E.setEnd(D.focusNode,D.focusOffset);return E.collapsed;}};j.add('selection',{init:function(D){if(b.webkit){D.on('selectionChange',function(){v(D.document);});D.on('beforeSetMode',function(){w(D.document);});var E,F;function G(){var I=D.document,J=u(I);if(J){var K=I.$.defaultView.getSelection();if(K.type=='Caret'&&K.anchorNode==J.$)F=1;E=J.getText();J.setText(E.replace(/\u200B/g,''));}};function H(){var I=D.document,J=u(I);if(J){J.setText(E);if(F){I.$.defaultView.getSelection().setPosition(J.$,J.getLength());F=0;}}};D.on('beforeUndoImage',G);D.on('afterUndoImage',H);D.on('beforeGetData',G,null,null,0);D.on('getData',H);}D.on('contentDom',function(){var I=D.document,J=a.document,K=I.getBody(),L=I.getDocumentElement();if(c){var M,N,O=1;K.on('focusin',function(V){if(V.data.$.srcElement.nodeName!='BODY')return;var W=I.getCustomData('cke_locked_selection');if(W){W.unlock(1);W.lock();}else if(M&&O){try{M.select();}catch(X){}M=null;}});K.on('focus',function(){N=1;U();});K.on('beforedeactivate',function(V){if(V.data.$.toElement)return; -N=0;O=1;});c&&D.on('blur',function(){try{I.$.selection.empty();}catch(V){}});L.on('mousedown',function(){O=0;});L.on('mouseup',function(){O=1;});var P;K.on('mousedown',function(V){if(V.data.$.button==2){var W=D.document.$.selection;if(W.type=='None')P=D.window.getScrollPosition();}T();});K.on('mouseup',function(V){if(V.data.$.button==2&&P){D.document.$.documentElement.scrollLeft=P.x;D.document.$.documentElement.scrollTop=P.y;}P=null;N=1;setTimeout(function(){U(true);},0);});K.on('keydown',T);K.on('keyup',function(){N=1;U();});if(I.$.compatMode!='BackCompat'){if(b.ie7Compat||b.ie6Compat){function Q(V,W,X){try{V.moveToPoint(W,X);}catch(Y){}};L.on('mousedown',function(V){function W(ab){ab=ab.data.$;if(Z){var ac=K.$.createTextRange();Q(ac,ab.x,ab.y);Z.setEndPoint(aa.compareEndPoints('StartToStart',ac)<0?'EndToEnd':'StartToStart',ac);Z.select();}};function X(){J.removeListener('mouseup',Y);L.removeListener('mouseup',Y);};function Y(){L.removeListener('mousemove',W);X();Z.select();};V=V.data;if(V.getTarget().is('html')&&V.$.x0)P=Q-1;else if(R<0)O=Q+1;else if(b.ie9Compat&&L.tagName=='BR'){var U=J.defaultView.getSelection();return{container:U[H?'anchorNode':'focusNode'],offset:U[H?'anchorOffset':'focusOffset']};}else return{container:I,offset:E(L)};}if(Q==-1||Q==K.length-1&&R<0){N.moveToElementText(I);N.setEndPoint('StartToStart',G);S=N.text.replace(/(\r\n|\r)/g,'\n').length;K=I.childNodes;if(!S){L=K[K.length-1];if(L.nodeType!=3)return{container:I,offset:K.length};else return{container:L,offset:L.nodeValue.length};}var V=K.length; -while(S>0&&V>0){M=K[--V];if(M.nodeType==3){T=M;S-=M.nodeValue.length;}}return{container:T,offset:-S};}else{N.collapse(R>0?true:false);N.setEndPoint(R>0?'StartToStart':'EndToStart',G);S=N.text.replace(/(\r\n|\r)/g,'\n').length;if(!S)return{container:I,offset:E(L)+(R>0?0:1)};while(S>0)try{M=L[R>0?'previousSibling':'nextSibling'];if(M.nodeType==3){S-=M.nodeValue.length;T=M;}L=M;}catch(W){return{container:I,offset:E(L)};}return{container:T,offset:R>0?-S:T.nodeValue.length+S};}};return function(){var Q=this;var G=Q.getNative(),H=G&&G.createRange(),I=Q.getType(),J;if(!G)return[];if(I==2){J=new d.range(Q.document);var K=F(H,true);J.setStart(new d.node(K.container),K.offset);K=F(H);J.setEnd(new d.node(K.container),K.offset);if(J.endContainer.getPosition(J.startContainer)&4&&J.endOffset<=J.startContainer.getIndex())J.collapse();return[J];}else if(I==3){var L=[];for(var M=0;M=L.getLength())P.setStartAfter(L);else P.setStartBefore(L);if(M&&M.type==3)if(!O)P.setEndBefore(M);else P.setEndAfter(M);var Q=new d.walker(P);Q.evaluator=function(R){if(R.type==1&&R.isReadOnly()){var S=I.clone();I.setEndBefore(R);if(I.collapsed)G.splice(H--,1);if(!(R.getPosition(P.endContainer)&16)){S.setStartAfter(R);if(!S.collapsed)G.splice(H+1,0,S);}return true;}return false;};Q.next();}}return F.ranges;};})(),getStartElement:function(){var K=this;var D=K._.cache;if(D.startElement!==undefined)return D.startElement; -var E,F=K.getNative();switch(K.getType()){case 3:return K.getSelectedElement();case 2:var G=K.getRanges()[0];if(G){if(!G.collapsed){G.optimize();while(1){var H=G.startContainer,I=G.startOffset;if(I==(H.getChildCount?H.getChildCount():H.getLength())&&!H.isBlockBoundary())G.setStartAfter(H);else break;}E=G.startContainer;if(E.type!=1)return E.getParent();E=E.getChild(G.startOffset);if(!E||E.type!=1)E=G.startContainer;else{var J=E.getFirst();while(J&&J.type==1){E=J;J=J.getFirst();}}}else{E=G.startContainer;if(E.type!=1)E=E.getParent();}E=E.$;}}return D.startElement=E?new h(E):null;},getSelectedElement:function(){var D=this._.cache;if(D.selectedElement!==undefined)return D.selectedElement;var E=this,F=e.tryThese(function(){return E.getNative().createRange().item(0);},function(){var G,H,I=E.getRanges()[0],J=I.getCommonAncestor(1,1),K={table:1,ul:1,ol:1,dl:1};for(var L in K){if(G=J.getAscendant(L,1))break;}if(G){var M=new d.range(this.document);M.setStartAt(G,1);M.setEnd(I.startContainer,I.startOffset);var N=e.extend(K,f.$listItem,f.$tableContent),O=new d.walker(M),P=function(Q,R){return function(S,T){if(S.type==3&&(!e.trim(S.getText())||S.getParent().data('cke-bookmark')))return true;var U;if(S.type==1){U=S.getName();if(U=='br'&&R&&S.equals(S.getParent().getBogus()))return true;if(T&&U in N||U in f.$removeEmpty)return true;}Q.halted=1;return false;};};O.guard=P(O);if(O.checkBackward()&&!O.halted){O=new d.walker(M);M.setStart(I.endContainer,I.endOffset);M.setEndAt(G,2);O.guard=P(O,1);if(O.checkForward()&&!O.halted)H=G.$;}}if(!H)throw 0;return H;},function(){var G=E.getRanges()[0],H,I;for(var J=2;J&&!((H=G.getEnclosedNode())&&H.type==1&&y[H.getName()]&&(I=H));J--)G.shrink(1);return I.$;});return D.selectedElement=F?new h(F):null;},getSelectedText:function(){var D=this._.cache;if(D.selectedText!==undefined)return D.selectedText;var E='',F=this.getNative();if(this.getType()==2)E=c?F.createRange().text:F.toString();return D.selectedText=E;},lock:function(){var D=this;D.getRanges();D.getStartElement();D.getSelectedElement();D.getSelectedText();D._.cache.nativeSel={};D.isLocked=1;D.document.setCustomData('cke_locked_selection',D);},unlock:function(D){var I=this;var E=I.document,F=E.getCustomData('cke_locked_selection');if(F){E.setCustomData('cke_locked_selection',null);if(D){var G=F.getSelectedElement(),H=!G&&F.getRanges();I.isLocked=0;I.reset();if(G)I.selectElement(G);else I.selectRanges(H);}}if(!F||!D){I.isLocked=0;I.reset();}},reset:function(){this._.cache={};},selectElement:function(D){var F=this; -if(F.isLocked){var E=new d.range(F.document);E.setStartBefore(D);E.setEndAfter(D);F._.cache.selectedElement=D;F._.cache.startElement=D;F._.cache.ranges=new d.rangeList(E);F._.cache.type=3;return;}E=new d.range(D.getDocument());E.setStartBefore(D);E.setEndAfter(D);E.select();F.document.fire('selectionchange');F.reset();},selectRanges:function(D){var R=this;if(R.isLocked){R._.cache.selectedElement=null;R._.cache.startElement=D[0]&&D[0].getTouchedStartNode();R._.cache.ranges=new d.rangeList(D);R._.cache.type=2;return;}if(c){if(D.length>1){var E=D[D.length-1];D[0].setEnd(E.endContainer,E.endOffset);D.length=1;}if(D[0])D[0].select();R.reset();}else{var F=R.getNative();if(!F)return;if(D.length){F.removeAllRanges();b.webkit&&w(R.document);}for(var G=0;G=0){M.collapse(1);N.setEnd(M.endContainer.$,M.endOffset);}else throw S;}F.addRange(N);}R.document.fire('selectionchange');R.reset();}},createBookmarks:function(D){return this.getRanges().createBookmarks(D);},createBookmarks2:function(D){return this.getRanges().createBookmarks2(D);},selectBookmarks:function(D){var E=[];for(var F=0;F','','',this.label,'','=10900&&!o.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',p,'_label" aria-describedby="',p,'_text" aria-haspopup="true"'); -if(b.opera||b.gecko&&b.mac)n.push(' onkeypress="return false;"');if(b.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="CKEDITOR.tools.callFunction( ',t,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',u,', event);" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',q,', this); return false;">'+this.label+''+''+''+(b.hc?'▼':b.air?' ':'')+''+''+''+'');if(this.onRender)this.onRender();return r;},createPanel:function(m){if(this._.panel)return;var n=this._.panelDefinition,o=this._.panelDefinition.block,p=n.parent||a.document.getBody(),q=new k.floatPanel(m,p,n),r=q.addListBlock(this.id,o),s=this;q.onShow=function(){if(s.className)this.element.getFirst().addClass(s.className+'_panel');s.setState(1);r.focus(!s.multiSelect&&s.getValue());s._.on=1;if(s.onOpen)s.onOpen();};q.onHide=function(t){if(s.className)this.element.getFirst().removeClass(s.className+'_panel');s.setState(s.modes&&s.modes[m.mode]?2:0);s._.on=0;if(!t&&s.onClose)s.onClose();};q.onEscape=function(){q.hide();};r.onClick=function(t,u){s.document.getWindow().focus();if(s.onClick)s.onClick.call(s,t,u);if(u)s.setValue(t,s._.items[t]);else s.setValue('');q.hide(false);};this._.panel=q;this._.list=r;q.getBlock(this.id).onHide=function(){s._.on=0;s.setState(2);};if(this.init)this.init();},setValue:function(m,n){var p=this;p._.value=m;var o=p.document.getById('cke_'+p.id+'_text');if(o){if(!(m||n)){n=p.label;o.addClass('cke_inline_label');}else o.removeClass('cke_inline_label');o.setHtml(typeof n!='undefined'?n:m);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(m){this._.list.mark(m);},hideItem:function(m){this._.list.hideItem(m);},hideGroup:function(m){this._.list.hideGroup(m);},showAll:function(){this._.list.showAll();},add:function(m,n,o){this._.items[m]=o||m;this._.list.add(m,n,o);},startGroup:function(m){this._.list.startGroup(m);},commit:function(){var m=this;if(!m._.committed){m._.list.commit();m._.committed=1;k.fire('ready',m);}m._.committed=1;},setState:function(m){var n=this;if(n._.state==m)return;n.document.getById('cke_'+n.id).setState(m);n._.state=m;}}});k.prototype.addRichCombo=function(m,n){this.add(m,'richcombo',n);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var o=this; -o.base();o.indentationChars='\t';o.selfClosingEnd=' />';o.lineBreakChars='\n';o.forceSimpleAmpersand=0;o.sortAttributes=1;o._.indent=0;o._.indentation='';o._.inPre=0;o._.rules={};var m=f;for(var n in e.extend({},m.$nonBodyContent,m.$block,m.$listItem,m.$tableContent))o.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!m[n]['#'],breakAfterClose:1});o.setRules('br',{breakAfterOpen:1});o.setRules('title',{indent:0,breakAfterOpen:0});o.setRules('style',{indent:0,breakBeforeClose:1});o.setRules('pre',{indent:0});},proto:{openTag:function(m,n){var p=this;var o=p._.rules[m];if(p._.indent)p.indentation();else if(o&&o.breakBeforeOpen){p.lineBreak();p.indentation();}p._.output.push('<',m);},openTagClose:function(m,n){var p=this;var o=p._.rules[m];if(n)p._.output.push(p.selfClosingEnd);else{p._.output.push('>');if(o&&o.indent)p._.indentation+=p.indentationChars;}if(o&&o.breakAfterOpen)p.lineBreak();m=='pre'&&(p._.inPre=1);},attribute:function(m,n){if(typeof n=='string'){this.forceSimpleAmpersand&&(n=n.replace(/&/g,'&'));n=e.htmlEncodeAttr(n);}this._.output.push(' ',m,'="',n,'"');},closeTag:function(m){var o=this;var n=o._.rules[m];if(n&&n.indent)o._.indentation=o._.indentation.substr(o.indentationChars.length);if(o._.indent)o.indentation();else if(n&&n.breakBeforeClose){o.lineBreak();o.indentation();}o._.output.push('');m=='pre'&&(o._.inPre=0);if(n&&n.breakAfterClose)o.lineBreak();},text:function(m){var n=this;if(n._.indent){n.indentation();!n._.inPre&&(m=e.ltrim(m));}n._.output.push(m);},comment:function(m){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var m=this;if(!m._.inPre&&m._.output.length>0)m._.output.push(m.lineBreakChars);m._.indent=1;},indentation:function(){var m=this;if(!m._.inPre)m._.output.push(m._.indentation);m._.indent=0;},setRules:function(m,n){var o=this._.rules[m];if(o)e.extend(o,n,true);else this._.rules[m]=n;}}});j.add('menubutton',{requires:['button','menu'],beforeInit:function(m){m.ui.addHandler('menubutton',k.menuButton.handler);}});a.UI_MENUBUTTON='menubutton';(function(){var m=function(n){var o=this._;if(o.state===0)return;o.previousState=o.state;var p=o.menu;if(!p){p=o.menu=new a.menu(n,{panel:{className:n.skinClass+' cke_contextmenu',attributes:{'aria-label':n.lang.common.options}}});p.onHide=e.bind(function(){this.setState(this.modes&&this.modes[n.mode]?o.previousState:0);},this);if(this.onMenu)p.addListener(this.onMenu);}if(o.on){p.hide();return;}this.setState(1); -p.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(n){var o=n.panel;delete n.panel;this.base(n);this.hasArrow=true;this.click=m;},statics:{handler:{create:function(n){return new k.menuButton(n);}}}});})();j.add('dialogui');(function(){var m=function(u){var x=this;x._||(x._={});x._['default']=x._.initValue=u['default']||'';x._.required=u.required||false;var v=[x._];for(var w=1;w',v.label,'','');else{var D={type:'hbox',widths:v.widths,padding:0,children:[{type:'html',html:'