This is a combination of 19 commits. 10/32410/3
authorStefan Precht <sprecht@gmx.de>
Mon, 15 Jul 2013 07:02:18 +0000 (09:02 +0200)
committerStefan Precht <sprecht@gmx.de>
Fri, 29 Aug 2014 20:37:34 +0000 (22:37 +0200)
Initially commit of V1.6.3
moved pi1/classes to api/classes
moved utils to api/utils
Removed API deprecations.
Introduced some constants for data fields.
Removed the pages and recursive restriction for "loadCourse" when loading with an events id.
Removed some unused functions.
Added a titleTagFunction where you can use a courses title - subtitle as title for your course or event detailview.
Auto Reformat...
Added "keywords" to courses. Also rendered them with the metadata tool.
Support T3 Version 6.2 and added the field course.seodesc. Extended the TS config for the metadata feature.
Removed the deprecated code for lmOverview and lmShortOverview from pi1. Some small bugfixes due to wrong variable assignments.
New Icon
Removed deprecated views from the template.
Changed the mailing API.
Deactivated the output of description and keywords per default. You need to activate it explicitly.
Changed the TS setting showeventsago to showEventsAgo. Modified the documentation.

Change-Id: I4a068058486264685d7125fce8815ad729c46a25
Reviewed-on: http://review.typo3.org/32410
Reviewed-by: Stefan Precht <sprecht@gmx.de>
Tested-by: Stefan Precht <sprecht@gmx.de>
127 files changed:
ChangeLog [new file with mode: 0644]
README.txt [new file with mode: 0644]
ToDo.txt [new file with mode: 0644]
api/classes/class.tx_abcourses.AbcoursesBase.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Arrangement.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Category.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Categorys.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Course.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Event.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Hotel.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Loader.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Location.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Locations.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Participant.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Person.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Teachingaid.php [new file with mode: 0644]
api/classes/class.tx_abcourses.Trainer.php [new file with mode: 0644]
api/classes/class.tx_abcourses.classes.php [new file with mode: 0644]
api/classes/class.tx_abcourses.dal.php [new file with mode: 0644]
api/util/class.tx_abcourses.AbcoursesUtil.php [new file with mode: 0644]
api/util/class.tx_abcourses.CurrentContext.php [new file with mode: 0644]
api/util/class.tx_abcourses.DataArray.php [new file with mode: 0644]
api/util/class.tx_abcourses.QueryUtil.php [new file with mode: 0644]
api/util/class.tx_abcourses.utils.php [new file with mode: 0644]
de.locallang_db_flex.xml [new file with mode: 0644]
doc/csh/images/categorie.jpg [new file with mode: 0644]
doc/csh/images/categorie_image.jpg [new file with mode: 0644]
doc/csh/images/categorie_teaser.jpg [new file with mode: 0644]
doc/csh/images/categorie_title.jpg [new file with mode: 0644]
doc/csh/images/course.jpg [new file with mode: 0644]
doc/csh/images/course_categorie.jpg [new file with mode: 0644]
doc/csh/images/course_conditions.jpg [new file with mode: 0644]
doc/csh/images/course_conditionsref.jpg [new file with mode: 0644]
doc/csh/images/course_cost.jpg [new file with mode: 0644]
doc/csh/images/course_days.jpg [new file with mode: 0644]
doc/csh/images/course_description.jpg [new file with mode: 0644]
doc/csh/images/course_edupoints.jpg [new file with mode: 0644]
doc/csh/images/course_hidden.jpg [new file with mode: 0644]
doc/csh/images/course_number.jpg [new file with mode: 0644]
doc/csh/images/course_pages.jpg [new file with mode: 0644]
doc/csh/images/course_skilllevel.jpg [new file with mode: 0644]
doc/csh/images/course_subtitle.jpg [new file with mode: 0644]
doc/csh/images/course_teaser.jpg [new file with mode: 0644]
doc/csh/images/course_title.jpg [new file with mode: 0644]
doc/csh/images/course_trainer.jpg [new file with mode: 0644]
doc/csh/images/course_type.jpg [new file with mode: 0644]
doc/csh/images/datepicker.jpg [new file with mode: 0644]
doc/csh/images/event.jpg [new file with mode: 0644]
doc/csh/images/event_contingent.jpg [new file with mode: 0644]
doc/csh/images/event_discount.jpg [new file with mode: 0644]
doc/csh/images/event_end.jpg [new file with mode: 0644]
doc/csh/images/event_location.jpg [new file with mode: 0644]
doc/csh/images/event_participants.jpg [new file with mode: 0644]
doc/csh/images/event_start.jpg [new file with mode: 0644]
doc/csh/images/event_trainer.jpg [new file with mode: 0644]
doc/csh/images/events.jpg [new file with mode: 0644]
doc/csh/images/ext_icon__h.gif [new file with mode: 0644]
doc/csh/images/icon_tx_abcourses_categorie.gif [new file with mode: 0644]
doc/csh/images/icon_tx_abcourses_course.gif [new file with mode: 0644]
doc/csh/images/icon_tx_abcourses_course__h.gif [new file with mode: 0644]
doc/csh/images/icon_tx_abcourses_event.gif [new file with mode: 0644]
doc/csh/images/icon_tx_abcourses_event__h.gif [new file with mode: 0644]
doc/csh/images/icon_tx_abcourses_location.gif [new file with mode: 0644]
doc/csh/images/icon_tx_abcourses_options.gif [new file with mode: 0644]
doc/csh/images/icon_tx_abcourses_type.gif [new file with mode: 0644]
doc/csh/images/lastminuteflag.jpg [new file with mode: 0644]
doc/csh/images/location.jpg [new file with mode: 0644]
doc/csh/images/regstart.jpg [new file with mode: 0644]
doc/csh/images/timepicker.jpg [new file with mode: 0644]
doc/csh/images/type.jpg [new file with mode: 0644]
doc/csh/locallang_csh_categorie.php [new file with mode: 0644]
doc/csh/locallang_csh_course.php [new file with mode: 0644]
doc/csh/locallang_csh_event.php [new file with mode: 0644]
doc/csh/locallang_csh_location.php [new file with mode: 0644]
doc/csh/locallang_csh_type.php [new file with mode: 0644]
doc/manual.sxw [new file with mode: 0644]
ext_autoload.php [new file with mode: 0644]
ext_emconf.php [new file with mode: 0644]
ext_icon.gif [new file with mode: 0644]
ext_localconf.php [new file with mode: 0644]
ext_php_api.dat [new file with mode: 0644]
ext_tables.php [new file with mode: 0644]
ext_tables.sql [new file with mode: 0644]
ext_typoscript_editorcfg.txt [new file with mode: 0644]
ext_typoscript_setup.txt [new file with mode: 0644]
fi.locallang_db_flex.xml [new file with mode: 0644]
flexform_ds.xml [new file with mode: 0644]
hooks/class.tx_abcourses_metadata.php [new file with mode: 0644]
icon_tx_abcourses_arrangement.gif [new file with mode: 0644]
icon_tx_abcourses_arrangement__h.gif [new file with mode: 0644]
icon_tx_abcourses_categorie.gif [new file with mode: 0644]
icon_tx_abcourses_course.gif [new file with mode: 0644]
icon_tx_abcourses_course__h.gif [new file with mode: 0644]
icon_tx_abcourses_event.gif [new file with mode: 0644]
icon_tx_abcourses_event__h.gif [new file with mode: 0644]
icon_tx_abcourses_hotel.gif [new file with mode: 0644]
icon_tx_abcourses_hotel__h.gif [new file with mode: 0644]
icon_tx_abcourses_location.gif [new file with mode: 0644]
icon_tx_abcourses_options.gif [new file with mode: 0644]
icon_tx_abcourses_skillLevel_0.gif [new file with mode: 0644]
icon_tx_abcourses_skillLevel_1.gif [new file with mode: 0644]
icon_tx_abcourses_skillLevel_2.gif [new file with mode: 0644]
icon_tx_abcourses_skillLevel_3.gif [new file with mode: 0644]
icon_tx_abcourses_skillLevel_4.gif [new file with mode: 0644]
icon_tx_abcourses_skillLevel_blind.gif [new file with mode: 0644]
icon_tx_abcourses_teachingaids.gif [new file with mode: 0644]
icon_tx_abcourses_type.gif [new file with mode: 0644]
images/dl_icon.gif [new file with mode: 0644]
images/pdf_icon.gif [new file with mode: 0644]
images/star.psd [new file with mode: 0644]
images/star_0.gif [new file with mode: 0644]
images/star_1.gif [new file with mode: 0644]
images/star_2.gif [new file with mode: 0644]
images/star_3.gif [new file with mode: 0644]
images/star_4.gif [new file with mode: 0644]
images/star_5.gif [new file with mode: 0644]
locallang.xml [new file with mode: 0644]
locallang_db.xml [new file with mode: 0644]
locallang_db_flex.xml [new file with mode: 0644]
pi1/abcourses_template.tmpl [new file with mode: 0644]
pi1/ce_wiz.gif [new file with mode: 0644]
pi1/class.tx_abcourses_pi1.php [new file with mode: 0644]
pi1/class.tx_abcourses_pi1_wizicon.php [new file with mode: 0644]
pi1/clear.gif [new file with mode: 0644]
pi1/locallang.xml [new file with mode: 0644]
static/setup_metadata.txt [new file with mode: 0644]
tca.php [new file with mode: 0644]

diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..4cc964d
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,179 @@
+(add new changes on top of this file)
+
+14-08-18 Stefan Precht <sprecht@gmx.de>
+- Added seodesc attribute to a course.
+- now this is used for rendering the meta description
+- removed the deprecated lmShort and lmOverview view
+- Using the Mail API now
+  http://docs.typo3.org/typo3cms/CoreApiReference/6.2/ApiOverview/Mail/Index.html
+- Deactivated the rendering of description and title per default. You need to explicitly activate it per TS.
+- changed showeventsago TS setting for coursedetails to showEventsAgo
+
+
+14-08-17 Stefan Precht <sprecht@gmx.de>
+- Added keywords attribute to a course.
+- Added the possibility to render the keywords from a course.
+- Changed supported T3 Version to > 6.0 only.
+- Changed abcourses version to 1.7.0
+
+14-08-10 Stefan Precht <sprecht@gmx.de>
+- Added the possibility to render the description from a course.
+- introduced static/setup_metadata.txt
+
+14-06-18 Stefan Precht <sprecht@gmx.de>
+Many changes happened ...
+- Added class.tx_abcourses_metadate with function titleTagFunction. You can use this to overwrite a pages title with the
+  title of a shown seminar (only in course- or event-detailview). To use this, add the titleTagFunction within your TS
+  like this:
+    config.titleTagFunction = tx_abcourses_metadata->titleTagFunction
+- Code refactorings
+- removed the 'pages' and 'recursive' restriction when loading a course by its uid or by the uid of a courses event
+
+13-03-12 Stefan Precht <sprecht@gmx.de>
+- Removed API deprecations for using abcourses with TYPO3 V4.7
+
+10-02-25 V1.6.1 Stefan Precht <sprecht@gmx.de>
+- Fixed a bug within the Event class, which causes Participants not to be displayed as they should.
+
+[...Sorry, I did a mistake during publishing, so the version number was raised up to 1.6.0 ...]
+
+09-12-02 V1.5.0 Stefan Precht <sprecht@gmx.de>
+- Added a new subscriptions feature. Now you can configure your abcourses to track each subscription as tt_address record. Read more about this in the documentation.
+- If a event is not subscribable, the label "subscribelabel_unavailable" will be rendered instead of the normal link text.
+
+09-09-24 V1.4.3 Stefan Precht <sprecht@gmx.de>
+I changed the conditionsref part within the coursedetail view to the oop approach. Regarding to this
+there are some small changes within the template structure of that view as well as in the TS configuration
+for this view. Please take a look into the default template to get an example.
+
+09-09-28 V1.4.3 Stefan Precht <sprecht@gmx.de>
+Unfortunately, I'd overwritten the ###CONDITIONS### marker with the previous update. So it was not possible anymore to show the regarding text, entered in the backend.
+I renamed this marker to ###CONDITIONSTEXT###. Now it should work again...
+
+09-09-18 V1.4.3 Stefan Precht <sprecht@gmx.de>
+- Fixed a bug within the course detail view. The template snippets regarding the "###CONDITIONSREF###" templates within the default template
+was located outside of the "###EVENT###" subpart, but the rendering order expected it within that subpart ...
+
+09-08-10 V1.4.3 Stefan Precht <sprecht@gmx.de>
+- Fixed a bug within the category overview with next events which causes the overview to ignore the settings to configure the number of listed events.
+
+
+08-09-12 V1.4.2 Stefan Precht <sprecht@gmx.de>
+- Fixed a bug within the calculation of the accommodation period. I had forgotten to take care of possibly clock change.
+
+08-09-12 V1.4.1 Stefan Precht <sprecht@gmx.de>
+- just removed one duplicated folder
+
+08-09-12 V1.4.0 Stefan Precht <sprecht@gmx.de>
+- complete refactoring of the date rendering. ATTENTION! See the documentation about this too!
+- Removed the dependencie to kj_becalendar because of css problems with that extension in a current backend (V4.2.1)
+- Beacause of the count of changes, this should not be only a bugfix release. So this will become Version 1.4
+
+08-08-29 V1.3.3 Stefan Precht <sprecht@gmx.de>
+- changed the implementation of the hook in startSubscription($MA,$MACourse,$MAEvent,$MATrainer,$MALocation); thx to Tapio Markula who encoutered this bug.
+- added two hooks. displayDetail-Hook and fillAllLabels-hook. See also: Within the "f." manual.
+
+08-08-27 V1.3.3 Stefan Precht <sprecht@gmx.de>
+- added a flag useUTC in TS. See more about this in the documentation
+
+08-08-22 V1.3.3 Stefan Precht <sprecht@gmx.de>
+- Added a utils class
+- Added methods for time formatting to the utils class
+- replaced strftime with AbcoursesUtil::getFormattedTime
+- Add missing language labels
+  tx_abcourses_course.teachingaids
+  tx_abcourses_teachingaids
+  tx_abcourses_teachingaids.name
+- Changed the structure of the flexform and added language labels. Thxs to Stefan Gallinki and Tapio Markula.
+
+08-08-15 V1.3.3 Stefan Precht <sprecht@gmx.de>
+- Small changes of the default template
+- Fixed some bugs with the display of the enddate and time of an event.
+- Fixed a bug within the newly added mechanism to add Labels without programming.
+- Different code approvements
+- Changed the printme() of Events. No the Event loads intantiate his location automatically if it should be printed.
+
+08-07-24 V1.3.3 Stefan Precht <sprecht@gmx.de>
+- Added Plugin Viewtype specialcatoverview, to display selected categories and their courses.
+
+08-07-24 V1.3.3 Stefan Precht <sprecht@gmx.de>
+- Added NOCOURSES Block within the CouresesInCat Template
+
+08-07-13 V1.3.3 Stefan Precht <sprecht@gmx.de>
+- Changed the printme() method of a category. Now there is an ODDEVEN marker within the COURSES Template.
+
+08-05-30 V1.3.3 Stefan Precht <sprecht@gmx.de>
+- Added the possibilty to extend the global template markers for the views of this extension. More information in the TS documentation for "addOnLabels".
+- added an localization lookUp within the rendering of the subscription emails. This point got a paragraph in the documentation too.
+- Added documentation for changing the subscription form
+
+(!)  changed the following TS markers to camel case: sendto, mailfrom, mailfromname, maillabels, usedlabels
+  The lowercase version still works but is deprecated! I will remove the lowercase support in one the next versions.
+
+08-04-20 V1.3.2 Stefan Precht <sprecht@gmx.de>
+- Changed the query in cAbcoursesDal->coursesWithNextEvents. The previous Version used an alias for one field which causes an query error on some MySQL installations
+- Current version is now 1.3.2
+
+08-04-17 V1.3.1 Stefan Precht <sprecht@gmx.de>
+- Changed the query in cAbcoursesDal->coursesWithNextEvents. The previous Version used an alias for one field which causes an query error on some MySQL installations
+- Changed the inline docu for events
+- Changed the inline docu for courses
+- Made some changes in locallang_db.xml
+- Added some configration for time formats in the TS template.
+- Added some markers for events. Now also available: ###DATESTART###, ###DATEEND###, ###TIMEDATESTART###, ###TIMEDATEEND###
+- Added some ts wrap support for the new template markers
+- added the new marker fields to the default template
+
+08-03-21 V1.3.1 Stefan Precht <sprecht@gmx.de>
+- Corrected the filepath of the locallang-file from locallang.php to ...xml. I've forgotten this setting in the wizicon file while the
+conversion of the locallize files.
+- Small changes in the categories class file to avoid php errors if no categories are available.
+- Small changes in the locations class file.
+
+
+08-01-24 V1.3.0 Stefan Precht <sprecht@gmx.de>
+- pi1: Extend the selectedEvents function so both last minute views gets deprecated.
+- class.Location: Extend this class for a printme function
+- dal: Extend the access layer to support the extended selectedEvents function.
+- loader: Extend the access layer to support the extended selectedEvents function.
+- template: due to the changes as made for the selectedEvents function the template for this view changes to
+- default ts: extend the configuration for the selectedEvents function and deleted the default config for the deprecated last minute views
+
+08-01-23 V1.2.2 Stefan Precht <sprecht@gmx.de>
+- change the locallang.php files to xml format
+- JavaDoc documentation for all files in the classes folder.
+- Updated the ext_php_api.dat file
+
+08-01-22 V1.2.1 Stefan Precht <sprecht@gmx.de>
+- Inline documentation of the proxy class (JavaDoc format)
+- refactoring of pi1->displayResultlist and the corresponding templates
+- merge some functions in the cAbcoursesBase class for remove redundancies...
+
+[...]
+many changes in between... if you update to a 1.x.x version you have to modify your plugin configuration and some of your templates...
+[...]
+
+07-04-23 V0.10.0 Stefan Precht  <sprecht@gmx.de>
+- Extended the object model, Class cCourse and others
+- Added a block with "Similar Courses" in Course Detail View.
+  Templatemarker ###SIMILAREVENTS###, ###SIMILAREVENTSROW### with all available course fields for the similar course
+  Template ###SIMILARLINK### and ###SIMILARLINKTARGET### ti integrate an anchor in Detail View.
+- Add "sortingfieldcoursesincat" in TS configuration. default = sorting
+
+07-01-26 V0.9.10 Stefan Precht  <sprecht@gmx.de>
+- Bugfix release; Removes a bug in rendering the LMOverview Template.
+
+07-01-26 V0.9.9 Stefan Precht  <sprecht@gmx.de>
+- Bugfix release; Removes a bug in rendering the LMOverview Template.
+
+07-01-22 V0.9.8 Stefan Precht  <sprecht@gmx.de>
+- Integrated contingent management
+  Use the TS Flag usecontingent=1 to activate it.
+  With usage of the contingentmanagement, the subscribelink and the subscribeform ist only rendered if there ist more or equal than 1 place free
+  You can use the templatemarker ###CONTINGENTLEFT### in the detail-view and the subscribe-view
+- Extended the object model
+- Integrate the Trainer-Markers in the Course-Detailview
+
+06-02-27 Andreas Behrens; Stefan Precht  <behrens@b-networks.de; sprecht@gmx.de>
+
+       * Initial release
diff --git a/README.txt b/README.txt
new file mode 100644 (file)
index 0000000..2b9aebe
--- /dev/null
@@ -0,0 +1,2 @@
+
+Feel free to add some documentation or simply add a link to the online manual.
diff --git a/ToDo.txt b/ToDo.txt
new file mode 100644 (file)
index 0000000..5d55e79
--- /dev/null
+++ b/ToDo.txt
@@ -0,0 +1,25 @@
+NEXT RELEASE
+---
+- new screenshots for the documentation
+- refactoring the csh files
+- integrate a new marker which renders a link "back" to switch between different view types
+---
+
+And than
+---
+- ... in Kommentaren entfernen
+
+- deutsche Bezeichner im handbuch entfernen
+
+- Post Daten an Success Seite weiterreichen. Macht das Sinn?
+
+- Suchfunktionen und Zusammenspiel mit indexed_search und macinasearchbox prüfen
+
+- Detailsuche fertigstellen
+
+- template korrigieren
+  Category > categories  und nicht categorie > categories! Niedrig priorisiert. Auch wegen Abwärstkompatibilität.
+
+- Neue Referenz Seiten in der Doku ergänzen
+
+- deleted und hidden field für categories und types integrieren...
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.AbcoursesBase.php b/api/classes/class.tx_abcourses.AbcoursesBase.php
new file mode 100644 (file)
index 0000000..3b8d412
--- /dev/null
@@ -0,0 +1,84 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Base class for abcourses content objects.
+ *
+ */
+class cAbcoursesBase extends tslib_pibase {
+       var $arrData = '';
+       var $fError = 0;
+
+       /**
+        * Check if an error occured for the referenced object and write the error message array to the logfile. If you set debugme flag true, the error messages are pushed into the debug() function too.
+        *
+        * @param       object          $obj
+        * @return      [type]          ...
+        */
+       function checkErrors(&$obj) {
+               $debugme = false;
+               if ($obj->fError || (is_array($obj->arrStatus))) {
+                       foreach($obj->arrStatus as $error) {
+                               $sAllErrors .= $error . "\r\n";
+                       }
+                       t3lib_div::sysLog($sAllErrors,'abcourses');
+                       $this->fError = $obj->fError;
+                       $foo = ($debugme?debug($sAllErrors):'');
+               }
+       }
+
+       /**
+        * To set an internal value.
+        *
+        * @param       array           $value
+        * @return      [type]          ...
+        */
+       function set_arrData($value){
+           if (is_array($value)){
+                   $this->arrData = $value;
+           } else {
+               $this->arrData = '';
+           }
+       }
+
+       /**
+        * This returns a reference to the internal data array.
+        *
+        * @return      array
+        */
+       function &get_arrData(){
+               return $this->arrData;
+       }
+
+       /**
+        * Returns a single value of the internal data array.
+        *
+        * @param       string          $value: Each DB Field is possible.
+        * @return      string
+        */
+       function getSingleData($value){
+               return $this->arrData[$value];
+       }
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Arrangement.php b/api/classes/class.tx_abcourses.Arrangement.php
new file mode 100644 (file)
index 0000000..9875d9b
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * cArrangement object of abcourses plugin.
+ *
+ */
+class cArrangement extends cAbcoursesBase {
+       var $fError = 0;
+       var $arrStatus = Array();
+
+       /**
+        * To initalise an cArrangement instance with the respective data
+        *
+        * @param       integer         $arrangementId Uid of the record you want to load
+        * @param       cAbcoursesDAL           $DAL Reference to the used data access layer object
+        * @return      [type]          ...
+        */
+       function loadData($arrangementId='',&$DAL) {
+               if (!$this->arrData) {
+                       $this->arrData = $DAL->loadArrangement($arrangementId);
+                       $this->checkErrors($DAL);
+                       if ($this->arrData == 0) $this->fError = 1;
+               }
+       }
+
+       /**
+        * This function render the view for this event, depending on the given template.
+        *
+        * @param       string          $template : The remplate for rendering the view.
+        * @param       string          &$cObj : A reference to the cObj of the pi1 class who wants to render this view.
+        * @param       string          $conf   : A snippet of TS configuration which should be used for this event.
+        * @return      [type]          ...
+        */
+       function printme($template, &$view, $conf='') {
+               $debugme = false;
+
+               $MA['###FORMFIELD###'] = $this->getSingleData('uid');
+               $MA['###FRONTENDNAME###'] = ($this->getSingleData('frontendname')?$this->getSingleData('frontendname'):'');
+
+               if ($this->getSingleData('price')!='') {
+                       //calculate the shown price
+                       $price = doubleval($this->getSingleData('price'));
+                       $MA['###PRICE###'] = $view->cObj->stdWrap($view->calcPrice($price,$view->conf,0),$conf['priceWrap.']);
+                       $MA['###PRICETAX###'] = $view->cObj->stdWrap($view->calcPrice($price,$view->conf,1),$conf['priceTaxWrap.']);
+               } else {
+                       $MA['###PRICE###'] = '';
+                       $MA['###PRICETAX###'] = '';
+               }
+
+               if($debugme){debug($MA);}
+
+               //render and return the view
+               return $view->cObj->substituteMarkerArrayCached($template, $MA);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Category.php b/api/classes/class.tx_abcourses.Category.php
new file mode 100644 (file)
index 0000000..c2e5885
--- /dev/null
@@ -0,0 +1,219 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * cCategory class of the abcourses plugin.
+ *
+ */
+class cCategory extends cAbcoursesBase {
+       var $fError = 0;
+       var $arrStatus = Array();
+       var $arrCourses = '';
+
+       /**
+        * To initalise an cCategory instance with the respective data. You can load this with an uid or with the uid of an associated course.
+        *
+        * @param       integer         $categoryId Uid of the record you want to load
+        * @param       integer         $courseId Uid of a course, for which you would like to load the associated category.
+        * @param       cAbcoursesDAL           $DAL Reference to the used data access layer object
+        * @return      void
+        */
+       function loadData($categoryId='',$courseId='',&$DAL) {
+               if (!$this->arrData) {
+                       if($categoryId!='') {
+                               $this->arrData = $DAL->loadCategory($categoryId);
+                       }elseif($courseId!=''){
+                               $this->arrData = $DAL->loadCategory('',$courseId);
+                       }
+                       $this->checkErrors($DAL);
+                       if ($this->arrData == 0) $this->fError = 1;
+               }
+       }
+
+       /**
+        * To load the internal course array of a category object.
+        *
+        * @param       cLoader         $objLoader      Reference to an instance of the abcourses proxy class
+        * @param       integer         $onlyWithNextEvents     As example, if you set this to 2 the category gets 2 courses initialised with the closest event. Please consider that this is only a flag. You have to set the initEvents flag too, for initialising the events automatically.
+        * @param       integer         $initEvents     Set this flag if you would like to initialise the events of the courses too. If you do not set this, only the courses will be initialised.
+        * @return      void
+        */
+       function load_arrCourses(&$objLoader,$onlyWithNextEvents = 0, $initEvents = 0){
+               $debugme = false;
+
+               $onlyWithNextEvents = intval($onlyWithNextEvents);
+               $DAL =& $objLoader->get_DAL();
+
+               if (!$this->arrData) {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'Cannot load Courses for Category without Category Data in cCategory->load_arrCourses';
+                       $this->checkErrors($this);
+                       return;
+               }
+
+               if ($onlyWithNextEvents) {
+                       //load only the courses with the closest events
+                       $arrCourseIds = $DAL->listCoursesWithNextEvents($this->arrData['uid'],$onlyWithNextEvents);
+                       $this->checkErrors($DAL);
+               } elseif (!$this->arrCourses) {
+                       //list all Courses of this Category
+                       $arrCourseIds = $DAL->listCourses($this->arrData['uid']);
+                       $this->checkErrors($DAL);
+               }
+
+               $foo = ($debugme?debug($arrCourseIds):'');
+               $foo = ($debugme?debug("Error in load_arrCourses " . $this->fError):'');
+
+               if (!$this->fError && $arrCourseIds) {
+                       reset($arrCourseIds);
+                       while (list($key, $id) = each($arrCourseIds)) {
+                               $this->arrCourses[$id] =& $objLoader->get_Course($id);
+                               $foo = ($debugme?debug($this->arrCourses[$id]):'');
+                               $Course =& $this->arrCourses[$id];
+
+                               //FIXME This is a bug as displayCategoryWithNextEvents will only display one Event Item...
+
+                               if ($onlyWithNextEvents) {
+                                       $Course->setDisplayNextEventOnly(1);
+                               }
+                               $foo = ($debugme?debug("Should we load the Events too?: " . $initEvents):'');
+                               if ($initEvents) {
+                                       $Course->load_arrEvents($objLoader);
+                               }
+                       }
+                       reset($this->arrCourses);
+               }
+       }
+
+       /**
+        * To set an internal value
+        *
+        * @param       array           $value
+        * @return      [type]          ...
+        */
+       function set_arrCourses($value){
+               $this->arrCourses = $value;
+       }
+
+       /**
+        * This returns a reference to the internal course array.
+        *
+        * @return      array           Content of the array: id => cCourse
+        */
+       function &get_arrCourses(){
+               return $this->arrCourses;
+       }
+
+       /**
+        * Returns how many courses are initialised in the internal array.
+        *
+        * @return      integer
+        */
+       function countCourses(){
+               if (is_array($this->arrCourses)) {
+                       return count($this->arrCourses);
+               } else {
+                       return 0;
+               }
+       }
+
+       /**
+        * This function render the view for this category, depending on the given template. Contained courses are rendered too.
+        *
+        * @param       string          $template : The remplate for rendering the view.
+        * @param       string          &$cObj : A reference to the cObj of the pi1 class who wants to render this view.
+        * @param       string          $conf   : A snippet of TS configuration which should be used for this category.
+        * @return      [type]          ...
+        */
+       function printme($template, &$view, $conf) {
+               $debugme = false;
+               $MA = Array();
+
+               $templateCourses = $view->cObj->getSubpart($template, '###COURSES###');
+               $templateNoCourses = $view->cObj->getSubpart($template, '###NOCOURSES###');
+
+               // Datensatz (Kategorie): Inhalte über cObj wrappen.
+               $sTitleLink = $view->cObj->stdWrap(
+               $view->pi_linkToPage(
+               $this->getSingleData("title"),
+               $view->conf['pidOverview'],
+                           '',
+               array($view->prefixId .'[catId]' => $this->getSingleData("uid"), $view->prefixId . '[mode]'=>'courses')
+               ),
+               $conf['catTitleLinkWrap.']
+               );
+
+               $sTitle =  $view->cObj->stdWrap($this->getSingleData("title"),$conf['catTitleWrap.']);
+
+               $sTeaser = $view->cObj->stdWrap(
+                               $view->cObj->parseFunc($this->getSingleData("teaser"),
+                       $conf['parseFunc.']),
+                       $conf['catTeaserWrap.']
+               );
+
+               $sImage = $conf['catImageWrap.'];
+               $sImage['if.']['isTrue'] = $this->getSingleData("image");
+               $sImage['file'] = $view->conf['uploaddir'] . $this->getSingleData("image"); //Dateipfad zusammensetzen
+               $sImage = $view->cObj->IMAGE($sImage);
+
+               $MA['###CATTITLELINK###']   =  $sTitleLink;
+               $MA['###CATTITLE###']       =  $sTitle;
+               $MA['###CATTEASER###']      =  $sTeaser;
+               $MA['###CATIMAGE###']       =  $sImage;
+
+               if ($debugme) {
+                       debug($MA);
+               }
+
+               $courses = '';
+
+               $foo = ($debugme?debug($this->countCourses()):'');
+
+               //should we trigger the view of some courses too?
+               if($this->countCourses() && $templateCourses) {
+                       $templateCourse = $view->cObj->getSubpart($templateCourses, '###COURSE###');
+                       $course = '';
+                       reset($this->arrCourses);
+                       $sOE = '';
+                       while (list($id, $Course) = each($this->arrCourses)) {
+                               $singleCourse = '';
+                               $sOE =  ($sOE=='odd'?'even':'odd');
+                               $singleCourse = $Course->printme($templateCourse,$view,$conf['course.']);
+                               $singleCourse = $view->cObj->substituteMarker($singleCourse,'###ODDEVEN###',$sOE);
+                               $course .= $singleCourse;
+
+                       }
+                       $courses = $view->cObj->substituteSubpart($templateCourses,'###COURSE###',$course);
+               } else {
+                       $courses = $templateNoCourses;
+               }
+
+               $template = $view->cObj->substituteSubpart($template,'###NOCOURSES###',"");
+               $template = $view->cObj->substituteSubpart($template,'###COURSES###',$courses);
+
+               //render and return the view
+               return $view->cObj->substituteMarkerArrayCached($template, $MA);
+       }
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Categorys.php b/api/classes/class.tx_abcourses.Categorys.php
new file mode 100644 (file)
index 0000000..411fdcd
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * cCategorys is as like a wrapper class for cCategory objects. It collects all available categorys in an internal array.
+ * This is used for category listings.
+ *
+ */
+class cCategorys extends cAbcoursesBase {
+
+    var $fError = 0;
+    var $arrStatus = Array();
+    var $arrCategoryIds = '';
+    var $DAL = '';
+
+    /**
+     * Initialise this object. Loads the internal array with category ids but does not initalise the category objects.
+     *
+     * @param  cAbcoursesDAL           $DAL A reference to the used abstraction layer
+     * @return void
+     */
+    function init(&$DAL) {
+        $this->DAL = $DAL;
+        $this->arrCategoryIds = $this->DAL->listCategorys();
+        $this->checkErrors($this->DAL);
+    }
+
+    /**
+     * Initialise the category objects and put them into the internal category array.
+     *
+     * @return void
+     */
+    function loadData() {
+        if ($this->fError || !(is_array($this->arrCategoryIds))) {return;}
+        foreach($this->arrCategoryIds as $key=>$value) {
+            $objNextCategory=&t3lib_div::makeInstance('cCategory');
+            $objNextCategory->loadData($value,'',$this->DAL);
+            $this->arrData[$objNextCategory->arrData['uid']] = $objNextCategory;
+            unset($objNextCategory);
+        }
+    }
+
+    /**
+     * Returns a list with all uid->title pairs of loaded categories. Returns an empty array
+     * if no categories are available.
+     *
+     * @return array
+     */
+    function getCategoryUidTitleArray() {
+        $arrReturn = Array();
+        if (is_array($this->arrData)){
+            reset($this->arrData);
+            while (list($key) = each($this->arrData)) {
+                $arrReturn[$key] = $this->arrData[$key]->arrData['title'];
+            }
+            reset($this->arrData);
+        }
+        return $arrReturn;
+    }
+
+
+}
+
+
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Course.php b/api/classes/class.tx_abcourses.Course.php
new file mode 100644 (file)
index 0000000..58ff219
--- /dev/null
@@ -0,0 +1,525 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * The cCourse class handles the course records of the abcourses plugin.
+ *
+ */
+class cCourse extends cAbcoursesBase{
+
+       var $fError = 0;
+       var $arrStatus = Array();
+       var $arrEvents = '';
+       var $arrTeachingaids = '';
+       var $arrTrainer = '';
+       var $arrConditions = '';
+       var $displayNextEventOnly = 0;
+    const UID = "uid";
+    const NUMBER = "number";
+    const TITLE = "title";
+    const SUBTITLE = "subtitle";
+    const TEASER = "teaser";
+    const DESCRIPTION = "description";
+    const SEODESC = "seodesc";
+    const KEYWORDS = "keywords";
+    const EDUPOINTS = "edupoints";
+    const CONTINGENT = "contingent";
+    const DAYS = "days";
+    const CONDITIONS = "conditions";
+    const COST = "cost";
+    const SKILLLEVEL = "skilllevel";
+
+    /**
+        * This loads the data of a course record, depending to a passed courseId or an corresponding eventId.
+        *
+        * @param       integer         $courseId       Id of the course record you would like to get
+        * @param       integer         $eventId Get an course record with an associated event id
+        * @param       cAbcoursesDAL           $DAL A reference to the used abstraction layer
+        * @return      [type]          ...
+        */
+       function loadData($courseId='',$eventId='',&$DAL) {
+               if (!$this->arrData) {
+                       $this->arrData = $DAL->loadCourse($courseId,$eventId);
+                       $this->checkErrors($DAL);
+                       if ($this->arrData == 0) $this->fError = 1;
+               }
+       }
+
+       /**
+        * Returns how many events are currently initialised
+        *
+        * @return      integer
+        */
+       function countEvents(){
+               if (is_array($this->arrEvents)) {
+                       return count($this->arrEvents);
+               } else {
+                       return 0;
+               }
+       }
+
+       /**
+        * Returns how many teaching aids are currently initialised
+        *
+        * @return      integer
+        */
+       function countTeachingaids(){
+               if (is_array($this->arrTeachingaids)) {
+                       return count($this->arrTeachingaids);
+               } else {
+                       return 0;
+               }
+       }
+
+       /**
+        * Returns how many trainer are currently initialised
+        *
+        * @return      integer
+        */
+       function countTrainer(){
+               if (is_array($this->arrTrainer)) {
+                       return count($this->arrTrainer);
+               } else {
+                       return 0;
+               }
+       }
+
+       /**
+        * Returns how many conditional courses are currently initialized
+        *
+        * @return      integer
+        */
+       function countConditions(){
+               if (is_array($this->arrConditions)) {
+                       return count($this->arrConditions);
+               } else {
+                       return 0;
+               }
+       }
+
+       /**
+        * Load the internal trainer array.
+        *
+        * @param       unknown_type            $objLoader A reference to the used proxy class
+        * @return      void
+        */
+       function load_arrTrainer(&$objLoader){
+               $debugme = false;
+
+               $DAL =& $objLoader->get_DAL();
+
+               if (!$this->arrData) {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'Can not load trainer for a course without a course uid';
+                       $this->checkErrors($this);
+                       return;
+               }
+
+               $arrTrainerIds = 0;
+               $arrTrainerIds = $DAL->listTrainer($this->getSingleData(self::UID));
+               $this->checkErrors($DAL);
+
+               $foo = ($debugme?debug("The following trainer matches the criteria"):'');
+               $foo = ($debugme?debug($arrTrainerIds):'');
+
+               if (!$this->fError && $arrTrainerIds) {
+                       reset($arrTrainerIds);
+                       while (list($key, $id) = each($arrTrainerIds)) {
+                               $this->arrTrainer[$id] =& $objLoader->get_Trainer($id);
+                       }
+                       reset($this->arrTrainer);
+               }
+       }
+
+       /**
+        * Load the internal array with conditional courses
+        * @param $objLoader
+        * @return void
+        */
+       function load_arrConditions(&$objLoader) {
+               $debugme = false;
+
+               $DAL =& $objLoader->get_DAL();
+
+               if (!$this->arrData) {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'Can not load conditional courses for a course without a uid';
+                       $this->checkErrors($this);
+                       return;
+               }
+
+               $arrCourseIds = 0;
+               $arrCourseIds = $DAL->listConditionalCourses($this->getSingleData(self::UID));
+               $this->checkErrors($DAL);
+
+               $foo = ($debugme?debug("The following courses matches the criteria"):'');
+               $foo = ($debugme?debug($arrCourseIds):'');
+
+               if (!$this->fError && $arrCourseIds) {
+                       reset($arrCourseIds);
+                       while(list($key, $id) = each($arrCourseIds)){
+                               $this->arrConditions[$id] =& $objLoader->get_Course($id);
+                       }
+                       reset($this->arrConditions);
+               }
+
+       }
+
+       /**
+        * Load the internal array of teaching aids.
+        *
+        * @param       unknown_type            $objLoader A reference to the used proxy class
+        * @return      void
+        */
+       function load_arrTeachingaids(&$objLoader){
+               $debugme = false;
+
+               $DAL =& $objLoader->get_DAL();
+
+               if (!$this->arrData) {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'Can not load teaching aids for a course without a course uid';
+                       $this->checkErrors($this);
+                       return;
+               }
+
+               $arrTeachingaidsIds = 0;
+               $arrTeachingaidsIds = $DAL->listTeachingaidsForCourse($this->getSingleData(self::UID));
+               $this->checkErrors($DAL);
+
+               $foo = ($debugme?debug("The following teaching aids matches the criteria"):'');
+               $foo = ($debugme?debug($arrTeachingaidsIds):'');
+
+               if (!$this->fError && $arrTeachingaidsIds) {
+                       reset($arrTeachingaidsIds);
+                       while (list($key, $id) = each($arrTeachingaidsIds)) {
+                               $this->arrTeachingaids[$id] =& $objLoader->get_Teachingaid($id);
+                       }
+                       reset($this->arrTeachingaids);
+               }
+
+       }
+
+       /**
+        * Loads the events array of this course.
+        *
+        * @param       cLoader         $objLoader: An reference to a cLoader instance.
+        * @param       integer         $showeventsago: Set this e.g. to "2" if you want to load events too which are out of date since max 2 days.
+        * @param       array           $displayEventInList: Arraykey is the eventid and value is 1 if you want to load only special events for this course.
+        * @param   integer     $limitEvents: This limits the count of events added to the course. Set to 0 deactivates this feature.
+        * @return      [type]          ...
+        */
+       function load_arrEvents(&$objLoader,$showeventsago = 0,$displayEventInList='',$limitEvents=''){
+
+               $debugme = false;
+
+               $DAL =& $objLoader->get_DAL();
+               $showeventsago = intval($showeventsago);
+
+               $foo = ($debugme?debug("Limit Events to: " . $limitEvents):'');
+               $foo = ($debugme?debug("Show events with a start date older than " . $showeventsago . " days too"):'');
+
+               if (!$this->arrData) {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'Can not load events for a course without a course uid';
+                       $this->checkErrors($this);
+                       return;
+               }
+
+               $arrEventIds = 0;
+               if ($this->displayNextEventOnly) {
+                       $foo = ($debugme?debug("List only the next events: " . $this->displayNextEventOnly):'');
+                       //load only the closest event
+                       $arrEventIds = $DAL->listNextEventForCourse($this->getSingleData(self::UID),$showeventsago);
+                       $this->checkErrors($DAL);
+               } elseif (!$this->arrEvents) {
+                       $foo = ($debugme?debug("List all events."):'');
+                       //list all events of this course
+                       $arrEventIds = $DAL->listEvents($this->getSingleData(self::UID),$showeventsago);
+                       $this->checkErrors($DAL);
+               } elseif (is_array($displayEventInList)){
+                       $arrEventIds = Array();
+                       while (list($eventId, $displayState) = each($displayEventInList)) {
+                               $arrEventIds[] = $eventId;
+                       }
+               }
+
+               if (!$this->fError && $arrEventIds) {
+                       reset($arrEventIds);
+                       $count = 1;
+               
+                       while (list($key, $id) = each($arrEventIds)) {
+                               if (!$limitEvents || ($count<=$limitEvents)) {
+                                       if (!$displayEventInList || $displayEventInList[$id]==1) {
+                                               $state = $this->addEvent($id,$objLoader);
+                                               if ($debugme && $state==0) {
+                                                       debug("Failed to load Event with id " . $id);
+                                               }
+                                       }
+                               }
+                               $count++;
+                       }
+                       reset($this->arrEvents);
+               }
+       }
+
+       /**
+        * This function initialise one single event and add it to the internal array for later usage.
+        *
+        * @param       integer         $eventId : The id of the event you want to add.
+        * @param       [type]          $objLoader: ...
+        * @return      [type]          ...
+        */
+       function addEvent($eventId,&$objLoader) {
+               if (!is_array($this->arrEvents)) {
+                       $this->arrEvents = Array();
+               }
+               if (!$this->arrEvents[$eventId]) {
+                       $this->arrEvents[$eventId] =& $objLoader->get_Event($eventId);
+               }
+               return ($this->arrEvents[$eventId]?1:0);
+       }
+
+       /**
+        * [Describe function...]
+        *
+        * @param       [type]          $value: ...
+        * @return      [type]          ...
+        */
+       function set_arrTeachingaids($value){
+               $this->arrTeachingaids = $value;
+       }
+
+       /**
+        * [Describe function...]
+        *
+        * @return      [type]          ...
+        */
+       function &get_arrTeachingaids(){
+               return $this->arrTeachingaids;
+       }
+
+       /**
+        * To set the array with conditional courses.
+        *
+        * @param       [type]          $value: ...
+        * @return      [type]          ...
+        */
+       function set_arrConditions($value){
+               $this->arrConditions = $value;
+       }
+
+       /**
+        * Returns an array with already initialized conditional courses.
+        *
+        * @return      [type]          ...
+        */
+       function &get_arrConditions(){
+               return $this->arrConditions;
+       }
+
+       /**
+        * If you call this with "1" this course will load only the next event, when load_arrEvents is called. You have to call this BEFORE you call load_arrEvents.
+        *
+        * @param       integer         $val Set this to 1 or 0 || true or false
+        * @return      [type]          ...
+        */
+       function setDisplayNextEventOnly($val) {
+               $this->displayNextEventOnly = $val;
+       }
+
+       /**
+        * This function render the view for this course, depending on the given template. Initialised events are rendered too.
+        *
+        * @param       string          $template : The remplate for rendering the view.
+        * @param       string          &$cObj : A reference to the cObj of the pi1 class who wants to render this view.
+        * @param       string          $conf   : A snippet of TS configuration which should be used for this course.
+        * @return      [type]          ...
+        */
+       function printme($template, &$view, $conf) {
+               $debugme = false;
+               $MA = Array();
+
+               $templateEvents = $view->cObj->getSubpart($template, '###EVENTS###');
+               $templateTeachingaids = $view->cObj->getSubpart($template, '###TEACHINGAIDS###');
+               $templateTrainers = $view->cObj->getSubpart($template, '###TRAINERS###');
+               $templateConditions = $view->cObj->getSubpart($template, '###CONDITIONS###');
+               $templateFiles = $view->cObj->getSubpart($template,'###FILES###');
+
+               //Daten (Kurs) wrappen und im MA ablegen.
+               $MA['###COURSEUID###']    = ($this->getSingleData(self::UID)!=''?$this->getSingleData(self::UID):'');
+               $MA['###NUMBER###']       = ($this->getSingleData(self::NUMBER)!=''?$view->cObj->stdWrap($this->getSingleData(self::NUMBER), $conf['courseNumberWrap.']):'');
+               $MA['###TITLE###']        = ($this->getSingleData(self::TITLE)!=''?$view->cObj->stdWrap($this->getSingleData(self::TITLE), $conf['courseTitleWrap.']):'');
+               $MA['###SUBTITLE###']     = ($this->getSingleData(self::SUBTITLE)!=''?$view->cObj->stdWrap($this->getSingleData(self::SUBTITLE), $conf['courseSubtitleWrap.']):'');
+               $MA['###TEASER###']       = ($this->getSingleData(self::TEASER)!=''?$view->cObj->stdWrap($view->cObj->parseFunc($this->getSingleData(self::TEASER), $conf['parseFunc.']), $conf['courseTeaserWrap.']):'');
+               $MA['###DESCRIPTION###']  = ($this->getSingleData(self::DESCRIPTION)!=''?$view->cObj->stdWrap($view->cObj->parseFunc($this->getSingleData(self::DESCRIPTION), $conf['parseFunc.']), $conf['courseDescriptionWrap.']):'');
+               $MA['###EDUPOINTS###']    = (intval($this->getSingleData(self::EDUPOINTS))>0?$view->cObj->stdWrap($this->getSingleData(self::EDUPOINTS), $conf['courseEdupointsWrap.']):$view->pi_getLL('novalue'));
+               $MA['###CONTINGENT###']   = ($this->getSingleData(self::CONTINGENT)!=''?$view->cObj->stdWrap($this->getSingleData(self::CONTINGENT), $conf['courseContingentWrap.']):$view->pi_getLL('novalue'));
+               $MA['###DAYS###']         = ($this->getSingleData(self::DAYS)!=''?$view->cObj->stdWrap($this->getSingleData(self::DAYS), $conf['courseDaysWrap.']):'');
+               $MA['###DAYSLABEL###']    = ($this->getSingleData(self::DAYS)!=''?$view->cObj->stdWrap((intval($this->getSingleData(self::DAYS))>1?$view->pi_getLL('labeldays'):$view->pi_getLL('labelday')), $conf['courseDayslabelWrap.']):'');
+               $MA['###CONDITIONSTEXT###']   = ($this->getSingleData(self::CONDITIONS)!=''?$view->cObj->stdWrap($view->cObj->parseFunc($this->getSingleData(self::CONDITIONS), $conf['parseFunc.']), $conf['courseConditionWrap.']):'');
+               $MA['###DETAILLINK###']   = ($this->getSingleData(self::UID)!=''?$view->cObj->stdWrap(
+            $view->pi_LinkToPage($view->pi_getLL('coursedetaillinklabel'),
+            $view->conf['pidCourseDetails'],'',
+            array($view->prefixId. '[courseId]'=>$this->getSingleData(self::UID)))
+            ,$conf['courseDetaillinkWrap.']):'');
+
+               
+               $MA['###TITLELINK###']   = (($this->getSingleData(self::UID)!='')&&($this->getSingleData(self::TITLE)!='')?$view->cObj->stdWrap(
+            $view->pi_LinkToPage($this->getSingleData(self::TITLE),
+            $view->conf['pidCourseDetails'],'',
+            array($view->prefixId. '[courseId]'=>$this->getSingleData(self::UID)))
+            ,$conf['courseTitlelinkWrap.']):'');
+
+               $MA['###NUMBERLINK###']   = (($this->getSingleData(self::UID)!='')&&($this->getSingleData(self::NUMBER)!='')?$view->cObj->stdWrap(
+            $view->pi_LinkToPage($this->getSingleData(self::NUMBER),
+            $view->conf['pidCourseDetails'],'',
+            array($view->prefixId. '[courseId]'=>$this->getSingleData(self::UID)))
+            ,$conf['courseNumberlinkWrap.']):'');
+
+               //This only for calculating the costs for each single Event later.
+               $MA['###COST###']         = ($this->getSingleData(self::COST)?$this->getSingleData(self::COST):'');
+
+               if (is_numeric($MA['###COST###']) && (intval($MA['###COST###'])!=0)) {
+                       //Base price with and without tax
+                       $price = doubleval($MA['###COST###']);
+                       $MA['###BASEPRICE###'] = $view->cObj->stdWrap($view->calcPrice($price,$view->conf,0),$conf['basepriceWrap.']);
+                       $MA['###BASEPRICETAX###'] = $view->cObj->stdWrap($view->calcPrice($price,$view->conf,1),$conf['basepricetaxWrap.']);
+               } else {
+                       $MA['###BASEPRICE###'] = '0';
+                       $MA['###BASEPRICETAX###'] = '0';
+               }
+
+
+               $sImage = $conf['courseSkillImageWrap.'];
+               $sImage['if.']['isTrue'] = ($this->getSingleData(self::SKILLLEVEL)!=''?1:0);
+               $sImage['file'] = $view->skillimagepath . 'icon_tx_abcourses_skillLevel_' . $this->getSingleData(self::SKILLLEVEL) . '.gif'; //Dateipfad zusammensetzen
+
+               if($debugme) {
+                       debug($view->skillimagepath);
+                       debug($this->getSingleData(self::SKILLLEVEL));
+                       debug($sImage['file']);
+               }
+
+               $sImage = $view->cObj->IMAGE($sImage);
+               $MA['###COURSESKILLLEVELIMAGE###'] = ($this->getSingleData(self::SKILLLEVEL)!=''?$sImage:'');
+
+
+               //MA mit Type auffüllen
+               if ($this->getSingleData(self::UID)!='') {
+                       $view->fillTypeMA($MA,$conf,'','',$this->getSingleData(self::UID));
+               }
+
+               if($debugme) {debug($MA);}
+
+               $events = '';
+
+               $foo = ($debugme?debug("Events loaded: " . $this->countEvents()):'');
+               
+               //should we trigger the view of some events too?
+               if($this->countEvents() && $templateEvents) {
+                       $templateEvent = $view->cObj->getSubpart($templateEvents, '###EVENT###');
+                       
+                       $event = '';
+                       reset($this->arrEvents);
+                       while (list($id, $Event) = each($this->arrEvents)) {
+                               $event .= $Event->printme($templateEvent,$view,$conf['event.'],$this->getSingleData(self::COST));
+                       }
+                       $events = $view->cObj->substituteSubpart($templateEvents,'###EVENT###',$event);
+               }
+
+               $template = $view->cObj->substituteSubpart($template,'###EVENTS###',$events);
+
+
+               //should we trigger the view of some teaching aids too?
+               $foo = ($debugme?debug("Teaching aids loaded: " . $this->countTeachingaids()):'');
+               $teachingaids = '';
+
+               if($this->countTeachingaids() && $templateTeachingaids) {
+                       $templateTeachingaid = $view->cObj->getSubpart($templateTeachingaids, '###TEACHINGAID###');
+                       $teachingaid = '';
+                       reset($this->arrTeachingaids);
+                       while (list($id, $Teachingaid) = each($this->arrTeachingaids)) {
+                               $teachingaid .= $Teachingaid->printme($templateTeachingaid,$view);
+                       }
+                       $teachingaids = $view->cObj->substituteSubpart($templateTeachingaids,'###TEACHINGAID###',$teachingaid);
+               }
+               $template = $view->cObj->substituteSubpart($template,'###TEACHINGAIDS###',$teachingaids);
+
+               //should we trigger the view of some trainers too?
+               $foo = ($debugme?debug("Trainer loaded: " . $this->countTrainer()):'');
+               $trainers = '';
+
+               if($this->countTrainer() && $templateTrainers) {
+                       $templateTrainer = $view->cObj->getSubpart($templateTrainers, '###TRAINER###');
+                       $trainer = '';
+                       reset($this->arrTrainer);
+                       while (list($id, $Trainer) = each($this->arrTrainer)) {
+                               $trainer .= $Trainer->printme($templateTrainer,$view,$conf['trainer.']);
+                       }
+                       $trainers = $view->cObj->substituteSubpart($templateTrainers,'###TRAINER###',$trainer);
+               }
+               $template = $view->cObj->substituteSubpart($template,'###TRAINERS###',$trainers);
+
+
+               //should we trigger the view of some conditional courses as well?
+               $conditions = '';
+               $foo = ($debugme?debug("Conditions loaded: " . $this->countConditions()):'');
+               if($this->countConditions() && $templateConditions) {
+                       $templateConditionalCourse = $view->cObj->getSubpart($templateConditions, '###COURSE###');
+                       $condition = '';
+                       reset($this->arrConditions);
+                       while (list($id, $conditionalCourse) = each($this->arrConditions)) {
+                               $condition .= $conditionalCourse->printme($templateConditionalCourse,$view,$conf['conditionalCourse.']);
+                       }
+                       $conditions = $view->cObj->substituteSubpart($templateConditions,'###COURSE###',$condition);
+               }
+
+               $template = $view->cObj->substituteSubpart($template,'###CONDITIONS###',$conditions);
+
+
+               //Load the Download-Files
+               $filenames = $this->getSingleData("files");
+               $files = '';
+               $file = '';
+
+               if ($filenames && $templateFiles) {
+                       $fileTemplate = $view->cObj->getSubpart($templateFiles, '###FILE###');
+                       $filenames = explode(",",$filenames);
+                       foreach($filenames as $id => $filename) {
+                               $dlimage = $view->conf['dlimage_' . substr($filename,strlen($filename)-3)];
+                               $dlimage = ($dlimage?$dlimage:$view->conf['dlimage']);
+                               $MAFile['###DOWNLOADLINK###'] = "<a href=\"/" . $view->conf['uploaddir'] . $filename . "\" title=\"Download-Link\">" . $filename . "</a>";
+                               $MAFile['###DOWNLOADLINKIMAGE###'] = "<a href=\"/" . $view->conf['uploaddir'] . $filename . "\" title=\"Download-Link\"><img src=\"" . $dlimage . "\" border=\"0\" alt=\"Download " . $filename . "\"/></a>";
+                               $file .= $view->cObj->substituteMarkerArray($fileTemplate,$MAFile);
+                       }
+                       $files = $view->cObj->substituteSubpart($templateFiles,'###FILE###',$file);
+               }
+               $template = $view->cObj->substituteSubpart($template,'###FILES###',$files);
+
+               //render and return the view
+               return $view->cObj->substituteMarkerArrayCached($template, $MA);
+       }
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Event.php b/api/classes/class.tx_abcourses.Event.php
new file mode 100644 (file)
index 0000000..4573b31
--- /dev/null
@@ -0,0 +1,416 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009-2013 Stefan Precht (sprecht@gmail.com)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+        require_once(t3lib_extMgm::extPath('abcourses').'api/util/class.tx_abcourses.utils.php');
+        
+       /**
+        * This class is for handle events of the abcourses plugin.
+        *
+        */
+       class cEvent extends cAbcoursesBase {
+               var $fError = 0;
+               var $arrStatus = Array();
+               var $arrData = '';
+               var $arrHotels = '';
+               var $Location = '';
+               var $arrParticipants = '';
+
+               /**
+                * This function load the event data related to the given id.
+                *
+                * @param       integer         $eventId Id of the event record.
+                * @param       cAbcoursesDAL           $DAL Reference to the used data abstraction layer.
+                * @return      [type]          ...
+                */
+               function loadData($eventId='',&$DAL) {
+                       if (!$this->arrData) {
+                               $this->arrData = $DAL->loadEvent($eventId);
+                               $this->checkErrors($DAL);
+                               if ($this->arrData == 0) $this->fError = 1;
+                       }
+               }
+
+           /**
+                * This function load hotels to the internal array depending on arrangements associated with this event.
+                *
+                * @param       cLoader         : A reference to the used loader object.
+                * @return      [type]          ...
+                */
+               function load_arrHotels(&$objLoader){
+                       $debugme = false;
+
+                       $DAL =& $objLoader->get_DAL();
+
+                       if (!$this->arrData) {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'Can not load hotels for an event without an event uid';
+                       $this->checkErrors($this);
+                       return;
+                   }
+
+                   $arrArrangementIds = 0;
+               $arrArrangementIds = $DAL->listArrangementsForEvent($this->getSingleData("uid"));
+                       $this->checkErrors($DAL);
+
+                       $foo = ($debugme?debug("The following arrangements matches the criteria"):'');
+                       $foo = ($debugme?debug($arrArrangementIds):'');
+
+                       if (!$this->fError && $arrArrangementIds) {
+                           reset($arrArrangementIds);
+                while (list($key, $id) = each($arrArrangementIds)) {
+                    $Hotel =& $objLoader->get_Hotel('',$id);
+                    if ($Hotel) {
+                        $hotelId = $Hotel->getSingleData('uid');
+                       $this->arrHotels[$hotelId] =& $Hotel;
+                    }
+                }
+                           reset($this->arrHotels);
+                       }
+
+               }
+
+               /**
+                * [Describe function...]
+                *
+                * @return      [type]          ...
+                */
+               function &get_arrHotels(){
+                               return $this->arrHotels;
+               }
+
+               /**
+                * Returns the number of initialised hotels.
+                *
+                * @return      integer
+                */
+               function countHotels(){
+                       if (is_array($this->arrHotels)) {
+                               return count($this->arrHotels);
+                       } else {
+                               return 0;
+                       }
+               }
+
+               /**
+                * Initializes the internal array with associated participants.
+                *
+                * @param       cLoader         : A reference to the used loader object.
+                * @return      [type]          ...
+                */
+               function load_arrParticipants(&$objLoader){
+                       $debugme = false;
+
+                       $DAL =& $objLoader->get_DAL();
+
+                       if (!$this->arrData) {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'Can not load participants for an event without an event uid';
+                       $this->checkErrors($this);
+                       return;
+                   }
+
+                   $arrParticipantIds = 0;
+               $arrParticipantIds = $DAL->listParticipantsForEvent($this->getSingleData("uid"));
+                       
+                       $this->checkErrors($DAL);
+
+                       $foo = ($debugme?debug("The following participants matches the criteria"):'');
+                       $foo = ($debugme?debug($arrParticipantIds):'');
+
+                       if (!$this->fError && $arrParticipantIds) {
+                           reset($arrParticipantIds);
+                while (list($key, $id) = each($arrParticipantIds)) {
+                    $Participant =& $objLoader->get_Participant($id);
+                    if ($Participant) {
+                        $participantId = $Participant->getSingleData('uid');
+                       $this->arrParticipants[$participantId] =& $Participant;
+                    }
+                }
+                           reset($this->arrParticipants);
+                       }
+               }
+
+               /**
+                * Returns the number of initialized participants.
+                *
+                * @return      integer
+                */
+               function countParticipants(){
+                       if (is_array($this->arrParticipants)) {
+                               return count($this->arrParticipants);
+                       } else {
+                               return 0;
+                       }
+               }
+
+               /**
+                * [Describe function...]
+                *
+                * @return      [type]          ...
+                */
+               function &get_arrParticipants(){
+                               return $this->arrParticipants;
+               }
+
+               /**
+                * Returns if you can subscribe an event or not, regarding on the contingent. You need to call load_arrParticipants before.
+                *
+                * @param       class           $view: An referenced instance of the pi1 class who wants to return the view
+                * @return      integer:        Returns 1 if you can subscribe to this event.
+                */
+               function subscribeable(&$view) {
+                       if (!$view->takeNoticeOfContingent()) {
+                               return 1;
+                       }
+                       $contingent = intval($this->getSingleData('contingent'));
+                       $subscriptions = 0;
+                       if (intval($view->conf['trackSubscriptionsAsRecords'])){
+                               $subscriptions = $this->countParticipants();
+                       } else {
+                               $subscriptions = intval($this->getSingleData('subscriptions'));
+                       }
+            return ($subscriptions>=$contingent?0:1);
+               }
+
+               /**
+                * Initialise the internal Location object.
+                *
+                * @param       cLoader         $Loader : A Reference to the abcourses proxy class
+                */
+               function loadLocation(&$Loader){
+                       if (!$this->Location) {
+                               $this->Location = $Loader->get_Location('',$this->getSingleData('uid'));
+                       }
+               }
+
+               /**
+                * Returns a reference to the internal Location object.
+                *
+                * @param       cLoader         $Loader : A Reference to the abcourses proxy class
+                * @return cLocation
+                */
+               function &getLocation() {
+                       return $this->Location;
+               }
+
+               /**
+                * This function render the view for this event, depending on the given template.
+                *
+                * @param       string          $template : The remplate for rendering the view.
+                * @param       string          &$view : A reference to the pi1 class who wants to render this view.
+                * @param       string          $conf   : A snippet of TS configuration which should be used for this event.
+                * @param       double          $costs: The base price for this event.
+                * @return      string          The rendered Template
+                */
+               function printme($template, &$view, $conf, $costs = 0) {
+                       $debugme = false;
+
+                       //get the objectlayer
+                       $objLoader =& $GLOBALS['T3_VAR']['abcourses']['cLoader'];
+
+                       $templateLocations = $view->cObj->getSubpart($template, '###LOCATIONS###');
+                       $templateParticipants = $view->cObj->getSubpart($template, '###PARTICIPANTS###');
+
+                       $location = '';
+
+               $MA = $this->getEventMA($view,$conf,$costs,$objLoader);
+               
+               //---------------------------------------------------------
+               //should we trigger the view of an associated location too?
+               //---------------------------------------------------------
+               if ($templateLocations) {
+                       if (!$this->Location) {
+                               $this->loadLocation($objLoader);
+                       }
+                       if ($this->Location) {
+                               $templateLocation = $view->cObj->getSubpart($templateLocations, '###LOCATION###');
+                               $location = $this->Location->printme($templateLocation,$view,$conf['location.']);
+                       $location = $view->cObj->substituteSubpart($templateLocations,'###LOCATION###',$location);
+                       }
+               }
+
+               $template = $view->cObj->substituteSubpart($template,'###LOCATIONS###',$location);
+
+               //-------------------------------------------------------------------
+               //should we trigger the rendering of associated participants as well?
+               //-------------------------------------------------------------------
+                       if ($templateParticipants) {
+                               if (!is_array($this->arrParticipants)){                                 
+                                       $this->load_arrParticipants($objLoader);
+                               }
+                               if (is_array($this->arrParticipants)){
+                                       reset($this->arrParticipants);
+                                       
+                                       $singleParticipant = $view->cObj->getSubpart($templateParticipants, '###PARTICIPANT###');
+                                       
+                                       $tmp = "";
+                                       
+                                       while (list($id, $Participant) = each($this->arrParticipants)) {
+                                               $tmp .= $Participant->printme($singleParticipant,$view,$conf['participant.']);
+                                       }
+                                       $templateParticipants = $view->cObj->substituteSubpart($templateParticipants,'###PARTICIPANT###',$tmp);
+                               }
+                       }
+                       $template = $view->cObj->substituteSubpart($template,'###PARTICIPANTS###',$templateParticipants);
+
+
+               if($debugme){debug($MA);}
+
+               //render and return the view
+               $renderedTemplate = $view->cObj->substituteMarkerArrayCached($template, $MA);
+
+               if($debugme){debug($renderedTemplate);}
+               return $renderedTemplate;
+               }
+
+               public function getEventMA(&$view, $conf, $costs = 0, &$objLoader){
+                       $MA = null;
+
+                       $MA['###EVENTNUMBER###'] = ($this->getSingleData('event')?$view->cObj->stdWrap($this->getSingleData('event'),$conf['eventNumberWrap.']):'');
+               $MA['###EVENTTEASER###'] = ($this->getSingleData('teaser')?$view->cObj->stdWrap($this->getSingleData('teaser'),$conf['eventTeaserWrap.']):'');
+               $MA['###CONTINGENT###'] = ($this->getSingleData('contingent')?$view->cObj->stdWrap($this->getSingleData('contingent'),$conf['eventContingentWrap.']):'');
+
+                       if ($view->takeNoticeOfContingent()) {
+                               $contingent = ($this->getSingleData('contingent')?intval($this->getSingleData('contingent')):0);
+                               $left = 0;
+                               if (intval($view->conf['trackSubscriptionsAsRecords'])) {
+                                       $this->load_arrParticipants($objLoader);
+                                       $subscriptions = $this->countParticipants();
+                               } else {
+                           $subscriptions = ($this->getSingleData('subscriptions')?intval($this->getSingleData('subscriptions')):0);
+                               }
+
+                   $left = $contingent - $subscriptions;
+                               $left = ($left<0?0:$left); //sollte eigentlich nicht auftreten...
+                               $MA['###CONTINGENTLEFT###'] = $view->cObj->stdWrap($left,$conf['eventContingentLeftWrap.']);
+                       } else {
+                               $MA['###CONTINGENTLEFT###'] = $view->cObj->stdWrap('0',$conf['useContingentInactiveWrap.']);
+                       }
+
+
+               if ($days) {
+                       $MA['###DAYS###'] = $view->cObj->stdWrap($days, $conf['eventDaysWrap.']);
+               }
+
+               $eventDateStart = null;
+                       $eventDateEnd = null;
+                       //Abhängig von globalen Einstellungen zur Datumsanzeige
+                       if ($this->getSingleData('coursestart')) {
+                               if (!$this->getSingleData('courseend') || ($this->getSingleData('coursestart') == $this->getSingleData('courseend'))) {
+                                       $eventDateStart = AbcoursesUtil::getFormattedDate($view->conf['ddmmyy'],$this->getSingleData('coursestart'));
+                               } else {
+                                       $eventDateStart = AbcoursesUtil::getFormattedDate($view->conf['ddmmyy'],$this->getSingleData('coursestart'));
+                                       $eventDateEnd   = AbcoursesUtil::getFormattedDate($view->conf['ddmmyy'],$this->getSingleData('courseend'));
+                               }
+                       }
+                       $eventDate = null;
+                   $eventDate  = ($eventDateStart ? $eventDateStart : "");
+                   $eventDate .= ($eventDateStart && $eventDateEnd ? " - " . $eventDateEnd : "");
+
+                       $eventStartTimeStart = null;
+                       $eventStartTimeEnd   = null;
+                       $eventStartTime = null;
+
+                       //Relates to global settings of the formatted date output
+                       if ($this->getSingleData('firstdaytimestart')) {
+                               if (!$this->getSingleData('firstdaytimestart') || ($this->getSingleData('firstdaytimestart') == $this->getSingleData('firstdaytimeend'))) {
+                                       $eventStartTimeStart = AbcoursesUtil::getFormattedTime($view->conf['hhmmss'],$this->getSingleData('firstdaytimestart'));
+                               } else {
+                                       $eventStartTimeStart = AbcoursesUtil::getFormattedTime($view->conf['hhmmss'],$this->getSingleData('firstdaytimestart'));
+                                       $eventStartTimeEnd   = AbcoursesUtil::getFormattedTime($view->conf['hhmmss'],$this->getSingleData('firstdaytimeend'));
+                               }
+                       }
+                       $eventStartTime  = ($eventStartTimeStart ? $eventStartTimeStart : "");
+                       $eventStartTime .= ($eventStartTimeStart && $eventStartTimeEnd? " - " . $eventStartTimeEnd : "");
+
+                       $eventEndTimeStart = null;
+                       $eventEndTimeEnd   = null;
+                       $eventEndTime = null;
+
+                       //Abhängig von globalen Einstellungen zur Datumsanzeige
+                       if ($this->getSingleData('lastdaytimestart')) {
+                               if (!$this->getSingleData('lastdaytimeend') || ($this->getSingleData('lastdaytimestart') == $this->getSingleData('lastdaytimeend'))) {
+                                       $eventEndTimeStart = AbcoursesUtil::getFormattedTime($view->conf['hhmmss'],$this->getSingleData('lastdaytimestart'));
+                               } else {
+                                       $eventEndTimeStart = AbcoursesUtil::getFormattedTime($view->conf['hhmmss'],$this->getSingleData('lastdaytimestart'));
+                                       $eventEndTimeEnd   = AbcoursesUtil::getFormattedTime($view->conf['hhmmss'],$this->getSingleData('lastdaytimeend'));
+                               }
+                       }
+                       $eventEndTime  = ($eventEndTimeStart ? $eventEndTimeStart : "");
+                       $eventEndTime .= ($eventEndTimeStart && $eventEndTimeEnd? " - " . $eventEndTimeEnd : "");
+
+
+                       $MA['###DATE###'] = $view->cObj->stdWrap($eventDate,$conf['eventDateWrap.']);
+                       $MA['###DATESTART###'] = $view->cObj->stdWrap($eventDateStart,$conf['eventDateStartWrap.']);
+                       $MA['###DATEEND###'] = $view->cObj->stdWrap($eventDateEnd,$conf['eventDateEndWrap.']);
+
+                   $MA['###TIMEDATESTART###'] = $view->cObj->stdWrap($eventStartTime,$conf['eventTimeDateStartWrap.']);
+                   $MA['###TIMEDATEEND###'] = $view->cObj->stdWrap($eventEndTime,$conf['eventTimeDateEndWrap.']);
+
+               if (is_numeric($costs) && ($costs!=0)) {
+                   //Preis abhängig von Netto, Brutto und Ermäßigung
+                   $price = doubleval($costs) + doubleval($this->getSingleData('discountvalue'));
+                   $MA['###PRICE###'] = $view->cObj->stdWrap($view->calcPrice($price,$view->conf,0),$conf['eventPriceWrap.']);
+                   $MA['###PRICETAX###'] = $view->cObj->stdWrap($view->calcPrice($price,$view->conf,1),$conf['eventPriceTaxWrap.']);
+               } else {
+                   $MA['###PRICE###'] = $view->cObj->stdWrap("0",$conf['eventPriceWrap.']);
+                   $MA['###PRICETAX###'] = $view->cObj->stdWrap("0",$conf['eventPriceTaxWrap.']);
+               }
+
+               //Subscribelink abhängig von REGSTART und REGEND
+               $MA['###REGSTART###'] = ($this->getSingleData('regstart')&&$this->getSingleData('regstart')?$view->cObj->stdWrap(AbcoursesUtil::getFormattedDate($view->conf['ddmmyy'],$this->getSingleData('regstart')),$conf['eventRegStartWrap.']):'');
+               $MA['###REGEND###'] = ($this->getSingleData('regend')&&$this->getSingleData('regend')?$view->cObj->stdWrap(AbcoursesUtil::getFormattedDate($view->conf['ddmmyy'],$this->getSingleData('regend')),$conf['eventRegEndWrap.']):'');
+
+               $timestamp = time();
+               $today = mktime(0, 0, 0, date('m', $timestamp),date('d', $timestamp),date('Y', $timestamp));
+               $tStart = ($this->getSingleData('regstart') && $this->getSingleData('regstart')?$this->getSingleData('regstart'):$today);
+               $tEnd = ($this->getSingleData('regend')&&$this->getSingleData('regend')?$this->getSingleData('regend'):$today);
+               if ($tStart<=$today && $tEnd>=$today && $this->subscribeable($view)) {
+                   $sSubscribelink = $view->pi_linkToPage($view->pi_getLL('subscribelabel'),
+                                               $view->conf['pidSubscribe'], '',
+                                               array($view->prefixId.'[eventId]'=>$this->getSingleData('uid'))
+                                            );
+                  $dateSubscribeLink = $view->pi_linkToPage($MA['###DATE###'],
+                                               $view->conf['pidSubscribe'], '',
+                                               array($view->prefixId.'[eventId]'=>$this->getSingleData('uid'))
+                                            );
+               } else {
+                   $sSubscribelink = $view->pi_getLL('subscribelabel_unavailable');
+                   $dateSubscribeLink = $MA['###DATE###'];
+               }
+
+               $MA['###SUBSCRIBELINK###'] = $view->cObj->stdWrap($sSubscribelink,$conf['eventSubscribeWrap.']);
+               $MA['###DATESUBSCRIBELINK###'] = $view->cObj->stdWrap($dateSubscribeLink,$conf['dateEventSubscribeWrap.']);
+
+               //Lastminute Termin?
+               $MA['###LASTMINUTE###'] = '';
+               if ($this->getSingleData('lastminute')&&$this->getSingleData('lastminute')) {
+                   $MA['###LASTMINUTE###'] = $view->conf['lastminuteclass'];
+               }
+
+               return $MA;
+               }
+
+       }
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Hotel.php b/api/classes/class.tx_abcourses.Hotel.php
new file mode 100644 (file)
index 0000000..a7820aa
--- /dev/null
@@ -0,0 +1,190 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Class to work with hotel records within the abcourses extension.
+ *
+ */
+class cHotel extends cAbcoursesBase {
+    var $fError = 0;
+    var $arrStatus = Array();
+    var $arrArrangement = '';
+
+    /**
+     * This loads the data of a hotel record. Corresponding to a hotelId or an arrangement id. Passed hotel id takes precedence.
+     *
+     * @param  integer         $hotelId
+     * @param  integer         $arrangementId
+     * @param  cAbcoursesDAL           $DAL Reference to the used data abstraction layer
+     * @return [type]          ...
+     */
+    function loadData($hotelId='',$arrangementId='',&$DAL) {
+        if (!$this->arrData) {
+            if($hotelId!='') {
+                $this->arrData = $DAL->loadHotel($hotelId);
+            }elseif($arrangementId!=''){
+                $this->arrData = $DAL->loadHotel('',$arrangementId);
+            }
+            $this->checkErrors($DAL);
+            if ($this->arrData == 0) $this->fError = 1;
+        }
+    }
+
+    /**
+     * This function initialise one single arrangement and add it to the internal array for later usage.
+     *
+     * @param  integer         $arrangementId : The id of the arrangemt you want to add.
+     * @param  [type]          $objLoader: ...
+     * @return [type]          ...
+     */
+    function addArrangement($arrangementId,&$objLoader) {
+        if (!$this->arrArrangement[$arrangementId]) {
+            $this->arrArrangement[$arrangementId] =& $objLoader->get_Arrangement($arrangementId);
+        }
+        return ($this->arrArrangement[$arrangementId]?1:0);
+    }
+
+    /**
+     * Load the internal arrangement array.
+     *
+     * @param  cLoader         $objLoader Reference to the proxy class
+     * @return void
+     */
+    function load_arrArrangement(&$objLoader){
+        $debugme = false;
+
+        $DAL =& $objLoader->get_DAL();
+
+        if (!$this->arrData) {
+            $this->fError = 1;
+            $this->arrStatus[] = 'Cannot load arrangments for a hotel without hotel data in cHotel->load_arrArrangement';
+            $this->checkErrors($this);
+            return;
+        }
+
+        if (!$this->arrArrangement) {
+            //list all Courses of this Category
+            $arrArrangementIds = $DAL->listArrangements($this->arrData['uid']);
+            $this->checkErrors($DAL);
+        }
+
+        $foo = ($debugme?debug($arrArrangementIds):'');
+        $foo = ($debugme?debug("Error in load_arrArrangement " . $this->fError):'');
+
+        if (!$this->fError && $arrArrangementIds) {
+            reset($arrArrangementIds);
+            while (list($key, $id) = each($arrArrangementIds)) {
+                $this->arrArrangement[$id] =& $objLoader->get_Arrangement($id);
+                $foo = ($debugme?debug($this->arrArrangement[$id]):'');
+                $Arrangement =& $this->arrArrangement[$id];
+            }
+            reset($this->arrArrangement);
+        }
+    }
+
+    /**
+     * [Describe function...]
+     *
+     * @param  [type]          $value: ...
+     * @return [type]          ...
+     */
+    function set_arrArrangement($value){
+        $this->arrArrangement = $value;
+    }
+
+    /**
+     * [Describe function...]
+     *
+     * @return [type]          ...
+     */
+    function &get_arrArrangement(){
+        return $this->arrArrangement;
+    }
+
+    /**
+     * Returns the number of initalised arrangements.
+     *
+     * @return integer
+     */
+    function countArrangements(){
+        if (is_array($this->arrArrangement)) {
+            return count($this->arrArrangement);
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * This function render the view for this hotel, depending on the given template. Contained arrangements are rendered too.
+     *
+     * @param  string          $template : The remplate for rendering the view.
+     * @param  string          &$view : A reference to the pi1 class who wants to render this hotel.
+     * @param  string          $conf   : A snippet of TS configuration which should be used for this hotel.
+     * @return string          ...
+     */
+    function printme($template, &$view, $conf) {
+        $debugme = false;
+        $MA = Array();
+
+        $templateArrangements = $view->cObj->getSubpart($template, '###ARRANGEMENTS###');
+
+        $MA['###NAME###']    = $this->getSingleData('name');
+        $MA['###SUBTITLE###']= $this->getSingleData('subtitle');
+
+        $MA['###LINK###']    = ($this->getSingleData('link')?$view->cObj->getTypoLink('',$this->getSingleData('link')):'');
+
+        $image = '';
+        $image = $conf['image.'];
+        $image['if.']['isTrue'] = $this->getSingleData('image');
+        $image['file'] = "uploads/tx_abcourses/" . $this->getSingleData('image');
+        $image = $view->cObj->IMAGE($image);
+        $MA['###IMAGE###']   = ($this->getSingleData("image")!=''?$image:'');
+
+        $image = '';
+        $image = $conf['ratingImage.'];
+        $image['if.']['isTrue'] = ($this->getSingleData("rating")!=''?1:0);
+        $image['file'] = $view->ratingimagepath . 'star_' . $this->getSingleData("rating") . '.gif';
+        $image = $view->cObj->IMAGE($image);
+        $MA['###RATING###'] = ($this->getSingleData("rating")!=''?$image:'');
+
+        $arrangements = '';
+        $foo = ($debugme?debug($this->countArrangements()):'');
+
+        //should we trigger the view of some arrangements too?
+        if($this->countArrangements() && $templateArrangements) {
+            $templateArrangement = $view->cObj->getSubpart($templateArrangements, '###ARRANGEMENT###');
+            $arrangement = '';
+            reset($this->arrArrangement);
+            while (list($id, $Arrangement) = each($this->arrArrangement)) {
+                $arrangement .= $Arrangement->printme($templateArrangement,$view,$conf['arrangement.']);
+            }
+            $arrangements = $view->cObj->substituteSubpart($templateArrangements,'###ARRANGEMENT###',$arrangement);
+        }
+        $template = $view->cObj->substituteSubpart($template,'###ARRANGEMENTS###',$arrangements);
+
+        //render and return the view
+        return $view->cObj->substituteMarkerArrayCached($template, $MA);
+    }
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Loader.php b/api/classes/class.tx_abcourses.Loader.php
new file mode 100644 (file)
index 0000000..87ad69a
--- /dev/null
@@ -0,0 +1,596 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2006 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * This is the persistence proxy class for abcourses... Use this class to get instances of different classes.
+ *
+ */
+class cLoader {
+    var $conf = '';
+    var $pages = '';
+    var $recursive = '';
+    var $cObj = '';
+    var $DAL = '';
+
+    var $objCategorys = '';    //An instance of CCategorys
+    var $objLocations = ''; //An instance of CLocations
+    var $arrCourses = '';      //container for currently initialised courses
+    var $arrEvents = '';//container for currently initialised events
+    var $arrTrainer = '';      ////container for currently initialised trainer
+    var $arrLocation = '';     ////container for currently initialised location records
+    var $arrTeachingaids = '';//container for currently initialised teaching aids
+    var $arrHotels = '';//container for currently initialised hotels
+    var $arrArrangements = '';//container for currently initialised arrangements
+    var $arrCategories = '';//container for currently initialised categories
+    var $arrParticipants = ''; //container for currently initialized participants
+
+    /**
+     * To initialise the proxy class. Normally this is already done by the pi1 class.
+     *
+     * @param  array           $conf   TS configuration
+     * @param  string          $pages  list of page id's to look up records from
+     * @param  integer         $recursive      recursive level
+     * @param  tslib_cobj              $cObj   Instance of an tslib_cobj instance. Usually the instance as used by the pi1 class.
+     * @return void
+     */
+    function init($conf,$pages,$recursive,&$cObj){
+        $this->set_conf($conf);
+        $this->set_pages($pages);
+        $this->set_recursive($recursive);
+        $this->set_cObj($cObj);
+        $this->set_DAL(t3lib_div::makeInstance('cAbcoursesDAL')); // Initialise Data Access Layer
+        $this->DAL->init($this->conf,$this->pages,$this->recursive,$this->cObj);
+    }
+
+    /**
+     * This function initialise the internal attribute $objLocations
+     *
+     * @return integer         Returns 1 for success and 0 if an error occured
+     */
+    function load_objLocations(){
+        if (!$this->objLocations) {
+            $objLocations = new cLocations();
+            $objLocations->init($this);
+            $objLocations->loadData($this);
+            if (!$objLocations->fError) {
+                //nur übernehmen, wenn fehlerfrei
+                $this->set_objLocations($objLocations);
+            } else {
+                return 0;
+            }
+        }
+        return 1;
+    }
+    /**
+     * This function initialise the internal attribute $objCategorys
+     *
+     * @return integer         Returns 1 for success and 0 if an error occured
+     */
+    function load_objCategorys(){
+        //in cLoader hinterlegte Instanz von cCategorys initialisieren
+        if (!$this->objCategorys) {
+            $objCategorys = t3lib_div::makeInstance('cCategorys');
+            $objCategorys->init($this->DAL);
+            $objCategorys->loadData($this->DAL);
+            if (!$objCategorys->fError) {
+                //nur übernehmen, wenn fehlerfrei
+                $this->set_objCategorys($objCategorys);
+            } else {
+                return 0;
+            }
+        }
+        return 1;
+    }
+
+    /**
+     * Returns an array with uid's of similar courses.
+     *
+     * @param  string          $byTitle        Similar courses are looked up with an title.
+     * @param  unknown_type            $expectId       The integer passed for this will not be included in the returned integer list.
+     * @return array           Array with uid's of similar courses.
+     */
+    function listSimilarCourses($byTitle,$expectId='') {
+        $retArr = $this->DAL->listCourses('',$byTitle,$expectId);
+
+        if (is_array($retArr) && !$this->DAL->fError) {
+            return $retArr;
+        }
+    }
+
+    /**
+     * Returns an array with uid's for events marked as last minute.
+     *
+     * @param  integer         $maxNEvents Set this to the amount of events you want to get. If this results in false, all last minute events should be returned.
+     * @return array           Array with uid's of last minute events.
+     */
+    function listLastMinuteEvents($eventsAgo=0,$maxNEvents=0) {
+        $ret = $this->DAL->listEvents('',$eventsAgo,1,$maxNEvents);
+        return $ret;
+    }
+
+    /**
+     * Initialize the internal course array. You can use this, if you want to load some courses without an instance of cCategorys.
+     *
+     * @param  integer         $courseId: The id of a course you want add to the internal array.
+     * @param  integer         $eventId: The id of an event you want to use to load the corresponding course into the internal array.
+     * @return [type]          ...
+     */
+    function load_arrCourses($courseId='',$eventId='') {
+        if ($courseId!='') {
+            $foo = $this->get_Course($courseId,'');
+        } elseif ($eventId!='') {
+            $foo = $this->get_Course('',$eventId);
+        } else {
+            return 0;
+        }
+        return 1;
+    }
+
+    /**
+     * Set function for an internal value
+     *
+     * @param  unknown_type            $value
+     * @return [type]          ...
+     */
+    function set_conf($value){
+        $this->conf = $value;
+    }
+
+    /**
+     * Set function for an internal value
+     *
+     * @param  unknown_type            $value
+     * @return [type]          ...
+     */
+    function set_pages($value){
+        $this->pages = $value;
+    }
+
+    /**
+     * Set function for an internal value
+     *
+     * @param  unknown_type            $value
+     * @return [type]          ...
+     */
+    function set_recursive($value){
+        $this->recursive = $value;
+    }
+
+    /**
+     * Set function for an internal value
+     *
+     * @param  unknown_type            $value
+     * @return [type]          ...
+     */
+    function set_cObj($value){
+        $this->cObj = $value;
+    }
+
+    /**
+     * Set function for an internal value
+     *
+     * @param  unknown_type            $value
+     * @return [type]          ...
+     */
+    function set_DAL(&$value){
+        $this->DAL = $value;
+    }
+
+    /**
+     * This returns an reference of the used data abstraction layer class
+     *
+     * @return cAbcoursesDAL
+     */
+    function &get_DAL(){
+        return $this->DAL;
+    }
+
+    /**
+     * Set function for an internal value
+     *
+     * @param  unknown_type            $value
+     * @return [type]          ...
+     */
+    function set_objCategorys($value) {
+        $this->objCategorys = $value;
+        $GLOBALS['T3_VAR']['abcourses']['cCategorys'] =& $this->objCategorys;
+        return;
+    }
+
+    /**
+     * Returns an reference of the internal cCategorys instance. If not available, the instance will be initialised.
+     *
+     * @return cCategorys              Returns 0 if an error occured
+     */
+    function &get_objCategorys(){
+        if (!$this->objCategorys) {
+            $this->load_objCategorys();
+        }
+        if ($this->objCategorys && $GLOBALS['T3_VAR']['abcourses']['cCategorys']) {
+            return $GLOBALS['T3_VAR']['abcourses']['cCategorys'];
+        }
+        return 0;
+    }
+
+    /**
+     * Set function for an internal value
+     *
+     * @param  unknown_type            $value
+     * @return [type]          ...
+     */
+    function set_objLocations($value) {
+        $this->objLocations = $value;
+    }
+
+    /**
+     * Returns an reference of the internal cLocations instance. If not available, the instance will be initialised.
+     *
+     * @return cLocations
+     */
+    function &get_objLocations() {
+        if (!$this->objLocations) {
+            $this->load_objLocations();
+        }
+        if ($this->objLocations) {
+            return $this->objLocations;
+        }
+        return 0;
+    }
+
+    /**
+     * Set function for an internal value
+     *
+     * @param  unknown_type            $value
+     * @return [type]          ...
+     */
+    function set_arrCourses($value){
+        $this->arrCourses = $value;
+    }
+
+    /**
+     * This returns a reference to a course instance, corresponding to the passed uid or eventId. If an eventId is passed, this will lookup the corresponding course an add the event to the internal event array of the returned course instance.
+     *
+     * @param  integer         $uid    Id of the course you want to load. If an eventId is passed also, this value takes precedence.
+     * @param  integer         $eventId        Id of a corresponding event.
+     * @return cCourse
+     */
+    function &get_Course($uid='',$eventId=''){
+        $debugme = false;
+        $objCourse = '';
+        if ($uid!='') {
+            $foo = ($debugme?debug("Get Course with uid " . $uid):'');
+            if (!$this->arrCourses[$uid]) {
+                $objCourse = new cCourse;
+                $objCourse->loadData($uid,'',$this->DAL);
+            }
+        } elseif($eventId!='') {
+            $foo = ($debugme?debug("Get Course with eventId " . $eventId):'');
+            $objCourse = new cCourse;
+            $objCourse->loadData('',$eventId,$this->DAL);
+            if (!$objCourse->fError) {
+                $uid = $objCourse->getSingleData('uid');
+                if ($this->arrCourses[$uid]) {
+                    $foo = ($debugme?debug("Course with uid " . $uid . " already initialised"):'');
+                    $objCourse = '';
+                    $objCourse =& $this->get_Course($uid);
+                }
+                $objCourse->load_arrEvents($this,0,Array($eventId => "1"));
+            }
+        }
+        if ($objCourse!=''){
+            if (!$objCourse->fError) {
+                $GLOBALS['T3_VAR']['abcourses']['cCourse'][$uid] =& $objCourse;
+                $this->arrCourses[$uid] =& $GLOBALS['T3_VAR']['abcourses']['cCourse'][$uid];
+            }
+        }
+
+        if ($this->arrCourses[$uid] && !$this->DAL->fError) {
+            return $this->arrCourses[$uid];
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Returns an instance of cEvent, corresponding to the passed $uid.
+     *
+     * @param  integer         $uid    Uid of the event you want to return...
+     * @return cEvent
+     */
+    function &get_Event($uid){
+        $debugme = false;
+        $foo = ($debugme?debug("Get Event " . $uid):'');
+        if (!$this->arrEvents[$uid]) {
+            $objEvent = t3lib_div::makeInstance('cEvent');
+            $objEvent->loadData($uid,$this->DAL);
+            $foo = ($debugme?debug($objEvent):'');
+            if (!$objEvent->fError) {
+               //TODO Fehlt hier vielleicht etwas wie: $objEvent->loadLocation($this); ??
+                $GLOBALS['T3_VAR']['abcourses']['cEvent'][$uid] =& $objEvent;
+                $this->arrEvents[$uid] =& $GLOBALS['T3_VAR']['abcourses']['cEvent'][$uid];
+            }
+        }
+        $foo = ($debugme?debug($this->DAL):'');
+
+        if ($this->arrEvents[$uid] && !$this->DAL->fError) {
+            return $this->arrEvents[$uid];
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Returns an instance of cCategory, corresponding to the passed $uid.
+     *
+     * @param  integer         $uid    Uid of the category you want to return...
+     * @return cCategory
+     */
+    function &get_Category($uid){
+        $debugme = false;
+        $foo = ($debugme?debug("Get category " . $uid):'');
+        if (!$this->arrCategories[$uid]) {
+            $Category = t3lib_div::makeInstance('cCategory');
+            $Category->loadData($uid,'',$this->DAL);
+            if (!$Category->fError) {
+                $GLOBALS['T3_VAR']['abcourses']['cCategory'][$uid] =& $Category;
+                $this->arrCategories[$uid] =& $GLOBALS['T3_VAR']['abcourses']['cCategory'][$uid];
+            }
+        }
+
+        if ($this->arrCategories[$uid] && !$this->DAL->fError) {
+            return $this->arrCategories[$uid];
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Returns an instance of cTrainer, corresponding to the passed $uid or $eventId.
+     *
+     * @param  integer         $trainerId Id of the trainer you want to get.
+     * @param  integer         $eventId Id of the event you want to get the corresponding trainer for.
+     * @return cTrainer
+     */
+    function &get_Trainer($trainerId='',$eventId=''){
+        $debugme = false;
+        $foo = ($debugme?debug("Get Trainer " . $trainerId):'');
+        $objTrainer = '';
+
+        if ($trainerId != '') {
+            if (!$this->arrTrainer[$trainerId]) {
+                $objTrainer = new cTrainer();
+                $objTrainer->loadData($trainerId,'',$this->DAL);
+            }
+        } elseif($eventId!='') {
+            $objTrainer = new cTrainer();
+            $objTrainer->loadData('',$eventId,$this->DAL);
+            if (!$objTrainer->fError) {
+                $trainerId = $objTrainer->getSingleData('uid');
+            }
+        }
+
+        if ($objTrainer!='') {
+            if (!$objTrainer->fError) {
+                $GLOBALS['T3_VAR']['abcourses']['cTrainer'][$trainerId] =& $objTrainer;
+                $this->arrTrainer[$trainerId] =& $GLOBALS['T3_VAR']['abcourses']['cTrainer'][$trainerId];
+            }
+        }
+
+        if ($this->arrTrainer[$trainerId] && !$this->DAL->fError) {
+            return $this->arrTrainer[$trainerId];
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Returns an instance of cParticipant, corresponding to the passed $uid.
+     *
+     * @param  integer         $participantId Id of the participant you want to receive.
+     * @return cParticipant
+     */
+    function &get_Participant($participantId=''){
+        $debugme = false;
+        $foo = ($debugme?debug("Get Participant " . $participantId):'');
+        $objParticipant = '';
+
+        if ($participantId != '') {
+            if (!$this->arrParticipants[$participantId]) {
+                $objParticipant = new cParticipant();
+                $objParticipant->loadData($participantId, $this->DAL);
+            }
+        }
+
+        if ($objParticipant!='') {
+            if (!$objParticipant->fError) {
+                $GLOBALS['T3_VAR']['abcourses']['cParticipant'][$participantId] =& $objParticipant;
+                $this->arrParticipants[$participantId] =& $GLOBALS['T3_VAR']['abcourses']['cParticipant'][$participantId];
+            }
+        }
+
+        if ($this->arrParticipants[$participantId] && !$this->DAL->fError) {
+            return $this->arrParticipants[$participantId];
+        } else {
+            return 0;
+        }
+    }
+
+    function &get_ParticipantByUniqueField($field, $value) {
+               if ($field!=null && $value!=null && $value!="") {
+                       $id = $this->DAL->get_ParticipantIdByUniqueField($field,$value);
+                       if ($id!=null) {
+                               return $this->get_Participant($id);
+                       }
+               }
+       return null;
+    }
+
+    /**
+     * Returns an instance of cLocation, corresponding to the passed $uid or $eventId.
+     *
+     * @param  integer         $locationId Id of the location you want to get.
+     * @param  integer         $eventId Id of the event you want to get the corresponding location for.
+     * @return cLocation
+     */
+    function &get_Location($locationId='',$eventId=''){
+        $debugme = false;
+        $foo = ($debugme?debug("Get Location " . $locationId):'');
+        $Location = '';
+
+        if ($locationId != '') {
+            if (!$this->arrLocation[$locationId]) {
+                $Location = new cLocation;
+                $Location->loadData($locationId,'',$this->DAL);
+            }
+        } elseif($eventId!='') {
+            $Location = new cLocation;
+            $Location->loadData('',$eventId,$this->DAL);
+            if (!$Location->fError) {
+                $locationId = $Location->getSingleData('uid');
+            }
+        }
+
+        if ($Location!='') {
+            if (!$Location->fError) {
+                $GLOBALS['T3_VAR']['abcourses']['cLocation'][$locationId] =& $Location;
+                $this->arrLocation[$locationId] =& $GLOBALS['T3_VAR']['abcourses']['cLocation'][$locationId];
+            }
+        }
+
+        if ($this->arrLocation[$locationId] && !$this->DAL->fError) {
+            return $this->arrLocation[$locationId];
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Returns an instance of cTeachingaid, corresponding to the passed $uid.
+     *
+     * @param  integer         $uid    The uid of the record you want to get the object for.
+     * @return cTeachingaid
+     */
+    function &get_Teachingaid($uid){
+        $debugme = false;
+        $foo = ($debugme?debug("Get teaching aid " . $uid):'');
+        if (!$this->arrTeachingaids[$uid]) {
+            $objTeachingaid = t3lib_div::makeInstance('cTeachingaid');
+            $objTeachingaid->loadData($uid,$this->DAL);
+            if (!$objTeachingaid->fError) {
+                $GLOBALS['T3_VAR']['abcourses']['cTeachingaid'][$uid] =& $objTeachingaid;
+                $this->arrTeachingaids[$uid] =& $GLOBALS['T3_VAR']['abcourses']['cTeachingaid'][$uid];
+            }
+        }
+
+        if ($this->arrTeachingaids[$uid] && !$this->DAL->fError) {
+            return $this->arrTeachingaids[$uid];
+        } else {
+            return 0;
+        }
+
+        return " ";
+    }
+
+    /**
+     * Returns an instance of cHotel, corresponding to a passed hotelId or arrangementId
+     *
+     * @param  integer         $hotelId        Id of the hotel record you want to get the object for. This takes precedence, if an arrangementId is passed too.
+     * @param  integer         $arrangementId  Id of an arrangement you want to get the corresponding hotel for.
+     * @return cHotel
+     */
+    function &get_Hotel($hotelId='',$arrangementId=''){
+        $debugme = false;
+        $foo = ($debugme?debug("Get Hotel " . $hotelId . " or Arrangement " . $arrangementId):'');
+        $objHotel = '';
+
+        if ($hotelId != '') {
+            if (!$this->arrHotels[$hotelId]) {
+                $objHotel = new cHotel;
+                $objHotel->loadData($hotelId,'',$this->DAL);
+            }
+        } elseif($arrangementId!='') {
+            $objHotel = new cHotel;
+            $objHotel->loadData('',$arrangementId,$this->DAL);
+            $foo = ($debugme?debug("Error while loading hotel?: " . $objHotel->fError):'');
+            if (!$objHotel->fError) {
+                $hotelId = $objHotel->getSingleData('uid');
+                $foo = ($debugme?debug($hotelId):'');
+                //check if this hotel was initialised before
+                if($this->arrHotels[$hotelId]){
+                    //throw the current hotel into the garbage and get the already initialised one
+                    $foo = ($debugme?debug("Hotel with id " . $hotelId . " already initialised."):'');
+                    $objHotel='';
+                    $objHotel =& $this->get_Hotel($hotelId);
+                }
+                //add the arrangement wich was used to get this hotel to the hotel-internal arrangement array
+                $objHotel->addArrangement($arrangementId,$this);
+            } else {
+                $foo = ($debugme?debug($this->DAL->arrStatus):'');
+            }
+
+        }
+
+        if ($objHotel!='') {
+            if (!$objHotel->fError) {
+                $GLOBALS['T3_VAR']['abcourses']['cHotel'][$hotelId] =& $objHotel;
+                $this->arrHotels[$hotelId] =& $GLOBALS['T3_VAR']['abcourses']['cHotel'][$hotelId];
+            }
+        }
+
+        if ($this->arrHotels[$hotelId] && !$this->DAL->fError) {
+            return $this->arrHotels[$hotelId];
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Returns one instance of cArrangement with the given id
+     *
+     * @param  integer         $uid    : The id of the arrangement wich should be initialised an returned
+     * @return cArrangement
+     */
+    function &get_Arrangement($uid){
+        $debugme = false;
+        $foo = ($debugme?debug("Get Arrangement " . $uid):'');
+        if (!$this->arrArrangements[$uid]) {
+            $objArrangement = new cArrangement;
+            $objArrangement->loadData($uid,$this->DAL);
+            if (!$objArrangement->fError) {
+                $GLOBALS['T3_VAR']['abcourses']['cArrangement'][$uid] =& $objArrangement;
+                $this->arrArrangements[$uid] =& $GLOBALS['T3_VAR']['abcourses']['cArrangement'][$uid];
+            }
+        }
+
+        if ($this->arrArrangements[$uid] && !$this->DAL->fError) {
+            return $this->arrArrangements[$uid];
+        } else {
+            return 0;
+        }
+
+        return " ";
+    }
+
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Location.php b/api/classes/class.tx_abcourses.Location.php
new file mode 100644 (file)
index 0000000..c7c2ec9
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * This class handles the location records of the abcourses plugin.
+ *
+ */
+class cLocation extends cAbcoursesBase{
+    var $fError = 0;
+    var $arrStatus = Array();
+
+    /**
+     * Load the data of a location record.
+     *
+     * @param  integer         $byUid To load the data with a location id
+     * @param  integer         $byEventId To load the data with a corresponding event id.
+     * @param  cAbcoursesDAL           $DAL Reference to the used abstraction layer
+     * @return void            ...
+     */
+    function loadData($byUid='',$byEventId='',&$DAL) {
+        if (!$this->arrData) {
+            $this->set_arrData($DAL->loadLocation($byUid,$byEventId));
+            $this->checkErrors($DAL);
+            if ($this->arrData == 0) $this->fError = 1;
+        }
+    }
+
+    /**
+     * Render and return the data of this location with the passed template.
+     *
+     * @param  string          $template : The remplate for rendering the view.
+     * @param  string          &$view : A reference to the pi1 class who wants to render this location.
+     * @param  string          $conf   : A snippet of TS configuration which should be used for this location.
+     * @return string          ...
+     */
+    function printme($template,&$view,$conf='') {
+        $MA = Array();
+
+        $MA['###LOCNAME###'] = ($this->getSingleData('title')?$view->cObj->stdWrap($this->getSingleData('title'),$conf['locationNameWrap.']):'');
+        $MA['###LOCSTREET###'] = ($this->getSingleData('street')?$view->cObj->stdWrap($this->getSingleData('street'),$conf['locationStreetWrap.']):'');
+        $MA['###LOCZIP###'] = ($this->getSingleData('zip')?$view->cObj->stdWrap($this->getSingleData('zip'),$conf['locationZipWrap.']):'');
+        $MA['###LOCCITY###'] = ($this->getSingleData('city')?$view->cObj->stdWrap($this->getSingleData('city'),$conf['locationCityWrap.']):'');
+        $MA['###LOCPHONE###'] = ($this->getSingleData('phone')?$view->cObj->stdWrap($this->getSingleData('phone'),$conf['locationPhoneWrap.']):'');
+        $MA['###LOCFAX###'] = ($this->getSingleData('fax')?$view->cObj->stdWrap($this->getSingleData('fax'),$conf['locationFaxWrap.']):'');
+        $MA['###LOCEMAIL###'] = ($this->getSingleData('email')?$view->cObj->stdWrap($this->getSingleData('email'),$conf['locationEmailWrap.']):'');
+        $MA['###LOCPERSON###'] = ($this->getSingleData('person')?$view->cObj->stdWrap($this->getSingleData('person'),$conf['locationPersonWrap.']):'');
+
+        //render and return the view
+        return $view->cObj->substituteMarkerArrayCached($template, $MA);
+    }
+
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Locations.php b/api/classes/class.tx_abcourses.Locations.php
new file mode 100644 (file)
index 0000000..032c41e
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * As like as cCategorys for category records this is a wrapper class for cLocation instances.
+ *
+ */
+class cLocations extends cAbcoursesBase {
+
+    var $fError = 0;
+    var $arrStatus = Array();
+    var $arrLocationIds = '';
+
+    /**
+     * Initialise some class attributes and loads the internal location Id-Array.
+     *
+     * @param  cLoader         $DAL Reference to the abcourses proxy class
+     * @return [type]          ...
+     */
+    function init(&$Loader) {
+        $this->arrLocationIds = $Loader->DAL->listLocations();
+        $this->checkErrors($this->DAL);
+        if ($this->arrData == 0) $this->fError = 1;
+    }
+
+    /**
+     * Initialise the cLocation instances for the location id's as contained in the internal array arrLocationIds.
+     * Return false if an error occurs.
+     *
+     * @param  cLoader         $DAL Reference to the abcourses proxy class
+     * @return boolean
+     */
+    function loadData(&$Loader) {
+        if ($this->fError || (!is_array($this->arrLocationIds))) {return false;}
+
+        foreach($this->arrLocationIds as $key=>$value) {
+            unset($objNextLocation);
+            $objNextLocation =& $Loader->get_Location($value);
+            $this->arrData[$objNextLocation->arrData['uid']] = $objNextLocation;
+        }
+        return true;
+    }
+
+    /**
+     * Returns an Array with the id of a location as key and the title of the location as value.
+     * The returned array is empty, if no data was available.
+     *
+     * @return array
+     */
+    function getLocationUidTitleArray() {
+        if ($this->fError) {return false;}
+        $arrReturn = Array();
+        if (is_array($this->arrData)) {
+            //returns a list with all uid->title pairs of loaded locations
+            reset($this->arrData);
+            while (list($key) = each($this->arrData)) {
+                $arrReturn[$key] = $this->arrData[$key]->arrData['title'];
+            }
+            reset($this->arrData);
+        }
+        return $arrReturn;
+    }
+
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Participant.php b/api/classes/class.tx_abcourses.Participant.php
new file mode 100644 (file)
index 0000000..8847a99
--- /dev/null
@@ -0,0 +1,75 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Represents a single participant.
+ *
+ */
+class cParticipant extends cPerson {
+
+       function loadData($participantId='', &$DAL) {
+        if (!$this->arrData) {
+            $this->set_arrData($DAL->loadParticipant($participantId));
+            $this->checkErrors($DAL);
+        }
+    }
+
+    /**
+     * This renders the data of an participant with the passed template.
+     *
+     * @param  string          $template The template for this record.
+     * @param  Object          $view Usually a reference to the pi1 class of the plugin
+     * @param  array           $conf TS configuration
+     * @return string          The rendered view...
+     */
+    function printme($template,&$view,$conf='') {
+        $MA = Array();
+
+        $MA['###TITLE###']      = ($this->getSingleData('title')?$view->cObj->stdWrap($this->getSingleData('title'),$conf['titleWrap.']):'');
+        $MA['###FULLNAME###']   = ($this->getSingleData('name')?$view->cObj->stdWrap($this->getSingleData('name'),$conf['fullnameWrap.']):'');
+        $MA['###COMPANY###']    = ($this->getSingleData('company')?$view->cObj->stdWrap($this->getSingleData('company'),$conf['companyWrap.']):'');
+               
+        $gender = "";
+        if ($this->getSingleData('gender')){
+               if ($this->getSingleData('gender')=="m") {
+                       $gender = $view->pi_getLL('labelmale');
+               } else {
+                       $gender = $view->pi_getLL('labelfemale');
+               }
+        }
+               $MA['###GENDER###']     = ($gender?$view->cObj->stdWrap($gender,$conf['genderWrap.']):'');
+               $MA['###FIRST_NAME###'] = ($this->getSingleData('first_name')?$view->cObj->stdWrap($this->getSingleData('first_name'),$conf['firstNameWrap.']):'');
+               $MA['###MIDDLE_NAME###']= ($this->getSingleData('middle_name')?$view->cObj->stdWrap($this->getSingleData('middle_name'),$conf['middleNameWrap.']):'');
+               $MA['###LAST_NAME###']  = ($this->getSingleData('last_name')?$view->cObj->stdWrap($this->getSingleData('last_name'),$conf['lastNameWrap.']):'');
+               $MA['###EMAIL###']      = ($this->getSingleData('email')?$view->cObj->stdWrap($this->getSingleData('email'),$conf['emailWrap.']):'');
+               $MA['###PHONE###']      = ($this->getSingleData('phone')?$view->cObj->stdWrap($this->getSingleData('phone'),$conf['phoneWrap.']):'');
+               $MA['###MOBILE###']     = ($this->getSingleData('mobile')?$view->cObj->stdWrap($this->getSingleData('mobile'),$conf['mobileWrap.']):'');
+               $MA['###CITY###']       = ($this->getSingleData('city')?$view->cObj->stdWrap($this->getSingleData('city'),$conf['cityWrap.']):'');
+               $MA['###ZIP###']        = ($this->getSingleData('zip')?$view->cObj->stdWrap($this->getSingleData('zip'),$conf['zipWrap.']):'');
+
+        //render and return the view
+        return $view->cObj->substituteMarkerArrayCached($template, $MA);
+    }
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Person.php b/api/classes/class.tx_abcourses.Person.php
new file mode 100644 (file)
index 0000000..06d5931
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+class cPerson extends cAbcoursesBase {
+    var $fError = 0;
+    var $arrStatus = Array();
+
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Teachingaid.php b/api/classes/class.tx_abcourses.Teachingaid.php
new file mode 100644 (file)
index 0000000..6db2218
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * This class handles the teaching-aid records of the abcourses plugin.
+ *
+ */
+class cTeachingaid extends cAbcoursesBase {
+    var $fError = 0;
+    var $arrStatus = Array();
+
+    /**
+     * Load the data of a teaching aid record depending on the passed teachingaidId.
+     *
+     * @param  integer         $teachingaidId
+     * @param  cAbcoursesDAL           $DAL Reference to the used data abstraction layer
+     * @return void
+     */
+    function loadData($teachingaidId='',&$DAL) {
+        if (!$this->arrData) {
+            $this->arrData = $DAL->loadTeachingaid($teachingaidId);
+            $this->checkErrors($DAL);
+        }
+    }
+
+
+    /**
+     * This function render the view for this event, depending on the given template.
+     *
+     * @param  string          $template : The remplate for rendering the view.
+     * @param  string          &$cObj : A reference to the cObj of the pi1 class who wants to render this view.
+     * @param  string          $conf   : A snippet of TS configuration which should be used for this event.
+     * @return [type]          ...
+     */
+    function printme($template, &$view) {
+        $debugme = false;
+
+        $MA['###NAME###'] = ($this->getSingleData('name')?$this->getSingleData('name'):'');
+
+        if($debugme){debug($MA);}
+
+        //render and return the view
+        return $view->cObj->substituteMarkerArrayCached($template, $MA);
+    }
+
+}
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.Trainer.php b/api/classes/class.tx_abcourses.Trainer.php
new file mode 100644 (file)
index 0000000..093508f
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008 Stefan Precht (sprecht@gmx.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+class cTrainer extends cPerson {
+    function loadData($trainerId='',$eventId='',&$DAL) {
+        if (!$this->arrData) {
+            $this->set_arrData($DAL->loadTrainer($trainerId,$eventId));
+            $this->checkErrors($DAL);
+        }
+    }
+
+    /**
+     * This renders the data of an trainer record with the passed template.
+     *
+     * @param  string          $template The template for this record.
+     * @param  Object          $view Usually a reference to the pi1 class of the plugin
+     * @param  array           $conf TS configuration
+     * @return string          The rendered view...
+     */
+    function printme($template,&$view,$conf='') {
+        $MA = Array();
+
+        $MA['###TRAINERTITLE###'] = ($this->getSingleData('title')?$view->cObj->stdWrap($this->getSingleData('title'),$conf['trainerTitleWrap.']):'');
+        $MA['###FULLNAME###'] = ($this->getSingleData('name')?$view->cObj->stdWrap($this->getSingleData('name'),$conf['trainerFullnameWrap.']):'');
+        $MA['###TRAINERCOMPANY###'] = ($this->getSingleData('company')?$view->cObj->stdWrap($this->getSingleData('company'),$conf['trainerCompanyWrap.']):'');
+
+        $sImage = $conf['trainerImageWrap.'];
+        $sImage['if.']['isTrue'] = $this->getSingleData('image');
+        $sImage['file'] = "uploads/pics/" . $this->getSingleData('image'); //Dateipfad zusammensetzen
+        $sImage = $view->cObj->IMAGE($sImage);
+        $MA['###TRAINERIMAGE###'] = $sImage;
+        $MA['###TRAINERNUMBER###'] = $this->getSingleData('tx_abcourses_tnumber');
+        $MA['###TRAINERPOSITION###'] = $this->getSingleData('tx_abcourses_position');
+
+        //render and return the view
+        return $view->cObj->substituteMarkerArrayCached($template, $MA);
+
+    }
+}
+
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.classes.php b/api/classes/class.tx_abcourses.classes.php
new file mode 100644 (file)
index 0000000..6c63664
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2006 - 2013 Stefan Precht (info@stefanprecht.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+/**
+ * Different classes for the 'abcourses' extension.
+ *
+ * @author     Stefan Precht <info@stefanprecht.de>
+ */
+
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.dal.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.AbcoursesBase.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Location.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Locations.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Category.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Categorys.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Course.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Arrangement.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Hotel.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Event.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Person.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Trainer.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Participant.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Teachingaid.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.Loader.php');
+?>
\ No newline at end of file
diff --git a/api/classes/class.tx_abcourses.dal.php b/api/classes/class.tx_abcourses.dal.php
new file mode 100644 (file)
index 0000000..388866d
--- /dev/null
@@ -0,0 +1,1091 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2006-2013 Stefan Precht (stprecht@gmail.com)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+/**
+ * Data access layer for abcourses. Tested with MySQL as Database. You can change this, if you want to connect the abcourses plugin with other applications.
+ * Please consider, that this is only related to the front-end!
+ * If you change this file, the records as entered in the back end of TYPO3 may not be shown with the FE plugin. May be it would be nice then, to disable the corresponding records in the BE.
+ *
+ * Do not change parameters or return values of the cAbcoursesDAL functions. If you do this anyway, you have to change the pi1 class and may be any class in the classes folder.
+ *
+ * @author     Stefan Precht <sprecht@gmx.de>
+ */
+
+require_once(t3lib_extMgm::extPath('abcourses').'api/util/class.tx_abcourses.utils.php');
+
+class cAbcoursesDAL extends tslib_pibase {
+       var $conf = '';
+       var $pages = '';
+       var $recursive = '';
+       var $cObj = '';
+
+       var $fError = '';
+       var $arrStatus = '';
+
+       /**
+        * This is to initalise the DAL. Passed variables are TYPO3 specific. Dont change this parameters.
+        *
+        * @param       array           $conf   TS configuration
+        * @param       string          $pages  List of page ids where seminar records could be saved
+        * @param       integer         $recursive      Level of nested pages
+        * @param       tslib_conf              $cObj   A reference to the tslib_cobj instance of the pi1 class.
+        * @return      [type]          ...
+        */
+       function init($conf,$pages,$recursive,&$cObj){
+               $this->conf = $conf;
+               $this->pages = $pages;
+               $this->recursive = $recursive;
+               $this->cObj = $cObj;
+       }
+
+       /**
+        * Resets the error flag and the message array.
+        *
+        * @return      void
+        */
+       function reset() {
+               $this->fError = '';
+               $this->arrStatus = '';
+       }
+
+
+       //+++++++++++++++++++++++++++++++++++//
+       //+++++++++++ CATEGORIES +++++++++++++//
+       //+++++++++++++++++++++++++++++++++++//
+       /**
+       * This function must return an array containing the unique id's of available categories. The id's should be of integer.
+       *
+       * @return       array           Must be in the format key => value where key is an counter and value the id of a category
+       */
+       function listCategorys() {
+               $this->reset();
+
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                                              'uid',
+                                              'tx_abcourses_categorie',
+                                                          'pid IN (' .$this->pi_getPidList(
+               $this->pages,
+               $this->recursive
+               ) . ')' .$this->cObj->enableFields('tx_abcourses_categorie'),'','sorting'
+               );
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listCategorys.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listCategorys.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+
+       }
+
+       /**
+        * This function must return an array containing the unique id of a category. This function must work with corresponding course id's too!
+        *
+        * @param       integer         $byUid Unique id of an category
+        * @param       integer         $byCourseId Unique id of an course
+        * @return      array           Must be in the format fieldname => value where fieldname must be uid and value the id of a category.
+        */
+       function loadCategory($byUid='',$byCourseId='') {
+               $this->reset();
+
+               if ($byCourseId!=''){
+               }
+
+               if ($byUid != '') {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                               'uid,title,teaser,image',
+                               'tx_abcourses_categorie',
+                                   'pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tx_abcourses_categorie') . " AND uid='" . intval($byUid) . "'",'','sorting'
+                       );
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }   else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadCategory.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadCategory.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+
+       //++++++++++++++++++++++++++++++++++//
+       //+++++++++++ COURSES ++++++++++++++//
+       //++++++++++++++++++++++++++++++++++//
+
+       /**
+        * This function must return a list of course id's. The course id's can be looked up with different values.
+        *
+        * @param       integer         $byCategoryId An id of a category a course could be associated with...
+        * @param       string          $bySimilarTitle
+        * @param       integer         $expectCourseId
+        * @return      array           Must be in the format key => value where key is an counter and value the id of a course
+        */
+       function listCourses($byCategoryId='',$bySimilarTitle='', $expectCourseId = ''){
+               $this->reset();
+
+               if ($byCategoryId) {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('tx_abcourses_course.uid AS uid',
+                             'tx_abcourses_course',
+                             'tx_abcourses_course_categorie_mm',
+                             'tx_abcourses_categorie',
+                             'AND tx_abcourses_course.pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')
+                                AND  tx_abcourses_course_categorie_mm.uid_foreign = ' . intval($byCategoryId) . ' ' . $this->cObj->enableFields('tx_abcourses_course'),
+                                '',
+                                'tx_abcourses_course.sorting',
+                                ''
+                                );
+               }elseif($bySimilarTitle) {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                   'uid',
+                   'tx_abcourses_course',
+                       'pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tx_abcourses_course') .
+                       " AND title LIKE '%" . $GLOBALS['TYPO3_DB']->quoteStr($bySimilarTitle,'tx_abcourses_course') . "%' " . (intval($expectCourseId)?' AND uid != ' . intval($expectCourseId):''),'','sorting'
+                       );
+               } else {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                   'uid',
+                   'tx_abcourses_course',
+                       'pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tx_abcourses_course'),'','sorting'
+                       );
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listCourses.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listCourses.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       /**
+        * This function must return a list of course id's. The course id's can be looked up with different values.
+        *
+        * @param       integer         $categoryId An id of a category a course could be associated with...
+        * @param       integer         $counter This is used as LIMIT value for the mysql statement an passed through the plugin TS configuration into this function.
+        * @return      array           Must be in the format key => value where key is an counter and value the id of a course
+        */
+       function listCoursesWithNextEvents($categoryId='',$counter=1){
+               $this->reset();
+
+               //set time filter for events
+               $datefilter = '';
+               $time = time();
+               $datefilter = ' AND tx_abcourses_event.coursestart >= ' . mktime(0, 0, 0, date('m', $time),date('d', $time),date('Y', $time));
+
+               //Query $counter course uid's with the closest events
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                       'DISTINCT tx_abcourses_course.uid',
+                'tx_abcourses_course ' .
+                       'INNER JOIN tx_abcourses_event_course_mm ' .
+                       'ON tx_abcourses_event_course_mm.uid_foreign = tx_abcourses_course.uid ' .
+                       'INNER JOIN tx_abcourses_event ' .
+                               'ON tx_abcourses_event.uid = tx_abcourses_event_course_mm.uid_local ' .
+                       'INNER JOIN tx_abcourses_course_categorie_mm '.
+                               'ON  tx_abcourses_course_categorie_mm.uid_local = tx_abcourses_course.uid ' .
+                       'INNER JOIN tx_abcourses_categorie ' .
+                       'ON tx_abcourses_categorie.uid = tx_abcourses_course_categorie_mm.uid_foreign ',
+                               'tx_abcourses_course.pid IN (' .$this->pi_getPidList(
+                               $this->pages,
+                               $this->recursive
+                           ) . ')' .
+                           $this->cObj->enableFields('tx_abcourses_course') .
+                           $this->cObj->enableFields('tx_abcourses_event') . ' ' .
+                    'AND tx_abcourses_categorie.uid = '. intval($categoryId) . ' ' .
+                           $datefilter,
+                '',
+                'tx_abcourses_event.coursestart',
+                       $counter
+               );
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listCoursesWithNextEvents.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listCoursesWithNextEvents.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       /**
+        * This must return an array with all course data. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+        * The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+        *
+        * @param       integer         $byUid The unique id of the course you would like to get the attributes for.
+        * @param       integer         $byEventId To get the the course id for the corresponding event id.
+        * @return      array
+        */
+       function loadCourse($byUid='',$byEventId='') {
+               $this->reset();
+
+               if ($byEventId!=''){
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                'tx_abcourses_course.*',
+                'tx_abcourses_event',
+                'tx_abcourses_event_course_mm',
+                'tx_abcourses_course',
+                 $this->cObj->enableFields('tx_abcourses_course') . '
+                 AND tx_abcourses_event_course_mm.uid_local = ' . intval($byEventId) . '
+                 AND tx_abcourses_course.uid = tx_abcourses_event_course_mm.uid_foreign'
+                 );
+               }
+
+               if ($byUid != '') {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                'tx_abcourses_course.*',
+                'tx_abcourses_course',
+                'tx_abcourses_course.uid = ' . intval($byUid) . $this->cObj->enableFields('tx_abcourses_course')
+                       );
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadCourse.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadCourse.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+
+       }
+
+
+       //++++++++++++++++++++++++++++++++++//
+       //++++++++++++ EVENTS ++++++++++++++//
+       //++++++++++++++++++++++++++++++++++//
+
+       /**
+        * Must return a list of related event id's.
+        *
+        * @param       integer         $byCourseId : Id of an course
+        * @param       integer         $showeventsago : If you would like to receive expired events too, set this to an appropriate number of days an event may have expired.
+        * @param       integer         $lastMinuteOnly : If this results in true, only lastMintue Events should be returned
+        * @param       integer         $maxNEvents : Set this as LIMIT value for the SQL statement. This is only used in the last minute query.
+        * @return      array           Array key only as counter
+        */
+       function listEvents($byCourseId='',$showeventsago = 0,$lastMinuteOnly = 0,$maxNEvents=0){
+               $this->reset();
+
+               if (!$maxNEvents) $maxNEvents = '';
+
+               //Filter für Termine setzen. Termin darf $ago Tage zurückliegen.
+               $datefilter = '';
+               $ago = intval($showeventsago);
+               $time = time()-($ago*24*3600);
+               $datefilter = ' AND tx_abcourses_event.coursestart >= ' . mktime(0, 0, 0, date('m', $time),date('d', $time),date('Y', $time));
+
+               if (is_numeric($byCourseId)) {
+                 //Fixme Testen ob die Sortierung unten nu auch funzt...
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                'tx_abcourses_event.uid',
+                'tx_abcourses_event',
+                'tx_abcourses_event_course_mm',
+                'tx_abcourses_course',
+                'AND tx_abcourses_event.pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tx_abcourses_event') . '
+                 AND tx_abcourses_event_course_mm.uid_foreign = ' . intval($byCourseId) . $datefilter,
+                 '',
+                 'tx_abcourses_event.coursestart, tx_abcourses_event.firstdaytimestart'
+                       );
+               } elseif($lastMinuteOnly) {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                        'tx_abcourses_event.uid',
+                        'tx_abcourses_event',
+                        'tx_abcourses_event.pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' . $this->cObj->enableFields('tx_abcourses_event') .
+                                       ' AND tx_abcourses_event.lastminute <> 0 ' . $datefilter,
+                                   '',
+                                   'tx_abcourses_event.coursestart, tx_abcourses_event.firstdaytimestart',
+                       $maxNEvents
+                       );
+
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       } else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listEvents.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listEvents.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+
+       }
+
+       /**
+        * This function returns an indexed array with one event uid key=>value pair for a given course uid.
+        *
+        * @param       integer         $courseId The id of the course you would like to receive an event id for.
+        * @param       integer         $showeventsago If you would like to receive expired events too, set this to an appropriate number of days an event may have expired.
+        * @return      array           The key is the attribute uid and the value the received id.
+        */
+       function listNextEventForCourse($courseId,$showeventsago = 0){
+               $debugme = false;
+               $this->reset();
+
+               //TODO Remove that ago filter because it is nonsense within this method.
+               //Filter für Termine setzen. Termin darf $ago Tage zurückliegen.
+               $datefilter = '';
+               $ago = intval($showeventsago);
+               $time = time()-($ago*24*3600);
+               $datefilter = ' AND tx_abcourses_event.coursestart >= ' . mktime(0, 0, 0, date('m', $time),date('d', $time),date('Y', $time));
+
+               if (is_numeric($courseId)) {
+                       if ($debugme) {
+                               $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
+                       }
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                'tx_abcourses_event.uid',
+                'tx_abcourses_event',
+                'tx_abcourses_event_course_mm',
+                'tx_abcourses_course',
+                'AND tx_abcourses_event.pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tx_abcourses_event') . '
+                 AND tx_abcourses_event_course_mm.uid_foreign = ' . intval($courseId) . $datefilter,
+                '',
+                'tx_abcourses_event.coursestart',
+                ''
+                );
+                if ($debugme) {
+                       debug($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+                }
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listNextEventForCourse.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listNextEventForCourse.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       /**
+        * Returns the data of an event as associative array.
+        * The array keys must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+        *
+        * @param       integer         $eventId Id of the event
+        * @return      array
+        */
+       function loadEvent($eventId='') {
+               $this->reset();
+
+               if ($eventId!=''){
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                'tx_abcourses_event.*',
+                'tx_abcourses_event',
+                'tx_abcourses_event.uid = ' . intval($eventId) . $this->cObj->enableFields('tx_abcourses_event')
+                       );
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadEvent.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadEvent.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+
+       //++++++++++++++++++++++++++++++++++//
+       //+++++++++++ LOCATION +++++++++++++//
+       //++++++++++++++++++++++++++++++++++//
+
+       /**
+        * Returns a list of the unique id's for all available loactions
+        *
+        * @return      array           Array key only as counter
+        */
+       function listLocations() {
+               $this->reset();
+
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                                              'uid',
+                                              'tx_abcourses_location',
+                                                          'pid IN (' .$this->pi_getPidList(
+               $this->pages,
+               $this->recursive
+               ) . ')' .$this->cObj->enableFields('tx_abcourses_location')
+               );
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listLocations.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listLocations.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+
+       }
+
+       /**
+        * Returns the data of an location as associative array. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+        * The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+        *
+        * @param       integer         $byUid To load the location data with an location id.
+        * @param       integer         $byEventId To load the location data corresponding to an special event.
+        * @return      unknown
+        */
+       function loadLocation($byUid='',$byEventId='') {
+               $this->reset();
+
+               if ($byUid != '') {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                               'uid,title,street,zip,city,phone,fax,email,person,informations',
+                               'tx_abcourses_location',
+                                   'pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tx_abcourses_location') . " AND uid='" . intval($byUid) . "'",'','city, title'
+                       );
+               } elseif ($byEventId!=''){
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+               'tx_abcourses_location.uid,tx_abcourses_location.title,tx_abcourses_location.street,tx_abcourses_location.zip,tx_abcourses_location.city,tx_abcourses_location.phone,tx_abcourses_location.fax,tx_abcourses_location.email,tx_abcourses_location.person,tx_abcourses_location.informations',
+                'tx_abcourses_event',
+                'tx_abcourses_event_location_mm',
+                'tx_abcourses_location',
+                'AND tx_abcourses_location.pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->conf["recursive"]
+                       ) . ')' .$this->cObj->enableFields('tx_abcourses_location') .
+                       ' AND tx_abcourses_event_location_mm.uid_local = ' . intval($byEventId) .
+                       ' AND tx_abcourses_location.uid = tx_abcourses_event_location_mm.uid_foreign'
+                       );
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }   else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadLocation.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadLocation.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+
+       //++++++++++++++++++++++++++++++++++++++//
+       //++++++++++++++ Trainer +++++++++++++++//
+       //++++++++++++++++++++++++++++++++++++++//
+       /**
+       * Returns a array with unique id's of trainers, associated to the given course.
+       *
+       * @param        integer         $byCourseId Id of the course you want to get the trainers for
+       * @return       array           The key of the array is only a counter.
+       */
+       function listTrainer($byCourseId=''){
+               $this->reset();
+
+               if ($byCourseId) {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                            'tt_address.*',
+                            'tx_abcourses_course',
+                            'tx_abcourses_course_trainers_mm',
+                            'tt_address',
+                            'AND tt_address.pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tt_address') . '
+                                                AND tx_abcourses_course_trainers_mm.uid_local = ' . intval($byCourseId) . '
+                                                AND tt_address.uid = tx_abcourses_course_trainers_mm.uid_foreign',
+                                               '',
+                            'tx_abcourses_course_trainers_mm.sorting'
+                            );
+               } else {
+                       $res = 0;
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listTrainer.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listTrainer.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+
+       //++++++++++++++++++++++++++++++++++++++//
+       //++++++++++++ Conditions ++++++++++++++//
+       //++++++++++++++++++++++++++++++++++++++//
+
+       /**
+        * Should return an array with the uid of conditional courses.
+        * @param $courseId The uid of the course where you want to get the conditionals for.
+        * @return array        Conditional courses
+        */
+       function listConditionalCourses($courseId) {
+               $debugme = false;
+               $this->reset();
+
+               if ($debugme) {
+                       $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = true;
+               }
+
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                               'tx_abcourses_course_conditionsref_mm.uid_foreign AS uid',
+                                               'tx_abcourses_course_conditionsref_mm',
+                               ' tx_abcourses_course_conditionsref_mm.uid_local = ' . intval($courseId)
+                             );
+
+        if ($debugme) {
+                       debug($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+        }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listConditionalCourses.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listConditionalCourses.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       debug($this->arrStatus);
+                       return 0;
+               }
+       }
+
+       /**
+        * Returns the data of a trainer as associative array. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+        * The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+        *
+        * @param       integer         $byUid Load the data for an given id of a trainer. This value takes precedence.
+        * @param       integer         $byEventId Load the data for the trainer which is associated with the eventId.
+        * @return      array
+        */
+       function loadTrainer($byUid='',$byEventId='') {
+               $this->reset();
+
+               if ($byEventId!=''){
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                    'tt_address.*',
+                    'tx_abcourses_event',
+                    'tx_abcourses_event_trainer_mm',
+                    'tt_address',
+                    'AND tt_address.pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tt_address') . '
+                     AND tx_abcourses_event_trainer_mm.uid_local = ' . intval($byEventId) . '
+                     AND tt_address.uid = tx_abcourses_event_trainer_mm.uid_foreign'
+                     );
+               }
+
+               if ($byUid != '') {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                    'tt_address.*',
+                    'tt_address',
+                    'tt_address.uid = ' . intval($byUid) . $this->cObj->enableFields('tt_address')
+                       );
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadTrainer.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadTrainer.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       //++++++++++++++++++++++++++++++++++++++//
+       //++++++++++++Teaching aids ++++++++++++//
+       //++++++++++++++++++++++++++++++++++++++//
+
+       /**
+        * Returns an array with unique id's of teaching aids associated with the passed course id.
+        *
+        * @param       integer         $courseId Id of the course you would like to load the teaching aids for.
+        * @return      array           The key of this array is only used as an counter.
+        */
+       function listTeachingaidsForCourse($courseId){
+               $debugme = false;
+               $this->reset();
+
+               if (is_numeric($courseId)) {
+                       if ($debugme) {
+                               $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
+                       }
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                'tx_abcourses_teachingaids.uid',
+                'tx_abcourses_course',
+                'tx_abcourses_course_teachingaids_mm',
+                'tx_abcourses_teachingaids',
+                'AND tx_abcourses_course_teachingaids_mm.uid_local = ' . intval($courseId) . ' ' . $this->cObj->enableFields('tx_abcourses_teachingaids'),
+                '',
+                'tx_abcourses_teachingaids.sorting',
+                ''
+                );
+                if ($debugme) {
+                       debug($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+                }
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listTeachingaidsForCourse.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listTeachingaidsForCourse.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       /**
+        * To load the whole data of a teaching aid record. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+        * The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+        *
+        * @param       integer         $id Id of the teching aid
+        * @return      array
+        */
+       function loadTeachingaid($id='') {
+               $this->reset();
+
+               if (is_numeric($id)){
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                'tx_abcourses_teachingaids.*',
+                'tx_abcourses_teachingaids',
+                'tx_abcourses_teachingaids.uid = ' . intval($id) . $this->cObj->enableFields('tx_abcourses_teachingaids')
+                       );
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadTeachingaid.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadTeachingaid.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       //++++++++++++++++++++++++++++++++++++++//
+       //+++++++++++++  HOTEL  ++++++++++++++++//
+       //++++++++++++++++++++++++++++++++++++++//
+
+       /**
+        * To load the whole data of a hotel record. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+        * The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+        *
+        * @param       integer         $hotelId        To receive the data corresponding to a hotel id
+        * @param       integer         $arrangementId To receive the data corresponding to a arrangement id
+        * @return      array
+        */
+       function loadHotel($hotelId='',$arrangementId='') {
+               $debugme = false;
+               $this->reset();
+
+               if ($debugme) {
+                       $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
+               }
+               if (is_numeric($hotelId)){
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                'tx_abcourses_hotel.*',
+                'tx_abcourses_hotel',
+                'tx_abcourses_hotel.uid = ' . intval($id) . $this->cObj->enableFields('tx_abcourses_hotel')
+                       );
+               } elseif (is_numeric($arrangementId)) {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                'tx_abcourses_hotel.*',
+                'tx_abcourses_arrangement',
+                'tx_abcourses_arrangement_hotel_mm',
+                'tx_abcourses_hotel',
+                'AND tx_abcourses_arrangement.pid IN (' .$this->pi_getPidList(
+                       $this->pages,
+                       $this->recursive
+                       ) . ')' .$this->cObj->enableFields('tx_abcourses_arrangement') . ' ' .$this->cObj->enableFields('tx_abcourses_hotel') . '
+                 AND tx_abcourses_arrangement_hotel_mm.uid_local = ' . intval($arrangementId)
+                       );
+               }
+               if ($debugme) {
+                       debug($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadHotel.';
+                               $this->fError = 1;
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadHotel.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+
+       // ++++++++++++++++++++++ //
+       // +++++ ARRANGEMENT ++++ //
+       // ++++++++++++++++++++++ //
+
+       /**
+        * Returns an array with unique id's of arrangement records, corresponding to a hotel id.
+        *
+        * @param       integer         $hotelId
+        * @return      array           Array key is only used as an counter
+        */
+       function listArrangements($hotelId=''){
+               $debugme = false;
+               $this->reset();
+
+               if (is_numeric($hotelId)) {
+                       if ($debugme) {
+                               $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
+                       }
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                'tx_abcourses_arrangement.uid',
+                'tx_abcourses_arrangement',
+                'tx_abcourses_arrangement_hotel_mm',
+                'tx_abcourses_hotel',
+                'AND tx_abcourses_arrangement_hotel_mm.uid_foreign = ' . intval($hotelId) . ' ' . $this->cObj->enableFields('tx_abcourses_arrangement') . ' ' . $this->cObj->enableFields('tx_abcourses_hotel'),
+                '',
+                'tx_abcourses_arrangement_hotel_mm.sorting',
+                ''
+                );
+                if ($debugme) {
+                       debug($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+                }
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listArrangements.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listArrangements.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       /**
+        * Returns an array with unique id's of arrangement records, corresponding to ann event id.
+        *
+        * @param       integer         $eventId
+        * @return      array           Array key is only used as an counter
+        */
+       function listArrangementsForEvent($eventId=''){
+               $debugme = false;
+               $this->reset();
+
+               if (is_numeric($eventId)) {
+                       if ($debugme) {
+                               $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
+                       }
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                'tx_abcourses_arrangement.uid',
+                'tx_abcourses_event',
+                'tx_abcourses_event_arrangement_mm',
+                'tx_abcourses_arrangement',
+                'AND tx_abcourses_event_arrangement_mm.uid_local = ' . intval($eventId) . ' ' . $this->cObj->enableFields('tx_abcourses_arrangement') . ' ' . $this->cObj->enableFields('tx_abcourses_event'),
+                '',
+                'tx_abcourses_event_arrangement_mm.sorting',
+                ''
+                );
+                if ($debugme) {
+                       debug($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+                }
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->listArrangementsForEvent.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->listArrangementsForEvent.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       /**
+        * Load the whole data of an arrangement id. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+        * The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+        *
+        * @param       integer         $id
+        * @return      array
+        */
+       function loadArrangement($id='') {
+               $this->reset();
+
+               if (is_numeric($id)){
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                'tx_abcourses_arrangement.*',
+                'tx_abcourses_arrangement',
+                'tx_abcourses_arrangement.uid = ' . intval($id) . $this->cObj->enableFields('tx_abcourses_arrangement')
+                       );
+               }
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadArrangement.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadArrangement.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+       }
+
+       function loadParticipant($participantId) {
+               $this->reset();
+               $res = null;
+                       
+               if ($participantId != '') {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                    'tt_address.*',
+                    'tt_address',
+                    'tt_address.uid = ' . intval($participantId) . $this->cObj->enableFields('tt_address')
+                       );
+               }
+               
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               $ret = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadParticipant.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadParticipant.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+
+       }
+
+       function get_ParticipantIdByUniqueField($field,$value){
+               $fieldsArr = $GLOBALS['TYPO3_DB']->admin_get_fields("tt_address");
+               if (is_array($fieldsArr[$field])) {
+                       $value = $GLOBALS['TYPO3_DB']->fullQuoteStr($value,"tt_address");
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                    'tt_address.uid',
+                    'tt_address',
+                    $field . ' = ' . $value . $this->cObj->enableFields('tt_address')
+                       );
+            $arr = QueryUtil::getFirstDataArrayFromResult($res);
+            if ($arr != null) {
+               return $arr['uid'];
+            }
+               } else {
+                       die('The configured value regarding the address record unique field is not available. Please correct you setup.');
+               }
+       }
+
+       function listParticipantsForEvent($eventId){
+               $this->reset();
+               $res = null;
+               
+               if ($eventId!=''){
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query (
+                    'tt_address.uid',
+                    'tx_abcourses_event',
+                    'tx_abcourses_event_participants_mm',
+                    'tt_address',
+                    ' AND tt_address.uid = tx_abcourses_event_participants_mm.uid_foreign' .
+                                       ' AND tx_abcourses_event_participants_mm.uid_local = ' . intval($eventId)
+                     );
+               }
+               
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                               while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                                       $ret[] = $data['uid'];
+                               }
+                               return $ret;
+                       }       else {
+                               $this->arrStatus[] = 'Query returns no data in cAbcoursesDAL->loadParticipantsForEvent.';
+                               return 0;
+                       }
+               } else {
+                       $this->fError = 1;
+                       $this->arrStatus[] = 'An SQL error occured in cAbcoursesDAL->loadParticipantsForEvent.';
+                       $this->arrStatus[] = $GLOBALS['TYPO3_DB']->debug();
+                       return 0;
+               }
+
+       }
+}
+
+
+
+?>
\ No newline at end of file
diff --git a/api/util/class.tx_abcourses.AbcoursesUtil.php b/api/util/class.tx_abcourses.AbcoursesUtil.php
new file mode 100644 (file)
index 0000000..d480fb3
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2008-2013 Stefan Precht (sprecht@gmail.com)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * For different Tools to assist abcourses or for wrapper of other methods. Use as static.
+ * @author Stefan Precht
+ */
+class AbcoursesUtil {
+
+       /**
+        * Returns a formatted datetime timestamp as human readable.
+        *
+        * @param String $formatString  To format the output format.
+        * @param Integer $timeStamp    The timestamp you want to format. Default is getTimeStamp();
+        * @see www.php.net/strftime
+        */
+       public static function getFormattedDate($formatString, $timeStamp = ''){
+
+               if (!$timeStamp) {
+                       $timeStamp = AbcoursesUtil::getTimeStamp();
+               }
+
+               if ($GLOBALS['T3_VAR']['abcourses']['locale']) {
+                       setlocale(LC_TIME,$GLOBALS['T3_VAR']['abcourses']['locale']);
+               }
+
+               return strftime($formatString,$timeStamp);
+       }
+
+
+       public static function getFormattedTime($formatString, $timeStamp = ''){
+
+               if (!$timeStamp) {
+                       $timeStamp = AbcoursesUtil::getTimeStamp();
+               } else {
+                       if ($GLOBALS['T3_VAR']['abcourses']['offset']!=0){
+                               $timeStamp = ($timeStamp + ($GLOBALS['T3_VAR']['abcourses']['offset']*60));
+                       }
+               }
+
+               if ($GLOBALS['T3_VAR']['abcourses']['locale']) {
+                       setlocale(LC_TIME,$GLOBALS['T3_VAR']['abcourses']['locale']);
+               }
+
+               return strftime($formatString,$timeStamp);
+       }
+
+       /**
+        * Retuns a timestamp, related to the UTC settings of your TYPO3 system.
+        *
+        * @return Integer Timestamp
+        */
+       public static function getTimeStamp(){
+               return time();
+       }
+}
+?>
\ No newline at end of file
diff --git a/api/util/class.tx_abcourses.CurrentContext.php b/api/util/class.tx_abcourses.CurrentContext.php
new file mode 100644 (file)
index 0000000..9927bb4
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+
+require_once(t3lib_extMgm::extPath('abcourses').'api/classes/class.tx_abcourses.classes.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/util/class.tx_abcourses.utils.php');
+
+/**
+ * Class tx_abcourses_CurrentContext
+ *
+ * TODO Documentation
+ */
+class tx_abcourses_CurrentContext
+{
+    private $prefixId = 'tx_abcourses_pi1';
+    private $piVars = array();
+    private $objLoader = null;
+    private $conf = array();
+    var $pages = '';
+    var $recursive = '';
+
+    function __construct()
+    {
+        if ($this->prefixId) {
+            $this->piVars = t3lib_div::_GPmerged($this->prefixId);
+        }
+        $this->conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_abcourses_pi1.'];
+
+    }
+
+    /**
+     * @param string $prefixId
+     */
+    public function setPrefixId($prefixId)
+    {
+        $this->prefixId = $prefixId;
+    }
+
+    /**
+     * @return string
+     */
+    private function getPrefixId()
+    {
+        return $this->prefixId;
+    }
+
+    /**
+     * @return bool
+     */
+    public function isCurrentCourseAvailable()
+    {
+        return (isset($this->piVars['courseId'])||isset($this->piVars['eventId']));
+    }
+
+    /**
+     * @return cCourse|null
+     */
+    public function &getCurrentCourse(){
+        $objLoader = &$this->getLoader();
+        if (isset($this->piVars['courseId'])) {
+            return $objLoader->get_Course($this->piVars['courseId']);
+        } elseif (isset($this->piVars['eventId'])) {
+            return $objLoader->get_Course('',$this->piVars['eventId']);
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * @return cLoader
+     */
+    private function &getLoader(){
+        if ($this->objLoader == null) {
+            if (!$GLOBALS['T3_VAR']['abcourses']['currentContextcLoader']) {
+                $GLOBALS['T3_VAR']['abcourses']['currentContextcLoader'] =&t3lib_div::makeInstance('cLoader');
+                $objLoader =&$GLOBALS['T3_VAR']['abcourses']['currentContextcLoader'];
+                $objLoader->init($this->conf,$this->pages,$this->recursive,$GLOBALS['TSFE']->cObj);
+            } else {
+                $this->objLoader =&$GLOBALS['T3_VAR']['abcourses']['currentContextcLoader'];
+            }
+        }
+        return $GLOBALS['T3_VAR']['abcourses']['currentContextcLoader'];
+    }
+}
+?>
\ No newline at end of file
diff --git a/api/util/class.tx_abcourses.DataArray.php b/api/util/class.tx_abcourses.DataArray.php
new file mode 100644 (file)
index 0000000..e4c31cf
--- /dev/null
@@ -0,0 +1,166 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009 Stefan Precht (sprecht@gmx.de)
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+       /**
+        *  To handle some tuple data...
+        *
+        *  @author     Stefan Precht <sprecht@gmx.de>
+        */
+    class DataArray {
+        private $dataArr = null;
+        private $dataArrLimit = null;
+        const IS_EMPTY = true;
+        const IS_NOT_EMPTY = false;
+
+        public function __construct() {
+            $this->dataArr = Array();
+        }
+
+        /**
+         * With this function you can fill the CDataArray Instance with an complete Array.
+         */
+        public function init($arrInit) {
+               if (!is_array($arrInit)) return null;
+            $this->reset();
+            while(list($key,$value) = each($arrInit)) {
+                $this->add($key,$value);
+            }
+            return true;
+        }
+
+        /**
+         * Reset the internal Array cursor
+         */
+        public function reset(){
+               if (is_array($this->dataArr)){
+                       reset($this->dataArr);
+               }
+        }
+
+        /**
+         * Adds one key value tupel to this object
+         * @return boolean if the value could not be added, this returns false. otherwise true.
+         */
+        public function add($key, $value){
+               if(!($this->getValueCountLimit() && ($this->size()>=$this->getValueCountLimit()))) {
+               if ($key != null && !($value === null)) {
+                    $this->dataArr[strtolower(trim($key))] = $value;
+                    return true;
+                }
+               }
+            return false;
+        }
+
+        /**
+         * Get the tupel for a specific key. Returns null if the key does not exist.
+         * @return MixedVar The value for the Key or null
+         */
+        public function get($key) {
+               $key = strtolower(trim($key));
+            if ($this->contains($key)) {
+                if ($this->dataArr[$key]!=null && $this->dataArr[$key]!= "")
+                    return $this->dataArr[$key];
+            }
+            return null;
+        }
+
+        /**
+         * Return the current key and value pair from the internal array and advance the array cursor. Do not forget calling <code>reset()</code> before you start an iteration witch each()!!
+         */
+        public function getEach() {
+            return each($this->dataArr);
+        }
+
+        /**
+         * This returns true, if an element with $key is available within this instance.
+         *
+         * @param unknown_type $key
+         */
+        public function contains($key){
+               $key = strtolower(trim($key));
+               return array_key_exists($key,$this->dataArr);
+        }
+
+        /**
+         * @return array
+         */
+        public function getDataArray(){
+               return $this->dataArr;
+        }
+
+        /**
+         * This iterates over the internal array and returns it
+         * formattet as marker array.
+         *
+         * @return array
+         */
+        public function asMarkerArray(){
+               $MA = Array();
+               $this->reset();
+               while(list($key,$value)=$this->getEach()) {
+                       //If value is null, an empty string will be set.
+                       $MA['###' . strtoupper($key) . '###'] = ($value==null?"":$value);
+               }
+               return $MA;
+        }
+
+        public function size(){
+               if (($this->dataArr === null)||(!is_array($this->dataArr))){
+                       return 0;
+               }
+               return count($this->dataArr);
+        }
+        public function isEmpty(){
+               if ($this->size()==0) {
+                       return DataArray::IS_EMPTY;
+               } else {
+                       return DataArray::IS_NOT_EMPTY;
+               }
+        }
+        /**
+         * Clears the internal array
+         */
+        public function flush() {
+               $this->dataArr = null;
+        }
+
+        /**
+         * If you set an valueCountLimit, this CDataArray will not store more than $limit entrys.
+         */
+        public function setValueCountLimit($limit){
+               $limit = intval($limit);
+               if ($limit > 0){
+                       $this->dataArrLimit = $limit;
+               }
+        }
+               /**
+                * @return int
+                */
+        public function getValueCountLimit() {
+               return $this->dataArrLimit;
+        }
+    }
+
+?>
\ No newline at end of file
diff --git a/api/util/class.tx_abcourses.QueryUtil.php b/api/util/class.tx_abcourses.QueryUtil.php
new file mode 100644 (file)
index 0000000..2048ff5
--- /dev/null
@@ -0,0 +1,232 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009 Stefan Precht (sprecht@gmx.de)
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+require_once('class.tx_abcourses.DataArray.php');
+
+/**
+ * Util class supporting query building and record creation.
+ * @author Stefan Precht <sprecht@gmx.de>
+ *
+ */
+class QueryUtil {
+       /**
+        * Returns an integer value for a "sorting" field. TYPO3 need unique sorting values,
+        * as records can not be changed via BE if a sorting value occures twice in one table.
+        *
+        * @param       string  $txtTable: The table name you need a sorting value for.
+        * @static
+        * @return integer      A valid sorting value for the commited table name.
+        */
+       public static function getNextSorting($txtTable) {
+               $select_table = $txtTable;
+
+           $tableInfo = new DataArray();
+           $tableInfo->init($GLOBALS['TYPO3_DB']->admin_get_fields($txtTable));
+        if (!$tableInfo->contains("sorting")) {
+                       return null;
+        }
+               $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+               'MAX(sorting) AS sortingcounter',
+                       $select_table,
+            '',
+            '',
+            '',
+            ''
+        );
+               if ($GLOBALS['TYPO3_DB']->sql_error()){
+                       //TODO add exception handling
+                       return null;
+               }
+
+               if ($special = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
+                       return intval($special['sortingcounter'])+5;
+               } else {
+                       return 1;
+               }
+       }
+
+       /**
+        * Wrapper for the enableFields Method of the TYPO3 API
+        */
+       public static function enableFields($table,$show_hidden=0){
+               return $GLOBALS['TSFE']->sys_page->enableFields($table,$show_hidden?$show_hidden:($table=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));
+       }
+
+       /**
+        * This returns an indexed array containing the uid's within an SQL Resultset.
+        *
+        * @param $res The Resultset
+        * @return array or null
+        */
+       public static function getUidArrayFromResult($res) {
+               $data = null;
+               $ret = null;
+               if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                       while ($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                               $ret[] = $data['uid'];
+                       }
+               }
+               return $ret;
+       }
+
+       /**
+        * This returns just the first result array from an resultset.
+        * @return array or null
+        */
+       public static function getFirstDataArrayFromResult($res) {
+               $data = null;
+               if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                       $data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+               }
+               return $data;
+       }
+
+       /**
+        * This returns an indexed array with associative contents. One for each result.
+        * @return array or null
+        */
+       public static function getIndexedDataArrayFromResult($res) {
+               $data = "";
+               $ret = null;
+
+               if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {
+                       while($data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
+                               $ret[] = $data;
+                       }
+               }
+
+               return $ret;
+       }
+
+       /**
+        * Creates a new record within $table an returns it id.
+        * @return int The id of the new record
+        */
+       public static function createRecord($table,$pid=null,DataArray $data=null,$beUserId=null, $pid=null){
+           $timeStamp = time();
+           $arrFields = $GLOBALS['TYPO3_DB']->admin_get_fields($table);
+
+               if (!$table) { return null; }
+               $createVars = new DataArray();
+
+               //Remove this!
+
+
+               if ($data!=null) {
+                       $createVars->init($data->getDataArray());
+               }
+
+               $newId = null;
+
+               $ctrl = $GLOBALS['TCA'][$table]['ctrl'];
+               if (is_array($ctrl)) {
+                       if ($ctrl['delete']) {
+                               $createVars->add('deleted',0);
+                       }
+                       if ($ctrl['disabled']) {
+                               $createVars->add('disabled',0);
+                       }
+               }
+
+               if (is_array($arrFields['pid'])) {
+                       if ($pid===null){
+                               $storagePidsArr = $GLOBALS['TSFE']->getStorageSiterootPids();
+                               $pid = $storagePidsArr["_STORAGE_PID"];
+                       }
+                       $createVars->add('pid',$pid);
+               }
+
+               if (is_array($arrFields['crdate'])) {
+                       $createVars->add('crdate',$timeStamp);
+               }
+
+               if (is_array($arrFields['cruser_id'])) {
+                       if ($beUserId) {
+                               $createVars->add('cruser_id',intval($beUserId));
+                       } else {
+                               $createVars->add('cruser_id',0);
+                       }
+               }
+
+               if (is_array($arrFields['tstamp'])) {
+                       $createVars->add('tstamp',$timeStamp);
+               }
+
+               if (is_array($arrFields['sorting'])) {
+                       //validate if there is the need to set a sorting value
+                       $nextSorting = QueryUtil::getNextSorting($table);
+                       if ($nextSorting != null) {
+                           $createVars->add('sorting',$nextSorting);
+                       }
+               }
+
+               $res = $GLOBALS['TYPO3_DB']->exec_INSERTquery($table,$createVars->getDataArray());
+
+               if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                       //Get the id of the new created record.
+                       $newId = $GLOBALS['TYPO3_DB']->sql_insert_id();
+               } else {
+                       if (is_null($newId)) {
+                               $GLOBALS['TYPO3_DB']->sql_error();
+                       }
+               }
+               return $newId;
+       }
+
+       /**
+        * Deletes a record. If a control field for delete can be found in the TCA, this method will mark the record as deleted.
+        * Otherwise this method destroys the record $uid in $table
+        * @return true for success
+        */
+       public static function deleteRecord($table,$uid) {
+               if (!$table || !$uid) { return null; }
+
+               $fDestroy = true;
+               $ctrl = $GLOBALS['TCA'][$table]['ctrl'];
+               if (is_array($ctrl))    {
+                       //If this table have a known delete attribute, this method will use it. Otherwise it destroy the record.
+                       if ($ctrl['delete']) {
+                               $fDestroy = false;
+                       }
+               }
+
+               if ($fDestroy) {
+                       //Use the delete flag
+            $res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,'uid='.intval($uid),Array($ctrl['delete']=>1));
+               } else {
+                       //Destroy the record
+            $res = $GLOBALS['TYPO3_DB']->exec_DELETEquery($table,'uid='.intval($uid));
+               }
+
+               if ($GLOBALS['TYPO3_DB']->sql_error()){
+                       //TODO Implement exception handling
+               }
+
+               return true;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/api/util/class.tx_abcourses.utils.php b/api/util/class.tx_abcourses.utils.php
new file mode 100644 (file)
index 0000000..e1c6b62
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Stefan Precht (stprecht@gmail.com)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+/**
+ * Different utils for the 'abcourses' extension.
+ *
+ * @author  Stefan Precht <stprecht@gmail.com>
+ */
+
+require_once(t3lib_extMgm::extPath('abcourses').'api/util/class.tx_abcourses.AbcoursesUtil.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/util/class.tx_abcourses.DataArray.php');
+require_once(t3lib_extMgm::extPath('abcourses').'api/util/class.tx_abcourses.QueryUtil.php');
+?>
\ No newline at end of file
diff --git a/de.locallang_db_flex.xml b/de.locallang_db_flex.xml
new file mode 100644 (file)
index 0000000..2684277
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallangExt>
+    <data type="array">
+        <languageKey index="de" type="array">
+            <label index="general_settings">Generelle Einstellungen</label>
+            <label index="pages">Seiten bzw SysFolder mit Seminardaten</label>
+            <label index="none">Keine</label>
+            <label index="level_1">1 Ebene</label>
+            <label index="level_2">2 Ebenen</label>
+            <label index="level_3">3 Ebenen</label>
+            <label index="special_view_settings">Spezielle Einstellungen</label>
+            <label index="template">Template zum rendern dieses PlugIn</label>
+            <label index="force_category_list">Kategorie-Übersicht zwingen nur Kategorien anzuzeigen?</label>
+            <label index="subscription_event">Termin zur direkten Anmeldung.</label>
+            <label index="force_last-minute_events">In der Ansicht Ausgewählte-Termine automatisch LastMinute Termine darstellen?</label>
+            <label index="last-minute_events_amount">Anzahl der LastMinute Termine die angezeigt werden sollen. Lassen Sie dies leer oder setzten Sie den Wer auf 0, werden alle LastMinute Termine angezeigt.</label>
+            <label index="special_view_selected_events">Manuelle gewählte Termine für die Ansicht AusgewählteTermine</label>
+            <label index="special_view_selected_categories">Kategorien die in der Ansicht Ausgewählte-Kategorien angezeigt werden sollen.</label>
+            <label index="tab_config_info">Konfig Info</label>
+            <label index="show_config_info">Konfigurationshilfe zeigen?</label>
+        </languageKey>
+    </data>
+</T3locallangExt>
diff --git a/doc/csh/images/categorie.jpg b/doc/csh/images/categorie.jpg
new file mode 100644 (file)
index 0000000..0faa75e
Binary files /dev/null and b/doc/csh/images/categorie.jpg differ
diff --git a/doc/csh/images/categorie_image.jpg b/doc/csh/images/categorie_image.jpg
new file mode 100644 (file)
index 0000000..9c63a8d
Binary files /dev/null and b/doc/csh/images/categorie_image.jpg differ
diff --git a/doc/csh/images/categorie_teaser.jpg b/doc/csh/images/categorie_teaser.jpg
new file mode 100644 (file)
index 0000000..fc06160
Binary files /dev/null and b/doc/csh/images/categorie_teaser.jpg differ
diff --git a/doc/csh/images/categorie_title.jpg b/doc/csh/images/categorie_title.jpg
new file mode 100644 (file)
index 0000000..6fa8091
Binary files /dev/null and b/doc/csh/images/categorie_title.jpg differ
diff --git a/doc/csh/images/course.jpg b/doc/csh/images/course.jpg
new file mode 100644 (file)
index 0000000..a20a2e8
Binary files /dev/null and b/doc/csh/images/course.jpg differ
diff --git a/doc/csh/images/course_categorie.jpg b/doc/csh/images/course_categorie.jpg
new file mode 100644 (file)
index 0000000..87c84aa
Binary files /dev/null and b/doc/csh/images/course_categorie.jpg differ
diff --git a/doc/csh/images/course_conditions.jpg b/doc/csh/images/course_conditions.jpg
new file mode 100644 (file)
index 0000000..4af16b8
Binary files /dev/null and b/doc/csh/images/course_conditions.jpg differ
diff --git a/doc/csh/images/course_conditionsref.jpg b/doc/csh/images/course_conditionsref.jpg
new file mode 100644 (file)
index 0000000..72356f7
Binary files /dev/null and b/doc/csh/images/course_conditionsref.jpg differ
diff --git a/doc/csh/images/course_cost.jpg b/doc/csh/images/course_cost.jpg
new file mode 100644 (file)
index 0000000..0cbf3f5
Binary files /dev/null and b/doc/csh/images/course_cost.jpg differ
diff --git a/doc/csh/images/course_days.jpg b/doc/csh/images/course_days.jpg
new file mode 100644 (file)
index 0000000..da859f0
Binary files /dev/null and b/doc/csh/images/course_days.jpg differ
diff --git a/doc/csh/images/course_description.jpg b/doc/csh/images/course_description.jpg
new file mode 100644 (file)
index 0000000..688a3a9
Binary files /dev/null and b/doc/csh/images/course_description.jpg differ
diff --git a/doc/csh/images/course_edupoints.jpg b/doc/csh/images/course_edupoints.jpg
new file mode 100644 (file)
index 0000000..dc89860
Binary files /dev/null and b/doc/csh/images/course_edupoints.jpg differ
diff --git a/doc/csh/images/course_hidden.jpg b/doc/csh/images/course_hidden.jpg
new file mode 100644 (file)
index 0000000..2fbc229
Binary files /dev/null and b/doc/csh/images/course_hidden.jpg differ
diff --git a/doc/csh/images/course_number.jpg b/doc/csh/images/course_number.jpg
new file mode 100644 (file)
index 0000000..65162b4
Binary files /dev/null and b/doc/csh/images/course_number.jpg differ
diff --git a/doc/csh/images/course_pages.jpg b/doc/csh/images/course_pages.jpg
new file mode 100644 (file)
index 0000000..a468fbc
Binary files /dev/null and b/doc/csh/images/course_pages.jpg differ
diff --git a/doc/csh/images/course_skilllevel.jpg b/doc/csh/images/course_skilllevel.jpg
new file mode 100644 (file)
index 0000000..b2592b6
Binary files /dev/null and b/doc/csh/images/course_skilllevel.jpg differ
diff --git a/doc/csh/images/course_subtitle.jpg b/doc/csh/images/course_subtitle.jpg
new file mode 100644 (file)
index 0000000..8657c79
Binary files /dev/null and b/doc/csh/images/course_subtitle.jpg differ
diff --git a/doc/csh/images/course_teaser.jpg b/doc/csh/images/course_teaser.jpg
new file mode 100644 (file)
index 0000000..625c4a0
Binary files /dev/null and b/doc/csh/images/course_teaser.jpg differ
diff --git a/doc/csh/images/course_title.jpg b/doc/csh/images/course_title.jpg
new file mode 100644 (file)
index 0000000..68952dd
Binary files /dev/null and b/doc/csh/images/course_title.jpg differ
diff --git a/doc/csh/images/course_trainer.jpg b/doc/csh/images/course_trainer.jpg
new file mode 100644 (file)
index 0000000..0f970c0
Binary files /dev/null and b/doc/csh/images/course_trainer.jpg differ
diff --git a/doc/csh/images/course_type.jpg b/doc/csh/images/course_type.jpg
new file mode 100644 (file)
index 0000000..c92b464
Binary files /dev/null and b/doc/csh/images/course_type.jpg differ
diff --git a/doc/csh/images/datepicker.jpg b/doc/csh/images/datepicker.jpg
new file mode 100644 (file)
index 0000000..06fd206
Binary files /dev/null and b/doc/csh/images/datepicker.jpg differ
diff --git a/doc/csh/images/event.jpg b/doc/csh/images/event.jpg
new file mode 100644 (file)
index 0000000..91facc6
Binary files /dev/null and b/doc/csh/images/event.jpg differ
diff --git a/doc/csh/images/event_contingent.jpg b/doc/csh/images/event_contingent.jpg
new file mode 100644 (file)
index 0000000..5b85357
Binary files /dev/null and b/doc/csh/images/event_contingent.jpg differ
diff --git a/doc/csh/images/event_discount.jpg b/doc/csh/images/event_discount.jpg
new file mode 100644 (file)
index 0000000..281c794
Binary files /dev/null and b/doc/csh/images/event_discount.jpg differ
diff --git a/doc/csh/images/event_end.jpg b/doc/csh/images/event_end.jpg
new file mode 100644 (file)
index 0000000..a94c0a9
Binary files /dev/null and b/doc/csh/images/event_end.jpg differ
diff --git a/doc/csh/images/event_location.jpg b/doc/csh/images/event_location.jpg
new file mode 100644 (file)
index 0000000..7373214
Binary files /dev/null and b/doc/csh/images/event_location.jpg differ
diff --git a/doc/csh/images/event_participants.jpg b/doc/csh/images/event_participants.jpg
new file mode 100644 (file)
index 0000000..8bcac6e
Binary files /dev/null and b/doc/csh/images/event_participants.jpg differ
diff --git a/doc/csh/images/event_start.jpg b/doc/csh/images/event_start.jpg
new file mode 100644 (file)
index 0000000..cbc4d96
Binary files /dev/null and b/doc/csh/images/event_start.jpg differ
diff --git a/doc/csh/images/event_trainer.jpg b/doc/csh/images/event_trainer.jpg
new file mode 100644 (file)
index 0000000..04fd8a3
Binary files /dev/null and b/doc/csh/images/event_trainer.jpg differ
diff --git a/doc/csh/images/events.jpg b/doc/csh/images/events.jpg
new file mode 100644 (file)
index 0000000..678072d
Binary files /dev/null and b/doc/csh/images/events.jpg differ
diff --git a/doc/csh/images/ext_icon__h.gif b/doc/csh/images/ext_icon__h.gif
new file mode 100644 (file)
index 0000000..08b735f
Binary files /dev/null and b/doc/csh/images/ext_icon__h.gif differ
diff --git a/doc/csh/images/icon_tx_abcourses_categorie.gif b/doc/csh/images/icon_tx_abcourses_categorie.gif
new file mode 100644 (file)
index 0000000..eb35f07
Binary files /dev/null and b/doc/csh/images/icon_tx_abcourses_categorie.gif differ
diff --git a/doc/csh/images/icon_tx_abcourses_course.gif b/doc/csh/images/icon_tx_abcourses_course.gif
new file mode 100644 (file)
index 0000000..33c0a88
Binary files /dev/null and b/doc/csh/images/icon_tx_abcourses_course.gif differ
diff --git a/doc/csh/images/icon_tx_abcourses_course__h.gif b/doc/csh/images/icon_tx_abcourses_course__h.gif
new file mode 100644 (file)
index 0000000..f13dca3
Binary files /dev/null and b/doc/csh/images/icon_tx_abcourses_course__h.gif differ
diff --git a/doc/csh/images/icon_tx_abcourses_event.gif b/doc/csh/images/icon_tx_abcourses_event.gif
new file mode 100644 (file)
index 0000000..16352cf
Binary files /dev/null and b/doc/csh/images/icon_tx_abcourses_event.gif differ
diff --git a/doc/csh/images/icon_tx_abcourses_event__h.gif b/doc/csh/images/icon_tx_abcourses_event__h.gif
new file mode 100644 (file)
index 0000000..14bac02
Binary files /dev/null and b/doc/csh/images/icon_tx_abcourses_event__h.gif differ
diff --git a/doc/csh/images/icon_tx_abcourses_location.gif b/doc/csh/images/icon_tx_abcourses_location.gif
new file mode 100644 (file)
index 0000000..ceff345
Binary files /dev/null and b/doc/csh/images/icon_tx_abcourses_location.gif differ
diff --git a/doc/csh/images/icon_tx_abcourses_options.gif b/doc/csh/images/icon_tx_abcourses_options.gif
new file mode 100644 (file)
index 0000000..eb01f27
Binary files /dev/null and b/doc/csh/images/icon_tx_abcourses_options.gif differ
diff --git a/doc/csh/images/icon_tx_abcourses_type.gif b/doc/csh/images/icon_tx_abcourses_type.gif
new file mode 100644 (file)
index 0000000..1c73ac8
Binary files /dev/null and b/doc/csh/images/icon_tx_abcourses_type.gif differ
diff --git a/doc/csh/images/lastminuteflag.jpg b/doc/csh/images/lastminuteflag.jpg
new file mode 100644 (file)
index 0000000..9a4a93e
Binary files /dev/null and b/doc/csh/images/lastminuteflag.jpg differ
diff --git a/doc/csh/images/location.jpg b/doc/csh/images/location.jpg
new file mode 100644 (file)
index 0000000..9e96c8b
Binary files /dev/null and b/doc/csh/images/location.jpg differ
diff --git a/doc/csh/images/regstart.jpg b/doc/csh/images/regstart.jpg
new file mode 100644 (file)
index 0000000..cb3855d
Binary files /dev/null and b/doc/csh/images/regstart.jpg differ
diff --git a/doc/csh/images/timepicker.jpg b/doc/csh/images/timepicker.jpg
new file mode 100644 (file)
index 0000000..cc63923
Binary files /dev/null and b/doc/csh/images/timepicker.jpg differ
diff --git a/doc/csh/images/type.jpg b/doc/csh/images/type.jpg
new file mode 100644 (file)
index 0000000..1c11b60
Binary files /dev/null and b/doc/csh/images/type.jpg differ
diff --git a/doc/csh/locallang_csh_categorie.php b/doc/csh/locallang_csh_categorie.php
new file mode 100644 (file)
index 0000000..51c65a2
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+$LOCAL_LANG = Array(
+                       'default' => Array(
+                                       '.description' => 'Eine Kurskategorie ermöglicht es Kurse zu kategorisieren.',
+                                       '.details' => 'Es können Kurse die ein gleiches Grundthema haben, aber unterschiedlicher Kursart sind, zusammengefasst werden.',
+                                       '.image' => 'EXT:abcourses/doc/csh/images/categorie.jpg',
+                                       '.seeAlso' => 'tx_abcourses_type:',
+                                       'title.description' => 'Vergeben Sie hier einen aussagekräftigen Namen für die Kategorie.',
+                                       'title.details' => 'Es können Kurse, die sich aufgrund einer ähnlichen Thematik gleichen, in Kategorien zusammengefasst werden.',
+                                       'title.image' => 'EXT:abcourses/doc/csh/images/categorie_title.jpg',
+                                       'teaser.description' => 'Vergeben Sie hier eine Kurzbeschreibung für die Kategorie.',
+                                       'teaser.details' => 'Eine Angabe der Kurzbeschreibung sollte auf jeden Fall erfolgen.',
+                                       'teaser.image' => 'EXT:abcourses/doc/csh/images/categorie_teaser.jpg',
+                                       'image.description' => 'Verwenden Sie ein Bild zur Darstellung der Kategorie.',
+                                       'image.details' => 'Die Einbíndung eines Bildes ist optional.',
+                                       'image.image' => 'EXT:abcourses/doc/csh/images/categorie_image.jpg',
+                                       ),
+                       'de' => Array(
+                      ),
+);
+?>
\ No newline at end of file
diff --git a/doc/csh/locallang_csh_course.php b/doc/csh/locallang_csh_course.php
new file mode 100644 (file)
index 0000000..f2f1ed1
--- /dev/null
@@ -0,0 +1,71 @@
+<?php
+$LOCAL_LANG = Array(
+                       'default' => Array(
+                                       '.description' => 'Datensätze von diesem Typen dienen der inhaltlichen Beschreibung sowie zur Festlegung von Terminübergreifenden Angaben.',
+                                       '.details' => 'Ein Kurs kann nach erfolgtem Speichern von einem Event bzw. einem Termin referenziert werden.',
+                                       '.image' => 'EXT:abcourses/doc/csh/images/course.jpg',
+                                       '.seeAlso' => 'tx_abcourses_event:',
+                                        'hidden.description' => 'Wenn Sie dies markieren, wird der Kurs nicht angezeigt.',
+                                        'hidden.details' => 'Ist der Kurs auf Grund dieser Optionen nicht sichtbar, so wird er im Frontend nicht angezeigt. Wenn Sie als Backend-Benutzer angemeldet sind, können Sie den versteckten Kurs betrachten.',
+                                       'hidden.image' => 'EXT:abcourses/doc/csh/images/icon_tx_abcourses_course__h.gif',
+                                        'number.description' => 'Eine eindeutige Kursnummer hilft, den Termin in langen Auflistungen leicht wiederzufinden.',
+                                        'number.details' => 'Wenn Sie ein Schema bei der Namensvergabe beibehalten hilft Ihnen dies beim Auffinden des Kurses in der Übersicht. Z.B. KURS_YY_MM_DD_ORT.',
+                                       'number.image' => 'EXT:abcourses/doc/csh/images/course_number.jpg',
+                                        'title.description' => 'Vergeben Sie hier einen aussagekräftigen Titel um diesen Kurs in der Übersicht transparent zu machen.',
+                                        'title.details' => 'Wenn Sie ein Schema bei der Namenvergabe verfolgen hilft dies den Kunden beim Auffinden des Kurses in der Übersicht. Eindeutige Bezeichnungen können auch wunderbar für Anfrageformulare o.ä. genutzt werden.',
+                                       'title.image' => 'EXT:abcourses/doc/csh/images/course_title.jpg',
+                                        'subtitle.description' => 'Vergeben Sie hier einen ausführlichen Untertitel.',
+                                        'subtitle.details' => 'Der Untertitel hilft dem Kunden beim Auswählen des Kurses im Frontend.',
+                                       'subtitle.image' => 'EXT:abcourses/doc/csh/images/course_subtitle.jpg',
+                                        'categorie.description' => 'Zu welcher Kategorie soll dieser Kurs gehören?',
+                                        'categorie.details' => 'Bislang kann ein Kurs nur einer einzigen Kategorie zugeordnet werden. Da die meisten Ansichtsarten dieser Erweiterung auf Kategorien aufsetzen, sollte diese Einstellung unbedingt vorgenommen werden.',
+                                       'categorie.image' => 'EXT:abcourses/doc/csh/images/course.jpg',
+                                       'categorie.seeAlso' => 'tx_abcourses_categorie:',
+                                        'type.description' => 'Wählen Sie hier eine Kursart die diesem Kurs zugeordnet werden soll.',
+                                        'type.details' => 'Was genau eine Kursart ausmacht liegt im Endeffekt an Ihnen. Gedacht ist die Kursart zur Gruppierung in beispielsweise Grundkurs, Aufbaukurs, Spezialseminar o.ä. ...',
+                                       'type.image' => 'EXT:abcourses/doc/csh/images/course.jpg',
+                                       'type.seeAlso' => 'tx_abcourses_type:',
+                                 'keywords.description' => 'Geben Sie Keywords ein, die in den Metadaten erscheinen sollen.',
+                                    'keywords.details' => 'Dies ist schlicht ein SEO Feature. Die Keywords werden sonst nirgends ausgespielt. Es ist Konfiguration notwendig, damit die Keywords auch ausgerendert werden.',
+                                        'days.description' => 'Geben Sie hier die Dauer des Kurses an.',
+                                        'days.details' => 'Die Angabe der Dauer sollte in Tagen erfolgen.',
+                                       'days.image' => 'EXT:abcourses/doc/csh/images/course_days.jpg',
+                                       'teaser.description' => 'Vergeben Sie hier eine Kurzbeschreibung für den Kurs.',
+                                       'teaser.details' => 'Eine Angabe der Kurzbeschreibung sollte auf jeden Fall erfolgen.',
+                                       'teaser.image' => 'EXT:abcourses/doc/csh/images/course_teaser.jpg',
+                                       'description.description' => 'Vergeben Sie hier eine ausführliche Beschreibung für den Kurs.',
+                                       'description.details' => 'Eine Angabe der ausführlichen Beschreibung sollte auf jeden Fall erfolgen.',
+                                       'description.image' => 'EXT:abcourses/doc/csh/images/course_description.jpg',
+                                       'pages.description' => 'Hier können Sie weitere Inhalte einbinden.',
+                                       'pages.details' => 'Die Verknüpfung erfolgt in Form eines Verweises auf ein Seiten-Element. Nutzen Sie hierfür den Objekt-Browser.',
+                                       'pages.image' => 'EXT:abcourses/doc/csh/images/course_pages.jpg',
+                                       'trainers.description' => 'Hier können Sie Dozenten einbinden, die diesen Kurs durchführen können.',
+                                       'trainers.details' => 'Ein Kurs kann mehrere Dozenten referenzieren.',
+                                       'trainers.image' => 'EXT:abcourses/doc/csh/images/course_trainer.jpg',
+                                       'trainers.seeAlso' => 'tt_address:',
+                                       'cost.description' => 'Geben Sie hier die Kosten (den Basispreis) für den Kurs an.',
+                                       'cost.details' => 'Die Kosten beschreiben den Betrag, den der Teilnehmer für den gesamten Kurs zahlen muss. Der Betrag kann ggf. über die Ermässigung eines Termins reduziert werden.',
+                                       'cost.syntax' => 'Geben Sie hier eine positive Fliesskommazahl mit 2 Nachkommastellen ein.',
+                                       'cost.image' => 'EXT:abcourses/doc/csh/images/course_cost.jpg',
+                                       'cost.seeAlso' => 'tx_abcourses_event:discount',
+                                       'skilllevel.description' => 'Vergeben Sie hier einen Skill-Level.',
+                                       'skilllevel.details' => 'Hier können Sie Ihren Kursteilnehmern mit Hilfe einer kleinen Säulengrafik kenntlich machen, wie hoch die Anforderungen an den Teilnehmer für diesen Kurs sind. Der Eintrag "Keine Angabe" unterdrückt eine Ausgabe der Grafik im Frontend.',
+                                       'skilllevel.image' => 'EXT:abcourses/doc/csh/images/course_skilllevel.jpg',
+                                       'skilllevel.seeAlso' => 'tx_abcourses_event:skilllevel',
+                                       'edupoints.description' => 'Vergeben Sie hier Fortbildungspunkte.',
+                                       'edupoints.details' => 'Hier können Sie Ihren Kursteilnehmern Punkte für ein evtl. Punktekonto zuweisen.',
+                                       'edupoints.image' => 'EXT:abcourses/doc/csh/images/course_edupoints.jpg',
+                                       'edupoints.seeAlso' => 'tx_abcourses_event:edupoints',
+                                       'conditions.description' => 'Geben Sie hier die Vorraussetzungen für den Kurs an.',
+                                       'conditions.details' => 'Dieses Feld dient der Freitexteingabe. Angaben in diesem Feld sollten knapp gehalten werden.',
+                                       'conditions.image' => 'EXT:abcourses/doc/csh/images/course_conditions.jpg',
+                                       'conditions.seeAlso' => 'tx_abcourses_event:conditionsref',
+                                       'conditionsref.description' => 'Referenzen auf Kurse die zuvor besucht werden sollten.',
+                                       'conditionsref.details' => 'Es können an dieser Stelle mehrere Kurse ausgewählt werden. Tragen Sie hier Kurse ein, deren Inhalte als Wissensgrundlage für diesen Kurs gelten.',
+                                       'conditionsref.image' => 'EXT:abcourses/doc/csh/images/course_conditionsref.jpg',
+                                       'conditionsref.seeAlso' => 'tx_abcourses_event:conditions',
+                                       ),
+                       'de' => Array(
+),
+                       );
+?>
\ No newline at end of file
diff --git a/doc/csh/locallang_csh_event.php b/doc/csh/locallang_csh_event.php
new file mode 100644 (file)
index 0000000..b3c102b
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+$LOCAL_LANG = Array(
+                       'default' => Array(
+                                       '.description' => 'Ein Termin beschreibt in dieser Seminardatenbank immer den Zeitpunkt wann ein Kurs stattfindet.',
+                                       '.details' => 'Hier sind anzugeben: Der Ort der Durchführung, welcher Kurs und weitere Einzelheiten. U.a auch welcher Trainer diesen Kurs durchführt.',
+                                       '.syntax' => 'Syntax',
+                                       '.image' => 'EXT:abcourses/doc/csh/images/events.jpg',
+                                        'hidden.description' => 'Wenn Sie dies markieren, wird der Termin nicht angezeigt.',
+                                        'hidden.details' => 'Die Optionen \'verstecken\', \'Start\' und \'Stop\' dienen der Zugriffsbeschränkung auf den Termin und sind daher verwandt. Ist der Termin auf Grund einer dieser Optionen nicht sichtbar, so wird er im Frontend nicht angezeigt. Wenn Sie als Backend-Benutzer angemeldet sind, können Sie den versteckten Termin betrachten. Mit \'Start\' und \'Stop\' ist die Sichtbarkeit terminierbar.',
+                                       'hidden.image' => 'EXT:abcourses/doc/csh/images/icon_tx_abcourses_event__h.gif',
+                                        'event.description' => 'Eine eindeutige Terminbezeichnung hilft, den Termin in langen Auflistungen leicht wiederzufinden.',
+                                        'event.details' => 'Wenn Sie ein Schema bei der Namensvergabe beibehalten hilft Ihnen dies beim Auffinden des Termins in der Übersicht. Z.B. KURS_YY_MM_DD_ORT.',
+                                       'event.image' => 'EXT:abcourses/doc/csh/images/event.jpg',
+                                        'course.description' => 'Wählen Sie hier den Kurs, zu dem dieser Termin gehören soll.',
+                                        'course.details' => 'Es kann an dieser Stelle nur "EIN" Kurs über den Objekt-Browser ausgewählt werden. Finden zur gleichen Zeit weitere Kurse statt, muss hier für jeden Kurs ein neuer Termin erstellt werden.',
+                                       'course.image' => 'EXT:abcourses/doc/csh/images/course.jpg',
+                                       'course.seeAlso' => 'tx_abcourses_event:event',
+                                        'location.description' => 'Wählen Sie hier einen Schulungsort an dem dieser Termin durchgeführt werden soll.',
+                                        'location.details' => 'Es kann an dieser Stelle nur "EIN" Schulungsort über den Objekt-Browser aus gewählt werden. Finden zur gleichen Zeit an verschiedenen Schulungsorten weitere Kurse statt, muss hier für jeden Kurs/Schulungsort ein neuer Termin erstellt werden.',
+                                       'location.image' => 'EXT:abcourses/doc/csh/images/event_location.jpg',
+                                       'location.seeAlso' => 'tx_abcourses_event:event',
+                                        'lastminute.description' => 'Hier kann der Termin besonders gekenzeichnet werden.',
+                                        'lastminute.details' => 'Die Auswirkungen dieser Kennzeichnung können Sie in der Extension-Konfiguration anpassen. Auch können bestimmte Ansichtsarten der Extension automatisch Termine mit dieser Kennzeichnung ziehen.',
+                                       'lastminute.image' => 'EXT:abcourses/doc/csh/images/lastminuteflag.jpg',
+                                        'coursestart.description' => 'Definieren Sie hier den ersten Tag des Termins.',
+                                        'coursestart.details' => 'Sie können zusätzlich über die Optionspalette die Startzeit bzw. Endzeit des ersten Tages festlegen.',
+                                       'coursestart.image' => 'EXT:abcourses/doc/csh/images/event_start.jpg,EXT:abcourses/doc/csh/images/datepicker.jpg',
+                                       'coursestart.seeAlso' => 'tx_abcourses_event:courseend',
+                                        'coursestart.syntax' => 'Wenn Sie den Mauscursor in ein Datumsfeld stellen, bekommen Sie einen komfortablen Auswahldialog gezeigt, der Sie bei der Eingabe unterstützt.',
+                                        'courseend.description' => 'Definieren Sie hier den letzten Tag des Termins.',
+                                        'courseend.details' => 'Sie können zusätzlich über die Optionspalette die Startzeit bzw. Endzeit des letzten Tages festlegen.',
+                                       'courseend.syntax' => 'Wenn Sie den Mauscursor in ein Zeitfeld stellen, bekommen Sie einen komfortablen Auswahldialog gezeigt, der Sie bei der Eingabe unterstützt.',
+                                       'courseend.image' => 'EXT:abcourses/doc/csh/images/event_end.jpg,EXT:abcourses/doc/csh/images/timepicker.jpg',
+                                       'courseend.seeAlso' => 'tx_abcourses_event:coursestart',
+                                        'regstart.description' => 'Nur innerhalb des angegebenen Zeitraumes ist eine Anmeldung im Frontend möglich.',
+                                        'regstart.details' => 'Aktivieren Sie keines der Felder ist keine Anmeldung möglich, der Termin aber trotzdem sichtbar.',
+                                       'regstart.image' => 'EXT:abcourses/doc/csh/images/regstart.jpg',
+                                        'trainer.description' => 'Wählen Sie hier einen Trainer der diesen Termin durchführen wird.',
+                                        'trainer.details' => 'Es kann an dieser Stelle nur "EIN" Trainer über den Objekt-Browser aus gewählt werden. Finden zur gleichen Zeit weitere Kurse mit unterschiedlichen Trainern statt, muss hier für jeden Kurs/Trainer ein neuer Termin erstellt werden.',                                       'trainer.image' => 'EXT:abcourses/doc/csh/images/event_trainer.jpg',
+                                       'trainer.image' => 'EXT:abcourses/doc/csh/images/event_trainer.jpg',
+                                        'participants.description' => 'Dieses Feld hat aktuell noch KEINE Verwendung!',
+                                        'participants.details' => 'Dieses Feld hat aktuell noch KEINE Verwendung!',
+                                       'participants.image' => 'EXT:abcourses/doc/csh/images/event_participants.jpg',
+                                        'contingent.description' => 'Wählen Sie hier eine Anzahl möglicher Teilnehmer für diesen Termin.',
+                                        'contingent.details' => 'Ist die Kontingentverwaltung dieser Seminardatenbank angeschaltet, sind weitere Buchungen nur möglich, wenn noch ein Restkontingent verfügbar ist.',                                       
+                                       'contingent.image' => 'EXT:abcourses/doc/csh/images/event_contingent.jpg',
+                                        'discount.description' => 'Hier können Sie eine Abweichung des Preises zum Basispreis eingeben.',
+                                        'discount.details' => 'Der Basispreis wird im Kurs festgelegt. Die Abweichung kann positiv sowie negativ sein.',
+                                       'discount.syntax' => 'Als Abweichung notieren Sie bitte eine Fließkommazahl mit 2 Nachkommastellen.',
+                                       'discount.image' => 'EXT:abcourses/doc/csh/images/event_discount.jpg',
+                                        'accommodation.description' => 'Legen Sie hier fest, welche Unterbringungsmöglichkeiten reserivert werden können.',
+                                        'accommodation.details' => 'In der Seminardatenbank können Sie Unterbringungen eintragen, wie z.B. ein Hotel. Zu einem Hotel wiederum können Sie Buchungsmöglichkeiten erfassen, die eine Bezeichnung sowie eine Kosteninfo erhalten. Diese können Sie dann hier mit einem Termin verknüpfen. Ist ihr Buchungsformular entsprechend eingerichtet, sind diese Buchungsoptionen dort dann verfügbar.',
+                                       ),
+                       'de' => Array(
+                                       '.description' => 'Ein Termin beschreibt in dieser Seminardatenbank immer den Zeitpunkt wann ein Kurs stattfindet.',
+                                       '.details' => 'Hier sind anzugeben: Der Ort der Durchführung, welcher Kurs und weitere Einzelheiten. U.a auch welcher Trainer diesen Kurs durchführt.',
+                                       '.syntax' => 'Syntax',
+                                       '.image' => 'EXT:abcourses/doc/csh/images/events.jpg',
+                                        'hidden.description' => 'Wenn Sie dies markieren, wird der Termin nicht angezeigt.',
+                                        'hidden.details' => 'Die Optionen \'verstecken\', \'Start\' und \'Stop\' dienen der Zugriffsbeschränkung auf den Termin und sind daher verwandt. Ist der Termin auf Grund einer dieser Optionen nicht sichtbar, so wird er im Frontend nicht angezeigt. Wenn Sie als Backend-Benutzer angemeldet sind, können Sie den versteckten Termin betrachten. Mit \'Start\' und \'Stop\' ist die Sichtbarkeit terminierbar.',
+                                       'hidden.image' => 'EXT:abcourses/doc/csh/images/icon_tx_abcourses_event__h.gif',
+                                        'event.description' => 'Eine eindeutige Terminbezeichnung hilft, den Termin in langen Auflistungen leicht wiederzufinden.',
+                                        'event.details' => 'Wenn Sie ein Schema bei der Namensvergabe beibehalten hilft Ihnen dies beim Auffinden des Termins in der Übersicht. Z.B. KURS_YY_MM_DD_ORT.',
+                                       'event.image' => 'EXT:abcourses/doc/csh/images/event.jpg',
+                                        'course.description' => 'Wählen Sie hier den Kurs, zu dem dieser Termin gehören soll.',
+                                        'course.details' => 'Es kann an dieser Stelle nur "EIN" Kurs über den Objekt-Browser ausgewählt werden. Finden zur gleichen Zeit weitere Kurse statt, muss hier für jeden Kurs ein neuer Termin erstellt werden.',
+                                       'course.image' => 'EXT:abcourses/doc/csh/images/course.jpg',
+                                       'course.seeAlso' => 'tx_abcourses_event:event',
+                                        'location.description' => 'Wählen Sie hier einen Schulungsort an dem dieser Termin durchgeführt werden soll.',
+                                        'location.details' => 'Es kann an dieser Stelle nur "EIN" Schulungsort über den Objekt-Browser aus gewählt werden. Finden zur gleichen Zeit an verschiedenen Schulungsorten weitere Kurse statt, muss hier für jeden Kurs/Schulungsort ein neuer Termin erstellt werden.',
+                                       'location.image' => 'EXT:abcourses/doc/csh/images/event_location.jpg',
+                                       'location.seeAlso' => 'tx_abcourses_event:event',
+                                        'lastminute.description' => 'Hier kann der Termin besonders gekenzeichnet werden.',
+                                        'lastminute.details' => 'Die Auswirkungen dieser Kennzeichnung können Sie in der Extension-Konfiguration anpassen. Auch können bestimmte Ansichtsarten der Extension automatisch Termine mit dieser Kennzeichnung ziehen.',
+                                       'lastminute.image' => 'EXT:abcourses/doc/csh/images/lastminuteflag.jpg',
+                                        'coursestart.description' => 'Definieren Sie hier den ersten Tag des Termins.',
+                                        'coursestart.details' => 'Sie können zusätzlich über die Optionspalette die Startzeit bzw. Endzeit des ersten Tages festlegen.',
+                                       'coursestart.image' => 'EXT:abcourses/doc/csh/images/event_start.jpg,EXT:abcourses/doc/csh/images/datepicker.jpg',
+                                       'coursestart.seeAlso' => 'tx_abcourses_event:courseend',
+                                        'coursestart.syntax' => 'Wenn Sie den Mauscursor in ein Datumsfeld stellen, bekommen Sie einen komfortablen Auswahldialog gezeigt, der Sie bei der Eingabe unterstützt.',
+                                        'courseend.description' => 'Definieren Sie hier den letzten Tag des Termins.',
+                                        'courseend.details' => 'Sie können zusätzlich über die Optionspalette die Startzeit bzw. Endzeit des letzten Tages festlegen.',
+                                       'courseend.syntax' => 'Wenn Sie den Mauscursor in ein Zeitfeld stellen, bekommen Sie einen komfortablen Auswahldialog gezeigt, der Sie bei der Eingabe unterstützt.',
+                                       'courseend.image' => 'EXT:abcourses/doc/csh/images/event_end.jpg,EXT:abcourses/doc/csh/images/timepicker.jpg',
+                                       'courseend.seeAlso' => 'tx_abcourses_event:coursestart',
+                                        'regstart.description' => 'Nur innerhalb des angegebenen Zeitraumes ist eine Anmeldung im Frontend möglich.',
+                                        'regstart.details' => 'Aktivieren Sie keines der Felder ist keine Anmeldung möglich, der Termin aber trotzdem sichtbar.',
+                                       'regstart.image' => 'EXT:abcourses/doc/csh/images/regstart.jpg',
+                                        'trainer.description' => 'Wählen Sie hier einen Trainer der diesen Termin durchführen wird.',
+                                        'trainer.details' => 'Es kann an dieser Stelle nur "EIN" Trainer über den Objekt-Browser aus gewählt werden. Finden zur gleichen Zeit weitere Kurse mit unterschiedlichen Trainern statt, muss hier für jeden Kurs/Trainer ein neuer Termin erstellt werden.',                                       'trainer.image' => 'EXT:abcourses/doc/csh/images/event_trainer.jpg',
+                                       'trainer.image' => 'EXT:abcourses/doc/csh/images/event_trainer.jpg',
+                                        'participants.description' => 'Dieses Feld hat aktuell noch KEINE Verwendung!',
+                                        'participants.details' => 'Dieses Feld hat aktuell noch KEINE Verwendung!',
+                                       'participants.image' => 'EXT:abcourses/doc/csh/images/event_participants.jpg',
+                                        'contingent.description' => 'Wählen Sie hier eine Anzahl möglicher Teilnehmer für diesen Termin.',
+                                        'contingent.details' => 'Ist die Kontingentverwaltung dieser Seminardatenbank angeschaltet, sind weitere Buchungen nur möglich, wenn noch ein Restkontingent verfügbar ist.',                                       
+                                       'contingent.image' => 'EXT:abcourses/doc/csh/images/event_contingent.jpg',
+                                        'discount.description' => 'Hier können Sie eine Abweichung des Preises zum Basispreis eingeben.',
+                                        'discount.details' => 'Der Basispreis wird im Kurs festgelegt. Die Abweichung kann positiv sowie negativ sein.',
+                                       'discount.syntax' => 'Als Abweichung notieren Sie bitte eine Fließkommazahl mit 2 Nachkommastellen.',
+                                       'discount.image' => 'EXT:abcourses/doc/csh/images/event_discount.jpg',
+                                        'arrangement.description' => 'Legen Sie hier fest, welche Unterbringungsmöglichkeiten reserivert werden können.',
+                                        'arrangement.details' => 'In der Seminardatenbank können Sie Unterbringungen eintragen, wie z.B. ein Hotel. Zu einem Hotel wiederum können Sie Buchungsmöglichkeiten erfassen, die eine Bezeichnung sowie eine Kosteninfo erhalten. Diese können Sie dann hier mit einem Termin verknüpfen. Ist ihr Buchungsformular entsprechend eingerichtet, sind diese Buchungsoptionen dort dann verfügbar.',
+                                       ),
+                       );
+?>
\ No newline at end of file
diff --git a/doc/csh/locallang_csh_location.php b/doc/csh/locallang_csh_location.php
new file mode 100644 (file)
index 0000000..6a33c6d
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+$LOCAL_LANG = Array(
+                       'default' => Array(
+                                       '.description' => 'Ein Schulungsort beinhaltet relevante Daten zum Durchführungsort.',
+                                       '.details' => 'Unter anderem die Anschrift oder auch Kommunikationsdaten wie Telefon oder Ansprechpartner',
+                                       '.image' => 'EXT:abcourses/doc/csh/images/location.jpg',
+                                       '.seeAlso' => 'tx_abcourses_events:description',
+                                       ),
+                       'de' => Array(
+                                       '.description' => 'Ein Schulungsort beinhaltet relevante Daten zum Durchführungsort.',
+                                       '.details' => 'Unter anderem die Anschrift oder auch Kommunikationsdaten wie Telefon oder Ansprechpartner',
+                                       '.image' => 'EXT:abcourses/doc/csh/images/location.jpg',
+                                       '.seeAlso' => 'tx_abcourses_events:description',
+                                       ),
+                       );
+?>
\ No newline at end of file
diff --git a/doc/csh/locallang_csh_type.php b/doc/csh/locallang_csh_type.php
new file mode 100644 (file)
index 0000000..ac6ccae
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+$LOCAL_LANG = Array(
+                       'default' => Array(
+                                       '.description' => 'Eine Kursart beschreibt den Aufbau eines Kurses.',
+                                       '.details' => 'Beispiel: Grundkurs, Aufbaukurs, Workshop oder Inhouseschulung oder Coaching.',
+                                       '.image' => 'EXT:abcourses/doc/csh/images/type.jpg',
+                                       'typename.description' => 'Vergeben Sie einen Namen der den Aufbau eines Kurses beschreibt.',
+                                       'typename.details' => 'Beispiel: Grundkurs, Aufbaukurs, Workshop oder Inhouseschulung oder Coaching.',
+                                       'typename.image' => 'EXT:abcourses/doc/csh/images/type.jpg',
+                                       ),
+                       'de' => Array(
+                                       ),
+                       );
+?>
\ No newline at end of file
diff --git a/doc/manual.sxw b/doc/manual.sxw
new file mode 100644 (file)
index 0000000..b67cd0e
Binary files /dev/null and b/doc/manual.sxw differ
diff --git a/ext_autoload.php b/ext_autoload.php
new file mode 100644 (file)
index 0000000..998d66d
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+    $extensionPath = t3lib_extMgm::extPath('abcourses');
+    $autoloading = array(
+        'tx_abcourses_metadata' => $extensionPath . 'hooks/class.tx_abcourses_metadata.php',
+    );
+    return $autoloading;
+?>
\ No newline at end of file
diff --git a/ext_emconf.php b/ext_emconf.php
new file mode 100644 (file)
index 0000000..fa5d9bc
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+
+/***************************************************************
+ * Extension Manager/Repository config file for ext "abcourses".
+ *
+ * Auto generated 04-03-2013 10:33
+ *
+ * Manual updates:
+ * Only the data in the array - everything else is removed by next
+ * writing. "version" and "dependencies" must not be touched!
+ ***************************************************************/
+
+$EM_CONF[$_EXTKEY] = array (
+       'title' => 'Seminar management',
+       'description' => 'An extension for dealing with seminars and appointments with extensive opportunities for advertising your appointments and for subscribing to them. Subscriptions can be stored as tt_address. Offers different hooks.',
+       'category' => 'plugin',
+       'shy' => 0,
+       'version' => '1.7.0',
+       'dependencies' => 'cms,tt_address',
+       'conflicts' => '',
+       'priority' => '',
+       'loadOrder' => '',
+       'module' => '',
+       'state' => 'beta',
+       'uploadfolder' => 1,
+       'createDirs' => 'uploads/tx_abcourses/rte/',
+       'modify_tables' => 'tt_address, tt_content',
+       'clearcacheonload' => 1,
+       'lockType' => '',
+       'author' => 'Andreas Behrens and Stefan Precht',
+       'author_email' => 'Andreas Behrens <behrens@b-networks.de>, Stefan Precht <info@stefanprecht.de>',
+       'author_company' => '@b-networks, Precht IT Beratung & Softwareentwicklung, SYMPLASSON GmbH, Tallence GmbH',
+       'CGLcompliance' => '',
+       'CGLcompliance_note' => '',
+       'constraints' => 
+       array (
+               'depends' => 
+               array (
+            'php' => '5.3.7-5.5.99',
+            'typo3' => '6.2.4',
+                       'tt_address' => '2.3.5',
+               ),
+               'conflicts' => 
+               array (
+               ),
+               'suggests' => 
+               array (
+               ),
+       ),
+       '_md5_values_when_last_written' => 'a:121:{s:9:"ChangeLog";s:4:"7fce";s:10:"README.txt";s:4:"9fa9";s:8:"ToDo.txt";s:4:"1418";s:24:"de.locallang_db_flex.xml";s:4:"1aa8";s:12:"ext_icon.gif";s:4:"32da";s:17:"ext_localconf.php";s:4:"817a";s:15:"ext_php_api.dat";s:4:"cff4";s:14:"ext_tables.php";s:4:"2968";s:14:"ext_tables.sql";s:4:"29ab";s:28:"ext_typoscript_editorcfg.txt";s:4:"e660";s:24:"ext_typoscript_setup.txt";s:4:"7da1";s:24:"fi.locallang_db_flex.xml";s:4:"5967";s:15:"flexform_ds.xml";s:4:"3c16";s:33:"icon_tx_abcourses_arrangement.gif";s:4:"6da0";s:36:"icon_tx_abcourses_arrangement__h.gif";s:4:"e87e";s:31:"icon_tx_abcourses_categorie.gif";s:4:"be7f";s:28:"icon_tx_abcourses_course.gif";s:4:"583e";s:31:"icon_tx_abcourses_course__h.gif";s:4:"3a8d";s:27:"icon_tx_abcourses_event.gif";s:4:"e607";s:30:"icon_tx_abcourses_event__h.gif";s:4:"ee50";s:27:"icon_tx_abcourses_hotel.gif";s:4:"0e9b";s:30:"icon_tx_abcourses_hotel__h.gif";s:4:"b30e";s:30:"icon_tx_abcourses_location.gif";s:4:"2cc9";s:29:"icon_tx_abcourses_options.gif";s:4:"475a";s:34:"icon_tx_abcourses_skillLevel_0.gif";s:4:"bb44";s:34:"icon_tx_abcourses_skillLevel_1.gif";s:4:"b2f9";s:34:"icon_tx_abcourses_skillLevel_2.gif";s:4:"c601";s:34:"icon_tx_abcourses_skillLevel_3.gif";s:4:"079e";s:34:"icon_tx_abcourses_skillLevel_4.gif";s:4:"689f";s:38:"icon_tx_abcourses_skillLevel_blind.gif";s:4:"bb44";s:34:"icon_tx_abcourses_teachingaids.gif";s:4:"28a5";s:26:"icon_tx_abcourses_type.gif";s:4:"1be4";s:13:"locallang.xml";s:4:"b14f";s:16:"locallang_db.xml";s:4:"df73";s:21:"locallang_db_flex.xml";s:4:"319c";s:7:"tca.php";s:4:"cab6";s:14:"doc/manual.sxw";s:4:"340a";s:35:"doc/csh/locallang_csh_categorie.php";s:4:"6e50";s:32:"doc/csh/locallang_csh_course.php";s:4:"29a3";s:31:"doc/csh/locallang_csh_event.php";s:4:"f1ca";s:34:"doc/csh/locallang_csh_location.php";s:4:"fceb";s:30:"doc/csh/locallang_csh_type.php";s:4:"1eb4";s:28:"doc/csh/images/categorie.jpg";s:4:"86e7";s:34:"doc/csh/images/categorie_image.jpg";s:4:"7bea";s:35:"doc/csh/images/categorie_teaser.jpg";s:4:"d7b6";s:34:"doc/csh/images/categorie_title.jpg";s:4:"1583";s:25:"doc/csh/images/course.jpg";s:4:"3290";s:35:"doc/csh/images/course_categorie.jpg";s:4:"9343";s:36:"doc/csh/images/course_conditions.jpg";s:4:"7aaa";s:39:"doc/csh/images/course_conditionsref.jpg";s:4:"e348";s:30:"doc/csh/images/course_cost.jpg";s:4:"ff39";s:30:"doc/csh/images/course_days.jpg";s:4:"428b";s:37:"doc/csh/images/course_description.jpg";s:4:"baf7";s:35:"doc/csh/images/course_edupoints.jpg";s:4:"7265";s:32:"doc/csh/images/course_hidden.jpg";s:4:"d532";s:32:"doc/csh/images/course_number.jpg";s:4:"f64e";s:31:"doc/csh/images/course_pages.jpg";s:4:"e6d4";s:36:"doc/csh/images/course_skilllevel.jpg";s:4:"f14b";s:34:"doc/csh/images/course_subtitle.jpg";s:4:"8611";s:32:"doc/csh/images/course_teaser.jpg";s:4:"b82d";s:31:"doc/csh/images/course_title.jpg";s:4:"af7d";s:33:"doc/csh/images/course_trainer.jpg";s:4:"20d0";s:30:"doc/csh/images/course_type.jpg";s:4:"7344";s:29:"doc/csh/images/datepicker.jpg";s:4:"7b43";s:24:"doc/csh/images/event.jpg";s:4:"1a24";s:35:"doc/csh/images/event_contingent.jpg";s:4:"f83c";s:33:"doc/csh/images/event_discount.jpg";s:4:"0451";s:28:"doc/csh/images/event_end.jpg";s:4:"d8f9";s:33:"doc/csh/images/event_location.jpg";s:4:"571e";s:37:"doc/csh/images/event_participants.jpg";s:4:"e301";s:30:"doc/csh/images/event_start.jpg";s:4:"de05";s:32:"doc/csh/images/event_trainer.jpg";s:4:"421d";s:25:"doc/csh/images/events.jpg";s:4:"c9ae";s:30:"doc/csh/images/ext_icon__h.gif";s:4:"18ec";s:46:"doc/csh/images/icon_tx_abcourses_categorie.gif";s:4:"ae31";s:43:"doc/csh/images/icon_tx_abcourses_course.gif";s:4:"583e";s:46:"doc/csh/images/icon_tx_abcourses_course__h.gif";s:4:"3a8d";s:42:"doc/csh/images/icon_tx_abcourses_event.gif";s:4:"e607";s:45:"doc/csh/images/icon_tx_abcourses_event__h.gif";s:4:"ee50";s:45:"doc/csh/images/icon_tx_abcourses_location.gif";s:4:"67e9";s:44:"doc/csh/images/icon_tx_abcourses_options.gif";s:4:"475a";s:41:"doc/csh/images/icon_tx_abcourses_type.gif";s:4:"e58c";s:33:"doc/csh/images/lastminuteflag.jpg";s:4:"157e";s:27:"doc/csh/images/location.jpg";s:4:"348b";s:27:"doc/csh/images/regstart.jpg";s:4:"af4e";s:29:"doc/csh/images/timepicker.jpg";s:4:"c4db";s:23:"doc/csh/images/type.jpg";s:4:"8152";s:18:"images/dl_icon.gif";s:4:"dd5b";s:19:"images/pdf_icon.gif";s:4:"fae1";s:15:"images/star.psd";s:4:"d94c";s:17:"images/star_0.gif";s:4:"b870";s:17:"images/star_1.gif";s:4:"b6f9";s:17:"images/star_2.gif";s:4:"d8f4";s:17:"images/star_3.gif";s:4:"0181";s:17:"images/star_4.gif";s:4:"487e";s:17:"images/star_5.gif";s:4:"eb42";s:27:"pi1/abcourses_template.tmpl";s:4:"74af";s:14:"pi1/ce_wiz.gif";s:4:"4f3d";s:30:"pi1/class.tx_abcourses_pi1.php";s:4:"d913";s:38:"pi1/class.tx_abcourses_pi1_wizicon.php";s:4:"b6c1";s:13:"pi1/clear.gif";s:4:"cc11";s:17:"pi1/locallang.xml";s:4:"bf52";s:48:"pi1/classes/class.tx_abcourses.AbcoursesBase.php";s:4:"cbd2";s:48:"pi1/classes/class.tx_abcourses.AbcoursesUtil.php";s:4:"3ccf";s:46:"pi1/classes/class.tx_abcourses.Arrangement.php";s:4:"a6c6";s:43:"pi1/classes/class.tx_abcourses.Category.php";s:4:"f664";s:44:"pi1/classes/class.tx_abcourses.Categorys.php";s:4:"495a";s:41:"pi1/classes/class.tx_abcourses.Course.php";s:4:"ed06";s:44:"pi1/classes/class.tx_abcourses.DataArray.php";s:4:"ffe8";s:40:"pi1/classes/class.tx_abcourses.Event.php";s:4:"5c1c";s:40:"pi1/classes/class.tx_abcourses.Hotel.php";s:4:"4f69";s:41:"pi1/classes/class.tx_abcourses.Loader.php";s:4:"293c";s:43:"pi1/classes/class.tx_abcourses.Location.php";s:4:"a741";s:44:"pi1/classes/class.tx_abcourses.Locations.php";s:4:"d0e6";s:46:"pi1/classes/class.tx_abcourses.Participant.php";s:4:"64d6";s:41:"pi1/classes/class.tx_abcourses.Person.php";s:4:"92d7";s:44:"pi1/classes/class.tx_abcourses.QueryUtil.php";s:4:"9eb8";s:46:"pi1/classes/class.tx_abcourses.Teachingaid.php";s:4:"fc95";s:42:"pi1/classes/class.tx_abcourses.Trainer.php";s:4:"97d8";s:42:"pi1/classes/class.tx_abcourses.classes.php";s:4:"daca";s:38:"pi1/classes/class.tx_abcourses.dal.php";s:4:"c47b";}',
+       'suggests' => 
+       array (
+       ),
+);
+
+?>
\ No newline at end of file
diff --git a/ext_icon.gif b/ext_icon.gif
new file mode 100644 (file)
index 0000000..10e98f4
Binary files /dev/null and b/ext_icon.gif differ
diff --git a/ext_localconf.php b/ext_localconf.php
new file mode 100644 (file)
index 0000000..9e87d3c
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+
+t3lib_extMgm::addUserTSConfig('
+       options.saveDocNew {
+               tx_abcourses_course=1
+               tx_abcourses_type=1
+               tx_abcourses_event=1
+               tx_abcourses_location=1
+               tx_abcourses_categorie=1
+       }
+');
+
+t3lib_extMgm::addUserTSConfig('
+       kj_calendar.lang = de
+');
+
+t3lib_extMgm::addUserTSConfig('
+       kj_calendar.style = aqua
+');
+
+t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.tx_abcourses_pi1.php','_pi1','list_type',0);
+
+t3lib_extMgm::addTypoScript($_EXTKEY,'setup','
+       tt_content.shortcut.20.0.conf.tx_abcourses_course = < plugin.'.t3lib_extMgm::getCN($_EXTKEY).'_pi1
+       tt_content.shortcut.20.0.conf.tx_abcourses_course.CMD = CATOVERVIEW
+',43);
+
+#$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess'][] = 'EXT:abcourses/hooks/class.tx_abcourses_hooks.php:tx_abcourses_hooks->renderPostProcessHook';
+?>
\ No newline at end of file
diff --git a/ext_php_api.dat b/ext_php_api.dat
new file mode 100644 (file)
index 0000000..5ccf34d
--- /dev/null
@@ -0,0 +1,371 @@
+a:2:{s:4:"meta";a:3:{s:5:"title";s:9:"abcourses";s:5:"descr";s:56:"Please consider that this API file may be out of date...";s:7:"options";a:2:{s:10:"usageCount";N;s:19:"includeCodeAbstract";N;}}s:5:"files";a:16:{s:14:"MD5_726f04114b";a:4:{s:8:"filename";s:30:"pi1/class.tx_abcourses_pi1.php";s:8:"filesize";i:119720;s:6:"header";a:5:{s:4:"text";s:50:"
+
+Plugin 'Courses' for the 'abcourses' extension.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:1:{i:0;s:78:"@author       Andreas Behrens; Stefan Precht <behrens@b-networks.de; sprecht@gmx.de>";}s:11:"other_index";a:1:{s:7:"@author";a:1:{i:0;s:70:"Andreas Behrens; Stefan Precht <behrens@b-networks.de; sprecht@gmx.de>";}}}s:3:"DAT";a:39:{i:1;a:7:{s:6:"header";s:45:"class tx_abcourses_pi1 extends tslib_pibase {";s:5:"class";i:1;s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:571;s:13:"content_lines";i:17;s:6:"atLine";i:36;}i:3;a:7:{s:6:"header";s:31:"function main($content,$conf)    {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:109:"
+
+Main event function: Decides by the given CODEs which of the
+functions to display events should be called.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:6:"string";i:1;s:43:"$content : function output is added to this";}i:1;a:2:{i:0;s:5:"array";i:1;s:27:"$conf : configuration array";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:58:"$content: complete content generated by the tt_news plugin";}}s:7:"content";s:0:"";s:12:"content_size";i:2533;s:13:"content_lines";i:53;s:6:"atLine";i:62;}i:5;a:7:{s:6:"header";s:21:"function testDAL () {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:28:"
+
+For testing purposes only
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:105;s:13:"content_lines";i:5;s:6:"atLine";i:121;}i:7;a:7:{s:6:"header";s:22:"function init($conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:78:"
+
+Init function. Triggered by the main function. Initialise different values.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:27:"$conf : configuration array";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:3006;s:13:"content_lines";i:75;s:6:"atLine";i:133;}i:9;a:7:{s:6:"header";s:45:"function displayCatoverview($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+This renders a categorie overview.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:6:"string";i:1;s:8:"$content";}i:1;a:2:{i:0;s:5:"array";i:1;s:5:"$conf";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:36:": Returns an overview for categories";}}s:7:"content";s:0:"";s:12:"content_size";i:3192;s:13:"content_lines";i:74;s:6:"atLine";i:216;}i:11;a:7:{s:6:"header";s:45:"function displayCatoverviewWithNextEvents() {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:112:"
+
+This renders a categorie overview with informations about the next events of courses assigned to a categorie.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:31:": Categorie and event overview.";}}s:7:"content";s:0:"";s:12:"content_size";i:1242;s:13:"content_lines";i:26;s:6:"atLine";i:296;}i:13;a:7:{s:6:"header";s:34:"function displaySelectedEvents() {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:65:"
+
+This renders an overview of selected events and their courses.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:24:": Course/event overview.";}}s:7:"content";s:0:"";s:12:"content_size";i:1878;s:13:"content_lines";i:51;s:6:"atLine";i:328;}i:15;a:7:{s:6:"header";s:41:"function displayLMShort($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:75:"
+
+This renders an short overview about courses/events marked as lastminute
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:6:"string";i:1;s:55:"$content : Empty string. This has no function actually.";}i:1;a:2:{i:0;s:5:"array";i:1;s:34:"$conf : Hash array with TS config.";}}s:6:"return";a:2:{i:0;s:6:"String";i:1;s:20:": The rendered view.";}}s:7:"content";s:0:"";s:12:"content_size";i:4709;s:13:"content_lines";i:89;s:6:"atLine";i:387;}i:17;a:7:{s:6:"header";s:44:"function displayLMOverview($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:48:"
+
+To display the listview of lastminute events
+
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"content";i:1;s:15:"String Not used";}i:1;a:2:{i:0;s:4:"conf";i:1;s:48:"Array Contains the Plugin configuration from TS.";}}s:6:"return";a:2:{i:0;s:6:"String";i:1;s:47:"Returns the rendered view of lastminute events.";}}s:7:"content";s:0:"";s:12:"content_size";i:8051;s:13:"content_lines";i:137;s:6:"atLine";i:484;}i:19;a:7:{s:6:"header";s:46:"function displayCoursesInCat($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:63:"
+
+This returns an view of all courses assigned to a categorie.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:8:"$content";}i:1;a:2:{i:0;s:12:"unknown_type";i:1;s:5:"$conf";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:17:"The rendered view";}}s:7:"content";s:0:"";s:12:"content_size";i:991;s:13:"content_lines";i:21;s:6:"atLine";i:629;}i:21;a:6:{s:6:"header";s:45:"function displayQuicksearch($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:417;s:13:"content_lines";i:9;s:6:"atLine";i:658;}i:23;a:6:{s:6:"header";s:44:"function displayResultlist($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:1826;s:13:"content_lines";i:43;s:6:"atLine";i:675;}i:25;a:6:{s:6:"header";s:40:"function displayDetail($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:20101;s:13:"content_lines";i:434;s:6:"atLine";i:726;}i:27;a:7:{s:6:"header";s:43:"function displaySubscribe($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:186:"
+
+This function is responsible for rendering the subription view for an event. It should be triggered via a hyperlink with an id of the event the subription form should be rendered for.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:6:"string";i:1;s:35:"$content: By default this is empty.";}i:1;a:2:{i:0;s:5:"array";i:1;s:50:"$conf: An array of TS configuration for this view.";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:19:": The rendered view";}}s:7:"content";s:0:"";s:12:"content_size";i:5128;s:13:"content_lines";i:118;s:6:"atLine";i:1168;}i:29;a:7:{s:6:"header";s:35:"function takeNoticeOfContingent() {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:64:"
+
+Returns a flag to take notice of the event contingent or not.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:73;s:13:"content_lines";i:6;s:6:"atLine";i:1292;}i:31;a:7:{s:6:"header";s:47:"function validateContingentForEvent($eventId) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:5:{s:4:"text";s:84:"
+
+Checks if it is possible to subscribe to this event, regarding on the contingent.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:29:"$eventId: The id of the event";}}s:6:"return";a:2:{i:0;s:8:"integer:";i:1;s:43:"Retuns 1 if you can subscribe to this event";}s:5:"other";a:1:{i:0;s:41:"@deprecated Use the cEvent Class instead.";}s:11:"other_index";a:1:{s:11:"@deprecated";a:1:{i:0;s:29:"Use the cEvent Class instead.";}}}s:7:"content";s:0:"";s:12:"content_size";i:1274;s:13:"content_lines";i:28;s:6:"atLine";i:1306;}i:33;a:6:{s:6:"header";s:38:"function displayHelp($content,$conf) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:78;s:13:"content_lines";i:4;s:6:"atLine";i:1342;}i:35;a:6:{s:6:"header";s:83:"function displaySubscribeform($eventId,$MACourse,$MAEvent,$MATrainer,$MALocation) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:6213;s:13:"content_lines";i:141;s:6:"atLine";i:1357;}i:37;a:6:{s:6:"header";s:48:"function calcPrice($price, $conf, $brutto='1') {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:706;s:13:"content_lines";i:20;s:6:"atLine";i:1508;}i:39;a:6:{s:6:"header";s:78:"function fillEventMA(&$MA,$lConf,$sCost='',$rsEvent='',$eventId='',$days='') {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:5359;s:13:"content_lines";i:107;s:6:"atLine";i:1540;}i:41;a:6:{s:6:"header";s:47:"function fillSimilarMa(&$MA,$lConf,$fClear=0) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:656;s:13:"content_lines";i:11;s:6:"atLine";i:1656;}i:43;a:6:{s:6:"header";s:85:"function fillCourseMA(&$MA,$lConf,$rsCourse='',$courseId='',$eventId='',$prefix='') {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:7887;s:13:"content_lines";i:132;s:6:"atLine";i:1679;}i:45;a:7:{s:6:"header";s:95:"function fillCategorieMA(&$MA,$lConf,$rsCategorie='',$categorieId='',$courseId='',$prefix='') {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:5:{s:4:"text";s:80:"
+
+This fill an referenced MarkerArray with attributes of an specific category.
+
+";s:5:"param";a:6:{i:0;a:2:{i:0;s:5:"array";i:1;s:30:"$MA      : referenced array to fill";}i:1;a:2:{i:0;s:5:"array";i:1;s:35:"$lConf: a piece of ts configuration";}i:2;a:2:{i:0;s:5:"array";i:1;s:56:"$rsCategorie : if set, this array is used for filling MA";}i:3;a:2:{i:0;s:7:"integer";i:1;s:92:"$categorieId : if set, this categorie will be loaded from database and is used for fillng MA";}i:4;a:2:{i:0;s:7:"integer";i:1;s:130:"$courseId : if set, the categorie wich is assigned with the given course id will be loaded from database and is used for fillng MA";}i:5;a:2:{i:0;s:6:"string";i:1;s:65:"$prefix: tablename or alias for tablename of the categorie table.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:1:{i:0;s:34:"@deprecated Use cCategory instead.";}s:11:"other_index";a:1:{s:11:"@deprecated";a:1:{i:0;s:22:"Use cCategory instead.";}}}s:7:"content";s:0:"";s:12:"content_size";i:3496;s:13:"content_lines";i:93;s:6:"atLine";i:1824;}i:47;a:6:{s:6:"header";s:70:"function fillTypeMA(&$MA,$lConf,$rsType='', $typeId='',$courseId='') {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:2122;s:13:"content_lines";i:61;s:6:"atLine";i:1928;}i:49;a:6:{s:6:"header";s:78:"function fillTrainerMA(&$MA,$lConf,$rsTrainer='', $trainerId='',$eventId='') {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:2643;s:13:"content_lines";i:58;s:6:"atLine";i:2000;}i:51;a:6:{s:6:"header";s:79:"function fillLocationMA(&$MA,$lConf,$rsLocation='',$locationId='',$eventId=''){";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:3133;s:13:"content_lines";i:58;s:6:"atLine";i:2069;}i:53;a:6:{s:6:"header";s:31:"function searchCourse($sWord) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:1189;s:13:"content_lines";i:27;s:6:"atLine";i:2134;}i:55;a:7:{s:6:"header";s:75:"function startSubscription($MA,$MACourse,$MAEvent,$MATrainer,$MALocation) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:183:"
+
+This function triggers an subsription hook and sends emails containing the subscription data.
+It is responsible for increment the subscription counter for the subscribed event too.
+";s:5:"param";a:5:{i:0;a:2:{i:0;s:5:"Array";i:1;s:27:"$MA      : Some marker arrays...";}i:1;a:2:{i:0;s:5:"Array";i:1;s:9:"$MACourse";}i:2;a:2:{i:0;s:5:"Array";i:1;s:8:"$MAEvent";}i:3;a:2:{i:0;s:5:"Array";i:1;s:10:"$MATrainer";}i:4;a:2:{i:0;s:5:"Array";i:1;s:11:"$MALocation";}}s:6:"return";a:2:{i:0;s:7:"boolean";i:1;s:34:": true, if the mail could be sent.";}}s:7:"content";s:0:"";s:12:"content_size";i:1778;s:13:"content_lines";i:47;s:6:"atLine";i:2173;}i:57;a:6:{s:6:"header";s:43:"function incrementSubscriptions($eventId) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:809;s:13:"content_lines";i:21;s:6:"atLine";i:2227;}i:59;a:6:{s:6:"header";s:84:"function sendMailToUser($MA,$MACourse='',$MAEvent='',$MATrainer='',$MALocation='') {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:5816;s:13:"content_lines";i:108;s:6:"atLine";i:2259;}i:61;a:6:{s:6:"header";s:47:"function fillAllLabels(&$MA, $loadFilter = 0) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:5875;s:13:"content_lines";i:96;s:6:"atLine";i:2375;}i:63;a:6:{s:6:"header";s:33:"function fillFilterLabels(&$MA) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:2388;s:13:"content_lines";i:50;s:6:"atLine";i:2478;}i:65;a:6:{s:6:"header";s:33:"function getFilterWhereClause() {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:5;s:13:"content_lines";i:2;s:6:"atLine";i:2534;}i:67;a:6:{s:6:"header";s:29:"function getCategoryArray() {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:417;s:13:"content_lines";i:14;s:6:"atLine";i:2542;}i:69;a:6:{s:6:"header";s:27:"function getCourseArray() {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:6;s:13:"content_lines";i:3;s:6:"atLine";i:2562;}i:71;a:7:{s:6:"header";s:29:"function getLocationArray() {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:107:"
+
+Returns an array with uid/title pairs of available locations. Returns false if no location is available.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:25:": uid/title pair || false";}}s:7:"content";s:0:"";s:12:"content_size";i:474;s:13:"content_lines";i:19;s:6:"atLine";i:2571;}i:73;a:6:{s:6:"header";s:25:"function getTypeArray() {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:7:"content";s:0:"";s:12:"content_size";i:5;s:13:"content_lines";i:2;s:6:"atLine";i:2596;}i:75;a:3:{s:6:"header";s:93:"function pi_linkTPWithAnchor($str,$anchor,$urlParameters=array(),$cache=0,$altPageId=0)
+    {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:6:"atLine";i:2609;}i:77;a:7:{s:6:"header";s:84:"function renderSelectBox($name,$fieldList,$actValue=false,$renderEmptyOption=true) {";s:11:"parentClass";s:16:"tx_abcourses_pi1";s:4:"cDat";a:3:{s:4:"text";s:54:"
+
+This function renders an select-box for html forms.
+";s:5:"param";a:4:{i:0;a:2:{i:0;s:6:"string";i:1;s:22:"$name : Name attribute";}i:1;a:2:{i:0;s:5:"array";i:1;s:42:"$fieldList : Array with the wanted options";}i:2;a:2:{i:0;s:6:"string";i:1;s:86:"$actValue : If the form was send before, this value marks the currently selected value";}i:3;a:2:{i:0;s:7:"boolean";i:1;s:78:"$renderEmptyOption : Set this to true if you want an empty select option first";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:25:": the rendered select box";}}s:7:"content";s:0:"";s:12:"content_size";i:615;s:13:"content_lines";i:18;s:6:"atLine";i:2630;}}}s:14:"MD5_e273a873a8";a:4:{s:8:"filename";s:48:"pi1/classes/class.tx_abcourses.AbcoursesBase.php";s:8:"filesize";i:1263;s:6:"header";N;s:3:"DAT";a:5:{i:1;a:8:{s:6:"header";s:43:"class cAbcoursesBase extends tslib_pibase {";s:5:"class";i:1;s:11:"parentClass";s:14:"cAbcoursesBase";s:4:"cDat";a:3:{s:4:"text";s:44:"
+
+Base class for abcourses content objects.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:24;s:13:"content_lines";i:2;s:6:"atLine";i:5;}i:3;a:7:{s:6:"header";s:29:"function checkErrors(&$obj) {";s:11:"parentClass";s:14:"cAbcoursesBase";s:4:"cDat";a:3:{s:4:"text";s:195:"
+
+Check if an error occured for the referenced object and write the error message array to the logfile. If you set debugme flag true, the error messages are pushed into the debug() function too.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"object";i:1;s:4:"$obj";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:317;s:13:"content_lines";i:11;s:6:"atLine";i:14;}i:5;a:7:{s:6:"header";s:29:"function set_arrData($value){";s:11:"parentClass";s:14:"cAbcoursesBase";s:4:"cDat";a:3:{s:4:"text";s:28:"
+
+To set an internal value.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:35;s:13:"content_lines";i:3;s:6:"atLine";i:32;}i:7;a:4:{s:6:"header";s:24:"function &get_arrData(){";s:11:"parentClass";s:14:"cAbcoursesBase";s:4:"cDat";a:3:{s:4:"text";s:55:"
+
+This returns a reference to the internal data array.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:6:"atLine";i:41;}i:9;a:7:{s:6:"header";s:31:"function getSingleData($value){";s:11:"parentClass";s:14:"cAbcoursesBase";s:4:"cDat";a:3:{s:4:"text";s:53:"
+
+Returns a single value of the internal data array.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"string";i:1;s:34:"$value: Each DB Field is possible.";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:42;s:13:"content_lines";i:3;s:6:"atLine";i:51;}}}s:14:"MD5_55c11d3b8d";a:4:{s:8:"filename";s:46:"pi1/classes/class.tx_abcourses.Arrangement.php";s:8:"filesize";i:1931;s:6:"header";N;s:3:"DAT";a:3:{i:1;a:8:{s:6:"header";s:43:"class cArrangement extends cAbcoursesBase {";s:5:"class";i:1;s:11:"parentClass";s:12:"cArrangement";s:4:"cDat";a:3:{s:4:"text";s:43:"
+
+cArrangement object of abcourses plugin.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:50;s:13:"content_lines";i:3;s:6:"atLine";i:4;}i:3;a:4:{s:6:"header";s:44:"function loadData($arrangementId='',&$DAL) {";s:11:"parentClass";s:12:"cArrangement";s:4:"cDat";a:3:{s:4:"text";s:65:"
+
+To initalise an cArrangement instance with the respective data
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:49:"$arrangementId Uid of the record you want to load";}i:1;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:51:"$DAL Reference to the used data access layer object";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:6:"atLine";i:15;}i:5;a:7:{s:6:"header";s:47:"function printme($template, &$view, $conf='') {";s:11:"parentClass";s:12:"cArrangement";s:4:"cDat";a:3:{s:4:"text";s:81:"
+
+This function render the view for this event, depending on the given template.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:6:"string";i:1;s:48:"$template : The remplate for rendering the view.";}i:1;a:2:{i:0;s:6:"string";i:1;s:80:"&$cObj : A reference to the cObj of the pi1 class who wants to render this view.";}i:2;a:2:{i:0;s:6:"string";i:1;s:74:"$conf     : A snippet of TS configuration which should be used for this event.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:878;s:13:"content_lines";i:22;s:6:"atLine";i:31;}}}s:14:"MD5_a08d7d60dc";a:4:{s:8:"filename";s:43:"pi1/classes/class.tx_abcourses.Category.php";s:8:"filesize";i:6508;s:6:"header";N;s:3:"DAT";a:7:{i:1;a:8:{s:6:"header";s:40:"class cCategory extends cAbcoursesBase {";s:5:"class";i:1;s:11:"parentClass";s:9:"cCategory";s:4:"cDat";a:3:{s:4:"text";s:43:"
+
+cCategory class of the abcourses plugin.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:74;s:13:"content_lines";i:4;s:6:"atLine";i:4;}i:3;a:7:{s:6:"header";s:54:"function loadData($categoryId='',$courseId='',&$DAL) {";s:11:"parentClass";s:9:"cCategory";s:4:"cDat";a:3:{s:4:"text";s:134:"
+
+To initalise an cCategory instance with the respective data. You can load this with an uid or with the uid of an associated course.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"integer";i:1;s:46:"$categoryId Uid of the record you want to load";}i:1;a:2:{i:0;s:7:"integer";i:1;s:84:"$courseId Uid of a course, for which you would like to load the associated category.";}i:2;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:51:"$DAL Reference to the used data access layer object";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:287;s:13:"content_lines";i:11;s:6:"atLine";i:17;}i:5;a:7:{s:6:"header";s:79:"function load_arrCourses(&$objLoader,$onlyWithNextEvents = 0, $initEvents = 0){";s:11:"parentClass";s:9:"cCategory";s:4:"cDat";a:3:{s:4:"text";s:58:"
+
+To load the internal course array of a category object.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"cLoader";i:1;s:64:"$objLoader     Reference to an instance of the abcourses proxy class";}i:1;a:2:{i:0;s:7:"integer";i:1;s:242:"$onlyWithNextEvents       As example, if you set this to 2 the category gets 2 courses initialised with the closest event. Please consider that this is only a flag. You have to set the initEvents flag too, for initialising the events automatically.";}i:2;a:2:{i:0;s:7:"integer";i:1;s:150:"$initEvents      Set this flag if you would like to initialise the events of the courses too. If you do not set this, only the courses will be initialised.";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:1576;s:13:"content_lines";i:43;s:6:"atLine";i:37;}i:7;a:7:{s:6:"header";s:32:"function set_arrCourses($value){";s:11:"parentClass";s:9:"cCategory";s:4:"cDat";a:3:{s:4:"text";s:27:"
+
+To set an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:39;s:13:"content_lines";i:3;s:6:"atLine";i:87;}i:9;a:7:{s:6:"header";s:27:"function &get_arrCourses(){";s:11:"parentClass";s:9:"cCategory";s:4:"cDat";a:3:{s:4:"text";s:57:"
+
+This returns a reference to the internal course array.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:35:"Content of the array: id => cCourse";}}s:7:"content";s:0:"";s:12:"content_size";i:36;s:13:"content_lines";i:3;s:6:"atLine";i:96;}i:11;a:4:{s:6:"header";s:24:"function countCourses(){";s:11:"parentClass";s:9:"cCategory";s:4:"cDat";a:3:{s:4:"text";s:66:"
+
+Returns how many courses are initialised in the internal array.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:0:"";}}s:6:"atLine";i:105;}i:13;a:7:{s:6:"header";s:44:"function printme($template, &$view, $conf) {";s:11:"parentClass";s:9:"cCategory";s:4:"cDat";a:3:{s:4:"text";s:120:"
+
+This function render the view for this category, depending on the given template. Contained courses are rendered too.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:6:"string";i:1;s:48:"$template : The remplate for rendering the view.";}i:1;a:2:{i:0;s:6:"string";i:1;s:80:"&$cObj : A reference to the cObj of the pi1 class who wants to render this view.";}i:2;a:2:{i:0;s:6:"string";i:1;s:77:"$conf     : A snippet of TS configuration which should be used for this category.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:2264;s:13:"content_lines";i:58;s:6:"atLine";i:121;}}}s:14:"MD5_c7205eb4e7";a:4:{s:8:"filename";s:44:"pi1/classes/class.tx_abcourses.Categorys.php";s:8:"filesize";i:1532;s:6:"header";N;s:3:"DAT";a:4:{i:1;a:8:{s:6:"header";s:41:"class cCategorys extends cAbcoursesBase {";s:5:"class";i:1;s:11:"parentClass";s:10:"cCategorys";s:4:"cDat";a:3:{s:4:"text";s:159:"
+
+cCategorys is as like a wrapper class for cCategory objects. It collects all available categorys in an internal array. This is used for category listings...
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:96;s:13:"content_lines";i:6;s:6:"atLine";i:5;}i:3;a:7:{s:6:"header";s:22:"function init(&$DAL) {";s:11:"parentClass";s:10:"cCategorys";s:4:"cDat";a:3:{s:4:"text";s:114:"
+
+Initialise this object. Loads the internal array with category ids but does not initalise the category objects.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:46:"$DAL A reference to the used abstraction layer";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:120;s:13:"content_lines";i:5;s:6:"atLine";i:18;}i:5;a:4:{s:6:"header";s:21:"function loadData() {";s:11:"parentClass";s:10:"cCategorys";s:4:"cDat";a:3:{s:4:"text";s:81:"
+
+Initialise the category objects and put them into the internal category array.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:6:"atLine";i:29;}i:7;a:7:{s:6:"header";s:37:"function getCategoryUidTitleArray() {";s:11:"parentClass";s:10:"cCategorys";s:4:"cDat";a:3:{s:4:"text";s:63:"
+
+Returns a list with all uid->title pairs of loaded categorys
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:258;s:13:"content_lines";i:13;s:6:"atLine";i:45;}}}s:14:"MD5_8b32a1be8a";a:4:{s:8:"filename";s:41:"pi1/classes/class.tx_abcourses.Course.php";s:8:"filesize";i:16310;s:6:"header";N;s:3:"DAT";a:13:{i:1;a:8:{s:6:"header";s:37:"class cCourse extends cAbcoursesBase{";s:5:"class";i:1;s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:72:"
+
+The cCourse class handles the course records of the abcourses plugin.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:160;s:13:"content_lines";i:8;s:6:"atLine";i:6;}i:3;a:7:{s:6:"header";s:51:"function loadData($courseId='',$eventId='',&$DAL) {";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:102:"
+
+This loads the data of a course record, depending to a passed courseId or an corresponding eventId.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"integer";i:1;s:55:"$courseId      Id of the course record you would like to get";}i:1;a:2:{i:0;s:7:"integer";i:1;s:57:"$eventId Get an course record with an associated event id";}i:2;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:46:"$DAL A reference to the used abstraction layer";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:175;s:13:"content_lines";i:7;s:6:"atLine";i:23;}i:5;a:7:{s:6:"header";s:23:"function countEvents(){";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:52:"
+
+Returns how many events are currently initialised
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:111;s:13:"content_lines";i:7;s:6:"atLine";i:36;}i:7;a:7:{s:6:"header";s:29:"function countTeachingaids(){";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:59:"
+
+Returns how many teaching aids are currently initialised
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:123;s:13:"content_lines";i:7;s:6:"atLine";i:49;}i:9;a:7:{s:6:"header";s:24:"function countTrainer(){";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:53:"
+
+Returns how many trainer are currently initialised
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:113;s:13:"content_lines";i:7;s:6:"atLine";i:62;}i:11;a:7:{s:6:"header";s:38:"function load_arrTrainer(&$objLoader){";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:35:"
+
+Load the internal trainer array.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:46:"$objLoader A reference to the used proxy class";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:794;s:13:"content_lines";i:27;s:6:"atLine";i:76;}i:13;a:7:{s:6:"header";s:43:"function load_arrTeachingaids(&$objLoader){";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:44:"
+
+Load the internal array of teaching aids.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:46:"$objLoader A reference to the used proxy class";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:865;s:13:"content_lines";i:28;s:6:"atLine";i:110;}i:15;a:7:{s:6:"header";s:79:"function load_arrEvents(&$objLoader,$showeventsago = 0,$displayEventInList=''){";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:41:"
+
+Loads the events array of this course.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"cLoader";i:1;s:47:"$objLoader: An reference to a cLoader instance.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:107:"$showeventsago: Set this e.g. to "2" if you want to load events too which are out of date since max 2 days.";}i:2;a:2:{i:0;s:5:"array";i:1;s:116:"$displayEventInList: Arraykey is the eventid and value is 1 if you want to load only special events for this course.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:1532;s:13:"content_lines";i:43;s:6:"atLine";i:147;}i:17;a:7:{s:6:"header";s:41:"function addEvent($eventId,&$objLoader) {";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:94:"
+
+This function initialise one single event and add it to the internal array for later usage.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:47:"$eventId : The id of the event you want to add.";}i:1;a:2:{i:0;s:6:"[type]";i:1;s:15:"$objLoader: ...";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:205;s:13:"content_lines";i:6;s:6:"atLine";i:198;}i:19;a:7:{s:6:"header";s:37:"function set_arrTeachingaids($value){";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:25:"
+
+[Describe function...]
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"[type]";i:1;s:11:"$value: ...";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:43;s:13:"content_lines";i:3;s:6:"atLine";i:211;}i:21;a:7:{s:6:"header";s:32:"function &get_arrTeachingaids(){";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:25:"
+
+[Describe function...]
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:42;s:13:"content_lines";i:3;s:6:"atLine";i:220;}i:23;a:4:{s:6:"header";s:40:"function setDisplayNextEventOnly($val) {";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:156:"
+
+If you call this with "1" this course will load only the next event, when load_arrEvents is called. You have to call this BEFORE you call load_arrEvents.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:40:"$val Set this to 1 or 0 || true or false";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:6:"atLine";i:230;}i:25;a:7:{s:6:"header";s:44:"function printme($template, &$view, $conf) {";s:11:"parentClass";s:7:"cCourse";s:4:"cDat";a:3:{s:4:"text";s:119:"
+
+This function render the view for this course, depending on the given template. Initialised events are rendered too.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:6:"string";i:1;s:48:"$template : The remplate for rendering the view.";}i:1;a:2:{i:0;s:6:"string";i:1;s:80:"&$cObj : A reference to the cObj of the pi1 class who wants to render this view.";}i:2;a:2:{i:0;s:6:"string";i:1;s:75:"$conf     : A snippet of TS configuration which should be used for this course.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:9090;s:13:"content_lines";i:144;s:6:"atLine";i:242;}}}s:14:"MD5_0502913ee6";a:4:{s:8:"filename";s:40:"pi1/classes/class.tx_abcourses.Event.php";s:8:"filesize";i:8048;s:6:"header";N;s:3:"DAT";a:7:{i:1;a:8:{s:6:"header";s:37:"class cEvent extends cAbcoursesBase {";s:5:"class";i:1;s:11:"parentClass";s:6:"cEvent";s:4:"cDat";a:3:{s:4:"text";s:59:"
+
+This class is for handle events of the abcourses plugin.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:94;s:13:"content_lines";i:5;s:6:"atLine";i:6;}i:3;a:7:{s:6:"header";s:38:"function loadData($eventId='',&$DAL) {";s:11:"parentClass";s:6:"cEvent";s:4:"cDat";a:3:{s:4:"text";s:61:"
+
+This function load the event data related to the given id.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:32:"$eventId Id of the event record.";}i:1;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:50:"$DAL Reference to the used data abstraction layer.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:167;s:13:"content_lines";i:7;s:6:"atLine";i:19;}i:5;a:7:{s:6:"header";s:37:"function load_arrHotels(&$objLoader){";s:11:"parentClass";s:6:"cEvent";s:4:"cDat";a:3:{s:4:"text";s:104:"
+
+This function load hotels to the internal array depending on arrangements associated with this event.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"cLoader";i:1;s:40:": A reference to the used loader object.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:1002;s:13:"content_lines";i:32;s:6:"atLine";i:33;}i:7;a:7:{s:6:"header";s:26:"function &get_arrHotels(){";s:11:"parentClass";s:6:"cEvent";s:4:"cDat";a:3:{s:4:"text";s:25:"
+
+[Describe function...]
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:36;s:13:"content_lines";i:3;s:6:"atLine";i:71;}i:9;a:7:{s:6:"header";s:23:"function countHotels(){";s:11:"parentClass";s:6:"cEvent";s:4:"cDat";a:3:{s:4:"text";s:44:"
+
+Returns the number of initialised hotels.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:111;s:13:"content_lines";i:7;s:6:"atLine";i:80;}i:11;a:4:{s:6:"header";s:32:"function subscribeable(&$view) {";s:11:"parentClass";s:6:"cEvent";s:4:"cDat";a:3:{s:4:"text";s:77:"
+
+Returns if you can subscribe an event or not, regarding on the contingent.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"class";i:1;s:75:"$view: An referenced instance of the pi1 class who wants to return the view";}}s:6:"return";a:2:{i:0;s:8:"integer:";i:1;s:45:"Returns 1 if you can subscribe to this event.";}}s:6:"atLine";i:94;}i:13;a:7:{s:6:"header";s:56:"function printme($template, &$view, $conf, $costs = 0) {";s:11:"parentClass";s:6:"cEvent";s:4:"cDat";a:3:{s:4:"text";s:81:"
+
+This function render the view for this event, depending on the given template.
+";s:5:"param";a:4:{i:0;a:2:{i:0;s:6:"string";i:1;s:48:"$template : The remplate for rendering the view.";}i:1;a:2:{i:0;s:6:"string";i:1;s:80:"&$cObj : A reference to the cObj of the pi1 class who wants to render this view.";}i:2;a:2:{i:0;s:6:"string";i:1;s:74:"$conf     : A snippet of TS configuration which should be used for this event.";}i:3;a:2:{i:0;s:6:"[type]";i:1;s:11:"$costs: ...";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:4809;s:13:"content_lines";i:83;s:6:"atLine";i:113;}}}s:14:"MD5_811884fa16";a:4:{s:8:"filename";s:40:"pi1/classes/class.tx_abcourses.Hotel.php";s:8:"filesize";i:5607;s:6:"header";N;s:3:"DAT";a:8:{i:1;a:7:{s:6:"header";s:37:"class cHotel extends cAbcoursesBase {";s:5:"class";i:1;s:11:"parentClass";s:6:"cHotel";s:7:"content";s:0:"";s:12:"content_size";i:78;s:13:"content_lines";i:4;s:6:"atLine";i:0;}i:3;a:7:{s:6:"header";s:56:"function loadData($hotelId='',$arrangementId='',&$DAL) {";s:11:"parentClass";s:6:"cHotel";s:4:"cDat";a:3:{s:4:"text";s:124:"
+
+This loads the data of a hotel record. Corresponding to a hotelId or an arrangement id. Passed hotel id takes precedence.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"integer";i:1;s:8:"$hotelId";}i:1;a:2:{i:0;s:7:"integer";i:1;s:14:"$arrangementId";}i:2;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:49:"$DAL Reference to the used data abstraction layer";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:285;s:13:"content_lines";i:11;s:6:"atLine";i:13;}i:5;a:7:{s:6:"header";s:53:"function addArrangement($arrangementId,&$objLoader) {";s:11:"parentClass";s:6:"cHotel";s:4:"cDat";a:3:{s:4:"text";s:100:"
+
+This function initialise one single arrangement and add it to the internal array for later usage.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:57:"$arrangementId : The id of the arrangemt you want to add.";}i:1;a:2:{i:0;s:6:"[type]";i:1;s:15:"$objLoader: ...";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:257;s:13:"content_lines";i:6;s:6:"atLine";i:32;}i:7;a:7:{s:6:"header";s:42:"function load_arrArrangement(&$objLoader){";s:11:"parentClass";s:6:"cHotel";s:4:"cDat";a:3:{s:4:"text";s:39:"
+
+Load the internal arrangement array.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"cLoader";i:1;s:39:"$objLoader Reference to the proxy class";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:1046;s:13:"content_lines";i:31;s:6:"atLine";i:45;}i:9;a:7:{s:6:"header";s:36:"function set_arrArrangement($value){";s:11:"parentClass";s:6:"cHotel";s:4:"cDat";a:3:{s:4:"text";s:25:"
+
+[Describe function...]
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"[type]";i:1;s:11:"$value: ...";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:42;s:13:"content_lines";i:3;s:6:"atLine";i:83;}i:11;a:7:{s:6:"header";s:31:"function &get_arrArrangement(){";s:11:"parentClass";s:6:"cHotel";s:4:"cDat";a:3:{s:4:"text";s:25:"
+
+[Describe function...]
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:40;s:13:"content_lines";i:3;s:6:"atLine";i:92;}i:13;a:4:{s:6:"header";s:29:"function countArrangements(){";s:11:"parentClass";s:6:"cHotel";s:4:"cDat";a:3:{s:4:"text";s:49:"
+
+Returns the number of initalised arrangements.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:0:"";}}s:6:"atLine";i:101;}i:15;a:7:{s:6:"header";s:44:"function printme($template, &$view, $conf) {";s:11:"parentClass";s:6:"cHotel";s:4:"cDat";a:3:{s:4:"text";s:122:"
+
+This function render the view for this hotel, depending on the given template. Contained arrangements are rendered too.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:6:"string";i:1;s:48:"$template : The remplate for rendering the view.";}i:1;a:2:{i:0;s:6:"string";i:1;s:80:"&$cObj : A reference to the cObj of the pi1 class who wants to render this view.";}i:2;a:2:{i:0;s:6:"string";i:1;s:74:"$conf     : A snippet of TS configuration which should be used for this hotel.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:2052;s:13:"content_lines";i:43;s:6:"atLine";i:117;}}}s:14:"MD5_f7fa9c65b4";a:4:{s:8:"filename";s:41:"pi1/classes/class.tx_abcourses.Loader.php";s:8:"filesize";i:14616;s:6:"header";N;s:3:"DAT";a:24:{i:1;a:8:{s:6:"header";s:15:"class cLoader {";s:5:"class";i:1;s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:109:"
+
+This is the persistence proxy class for abcourses... Use this class to get instances of different classes.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:717;s:13:"content_lines";i:16;s:6:"atLine";i:4;}i:3;a:7:{s:6:"header";s:46:"function init($conf,$pages,$recursive,&$cObj){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:81:"
+
+To initialise the proxy class. Normally this is already done by the pi1 class.
+";s:5:"param";a:4:{i:0;a:2:{i:0;s:5:"array";i:1;s:22:"$conf    TS configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:48:"$pages   list of page id's to look up records from";}i:2;a:2:{i:0;s:7:"integer";i:1;s:26:"$recursive     recursive level";}i:3;a:2:{i:0;s:10:"tslib_cobj";i:1;s:88:"$cObj        Instance of an tslib_cobj instance. Usually the instance as used by the pi1 class.";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:299;s:13:"content_lines";i:8;s:6:"atLine";i:30;}i:5;a:7:{s:6:"header";s:29:"function load_objLocations(){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:64:"
+
+This function initialise the internal attribute $objLocations
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:47:"Returns 1 for success and 0 if an error occured";}}s:7:"content";s:0:"";s:12:"content_size";i:345;s:13:"content_lines";i:13;s:6:"atLine";i:44;}i:7;a:7:{s:6:"header";s:29:"function load_objCategorys(){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:64:"
+
+This function initialise the internal attribute $objCategorys
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:47:"Returns 1 for success and 0 if an error occured";}}s:7:"content";s:0:"";s:12:"content_size";i:411;s:13:"content_lines";i:15;s:6:"atLine";i:63;}i:9;a:7:{s:6:"header";s:52:"function listSimilarCourses($byTitle,$expectId='') {";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:50:"
+
+Returns an array with uid's of similar courses.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:6:"string";i:1;s:53:"$byTitle        Similar courses are looked up with an title.";}i:1;a:2:{i:0;s:12:"unknown_type";i:1;s:88:"$expectId     The integer passed for this will not be included in the returned integer list.";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:36:"Array with uid's of similar courses.";}}s:7:"content";s:0:"";s:12:"content_size";i:161;s:13:"content_lines";i:8;s:6:"atLine";i:86;}i:11;a:7:{s:6:"header";s:52:"function load_arrCourses($courseId='',$eventId='') {";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:126:"
+
+Initialize the internal course array. You can use this, if you want to load some courses without an instance of cCategorys.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:65:"$courseId: The id of a course you want add to the internal array.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:102:"$eventId: The id of an event you want to use to load the corresponding course into the internal array.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:191;s:13:"content_lines";i:10;s:6:"atLine";i:102;}i:13;a:7:{s:6:"header";s:26:"function set_conf($value){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+Set function for an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:33;s:13:"content_lines";i:3;s:6:"atLine";i:119;}i:15;a:7:{s:6:"header";s:27:"function set_pages($value){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+Set function for an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:34;s:13:"content_lines";i:3;s:6:"atLine";i:129;}i:17;a:7:{s:6:"header";s:31:"function set_recursive($value){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+Set function for an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:38;s:13:"content_lines";i:3;s:6:"atLine";i:139;}i:19;a:7:{s:6:"header";s:26:"function set_cObj($value){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+Set function for an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:33;s:13:"content_lines";i:3;s:6:"atLine";i:149;}i:21;a:7:{s:6:"header";s:26:"function set_DAL(&$value){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+Set function for an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:32;s:13:"content_lines";i:3;s:6:"atLine";i:159;}i:23;a:7:{s:6:"header";s:20:"function &get_DAL(){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:69:"
+
+This returns an reference of the used data abstraction layer class
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:30;s:13:"content_lines";i:3;s:6:"atLine";i:168;}i:25;a:7:{s:6:"header";s:35:"function set_objCategorys($value) {";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+Set function for an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:124;s:13:"content_lines";i:5;s:6:"atLine";i:178;}i:27;a:7:{s:6:"header";s:29:"function &get_objCategorys(){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:112:"
+
+Returns an reference of the internal cCategorys instance. If not available, the instance will be initialised.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:10:"cCategorys";i:1;s:29:"Returns 0 if an error occured";}}s:7:"content";s:0:"";s:12:"content_size";i:230;s:13:"content_lines";i:9;s:6:"atLine";i:189;}i:29;a:7:{s:6:"header";s:35:"function set_objLocations($value) {";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+Set function for an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:40;s:13:"content_lines";i:3;s:6:"atLine";i:205;}i:31;a:7:{s:6:"header";s:30:"function &get_objLocations() {";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:112:"
+
+Returns an reference of the internal cLocations instance. If not available, the instance will be initialised.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:10:"cLocations";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:155;s:13:"content_lines";i:9;s:6:"atLine";i:214;}i:33;a:7:{s:6:"header";s:32:"function set_arrCourses($value){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:37:"
+
+Set function for an internal value
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:12:"unknown_type";i:1;s:6:"$value";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:38;s:13:"content_lines";i:3;s:6:"atLine";i:230;}i:35;a:7:{s:6:"header";s:42:"function &get_Course($uid='',$eventId=''){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:238:"
+
+This returns a reference to a course instance, corresponding to the passed uid or eventId. If an eventId is passed, this will lookup the corresponding course an add the event to the internal event array of the returned course instance.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:98:"$uid   Id of the course you want to load. If an eventId is passed also, this value takes precedence.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:37:"$eventId   Id of a corresponding event.";}}s:6:"return";a:2:{i:0;s:7:"cCourse";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:1184;s:13:"content_lines";i:36;s:6:"atLine";i:241;}i:37;a:7:{s:6:"header";s:26:"function &get_Event($uid){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:67:"
+
+Returns an instance of cEvent, corresponding to the passed $uid.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:43:"$uid   Uid of the event you want to return...";}}s:6:"return";a:2:{i:0;s:6:"cEvent";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:652;s:13:"content_lines";i:20;s:6:"atLine";i:284;}i:39;a:7:{s:6:"header";s:29:"function &get_Category($uid){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:70:"
+
+Returns an instance of cCategory, corresponding to the passed $uid.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:46:"$uid   Uid of the category you want to return...";}}s:6:"return";a:2:{i:0;s:9:"cCategory";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:594;s:13:"content_lines";i:18;s:6:"atLine";i:311;}i:41;a:7:{s:6:"header";s:49:"function &get_Trainer($trainerId='',$eventId=''){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:81:"
+
+Returns an instance of cTrainer, corresponding to the passed $uid or $eventId.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:45:"$trainerId Id of the trainer you want to get.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:71:"$eventId Id of the event you want to get the corresponding trainer for.";}}s:6:"return";a:2:{i:0;s:8:"cTrainer";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:921;s:13:"content_lines";i:31;s:6:"atLine";i:337;}i:43;a:7:{s:6:"header";s:32:"function &get_Teachingaid($uid){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:73:"
+
+Returns an instance of cTeachingaid, corresponding to the passed $uid.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:58:"$uid   The uid of the record you want to get the object for.";}}s:6:"return";a:2:{i:0;s:12:"cTeachingaid";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:652;s:13:"content_lines";i:20;s:6:"atLine";i:375;}i:45;a:4:{s:6:"header";s:51:"function &get_Hotel($hotelId='',$arrangementId=''){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:84:"
+
+Returns an instance of cHotel, corresponding to a passed hotelId or arrangementId
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:121:"$hotelId      Id of the hotel record you want to get the object for. This takes precedence, if an arrangementId is passed too.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:80:"$arrangementId  Id of an arrangement you want to get the corresponding hotel for.";}}s:6:"return";a:2:{i:0;s:6:"cHotel";i:1;s:0:"";}}s:6:"atLine";i:403;}i:47;a:7:{s:6:"header";s:32:"function &get_Arrangement($uid){";s:11:"parentClass";s:7:"cLoader";s:4:"cDat";a:3:{s:4:"text";s:57:"
+
+Returns one instance of cArrangement with the given id
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:71:"$uid   : The id of the arrangement wich should be initialised an returned";}}s:6:"return";a:2:{i:0;s:12:"cArrangement";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:631;s:13:"content_lines";i:21;s:6:"atLine";i:455;}}}s:14:"MD5_745a85699d";a:4:{s:8:"filename";s:43:"pi1/classes/class.tx_abcourses.Location.php";s:8:"filesize";i:698;s:6:"header";N;s:3:"DAT";a:2:{i:1;a:5:{s:6:"header";s:39:"class cLocation extends cAbcoursesBase{";s:5:"class";i:1;s:11:"parentClass";s:9:"cLocation";s:4:"cDat";a:3:{s:4:"text";s:67:"
+
+This class handles the location records of the abcourses plugin.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:6:"atLine";i:4;}i:3;a:7:{s:6:"header";s:50:"function loadData($byUid='',$byEventId='',&$DAL) {";s:11:"parentClass";s:9:"cLocation";s:4:"cDat";a:3:{s:4:"text";s:38:"
+
+Load the data of a location record.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"integer";i:1;s:42:"$byUid To load the data with a location id";}i:1;a:2:{i:0;s:7:"integer";i:1;s:58:"$byEventId To load the data with a corresponding event id.";}i:2;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:44:"$DAL Reference to the used abstraction layer";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:182;s:13:"content_lines";i:8;s:6:"atLine";i:16;}}}s:14:"MD5_98893e9f42";a:4:{s:8:"filename";s:44:"pi1/classes/class.tx_abcourses.Locations.php";s:8:"filesize";i:1706;s:6:"header";N;s:3:"DAT";a:4:{i:1;a:8:{s:6:"header";s:41:"class cLocations extends cAbcoursesBase {";s:5:"class";i:1;s:11:"parentClass";s:10:"cLocations";s:4:"cDat";a:3:{s:4:"text";s:94:"
+
+As like as cCategorys for category records this is a wrapper class for cLocation instances.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:96;s:13:"content_lines";i:6;s:6:"atLine";i:5;}i:3;a:7:{s:6:"header";s:22:"function init(&$DAL) {";s:11:"parentClass";s:10:"cLocations";s:4:"cDat";a:3:{s:4:"text";s:77:"
+
+Initialise some class attributes and loads the internal location Id-Array.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:49:"$DAL Reference to the used data abstraction layer";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:167;s:13:"content_lines";i:6;s:6:"atLine";i:18;}i:5;a:4:{s:6:"header";s:21:"function loadData() {";s:11:"parentClass";s:10:"cLocations";s:4:"cDat";a:3:{s:4:"text";s:110:"
+
+Initialise the cLocation instances for the location id's as contained in the internal array arrLocationIds.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"boolean";i:1;s:0:"";}}s:6:"atLine";i:30;}i:7;a:7:{s:6:"header";s:37:"function getLocationUidTitleArray() {";s:11:"parentClass";s:10:"cLocations";s:4:"cDat";a:3:{s:4:"text";s:92:"
+
+Returns an Array with the id of a location as key and the title of the location as value.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:379;s:13:"content_lines";i:13;s:6:"atLine";i:48;}}}s:14:"MD5_46103ade61";a:4:{s:8:"filename";s:46:"pi1/classes/class.tx_abcourses.Participant.php";s:8:"filesize";i:54;s:6:"header";N;s:3:"DAT";a:1:{i:1;a:7:{s:6:"header";s:36:"class cParticipant extends cPerson {";s:5:"class";i:1;s:11:"parentClass";s:12:"cParticipant";s:7:"content";s:0:"";s:12:"content_size";i:6;s:13:"content_lines";i:2;s:6:"atLine";i:0;}}}s:14:"MD5_8adf918647";a:4:{s:8:"filename";s:41:"pi1/classes/class.tx_abcourses.Person.php";s:8:"filesize";i:107;s:6:"header";N;s:3:"DAT";a:1:{i:1;a:7:{s:6:"header";s:38:"class cPerson extends cAbcoursesBase {";s:5:"class";i:1;s:11:"parentClass";s:7:"cPerson";s:7:"content";s:0:"";s:12:"content_size";i:53;s:13:"content_lines";i:4;s:6:"atLine";i:0;}}}s:14:"MD5_f72e9e5636";a:4:{s:8:"filename";s:46:"pi1/classes/class.tx_abcourses.Teachingaid.php";s:8:"filesize";i:1270;s:6:"header";N;s:3:"DAT";a:3:{i:1;a:8:{s:6:"header";s:43:"class cTeachingaid extends cAbcoursesBase {";s:5:"class";i:1;s:11:"parentClass";s:12:"cTeachingaid";s:4:"cDat";a:3:{s:4:"text";s:71:"
+
+This class handles the teaching-aid records of the abcourses plugin.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:50;s:13:"content_lines";i:3;s:6:"atLine";i:4;}i:3;a:4:{s:6:"header";s:44:"function loadData($teachingaidId='',&$DAL) {";s:11:"parentClass";s:12:"cTeachingaid";s:4:"cDat";a:3:{s:4:"text";s:80:"
+
+Load the data of a teaching aid record depending on the passed teachingaidId.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:14:"$teachingaidId";}i:1;a:2:{i:0;s:13:"cAbcoursesDAL";i:1;s:49:"$DAL Reference to the used data abstraction layer";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:6:"atLine";i:15;}i:5;a:7:{s:6:"header";s:37:"function printme($template, &$view) {";s:11:"parentClass";s:12:"cTeachingaid";s:4:"cDat";a:3:{s:4:"text";s:81:"
+
+This function render the view for this event, depending on the given template.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:6:"string";i:1;s:48:"$template : The remplate for rendering the view.";}i:1;a:2:{i:0;s:6:"string";i:1;s:80:"&$cObj : A reference to the cObj of the pi1 class who wants to render this view.";}i:2;a:2:{i:0;s:6:"string";i:1;s:74:"$conf     : A snippet of TS configuration which should be used for this event.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:274;s:13:"content_lines";i:11;s:6:"atLine";i:31;}}}s:14:"MD5_482959fb04";a:4:{s:8:"filename";s:42:"pi1/classes/class.tx_abcourses.Trainer.php";s:8:"filesize";i:1752;s:6:"header";N;s:3:"DAT";a:2:{i:1;a:4:{s:6:"header";s:32:"class cTrainer extends cPerson {";s:5:"class";i:1;s:11:"parentClass";s:8:"cTrainer";s:6:"atLine";i:7;}i:3;a:7:{s:6:"header";s:45:"function printme($template,&$view,$conf='') {";s:11:"parentClass";s:8:"cTrainer";s:4:"cDat";a:3:{s:4:"text";s:71:"
+
+This renders the data of an trainer record with the passed template.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:6:"string";i:1;s:39:"$template The template for this record.";}i:1;a:2:{i:0;s:6:"Object";i:1;s:56:"$view Usually a reference to the pi1 class of the plugin";}i:2;a:2:{i:0;s:5:"array";i:1;s:22:"$conf TS configuration";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:20:"The rendered view...";}}s:7:"content";s:0:"";s:12:"content_size";i:1081;s:13:"content_lines";i:20;s:6:"atLine";i:23;}}}s:14:"MD5_5d8e486e9f";a:4:{s:8:"filename";s:38:"pi1/classes/class.tx_abcourses.dal.php";s:8:"filesize";i:35873;s:6:"header";a:5:{s:4:"text";s:590:"
+
+Data access Layer for abcourses with Usage of the default MySQL Database. You can change this, if you want to connect the abcourses plugin with other applications.
+Please consider, that this is only related to the front-end!
+If you change this file, the records as entered in the back end of TYPO3 may not be shown with the FE plugin. May be it would be nice then, to disable the corresponding records in the BE.
+
+Do not change parameters or return values of the cAbcoursesDAL functions. If you do this anyway, you have to change the pi1 class and may be any class in the classes folder.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:1:{i:0;s:38:"@author       Stefan Precht <sprecht@gmx.de>";}s:11:"other_index";a:1:{s:7:"@author";a:1:{i:0;s:30:"Stefan Precht <sprecht@gmx.de>";}}}s:3:"DAT";a:21:{i:1;a:7:{s:6:"header";s:42:"class cAbcoursesDAL extends tslib_pibase {";s:5:"class";i:1;s:11:"parentClass";s:13:"cAbcoursesDAL";s:7:"content";s:0:"";s:12:"content_size";i:138;s:13:"content_lines";i:8;s:6:"atLine";i:37;}i:3;a:7:{s:6:"header";s:46:"function init($conf,$pages,$recursive,&$cObj){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:98:"
+
+This is to initalise the DAL. Passed variables are TYPO3 specific. Dont change this parameters.
+";s:5:"param";a:4:{i:0;a:2:{i:0;s:5:"array";i:1;s:22:"$conf    TS configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:60:"$pages   List of page ids where seminar records could be saved";}i:2;a:2:{i:0;s:7:"integer";i:1;s:32:"$recursive Level of nested pages";}i:3;a:2:{i:0;s:10:"tslib_conf";i:1;s:62:"$cObj  A reference to the tslib_cobj instance of the pi1 class.";}}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}}s:7:"content";s:0:"";s:12:"content_size";i:139;s:13:"content_lines";i:6;s:6:"atLine";i:55;}i:5;a:7:{s:6:"header";s:18:"function reset() {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:47:"
+
+Resets the error flag and the message array.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:204;s:13:"content_lines";i:8;s:6:"atLine";i:67;}i:7;a:7:{s:6:"header";s:26:"function listCategorys() {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:120:"
+
+This function must return an array containing the unique id's of available categories. The id's should be of integer.
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:89:"Must be in the format key => value where key is an counter and value the id of a category";}}s:7:"content";s:0:"";s:12:"content_size";i:971;s:13:"content_lines";i:29;s:6:"atLine";i:81;}i:9;a:7:{s:6:"header";s:49:"function loadCategory($byUid='',$byCourseId='') {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:137:"
+
+This function must return an array containing the unique id of a category. This function must work with corresponding course id's too!
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:31:"$byUid Unique id of an category";}i:1;a:2:{i:0;s:7:"integer";i:1;s:34:"$byCourseId Unique id of an course";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:100:"Must be in the format fieldname => value where fieldname must be uid and value the id of a category.";}}s:7:"content";s:0:"";s:12:"content_size";i:1435;s:13:"content_lines";i:37;s:6:"atLine";i:118;}i:11;a:7:{s:6:"header";s:80:"function listCourses($byCategoryId='',$bySimilarTitle='', $expectCourseId = ''){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:107:"
+
+This function must return a list of course id's. The course id's can be looked up with different values.
+";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"integer";i:1;s:70:"$byCategoryId An id of a category a course could be associated with...";}i:1;a:2:{i:0;s:6:"string";i:1;s:15:"$bySimilarTitle";}i:2;a:2:{i:0;s:7:"integer";i:1;s:15:"$expectCourseId";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:87:"Must be in the format key => value where key is an counter and value the id of a course";}}s:7:"content";s:0:"";s:12:"content_size";i:2607;s:13:"content_lines";i:55;s:6:"atLine";i:164;}i:13;a:7:{s:6:"header";s:62:"function listCoursesWithNextEvents($categoryId='',$counter=1){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:107:"
+
+This function must return a list of course id's. The course id's can be looked up with different values.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:68:"$categoryId An id of a category a course could be associated with...";}i:1;a:2:{i:0;s:7:"integer";i:1;s:126:"$counter This is used as LIMIT value for the mysql statement an passed through the plugin TS configuration into this function.";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:87:"Must be in the format key => value where key is an counter and value the id of a course";}}s:7:"content";s:0:"";s:12:"content_size";i:1892;s:13:"content_lines";i:39;s:6:"atLine";i:227;}i:15;a:7:{s:6:"header";s:46:"function loadCourse($byUid='',$byEventId='') {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:301:"
+
+This must return an array with all course data. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:76:"$byUid The unique id of the course you would like to get the attributes for.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:67:"$byEventId To get the the course id for the corresponding event id.";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:1641;s:13:"content_lines";i:47;s:6:"atLine";i:275;}i:17;a:7:{s:6:"header";s:55:"function listEvents($byCourseId='',$showeventsago = 0){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:44:"
+
+Must return a list of related event id's.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:27:"$byCourseId Id of an course";}i:1;a:2:{i:0;s:7:"integer";i:1;s:132:"$showeventsago If you would like to receive expired events too, set this to an appropriate number of days an event may have expired.";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:25:"Array key only as counter";}}s:7:"content";s:0:"";s:12:"content_size";i:1526;s:13:"content_lines";i:41;s:6:"atLine";i:330;}i:19;a:7:{s:6:"header";s:62:"function listNextEventForCourse($courseId,$showeventsago = 0){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:73:"
+
+This function returns the uid of the next array for a given course id.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:73:"$courseId The id of the course you would like to receive an event id for.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:132:"$showeventsago If you would like to receive expired events too, set this to an appropriate number of days an event may have expired.";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:59:"The key is the attribute uid and the value the received id.";}}s:7:"content";s:0:"";s:12:"content_size";i:1801;s:13:"content_lines";i:49;s:6:"atLine";i:379;}i:21;a:7:{s:6:"header";s:33:"function loadEvent($eventId='') {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:182:"
+
+Returns the data of an event as associative array.
+The array keys must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:24:"$eventId Id of the event";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:919;s:13:"content_lines";i:31;s:6:"atLine";i:436;}i:23;a:7:{s:6:"header";s:26:"function listLocations() {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:64:"
+
+Returns a list of the unique id's for all available loactions
+";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:25:"Array key only as counter";}}s:7:"content";s:0:"";s:12:"content_size";i:956;s:13:"content_lines";i:29;s:6:"atLine";i:473;}i:25;a:7:{s:6:"header";s:48:"function loadLocation($byUid='',$byEventId='') {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:307:"
+
+Returns the data of an location as associative array. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:53:"$byUid To load the location data with an location id.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:99:"$byEventId To load the location data corresponding to an special event. Currently this is not used.";}}s:6:"return";a:2:{i:0;s:7:"unknown";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:1486;s:13:"content_lines";i:36;s:6:"atLine";i:511;}i:27;a:7:{s:6:"header";s:37:"function listTrainer($byCourseId=''){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:80:"
+
+Returns a array with unique id's of trainers, associated to the given course.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:61:"$byCourseId Id of the course you want to get the trainers for";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:39:"The key of the array is only a counter.";}}s:7:"content";s:0:"";s:12:"content_size";i:1431;s:13:"content_lines";i:39;s:6:"atLine";i:554;}i:29;a:7:{s:6:"header";s:47:"function loadTrainer($byUid='',$byEventId='') {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:305:"
+
+Returns the data of a trainer as associative array. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:79:"$byUid Load the data for an given id of a trainer. This value takes precedence.";}i:1;a:2:{i:0;s:7:"integer";i:1;s:78:"$byEventId Load the data for the trainer which is associated with the eventId.";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:1641;s:13:"content_lines";i:45;s:6:"atLine";i:602;}i:31;a:7:{s:6:"header";s:46:"function listTeachingaidsForCourse($courseId){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:91:"
+
+Returns an array with unique id's of teaching aids associated with the passed course id.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:72:"$courseId Id of the course you would like to load the teaching aids for.";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:49:"The key of this array is only used as an counter.";}}s:7:"content";s:0:"";s:12:"content_size";i:1348;s:13:"content_lines";i:40;s:6:"atLine";i:654;}i:33;a:7:{s:6:"header";s:34:"function loadTeachingaid($id='') {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:302:"
+
+To load the whole data of a teaching aid record. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:25:"$id Id of the teching aid";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:958;s:13:"content_lines";i:30;s:6:"atLine";i:702;}i:35;a:7:{s:6:"header";s:51:"function loadHotel($hotelId='',$arrangementId='') {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:295:"
+
+To load the whole data of a hotel record. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:56:"$hotelId       To receive the data corresponding to a hotel id";}i:1;a:2:{i:0;s:7:"integer";i:1;s:68:"$arrangementId To receive the data corresponding to a arrangement id";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:1819;s:13:"content_lines";i:51;s:6:"atLine";i:741;}i:37;a:7:{s:6:"header";s:39:"function listArrangements($hotelId=''){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:89:"
+
+Returns an array with unique id's of arrangement records, corresponding to a hotel id.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:8:"$hotelId";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:36:"Array key is only used as an counter";}}s:7:"content";s:0:"";s:12:"content_size";i:1386;s:13:"content_lines";i:40;s:6:"atLine";i:799;}i:39;a:4:{s:6:"header";s:47:"function listArrangementsForEvent($eventId=''){";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:91:"
+
+Returns an array with unique id's of arrangement records, corresponding to ann event id.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:8:"$eventId";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:36:"Array key is only used as an counter";}}s:6:"atLine";i:846;}i:41;a:7:{s:6:"header";s:34:"function loadArrangement($id='') {";s:11:"parentClass";s:13:"cAbcoursesDAL";s:4:"cDat";a:3:{s:4:"text";s:295:"
+
+Load the whole data of an arrangement id. The array must be an associatve array where the array key is the attribute name and the array value the attribute it self.
+The array key must related to the default attribute names in the mysql db as delivered with the default abcourses installation.
+";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:3:"$id";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:0:"";}}s:7:"content";s:0:"";s:12:"content_size";i:827;s:13:"content_lines";i:29;s:6:"atLine";i:894;}}}}}
\ No newline at end of file
diff --git a/ext_tables.php b/ext_tables.php
new file mode 100644 (file)
index 0000000..86115de
--- /dev/null
@@ -0,0 +1,267 @@
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+
+## WOP:[tables][1][allow_ce_insert_records]
+t3lib_extMgm::addToInsertRecords("tx_abcourses_course");
+
+$TCA["tx_abcourses_course"] = Array (
+       "ctrl" => Array (
+               "title" => "LLL:EXT:abcourses/locallang_db.xml:tx_abcourses_course",            ## WOP:[tables][1][title]
+               "label" => "title",     ## WOP:[tables][1][header_field]
+               "tstamp" => "tstamp",
+               "crdate" => "crdate",
+               "cruser_id" => "cruser_id",
+               "sortby" => "sorting",  ## WOP:[tables][1][sorting]
+               "delete" => "deleted",  ## WOP:[tables][1][add_deleted]
+               "enablecolumns" => Array (              ## WOP:[tables][1][add_hidden] / [tables][1][add_starttime] / [tables][1][add_endtime] / [tables][1][add_access]
+               "disabled" => "hidden", ## WOP:[tables][1][add_hidden]
+               ),
+               "dynamicConfigFile" => t3lib_extMgm::extPath($_EXTKEY)."tca.php",
+               "iconfile" => t3lib_extMgm::extRelPath($_EXTKEY)."icon_tx_abcourses_course.gif",
+       ),
+       "feInterface" => Array (
+               "fe_admin_fieldList" => "hidden, number, title, subtitle, categorie, type, teachingaids, teaser, description, seodesc, keywords, pages, files, trainers, cost, skilllevel, edupoints, days, conditions, conditionsref",
+       )
+);
+
+
+## WOP:[tables][2][allow_ce_insert_records]
+t3lib_extMgm::addToInsertRecords("tx_abcourses_type");
+
+$TCA["tx_abcourses_type"] = Array (
+       "ctrl" => Array (
+               "title" => "LLL:EXT:abcourses/locallang_db.xml:tx_abcourses_type",              ## WOP:[tables][2][title]
+               "label" => "typename",  ## WOP:[tables][2][header_field]
+               "tstamp" => "tstamp",
+               "crdate" => "crdate",
+               "cruser_id" => "cruser_id",
+               "sortby" => "sorting",  ## WOP:[tables][2][sorting]
+               "dynamicConfigFile" => t3lib_extMgm::extPath($_EXTKEY)."tca.php",
+               "iconfile" => t3lib_extMgm::extRelPath($_EXTKEY)."icon_tx_abcourses_type.gif",
+       ),
+       "feInterface" => Array (
+               "fe_admin_fieldList" => "typename",
+       )
+);
+
+
+## WOP:[tables][2][allow_ce_insert_records]
+t3lib_extMgm::addToInsertRecords("tx_abcourses_teachingaids");
+
+$TCA["tx_abcourses_teachingaids"] = Array (
+       "ctrl" => Array (
+               "title" => "LLL:EXT:abcourses/locallang_db.xml:tx_abcourses_teachingaids",              ## WOP:[tables][2][title]
+               "label" => "name",      ## WOP:[tables][2][header_field]
+               "tstamp" => "tstamp",
+               "crdate" => "crdate",
+               "cruser_id" => "cruser_id",
+               "sortby" => "sorting",  ## WOP:[tables][2][sorting]
+               "dynamicConfigFile" => t3lib_extMgm::extPath($_EXTKEY)."tca.php",
+               "iconfile" => t3lib_extMgm::extRelPath($_EXTKEY)."icon_tx_abcourses_teachingaids.gif",
+       ),
+       "feInterface" => Array (
+               "fe_admin_fieldList" => "name",
+       )
+);
+
+## WOP:[tables][4][allow_on_pages]
+t3lib_extMgm::allowTableOnStandardPages("tx_abcourses_event");
+
+
+## WOP:[tables][4][allow_ce_insert_records]
+t3lib_extMgm::addToInsertRecords("tx_abcourses_event");
+
+$TCA["tx_abcourses_event"] = Array (
+       "ctrl" => Array (
+               "title" => "LLL:EXT:abcourses/locallang_db.xml:tx_abcourses_event",             ## WOP:[tables][4][title]
+               "label" => "event",     ## WOP:[tables][4][header_field]
+               "tstamp" => "tstamp",
+               "crdate" => "crdate",
+               "cruser_id" => "cruser_id",
+               "sortby" => "sorting",  ## WOP:[tables][4][sorting]
+               "delete" => "deleted",  ## WOP:[tables][4][add_deleted]
+               "enablecolumns" => Array (              ## WOP:[tables][4][add_hidden] / [tables][4][add_starttime] / [tables][4][add_endtime] / [tables][4][add_access]
+                       "disabled" => "hidden", ## WOP:[tables][4][add_hidden]
+                       "starttime" => "starttime",     ## WOP:[tables][4][add_starttime]
+                       "endtime" => "endtime", ## WOP:[tables][4][add_endtime]
+               ),
+               "dynamicConfigFile" => t3lib_extMgm::extPath($_EXTKEY)."tca.php",
+               "iconfile" => t3lib_extMgm::extRelPath($_EXTKEY)."icon_tx_abcourses_even