[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14728] formatting
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14728] formatting |
Date: |
Thu, 11 Feb 2016 22:28:53 +0000 |
Revision: 14728
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14728
Author: sigurdne
Date: 2016-02-11 22:28:46 +0000 (Thu, 11 Feb 2016)
Log Message:
-----------
formatting
Modified Paths:
--------------
trunk/activitycalendar/inc/class.menu.inc.php
trunk/activitycalendar/inc/class.soactivity.inc.php
trunk/activitycalendar/inc/class.soarena.inc.php
trunk/activitycalendar/inc/class.socommon.inc.php
trunk/activitycalendar/inc/class.socontactperson.inc.php
trunk/activitycalendar/inc/class.sogroup.inc.php
trunk/activitycalendar/inc/class.soorganization.inc.php
trunk/activitycalendar/inc/class.uiactivities.inc.php
trunk/activitycalendar/inc/class.uiarena.inc.php
trunk/activitycalendar/inc/class.uicommon.inc.php
trunk/activitycalendar/inc/class.uidashboard.inc.php
trunk/activitycalendar/inc/class.uiimport.inc.php
trunk/activitycalendar/inc/class.uiorganization.inc.php
trunk/activitycalendar/inc/model/class.activity.inc.php
trunk/activitycalendar/inc/model/class.arena.inc.php
trunk/activitycalendar/inc/model/class.building.inc.php
trunk/activitycalendar/inc/model/class.category.inc.php
trunk/activitycalendar/inc/model/class.contact_person.inc.php
trunk/activitycalendar/inc/model/class.group.inc.php
trunk/activitycalendar/inc/model/class.model.inc.php
trunk/activitycalendar/inc/model/class.organization.inc.php
trunk/activitycalendar/inc/model/class.target.inc.php
trunk/activitycalendar/index.php
trunk/activitycalendar/js/activitycalendar/activities.edit.js
trunk/activitycalendar/js/activitycalendar/activities.index.js
trunk/activitycalendar/js/activitycalendar/dashboard.index.js
trunk/activitycalendar/setup/default_records.inc.php
trunk/activitycalendar/setup/setup.inc.php
trunk/activitycalendar/setup/tables_current.inc.php
trunk/activitycalendar/setup/tables_update.inc.php
trunk/activitycalendar/templates/base/css/base.css
trunk/activitycalendarfrontend/inc/class.menu.inc.php
trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
trunk/activitycalendarfrontend/index.php
trunk/activitycalendarfrontend/js/activitycalendarfrontend/activity_edit.js
trunk/activitycalendarfrontend/js/activitycalendarfrontend/activity_edit_step_1.js
trunk/activitycalendarfrontend/js/activitycalendarfrontend/activity_new.js
trunk/activitycalendarfrontend/js/activitycalendarfrontend/activity_new_org.js
trunk/activitycalendarfrontend/js/activitycalendarfrontend/activity_new_step_1.js
trunk/activitycalendarfrontend/js/activitycalendarfrontend/organization_edit.js
trunk/activitycalendarfrontend/js/activitycalendarfrontend/organization_reciept.js
trunk/activitycalendarfrontend/setup/default_records.inc.php
trunk/activitycalendarfrontend/setup/setup.inc.php
trunk/activitycalendarfrontend/setup/tables_current.inc.php
trunk/activitycalendarfrontend/setup/tables_update.inc.php
trunk/activitycalendarfrontend/templates/base/config.tpl
trunk/activitycalendarfrontend/templates/base/css/base.css
trunk/booking/frontend.php
trunk/booking/help/index.php
trunk/booking/inc/class.account_helper.inc.php
trunk/booking/inc/class.account_ui_utils.inc.php
trunk/booking/inc/class.async_task.inc.php
trunk/booking/inc/class.async_task_send_reminder.inc.php
trunk/booking/inc/class.async_task_update_reservation_state.inc.php
trunk/booking/inc/class.boaccount_code_set.inc.php
trunk/booking/inc/class.boactivity.inc.php
trunk/booking/inc/class.boagegroup.inc.php
trunk/booking/inc/class.boallocation.inc.php
trunk/booking/inc/class.boapplication.inc.php
trunk/booking/inc/class.boasync_settings.inc.php
trunk/booking/inc/class.boaudience.inc.php
trunk/booking/inc/class.bobooking.inc.php
trunk/booking/inc/class.bobuilding.inc.php
trunk/booking/inc/class.bocommon.inc.php
trunk/booking/inc/class.bocommon_authorized.inc.php
trunk/booking/inc/class.bocommon_global_manager_authorized.inc.php
trunk/booking/inc/class.bocompleted_reservation.inc.php
trunk/booking/inc/class.bocompleted_reservation_export.inc.php
trunk/booking/inc/class.bocompleted_reservation_export_file.inc.php
trunk/booking/inc/class.bocontactperson.inc.php
trunk/booking/inc/class.bodocument.inc.php
trunk/booking/inc/class.bodocument_building.inc.php
trunk/booking/inc/class.bodocument_resource.inc.php
trunk/booking/inc/class.bodocument_view.inc.php
trunk/booking/inc/class.bodocumentation.inc.php
trunk/booking/inc/class.boevent.inc.php
trunk/booking/inc/class.bogroup.inc.php
trunk/booking/inc/class.bomassbooking.inc.php
trunk/booking/inc/class.boorganization.inc.php
trunk/booking/inc/class.bopermission.inc.php
trunk/booking/inc/class.bopermission_building.inc.php
trunk/booking/inc/class.bopermission_document_resource.inc.php
trunk/booking/inc/class.bopermission_massbooking.inc.php
trunk/booking/inc/class.bopermission_resource.inc.php
trunk/booking/inc/class.bopermission_root.inc.php
trunk/booking/inc/class.bopermission_season.inc.php
trunk/booking/inc/class.boresource.inc.php
trunk/booking/inc/class.boseason.inc.php
trunk/booking/inc/class.bosystem_message.inc.php
trunk/booking/inc/class.custom_fields.inc.php
trunk/booking/inc/class.customer_identifier.inc.php
trunk/booking/inc/class.errorstack.inc.php
trunk/booking/inc/class.export_agresso.inc.php
trunk/booking/inc/class.filestorage.inc.php
trunk/booking/inc/class.hook_helper.inc.php
trunk/booking/inc/class.menu.inc.php
trunk/booking/inc/class.ofbooking.inc.php
trunk/booking/inc/class.soaccount_code_set.inc.php
trunk/booking/inc/class.soactivity.inc.php
trunk/booking/inc/class.soagegroup.inc.php
trunk/booking/inc/class.soallocation.inc.php
trunk/booking/inc/class.soapplication.inc.php
trunk/booking/inc/class.soaudience.inc.php
trunk/booking/inc/class.sobilling_sequential_number_generator.inc.php
trunk/booking/inc/class.sobooking.inc.php
trunk/booking/inc/class.sobuilding.inc.php
trunk/booking/inc/class.socommon.inc.php
trunk/booking/inc/class.socompleted_reservation.inc.php
trunk/booking/inc/class.socompleted_reservation_export.inc.php
trunk/booking/inc/class.socompleted_reservation_export_file.inc.php
trunk/booking/inc/class.socontact_organization.inc.php
trunk/booking/inc/class.socontactperson.inc.php
trunk/booking/inc/class.sodocument.inc.php
trunk/booking/inc/class.sodocument_building.inc.php
trunk/booking/inc/class.sodocument_resource.inc.php
trunk/booking/inc/class.sodocument_view.inc.php
trunk/booking/inc/class.sodocumentation.inc.php
trunk/booking/inc/class.soevent.inc.php
trunk/booking/inc/class.sogroup.inc.php
trunk/booking/inc/class.somassbooking.inc.php
trunk/booking/inc/class.soorganization.inc.php
trunk/booking/inc/class.sopermission.inc.php
trunk/booking/inc/class.sopermission_account_code_set.inc.php
trunk/booking/inc/class.sopermission_activity.inc.php
trunk/booking/inc/class.sopermission_agegroup.inc.php
trunk/booking/inc/class.sopermission_allocation.inc.php
trunk/booking/inc/class.sopermission_audience.inc.php
trunk/booking/inc/class.sopermission_booking.inc.php
trunk/booking/inc/class.sopermission_building.inc.php
trunk/booking/inc/class.sopermission_document_building.inc.php
trunk/booking/inc/class.sopermission_document_resource.inc.php
trunk/booking/inc/class.sopermission_event.inc.php
trunk/booking/inc/class.sopermission_group.inc.php
trunk/booking/inc/class.sopermission_massbooking.inc.php
trunk/booking/inc/class.sopermission_organization.inc.php
trunk/booking/inc/class.sopermission_permission.inc.php
trunk/booking/inc/class.sopermission_permission_building.inc.php
trunk/booking/inc/class.sopermission_permission_document_application.inc.php
trunk/booking/inc/class.sopermission_permission_document_building.inc.php
trunk/booking/inc/class.sopermission_permission_document_resource.inc.php
trunk/booking/inc/class.sopermission_permission_resource.inc.php
trunk/booking/inc/class.sopermission_permission_root.inc.php
trunk/booking/inc/class.sopermission_permission_season.inc.php
trunk/booking/inc/class.sopermission_resource.inc.php
trunk/booking/inc/class.sopermission_root.inc.php
trunk/booking/inc/class.sopermission_season.inc.php
trunk/booking/inc/class.soresource.inc.php
trunk/booking/inc/class.soseason.inc.php
trunk/booking/inc/class.sosystem_message.inc.php
trunk/booking/inc/class.uiaccount_code_dimension.inc.php
trunk/booking/inc/class.uiaccount_code_set.inc.php
trunk/booking/inc/class.uiactivity.inc.php
trunk/booking/inc/class.uiagegroup.inc.php
trunk/booking/inc/class.uiallocation.inc.php
trunk/booking/inc/class.uiapplication.inc.php
trunk/booking/inc/class.uiapplication_settings.inc.php
trunk/booking/inc/class.uiasync_settings.inc.php
trunk/booking/inc/class.uiaudience.inc.php
trunk/booking/inc/class.uibooking.inc.php
trunk/booking/inc/class.uibuilding.inc.php
trunk/booking/inc/class.uicommon.inc.php
trunk/booking/inc/class.uicompleted_reservation.inc.php
trunk/booking/inc/class.uicompleted_reservation_export.inc.php
trunk/booking/inc/class.uicompleted_reservation_export_file.inc.php
trunk/booking/inc/class.uicontactperson.inc.php
trunk/booking/inc/class.uidashboard.inc.php
trunk/booking/inc/class.uidocument.inc.php
trunk/booking/inc/class.uidocument_application.inc.php
trunk/booking/inc/class.uidocument_building.inc.php
trunk/booking/inc/class.uidocument_resource.inc.php
trunk/booking/inc/class.uidocument_view.inc.php
trunk/booking/inc/class.uidocumentation.inc.php
trunk/booking/inc/class.uievent.inc.php
trunk/booking/inc/class.uievent_mail_settings.inc.php
trunk/booking/inc/class.uigroup.inc.php
trunk/booking/inc/class.uimail_settings.inc.php
trunk/booking/inc/class.uimassbooking.inc.php
trunk/booking/inc/class.uimetasettings.inc.php
trunk/booking/inc/class.uiorganization.inc.php
trunk/booking/inc/class.uipermission.inc.php
trunk/booking/inc/class.uipermission_building.inc.php
trunk/booking/inc/class.uipermission_massbooking.inc.php
trunk/booking/inc/class.uipermission_resource.inc.php
trunk/booking/inc/class.uipermission_root.inc.php
trunk/booking/inc/class.uipermission_season.inc.php
trunk/booking/inc/class.uireports.inc.php
trunk/booking/inc/class.uiresource.inc.php
trunk/booking/inc/class.uiseason.inc.php
trunk/booking/inc/class.uisend_email.inc.php
trunk/booking/inc/class.uisettings.inc.php
trunk/booking/inc/class.uisystem_message.inc.php
trunk/booking/inc/class.unauthorized_exception.inc.php
trunk/booking/inc/schedule.php
trunk/booking/inc/vendor/symfony/validator/bootstrap.php
trunk/booking/inc/vendor/symfony/validator/i18n/sfValidatorI18nChoiceCountry.class.php
trunk/booking/inc/vendor/symfony/validator/i18n/sfValidatorI18nChoiceLanguage.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorAnd.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorBase.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorBoolean.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorCSRFToken.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorCallback.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorChoice.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorChoiceMany.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorDate.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorDateRange.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorDateTime.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorDecorator.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorEmail.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorError.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorErrorSchema.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorFile.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorFromDescription.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorInteger.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorNorwegianOrganizationNumber.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorNorwegianSSN.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorNumber.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorOr.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorPass.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorRegex.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorSchema.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorSchemaCompare.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorSchemaFilter.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorSchemaForEach.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorString.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorTime.class.php
trunk/booking/inc/vendor/symfony/validator/sfValidatorUrl.class.php
trunk/booking/index.php
trunk/booking/js/booking/allocation.js
trunk/booking/js/booking/allocation_list.js
trunk/booking/js/booking/application.js
trunk/booking/js/booking/booking.js
trunk/booking/js/booking/common.js
trunk/booking/js/booking/completed_reservation.js
trunk/booking/js/booking/document.js
trunk/booking/js/booking/email_send.js
trunk/booking/js/booking/event.js
trunk/booking/js/booking/group_new.js
trunk/booking/js/booking/permission.js
trunk/booking/js/booking/permission_root.js
trunk/booking/js/booking/report.js
trunk/booking/js/booking/resource_new.js
trunk/booking/js/booking/schedule.js
trunk/booking/js/booking/season.js
trunk/booking/js/booking/season.wtemplate.js
trunk/booking/setup/default_records.inc.php
trunk/booking/setup/setup.inc.php
trunk/booking/setup/tables_current.inc.php
trunk/booking/setup/tables_update.inc.php
trunk/booking/tasks/cleanCompletedReservations.php
trunk/booking/tasks/cleanReservations.php
trunk/booking/tasks/entryPoint.php
trunk/booking/tasks/getBookingAppVersion.php
trunk/booking/tasks/randomReservations.php
trunk/booking/tasks/sendReminder.php
trunk/booking/tasks/setBookingAppVersion.php
trunk/booking/tasks/testNumberGenerator.php
trunk/booking/tasks/updateReservationState.php
trunk/booking/templates/base/account_code_dimension.xsl
trunk/booking/templates/base/account_code_set.xsl
trunk/booking/templates/base/account_code_set_form.xsl
trunk/booking/templates/base/activities.xsl
trunk/booking/templates/base/activity_edit.xsl
trunk/booking/templates/base/activity_new.xsl
trunk/booking/templates/base/agegroup_edit.xsl
trunk/booking/templates/base/agegroup_new.xsl
trunk/booking/templates/base/allocation.xsl
trunk/booking/templates/base/allocation_delete.xsl
trunk/booking/templates/base/allocation_delete_preview.xsl
trunk/booking/templates/base/allocation_edit.xsl
trunk/booking/templates/base/allocation_info.xsl
trunk/booking/templates/base/allocation_new.xsl
trunk/booking/templates/base/allocation_new_preview.xsl
trunk/booking/templates/base/application.xsl
trunk/booking/templates/base/application_edit.xsl
trunk/booking/templates/base/application_new.xsl
trunk/booking/templates/base/application_settings.xsl
trunk/booking/templates/base/async_settings_form.xsl
trunk/booking/templates/base/audience_edit.xsl
trunk/booking/templates/base/audience_new.xsl
trunk/booking/templates/base/booking.xsl
trunk/booking/templates/base/booking_delete.xsl
trunk/booking/templates/base/booking_delete_preview.xsl
trunk/booking/templates/base/booking_edit.xsl
trunk/booking/templates/base/booking_new.xsl
trunk/booking/templates/base/booking_new_preview.xsl
trunk/booking/templates/base/building.xsl
trunk/booking/templates/base/building_form.xsl
trunk/booking/templates/base/building_schedule.xsl
trunk/booking/templates/base/completed_reservation.xsl
trunk/booking/templates/base/completed_reservation_edit.xsl
trunk/booking/templates/base/completed_reservation_export.xsl
trunk/booking/templates/base/completed_reservation_export_file.xsl
trunk/booking/templates/base/completed_reservation_export_form.xsl
trunk/booking/templates/base/contactperson.xsl
trunk/booking/templates/base/contactperson_edit.xsl
trunk/booking/templates/base/contactperson_fields.xsl
trunk/booking/templates/base/css/base.css
trunk/booking/templates/base/customer_identifier.xsl
trunk/booking/templates/base/document_form.xsl
trunk/booking/templates/base/documentation_form.xsl
trunk/booking/templates/base/email_index.xsl
trunk/booking/templates/base/email_preview.xsl
trunk/booking/templates/base/email_receipt.xsl
trunk/booking/templates/base/equipment.xsl
trunk/booking/templates/base/equipment_edit.xsl
trunk/booking/templates/base/equipment_new.xsl
trunk/booking/templates/base/event_edit.xsl
trunk/booking/templates/base/event_info.xsl
trunk/booking/templates/base/event_mail_settings.xsl
trunk/booking/templates/base/event_new.xsl
trunk/booking/templates/base/group.xsl
trunk/booking/templates/base/group_edit.xsl
trunk/booking/templates/base/mail_settings.xsl
trunk/booking/templates/base/massbooking_schedule.xsl
trunk/booking/templates/base/metasettings.xsl
trunk/booking/templates/base/organization.xsl
trunk/booking/templates/base/organization_edit.xsl
trunk/booking/templates/base/permission_form.xsl
trunk/booking/templates/base/permission_root_form.xsl
trunk/booking/templates/base/report_freetime.xsl
trunk/booking/templates/base/report_index.xsl
trunk/booking/templates/base/report_participants.xsl
trunk/booking/templates/base/resource.xsl
trunk/booking/templates/base/resource_form.xsl
trunk/booking/templates/base/resource_schedule.xsl
trunk/booking/templates/base/season.xsl
trunk/booking/templates/base/season_boundaries.xsl
trunk/booking/templates/base/season_edit.xsl
trunk/booking/templates/base/season_generate.xsl
trunk/booking/templates/base/season_new.xsl
trunk/booking/templates/base/season_wtemplate.xsl
trunk/booking/templates/base/settings.xsl
trunk/booking/templates/base/system_message.xsl
trunk/booking/templates/base/system_message_edit.xsl
trunk/bookingfrontend/change.php
trunk/bookingfrontend/css/bookingfrontend.css
trunk/bookingfrontend/frontend.php
trunk/bookingfrontend/inc/class.bobuilding.inc.php
trunk/bookingfrontend/inc/class.bosearch.inc.php
trunk/bookingfrontend/inc/class.bouser.inc.php
trunk/bookingfrontend/inc/class.menu.inc.php
trunk/bookingfrontend/inc/class.uiallocation.inc.php
trunk/bookingfrontend/inc/class.uiapplication.inc.php
trunk/bookingfrontend/inc/class.uibooking.inc.php
trunk/bookingfrontend/inc/class.uibuilding.inc.php
trunk/bookingfrontend/inc/class.uicontactperson.inc.php
trunk/bookingfrontend/inc/class.uidocument_application.inc.php
trunk/bookingfrontend/inc/class.uidocument_building.inc.php
trunk/bookingfrontend/inc/class.uidocument_resource.inc.php
trunk/bookingfrontend/inc/class.uidocumentation.inc.php
trunk/bookingfrontend/inc/class.uievent.inc.php
trunk/bookingfrontend/inc/class.uigroup.inc.php
trunk/bookingfrontend/inc/class.uiorganization.inc.php
trunk/bookingfrontend/inc/class.uiresource.inc.php
trunk/bookingfrontend/inc/class.uisearch.inc.php
trunk/bookingfrontend/inc/class.uisystem_message.inc.php
trunk/bookingfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
trunk/bookingfrontend/inc/custom/default/Altinn_Bergen_kommune.php
trunk/bookingfrontend/inc/custom/default/MinId.php
trunk/bookingfrontend/inc/hook_config.inc.php
trunk/bookingfrontend/index.php
trunk/bookingfrontend/js/bookingfrontend/application.js
trunk/bookingfrontend/js/bookingfrontend/booking.js
trunk/bookingfrontend/js/bookingfrontend/booking_massupdate.js
trunk/bookingfrontend/js/bookingfrontend/event.js
trunk/bookingfrontend/js/bookingfrontend/schedule.js
trunk/bookingfrontend/js/bookingfrontend/search.js
trunk/bookingfrontend/login.php
trunk/bookingfrontend/logout.php
trunk/bookingfrontend/setup/default_records.inc.php
trunk/bookingfrontend/setup/setup.inc.php
trunk/bookingfrontend/setup/tables_update.inc.php
trunk/bookingfrontend/templates/base/allocation_cancel.xsl
trunk/bookingfrontend/templates/base/allocation_delete.xsl
trunk/bookingfrontend/templates/base/allocation_delete_preview.xsl
trunk/bookingfrontend/templates/base/application_new.xsl
trunk/bookingfrontend/templates/base/booking_cancel.xsl
trunk/bookingfrontend/templates/base/booking_delete.xsl
trunk/bookingfrontend/templates/base/booking_delete_preview.xsl
trunk/bookingfrontend/templates/base/booking_edit.xsl
trunk/bookingfrontend/templates/base/booking_edit_preview.xsl
trunk/bookingfrontend/templates/base/booking_massupdate.xsl
trunk/bookingfrontend/templates/base/booking_new.xsl
trunk/bookingfrontend/templates/base/booking_new_preview.xsl
trunk/bookingfrontend/templates/base/building.xsl
trunk/bookingfrontend/templates/base/building_schedule.xsl
trunk/bookingfrontend/templates/base/config.tpl
trunk/bookingfrontend/templates/base/event_info.xsl
trunk/bookingfrontend/templates/base/group.xsl
trunk/bookingfrontend/templates/base/group_edit.xsl
trunk/bookingfrontend/templates/base/organization.xsl
trunk/bookingfrontend/templates/base/organization_edit.xsl
trunk/bookingfrontend/templates/base/report_numbers.xsl
trunk/bookingfrontend/templates/base/resource.xsl
trunk/bookingfrontend/templates/base/resource_schedule.xsl
trunk/bookingfrontend/templates/base/search.xsl
trunk/bookingfrontend/templates/base/system_message.xsl
trunk/bookingfrontend/templates/fjell/access_denied.xsl
trunk/bookingfrontend/templates/fjell/allocation_cancel.xsl
trunk/bookingfrontend/templates/fjell/allocation_delete.xsl
trunk/bookingfrontend/templates/fjell/allocation_delete_preview.xsl
trunk/bookingfrontend/templates/fjell/allocation_info.xsl
trunk/bookingfrontend/templates/fjell/application_new.xsl
trunk/bookingfrontend/templates/fjell/booking_cancel.xsl
trunk/bookingfrontend/templates/fjell/booking_delete.xsl
trunk/bookingfrontend/templates/fjell/booking_delete_preview.xsl
trunk/bookingfrontend/templates/fjell/booking_edit.xsl
trunk/bookingfrontend/templates/fjell/booking_edit_preview.xsl
trunk/bookingfrontend/templates/fjell/booking_info.xsl
trunk/bookingfrontend/templates/fjell/booking_massupdate.xsl
trunk/bookingfrontend/templates/fjell/booking_new.xsl
trunk/bookingfrontend/templates/fjell/booking_new_preview.xsl
trunk/bookingfrontend/templates/fjell/building.xsl
trunk/bookingfrontend/templates/fjell/building_schedule.xsl
trunk/bookingfrontend/templates/fjell/config.tpl
trunk/bookingfrontend/templates/fjell/event_delete.xsl
trunk/bookingfrontend/templates/fjell/event_edit.xsl
trunk/bookingfrontend/templates/fjell/event_info.xsl
trunk/bookingfrontend/templates/fjell/group.xsl
trunk/bookingfrontend/templates/fjell/organization.xsl
trunk/bookingfrontend/templates/fjell/report_numbers.xsl
trunk/bookingfrontend/templates/fjell/resource.xsl
trunk/bookingfrontend/templates/fjell/resource_schedule.xsl
trunk/bookingfrontend/templates/fjell/search.xsl
trunk/bookingfrontend/templates/fjell/system_message.xsl
trunk/bookingfrontend/templates/stavanger/access_denied.xsl
trunk/bookingfrontend/templates/stavanger/allocation_cancel.xsl
trunk/bookingfrontend/templates/stavanger/allocation_delete.xsl
trunk/bookingfrontend/templates/stavanger/allocation_delete_preview.xsl
trunk/bookingfrontend/templates/stavanger/allocation_info.xsl
trunk/bookingfrontend/templates/stavanger/application_new.xsl
trunk/bookingfrontend/templates/stavanger/booking_cancel.xsl
trunk/bookingfrontend/templates/stavanger/booking_delete.xsl
trunk/bookingfrontend/templates/stavanger/booking_delete_preview.xsl
trunk/bookingfrontend/templates/stavanger/booking_edit.xsl
trunk/bookingfrontend/templates/stavanger/booking_edit_preview.xsl
trunk/bookingfrontend/templates/stavanger/booking_info.xsl
trunk/bookingfrontend/templates/stavanger/booking_massupdate.xsl
trunk/bookingfrontend/templates/stavanger/booking_new.xsl
trunk/bookingfrontend/templates/stavanger/booking_new_preview.xsl
trunk/bookingfrontend/templates/stavanger/building.xsl
trunk/bookingfrontend/templates/stavanger/building_schedule.xsl
trunk/bookingfrontend/templates/stavanger/config.tpl
trunk/bookingfrontend/templates/stavanger/event_delete.xsl
trunk/bookingfrontend/templates/stavanger/event_edit.xsl
trunk/bookingfrontend/templates/stavanger/event_info.xsl
trunk/bookingfrontend/templates/stavanger/group.xsl
trunk/bookingfrontend/templates/stavanger/organization.xsl
trunk/bookingfrontend/templates/stavanger/report_numbers.xsl
trunk/bookingfrontend/templates/stavanger/resource.xsl
trunk/bookingfrontend/templates/stavanger/resource_schedule.xsl
trunk/bookingfrontend/templates/stavanger/search.xsl
trunk/bookingfrontend/templates/stavanger/system_message.xsl
trunk/controller/inc/class.cat_hooks.inc.php
trunk/controller/inc/class.hook_helper.inc.php
trunk/controller/inc/class.menu.inc.php
trunk/controller/inc/class.socase.inc.php
trunk/controller/inc/class.socheck_item.inc.php
trunk/controller/inc/class.socheck_list.inc.php
trunk/controller/inc/class.socommon.inc.php
trunk/controller/inc/class.socontrol.inc.php
trunk/controller/inc/class.socontrol_group.inc.php
trunk/controller/inc/class.socontrol_group_list.inc.php
trunk/controller/inc/class.socontrol_item.inc.php
trunk/controller/inc/class.socontrol_item_list.inc.php
trunk/controller/inc/class.socontrol_item_option.inc.php
trunk/controller/inc/class.sodocument.inc.php
trunk/controller/inc/class.soprocedure.inc.php
trunk/controller/inc/class.uicalendar.inc.php
trunk/controller/inc/class.uicase.inc.php
trunk/controller/inc/class.uicheck_list.inc.php
trunk/controller/inc/class.uicheck_list_for_component.inc.php
trunk/controller/inc/class.uicomponent.inc.php
trunk/controller/inc/class.uicontrol.inc.php
trunk/controller/inc/class.uicontrol_group.inc.php
trunk/controller/inc/class.uicontrol_group_component.inc.php
trunk/controller/inc/class.uicontrol_item.inc.php
trunk/controller/inc/class.uicontrol_register_to_component.inc.php
trunk/controller/inc/class.uicontrol_register_to_location.inc.php
trunk/controller/inc/class.uidocument.inc.php
trunk/controller/inc/class.uilookup.inc.php
trunk/controller/inc/class.uiprocedure.inc.php
trunk/controller/inc/component/class.check_list_status_info.inc.php
trunk/controller/inc/component/class.check_list_status_manager.inc.php
trunk/controller/inc/component/class.date_generator.inc.php
trunk/controller/inc/component/class.month_calendar.inc.php
trunk/controller/inc/component/class.status_agg_month_info.inc.php
trunk/controller/inc/component/class.year_calendar.inc.php
trunk/controller/inc/component/class.year_calendar_agg.inc.php
trunk/controller/inc/helper/class.date_converter.inc.php
trunk/controller/inc/helper/class.location_finder.inc.php
trunk/controller/inc/hook_config.inc.php
trunk/controller/inc/hook_settings.inc.php
trunk/controller/inc/model/class.check_item.inc.php
trunk/controller/inc/model/class.check_item_case.inc.php
trunk/controller/inc/model/class.check_list.inc.php
trunk/controller/inc/model/class.component.inc.php
trunk/controller/inc/model/class.control.inc.php
trunk/controller/inc/model/class.control_group.inc.php
trunk/controller/inc/model/class.control_group_list.inc.php
trunk/controller/inc/model/class.control_item.inc.php
trunk/controller/inc/model/class.control_item_list.inc.php
trunk/controller/inc/model/class.control_item_option.inc.php
trunk/controller/inc/model/class.control_location.inc.php
trunk/controller/inc/model/class.document.inc.php
trunk/controller/inc/model/class.model.inc.php
trunk/controller/inc/model/class.procedure.inc.php
trunk/controller/js/controller/ajax.js
trunk/controller/js/controller/ajax_control_to_component.js
trunk/controller/js/controller/ajax_control_to_location.js
trunk/controller/js/controller/case.js
trunk/controller/js/controller/check_list.js
trunk/controller/js/controller/check_list_update_status.js
trunk/controller/js/controller/control_group_to_component.js
trunk/controller/js/controller/custom_drag_drop.js
trunk/controller/js/controller/custom_ui.js
trunk/demo/inc/class.bodemo.inc.php
trunk/demo/inc/class.menu.inc.php
trunk/demo/inc/class.sodemo.inc.php
trunk/demo/inc/class.uidemo.inc.php
trunk/demo/inc/custom/demo_custom.php
trunk/demo/inc/hook_help.inc.php
trunk/demo/inc/hook_manual.inc.php
trunk/demo/inc/hook_preferences.inc.php
trunk/demo/inc/hook_settings.inc.php
trunk/demo/index.php
trunk/demo/js/yahoo/demo.edit.js
trunk/demo/js/yahoo/demo.index.js
trunk/demo/setup/default_records.inc.php
trunk/demo/setup/setup.inc.php
trunk/demo/setup/tables_current.inc.php
trunk/demo/setup/tables_update.inc.php
trunk/demo/templates/base/app_data.xsl
trunk/demo/templates/base/app_delete.xsl
trunk/demo/templates/base/attributes_form.xsl
trunk/demo/templates/base/attributes_view.xsl
trunk/demo/templates/base/config.tpl
trunk/demo/templates/base/demo.xsl
trunk/demo/templates/base/edit.xsl
trunk/demo/templates/base/nextmatchs.xsl
trunk/demo/templates/base/no_access.xsl
trunk/demo/templates/base/search_field.xsl
trunk/demo/templates/verdilak/app_data.xsl
trunk/demo/templates/verdilak/css/verdilak.css
trunk/frontend/inc/class.bofellesdata.inc.php
trunk/frontend/inc/class.bofrontend.inc.php
trunk/frontend/inc/class.boproperty.inc.php
trunk/frontend/inc/class.borental.inc.php
trunk/frontend/inc/class.hook_helper.inc.php
trunk/frontend/inc/class.menu.inc.php
trunk/frontend/inc/class.sorental.inc.php
trunk/frontend/inc/class.uicommon.inc.php
trunk/frontend/inc/class.uicontract.inc.php
trunk/frontend/inc/class.uicontract_documents.inc.php
trunk/frontend/inc/class.uicontract_ex.inc.php
trunk/frontend/inc/class.uicontract_in.inc.php
trunk/frontend/inc/class.uicontract_internal.inc.php
trunk/frontend/inc/class.uicontroller.inc.php
trunk/frontend/inc/class.uidelegates.inc.php
trunk/frontend/inc/class.uidocumentupload.inc.php
trunk/frontend/inc/class.uidrawings.inc.php
trunk/frontend/inc/class.uientity.inc.php
trunk/frontend/inc/class.uifrontend.inc.php
trunk/frontend/inc/class.uihelpdesk.inc.php
trunk/frontend/inc/class.uimaintenance.inc.php
trunk/frontend/inc/class.uimessages.inc.php
trunk/frontend/inc/class.uipictures.inc.php
trunk/frontend/inc/class.uirefurbishment.inc.php
trunk/frontend/inc/class.uiservices.inc.php
trunk/frontend/inc/hook_config.inc.php
trunk/frontend/inc/model/class.ticket.inc.php
trunk/frontend/index.php
trunk/frontend/js/jquery/entity.list.js
trunk/frontend/js/jquery/helpdesk.list.js
trunk/frontend/js/jquery/menu.js
trunk/frontend/setup/default_records.inc.php
trunk/frontend/setup/setup.inc.php
trunk/frontend/setup/tables_update.inc.php
trunk/frontend/templates/base/app_data.xsl
trunk/frontend/templates/base/attributes_view.xsl
trunk/frontend/templates/base/config.tpl
trunk/frontend/templates/base/contract.xsl
trunk/frontend/templates/base/controller.xsl
trunk/frontend/templates/base/datatable.xsl
trunk/frontend/templates/base/delegate.xsl
trunk/frontend/templates/base/demo.xsl
trunk/frontend/templates/base/document.xsl
trunk/frontend/templates/base/documentupload.xsl
trunk/frontend/templates/base/drawings.xsl
trunk/frontend/templates/base/entity.xsl
trunk/frontend/templates/base/entityview.xsl
trunk/frontend/templates/base/helpdesk.xsl
trunk/frontend/templates/base/maintenance.xsl
trunk/frontend/templates/base/messages.xsl
trunk/frontend/templates/base/pictures.xsl
trunk/frontend/templates/base/refurbishment.xsl
trunk/frontend/templates/base/services.xsl
trunk/frontend/templates/base/ticketview.xsl
trunk/logistic/inc/class.menu.inc.php
trunk/logistic/inc/class.soactivity.inc.php
trunk/logistic/inc/class.socommon.inc.php
trunk/logistic/inc/class.soproject.inc.php
trunk/logistic/inc/class.sorequirement.inc.php
trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
trunk/logistic/inc/class.sorequirement_value.inc.php
trunk/logistic/inc/class.soresource_type_requirement.inc.php
trunk/logistic/inc/class.uiactivity.inc.php
trunk/logistic/inc/class.uiproject.inc.php
trunk/logistic/inc/class.uirequirement.inc.php
trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
trunk/logistic/inc/class.uiresource_type_requirement.inc.php
trunk/logistic/inc/model/class.activity.inc.php
trunk/logistic/inc/model/class.model.inc.php
trunk/logistic/inc/model/class.project.inc.php
trunk/logistic/inc/model/class.requirement.inc.php
trunk/logistic/inc/model/class.requirement_resource_allocation.inc.php
trunk/logistic/inc/model/class.requirement_value.inc.php
trunk/logistic/inc/model/class.resource_type_requirement.inc.php
trunk/logistic/js/logistic/activity.js
trunk/logistic/js/logistic/ajax.js
trunk/logistic/js/logistic/assign_job.js
trunk/logistic/js/logistic/project.js
trunk/logistic/js/logistic/requirement.js
trunk/logistic/js/logistic/requirement_overview.js
trunk/logistic/js/logistic/resource_allocation.js
trunk/logistic/js/logistic/resource_type_requirement.js
trunk/manual/help/EN/home.php
trunk/manual/help/EN/overview.php
trunk/manual/inc/class.bodocuments.inc.php
trunk/manual/inc/class.cat_hooks.inc.php
trunk/manual/inc/class.help.inc.php
trunk/manual/inc/class.help_helper.inc.php
trunk/manual/inc/class.menu.inc.php
trunk/manual/inc/class.uidocuments.inc.php
trunk/manual/inc/class.uimanual.inc.php
trunk/manual/inc/class.uisupport.inc.php
trunk/manual/inc/hook_help.inc.php
trunk/manual/inc/hook_sidebox_menu.inc.php
trunk/manual/index.php
trunk/manual/js/portico/documents.add.js
trunk/manual/js/portico/documents.view.js
trunk/manual/setup/default_records.inc.php
trunk/manual/setup/setup.inc.php
trunk/manual/setup/tables_update.inc.php
trunk/manual/templates/base/app_data.xsl
trunk/manual/templates/base/documents_add.xsl
trunk/manual/templates/base/help.xsl
trunk/manual/templates/base/help_data.xsl
trunk/manual/templates/base/odt2html.xsl
trunk/manual/templates/base/odt2xhtml.xsl
trunk/manual/templates/base/support.xsl
trunk/manual/templates/base/sxw2xhtml.xsl
trunk/messenger/inc/class.bomessenger.inc.php
trunk/messenger/inc/class.hook_helper.inc.php
trunk/messenger/inc/class.menu.inc.php
trunk/messenger/inc/class.somessenger.inc.php
trunk/messenger/inc/class.somessenger_imap.inc.php
trunk/messenger/inc/class.somessenger_sql.inc.php
trunk/messenger/inc/class.uimessenger.inc.php
trunk/messenger/inc/hook_after_navbar.inc.php
trunk/messenger/inc/hook_config.inc.php
trunk/messenger/index.php
trunk/messenger/setup/default_records.inc.php
trunk/messenger/setup/setup.inc.php
trunk/messenger/setup/tables_baseline.inc.php
trunk/messenger/setup/tables_current.inc.php
trunk/messenger/setup/tables_update.inc.php
trunk/messenger/templates/base/app_data.xsl
trunk/messenger/templates/base/config.tpl
trunk/messenger/templates/base/form.tpl
trunk/messenger/templates/base/header.tpl
trunk/messenger/templates/base/inbox.tpl
trunk/messenger/templates/base/messenger.xsl
trunk/mobilefrontend/controller/class.uicalendar.inc.php
trunk/mobilefrontend/controller/class.uicase.inc.php
trunk/mobilefrontend/controller/class.uicheck_list.inc.php
trunk/mobilefrontend/controller/class.uicheck_list_for_component.inc.php
trunk/mobilefrontend/controller/class.uicomponent.inc.php
trunk/mobilefrontend/controller/class.uicontrol.inc.php
trunk/mobilefrontend/controller/class.uicontrol_group.inc.php
trunk/mobilefrontend/controller/class.uicontrol_group_component.inc.php
trunk/mobilefrontend/controller/class.uicontrol_item.inc.php
trunk/mobilefrontend/controller/class.uicontrol_register_to_component.inc.php
trunk/mobilefrontend/controller/class.uicontrol_register_to_location.inc.php
trunk/mobilefrontend/controller/class.uidocument.inc.php
trunk/mobilefrontend/controller/class.uiprocedure.inc.php
trunk/mobilefrontend/home.php
trunk/mobilefrontend/inc/class.bocommon.inc.php
trunk/mobilefrontend/inc/class.hook_helper.inc.php
trunk/mobilefrontend/inc/class.menu.inc.php
trunk/mobilefrontend/inc/class.uifront.inc.php
trunk/mobilefrontend/index.php
trunk/mobilefrontend/login.php
trunk/mobilefrontend/logout.php
trunk/mobilefrontend/manual/class.uidocuments.inc.php
trunk/mobilefrontend/property/class.notify.inc.php
trunk/mobilefrontend/property/class.uicondition_survey.inc.php
trunk/mobilefrontend/property/class.uidocument.inc.php
trunk/mobilefrontend/property/class.uientity.inc.php
trunk/mobilefrontend/property/class.uilocation.inc.php
trunk/mobilefrontend/property/class.uilookup.inc.php
trunk/mobilefrontend/property/class.uirequest.inc.php
trunk/mobilefrontend/property/class.uitts.inc.php
trunk/mobilefrontend/setup/setup.inc.php
trunk/mobilefrontend/setup/tables_update.inc.php
trunk/mobilefrontend/templates/base/app_data.xsl
trunk/mobilefrontend/templates/mobilefrontend/app_data.xsl
trunk/mobilefrontend/templates/mobilefrontend/hello_world.xsl
trunk/registration/inc/class.bomanagefields.inc.php
trunk/registration/inc/class.bopending.inc.php
trunk/registration/inc/class.boreg.inc.php
trunk/registration/inc/class.hook_helper.inc.php
trunk/registration/inc/class.menu.inc.php
trunk/registration/inc/class.somanagefields.inc.php
trunk/registration/inc/class.sopending.inc.php
trunk/registration/inc/class.soreg.inc.php
trunk/registration/inc/class.uimanagefields.inc.php
trunk/registration/inc/class.uipending.inc.php
trunk/registration/inc/class.uireg.inc.php
trunk/registration/inc/hook_admin.inc.php
trunk/registration/inc/hook_config.inc.php
trunk/registration/inc/hook_logout.inc.php
trunk/registration/index.php
trunk/registration/js/portico/ajax.js
trunk/registration/js/portico/pending.index.js
trunk/registration/main.php
trunk/registration/setup/default_records.inc.php
trunk/registration/setup/setup.inc.php
trunk/registration/setup/tables_baseline.inc.php
trunk/registration/setup/tables_current.inc.php
trunk/registration/setup/tables_update.inc.php
trunk/registration/templates/base/app_data.xsl
trunk/registration/templates/base/config.tpl
trunk/registration/templates/base/confirm_email.tpl
trunk/registration/templates/base/confirm_email_sent.tpl
trunk/registration/templates/base/confirm_email_sent_lostpw.tpl
trunk/registration/templates/base/confirm_pending_approval.tpl
trunk/registration/templates/base/css/base.css
trunk/registration/templates/base/error_confirm.tpl
trunk/registration/templates/base/error_general.tpl
trunk/registration/templates/base/fields.tpl
trunk/registration/templates/base/layout.tpl
trunk/registration/templates/base/loginid_select.tpl
trunk/registration/templates/base/lostpw_change.tpl
trunk/registration/templates/base/lostpw_changed.tpl
trunk/registration/templates/base/lostpw_email.tpl
trunk/registration/templates/base/lostpw_select.tpl
trunk/registration/templates/base/personal_info.tpl
trunk/registration/templates/base/user_edit.xsl
trunk/registration/templates/base/welcome_message.tpl
trunk/rental/inc/SnappyMedia.php
trunk/rental/inc/SnappyPdf.php
trunk/rental/inc/class.bofellesdata.inc.php
trunk/rental/inc/class.hook_helper.inc.php
trunk/rental/inc/class.menu.inc.php
trunk/rental/inc/class.soadjustment.inc.php
trunk/rental/inc/class.sobilling.inc.php
trunk/rental/inc/class.sobilling_info.inc.php
trunk/rental/inc/class.socommon.inc.php
trunk/rental/inc/class.socomposite.inc.php
trunk/rental/inc/class.socontract.inc.php
trunk/rental/inc/class.socontract_price_item.inc.php
trunk/rental/inc/class.sodocument.inc.php
trunk/rental/inc/class.soinvoice.inc.php
trunk/rental/inc/class.soinvoice_price_item.inc.php
trunk/rental/inc/class.sonotification.inc.php
trunk/rental/inc/class.soparty.inc.php
trunk/rental/inc/class.soprice_item.inc.php
trunk/rental/inc/class.sounit.inc.php
trunk/rental/inc/class.soworkbench_notification.inc.php
trunk/rental/inc/class.uiadjustment.inc.php
trunk/rental/inc/class.uibilling.inc.php
trunk/rental/inc/class.uicommon.inc.php
trunk/rental/inc/class.uicomposite.inc.php
trunk/rental/inc/class.uicontract.inc.php
trunk/rental/inc/class.uidelegate.inc.php
trunk/rental/inc/class.uidocument.inc.php
trunk/rental/inc/class.uifrontpage.inc.php
trunk/rental/inc/class.uiimport.inc.php
trunk/rental/inc/class.uiinvoice_price_item.inc.php
trunk/rental/inc/class.uimakepdf.inc.php
trunk/rental/inc/class.uinotification.inc.php
trunk/rental/inc/class.uiparty.inc.php
trunk/rental/inc/class.uiprice_item.inc.php
trunk/rental/inc/class.uiproperty_location.inc.php
trunk/rental/inc/class.uiresultunit.inc.php
trunk/rental/inc/class.uiunit.inc.php
trunk/rental/inc/custom/default/NLSH_add_contract_from_composite.php
trunk/rental/inc/export/default/customer.php
trunk/rental/inc/hook_config.inc.php
trunk/rental/inc/hook_settings.inc.php
trunk/rental/inc/locations/class.city_counsil_dep.inc.php
trunk/rental/inc/locations/class.location_hierarchy.inc.php
trunk/rental/inc/locations/class.organisational_location.inc.php
trunk/rental/inc/locations/class.result_unit.inc.php
trunk/rental/inc/model/class.adjustment.inc.php
trunk/rental/inc/model/class.agresso_cs15.inc.php
trunk/rental/inc/model/class.agresso_gl07.inc.php
trunk/rental/inc/model/class.agresso_lg04.inc.php
trunk/rental/inc/model/class.billing.inc.php
trunk/rental/inc/model/class.billing_info.inc.php
trunk/rental/inc/model/class.composite.inc.php
trunk/rental/inc/model/class.contract.inc.php
trunk/rental/inc/model/class.contract_date.inc.php
trunk/rental/inc/model/class.contract_price_item.inc.php
trunk/rental/inc/model/class.default_export.inc.php
trunk/rental/inc/model/class.document.inc.php
trunk/rental/inc/model/class.exportable.inc.php
trunk/rental/inc/model/class.invoice.inc.php
trunk/rental/inc/model/class.invoice_price_item.inc.php
trunk/rental/inc/model/class.model.inc.php
trunk/rental/inc/model/class.notification.inc.php
trunk/rental/inc/model/class.party.inc.php
trunk/rental/inc/model/class.price_item.inc.php
trunk/rental/inc/model/class.property_location.inc.php
trunk/rental/inc/model/class.unit.inc.php
trunk/rental/inc/model/class.validator.inc.php
trunk/rental/inc/plugins/fellesdata/party.edit.php
trunk/rental/index.php
trunk/rental/js/rental/billing.add.js
trunk/rental/js/rental/billing.index.js
trunk/rental/js/rental/composite.edit.js
trunk/rental/js/rental/composite.view.js
trunk/rental/js/rental/contract.edit.js
trunk/rental/js/rental/contract.index.js
trunk/rental/js/rental/frontpage.index.js
trunk/rental/js/rental/party.edit.js
trunk/rental/js/rental/party.sync.js
trunk/rental/js/rental/price_item.adjust_price.js
trunk/rental/js/rental/resultunit.edit.js
trunk/rental/setup/default_records.inc.php
trunk/rental/setup/setup.inc.php
trunk/rental/setup/tables_current.inc.php
trunk/rental/setup/tables_update.inc.php
trunk/rental/templates/base/config.tpl
trunk/rental/templates/base/css/base.css
trunk/sms/addressbook.php
trunk/sms/bin/default/config_BR
trunk/sms/bin/default/config_BR_log
trunk/sms/bin/default/config_SD
trunk/sms/bin/default/config_SD_log
trunk/sms/bin/default/config_ST
trunk/sms/bin/default/config_STATUS_log
trunk/sms/bin/default/config_ST_log
trunk/sms/bin/default/config_VASK
trunk/sms/bin/default/config_VASK_log
trunk/sms/bin/default/log_firealarm.php
trunk/sms/bin/default/receipt_service_agreement.php
trunk/sms/bin/default/set_workorder_status.php
trunk/sms/inc/class.boautoreply.inc.php
trunk/sms/inc/class.bocommand.inc.php
trunk/sms/inc/class.bocommon.inc.php
trunk/sms/inc/class.bopoll.inc.php
trunk/sms/inc/class.bosms.inc.php
trunk/sms/inc/class.menu.inc.php
trunk/sms/inc/class.sms.inc.php
trunk/sms/inc/class.soautoreply.inc.php
trunk/sms/inc/class.socommand.inc.php
trunk/sms/inc/class.sopoll.inc.php
trunk/sms/inc/class.sosms.inc.php
trunk/sms/inc/class.uiautoreply.inc.php
trunk/sms/inc/class.uiboard.inc.php
trunk/sms/inc/class.uicommand.inc.php
trunk/sms/inc/class.uicustom.inc.php
trunk/sms/inc/class.uipoll.inc.php
trunk/sms/inc/class.uisms.inc.php
trunk/sms/inc/config.php
trunk/sms/inc/feedcreator.class.php
trunk/sms/inc/hook_admin.inc.php
trunk/sms/inc/hook_preferences.inc.php
trunk/sms/inc/hook_settings.inc.php
trunk/sms/inc/plugin/gateway/bergen_kommune/SmsService.php
trunk/sms/inc/plugin/gateway/bergen_kommune/get.php
trunk/sms/inc/plugin/gateway/bergen_kommune/send.php
trunk/sms/inc/plugin/gateway/carrot/SMSGatewayService.php
trunk/sms/inc/plugin/gateway/carrot/fn.php
trunk/sms/inc/plugin/gateway/carrot/get.php
trunk/sms/inc/plugin/gateway/carrot/send.php
trunk/sms/inc/plugin/gateway/clickatell/callback.php
trunk/sms/inc/plugin/gateway/clickatell/config.php
trunk/sms/inc/plugin/gateway/clickatell/fn.php
trunk/sms/inc/plugin/gateway/clickatell/manage.php
trunk/sms/inc/plugin/gateway/gnokii/fn.php
trunk/sms/inc/plugin/gateway/gnokii/get.php
trunk/sms/inc/plugin/gateway/gnokii/send.php
trunk/sms/inc/plugin/gateway/kannel/config.php
trunk/sms/inc/plugin/gateway/kannel/dlr.php
trunk/sms/inc/plugin/gateway/kannel/fn.php
trunk/sms/inc/plugin/gateway/kannel/geturl.php
trunk/sms/inc/plugin/gateway/kannel/manage.php
trunk/sms/inc/plugin/gateway/pswin/Receive.wsdl
trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php
trunk/sms/inc/plugin/gateway/pswin/SMSService.php
trunk/sms/inc/plugin/gateway/pswin/get.php
trunk/sms/inc/plugin/gateway/pswin/send.php
trunk/sms/inc/plugin/gateway/pswin/soap.php
trunk/sms/inc/plugin/gateway/template/config.php
trunk/sms/inc/plugin/gateway/template/fn.php
trunk/sms/inc/plugin/gateway/template/manage.php
trunk/sms/inc/plugin/gateway/uplink/config.php
trunk/sms/inc/plugin/gateway/uplink/fn.php
trunk/sms/inc/plugin/gateway/uplink/manage.php
trunk/sms/index.php
trunk/sms/init.php
trunk/sms/setup/bin/phpgwsmsd
trunk/sms/setup/bin/phpgwsmsd.php
trunk/sms/setup/default_records.inc.php
trunk/sms/setup/setup.inc.php
trunk/sms/setup/tables_current.inc.php
trunk/sms/setup/tables_update.inc.php
trunk/sms/templates/base/app_data.xsl
trunk/sms/templates/base/app_delete.xsl
trunk/sms/templates/base/autoreply.xsl
trunk/sms/templates/base/cat_filter.xsl
trunk/sms/templates/base/cat_select.xsl
trunk/sms/templates/base/command.xsl
trunk/sms/templates/base/config.tpl
trunk/sms/templates/base/filter_filter.xsl
trunk/sms/templates/base/menu.xsl
trunk/sms/templates/base/nextmatchs.xsl
trunk/sms/templates/base/no_access.xsl
trunk/sms/templates/base/poll.xsl
trunk/sms/templates/base/search_field.xsl
trunk/sms/templates/base/sms.xsl
trunk/sms/templates/verdilak/app_data.xsl
trunk/sms/templates/verdilak/css/verdilak.css
Modified: trunk/activitycalendar/inc/class.menu.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.menu.inc.php 2016-02-11 22:07:53 UTC
(rev 14727)
+++ trunk/activitycalendar/inc/class.menu.inc.php 2016-02-11 22:28:46 UTC
(rev 14728)
@@ -10,57 +10,57 @@
$menus = array();
$menus['navbar'] = array
- (
+ (
'activitycalendar' => array
- (
- 'text' => lang('Activitycalendar'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uidashboard.index')),
- 'image' => array('property', 'location'),
- 'order' => 10,
- 'group' => 'office'
+ (
+ 'text' => lang('Activitycalendar'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uidashboard.index')),
+ 'image' => array('property',
'location'),
+ 'order' => 10,
+ 'group' => 'office'
)
);
- $menus['navigation'] = array
- (
+ $menus['navigation'] = array
+ (
'dashboard' => array
- (
- 'text' => lang('dashboard'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uidashboard.index')),
- 'image' => array('property', 'location_tenant'),
+ (
+ 'text' => lang('dashboard'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uidashboard.index')),
+ 'image' => array('property',
'location_tenant'),
),
'activities' => array
- (
- 'text' => lang('Activities'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.index')),
- 'image' => array('property', 'location_tenant'),
+ (
+ 'text' => lang('Activities'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.index')),
+ 'image' => array('property',
'location_tenant'),
),
'arena' => array
- (
- 'text' => lang('Arena'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.index')),
- 'image' => array('property',
'location_1'),
+ (
+ 'text' => lang('Arena'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.index')),
+ 'image' => array('property',
'location_1'),
),
'organizationList' => array
- (
- 'text' => lang('OrganizationList'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.index')),
- 'image' => array('property', 'location_tenant'),
- 'children' => array(
-
'changed_organizations' => array
- (
- 'text'
=> lang('changed_org_group'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.changed_organizations')),
- 'image'
=> array('property', 'location_tenant')
- )
- )
- )
+ (
+ 'text' => lang('OrganizationList'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.index')),
+ 'image' => array('property',
'location_tenant'),
+ 'children' => array(
+ 'changed_organizations' => array
+ (
+ 'text' =>
lang('changed_org_group'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.changed_organizations')),
+ 'image' =>
array('property', 'location_tenant')
+ )
+ )
+ )
);
-
+
$menus['folders'] =
phpgwapi_menu::get_categories('bergen');
$GLOBALS['phpgw_info']['flags']['currentapp'] =
$incoming_app;
return $menus;
}
- }
+ }
\ No newline at end of file
Modified: trunk/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soactivity.inc.php 2016-02-11 22:07:53 UTC
(rev 14727)
+++ trunk/activitycalendar/inc/class.soactivity.inc.php 2016-02-11 22:28:46 UTC
(rev 14728)
@@ -11,1565 +11,1565 @@
class activitycalendar_soactivity extends activitycalendar_socommon
{
- protected static $so;
- protected $soap = false;
- public $soap_functions = array
- (
+ protected static $so;
+ protected $soap = false;
+ public $soap_functions = array
+ (
'get_activities' => array
- (
- 'in' => array('array'),
+ (
+ 'in' => array('array'),
'out' => array('array')
)
);
- public $xmlrpc_methods = array
- (
- array
- (
- 'name' => 'get_activities',
- 'decription' => 'Get list of activities'
- ),
- array
- (
- 'name' => 'get_targetgroups',
- 'decription' => 'Get list of targetgroups'
- ),
- array
- (
- 'name' => 'get_statuscodes',
- 'decription' => 'Get list of statuscodes'
- ),
- array
- (
- 'name' => 'get_category_list',
- 'decription' => 'Get list of categories'
- ),
- array
- (
- 'name' => 'get_organizations',
- 'decription' => 'Get list of organizations'
- ),
- array
- (
- 'name' => 'get_groups',
- 'decription' => 'Get list of groups'
- ),
- array
- (
- 'name' => 'debug_xmlrpc',
- 'decription' => 'Return incoming params'
- )
- );
- var $public_functions = array
- (
- 'get_activities' => true,
- 'get_organizations' => true,
- 'get_groups' => true,
+ public $xmlrpc_methods = array
+ (
+ array
+ (
+ 'name' => 'get_activities',
+ 'decription' => 'Get list of activities'
+ ),
+ array
+ (
+ 'name' => 'get_targetgroups',
+ 'decription' => 'Get list of targetgroups'
+ ),
+ array
+ (
+ 'name' => 'get_statuscodes',
+ 'decription' => 'Get list of statuscodes'
+ ),
+ array
+ (
+ 'name' => 'get_category_list',
+ 'decription' => 'Get list of categories'
+ ),
+ array
+ (
+ 'name' => 'get_organizations',
+ 'decription' => 'Get list of organizations'
+ ),
+ array
+ (
+ 'name' => 'get_groups',
+ 'decription' => 'Get list of groups'
+ ),
+ array
+ (
+ 'name' => 'debug_xmlrpc',
+ 'decription' => 'Return incoming params'
+ )
);
+ var $public_functions = array
+ (
+ 'get_activities' => true,
+ 'get_organizations' => true,
+ 'get_groups' => true,
+ );
- /**
- * Get a static reference to the storage object associated with this
model object
- *
- * @return rental_soparty the storage object
- */
- public static function get_instance()
- {
- if(self::$so == null)
+ /**
+ * Get a static reference to the storage object associated with
this model object
+ *
+ * @return rental_soparty the storage object
+ */
+ public static function get_instance()
+ {
+ if (self::$so == null)
{
- self::$so = CreateObject('activitycalendar.soactivity');
+ self::$so =
CreateObject('activitycalendar.soactivity');
+ }
+ return self::$so;
}
- return self::$so;
- }
- /**
- * Generate SQL query
- *
- * @todo Add support for filter "party_type", meaning what type of
contracts
- * the party is involved in.
- *
- * @param string $sort_field
- * @param boolean $ascending
- * @param string $search_for
- * @param string $search_type
- * @param array $filters
- * @param boolean $return_count
- * @return string SQL
- */
- protected function get_query(string $sort_field, boolean $ascending,
string $search_for, string $search_type, array $filters, boolean $return_count)
- {
- $clauses = array('1=1');
+ /**
+ * Generate SQL query
+ *
+ * @todo Add support for filter "party_type", meaning what type
of contracts
+ * the party is involved in.
+ *
+ * @param string $sort_field
+ * @param boolean $ascending
+ * @param string $search_for
+ * @param string $search_type
+ * @param array $filters
+ * @param boolean $return_count
+ * @return string SQL
+ */
+ protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ {
+ $clauses = array('1=1');
- //Add columns to this array to include them in the query
- $columns = array();
+ //Add columns to this array to include them in the query
+ $columns = array();
- if($sort_field != null)
+ if ($sort_field != null)
{
- $dir = $ascending ? 'ASC' : 'DESC';
- //$order = "ORDER BY id $dir";
- $order = "ORDER BY $sort_field $dir";
- }
+ $dir = $ascending ? 'ASC' : 'DESC';
+ //$order = "ORDER BY id $dir";
+ $order = "ORDER BY $sort_field $dir";
+ }
/* else
- {
- $dir = $ascending ? 'ASC' : 'DESC';
- $order = "ORDER BY id $dir";
+ {
+ $dir = $ascending ? 'ASC' : 'DESC';
+ $order = "ORDER BY id $dir";
} */
- //var_dump($search_type);
- //var_dump($search_for);
- if($search_for)
- {
- $query =
$this->marshal($search_for, 'string');
- $like_pattern = "'%" . $search_for . "%'";
- $like_clauses = array();
- switch($search_type)
+ //var_dump($search_type);
+ //var_dump($search_for);
+ if ($search_for)
+ {
+ $query = $this->marshal($search_for, 'string');
+ $like_pattern = "'%" . $search_for . "%'";
+ $like_clauses = array();
+ switch ($search_type)
{
- case "name":
- $like_clauses[] = "party.first_name
$this->like $like_pattern";
- $like_clauses[] = "party.last_name
$this->like $like_pattern";
- $like_clauses[] = "party.company_name
$this->like $like_pattern";
- break;
- case "address":
- $like_clauses[] = "party.address_1
$this->like $like_pattern";
- $like_clauses[] = "party.address_2
$this->like $like_pattern";
- $like_clauses[] = "party.postal_code
$this->like $like_pattern";
- $like_clauses[] = "party.place
$this->like $like_pattern";
- break;
- case "identifier":
- $like_clauses[] = "party.identifier
$this->like $like_pattern";
- break;
- case "reskontro":
- $like_clauses[] = "party.reskontro
$this->like $like_pattern";
- break;
- case "result_unit_number":
- $like_clauses[] =
"party.result_unit_number $this->like $like_pattern";
- break;
- case "all":
- default:
- $like_clauses[] = "activity.title
$this->like $like_pattern";
- break;
- }
+ case "name":
+ $like_clauses[] =
"party.first_name $this->like $like_pattern";
+ $like_clauses[] =
"party.last_name $this->like $like_pattern";
+ $like_clauses[] =
"party.company_name $this->like $like_pattern";
+ break;
+ case "address":
+ $like_clauses[] =
"party.address_1 $this->like $like_pattern";
+ $like_clauses[] =
"party.address_2 $this->like $like_pattern";
+ $like_clauses[] =
"party.postal_code $this->like $like_pattern";
+ $like_clauses[] = "party.place
$this->like $like_pattern";
+ break;
+ case "identifier":
+ $like_clauses[] =
"party.identifier $this->like $like_pattern";
+ break;
+ case "reskontro":
+ $like_clauses[] =
"party.reskontro $this->like $like_pattern";
+ break;
+ case "result_unit_number":
+ $like_clauses[] =
"party.result_unit_number $this->like $like_pattern";
+ break;
+ case "all":
+ default:
+ $like_clauses[] =
"activity.title $this->like $like_pattern";
+ break;
+ }
- if(count($like_clauses))
- {
- $clauses[] = '(' . join(' OR ', $like_clauses)
. ')';
+ if (count($like_clauses))
+ {
+ $clauses[] = '(' . join(' OR ',
$like_clauses) . ')';
+ }
}
- }
- $filter_clauses = array();
+ $filter_clauses = array();
- if(isset($filters[$this->get_id_field_name()]))
+ if (isset($filters[$this->get_id_field_name()]))
{
- $id =
$this->marshal($filters[$this->get_id_field_name()], 'int');
- $filter_clauses[] = "activity.id = {$id}";
- }
- if(isset($filters['new_activities']))
- {
- if(!isset($filters['activity_state']) ||
(isset($filters['activity_state']) && $filters['activity_state'] == 'all'))
- {
- $filter_clauses[] = "(activity.state=1 OR
activity.state=2)";
+ $id =
$this->marshal($filters[$this->get_id_field_name()], 'int');
+ $filter_clauses[] = "activity.id = {$id}";
}
- if(isset($filters['activity_state']) &&
$filters['activity_state'] != 'all')
+ if (isset($filters['new_activities']))
+ {
+ if (!isset($filters['activity_state']) ||
(isset($filters['activity_state']) && $filters['activity_state'] == 'all'))
{
- $activity_state =
$this->marshal($filters['activity_state'], 'int');
- $filter_clauses[] = "activity.state =
{$activity_state}";
- }
- if(isset($filters['activity_org']) &&
$filters['activity_org'] != '0')
+ $filter_clauses[] = "(activity.state=1
OR activity.state=2)";
+ }
+ if (isset($filters['activity_state']) &&
$filters['activity_state'] != 'all')
{
- $activity_org =
$this->marshal($filters['activity_org'], 'int');
- $filter_clauses[] = "activity.organization_id =
{$activity_org}";
- }
- if(isset($filters['activity_category']) &&
$filters['activity_category'] != 'all')
+ $activity_state =
$this->marshal($filters['activity_state'], 'int');
+ $filter_clauses[] = "activity.state =
{$activity_state}";
+ }
+ if (isset($filters['activity_org']) &&
$filters['activity_org'] != '0')
{
- $activity_category =
$this->marshal($filters['activity_category'], 'int');
- $filter_clauses[] = "activity.category =
{$activity_category}";
- }
- if(isset($filters['activity_district']))
+ $activity_org =
$this->marshal($filters['activity_org'], 'int');
+ $filter_clauses[] =
"activity.organization_id = {$activity_org}";
+ }
+ if (isset($filters['activity_category']) &&
$filters['activity_category'] != 'all')
{
- if($filters['activity_district'] != 'all')
+ $activity_category =
$this->marshal($filters['activity_category'], 'int');
+ $filter_clauses[] = "activity.category
= {$activity_category}";
+ }
+ if (isset($filters['activity_district']))
{
- $activity_district =
$this->marshal($filters['activity_district'], 'int');
- $filter_clauses[] = "activity.office =
'{$activity_district}'";
+ if ($filters['activity_district'] !=
'all')
+ {
+ $activity_district =
$this->marshal($filters['activity_district'], 'int');
+ $filter_clauses[] =
"activity.office = '{$activity_district}'";
+ }
}
- }
- else
- {
- $activity_district =
$this->get_office_from_user($filters['user_id']);
- if($activity_district && $activity_district !=
'')
+ else
{
- if($activity_district == 1)
- $activity_district_corr = 2;
- else if($activity_district == 2)
- $activity_district_corr = 1;
- else
- $activity_district_corr =
(int)$activity_district;
+ $activity_district =
$this->get_office_from_user($filters['user_id']);
+ if ($activity_district &&
$activity_district != '')
+ {
+ if ($activity_district == 1)
+ $activity_district_corr
= 2;
+ else if ($activity_district ==
2)
+ $activity_district_corr
= 1;
+ else
+ $activity_district_corr
= (int)$activity_district;
- $filter_clauses[] = "activity.office =
'{$activity_district_corr}'";
+ $filter_clauses[] =
"activity.office = '{$activity_district_corr}'";
+ }
}
+ if (isset($filters['updated_date_hidden']) &&
$filters['updated_date_hidden'] != "")
+ {
+ $ts_query =
strtotime($filters['updated_date_hidden']); // target timestamp specified by
user
+ $filter_clauses[] =
"activity.last_change_date < {$ts_query}";
+ }
}
- if(isset($filters['updated_date_hidden']) &&
$filters['updated_date_hidden'] != "")
+ else
{
- $ts_query =
strtotime($filters['updated_date_hidden']); // target timestamp specified by
user
- $filter_clauses[] = "activity.last_change_date
< {$ts_query}";
- }
- }
- else
- {
- if(isset($filters['activity_state']) &&
$filters['activity_state'] != 'all')
+ if (isset($filters['activity_state']) &&
$filters['activity_state'] != 'all')
{
- $activity_state =
$this->marshal($filters['activity_state'], 'int');
- $filter_clauses[] = "activity.state =
{$activity_state}";
- }
- if(isset($filters['activity_org']) &&
$filters['activity_org'] != '0')
+ $activity_state =
$this->marshal($filters['activity_state'], 'int');
+ $filter_clauses[] = "activity.state =
{$activity_state}";
+ }
+ if (isset($filters['activity_org']) &&
$filters['activity_org'] != '0')
{
- $activity_org =
$this->marshal($filters['activity_org'], 'int');
- $filter_clauses[] = "activity.organization_id =
{$activity_org}";
- }
- if(isset($filters['activity_category']) &&
$filters['activity_category'] != 'all')
+ $activity_org =
$this->marshal($filters['activity_org'], 'int');
+ $filter_clauses[] =
"activity.organization_id = {$activity_org}";
+ }
+ if (isset($filters['activity_category']) &&
$filters['activity_category'] != 'all')
{
- $activity_category =
$this->marshal($filters['activity_category'], 'int');
- $filter_clauses[] = "activity.category =
{$activity_category}";
- }
- if(isset($filters['activity_district']))
+ $activity_category =
$this->marshal($filters['activity_category'], 'int');
+ $filter_clauses[] = "activity.category
= {$activity_category}";
+ }
+ if (isset($filters['activity_district']))
{
- if($filters['activity_district'] != 'all')
- {
- $activity_district =
$this->marshal($filters['activity_district'], 'int');
- $filter_clauses[] = "activity.office =
'{$activity_district}'";
+ if ($filters['activity_district'] !=
'all')
+ {
+ $activity_district =
$this->marshal($filters['activity_district'], 'int');
+ $filter_clauses[] =
"activity.office = '{$activity_district}'";
+ }
}
- }
- else
- {
- $activity_district =
$this->get_office_from_user($filters['user_id']);
- if($activity_district && $activity_district !=
'')
+ else
{
- if($activity_district == 1)
- $activity_district = 2;
- else if($activity_district == 2)
- $activity_district = 1;
+ $activity_district =
$this->get_office_from_user($filters['user_id']);
+ if ($activity_district &&
$activity_district != '')
+ {
+ if ($activity_district == 1)
+ $activity_district = 2;
+ else if ($activity_district ==
2)
+ $activity_district = 1;
- $filter_clauses[] = "activity.office =
'{$activity_district}'";
+ $filter_clauses[] =
"activity.office = '{$activity_district}'";
+ }
}
+ if (isset($filters['updated_date_hidden']) &&
$filters['updated_date_hidden'] != "")
+ {
+ $ts_query =
strtotime($filters['updated_date_hidden']); // target timestamp specified by
user
+ $filter_clauses[] =
"activity.last_change_date < {$ts_query}";
+ }
}
- if(isset($filters['updated_date_hidden']) &&
$filters['updated_date_hidden'] != "")
+
+ if (count($filter_clauses))
{
- $ts_query =
strtotime($filters['updated_date_hidden']); // target timestamp specified by
user
- $filter_clauses[] = "activity.last_change_date
< {$ts_query}";
+ $clauses[] = join(' AND ', $filter_clauses);
}
- }
- if(count($filter_clauses))
- {
- $clauses[] = join(' AND ', $filter_clauses);
- }
+ $condition = join(' AND ', $clauses);
- $condition = join(' AND ', $clauses);
+ if ($return_count) // We should only return a count
+ {
+ $cols = 'COUNT(DISTINCT(activity.id)) AS count';
+ }
+ else
+ {
+ $columns[] = 'activity.id';
+ $columns[] = 'activity.title';
+ $columns[] = 'activity.organization_id';
+ $columns[] = 'activity.group_id';
+ $columns[] = 'activity.district';
+ $columns[] = 'activity.office';
+ $columns[] = 'activity.state';
+ $columns[] = 'activity.category';
+ $columns[] = 'activity.target';
+ $columns[] = 'activity.description';
+ $columns[] = 'activity.arena';
+ $columns[] = 'activity.internal_arena';
+ $columns[] = 'activity.time';
+ $columns[] = 'activity.create_date';
+ $columns[] = 'activity.last_change_date';
+ $columns[] = 'activity.contact_person_1';
+ $columns[] = 'activity.contact_person_2';
+ $columns[] =
'activity.contact_person_2_address';
+ $columns[] = 'activity.contact_person_2_zip';
+ $columns[] = 'activity.special_adaptation';
+ $columns[] = 'activity.secret';
+ $columns[] = 'activity.frontend';
+ $columns[] = 'activity.new_org';
+ $columns[] = 'activity.new_group';
- if($return_count) // We should only return a count
- {
- $cols = 'COUNT(DISTINCT(activity.id)) AS count';
- }
- else
- {
- $columns[] = 'activity.id';
- $columns[] = 'activity.title';
- $columns[] = 'activity.organization_id';
- $columns[] = 'activity.group_id';
- $columns[] = 'activity.district';
- $columns[] = 'activity.office';
- $columns[] = 'activity.state';
- $columns[] = 'activity.category';
- $columns[] = 'activity.target';
- $columns[] = 'activity.description';
- $columns[] = 'activity.arena';
- $columns[] = 'activity.internal_arena';
- $columns[] = 'activity.time';
- $columns[] = 'activity.create_date';
- $columns[] = 'activity.last_change_date';
- $columns[] = 'activity.contact_person_1';
- $columns[] = 'activity.contact_person_2';
- $columns[] = 'activity.contact_person_2_address';
- $columns[] = 'activity.contact_person_2_zip';
- $columns[] = 'activity.special_adaptation';
- $columns[] = 'activity.secret';
- $columns[] = 'activity.frontend';
- $columns[] = 'activity.new_org';
- $columns[] = 'activity.new_group';
-
$cols = implode(',', $columns);
- }
+ }
- $tables = "activity_activity activity";
+ $tables = "activity_activity activity";
- //$join_contracts = " {$this->left_join}
rental_contract_party c_p ON (c_p.party_id = party.id)
- //{$this->left_join} rental_contract contract ON (contract.id =
c_p.contract_id)";
- //var_dump("SELECT {$cols} FROM {$tables} WHERE {$condition}
{$order}");
- return "SELECT {$cols} FROM {$tables} WHERE {$condition}
{$order}";
- }
+ //$join_contracts = " {$this->left_join}
rental_contract_party c_p ON (c_p.party_id = party.id)
+ //{$this->left_join} rental_contract contract ON
(contract.id = c_p.contract_id)";
+ //var_dump("SELECT {$cols} FROM {$tables} WHERE
{$condition} {$order}");
+ return "SELECT {$cols} FROM {$tables} WHERE
{$condition} {$order}";
+ }
- /**
- * Function for adding a new activity to the database. Updates the
activity object.
- *
- * @param activitycalendar_activity $activity the party to be added
- * @return bool true if successful, false otherwise
- */
- function add(&$activity)
- {
- // Insert a new activity
- $ts_now = strtotime('now');
- $secret = $this->generate_secret();
- $q = "INSERT INTO activity_activity
(title, create_date,secret) VALUES ('tmptitle', $ts_now, '{$secret}')";
- $result = $this->db->query($q, __LINE__, __FILE__);
+ /**
+ * Function for adding a new activity to the database. Updates
the activity object.
+ *
+ * @param activitycalendar_activity $activity the party to be
added
+ * @return bool true if successful, false otherwise
+ */
+ function add( &$activity )
+ {
+ // Insert a new activity
+ $ts_now = strtotime('now');
+ $secret = $this->generate_secret();
+ $q = "INSERT INTO activity_activity (title,
create_date,secret) VALUES ('tmptitle', $ts_now, '{$secret}')";
+ $result = $this->db->query($q, __LINE__, __FILE__);
- if(isset($result))
+ if (isset($result))
{
- // Set the new party ID
-
$activity->set_id($this->db->get_last_insert_id('activity_activity', 'id'));
- // Forward this request to the update method
- return $this->update($activity);
+ // Set the new party ID
+
$activity->set_id($this->db->get_last_insert_id('activity_activity', 'id'));
+ // Forward this request to the update method
+ return $this->update($activity);
+ }
+ else
+ {
+ return false;
+ }
}
- else
+
+ /**
+ * Update the database values for an existing activity object.
+ *
+ * @param $activity the activity to be updated
+ * @return boolean true if successful, false otherwise
+ */
+ function update( $activity )
{
- return false;
- }
- }
+ $id = intval($activity->get_id());
+ $ts_now = strtotime('now');
- /**
- * Update the database values for an existing activity object.
- *
- * @param $activity the activity to be updated
- * @return boolean true if successful, false otherwise
- */
- function update($activity)
- {
- $id = intval($activity->get_id());
- $ts_now = strtotime('now');
-
- $values = array(
- 'title = ' . $this->marshal($activity->get_title(),
'string'),
+ $values = array(
+ 'title = ' .
$this->marshal($activity->get_title(), 'string'),
'organization_id = ' .
$this->marshal($activity->get_organization_id(), 'int'),
- 'group_id = ' .
$this->marshal($activity->get_group_id(), 'int'),
- 'district = ' .
$this->marshal($activity->get_district(), 'string'),
- 'office = ' .
$this->marshal($activity->get_office(), 'int'),
- 'category = ' .
$this->marshal($activity->get_category(), 'int'),
- 'state = ' .
$this->marshal($activity->get_state(), 'int'),
- 'target = ' . $this->marshal($activity->get_target(),
'string'),
- 'description = ' .
$this->marshal($activity->get_description(), 'string'),
- 'arena = ' .
$this->marshal($activity->get_arena(), 'int'),
- 'internal_arena = ' .
$this->marshal($activity->get_internal_arena(), 'int'),
- 'time = ' . $this->marshal($activity->get_time(),
'string'),
- 'last_change_date = ' . $this->marshal($ts_now,
'int'),
- 'contact_person_1 = ' .
$this->marshal($activity->get_contact_person_1(), 'int'),
- 'contact_person_2 = ' .
$this->marshal($activity->get_contact_person_2(), 'int'),
- 'contact_person_2_address = ' .
$this->marshal($activity->get_contact_person_2_address(), 'string'),
- 'contact_person_2_zip = ' .
$this->marshal($activity->get_contact_person_2_zip(), 'string'),
+ 'group_id = ' .
$this->marshal($activity->get_group_id(), 'int'),
+ 'district = ' .
$this->marshal($activity->get_district(), 'string'),
+ 'office = ' .
$this->marshal($activity->get_office(), 'int'),
+ 'category = ' .
$this->marshal($activity->get_category(), 'int'),
+ 'state = ' .
$this->marshal($activity->get_state(), 'int'),
+ 'target = ' .
$this->marshal($activity->get_target(), 'string'),
+ 'description = ' .
$this->marshal($activity->get_description(), 'string'),
+ 'arena = ' .
$this->marshal($activity->get_arena(), 'int'),
+ 'internal_arena = ' .
$this->marshal($activity->get_internal_arena(), 'int'),
+ 'time = ' .
$this->marshal($activity->get_time(), 'string'),
+ 'last_change_date = ' . $this->marshal($ts_now,
'int'),
+ 'contact_person_1 = ' .
$this->marshal($activity->get_contact_person_1(), 'int'),
+ 'contact_person_2 = ' .
$this->marshal($activity->get_contact_person_2(), 'int'),
+ 'contact_person_2_address = ' .
$this->marshal($activity->get_contact_person_2_address(), 'string'),
+ 'contact_person_2_zip = ' .
$this->marshal($activity->get_contact_person_2_zip(), 'string'),
'special_adaptation = ' .
($activity->get_special_adaptation() ? "true" : "false"),
'frontend = ' . ($activity->get_frontend() ?
"true" : "false"),
'new_org = ' . ($activity->get_new_org() ?
"true" : "false"),
'new_group = ' . ($activity->get_new_group() ?
"true" : "false")
- );
+ );
- //var_dump('UPDATE activity_activity SET ' . join(',', $values)
. " WHERE id=$id");
+ //var_dump('UPDATE activity_activity SET ' . join(',',
$values) . " WHERE id=$id");
$result = $this->db->query('UPDATE activity_activity
SET ' . join(',', $values) . " WHERE id=$id", __LINE__, __FILE__);
- return isset($result);
- }
+ return isset($result);
+ }
- function import_activity($activity)
- {
- $id = intval($activity->get_id());
- $ts_now = strtotime('now');
+ function import_activity( $activity )
+ {
+ $id = intval($activity->get_id());
+ $ts_now = strtotime('now');
- $columns = array(
- 'title',
- 'organization_id',
- 'group_id',
- 'district',
- 'office',
- 'category',
- 'state',
- 'target',
- 'description',
- 'arena',
- 'internal_arena',
- 'time',
- 'last_change_date',
- 'create_date',
- 'contact_person_1',
- 'contact_person_2',
- 'contact_person_2_address',
- 'contact_person_2_zip',
- 'secret',
- 'special_adaptation'
- );
+ $columns = array(
+ 'title',
+ 'organization_id',
+ 'group_id',
+ 'district',
+ 'office',
+ 'category',
+ 'state',
+ 'target',
+ 'description',
+ 'arena',
+ 'internal_arena',
+ 'time',
+ 'last_change_date',
+ 'create_date',
+ 'contact_person_1',
+ 'contact_person_2',
+ 'contact_person_2_address',
+ 'contact_person_2_zip',
+ 'secret',
+ 'special_adaptation'
+ );
- $values = array(
- $this->marshal($activity->get_title(), 'string'),
- $this->marshal($activity->get_organization_id(), 'int'),
- $this->marshal($activity->get_group_id(), 'int'),
- $this->marshal($activity->get_district(), 'string'),
- $this->marshal($activity->get_office(), 'int'),
- $this->marshal($activity->get_category(), 'int'),
- $this->marshal($activity->get_state(), 'int'),
- $this->marshal($activity->get_target(), 'string'),
- $this->marshal($activity->get_description(), 'string'),
- $this->marshal($activity->get_arena(), 'int'),
- $this->marshal($activity->get_internal_arena(), 'int'),
- $this->marshal($activity->get_time(), 'string'),
- $this->marshal($activity->get_last_change_date(),
'int'),
- $this->marshal($ts_now, 'int'),
- $this->marshal($activity->get_contact_person_1(),
'int'),
- $this->marshal($activity->get_contact_person_2(),
'int'),
-
$this->marshal($activity->get_contact_person_2_address(), 'string'),
- $this->marshal($activity->get_contact_person_2_zip(),
'string'),
+ $values = array(
+ $this->marshal($activity->get_title(),
'string'),
+
$this->marshal($activity->get_organization_id(), 'int'),
+ $this->marshal($activity->get_group_id(),
'int'),
+ $this->marshal($activity->get_district(),
'string'),
+ $this->marshal($activity->get_office(), 'int'),
+ $this->marshal($activity->get_category(),
'int'),
+ $this->marshal($activity->get_state(), 'int'),
+ $this->marshal($activity->get_target(),
'string'),
+ $this->marshal($activity->get_description(),
'string'),
+ $this->marshal($activity->get_arena(), 'int'),
+ $this->marshal($activity->get_internal_arena(),
'int'),
+ $this->marshal($activity->get_time(), 'string'),
+
$this->marshal($activity->get_last_change_date(), 'int'),
+ $this->marshal($ts_now, 'int'),
+
$this->marshal($activity->get_contact_person_1(), 'int'),
+
$this->marshal($activity->get_contact_person_2(), 'int'),
+
$this->marshal($activity->get_contact_person_2_address(), 'string'),
+
$this->marshal($activity->get_contact_person_2_zip(), 'string'),
$this->marshal($this->generate_secret(),
'string'),
- ($activity->get_special_adaptation() ? "true" : "false")
- );
+ ($activity->get_special_adaptation() ? "true" :
"false")
+ );
$result = $this->db->query('INSERT INTO
activity_activity (' . join(',', $columns) . ') VALUES (' . join(',', $values)
. ')', __LINE__, __FILE__);
- return isset($result);
- }
+ return isset($result);
+ }
- public function get_id_field_name($extended_info = false)
- {
- if(!$extended_info)
+ public function get_id_field_name( $extended_info = false )
{
- $ret = 'id';
+ if (!$extended_info)
+ {
+ $ret = 'id';
+ }
+ else
+ {
+ $ret = array
+ (
+ 'table' => 'activity', // alias
+ 'field' => 'id',
+ 'translated' => 'id'
+ );
+ }
+ return $ret;
}
- else
+
+ protected function populate( int $activity_id, &$activity )
{
- $ret = array
- (
- 'table' => 'activity', // alias
- 'field' => 'id',
- 'translated' => 'id'
- );
- }
- return $ret;
- }
- protected function populate(int $activity_id, &$activity)
- {
-
- if($activity == null)
+ if ($activity == null)
{
$activity = new
activitycalendar_activity((int)$activity_id);
-
$activity->set_title($this->unmarshal($this->db->f('title'), 'string'));
-
$activity->set_organization_id($this->unmarshal($this->db->f('organization_id'),
'int'));
-
$activity->set_group_id($this->unmarshal($this->db->f('group_id'), 'int'));
-
$activity->set_district($this->unmarshal($this->db->f('district'), 'string'));
-
$activity->set_office($this->unmarshal($this->db->f('office'), 'int'));
-
$activity->set_category($this->unmarshal($this->db->f('category'), 'int'));
-
$activity->set_state($this->unmarshal($this->db->f('state'), 'int'));
-
$activity->set_target($this->unmarshal($this->db->f('target'), 'string'));
-
$activity->set_description($this->unmarshal($this->db->f('description'),
'string'));
-
$activity->set_arena($this->unmarshal($this->db->f('arena'), 'string'));
-
$activity->set_internal_arena($this->unmarshal($this->db->f('internal_arena'),
'string'));
-
$activity->set_time($this->unmarshal($this->db->f('time'), 'string'));
-
$activity->set_last_change_date($this->unmarshal($this->db->f('last_change_date'),
'int'));
-
$activity->set_special_adaptation($this->unmarshal($this->db->f('special_adaptation',
'bool')));
-
$activity->set_secret($this->unmarshal($this->db->f('secret'), 'string'));
-
$activity->set_contact_person_2_address($this->unmarshal($this->db->f('contact_person_2_address'),
'string'));
-
$activity->set_contact_person_2_zip($this->unmarshal($this->db->f('contact_person_2_zip'),
'string'));
-
$activity->set_frontend($this->unmarshal($this->db->f('frontend', 'bool')));
-
$activity->set_new_org($this->unmarshal($this->db->f('new_org', 'bool')));
-
$activity->set_new_group($this->unmarshal($this->db->f('new_group', 'bool')));
+
$activity->set_title($this->unmarshal($this->db->f('title'), 'string'));
+
$activity->set_organization_id($this->unmarshal($this->db->f('organization_id'),
'int'));
+
$activity->set_group_id($this->unmarshal($this->db->f('group_id'), 'int'));
+
$activity->set_district($this->unmarshal($this->db->f('district'), 'string'));
+
$activity->set_office($this->unmarshal($this->db->f('office'), 'int'));
+
$activity->set_category($this->unmarshal($this->db->f('category'), 'int'));
+
$activity->set_state($this->unmarshal($this->db->f('state'), 'int'));
+
$activity->set_target($this->unmarshal($this->db->f('target'), 'string'));
+
$activity->set_description($this->unmarshal($this->db->f('description'),
'string'));
+
$activity->set_arena($this->unmarshal($this->db->f('arena'), 'string'));
+
$activity->set_internal_arena($this->unmarshal($this->db->f('internal_arena'),
'string'));
+
$activity->set_time($this->unmarshal($this->db->f('time'), 'string'));
+
$activity->set_last_change_date($this->unmarshal($this->db->f('last_change_date'),
'int'));
+
$activity->set_special_adaptation($this->unmarshal($this->db->f('special_adaptation',
'bool')));
+
$activity->set_secret($this->unmarshal($this->db->f('secret'), 'string'));
+
$activity->set_contact_person_2_address($this->unmarshal($this->db->f('contact_person_2_address'),
'string'));
+
$activity->set_contact_person_2_zip($this->unmarshal($this->db->f('contact_person_2_zip'),
'string'));
+
$activity->set_frontend($this->unmarshal($this->db->f('frontend', 'bool')));
+
$activity->set_new_org($this->unmarshal($this->db->f('new_org', 'bool')));
+
$activity->set_new_group($this->unmarshal($this->db->f('new_group', 'bool')));
- if($activity->get_group_id() &&
$activity->get_group_id() > 0)
- {
- if($activity->get_new_group())
+ if ($activity->get_group_id() &&
$activity->get_group_id() > 0)
{
- $contacts =
activitycalendar_sogroup::get_instance()->get_contacts_local($activity->get_group_id());
-
$activity->set_contact_persons($contacts);
- //$org_tmp =
activitycalendar_sogroup::get_instance()->get_orgid_from_group($activity->get_group_id());
-
//$activity->set_organization_id($org_tmp);
+ if ($activity->get_new_group())
+ {
+ $contacts =
activitycalendar_sogroup::get_instance()->get_contacts_local($activity->get_group_id());
+
$activity->set_contact_persons($contacts);
+ //$org_tmp =
activitycalendar_sogroup::get_instance()->get_orgid_from_group($activity->get_group_id());
+
//$activity->set_organization_id($org_tmp);
+ }
+ else
+ {
+ $contacts =
activitycalendar_sogroup::get_instance()->get_contacts($activity->get_group_id());
+
$activity->set_contact_persons($contacts);
+ $org_tmp =
activitycalendar_sogroup::get_instance()->get_orgid_from_group($activity->get_group_id());
+
$activity->set_organization_id($org_tmp);
+ }
}
- else
+ else if ($activity->get_organization_id() &&
$activity->get_organization_id() > 0)
{
- $contacts =
activitycalendar_sogroup::get_instance()->get_contacts($activity->get_group_id());
-
$activity->set_contact_persons($contacts);
- $org_tmp =
activitycalendar_sogroup::get_instance()->get_orgid_from_group($activity->get_group_id());
-
$activity->set_organization_id($org_tmp);
+ if ($activity->get_new_org())
+ {
+ $contacts =
activitycalendar_soorganization::get_instance()->get_contacts_local($activity->get_organization_id());
+
$activity->set_contact_persons($contacts);
+ }
+ else
+ {
+ $contacts =
activitycalendar_soorganization::get_instance()->get_contacts($activity->get_organization_id());
+
$activity->set_contact_persons($contacts);
+ }
}
}
- else if($activity->get_organization_id() &&
$activity->get_organization_id() > 0)
+
+ return $activity;
+ }
+
+ function get_category_name( $category_id )
+ {
+ $result = "Ingen";
+ if ($category_id != null)
{
- if($activity->get_new_org())
+ $sql = "SELECT name FROM bb_activity where
id=$category_id";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $contacts =
activitycalendar_soorganization::get_instance()->get_contacts_local($activity->get_organization_id());
-
$activity->set_contact_persons($contacts);
+ $result = $this->db->f('name');
}
- else
- {
- $contacts =
activitycalendar_soorganization::get_instance()->get_contacts($activity->get_organization_id());
-
$activity->set_contact_persons($contacts);
- }
}
+ return $result;
}
- return $activity;
- }
-
- function get_category_name($category_id)
- {
- $result = "Ingen";
- if($category_id != null)
+ function get_categories()
{
- $sql = "SELECT name FROM bb_activity where
id=$category_id";
+ $categories = array();
+ $sql = "SELECT * FROM bb_activity where active=1 and
parent_id=1";
$this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
- {
- $result = $this->db->f('name');
+ while ($this->db->next_record())
+ {
+ $category = new
activitycalendar_category($this->db->f('id'));
+
$category->set_parent_id($this->db->f('parent_id'));
+ $category->set_name($this->db->f('name'));
+ $categories[] = $category;
}
- }
- return $result;
- }
+ return $categories;
+ }
- function get_categories()
- {
- $categories = array();
- $sql = "SELECT * FROM bb_activity where active=1 and
parent_id=1";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ function select_district_list()
+ {
+ $this->db->query("SELECT id, descr FROM fm_district
where id >'0' AND NOT descr LIKE '%vrige%' ORDER BY id ", __LINE__, __FILE__);
+
+ $i = 0;
+ while ($this->db->next_record())
{
- $category = new
activitycalendar_category($this->db->f('id'));
- $category->set_parent_id($this->db->f('parent_id'));
- $category->set_name($this->db->f('name'));
- $categories[] = $category;
+ $district[$i]['id'] = $this->db->f('id');
+ $district[$i]['name'] =
stripslashes($this->db->f('descr'));
+ $i++;
+ }
+
+ return $district;
}
- return $categories;
- }
- function select_district_list()
- {
- $this->db->query("SELECT id, descr FROM fm_district where id
>'0' AND NOT descr LIKE '%vrige%' ORDER BY id ", __LINE__, __FILE__);
-
- $i = 0;
- while($this->db->next_record())
+ function get_district_from_name( $name )
{
- $district[$i]['id'] = $this->db->f('id');
- $district[$i]['name'] =
stripslashes($this->db->f('descr'));
- $i++;
+ $this->db->query("SELECT part_of_town_id FROM
fm_part_of_town where name like UPPER('%{$name}%') ", __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $result = $this->db->f('part_of_town_id');
+ }
+ return $result;
}
- return $district;
- }
-
- function get_district_from_name($name)
- {
- $this->db->query("SELECT part_of_town_id FROM fm_part_of_town
where name like UPPER('%{$name}%') ", __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_district_from_id( $d_id )
+ {
+ $this->db->query("SELECT name FROM fm_part_of_town
where part_of_town_id={$d_id} ", __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('part_of_town_id');
+ $result = $this->db->f('name');
+ }
+ return $result;
}
- return $result;
- }
- function get_district_from_id($d_id)
- {
- $this->db->query("SELECT name FROM fm_part_of_town where
part_of_town_id={$d_id} ", __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_district_name( $district_id )
+ {
+ //$result = "Ingen";
+ $values = array();
+ if ($district_id != null)
{
- $result = $this->db->f('name');
+ $sql = "SELECT district_id, name FROM
fm_part_of_town where part_of_town_id in ($district_id)";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $name = $this->db->f('name');
+ $values[] = $name;
+ //$result .= $name . ',';
+ }
+ $result = implode(", ", $values);
+ return $result;
+ }
+ return "";
}
- return $result;
- }
- function get_district_name($district_id)
- {
- //$result = "Ingen";
- $values = array();
- if($district_id != null)
+ function get_districts()
{
- $sql = "SELECT district_id, name FROM fm_part_of_town
where part_of_town_id in ($district_id)";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query("SELECT part_of_town_id, name FROM
fm_part_of_town district_id ", __LINE__, __FILE__);
+
+ $i = 0;
+ while ($this->db->next_record())
+ {
+ $name = $this->db->f('name');
+ if ($name != 'ØVRIGE')
{
- $name = $this->db->f('name');
- $values[] = $name;
- //$result .= $name . ',';
+ $district[$i]['part_of_town_id'] =
$this->db->f('part_of_town_id');
+ $district[$i]['name'] =
stripslashes($this->db->f('name'));
+ $i++;
+ }
}
- $result = implode(", ", $values);
- return $result;
- }
- return "";
- }
- function get_districts()
- {
- $this->db->query("SELECT part_of_town_id, name FROM
fm_part_of_town district_id ", __LINE__, __FILE__);
+ return $district;
+ }
- $i = 0;
- while($this->db->next_record())
+ function get_office_from_user( $user_id )
{
- $name = $this->db->f('name');
- if($name != 'ØVRIGE')
+ if (user_id)
{
- $district[$i]['part_of_town_id'] =
$this->db->f('part_of_town_id');
- $district[$i]['name'] =
stripslashes($this->db->f('name'));
- $i++;
+ $user_id = (int)$user_id;
+ $q1 = "SELECT office FROM bb_office_user WHERE
account_id={$user_id}";
+ //var_dump($q1);
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $office_id = $this->db->f('office');
+ }
}
+ return $office_id;
}
- return $district;
- }
-
- function get_office_from_user($user_id)
- {
- if(user_id)
+ function get_office_name( $district_id )
{
- $user_id = (int)$user_id;
- $q1 = "SELECT office FROM
bb_office_user WHERE account_id={$user_id}";
- //var_dump($q1);
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $result = "Ingen";
+ if ($district_id != null)
+ {
+ $sql = "SELECT descr FROM fm_district where
id=$district_id";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $office_id = $this->db->f('office');
+ $result = $this->db->f('descr');
+ }
}
+ return $result;
}
- return $office_id;
- }
- function get_office_name($district_id)
- {
- $result = "Ingen";
- if($district_id != null)
+ function get_office_description( $office_id )
{
- $sql = "SELECT descr FROM fm_district where
id=$district_id";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ $result = "";
+ if ($office_id != null)
+ {
+ $sql = "SELECT description FROM bb_office where
id=$office_id";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('descr');
+ $result = $this->db->f('description');
+ }
}
- }
- return $result;
- }
+ return $result;
+ }
- function get_office_description($office_id)
- {
- $result = "";
- if($office_id != null)
- {
- $sql = "SELECT description FROM bb_office where id=$office_id";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_target_name( $target_id )
+ {
+ $result = "Ingen";
+ if ($target_id != null)
+ {
+ $sql = "SELECT name FROM bb_agegroup where
id=$target_id";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('description');
+ $result = $this->db->f('name');
+ }
+ }
+ return $result;
}
- }
- return $result;
- }
- function get_target_name($target_id)
- {
- $result = "Ingen";
- if($target_id != null)
+ function get_targets()
{
- $sql = "SELECT name FROM bb_agegroup where
id=$target_id";
+ $targets = array();
+ $sql = "SELECT * FROM bb_agegroup where active=1 ORDER
BY sort";
$this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ while ($this->db->next_record())
+ {
+ $name = $this->db->f('name');
+ if ($name != 'Tilskuere')
{
- $result = $this->db->f('name');
+ $target = new
activitycalendar_target($this->db->f('id'));
+
$target->set_description($this->db->f('description'));
+ $target->set_name($this->db->f('name'));
+ $targets[] = $target;
+ }
}
- }
- return $result;
- }
+ return $targets;
+ }
- function get_targets()
- {
- $targets = array();
- $sql = "SELECT * FROM bb_agegroup where active=1 ORDER BY sort";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_category_from_name( $name )
+ {
+ if ($name != null)
{
- $name = $this->db->f('name');
- if($name != 'Tilskuere')
- {
- $target = new
activitycalendar_target($this->db->f('id'));
-
$target->set_description($this->db->f('description'));
- $target->set_name($this->db->f('name'));
- $targets[] = $target;
+ $sql = "select id from bb_activity where name
like '%{$name}%'";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $result = $this->db->f('id');
+ }
}
+ return $result;
}
- return $targets;
- }
- function get_category_from_name($name)
- {
- if($name != null)
- {
- $sql = "select id from bb_activity where name like
'%{$name}%'";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_target_from_sort_id( $id )
+ {
+ if ($id != null && is_numeric($id))
+ {
+ $sql = "select id from bb_agegroup where
sort={$id} and active=1";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('id');
+ $result = $this->db->f('id');
+ }
}
- }
- return $result;
- }
+ return $result;
+ }
- function get_target_from_sort_id($id)
- {
- if($id != null && is_numeric($id))
- {
- $sql = "select id from bb_agegroup where sort={$id} and
active=1";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_orgid_from_orgno( $orgno )
+ {
+ if ($orgno != null)
+ {
+ $sql = "select id from bb_organization where
organization_number='{$orgno}'";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('id');
+ $result = $this->db->f('id');
+ }
}
- }
- return $result;
- }
+ return $result;
+ }
- function get_orgid_from_orgno($orgno)
- {
- if($orgno != null)
- {
- $sql = "select id from bb_organization where
organization_number='{$orgno}'";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
- {
- $result = $this->db->f('id');
+ function update_org_description( $org_id, $description )
+ {
+ if ($org_id != null)
+ {
+ $sql = "update bb_organization set
description='{$description}' where id={$org_id}";
+ $result = $this->db->query($sql, __LINE__,
__FILE__);
}
- }
- return $result;
- }
+ return isset($result);
+ }
- function update_org_description($org_id, $description)
- {
- if($org_id != null)
- {
- $sql = "update bb_organization set
description='{$description}' where id={$org_id}";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- }
- return isset($result);
- }
-
- function set_org_active($org_id)
- {
- if($org_id != null)
+ function set_org_active( $org_id )
{
- $sql = "update bb_organization set show_in_portal=1
where id={$org_id}";
- $result = $this->db->query($sql, __LINE__, __FILE__);
+ if ($org_id != null)
+ {
+ $sql = "update bb_organization set
show_in_portal=1 where id={$org_id}";
+ $result = $this->db->query($sql, __LINE__,
__FILE__);
+ }
+ return isset($result);
}
- return isset($result);
- }
- function get_activities($parameters = array())
- {
- $soap = isset($parameters['soap']) && $parameters['soap'] ?
true : false;
- $this->soap = $soap;
- //fromdate -> innparam for uthenting av delta - timestamp
- $whereclause_date = "";
- if($parameters['fromdate'])
+ function get_activities( $parameters = array() )
{
- $from_date = (int)$parameters['fromdate'];
- $whereclause_date = "AND last_change_date >
{$from_date}";
- }
- $activities = array();
- $sql = "SELECT * FROM activity_activity where state in (2,3,5)
{$whereclause_date}";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
- {
- $gr = $this->db->f('group_id');
- $activities[] = array
- (
- 'id' =>
(int)$this->db->f('id'),
- 'title' =>
$soap ? $this->db->f('title', true) : utf8_decode($this->db->f('title', true)),
- 'organization_id' =>
$this->db->f('organization_id'),
- 'group_id' =>
$this->db->f('group_id'),
- 'district' =>
$this->db->f('district'),
- 'category' =>
$this->db->f('category'),
- 'state' =>
$this->db->f('state'),
- 'target' =>
$this->db->f('target'),
- 'arena' =>
$this->db->f('arena'),
- 'internal_arena' =>
$this->db->f('internal_arena'),
- 'time' =>
$soap ? $this->db->f('time', true) : utf8_decode($this->db->f('time', true)),
- 'contact_person_1' =>
$this->db->f('contact_person_1'),
- 'contact_person_2' =>
$this->db->f('contact_person_2'),
+ $soap = isset($parameters['soap']) &&
$parameters['soap'] ? true : false;
+ $this->soap = $soap;
+ //fromdate -> innparam for uthenting av delta -
timestamp
+ $whereclause_date = "";
+ if ($parameters['fromdate'])
+ {
+ $from_date = (int)$parameters['fromdate'];
+ $whereclause_date = "AND last_change_date >
{$from_date}";
+ }
+ $activities = array();
+ $sql = "SELECT * FROM activity_activity where state in
(2,3,5) {$whereclause_date}";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $gr = $this->db->f('group_id');
+ $activities[] = array
+ (
+ 'id' => (int)$this->db->f('id'),
+ 'title' => $soap ?
$this->db->f('title', true) : utf8_decode($this->db->f('title', true)),
+ 'organization_id' =>
$this->db->f('organization_id'),
+ 'group_id' => $this->db->f('group_id'),
+ 'district' => $this->db->f('district'),
+ 'category' => $this->db->f('category'),
+ 'state' => $this->db->f('state'),
+ 'target' => $this->db->f('target'),
+ 'arena' => $this->db->f('arena'),
+ 'internal_arena' =>
$this->db->f('internal_arena'),
+ 'time' => $soap ? $this->db->f('time',
true) : utf8_decode($this->db->f('time', true)),
+ 'contact_person_1' =>
$this->db->f('contact_person_1'),
+ 'contact_person_2' =>
$this->db->f('contact_person_2'),
'special_adaptation' =>
$this->db->f('special_adaptation'),
- );
- }
+ );
+ }
- foreach($activities as &$activity)
- {
- if($activity['group_id'] &&
!$activity['group_id'] == '' && !$activity['group_id'] == 0)
+ foreach ($activities as &$activity)
+ {
+ if ($activity['group_id'] &&
!$activity['group_id'] == '' && !$activity['group_id'] == 0)
{
- $activity['group_info']
= $this->get_group_info($activity['group_id']);
- $activity['organization_info'] =
$this->get_org_info($activity['group_info']['organization_id']);
+ $activity['group_info'] =
$this->get_group_info($activity['group_id']);
+ $activity['organization_info'] =
$this->get_org_info($activity['group_info']['organization_id']);
}
else
{
- $activity['organization_info'] =
$this->get_org_info($activity['organization_id']);
- $activity['group_info']
= $this->get_group_info($activity['group_id']);
+ $activity['organization_info'] =
$this->get_org_info($activity['organization_id']);
+ $activity['group_info'] =
$this->get_group_info($activity['group_id']);
}
- $activity['district_name'] = $soap
? $this->get_district_name($activity['district']) :
utf8_decode($this->get_district_name($activity['district']));
- $activity['category_name'] = $soap
? $this->get_category_name($activity['category']) :
utf8_decode($this->get_category_name($activity['category']));
- $activity['description'] =
$this->get_activity_description($activity['organization_id'],
$activity['group_id']);
- $activity['arena_info'] =
$this->get_all_arena_info($activity['arena'], $activity['internal_arena']);
+ $activity['district_name'] = $soap ?
$this->get_district_name($activity['district']) :
utf8_decode($this->get_district_name($activity['district']));
+ $activity['category_name'] = $soap ?
$this->get_category_name($activity['category']) :
utf8_decode($this->get_category_name($activity['category']));
+ $activity['description'] =
$this->get_activity_description($activity['organization_id'],
$activity['group_id']);
+ $activity['arena_info'] =
$this->get_all_arena_info($activity['arena'], $activity['internal_arena']);
$activity['internal_arena_info'] =
$this->get_internal_arena_info($activity['internal_arena']);
- $activity['contact_person'] =
$this->get_contact_person($activity['organization_id'], $activity['group_id'],
$activity['contact_person_1']);
+ $activity['contact_person'] =
$this->get_contact_person($activity['organization_id'], $activity['group_id'],
$activity['contact_person_1']);
+ }
+//_debug_array($activities);
+ return $activities;
}
-//_debug_array($activities);
- return $activities;
- }
- function get_contact_person($org_id, $group_id, $cont_pers)
- {
- if($group_id)
+ function get_contact_person( $org_id, $group_id, $cont_pers )
{
- $group_id = (int)$group_id;
- // $this->db->query("SELECT * FROM bb_group_contact WHERE
id={$cont_pers}", __LINE__, __FILE__);
- $this->db->query("SELECT * FROM bb_group_contact WHERE
group_id={$group_id} LIMIT 1", __LINE__, __FILE__);
- while($this->db->next_record())
+ if ($group_id)
+ {
+ $group_id = (int)$group_id;
+ // $this->db->query("SELECT * FROM
bb_group_contact WHERE id={$cont_pers}", __LINE__, __FILE__);
+ $this->db->query("SELECT * FROM
bb_group_contact WHERE group_id={$group_id} LIMIT 1", __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = array('name' => $this->soap
? $this->db->f('name') : utf8_decode($this->db->f('name')),
- 'phone' =>
$this->db->f('phone'), 'email' => $this->db->f('email'));
+ $result = array('name' => $this->soap ?
$this->db->f('name') : utf8_decode($this->db->f('name')),
+ 'phone' =>
$this->db->f('phone'), 'email' => $this->db->f('email'));
+ }
}
- }
- else if($org_id)
- {
- $org_id = (int)$org_id;
- $this->db->query("SELECT * FROM bb_organization_contact
WHERE organization_id={$org_id} LIMIT 1", __LINE__, __FILE__);
- while($this->db->next_record())
+ else if ($org_id)
+ {
+ $org_id = (int)$org_id;
+ $this->db->query("SELECT * FROM
bb_organization_contact WHERE organization_id={$org_id} LIMIT 1", __LINE__,
__FILE__);
+ while ($this->db->next_record())
{
- $result = array('name' => $this->soap
? $this->db->f('name') : utf8_decode($this->db->f('name')),
- 'phone' =>
$this->db->f('phone'), 'email' => $this->db->f('email'));
+ $result = array('name' => $this->soap ?
$this->db->f('name') : utf8_decode($this->db->f('name')),
+ 'phone' =>
$this->db->f('phone'), 'email' => $this->db->f('email'));
+ }
}
+ return $result;
}
- return $result;
- }
- function get_activity_description($org_id, $group_id)
- {
- if($group_id)
+ function get_activity_description( $org_id, $group_id )
{
- $group_id = (int)$group_id;
- $this->db->query("SELECT * FROM bb_group WHERE
id={$group_id}", __LINE__, __FILE__);
- while($this->db->next_record())
+ if ($group_id)
+ {
+ $group_id = (int)$group_id;
+ $this->db->query("SELECT * FROM bb_group WHERE
id={$group_id}", __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->soap ?
$this->db->f('description') : utf8_decode($this->db->f('description'));
+ $result = $this->soap ?
$this->db->f('description') : utf8_decode($this->db->f('description'));
+ }
}
- }
- else if($org_id)
- {
- $org_id = (int)$org_id;
- $this->db->query("SELECT * FROM bb_organization WHERE
id={$org_id}", __LINE__, __FILE__);
- while($this->db->next_record())
+ else if ($org_id)
+ {
+ $org_id = (int)$org_id;
+ $this->db->query("SELECT * FROM bb_organization
WHERE id={$org_id}", __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->soap ?
$this->db->f('description') : utf8_decode($this->db->f('description'));
+ $result = $this->soap ?
$this->db->f('description') : utf8_decode($this->db->f('description'));
+ }
}
+ return $result;
}
- return $result;
- }
- function get_organizations()
- {
- $organizations = array();
- $this->db->query("SELECT * FROM bb_organization WHERE
show_in_portal=1", __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_organizations()
{
- $homepage = $this->db->f('homepage');
- if(trim($homepage) != '' &&
!preg_match("/^http|https:\/\//", trim($homepage)))
+ $organizations = array();
+ $this->db->query("SELECT * FROM bb_organization WHERE
show_in_portal=1", __LINE__, __FILE__);
+ while ($this->db->next_record())
{
+ $homepage = $this->db->f('homepage');
+ if (trim($homepage) != '' &&
!preg_match("/^http|https:\/\//", trim($homepage)))
+ {
$homepage = 'http://' . $homepage;
+ }
+ $organizations[] = array
+ (
+ 'id' => (int)$this->db->f('id'),
+ 'name' =>
utf8_decode($this->db->f('name')),
+ 'shortname' =>
utf8_decode($this->db->f('shortname')),
+ 'description' =>
utf8_decode($this->db->f('description')),
+ 'homepage' => $homepage,
+ 'phone' => $this->db->f('phone'),
+ 'email' => $this->db->f('email')
+ );
}
- $organizations[] = array
- (
- 'id' =>
(int)$this->db->f('id'),
- 'name' =>
utf8_decode($this->db->f('name')),
- 'shortname' =>
utf8_decode($this->db->f('shortname')),
- 'description' =>
utf8_decode($this->db->f('description')),
- 'homepage' => $homepage,
- 'phone' =>
$this->db->f('phone'),
- 'email' => $this->db->f('email')
- );
+// _debug_array($organizations);
+ return $organizations;
}
-// _debug_array($organizations);
- return $organizations;
- }
- function get_org_info($org_id)
- {
- $result = array();
- if($org_id)
+ function get_org_info( $org_id )
{
- $org_id = (int)$org_id;
- $this->db->query("SELECT * FROM bb_organization WHERE
id={$org_id}", __LINE__, __FILE__);
- $this->db->next_record();
- $result = array
- (
- 'name' =>
utf8_decode($this->db->f('name')),
- 'shortname' =>
utf8_decode($this->db->f('shortname')),
- 'description' =>
utf8_decode($this->db->f('description')),
- 'homepage' =>
$this->db->f('homepage'),
- 'phone' =>
$this->db->f('phone'),
- 'email' => $this->db->f('email')
- );
+ $result = array();
+ if ($org_id)
+ {
+ $org_id = (int)$org_id;
+ $this->db->query("SELECT * FROM bb_organization
WHERE id={$org_id}", __LINE__, __FILE__);
+ $this->db->next_record();
+ $result = array
+ (
+ 'name' =>
utf8_decode($this->db->f('name')),
+ 'shortname' =>
utf8_decode($this->db->f('shortname')),
+ 'description' =>
utf8_decode($this->db->f('description')),
+ 'homepage' => $this->db->f('homepage'),
+ 'phone' => $this->db->f('phone'),
+ 'email' => $this->db->f('email')
+ );
+ }
+ return $result;
}
- return $result;
- }
- function get_groups()
- {
- $groups = array();
- $join = " {$this->left_join} bb_organization ON
(bb_group.organization_id = bb_organization.id)";
- $this->db->query("SELECT bb_group.*, bb_organization.homepage
FROM bb_group {$join} WHERE bb_group.show_in_portal=1", __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_groups()
{
- $groups[] = array
- (
- 'id' =>
(int)$this->db->f('id'),
- 'name' =>
utf8_decode($this->db->f('name')),
- 'shortname' =>
utf8_decode($this->db->f('shortname')),
- 'description' =>
utf8_decode($this->db->f('description')),
- 'homepage' =>
utf8_decode($this->db->f('homepage')),
- 'organization_id' =>
$this->db->f('organization_id')
- );
+ $groups = array();
+ $join = " {$this->left_join} bb_organization ON
(bb_group.organization_id = bb_organization.id)";
+ $this->db->query("SELECT bb_group.*,
bb_organization.homepage FROM bb_group {$join} WHERE
bb_group.show_in_portal=1", __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $groups[] = array
+ (
+ 'id' => (int)$this->db->f('id'),
+ 'name' =>
utf8_decode($this->db->f('name')),
+ 'shortname' =>
utf8_decode($this->db->f('shortname')),
+ 'description' =>
utf8_decode($this->db->f('description')),
+ 'homepage' =>
utf8_decode($this->db->f('homepage')),
+ 'organization_id' =>
$this->db->f('organization_id')
+ );
+ }
+// _debug_array($groups);
+ return $groups;
}
-// _debug_array($groups);
- return $groups;
- }
- /*
- * Return incoming
- */
+ /*
+ * Return incoming
+ */
- function debug_xmlrpc($data = array())
- {
- if($data['fromdate'])
+ function debug_xmlrpc( $data = array() )
{
- return $data['fromdate'];
+ if ($data['fromdate'])
+ {
+ return $data['fromdate'];
+ }
+ else
+ {
+ return $data;
+ }
}
- else
+
+ function get_group_info( $group_id )
{
- return $data;
+ $result = array();
+ if ($group_id)
+ {
+ $group_id = (int)$group_id;
+ $this->db->query("SELECT * FROM bb_group WHERE
id={$group_id}", __LINE__, __FILE__);
+ $this->db->next_record();
+ $result = array
+ (
+ 'name' =>
utf8_decode($this->db->f('name')),
+ 'shortname' =>
utf8_decode($this->db->f('shortname')),
+ 'description' =>
utf8_decode($this->db->f('description')),
+ 'organization_id' =>
$this->db->f('organization_id')
+ );
+ }
+ return $result;
}
- }
- function get_group_info($group_id)
- {
- $result = array();
- if($group_id)
+ function get_all_arena_info( $arena_id, $int_arena_id )
{
- $group_id = (int)$group_id;
- $this->db->query("SELECT * FROM bb_group WHERE
id={$group_id}", __LINE__, __FILE__);
- $this->db->next_record();
- $result = array
- (
- 'name' =>
utf8_decode($this->db->f('name')),
- 'shortname' =>
utf8_decode($this->db->f('shortname')),
- 'description' =>
utf8_decode($this->db->f('description')),
- 'organization_id' =>
$this->db->f('organization_id')
- );
+ $result = array();
+ if ($arena_id && is_numeric($arena_id))
+ {
+ $arena_id = (int)$arena_id;
+ $this->db->query("SELECT * FROM activity_arena
WHERE id={$arena_id}", __LINE__, __FILE__);
+ $this->db->next_record();
+ $result = array
+ (
+ 'arena_name' => $this->soap ?
$this->db->f('arena_name') : utf8_decode($this->db->f('arena_name')),
+ 'address' => $this->soap ?
$this->db->f('address') : utf8_decode($this->db->f('address'))
+ );
+ }
+ else if ($int_arena_id && is_numeric($int_arena_id))
+ {
+ $int_arena_id = (int)$int_arena_id;
+ $this->db->query("SELECT id, name, street FROM
bb_building WHERE id={$int_arena_id}", __LINE__, __FILE__);
+ $this->db->next_record();
+ $result = array
+ (
+ 'arena_name' => $this->soap ?
$this->db->f('name') : utf8_decode($this->db->f('name')),
+ 'address' => $this->soap ?
$this->db->f('street') : utf8_decode($this->db->f('street'))
+ );
+ }
+ return $result;
}
- return $result;
- }
- function get_all_arena_info($arena_id, $int_arena_id)
- {
- $result = array();
- if($arena_id && is_numeric($arena_id))
+ function get_arena_info( $arena_id )
{
- $arena_id = (int)$arena_id;
- $this->db->query("SELECT * FROM activity_arena WHERE
id={$arena_id}", __LINE__, __FILE__);
- $this->db->next_record();
- $result = array
- (
- 'arena_name' => $this->soap ?
$this->db->f('arena_name') : utf8_decode($this->db->f('arena_name')),
- 'address' => $this->soap ?
$this->db->f('address') : utf8_decode($this->db->f('address'))
- );
+ $result = array();
+ if ($arena_id)
+ {
+ $arena_id = (int)$arena_id;
+ $this->db->query("SELECT * FROM activity_arena
WHERE id={$arena_id}", __LINE__, __FILE__);
+ $this->db->next_record();
+ $result = array
+ (
+ 'arena_name' => $this->soap ?
$this->db->f('arena_name') : utf8_decode($this->db->f('arena_name')),
+ 'address' => $this->soap ?
$this->db->f('address') : utf8_decode($this->db->f('address'))
+ );
+ }
+ return $result;
}
- else if($int_arena_id && is_numeric($int_arena_id))
+
+ function get_internal_arena_info( $arena_id )
{
- $int_arena_id = (int)$int_arena_id;
- $this->db->query("SELECT id, name, street FROM
bb_building WHERE id={$int_arena_id}", __LINE__, __FILE__);
- $this->db->next_record();
- $result = array
- (
- 'arena_name' => $this->soap ?
$this->db->f('name') : utf8_decode($this->db->f('name')),
- 'address' => $this->soap ?
$this->db->f('street') : utf8_decode($this->db->f('street'))
- );
+ $result = array();
+ if ($arena_id)
+ {
+ $arena_id = (int)$arena_id;
+ $this->db->query("SELECT id, name, street FROM
bb_building WHERE id={$arena_id}", __LINE__, __FILE__);
+ $this->db->next_record();
+ $result = array
+ (
+ 'arena_name' => $this->soap ?
$this->db->f('name') : utf8_decode($this->db->f('name')),
+ 'address' => $this->soap ?
$this->db->f('street') : utf8_decode($this->db->f('street'))
+ );
+ }
+ return $result;
}
- return $result;
- }
- function get_arena_info($arena_id)
- {
- $result = array();
- if($arena_id)
+ function get_statuscodes()
{
- $arena_id = (int)$arena_id;
- $this->db->query("SELECT * FROM activity_arena WHERE
id={$arena_id}", __LINE__, __FILE__);
- $this->db->next_record();
- $result = array
- (
- 'arena_name' => $this->soap ?
$this->db->f('arena_name') : utf8_decode($this->db->f('arena_name')),
- 'address' => $this->soap ?
$this->db->f('address') : utf8_decode($this->db->f('address'))
- );
+ $statuscodes[] = array('id' => '0', 'name' =>
utf8_decode('Ingen'));
+ $statuscodes[] = array('id' => '1', 'name' =>
utf8_decode('Ny'));
+ $statuscodes[] = array('id' => '2', 'name' =>
utf8_decode('Endring'));
+ $statuscodes[] = array('id' => '3', 'name' =>
utf8_decode('Akseptert'));
+ $statuscodes[] = array('id' => '4', 'name' =>
utf8_decode('Behandlet'));
+ $statuscodes[] = array('id' => '5', 'name' =>
utf8_decode('Avvist'));
+
+ return $statuscodes;
}
- return $result;
- }
- function get_internal_arena_info($arena_id)
- {
- $result = array();
- if($arena_id)
+ function get_targetgroups()
{
- $arena_id = (int)$arena_id;
- $this->db->query("SELECT id, name, street FROM
bb_building WHERE id={$arena_id}", __LINE__, __FILE__);
- $this->db->next_record();
- $result = array
- (
- 'arena_name' => $this->soap ?
$this->db->f('name') : utf8_decode($this->db->f('name')),
- 'address' => $this->soap ?
$this->db->f('street') : utf8_decode($this->db->f('street'))
- );
- }
- return $result;
- }
-
- function get_statuscodes()
- {
- $statuscodes[] = array('id' => '0', 'name' =>
utf8_decode('Ingen'));
- $statuscodes[] = array('id' => '1', 'name' =>
utf8_decode('Ny'));
- $statuscodes[] = array('id' => '2', 'name' =>
utf8_decode('Endring'));
- $statuscodes[] = array('id' => '3', 'name' =>
utf8_decode('Akseptert'));
- $statuscodes[] = array('id' => '4', 'name' =>
utf8_decode('Behandlet'));
- $statuscodes[] = array('id' => '5', 'name' =>
utf8_decode('Avvist'));
-
- return $statuscodes;
- }
-
- function get_targetgroups()
- {
- $sql = "SELECT * FROM bb_agegroup where active=1 AND NOT name
like 'Tilskuer%' ORDER BY sort";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ $sql = "SELECT * FROM bb_agegroup where active=1 AND
NOT name like 'Tilskuer%' ORDER BY sort";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $targets[] = array(
- 'id' => (int)$this->db->f('id'),
- 'name' =>
utf8_decode($this->db->f('name', true)),
- 'sort' => (int)$this->db->f('sort'),
- );
+ $targets[] = array(
+ 'id' => (int)$this->db->f('id'),
+ 'name' =>
utf8_decode($this->db->f('name', true)),
+ 'sort' => (int)$this->db->f('sort'),
+ );
+ }
+ return $targets;
}
- return $targets;
- }
- function get_category_list()
- {
- $sql = "SELECT * FROM bb_activity where active=1 and
parent_id=1";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_category_list()
+ {
+ $sql = "SELECT * FROM bb_activity where active=1 and
parent_id=1";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $categories[] = array(
- 'id' => (int)$this->db->f('id'),
- 'name' =>
utf8_decode($this->db->f('name', true)),
- );
+ $categories[] = array(
+ 'id' => (int)$this->db->f('id'),
+ 'name' =>
utf8_decode($this->db->f('name', true)),
+ );
+ }
+ return $categories;
}
- return $categories;
- }
- function update_organization($org_info)
- {
- $name = $org_info['name'];
- $orgid = (int)$org_info['orgid'];
- $homepage = $org_info['homepage'];
- if(!$homepage)
+ function update_organization( $org_info )
{
- $homepage = '';
- }
- $phone = $org_info['phone'];
- if(!$phone)
- {
- $phone = '';
- }
- $email = $org_info['email'];
- if(!$email)
- {
- $email = '';
- }
- $description = $org_info['description'];
- if(!$description)
- {
- $description = '';
- }
- $street = $org_info['street'];
- if(!$street)
- {
- $street = '';
- }
- $zip = $org_info['zip'];
- if($zip && strlen($zip) > 5)
- {
- $zip_code = substr($zip, 0, 4);
- $city = substr($zip, 5);
- }
- else
- {
- $zip_code = '';
- $city = '';
- }
- $district = $org_info['district'];
- if(!$district)
- {
- $district = '';
- }
- $activity_id = $org_info['activity_id'];
- $show_in_portal = 1;
+ $name = $org_info['name'];
+ $orgid = (int)$org_info['orgid'];
+ $homepage = $org_info['homepage'];
+ if (!$homepage)
+ {
+ $homepage = '';
+ }
+ $phone = $org_info['phone'];
+ if (!$phone)
+ {
+ $phone = '';
+ }
+ $email = $org_info['email'];
+ if (!$email)
+ {
+ $email = '';
+ }
+ $description = $org_info['description'];
+ if (!$description)
+ {
+ $description = '';
+ }
+ $street = $org_info['street'];
+ if (!$street)
+ {
+ $street = '';
+ }
+ $zip = $org_info['zip'];
+ if ($zip && strlen($zip) > 5)
+ {
+ $zip_code = substr($zip, 0, 4);
+ $city = substr($zip, 5);
+ }
+ else
+ {
+ $zip_code = '';
+ $city = '';
+ }
+ $district = $org_info['district'];
+ if (!$district)
+ {
+ $district = '';
+ }
+ $activity_id = $org_info['activity_id'];
+ $show_in_portal = 1;
- $values = array(
- 'name = ' . $this->marshal($name, 'string'),
- 'homepage = ' . $this->marshal($homepage, 'string'),
- 'phone = ' . $this->marshal($phone, 'string'),
- 'email = ' . $this->marshal($email, 'string'),
- 'description = ' . $this->marshal($description,
'string'),
- 'street = ' . $this->marshal($street, 'string'),
- 'zip_code = ' . $this->marshal($zip_code, 'string'),
- 'city = ' . $this->marshal($city, 'string'),
- 'district = ' . $this->marshal($district),
- 'activity_id = ' . $this->marshal($activity_id, 'int'),
- 'show_in_portal = 1'
- );
+ $values = array(
+ 'name = ' . $this->marshal($name, 'string'),
+ 'homepage = ' . $this->marshal($homepage,
'string'),
+ 'phone = ' . $this->marshal($phone, 'string'),
+ 'email = ' . $this->marshal($email, 'string'),
+ 'description = ' . $this->marshal($description,
'string'),
+ 'street = ' . $this->marshal($street, 'string'),
+ 'zip_code = ' . $this->marshal($zip_code,
'string'),
+ 'city = ' . $this->marshal($city, 'string'),
+ 'district = ' . $this->marshal($district),
+ 'activity_id = ' . $this->marshal($activity_id,
'int'),
+ 'show_in_portal = 1'
+ );
$result = $this->db->query('UPDATE bb_organization SET
' . join(',', $values) . " WHERE id=$orgid", __LINE__, __FILE__);
- }
+ }
- function add_organization($org_info)
- {
- $name = $org_info['name'];
- $orgnr = $org_info['orgnr'];
- $homepage = $org_info['homepage'];
- $phone = $org_info['phone'];
- $email = $org_info['email'];
- $description = $org_info['description'];
- $street = $org_info['street'];
- $zip = $org_info['zip'];
- if($zip && strlen($zip) > 5)
+ function add_organization( $org_info )
{
- $zip_code = substr($zip, 0, 4);
- $city = substr($zip, 5);
- }
- else
- {
- $zip_code = '';
- $city = '';
- }
- $district = $org_info['district'];
- $activity_id = $org_info['activity_id'];
- $show_in_portal = 1;
+ $name = $org_info['name'];
+ $orgnr = $org_info['orgnr'];
+ $homepage = $org_info['homepage'];
+ $phone = $org_info['phone'];
+ $email = $org_info['email'];
+ $description = $org_info['description'];
+ $street = $org_info['street'];
+ $zip = $org_info['zip'];
+ if ($zip && strlen($zip) > 5)
+ {
+ $zip_code = substr($zip, 0, 4);
+ $city = substr($zip, 5);
+ }
+ else
+ {
+ $zip_code = '';
+ $city = '';
+ }
+ $district = $org_info['district'];
+ $activity_id = $org_info['activity_id'];
+ $show_in_portal = 1;
- $columns[] = 'name';
- $columns[] = 'homepage';
- $columns[] = 'phone';
- $columns[] = 'email';
- $columns[] = 'description';
- $columns[] = 'street';
- $columns[] = 'zip_code';
- $columns[] = 'city';
- $columns[] = 'district';
- $columns[] = 'organization_number';
- $columns[] = 'activity_id';
- $columns[] = 'show_in_portal';
- $cols = implode(',', $columns);
+ $columns[] = 'name';
+ $columns[] = 'homepage';
+ $columns[] = 'phone';
+ $columns[] = 'email';
+ $columns[] = 'description';
+ $columns[] = 'street';
+ $columns[] = 'zip_code';
+ $columns[] = 'city';
+ $columns[] = 'district';
+ $columns[] = 'organization_number';
+ $columns[] = 'activity_id';
+ $columns[] = 'show_in_portal';
+ $cols = implode(',', $columns);
- $values[] = "'{$name}'";
- $values[] = "'{$homepage}'";
- $values[] = "'{$phone}'";
- $values[] = "'{$email}'";
- $values[] = "'{$description}'";
- $values[] = "'{$street}'";
- $values[] = "'{$zip_code}'";
- $values[] = "'{$city}'";
- $values[] = "'{$district}'";
- $values[] = "'{$orgnr}'";
- $values[] = $this->marshal($activity_id, 'int');
- $values[] = $show_in_portal;
- $vals = implode(',', $values);
+ $values[] = "'{$name}'";
+ $values[] = "'{$homepage}'";
+ $values[] = "'{$phone}'";
+ $values[] = "'{$email}'";
+ $values[] = "'{$description}'";
+ $values[] = "'{$street}'";
+ $values[] = "'{$zip_code}'";
+ $values[] = "'{$city}'";
+ $values[] = "'{$district}'";
+ $values[] = "'{$orgnr}'";
+ $values[] = $this->marshal($activity_id, 'int');
+ $values[] = $show_in_portal;
+ $vals = implode(',', $values);
- $sql = "INSERT INTO bb_organization ({$cols}) VALUES ({$vals})";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- if(isset($result))
- {
- return $this->db->get_last_insert_id('bb_organization',
'id');
+ $sql = "INSERT INTO bb_organization ({$cols}) VALUES
({$vals})";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
+ if (isset($result))
+ {
+ return
$this->db->get_last_insert_id('bb_organization', 'id');
+ }
+ else
+ {
+ return 0;
+ }
}
- else
- {
- return 0;
- }
- }
- function add_organization_local($org_info)
- {
- $name = $org_info['name'];
- $orgnr = $org_info['orgnr'];
- $homepage = $org_info['homepage'];
- $phone = $org_info['phone'];
- $email = $org_info['email'];
- $description = $org_info['description'];
- $street = $org_info['street'];
- $streetnumber = $org_info['streetnumber'];
- $zip_code = $org_info['zip'];
- $city = $org_info['postaddress'];
- $district = $org_info['district'];
- $status = $org_info['status'];
- $original_org_id = $org_info['original_org_id'];
- if(!isset($original_org_id) || $original_org_id == '')
+ function add_organization_local( $org_info )
{
- $original_org_id = 0;
- }
+ $name = $org_info['name'];
+ $orgnr = $org_info['orgnr'];
+ $homepage = $org_info['homepage'];
+ $phone = $org_info['phone'];
+ $email = $org_info['email'];
+ $description = $org_info['description'];
+ $street = $org_info['street'];
+ $streetnumber = $org_info['streetnumber'];
+ $zip_code = $org_info['zip'];
+ $city = $org_info['postaddress'];
+ $district = $org_info['district'];
+ $status = $org_info['status'];
+ $original_org_id = $org_info['original_org_id'];
+ if (!isset($original_org_id) || $original_org_id == '')
+ {
+ $original_org_id = 0;
+ }
- $columns[] = 'name';
- $columns[] = 'homepage';
- $columns[] = 'phone';
- $columns[] = 'email';
- $columns[] = 'description';
- $columns[] = 'address';
- $columns[] = 'addressnumber';
- $columns[] = 'zip_code';
- $columns[] = 'city';
- $columns[] = 'orgno';
- $columns[] = 'district';
- $columns[] = 'change_type';
- $columns[] = 'original_org_id';
- $cols = implode(',', $columns);
+ $columns[] = 'name';
+ $columns[] = 'homepage';
+ $columns[] = 'phone';
+ $columns[] = 'email';
+ $columns[] = 'description';
+ $columns[] = 'address';
+ $columns[] = 'addressnumber';
+ $columns[] = 'zip_code';
+ $columns[] = 'city';
+ $columns[] = 'orgno';
+ $columns[] = 'district';
+ $columns[] = 'change_type';
+ $columns[] = 'original_org_id';
+ $cols = implode(',', $columns);
- $values[] = "'{$name}'";
- $values[] = "'{$homepage}'";
- $values[] = "'{$phone}'";
- $values[] = "'{$email}'";
- $values[] = "'{$description}'";
- $values[] = "'{$street}'";
- $values[] = "'{$streetnumber}'";
- $values[] = "'{$zip_code}'";
- $values[] = "'{$city}'";
- $values[] = "'{$orgnr}'";
- $values[] = "'{$district}'";
- $values[] = "'{$status}'";
- $values[] = $original_org_id;
- $vals = implode(',', $values);
+ $values[] = "'{$name}'";
+ $values[] = "'{$homepage}'";
+ $values[] = "'{$phone}'";
+ $values[] = "'{$email}'";
+ $values[] = "'{$description}'";
+ $values[] = "'{$street}'";
+ $values[] = "'{$streetnumber}'";
+ $values[] = "'{$zip_code}'";
+ $values[] = "'{$city}'";
+ $values[] = "'{$orgnr}'";
+ $values[] = "'{$district}'";
+ $values[] = "'{$status}'";
+ $values[] = $original_org_id;
+ $vals = implode(',', $values);
- //var_dump("INSERT INTO activity_organization ({$cols}) VALUES
({$vals})");
- $sql = "INSERT INTO activity_organization ({$cols}) VALUES
({$vals})";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- if(isset($result))
- {
- return
$this->db->get_last_insert_id('activity_organization', 'id');
+ //var_dump("INSERT INTO activity_organization ({$cols})
VALUES ({$vals})");
+ $sql = "INSERT INTO activity_organization ({$cols})
VALUES ({$vals})";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
+ if (isset($result))
+ {
+ return
$this->db->get_last_insert_id('activity_organization', 'id');
+ }
+ else
+ {
+ return 0;
+ }
}
- else
+
+ function add_group( $group_info )
{
- return 0;
- }
- }
+ $name = $group_info['name'];
+ $orgid = $group_info['organization_id'];
+ $description = $group_info['description'];
+ $activity_id = $group_info['activity_id'];
+ $show_in_portal = 1;
- function add_group($group_info)
- {
- $name = $group_info['name'];
- $orgid = $group_info['organization_id'];
- $description = $group_info['description'];
- $activity_id = $group_info['activity_id'];
- $show_in_portal = 1;
+ $columns[] = 'name';
+ $columns[] = 'description';
+ $columns[] = 'organization_id';
+ $columns[] = 'activity_id';
+ $columns[] = 'show_in_portal';
+ $cols = implode(',', $columns);
- $columns[] = 'name';
- $columns[] = 'description';
- $columns[] = 'organization_id';
- $columns[] = 'activity_id';
- $columns[] = 'show_in_portal';
- $cols = implode(',', $columns);
+ $values[] = "'{$name}'";
+ $values[] = "'{$description}'";
+ $values[] = "'{$orgid}'";
+ $values[] = $this->marshal($activity_id, 'int');
+ $values[] = $show_in_portal;
+ $vals = implode(',', $values);
- $values[] = "'{$name}'";
- $values[] = "'{$description}'";
- $values[] = "'{$orgid}'";
- $values[] = $this->marshal($activity_id, 'int');
- $values[] = $show_in_portal;
- $vals = implode(',', $values);
+ $sql = "INSERT INTO bb_group ({$cols}) VALUES
({$vals})";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
+ if (isset($result))
+ {
+ return
$this->db->get_last_insert_id('bb_group', 'id');
+ }
+ else
+ {
+ return 0;
+ }
+ }
- $sql = "INSERT INTO bb_group ({$cols}) VALUES ({$vals})";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- if(isset($result))
+ function add_group_local( $group_info )
{
- return $this->db->get_last_insert_id('bb_group', 'id');
- }
- else
- {
- return 0;
- }
- }
+ $name = $group_info['name'];
+ $orgid = $group_info['organization_id'];
+ $description = $group_info['description'];
+ $status = $group_info['status'];
- function add_group_local($group_info)
- {
- $name = $group_info['name'];
- $orgid = $group_info['organization_id'];
- $description = $group_info['description'];
- $status = $group_info['status'];
+ $columns[] = 'name';
+ $columns[] = 'description';
+ $columns[] = 'organization_id';
+ $columns[] = 'change_type';
+ $cols = implode(',', $columns);
- $columns[] = 'name';
- $columns[] = 'description';
- $columns[] = 'organization_id';
- $columns[] = 'change_type';
- $cols = implode(',', $columns);
+ $values[] = "'{$name}'";
+ $values[] = "'{$description}'";
+ $values[] = "'{$orgid}'";
+ $values[] = "'{$status}'";
+ $vals = implode(',', $values);
- $values[] = "'{$name}'";
- $values[] = "'{$description}'";
- $values[] = "'{$orgid}'";
- $values[] = "'{$status}'";
- $vals = implode(',', $values);
-
- $sql = "INSERT INTO activity_group ({$cols}) VALUES ({$vals})";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- if(isset($result))
- {
- return $this->db->get_last_insert_id('activity_group',
'id');
+ $sql = "INSERT INTO activity_group ({$cols}) VALUES
({$vals})";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
+ if (isset($result))
+ {
+ return
$this->db->get_last_insert_id('activity_group', 'id');
+ }
+ else
+ {
+ return 0;
+ }
}
- else
- {
- return 0;
- }
- }
- function delete_contact_persons($org_id)
- {
- if($org_id)
+ function delete_contact_persons( $org_id )
{
- $org = (int)$org_id;
- $sql = "DELETE FROM bb_organization_contact WHERE
organization_id={$org}";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- return isset($result);
- }
+ if ($org_id)
+ {
+ $org = (int)$org_id;
+ $sql = "DELETE FROM bb_organization_contact
WHERE organization_id={$org}";
+ $result = $this->db->query($sql, __LINE__,
__FILE__);
+ return isset($result);
+ }
/* else if($group_id)
- {
- $group = (int)$group_id;
- $sql = "DELETE FROM bb_group_contact WHERE
group_id={$group}";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- return isset($result);
+ {
+ $group = (int)$group_id;
+ $sql = "DELETE FROM bb_group_contact WHERE
group_id={$group}";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
+ return isset($result);
} */
- }
+ }
- function add_contact_person_org($contact)
- {
- $name = $contact['name'];
- $phone = $contact['phone'];
- $mail = $contact['mail'];
- $org_id = $contact['org_id'];
- $ssn = '';
+ function add_contact_person_org( $contact )
+ {
+ $name = $contact['name'];
+ $phone = $contact['phone'];
+ $mail = $contact['mail'];
+ $org_id = $contact['org_id'];
+ $ssn = '';
- $columns[] = 'name';
- $columns[] = 'ssn';
- $columns[] = 'phone';
- $columns[] = 'email';
- $columns[] = 'organization_id';
- $cols = implode(',', $columns);
+ $columns[] = 'name';
+ $columns[] = 'ssn';
+ $columns[] = 'phone';
+ $columns[] = 'email';
+ $columns[] = 'organization_id';
+ $cols = implode(',', $columns);
- $values[] = "'{$name}'";
- $values[] = "'{$ssn}'";
- $values[] = "'{$phone}'";
- $values[] = "'{$mail}'";
- $values[] = $org_id;
- $vals = implode(',', $values);
+ $values[] = "'{$name}'";
+ $values[] = "'{$ssn}'";
+ $values[] = "'{$phone}'";
+ $values[] = "'{$mail}'";
+ $values[] = $org_id;
+ $vals = implode(',', $values);
- $sql = "INSERT INTO bb_organization_contact ({$cols}) VALUES
({$vals})";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- return isset($result);
- }
+ $sql = "INSERT INTO bb_organization_contact ({$cols})
VALUES ({$vals})";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
+ return isset($result);
+ }
- function update_contact_person_org($contact)
- {
+ function update_contact_person_org( $contact )
+ {
- }
+ }
- function add_contact_person_group($contact)
- {
- $name = $contact['name'];
- $phone = $contact['phone'];
- $mail = $contact['mail'];
- $org_id = $contact['group_id'];
+ function add_contact_person_group( $contact )
+ {
+ $name = $contact['name'];
+ $phone = $contact['phone'];
+ $mail = $contact['mail'];
+ $org_id = $contact['group_id'];
- $columns[] = 'name';
- $columns[] = 'phone';
- $columns[] = 'email';
- $columns[] = 'group_id';
- $cols = implode(',', $columns);
+ $columns[] = 'name';
+ $columns[] = 'phone';
+ $columns[] = 'email';
+ $columns[] = 'group_id';
+ $cols = implode(',', $columns);
- $values[] = "'{$name}'";
- $values[] = "'{$phone}'";
- $values[] = "'{$mail}'";
- $values[] = $org_id;
- $vals = implode(',', $values);
+ $values[] = "'{$name}'";
+ $values[] = "'{$phone}'";
+ $values[] = "'{$mail}'";
+ $values[] = $org_id;
+ $vals = implode(',', $values);
- $sql = "INSERT INTO bb_group_contact ({$cols}) VALUES
({$vals})";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- return isset($result);
- }
+ $sql = "INSERT INTO bb_group_contact ({$cols}) VALUES
({$vals})";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
+ return isset($result);
+ }
- function update_contact_person_group($contact)
- {
+ function update_contact_person_group( $contact )
+ {
- }
+ }
- function add_contact_person_local($contact)
- {
- $name = $contact['name'];
- $phone = $contact['phone'];
- $mail = $contact['mail'];
- $org_id = $contact['org_id'];
- $group_id = $contact['group_id'];
+ function add_contact_person_local( $contact )
+ {
+ $name = $contact['name'];
+ $phone = $contact['phone'];
+ $mail = $contact['mail'];
+ $org_id = $contact['org_id'];
+ $group_id = $contact['group_id'];
- $columns[] = 'name';
- $columns[] = 'phone';
- $columns[] = 'email';
- $columns[] = 'organization_id';
- $columns[] = 'group_id';
- $columns[] = 'address';
- $columns[] = 'zipcode';
- $columns[] = 'city';
- $cols = implode(',', $columns);
+ $columns[] = 'name';
+ $columns[] = 'phone';
+ $columns[] = 'email';
+ $columns[] = 'organization_id';
+ $columns[] = 'group_id';
+ $columns[] = 'address';
+ $columns[] = 'zipcode';
+ $columns[] = 'city';
+ $cols = implode(',', $columns);
- $values[] = "'{$name}'";
- $values[] = "'{$phone}'";
- $values[] = "'{$mail}'";
- $values[] = $org_id;
- $values[] = $group_id;
- $values[] = "''";
- $values[] = "''";
- $values[] = "''";
- $vals = implode(',', $values);
+ $values[] = "'{$name}'";
+ $values[] = "'{$phone}'";
+ $values[] = "'{$mail}'";
+ $values[] = $org_id;
+ $values[] = $group_id;
+ $values[] = "''";
+ $values[] = "''";
+ $values[] = "''";
+ $vals = implode(',', $values);
- //var_dump("INSERT INTO activity_contact_person ({$cols})
VALUES ({$vals})");
- $sql = "INSERT INTO activity_contact_person ({$cols}) VALUES
({$vals})";
- $result = $this->db->query($sql, __LINE__, __FILE__);
- return isset($result);
- }
-
- function get_activities_for_update($org_id, $group = false)
- {
- $activity_ids = array();
- if($group)
- {
- $sql = "SELECT id FROM activity_activity WHERE
new_group AND group_id={$org_id}";
+ //var_dump("INSERT INTO activity_contact_person
({$cols}) VALUES ({$vals})");
+ $sql = "INSERT INTO activity_contact_person ({$cols})
VALUES ({$vals})";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
+ return isset($result);
}
- else
- {
- $sql = "SELECT id FROM activity_activity WHERE new_org
AND organization_id={$org_id}";
- }
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_activities_for_update( $org_id, $group = false )
{
- $activity_ids[] = $this->db->f('id');
- }
+ $activity_ids = array();
+ if ($group)
+ {
+ $sql = "SELECT id FROM activity_activity WHERE
new_group AND group_id={$org_id}";
+ }
+ else
+ {
+ $sql = "SELECT id FROM activity_activity WHERE
new_org AND organization_id={$org_id}";
+ }
- return $activity_ids;
- }
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $activity_ids[] = $this->db->f('id');
+ }
- function get_connected_activities($org_id)
- {
- $activities = array();
- $sql = "SELECT * FROM activity_activity WHERE
organization_id={$org_id}";
+ return $activity_ids;
+ }
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ function get_connected_activities( $org_id )
{
+ $activities = array();
+ $sql = "SELECT * FROM activity_activity WHERE
organization_id={$org_id}";
+
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
$activity = new
activitycalendar_activity((int)$this->db->f('id'));
-
$activity->set_title($this->unmarshal($this->db->f('title'), 'string'));
-
$activity->set_organization_id($this->unmarshal($this->db->f('organization_id'),
'int'));
-
$activity->set_group_id($this->unmarshal($this->db->f('group_id'), 'int'));
-
$activity->set_district($this->unmarshal($this->db->f('district'), 'int'));
-
$activity->set_office($this->unmarshal($this->db->f('office'), 'int'));
-
$activity->set_category($this->unmarshal($this->db->f('category'), 'int'));
-
$activity->set_state($this->unmarshal($this->db->f('state'), 'int'));
-
$activity->set_target($this->unmarshal($this->db->f('target'), 'string'));
-
$activity->set_description($this->unmarshal($this->db->f('description'),
'string'));
-
$activity->set_arena($this->unmarshal($this->db->f('arena'), 'string'));
-
$activity->set_internal_arena($this->unmarshal($this->db->f('internal_arena'),
'string'));
-
$activity->set_time($this->unmarshal($this->db->f('time'), 'string'));
-
$activity->set_last_change_date($this->unmarshal($this->db->f('last_change_date'),
'int'));
-
$activity->set_special_adaptation($this->unmarshal($this->db->f('special_adaptation',
'bool')));
-
$activity->set_secret($this->unmarshal($this->db->f('secret'), 'string'));
-
$activity->set_contact_person_2_address($this->unmarshal($this->db->f('contact_person_2_address'),
'string'));
-
$activity->set_contact_person_2_zip($this->unmarshal($this->db->f('contact_person_2_zip'),
'string'));
-
$activity->set_frontend($this->unmarshal($this->db->f('frontend', 'bool')));
-
$activity->set_new_org($this->unmarshal($this->db->f('new_org', 'bool')));
+
$activity->set_title($this->unmarshal($this->db->f('title'), 'string'));
+
$activity->set_organization_id($this->unmarshal($this->db->f('organization_id'),
'int'));
+
$activity->set_group_id($this->unmarshal($this->db->f('group_id'), 'int'));
+
$activity->set_district($this->unmarshal($this->db->f('district'), 'int'));
+
$activity->set_office($this->unmarshal($this->db->f('office'), 'int'));
+
$activity->set_category($this->unmarshal($this->db->f('category'), 'int'));
+
$activity->set_state($this->unmarshal($this->db->f('state'), 'int'));
+
$activity->set_target($this->unmarshal($this->db->f('target'), 'string'));
+
$activity->set_description($this->unmarshal($this->db->f('description'),
'string'));
+
$activity->set_arena($this->unmarshal($this->db->f('arena'), 'string'));
+
$activity->set_internal_arena($this->unmarshal($this->db->f('internal_arena'),
'string'));
+
$activity->set_time($this->unmarshal($this->db->f('time'), 'string'));
+
$activity->set_last_change_date($this->unmarshal($this->db->f('last_change_date'),
'int'));
+
$activity->set_special_adaptation($this->unmarshal($this->db->f('special_adaptation',
'bool')));
+
$activity->set_secret($this->unmarshal($this->db->f('secret'), 'string'));
+
$activity->set_contact_person_2_address($this->unmarshal($this->db->f('contact_person_2_address'),
'string'));
+
$activity->set_contact_person_2_zip($this->unmarshal($this->db->f('contact_person_2_zip'),
'string'));
+
$activity->set_frontend($this->unmarshal($this->db->f('frontend', 'bool')));
+
$activity->set_new_org($this->unmarshal($this->db->f('new_org', 'bool')));
- $activities[] = $activity;
+ $activities[] = $activity;
+ }
+
+ return $activities;
}
- return $activities;
- }
+ function update_organization_connection( $activity_id,
$organization_id )
+ {
+ $id = intval($activity_id);
+ $org_id = intval($organization_id);
- function update_organization_connection($activity_id, $organization_id)
- {
- $id = intval($activity_id);
- $org_id = intval($organization_id);
-
$result = $this->db->query("UPDATE activity_activity
SET organization_id={$org_id} WHERE id={$id}", __LINE__, __FILE__);
- return isset($result);
- }
+ return isset($result);
+ }
- function get_activities_without_groups()
- {
- $activities = array();
- $sql_activities = "select a.*, o.description as org_desc from
activity_activity a, bb_organization o where (a.group_id is null or a.group_id
= 0) and o.id = a.organization_id";
- $this->db->query($sql_activities, __LINE__, __FILE__);
- while($this->db->next_record())
- {
- $activity_id = $this->db->f('id');
- $activity_title = $this->db->f('title');
- $activity_organization = $this->db->f('organization_id');
- $description = $this->db->f('org_desc');
+ function get_activities_without_groups()
+ {
+ $activities = array();
+ $sql_activities = "select a.*, o.description as
org_desc from activity_activity a, bb_organization o where (a.group_id is null
or a.group_id = 0) and o.id = a.organization_id";
+ $this->db->query($sql_activities, __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $activity_id = $this->db->f('id');
+ $activity_title = $this->db->f('title');
+ $activity_organization =
$this->db->f('organization_id');
+ $description = $this->db->f('org_desc');
- $activities[] = array(
- 'id' =>
$activity_id,
- 'title' =>
$activity_title,
- 'organization' =>
$activity_organization,
- 'description' => $description
- );
- }
- return $activities;
- }
- /*
- * Function to be run once.
- * Generates new groups based on activity where group is not
registered.
- * Adds new group to booking
- */
+ $activities[] = array(
+ 'id' => $activity_id,
+ 'title' => $activity_title,
+ 'organization' =>
$activity_organization,
+ 'description' => $description
+ );
+ }
+ return $activities;
+ }
+ /*
+ * Function to be run once.
+ * Generates new groups based on activity where group is not
registered.
+ * Adds new group to booking
+ */
- function generate_groups()
- {
- //TODO
- }
+ function generate_groups()
+ {
+ //TODO
+ }
- function remove_old_activities($activity_id)
- {
- //$sql = "delete from activity_activity where id in
(1293,1294,1297,1299)"; //1293,1294,1297,1299
- $sql = "delete from
activity_activity where id={$activity_id}";
- $result = $this->db->query($sql, __LINE__, __FILE__);
+ function remove_old_activities( $activity_id )
+ {
+ //$sql = "delete from activity_activity where id in
(1293,1294,1297,1299)"; //1293,1294,1297,1299
+ $sql = "delete from activity_activity where
id={$activity_id}";
+ $result = $this->db->query($sql, __LINE__, __FILE__);
- return isset($result);
- }
+ return isset($result);
+ }
- function save_with_no_changes($activity)
- {
- $id = intval($activity->get_id());
- $ts_now = strtotime('now');
+ function save_with_no_changes( $activity )
+ {
+ $id = intval($activity->get_id());
+ $ts_now = strtotime('now');
- $values = "last_change_date = " . $this->marshal($ts_now, 'int');
+ $values = "last_change_date = " .
$this->marshal($ts_now, 'int');
$result = $this->db->query("UPDATE activity_activity
SET {$values} WHERE id={$id}", __LINE__, __FILE__);
- return isset($result);
- }
+ return isset($result);
+ }
- function update_activity_group($activity_id, $group_id)
- {
- $id = intval($activity_id);
- $g_id = intval($group_id);
+ function update_activity_group( $activity_id, $group_id )
+ {
+ $id = intval($activity_id);
+ $g_id = intval($group_id);
- $values = "group_id = " . $g_id;
- //var_dump("UPDATE activity_activity SET {$values} WHERE
id={$id}");
- //die;
+ $values = "group_id = " . $g_id;
+ //var_dump("UPDATE activity_activity SET {$values}
WHERE id={$id}");
+ //die;
$result = $this->db->query("UPDATE activity_activity
SET {$values} WHERE id={$id}", __LINE__, __FILE__);
- return isset($result);
- }
+ return isset($result);
+ }
}
\ No newline at end of file
Modified: trunk/activitycalendar/inc/class.soarena.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soarena.inc.php 2016-02-11 22:07:53 UTC
(rev 14727)
+++ trunk/activitycalendar/inc/class.soarena.inc.php 2016-02-11 22:28:46 UTC
(rev 14728)
@@ -7,342 +7,342 @@
class activitycalendar_soarena extends activitycalendar_socommon
{
- protected static $so;
+ protected static $so;
- /**
- * Get a static reference to the storage object associated with this
model object
- *
- * @return activitycalendar_soparty the storage object
- */
- public static function get_instance()
- {
- if(self::$so == null)
+ /**
+ * Get a static reference to the storage object associated with
this model object
+ *
+ * @return activitycalendar_soparty the storage object
+ */
+ public static function get_instance()
+ {
+ if (self::$so == null)
{
- self::$so = CreateObject('activitycalendar.soarena');
+ self::$so =
CreateObject('activitycalendar.soarena');
+ }
+ return self::$so;
}
- return self::$so;
- }
-
- /**
- * Generate SQL query
- *
- *
- * @param string $sort_field
- * @param boolean $ascending
- * @param string $search_for
- * @param string $search_type
- * @param array $filters
- * @param boolean $return_count
- * @return string SQL
- */
- protected function get_query(string $sort_field, boolean $ascending,
string $search_for, string $search_type, array $filters, boolean $return_count)
- {
- $clauses = array('1=1');
- //Add columns to this array to include them in the query
- $columns = array();
+ /**
+ * Generate SQL query
+ *
+ *
+ * @param string $sort_field
+ * @param boolean $ascending
+ * @param string $search_for
+ * @param string $search_type
+ * @param array $filters
+ * @param boolean $return_count
+ * @return string SQL
+ */
+ protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ {
+ $clauses = array('1=1');
- if($sort_field != null)
+ //Add columns to this array to include them in the query
+ $columns = array();
+
+ if ($sort_field != null)
{
- $dir = $ascending ? 'ASC' : 'DESC';
- if($sort_field == 'arena_id')
- {
+ $dir = $ascending ? 'ASC' : 'DESC';
+ if ($sort_field == 'arena_id')
+ {
$sort_field = 'id';
+ }
+ $order = "ORDER BY {$this->marshal($sort_field,
'field')} $dir";
}
- $order = "ORDER BY {$this->marshal($sort_field,
'field')} $dir";
- }
- else if(!$return_count)
- {
- $dir = $ascending ? 'ASC' : 'DESC';
- $order = "ORDER BY arena.arena_name $dir";
- }
-
- if($search_for)
- {
- $query =
$this->marshal($search_for, 'string');
- $like_pattern = "'%" . $search_for . "%'";
- $like_clauses = array();
- switch($search_type)
+ else if (!$return_count)
+ {
+ $dir = $ascending ? 'ASC' : 'DESC';
+ $order = "ORDER BY arena.arena_name $dir";
+ }
+
+ if ($search_for)
+ {
+ $query = $this->marshal($search_for, 'string');
+ $like_pattern = "'%" . $search_for . "%'";
+ $like_clauses = array();
+ switch ($search_type)
{
- case "all":
- default:
- $like_clauses[] = "arena.arena_name
$this->like $like_pattern";
- $like_clauses[] = "arena.address
$this->like $like_pattern";
- break;
+ case "all":
+ default:
+ $like_clauses[] =
"arena.arena_name $this->like $like_pattern";
+ $like_clauses[] =
"arena.address $this->like $like_pattern";
+ break;
+ }
+
+
+ if (count($like_clauses))
+ {
+ $clauses[] = '(' . join(' OR ',
$like_clauses) . ')';
+ }
}
+ $filter_clauses = array();
- if(count($like_clauses))
+ if (isset($filters[$this->get_id_field_name()]))
{
- $clauses[] = '(' . join(' OR ', $like_clauses)
. ')';
+ $id =
$this->marshal($filters[$this->get_id_field_name()], 'int');
+ $filter_clauses[] = "arena.id = {$id}";
}
- }
- $filter_clauses = array();
-
- if(isset($filters[$this->get_id_field_name()]))
+ //filter on active/non-active
+ if (isset($filters['active']))
{
- $id =
$this->marshal($filters[$this->get_id_field_name()], 'int');
- $filter_clauses[] = "arena.id = {$id}";
- }
-
- //filter on active/non-active
- if(isset($filters['active']))
- {
- if($filters['active'] == 'active')
+ if ($filters['active'] == 'active')
+ {
+ $filter_clauses[] = "arena.active =
TRUE";
+ }
+ else if ($filters['active'] == 'inactive')
+ {
+ $filter_clauses[] = "NOT arena.active";
+ }
+ }
+
+ //filter on internal/not internal arena
+ if (isset($filters['arena_type']))
{
- $filter_clauses[] = "arena.active = TRUE";
- }
- else if($filters['active'] == 'inactive')
+ if ($filters['arena_type'] == 'internal')
+ {
+ $filter_clauses[] = "NOT
arena.internal_arena_id IS NULL";
+ }
+ else if ($filters['arena_type'] ==
'not_internal')
+ {
+ $filter_clauses[] =
"arena.internal_arena_id IS NULL";
+ }
+ }
+
+ if (count($filter_clauses))
{
- $filter_clauses[] = "NOT arena.active";
- }
- }
-
- //filter on internal/not internal arena
- if(isset($filters['arena_type']))
- {
- if($filters['arena_type'] == 'internal')
+ $clauses[] = join(' AND ', $filter_clauses);
+ }
+
+ $condition = join(' AND ', $clauses);
+ //var_dump($filters);
+ //var_dump($filter_clauses);
+ //var_dump($condition);
+
+ if ($return_count) // We should only return a count
{
- $filter_clauses[] = "NOT
arena.internal_arena_id IS NULL";
+ $cols = 'COUNT(DISTINCT(arena.id)) AS count';
}
- else if($filters['arena_type'] == 'not_internal')
+ else
{
- $filter_clauses[] = "arena.internal_arena_id IS
NULL";
+ $columns[] = 'arena.id';
+ $columns[] = 'arena.arena_name';
+ $columns[] = 'arena.address';
+ $columns[] = 'arena.addressnumber';
+ $columns[] = 'arena.zip_code';
+ $columns[] = 'arena.city';
+ $columns[] = 'arena.internal_arena_id';
+ $columns[] = 'arena.active';
+
+ $cols = implode(',', $columns);
}
- }
-
- if(count($filter_clauses))
- {
- $clauses[] = join(' AND ', $filter_clauses);
- }
- $condition = join(' AND ', $clauses);
- //var_dump($filters);
- //var_dump($filter_clauses);
- //var_dump($condition);
+ $tables = "activity_arena arena";
- if($return_count) // We should only return a count
- {
- $cols = 'COUNT(DISTINCT(arena.id)) AS count';
+ //$join_contracts = " {$this->left_join}
rental_contract_party c_p ON (c_p.party_id = party.id)
+ //{$this->left_join} rental_contract contract ON
(contract.id = c_p.contract_id)";
+
+ $joins = $join_contracts;
+ //var_dump("SELECT {$cols} FROM {$tables} {$joins}
WHERE {$condition} {$order}");
+ return "SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}";
}
- else
+
+ /**
+ * Populates an arena-object
+ *
+ * @param int $arena_id
+ * @param activitycalendar_arena $arena
+ * @return activitycalendar_arena $arena
+ */
+ protected function populate( int $arena_id, &$arena )
{
- $columns[] = 'arena.id';
- $columns[] = 'arena.arena_name';
- $columns[] = 'arena.address';
- $columns[] = 'arena.addressnumber';
- $columns[] = 'arena.zip_code';
- $columns[] = 'arena.city';
- $columns[] = 'arena.internal_arena_id';
- $columns[] = 'arena.active';
-
- $cols = implode(',', $columns);
- }
- $tables = "activity_arena arena";
-
- //$join_contracts = " {$this->left_join}
rental_contract_party c_p ON (c_p.party_id = party.id)
- //{$this->left_join} rental_contract contract ON (contract.id =
c_p.contract_id)";
-
- $joins = $join_contracts;
- //var_dump("SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}");
- return "SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}";
- }
-
- /**
- * Populates an arena-object
- *
- * @param int $arena_id
- * @param activitycalendar_arena $arena
- * @return activitycalendar_arena $arena
- */
- protected function populate(int $arena_id, &$arena)
- {
-
- if($arena == null)
+ if ($arena == null)
{
$arena = new
activitycalendar_arena((int)$arena_id);
-
$arena->set_arena_name($this->unmarshal($this->db->f('arena_name'), 'string'));
-
$arena->set_address($this->unmarshal($this->db->f('address'), 'string'));
-
$arena->set_addressnumber($this->unmarshal($this->db->f('addressnumber'),
'string'));
-
$arena->set_zip_code($this->unmarshal($this->db->f('zip_code'), 'string'));
- $arena->set_city($this->unmarshal($this->db->f('city'),
'string'));
-
$arena->set_internal_arena_id($this->unmarshal($this->db->f('internal_arena_id'),
'int'));
-
$arena->set_active($this->unmarshal($this->db->f('active'), 'bool'));
+
$arena->set_arena_name($this->unmarshal($this->db->f('arena_name'), 'string'));
+
$arena->set_address($this->unmarshal($this->db->f('address'), 'string'));
+
$arena->set_addressnumber($this->unmarshal($this->db->f('addressnumber'),
'string'));
+
$arena->set_zip_code($this->unmarshal($this->db->f('zip_code'), 'string'));
+
$arena->set_city($this->unmarshal($this->db->f('city'), 'string'));
+
$arena->set_internal_arena_id($this->unmarshal($this->db->f('internal_arena_id'),
'int'));
+
$arena->set_active($this->unmarshal($this->db->f('active'), 'bool'));
+ }
+ return $arena;
}
- return $arena;
- }
-
- /**
- * Get arena name
- *
- * @param int $arena_id
- * @return string arena name
- */
- function get_arena_name($arena_id)
- {
- $result = "Ingen";
- if(isset($arena_id) && $arena_id != '')
+
+ /**
+ * Get arena name
+ *
+ * @param int $arena_id
+ * @return string arena name
+ */
+ function get_arena_name( $arena_id )
+ {
+ $result = "Ingen";
+ if (isset($arena_id) && $arena_id != '')
{
$q1 = "SELECT arena_name FROM activity_arena
WHERE id={$arena_id}";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('arena_name');
+ $result = $this->db->f('arena_name');
+ }
}
- }
-
- return $result;
- }
-
- /**
- * Get registered buildings from property
- *
- * @return array buildings, [id => name]
- */
- function get_buildings()
- {
- $buildings = array();
+
+ return $result;
+ }
+
+ /**
+ * Get registered buildings from property
+ *
+ * @return array buildings, [id => name]
+ */
+ function get_buildings()
+ {
+ $buildings = array();
$q_buildings = "SELECT id, name FROM bb_building WHERE
active=1 ORDER BY name ASC";
- //var_dump($q_buildings);
- $this->db->query($q_buildings, __LINE__, __FILE__);
- while($this->db->next_record())
+ //var_dump($q_buildings);
+ $this->db->query($q_buildings, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $id = $this->db->f('id');
- $buildings[$id] = $this->db->f('name');
+ $id = $this->db->f('id');
+ $buildings[$id] = $this->db->f('name');
+ }
+ return $buildings;
}
- return $buildings;
- }
-
- /**
- * Get building name from property
- *
- * @param int $building_id
- * @return string building name
- */
- function get_building_name($building_id)
+
+ /**
+ * Get building name from property
+ *
+ * @param int $building_id
+ * @return string building name
+ */
+ function get_building_name( $building_id )
{
- if(isset($building_id))
- {
- $building_id = (int)$building_id;
- $q1 = "SELECT name FROM
bb_building WHERE id={$building_id}";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ if (isset($building_id))
+ {
+ $building_id = (int)$building_id;
+ $q1 = "SELECT name FROM bb_building WHERE
id={$building_id}";
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('name');
+ $result = $this->db->f('name');
+ }
}
+ return $result;
}
- return $result;
- }
-
- /**
- * Function for adding a new arena to the database. Updates the arena
object.
- *
- * @param activitycalendar_arena $arena the party to be added
- * @return bool true if successful, false otherwise
- */
- function add(&$arena)
- {
- // Insert a new arena
- $q = "INSERT INTO activity_arena
(arena_name) VALUES ('test')";
- $result = $this->db->query($q);
- if(isset($result))
+ /**
+ * Function for adding a new arena to the database. Updates the
arena object.
+ *
+ * @param activitycalendar_arena $arena the party to be added
+ * @return bool true if successful, false otherwise
+ */
+ function add( &$arena )
+ {
+ // Insert a new arena
+ $q = "INSERT INTO activity_arena (arena_name) VALUES
('test')";
+ $result = $this->db->query($q);
+
+ if (isset($result))
{
- // Set the new party ID
-
$arena->set_id($this->db->get_last_insert_id('activity_arena', 'id'));
- // Forward this request to the update method
- return $this->update($arena);
+ // Set the new party ID
+
$arena->set_id($this->db->get_last_insert_id('activity_arena', 'id'));
+ // Forward this request to the update method
+ return $this->update($arena);
+ }
+ else
+ {
+ return false;
+ }
}
- else
+
+ /**
+ * Update the database values for an existing arena object.
+ *
+ * @param $arena the arena to be updated
+ * @return boolean true if successful, false otherwise
+ */
+ function update( $arena )
{
- return false;
- }
- }
+ $id = intval($arena->get_id());
- /**
- * Update the database values for an existing arena object.
- *
- * @param $arena the arena to be updated
- * @return boolean true if successful, false otherwise
- */
- function update($arena)
- {
- $id = intval($arena->get_id());
-
- $values = array(
- 'arena_name = ' .
$this->marshal($arena->get_arena_name(), 'string'),
- 'address = ' .
$this->marshal($arena->get_address(), 'string'),
- 'addressnumber = ' .
$this->marshal($arena->get_addressnumber(), 'string'),
- 'zip_code = ' . $this->marshal($arena->get_zip_code(),
'string'),
- 'city = ' . $this->marshal($arena->get_city(), 'string'),
- 'internal_arena_id = ' .
$this->marshal($arena->get_internal_arena_id(), 'int'),
- 'active = ' . $this->marshal(($arena->is_active() ?
'true' : 'false'), 'bool'),
- );
-
+ $values = array(
+ 'arena_name = ' .
$this->marshal($arena->get_arena_name(), 'string'),
+ 'address = ' .
$this->marshal($arena->get_address(), 'string'),
+ 'addressnumber = ' .
$this->marshal($arena->get_addressnumber(), 'string'),
+ 'zip_code = ' .
$this->marshal($arena->get_zip_code(), 'string'),
+ 'city = ' . $this->marshal($arena->get_city(),
'string'),
+ 'internal_arena_id = ' .
$this->marshal($arena->get_internal_arena_id(), 'int'),
+ 'active = ' .
$this->marshal(($arena->is_active() ? 'true' : 'false'), 'bool'),
+ );
+
$result = $this->db->query('UPDATE activity_arena SET '
. join(',', $values) . " WHERE id=$id", __LINE__, __FILE__);
-
- return isset($result);
- }
- public function get_id_field_name($extended_info = false)
- {
- if(!$extended_info)
- {
- $ret = 'id';
+ return isset($result);
}
- else
+
+ public function get_id_field_name( $extended_info = false )
{
- $ret = array
- (
- 'table' => 'arena', // alias
- 'field' => 'id',
- 'translated' => 'id'
- );
+ if (!$extended_info)
+ {
+ $ret = 'id';
+ }
+ else
+ {
+ $ret = array
+ (
+ 'table' => 'arena', // alias
+ 'field' => 'id',
+ 'translated' => 'id'
+ );
+ }
+ return $ret;
}
- return $ret;
- }
-
- public function get_address($search)
- {
- $result_arr = array();
- $curr_index = 0;
- if($search)
+
+ public function get_address( $search )
{
- $sql = "select * from fm_streetaddress where
UPPER(descr) like UPPER('{$search}%')";
- $this->db->query($sql, __LINE__, __FILE__);
- while($this->db->next_record())
+ $result_arr = array();
+ $curr_index = 0;
+ if ($search)
+ {
+ $sql = "select * from fm_streetaddress where
UPPER(descr) like UPPER('{$search}%')";
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- //$result_arr = $this->db->f('name');
+ //$result_arr = $this->db->f('name');
/* if($curr_index == 0)
{
- $result_arr[] = "<option value='0'>Velg
gateadresse</option>";
- }
- $result_arr[] = "<option value='" .
$this->db->f('descr') . "'>" . $this->db->f('descr') . "</option>";
+ $result_arr[] = "<option
value='0'>Velg gateadresse</option>";
+ }
+ $result_arr[] = "<option value='" .
$this->db->f('descr') . "'>" . $this->db->f('descr') . "</option>";
$curr_index++; */
$result_arr[]['name'] =
$this->db->f('descr');
+ }
}
- }
//$result = implode(' ', $result_arr);
//return $result;
return array('ResultSet' => array('Result' =>
$result_arr));
- }
-
- public function get_arena_id_by_name($arena_name)
- {
- $result = 0;
- if(isset($arena_name) && $arena_name != '')
+ }
+
+ public function get_arena_id_by_name( $arena_name )
+ {
+ $result = 0;
+ if (isset($arena_name) && $arena_name != '')
{
$q1 = "SELECT id FROM activity_arena WHERE
UPPER(arena_name) = UPPER('{$arena_name}')";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('id');
+ $result = $this->db->f('id');
+ }
}
- }
- return $result;
- }
+ return $result;
+ }
}
\ No newline at end of file
Modified: trunk/activitycalendar/inc/class.socommon.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.socommon.inc.php 2016-02-11 22:07:53 UTC
(rev 14727)
+++ trunk/activitycalendar/inc/class.socommon.inc.php 2016-02-11 22:28:46 UTC
(rev 14728)
@@ -3,324 +3,324 @@
abstract class activitycalendar_socommon
{
- protected $db;
- protected $like;
- protected $join;
- protected $left_join;
-
- public function __construct()
- {
- $this->db = clone $GLOBALS['phpgw']->db;
- $this->like = & $this->db->like;
- $this->join = & $this->db->join;
- $this->left_join = & $this->db->left_join;
- }
-
- /**
- * Marshal values according to type
- * @param $value the value
- * @param $type the type of value
- * @return database value
- */
- protected function marshal($value, $type)
- {
- if($value === null)
+ protected $db;
+ protected $like;
+ protected $join;
+ protected $left_join;
+
+ public function __construct()
{
- return 'NULL';
+ $this->db = clone $GLOBALS['phpgw']->db;
+ $this->like = & $this->db->like;
+ $this->join = & $this->db->join;
+ $this->left_join = & $this->db->left_join;
}
- else if($type == 'int')
+
+ /**
+ * Marshal values according to type
+ * @param $value the value
+ * @param $type the type of value
+ * @return database value
+ */
+ protected function marshal( $value, $type )
{
- if($value == '')
+ if ($value === null)
{
return 'NULL';
}
- return intval($value);
+ else if ($type == 'int')
+ {
+ if ($value == '')
+ {
+ return 'NULL';
+ }
+ return intval($value);
+ }
+ else if ($type == 'float')
+ {
+ return str_replace(',', '.', $value);
+ }
+ else if ($type == 'field')
+ {
+ return $this->db->db_addslashes($value);
+ }
+ return "'" . $this->db->db_addslashes($value) . "'";
}
- else if($type == 'float')
+
+ /**
+ * Unmarchal database values according to type
+ * @param $value the field value
+ * @param $type a string dictating value type
+ * @return the php value
+ */
+ protected function unmarshal( $value, $type )
{
- return str_replace(',', '.', $value);
+ if ($type == 'bool')
+ {
+ return (boolean)$value;
+ }
+ elseif ($value === null || $value == 'NULL')
+ {
+ return null;
+ }
+ elseif ($type == 'int')
+ {
+ return intval($value);
+ }
+ elseif ($type == 'float')
+ {
+ return floatval($value);
+ }
+ return $value;
}
- else if($type == 'field')
+
+ /**
+ * Get the count of the specified query. Query must return a
signel column
+ * called count.
+ *
+ * @param $sql the sql query
+ * @return the count value
+ */
+ protected function get_query_count( $sql )
{
- return $this->db->db_addslashes($value);
+ $result = $this->db->query($sql);
+ if ($result && $this->db->next_record())
+ {
+ return $this->unmarshal($this->db->f('count',
true), 'int');
+ }
}
- return "'" . $this->db->db_addslashes($value) . "'";
- }
- /**
- * Unmarchal database values according to type
- * @param $value the field value
- * @param $type a string dictating value type
- * @return the php value
- */
- protected function unmarshal($value, $type)
- {
- if($type == 'bool')
+ /**
+ * Implementing classes must return an instance of itself.
+ *
+ * @return the class instance.
+ */
+ public abstract static function get_instance();
+
+ /**
+ * Convenience method for getting one single object. Calls
get() with the
+ * specified id as a filter.
+ *
+ * @param $id int with id of object to return.
+ * @return object with the specified id, null if not found.
+ */
+ public function get_single( int $id )
{
- return (boolean)$value;
- }
- elseif($value === null || $value == 'NULL')
- {
+ $objects = $this->get(null, null, null, null, null,
null, array($this->get_id_field_name() => $id));
+ if (count($objects) > 0)
+ {
+ $keys = array_keys($objects);
+ return $objects[$keys[0]];
+ }
return null;
}
- elseif($type == 'int')
+
+ /**
+ * Method for retrieving the db-object (security "forgotten")
+ */
+ public function get_db()
{
- return intval($value);
+ return $this->db;
}
- elseif($type == 'float')
- {
- return floatval($value);
- }
- return $value;
- }
- /**
- * Get the count of the specified query. Query must return a signel
column
- * called count.
- *
- * @param $sql the sql query
- * @return the count value
- */
- protected function get_query_count($sql)
- {
- $result = $this->db->query($sql);
- if($result && $this->db->next_record())
+ /**
+ * Method for retreiving objects.
+ *
+ * @param $start_index int with index of first object.
+ * @param $num_of_objects int with max number of objects to
return.
+ * @param $sort_field string representing the object field to
sort on.
+ * @param $ascending boolean true for ascending sort on sort
field, false
+ * for descending.
+ * @param $search_for string with free text search query.
+ * @param $search_type string with the query type.
+ * @param $filters array with key => value of filters.
+ * @return array of objects. May return an empty
+ * array, never null. The array keys are the respective index
numbers.
+ */
+ public function get( int $start_index, int $num_of_objects,
string $sort_field, boolean $ascending, string $search_for, string
$search_type, array $filters )
{
- return $this->unmarshal($this->db->f('count', true),
'int');
- }
- }
-
- /**
- * Implementing classes must return an instance of itself.
- *
- * @return the class instance.
- */
- public abstract static function get_instance();
+ $results = array(); // Array to store result objects
+ $map = array(); // Array to hold number of records per
target object
+ $check_map = array(); // Array to hold the actual
number of record read per target object
+ $object_ids = array(); // All of the object ids
encountered
+ $added_object_ids = array();// All of the added objects
ids
+ // Retrieve information about the table name and the
name and alias of id column
+ // $break_on_limit - flag indicating whether to
break the loop when the number of records
+ // for all
the result objects are traversed
+ $id_field_name_info = $this->get_id_field_name(true);
+ if (is_array($id_field_name_info))
+ {
+ $break_on_limit = true;
+ $id_field_name =
$id_field_name_info['translated'];
+ }
+ else
+ {
+ $break_on_limit = false;
+ $id_field_name = $id_field_name_info;
+ }
- /**
- * Convenience method for getting one single object. Calls get() with
the
- * specified id as a filter.
- *
- * @param $id int with id of object to return.
- * @return object with the specified id, null if not found.
- */
- public function get_single(int $id)
- {
- $objects = $this->get(null, null, null, null, null, null,
array($this->get_id_field_name() => $id));
- if(count($objects) > 0)
- {
- $keys = array_keys($objects);
- return $objects[$keys[0]];
- }
- return null;
- }
-
- /**
- * Method for retrieving the db-object (security "forgotten")
- */
- public function get_db()
- {
- return $this->db;
- }
+ // Special case: Sort on id field. Always changed to
the id field name.
+ // $break_when_num_of_objects_reached - flag indicating
to break the loop when the number of
+ // results are reached and we are sure
that the records are ordered by the id
+ if ($sort_field == null || $sort_field == 'id' ||
$sort_field == '')
+ {
+ $sort_field = $id_field_name;
+ $break_when_num_of_objects_reached = true;
+ }
+ else
+ {
+ $break_when_num_of_objects_reached = false;
+ }
- /**
- * Method for retreiving objects.
- *
- * @param $start_index int with index of first object.
- * @param $num_of_objects int with max number of objects to return.
- * @param $sort_field string representing the object field to sort on.
- * @param $ascending boolean true for ascending sort on sort field,
false
- * for descending.
- * @param $search_for string with free text search query.
- * @param $search_type string with the query type.
- * @param $filters array with key => value of filters.
- * @return array of objects. May return an empty
- * array, never null. The array keys are the respective index numbers.
- */
- public function get(int $start_index, int $num_of_objects, string
$sort_field, boolean $ascending, string $search_for, string $search_type, array
$filters)
- {
- $results = array(); // Array to store
result objects
- $map = array(); // Array to hold number
of records per target object
- $check_map = array(); // Array to hold the actual
number of record read per target object
- $object_ids = array(); // All of the object ids
encountered
- $added_object_ids = array();// All of the added objects ids
- // Retrieve information about the table name and the name and
alias of id column
- // $break_on_limit - flag indicating whether to break the
loop when the number of records
- // for all the
result objects are traversed
- $id_field_name_info = $this->get_id_field_name(true);
- if(is_array($id_field_name_info))
- {
- $break_on_limit = true;
- $id_field_name = $id_field_name_info['translated'];
- }
- else
- {
- $break_on_limit = false;
- $id_field_name = $id_field_name_info;
- }
+ // Only allow positive start index
+ if ($start_index < 0)
+ {
+ $start_index = 0;
+ }
- // Special case: Sort on id field. Always changed to the id
field name.
- // $break_when_num_of_objects_reached - flag indicating to
break the loop when the number of
- // results are reached and we are sure that the
records are ordered by the id
- if($sort_field == null || $sort_field == 'id' || $sort_field ==
'')
- {
- $sort_field = $id_field_name;
- $break_when_num_of_objects_reached = true;
- }
- else
- {
- $break_when_num_of_objects_reached = false;
- }
-
- // Only allow positive start index
- if($start_index < 0)
- {
- $start_index = 0;
- }
-
- // test-input for break on ordered queries
- $db2 = clone($this->db);
+ // test-input for break on ordered queries
+ $db2 = clone($this->db);
- $sql = $this->get_query($sort_field, $ascending, $search_for,
$search_type, $filters, false);
- $sql_parts = explode('1=1', $sql); // Split the
query to insert extra condition on test for break
+ $sql = $this->get_query($sort_field, $ascending,
$search_for, $search_type, $filters, false);
+ $sql_parts = explode('1=1', $sql); // Split the query
to insert extra condition on test for break
$this->db->query($sql, __LINE__, __FILE__, false, true);
- while($this->db->next_record()) // Runs through all of
the results
- {
- $should_populate_object = false; // Default value - we
won't populate object
- $result_id =
$this->unmarshal($this->db->f($id_field_name), 'int'); // The id of object
- if(in_array($result_id, $added_object_ids)) // Object
with this id already added
+ while ($this->db->next_record()) // Runs through all of
the results
{
- $should_populate_object = true; // We should
populate this object as we already have it in our result array
- }
- else // Object isn't already added to array
- {
- if(!in_array($result_id, $object_ids)) //
Haven't already added this id
+ $should_populate_object = false; // Default
value - we won't populate object
+ $result_id =
$this->unmarshal($this->db->f($id_field_name), 'int'); // The id of object
+ if (in_array($result_id, $added_object_ids)) //
Object with this id already added
{
- $object_ids[] = $result_id; // We have
to add the new id
+ $should_populate_object = true; // We
should populate this object as we already have it in our result array
}
- // We have to check if we should populate this
object
- if(count($object_ids) > $start_index) // We're
at index above start index
+ else // Object isn't already added to array
{
- if($num_of_objects == null ||
count($results) < $num_of_objects) // We haven't found all the objects we're
looking for
+ if (!in_array($result_id, $object_ids))
// Haven't already added this id
{
- $should_populate_object = true;
// We should populate this object
- $added_object_ids[] =
$result_id; // We keep the id
+ $object_ids[] = $result_id; //
We have to add the new id
}
+ // We have to check if we should
populate this object
+ if (count($object_ids) > $start_index)
// We're at index above start index
+ {
+ if ($num_of_objects == null ||
count($results) < $num_of_objects) // We haven't found all the objects we're
looking for
+ {
+ $should_populate_object
= true; // We should populate this object
+ $added_object_ids[] =
$result_id; // We keep the id
+ }
+ }
}
- }
- if($should_populate_object)
- {
- $result = &$results[$result_id];
+ if ($should_populate_object)
+ {
+ $result = &$results[$result_id];
$results[$result_id] =
$this->populate($result_id, $result);
- $last_result_id = $result_id;
- $map[$result_id] =
(int)$map[$result_id] + 1;
- }
-
- //Stop looping when array not sorted on other then id
and wanted number of results is reached
- if(count($results) == $num_of_objects &&
$last_result_id != $result_id && $break_when_num_of_objects_reached)
- {
- break;
- }
- // else stop looping when wanted number of results is
reached all records for result objects are read
- else if($break_on_limit && (count($results) ==
$num_of_objects) && $last_result_id != $result_id)
- {
- $id_ok = 0;
- foreach($map as $_result_id => $_count)
+ $last_result_id = $result_id;
+ $map[$result_id] =
(int)$map[$result_id] + 1;
+ }
+
+ //Stop looping when array not sorted on other
then id and wanted number of results is reached
+ if (count($results) == $num_of_objects &&
$last_result_id != $result_id && $break_when_num_of_objects_reached)
{
- if(!isset($check_map[$_result_id]))
+ break;
+ }
+ // else stop looping when wanted number of
results is reached all records for result objects are read
+ else if ($break_on_limit && (count($results) ==
$num_of_objects) && $last_result_id != $result_id)
+ {
+ $id_ok = 0;
+ foreach ($map as $_result_id => $_count)
{
- // Query the number of records
for the specific object in question
- $sql2 = "{$sql_parts[0]} 1=1
AND {$id_field_name_info['table']}.{$id_field_name_info['field']} =
{$_result_id} {$sql_parts[1]}";
+ if
(!isset($check_map[$_result_id]))
+ {
+ // Query the number of
records for the specific object in question
+ $sql2 =
"{$sql_parts[0]} 1=1 AND
{$id_field_name_info['table']}.{$id_field_name_info['field']} = {$_result_id}
{$sql_parts[1]}";
$db2->query($sql2,
__LINE__, __FILE__);
- $db2->next_record();
- $check_map[$_result_id] =
$db2->num_rows();
+ $db2->next_record();
+ $check_map[$_result_id]
= $db2->num_rows();
+ }
+ if ($check_map[$_result_id] ==
$_count)
+ {
+ $id_ok++;
+ }
}
- if($check_map[$_result_id] ==
$_count)
+ if ($id_ok == $num_of_objects)
{
- $id_ok++;
+ break;
}
}
- if($id_ok == $num_of_objects)
- {
- break;
- }
}
+ return $results;
}
- return $results;
- }
-
- /**
- * Returns count of matching objects.
- *
- * @param $search_for string with free text search query.
- * @param $search_type string with the query type.
- * @param $filters array with key => value of filters.
- * @return int with object count.
- */
- public function get_count(string $search_for, string $search_type,
array $filters)
- {
- return $this->get_query_count($this->get_query(null, null,
$search_for, $search_type, $filters, true));
- }
-
- /**
- * Implementing classes must return the name of the field used in the
query
- * returned from get_query().
- *
- * @return string with name of id field.
- */
- protected abstract function get_id_field_name();
-
- /**
- * Returns SQL for retrieving matching objects or object count.
- *
- * @param $start_index int with index of first object.
- * @param $num_of_objects int with max number of objects to return.
- * @param $sort_field string representing the object field to sort on.
- * @param $ascending boolean true for ascending sort on sort field,
false
- * for descending.
- * @param $search_for string with free text search query.
- * @param $search_type string with the query type.
- * @param $filters array with key => value of filters.
- * @param $return_count boolean telling to return only the count of the
- * matching objects, or the objects themself.
- * @return string with SQL.
- */
- protected abstract function get_query(string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count);
-
- protected abstract function populate(int $object_id, &$object);
-
- protected abstract function add(&$object);
-
- protected abstract function update($object);
-
- /**
- * Store the object in the database. If the object has no ID it is
assumed to be new and
- * inserted for the first time. The object is then updated with the new
insert id.
- */
- public function store(&$object)
- {
- if($object->validates())
+
+ /**
+ * Returns count of matching objects.
+ *
+ * @param $search_for string with free text search query.
+ * @param $search_type string with the query type.
+ * @param $filters array with key => value of filters.
+ * @return int with object count.
+ */
+ public function get_count( string $search_for, string
$search_type, array $filters )
+ {
+ return $this->get_query_count($this->get_query(null,
null, $search_for, $search_type, $filters, true));
+ }
+
+ /**
+ * Implementing classes must return the name of the field used
in the query
+ * returned from get_query().
+ *
+ * @return string with name of id field.
+ */
+ protected abstract function get_id_field_name();
+
+ /**
+ * Returns SQL for retrieving matching objects or object count.
+ *
+ * @param $start_index int with index of first object.
+ * @param $num_of_objects int with max number of objects to
return.
+ * @param $sort_field string representing the object field to
sort on.
+ * @param $ascending boolean true for ascending sort on sort
field, false
+ * for descending.
+ * @param $search_for string with free text search query.
+ * @param $search_type string with the query type.
+ * @param $filters array with key => value of filters.
+ * @param $return_count boolean telling to return only the
count of the
+ * matching objects, or the objects themself.
+ * @return string with SQL.
+ */
+ protected abstract function get_query( string $sort_field,
boolean $ascending, string $search_for, string $search_type, array $filters,
boolean $return_count );
+
+ protected abstract function populate( int $object_id, &$object
);
+
+ protected abstract function add( &$object );
+
+ protected abstract function update( $object );
+
+ /**
+ * Store the object in the database. If the object has no ID
it is assumed to be new and
+ * inserted for the first time. The object is then updated
with the new insert id.
+ */
+ public function store( &$object )
+ {
+ if ($object->validates())
{
- if($object->get_id() > 0)
+ if ($object->get_id() > 0)
{
- // We can assume this composite came from the
database since it has an ID. Update the existing row
- return $this->update($object);
+ // We can assume this composite came
from the database since it has an ID. Update the existing row
+ return $this->update($object);
+ }
+ else
+ {
+ // This object does not have an ID, so
will be saved as a new DB row
+ return $this->add($object);
+ }
}
- else
- {
- // This object does not have an ID, so will be
saved as a new DB row
- return $this->add($object);
- }
+
+ // The object did not validate
+ return false;
}
- // The object did not validate
- return false;
- }
-
- protected function generate_secret($length = 10)
- {
+ protected function generate_secret( $length = 10 )
+ {
return substr(base64_encode(rand(1000000000,
9999999999)), 0, $length);
}
- }
+ }
\ No newline at end of file
Modified: trunk/activitycalendar/inc/class.socontactperson.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.socontactperson.inc.php 2016-02-11
22:07:53 UTC (rev 14727)
+++ trunk/activitycalendar/inc/class.socontactperson.inc.php 2016-02-11
22:28:46 UTC (rev 14728)
@@ -6,450 +6,450 @@
class activitycalendar_socontactperson extends activitycalendar_socommon
{
- protected static $so;
+ protected static $so;
- /**
- * Get a static reference to the storage object associated with this
model object
- *
- * @return rental_soparty the storage object
- */
- public static function get_instance()
- {
- if(self::$so == null)
+ /**
+ * Get a static reference to the storage object associated with
this model object
+ *
+ * @return rental_soparty the storage object
+ */
+ public static function get_instance()
+ {
+ if (self::$so == null)
{
- self::$so =
CreateObject('activitycalendar.socontactperson');
+ self::$so =
CreateObject('activitycalendar.socontactperson');
+ }
+ return self::$so;
}
- return self::$so;
- }
-
- /**
- * Generate SQL query
- *
- * @todo Add support for filter "party_type", meaning what type of
contracts
- * the party is involved in.
- *
- * @param string $sort_field
- * @param boolean $ascending
- * @param string $search_for
- * @param string $search_type
- * @param array $filters
- * @param boolean $return_count
- * @return string SQL
- */
- protected function get_query(string $sort_field, boolean $ascending,
string $search_for, string $search_type, array $filters, boolean $return_count)
- {
- $clauses = array('1=1');
- $table = "";
- //Add columns to this array to include them in the query
- $columns = array();
+ /**
+ * Generate SQL query
+ *
+ * @todo Add support for filter "party_type", meaning what type
of contracts
+ * the party is involved in.
+ *
+ * @param string $sort_field
+ * @param boolean $ascending
+ * @param string $search_for
+ * @param string $search_type
+ * @param array $filters
+ * @param boolean $return_count
+ * @return string SQL
+ */
+ protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ {
+ $clauses = array('1=1');
+ $table = "";
+ //Add columns to this array to include them in the query
+ $columns = array();
+
/* if($sort_field != null) {
- $dir = $ascending ? 'ASC' : 'DESC';
- $order = "ORDER BY id $dir";
- }
- */
- if($search_for)
- {
- $query =
$this->marshal($search_for, 'string');
- $like_pattern = "'%" . $search_for . "%'";
- $like_clauses = array();
- switch($search_type)
+ $dir = $ascending ? 'ASC' : 'DESC';
+ $order = "ORDER BY id $dir";
+ }
+ */
+ if ($search_for)
+ {
+ $query = $this->marshal($search_for, 'string');
+ $like_pattern = "'%" . $search_for . "%'";
+ $like_clauses = array();
+ switch ($search_type)
{
- case "name":
- $like_clauses[] = "party.first_name
$this->like $like_pattern";
- $like_clauses[] = "party.last_name
$this->like $like_pattern";
- $like_clauses[] = "party.company_name
$this->like $like_pattern";
- break;
- case "address":
- $like_clauses[] = "party.address_1
$this->like $like_pattern";
- $like_clauses[] = "party.address_2
$this->like $like_pattern";
- $like_clauses[] = "party.postal_code
$this->like $like_pattern";
- $like_clauses[] = "party.place
$this->like $like_pattern";
- break;
- case "identifier":
- $like_clauses[] = "party.identifier
$this->like $like_pattern";
- break;
- case "reskontro":
- $like_clauses[] = "party.reskontro
$this->like $like_pattern";
- break;
- case "result_unit_number":
- $like_clauses[] =
"party.result_unit_number $this->like $like_pattern";
- break;
- case "all":
- $like_clauses[] = "party.first_name
$this->like $like_pattern";
- $like_clauses[] = "party.last_name
$this->like $like_pattern";
- $like_clauses[] = "party.company_name
$this->like $like_pattern";
- $like_clauses[] = "party.address_1
$this->like $like_pattern";
- $like_clauses[] = "party.address_2
$this->like $like_pattern";
- $like_clauses[] = "party.postal_code
$this->like $like_pattern";
- $like_clauses[] = "party.place
$this->like $like_pattern";
- $like_clauses[] = "party.identifier
$this->like $like_pattern";
- $like_clauses[] = "party.comment
$this->like $like_pattern";
- $like_clauses[] = "party.reskontro
$this->like $like_pattern";
- break;
+ case "name":
+ $like_clauses[] =
"party.first_name $this->like $like_pattern";
+ $like_clauses[] =
"party.last_name $this->like $like_pattern";
+ $like_clauses[] =
"party.company_name $this->like $like_pattern";
+ break;
+ case "address":
+ $like_clauses[] =
"party.address_1 $this->like $like_pattern";
+ $like_clauses[] =
"party.address_2 $this->like $like_pattern";
+ $like_clauses[] =
"party.postal_code $this->like $like_pattern";
+ $like_clauses[] = "party.place
$this->like $like_pattern";
+ break;
+ case "identifier":
+ $like_clauses[] =
"party.identifier $this->like $like_pattern";
+ break;
+ case "reskontro":
+ $like_clauses[] =
"party.reskontro $this->like $like_pattern";
+ break;
+ case "result_unit_number":
+ $like_clauses[] =
"party.result_unit_number $this->like $like_pattern";
+ break;
+ case "all":
+ $like_clauses[] =
"party.first_name $this->like $like_pattern";
+ $like_clauses[] =
"party.last_name $this->like $like_pattern";
+ $like_clauses[] =
"party.company_name $this->like $like_pattern";
+ $like_clauses[] =
"party.address_1 $this->like $like_pattern";
+ $like_clauses[] =
"party.address_2 $this->like $like_pattern";
+ $like_clauses[] =
"party.postal_code $this->like $like_pattern";
+ $like_clauses[] = "party.place
$this->like $like_pattern";
+ $like_clauses[] =
"party.identifier $this->like $like_pattern";
+ $like_clauses[] =
"party.comment $this->like $like_pattern";
+ $like_clauses[] =
"party.reskontro $this->like $like_pattern";
+ break;
+ }
+
+
+ if (count($like_clauses))
+ {
+ $clauses[] = '(' . join(' OR ',
$like_clauses) . ')';
+ }
}
-
- if(count($like_clauses))
+ $filter_clauses = array();
+ $contact_person_id = $this->marshal($filters['id'],
'int');
+ if (isset($filters['org_id']))
{
- $clauses[] = '(' . join(' OR ', $like_clauses)
. ')';
+ $org_id = $this->marshal($filters['org_id'],
'int');
+ if (isset($org_id) && $org_id > 0)
+ {
+ $filter_clauses[] =
"organization_contact.organization_id = {$org_id}";
+ $filter_clauses[] =
"organization_contact.id = {$contact_person_id}";
+ $table = "bb_organization_contact
organization_contact";
+ }
}
- }
-
- $filter_clauses = array();
- $contact_person_id =
$this->marshal($filters['id'], 'int');
- if(isset($filters['org_id']))
- {
- $org_id = $this->marshal($filters['org_id'],
'int');
- if(isset($org_id) && $org_id > 0)
+ if (isset($filters['organization_id']))
{
- $filter_clauses[] =
"organization_contact.organization_id = {$org_id}";
- $filter_clauses[] = "organization_contact.id =
{$contact_person_id}";
- $table = "bb_organization_contact
organization_contact";
+ $org_id =
$this->marshal($filters['organization_id'], 'int');
+ if (isset($org_id) && $org_id > 0)
+ {
+ $filter_clauses[] =
"organization_contact.organization_id = {$org_id}";
+ $table = "bb_organization_contact
organization_contact";
+ }
}
- }
- if(isset($filters['organization_id']))
- {
- $org_id =
$this->marshal($filters['organization_id'], 'int');
- if(isset($org_id) && $org_id > 0)
+ else if (isset($filters['group_id']))
{
- $filter_clauses[] =
"organization_contact.organization_id = {$org_id}";
- $table = "bb_organization_contact
organization_contact";
- }
- }
- else if(isset($filters['group_id']))
- {
$group_id =
$this->marshal($filters['group_id'], 'int');
- if(isset($group_id) && $group_id > 0)
- {
- $filter_clauses[] = "group_contact.group_id =
{$group_id}";
- $filter_clauses[] = "group_contact.id =
{$contact_person_id}";
- $table = "bb_group_contact group_contact";
+ if (isset($group_id) && $group_id > 0)
+ {
+ $filter_clauses[] =
"group_contact.group_id = {$group_id}";
+ $filter_clauses[] = "group_contact.id =
{$contact_person_id}";
+ $table = "bb_group_contact
group_contact";
+ }
}
- }
/*
- // All parties with contracts of type X
- if(isset($filters['party_type']))
- {
- $party_type =
$this->marshal($filters['party_type'],'int');
- if(isset($party_type) && $party_type > 0)
+ // All parties with contracts of type X
+ if(isset($filters['party_type']))
+ {
+ $party_type =
$this->marshal($filters['party_type'],'int');
+ if(isset($party_type) && $party_type > 0)
+ {
+ $filter_clauses[] = "contract.location_id =
{$party_type}";
+ }
+ }
+ */
+
+ if (count($filter_clauses))
{
- $filter_clauses[] = "contract.location_id =
{$party_type}";
+ $clauses[] = join(' AND ', $filter_clauses);
}
- }
- */
-
- if(count($filter_clauses))
- {
- $clauses[] = join(' AND ', $filter_clauses);
- }
- $condition = join(' AND ', $clauses);
+ $condition = join(' AND ', $clauses);
- if($table == "bb_organization_contact organization_contact")
- {
- if($return_count) // We should only return a count
+ if ($table == "bb_organization_contact
organization_contact")
{
- $cols =
'COUNT(DISTINCT(organization_contact.id)) AS count';
- }
- else
- {
- $columns[] = 'organization_contact.id';
- $columns[] = 'organization_contact.name';
- $columns[] = 'organization_contact.ssn';
- $columns[] = 'organization_contact.phone';
- $columns[] = 'organization_contact.email';
- $columns[] =
'organization_contact.organization_id';
-
+ if ($return_count) // We should only return a
count
+ {
+ $cols =
'COUNT(DISTINCT(organization_contact.id)) AS count';
+ }
+ else
+ {
+ $columns[] = 'organization_contact.id';
+ $columns[] =
'organization_contact.name';
+ $columns[] = 'organization_contact.ssn';
+ $columns[] =
'organization_contact.phone';
+ $columns[] =
'organization_contact.email';
+ $columns[] =
'organization_contact.organization_id';
+
$cols = implode(',', $columns);
+ }
}
- }
- else
- {
- if($return_count) // We should only return a count
- {
- $cols = 'COUNT(DISTINCT(group_contact.id)) AS
count';
- }
else
{
- $columns[] = 'group_contact.id';
- $columns[] = 'group_contact.name';
- $columns[] = 'group_contact.phone';
- $columns[] = 'group_contact.email';
- $columns[] = 'group_contact.group_id';
-
+ if ($return_count) // We should only return a
count
+ {
+ $cols =
'COUNT(DISTINCT(group_contact.id)) AS count';
+ }
+ else
+ {
+ $columns[] = 'group_contact.id';
+ $columns[] = 'group_contact.name';
+ $columns[] = 'group_contact.phone';
+ $columns[] = 'group_contact.email';
+ $columns[] = 'group_contact.group_id';
+
$cols = implode(',', $columns);
+ }
}
- }
- $tables = $table;
+ $tables = $table;
- //$join_contracts = " {$this->left_join}
rental_contract_party c_p ON (c_p.party_id = party.id)
- //{$this->left_join} rental_contract contract ON (contract.id =
c_p.contract_id)";
- //var_dump("SELECT {$cols} FROM {$tables} WHERE {$condition}
{$order}");
- return "SELECT {$cols} FROM {$tables} WHERE {$condition}
{$order}";
- }
+ //$join_contracts = " {$this->left_join}
rental_contract_party c_p ON (c_p.party_id = party.id)
+ //{$this->left_join} rental_contract contract ON
(contract.id = c_p.contract_id)";
+ //var_dump("SELECT {$cols} FROM {$tables} WHERE
{$condition} {$order}");
+ return "SELECT {$cols} FROM {$tables} WHERE
{$condition} {$order}";
+ }
- function get_group_contact_name($id)
- {
- $result = "Ingen";
- if(isset($id) && $id != '')
+ function get_group_contact_name( $id )
+ {
+ $result = "Ingen";
+ if (isset($id) && $id != '')
{
$q1 = "SELECT name, phone, email FROM
bb_group_contact WHERE id={$id}";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('name') . "<br/>" .
$this->db->f('phone') . "<br/>" . $this->db->f('email');
+ $result = $this->db->f('name') .
"<br/>" . $this->db->f('phone') . "<br/>" . $this->db->f('email');
+ }
}
- }
- return $result;
- }
-
- function get_group_contact_name_local($id)
- {
- $result = "Ingen";
- if(isset($id) && $id != '')
+ return $result;
+ }
+
+ function get_group_contact_name_local( $id )
+ {
+ $result = "Ingen";
+ if (isset($id) && $id != '')
{
$q1 = "SELECT name, phone, email FROM
activity_contact_person WHERE id={$id}";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('name') . "<br/>" .
$this->db->f('phone') . "<br/>" . $this->db->f('email');
+ $result = $this->db->f('name') .
"<br/>" . $this->db->f('phone') . "<br/>" . $this->db->f('email');
+ }
}
- }
- return $result;
- }
-
- function get_org_contact_name($id)
- {
- $result = "Ingen";
- if(isset($id) && $id != '')
+ return $result;
+ }
+
+ function get_org_contact_name( $id )
+ {
+ $result = "Ingen";
+ if (isset($id) && $id != '')
{
$q1 = "SELECT name, phone, email FROM
bb_organization_contact WHERE id={$id}";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('name') . "<br/>" .
$this->db->f('phone') . "<br/>" . $this->db->f('email');
+ $result = $this->db->f('name') .
"<br/>" . $this->db->f('phone') . "<br/>" . $this->db->f('email');
+ }
}
- }
- return $result;
- }
-
- function get_org_contact_name_local($id)
- {
- $result = "Ingen";
- if(isset($id) && $id != '')
+ return $result;
+ }
+
+ function get_org_contact_name_local( $id )
+ {
+ $result = "Ingen";
+ if (isset($id) && $id != '')
{
$q1 = "SELECT name, phone, email FROM
activity_contact_person WHERE id={$id}";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('name') . "<br/>" .
$this->db->f('phone') . "<br/>" . $this->db->f('email');
+ $result = $this->db->f('name') .
"<br/>" . $this->db->f('phone') . "<br/>" . $this->db->f('email');
+ }
}
- }
- return $result;
- }
-
- function get_mailaddress_for_group_contact($contact_person_id)
- {
- if($contact_person_id)
+ return $result;
+ }
+
+ function get_mailaddress_for_group_contact( $contact_person_id )
+ {
+ if ($contact_person_id)
{
$q1 = "SELECT email FROM bb_group_contact WHERE
id={$contact_person_id}";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('email');
+ $result = $this->db->f('email');
+ }
}
- }
- return $result;
- }
-
- function get_mailaddress_for_org_contact($contact_person_id)
- {
- if($contact_person_id)
+ return $result;
+ }
+
+ function get_mailaddress_for_org_contact( $contact_person_id )
+ {
+ if ($contact_person_id)
{
$q1 = "SELECT email FROM
bb_organization_contact WHERE id={$contact_person_id}";
- $this->db->query($q1, __LINE__, __FILE__);
- while($this->db->next_record())
+ $this->db->query($q1, __LINE__, __FILE__);
+ while ($this->db->next_record())
{
- $result = $this->db->f('email');
+ $result = $this->db->f('email');
+ }
}
- }
- return $result;
- }
-
- /**
- * Function for adding a new activity to the database. Updates the
activity object.
- *
- * @param activitycalendar_activity $activity the party to be added
- * @return bool true if successful, false otherwise
- */
- function add(&$contact_person)
- {
- return false;
- }
+ return $result;
+ }
- /**
- * Update the database values for an existing activity object.
- *
- * @param $activity the activity to be updated
- * @return boolean true if successful, false otherwise
- */
- function update($contact_person)
- {
- return false;
- }
+ /**
+ * Function for adding a new activity to the database. Updates
the activity object.
+ *
+ * @param activitycalendar_activity $activity the party to be
added
+ * @return bool true if successful, false otherwise
+ */
+ function add( &$contact_person )
+ {
+ return false;
+ }
- public function get_id_field_name($extended_info = false)
- {
- if(!$extended_info)
+ /**
+ * Update the database values for an existing activity object.
+ *
+ * @param $activity the activity to be updated
+ * @return boolean true if successful, false otherwise
+ */
+ function update( $contact_person )
{
- $ret = 'id';
+ return false;
}
- else
+
+ public function get_id_field_name( $extended_info = false )
{
- $ret = array
- (
- 'table' => 'activity', // alias
- 'field' => 'id',
- 'translated' => 'id'
- );
+ if (!$extended_info)
+ {
+ $ret = 'id';
+ }
+ else
+ {
+ $ret = array
+ (
+ 'table' => 'activity', // alias
+ 'field' => 'id',
+ 'translated' => 'id'
+ );
+ }
+ return $ret;
}
- return $ret;
- }
- protected function populate(int $contact_person_id, &$contact_person)
- {
+ protected function populate( int $contact_person_id,
&$contact_person )
+ {
- if($contact_person == null)
+ if ($contact_person == null)
{
$contact_person = new
activitycalendar_contact_person((int)$contact_person_id);
-
$contact_person->set_organization_id($this->unmarshal($this->db->f('organization_id'),
'int'));
-
$contact_person->set_group_id($this->unmarshal($this->db->f('group_id'),
'int'));
-
$contact_person->set_name($this->unmarshal($this->db->f('name'), 'string'));
-
$contact_person->set_phone($this->unmarshal($this->db->f('phone'), 'string'));
-
$contact_person->set_email($this->unmarshal($this->db->f('email'), 'string'));
-
$contact_person->set_ssn($this->unmarshal($this->db->f('ssn'), 'string'));
- }
- return $contact_person;
- }
-
@@ Diff output truncated at 153600 characters. @@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14728] formatting,
Sigurd Nes <=