Added Clinic, Payment, and help documents.

This commit is contained in:
Llewellyn van der Merwe 2016-03-08 12:24:26 +02:00
parent 8fa63651c2
commit f41ed0848c
157 changed files with 16111 additions and 474 deletions

View File

@ -15,31 +15,31 @@ Support Groups
## Build Time
**76 Hours** or **10 Eight Hour Days** (actual time the author saved -
**120 Hours** or **15 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builder))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **27334**
+ *File count*: **229**
+ *Folder count*: **64**
+ *Line count*: **42865**
+ *File count*: **331**
+ *Folder count*: **76**
**51 Hours** or **6 Eight Hour Days** (the actual time the author spent)
**79 Hours** or **10 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @19hours** = codingtime / 4;
> **planning @11hours** = codingtime / 7;
> **mapping @8hours** = codingtime / 10;
> **office @13hours** = codingtime / 6;)
> **debugging @30hours** = codingtime / 4;
> **planning @17hours** = codingtime / 7;
> **mapping @12hours** = codingtime / 10;
> **office @20hours** = codingtime / 6;)
**127 Hours** or **16 Eight Hour Days**
**199 Hours** or **25 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **3.2 weeks** or **0.7 months**
Project duration: **5 weeks** or **1 months**
> This **component** was build with a Joomla [Automated Component Builder] (https://www.vdm.io/joomla-component-builder).
> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io)

View File

@ -15,6 +15,23 @@
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
<action name="core.edit.created_by" title="COM_SUPPORTGROUPS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_EDIT_CREATED_BY_DESC" />
<action name="core.edit.created" title="COM_SUPPORTGROUPS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_EDIT_CREATED_DATE_DESC" />
<action name="clinic.access" title="COM_SUPPORTGROUPS_CLINICS_ACCESS" description="COM_SUPPORTGROUPS_CLINICS_ACCESS_DESC" />
<action name="clinic.batch" title="COM_SUPPORTGROUPS_CLINICS_BATCH_USE" description="COM_SUPPORTGROUPS_CLINICS_BATCH_USE_DESC" />
<action name="clinic.create" title="COM_SUPPORTGROUPS_CLINICS_CREATE" description="COM_SUPPORTGROUPS_CLINICS_CREATE_DESC" />
<action name="clinic.dashboard_list" title="COM_SUPPORTGROUPS_CLINICS_DASHBOARD_LIST" description="COM_SUPPORTGROUPS_CLINICS_DASHBOARD_LIST_DESC" />
<action name="clinic.delete" title="COM_SUPPORTGROUPS_CLINICS_DELETE" description="COM_SUPPORTGROUPS_CLINICS_DELETE_DESC" />
<action name="clinic.edit" title="COM_SUPPORTGROUPS_CLINICS_EDIT" description="COM_SUPPORTGROUPS_CLINICS_EDIT_DESC" />
<action name="clinic.edit.created_by" title="COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_BY_DESC" />
<action name="clinic.edit.created" title="COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_DATE_DESC" />
<action name="clinic.edit.name" title="COM_SUPPORTGROUPS_CLINICS_EDIT_NAME" description="COM_SUPPORTGROUPS_CLINICS_EDIT_NAME_DESC" />
<action name="clinic.edit.note_set_area" title="COM_SUPPORTGROUPS_CLINICS_EDIT_NOTE_SET_AREA" description="COM_SUPPORTGROUPS_CLINICS_EDIT_NOTE_SET_AREA_DESC" />
<action name="clinic.edit.own" title="COM_SUPPORTGROUPS_CLINICS_EDIT_OWN" description="COM_SUPPORTGROUPS_CLINICS_EDIT_OWN_DESC" />
<action name="clinic.edit.phone" title="COM_SUPPORTGROUPS_CLINICS_EDIT_PHONE" description="COM_SUPPORTGROUPS_CLINICS_EDIT_PHONE_DESC" />
<action name="clinic.edit.state" title="COM_SUPPORTGROUPS_CLINICS_EDIT_STATE" description="COM_SUPPORTGROUPS_CLINICS_EDIT_STATE_DESC" />
<action name="clinic.version" title="COM_SUPPORTGROUPS_CLINICS_EDIT_VERSION" description="COM_SUPPORTGROUPS_CLINICS_EDIT_VERSION_DESC" />
<action name="clinic.export" title="COM_SUPPORTGROUPS_CLINICS_EXPORT" description="COM_SUPPORTGROUPS_CLINICS_EXPORT_DESC" />
<action name="clinic.import" title="COM_SUPPORTGROUPS_CLINICS_IMPORT" description="COM_SUPPORTGROUPS_CLINICS_IMPORT_DESC" />
<action name="clinic.submenu" title="COM_SUPPORTGROUPS_CLINICS_SUBMENU" description="COM_SUPPORTGROUPS_CLINICS_SUBMENU_DESC" />
<action name="country.access" title="COM_SUPPORTGROUPS_COUNTRIES_ACCESS" description="COM_SUPPORTGROUPS_COUNTRIES_ACCESS_DESC" />
<action name="country.batch" title="COM_SUPPORTGROUPS_COUNTRIES_BATCH_USE" description="COM_SUPPORTGROUPS_COUNTRIES_BATCH_USE_DESC" />
<action name="country.create" title="COM_SUPPORTGROUPS_COUNTRIES_CREATE" description="COM_SUPPORTGROUPS_COUNTRIES_CREATE_DESC" />
@ -39,56 +56,167 @@
<action name="currency.export" title="COM_SUPPORTGROUPS_CURRENCIES_EXPORT" description="COM_SUPPORTGROUPS_CURRENCIES_EXPORT_DESC" />
<action name="currency.import" title="COM_SUPPORTGROUPS_CURRENCIES_IMPORT" description="COM_SUPPORTGROUPS_CURRENCIES_IMPORT_DESC" />
<action name="currency.submenu" title="COM_SUPPORTGROUPS_CURRENCIES_SUBMENU" description="COM_SUPPORTGROUPS_CURRENCIES_SUBMENU_DESC" />
<action name="help_document.access" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_ACCESS" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_ACCESS_DESC" />
<action name="help_document.batch" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_BATCH_USE" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_BATCH_USE_DESC" />
<action name="help_document.create" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_CREATE" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_CREATE_DESC" />
<action name="help_document.dashboard_list" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_DASHBOARD_LIST" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_DASHBOARD_LIST_DESC" />
<action name="help_document.delete" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_DELETE" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_DELETE_DESC" />
<action name="help_document.edit" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_DESC" />
<action name="help_document.edit.own" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_OWN" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_OWN_DESC" />
<action name="help_document.edit.state" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_STATE" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_STATE_DESC" />
<action name="help_document.version" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_VERSION" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_VERSION_DESC" />
<action name="help_document.export" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EXPORT" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EXPORT_DESC" />
<action name="help_document.import" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_IMPORT" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_IMPORT_DESC" />
<action name="help_document.submenu" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_SUBMENU" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_SUBMENU_DESC" />
<action name="location.access" title="COM_SUPPORTGROUPS_LOCATIONS_ACCESS" description="COM_SUPPORTGROUPS_LOCATIONS_ACCESS_DESC" />
<action name="location.batch" title="COM_SUPPORTGROUPS_LOCATIONS_BATCH_USE" description="COM_SUPPORTGROUPS_LOCATIONS_BATCH_USE_DESC" />
<action name="location.dashboard_add" title="COM_SUPPORTGROUPS_LOCATIONS_DASHBOARD_ADD" description="COM_SUPPORTGROUPS_LOCATIONS_DASHBOARD_ADD_DESC" />
<action name="location.create" title="COM_SUPPORTGROUPS_LOCATIONS_CREATE" description="COM_SUPPORTGROUPS_LOCATIONS_CREATE_DESC" />
<action name="location.dashboard_list" title="COM_SUPPORTGROUPS_LOCATIONS_DASHBOARD_LIST" description="COM_SUPPORTGROUPS_LOCATIONS_DASHBOARD_LIST_DESC" />
<action name="location.delete" title="COM_SUPPORTGROUPS_LOCATIONS_DELETE" description="COM_SUPPORTGROUPS_LOCATIONS_DELETE_DESC" />
<action name="location.edit" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_DESC" />
<action name="location.edit.created_by" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_BY_DESC" />
<action name="location.edit.created" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_DATE_DESC" />
<action name="location.edit.name" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_NAME" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_NAME_DESC" />
<action name="location.edit.own" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_OWN" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_OWN_DESC" />
<action name="location.edit.region" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_REGION" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_REGION_DESC" />
<action name="location.edit.state" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_STATE" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_STATE_DESC" />
<action name="location.version" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_VERSION" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_VERSION_DESC" />
<action name="location.export" title="COM_SUPPORTGROUPS_LOCATIONS_EXPORT" description="COM_SUPPORTGROUPS_LOCATIONS_EXPORT_DESC" />
<action name="location.import" title="COM_SUPPORTGROUPS_LOCATIONS_IMPORT" description="COM_SUPPORTGROUPS_LOCATIONS_IMPORT_DESC" />
<action name="location.submenu" title="COM_SUPPORTGROUPS_LOCATIONS_SUBMENU" description="COM_SUPPORTGROUPS_LOCATIONS_SUBMENU_DESC" />
<action name="payment.access" title="COM_SUPPORTGROUPS_PAYMENTS_ACCESS" description="COM_SUPPORTGROUPS_PAYMENTS_ACCESS_DESC" />
<action name="payment.batch" title="COM_SUPPORTGROUPS_PAYMENTS_BATCH_USE" description="COM_SUPPORTGROUPS_PAYMENTS_BATCH_USE_DESC" />
<action name="payment.create" title="COM_SUPPORTGROUPS_PAYMENTS_CREATE" description="COM_SUPPORTGROUPS_PAYMENTS_CREATE_DESC" />
<action name="payment.dashboard_add" title="COM_SUPPORTGROUPS_PAYMENTS_DASHBOARD_ADD" description="COM_SUPPORTGROUPS_PAYMENTS_DASHBOARD_ADD_DESC" />
<action name="payment.dashboard_list" title="COM_SUPPORTGROUPS_PAYMENTS_DASHBOARD_LIST" description="COM_SUPPORTGROUPS_PAYMENTS_DASHBOARD_LIST_DESC" />
<action name="payment.delete" title="COM_SUPPORTGROUPS_PAYMENTS_DELETE" description="COM_SUPPORTGROUPS_PAYMENTS_DELETE_DESC" />
<action name="payment.edit" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_DESC" />
<action name="payment.edit.amount" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_AMOUNT" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_AMOUNT_DESC" />
<action name="payment.edit.created_by" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_BY_DESC" />
<action name="payment.edit.created" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_DATE_DESC" />
<action name="payment.edit.own" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_OWN" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_OWN_DESC" />
<action name="payment.edit.state" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_STATE" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_STATE_DESC" />
<action name="payment.edit.support_group" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_SUPPORT_GROUP" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_SUPPORT_GROUP_DESC" />
<action name="payment.version" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_VERSION" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_VERSION_DESC" />
<action name="payment.edit.year" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_YEAR" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_YEAR_DESC" />
<action name="payment.export" title="COM_SUPPORTGROUPS_PAYMENTS_EXPORT" description="COM_SUPPORTGROUPS_PAYMENTS_EXPORT_DESC" />
<action name="payment.import" title="COM_SUPPORTGROUPS_PAYMENTS_IMPORT" description="COM_SUPPORTGROUPS_PAYMENTS_IMPORT_DESC" />
<action name="payment.submenu" title="COM_SUPPORTGROUPS_PAYMENTS_SUBMENU" description="COM_SUPPORTGROUPS_PAYMENTS_SUBMENU_DESC" />
<action name="region.access" title="COM_SUPPORTGROUPS_REGIONS_ACCESS" description="COM_SUPPORTGROUPS_REGIONS_ACCESS_DESC" />
<action name="region.batch" title="COM_SUPPORTGROUPS_REGIONS_BATCH_USE" description="COM_SUPPORTGROUPS_REGIONS_BATCH_USE_DESC" />
<action name="region.dashboard_add" title="COM_SUPPORTGROUPS_REGIONS_DASHBOARD_ADD" description="COM_SUPPORTGROUPS_REGIONS_DASHBOARD_ADD_DESC" />
<action name="region.create" title="COM_SUPPORTGROUPS_REGIONS_CREATE" description="COM_SUPPORTGROUPS_REGIONS_CREATE_DESC" />
<action name="region.dashboard_list" title="COM_SUPPORTGROUPS_REGIONS_DASHBOARD_LIST" description="COM_SUPPORTGROUPS_REGIONS_DASHBOARD_LIST_DESC" />
<action name="region.delete" title="COM_SUPPORTGROUPS_REGIONS_DELETE" description="COM_SUPPORTGROUPS_REGIONS_DELETE_DESC" />
<action name="region.edit" title="COM_SUPPORTGROUPS_REGIONS_EDIT" description="COM_SUPPORTGROUPS_REGIONS_EDIT_DESC" />
<action name="region.edit.country" title="COM_SUPPORTGROUPS_REGIONS_EDIT_COUNTRY" description="COM_SUPPORTGROUPS_REGIONS_EDIT_COUNTRY_DESC" />
<action name="region.edit.created_by" title="COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_BY_DESC" />
<action name="region.edit.created" title="COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_DATE_DESC" />
<action name="region.edit.name" title="COM_SUPPORTGROUPS_REGIONS_EDIT_NAME" description="COM_SUPPORTGROUPS_REGIONS_EDIT_NAME_DESC" />
<action name="region.edit.own" title="COM_SUPPORTGROUPS_REGIONS_EDIT_OWN" description="COM_SUPPORTGROUPS_REGIONS_EDIT_OWN_DESC" />
<action name="region.edit.state" title="COM_SUPPORTGROUPS_REGIONS_EDIT_STATE" description="COM_SUPPORTGROUPS_REGIONS_EDIT_STATE_DESC" />
<action name="region.version" title="COM_SUPPORTGROUPS_REGIONS_EDIT_VERSION" description="COM_SUPPORTGROUPS_REGIONS_EDIT_VERSION_DESC" />
<action name="region.export" title="COM_SUPPORTGROUPS_REGIONS_EXPORT" description="COM_SUPPORTGROUPS_REGIONS_EXPORT_DESC" />
<action name="region.import" title="COM_SUPPORTGROUPS_REGIONS_IMPORT" description="COM_SUPPORTGROUPS_REGIONS_IMPORT_DESC" />
<action name="region.submenu" title="COM_SUPPORTGROUPS_REGIONS_SUBMENU" description="COM_SUPPORTGROUPS_REGIONS_SUBMENU_DESC" />
<action name="support_group.access" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_ACCESS" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_ACCESS_DESC" />
<action name="support_group.batch" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_BATCH_USE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_BATCH_USE_DESC" />
<action name="support_group.create" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_CREATE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_CREATE_DESC" />
<action name="support_group.dashboard_add" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_DASHBOARD_ADD" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_DASHBOARD_ADD_DESC" />
<action name="support_group.dashboard_list" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_DASHBOARD_LIST" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_DASHBOARD_LIST_DESC" />
<action name="support_group.delete" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_DELETE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_DELETE_DESC" />
<action name="support_group.edit" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_DESC" />
<action name="support_group.edit.clinic" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CLINIC" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CLINIC_DESC" />
<action name="support_group.edit.created_by" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_BY_DESC" />
<action name="support_group.edit.created" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_DATE_DESC" />
<action name="support_group.edit.female" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_DESC" />
<action name="support_group.edit.female_art" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_ART" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_ART_DESC" />
<action name="support_group.edit.location" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_LOCATION" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_LOCATION_DESC" />
<action name="support_group.edit.male" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_DESC" />
<action name="support_group.edit.male_art" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_ART" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_ART_DESC" />
<action name="support_group.edit.male_children" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_CHILDREN" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_CHILDREN_DESC" />
<action name="support_group.edit.name" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_NAME" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_NAME_DESC" />
<action name="support_group.edit.own" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_OWN" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_OWN_DESC" />
<action name="support_group.edit.phone" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_PHONE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_PHONE_DESC" />
<action name="support_group.edit.state" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_STATE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_STATE_DESC" />
<action name="support_group.version" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_VERSION" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_VERSION_DESC" />
<action name="support_group.export" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EXPORT" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EXPORT_DESC" />
<action name="support_group.import" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_IMPORT" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_IMPORT_DESC" />
<action name="support_group.submenu" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_SUBMENU" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_SUBMENU_DESC" />
</section>
<section name="support_group">
<action name="support_group.edit" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_DESC" />
<action name="support_group.edit.own" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_OWN" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_OWN_DESC" />
<action name="support_group.edit.state" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_STATE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_STATE_DESC" />
<action name="support_group.edit.created_by" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_BY_DESC" />
<action name="support_group.edit.created" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_DATE_DESC" />
<action name="support_group.create" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_CREATE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_CREATE_DESC" />
<action name="support_group.delete" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_DELETE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_DELETE_DESC" />
<action name="support_group.access" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_ACCESS" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_ACCESS_DESC" />
<action name="support_group.edit.name" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_NAME" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_NAME_DESC" />
<action name="support_group.edit.phone" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_PHONE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_PHONE_DESC" />
<action name="support_group.edit.location" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_LOCATION" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_LOCATION_DESC" />
<action name="support_group.edit.clinic" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CLINIC" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CLINIC_DESC" />
<action name="support_group.edit.male" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_DESC" />
<action name="support_group.edit.female" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_DESC" />
<action name="support_group.edit.female_art" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_ART" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_ART_DESC" />
<action name="support_group.edit.male_art" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_ART" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_ART_DESC" />
<action name="support_group.edit.male_children" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_CHILDREN" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_CHILDREN_DESC" />
<action name="support_group.version" title="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_VERSION" description="COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_VERSION_DESC" />
</section>
<section name="payment">
<action name="payment.edit" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_DESC" />
<action name="payment.edit.own" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_OWN" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_OWN_DESC" />
<action name="payment.edit.state" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_STATE" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_STATE_DESC" />
<action name="payment.edit.created_by" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_BY_DESC" />
<action name="payment.edit.created" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_DATE_DESC" />
<action name="payment.create" title="COM_SUPPORTGROUPS_PAYMENTS_CREATE" description="COM_SUPPORTGROUPS_PAYMENTS_CREATE_DESC" />
<action name="payment.delete" title="COM_SUPPORTGROUPS_PAYMENTS_DELETE" description="COM_SUPPORTGROUPS_PAYMENTS_DELETE_DESC" />
<action name="payment.access" title="COM_SUPPORTGROUPS_PAYMENTS_ACCESS" description="COM_SUPPORTGROUPS_PAYMENTS_ACCESS_DESC" />
<action name="payment.edit.support_group" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_SUPPORT_GROUP" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_SUPPORT_GROUP_DESC" />
<action name="payment.edit.year" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_YEAR" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_YEAR_DESC" />
<action name="payment.edit.amount" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_AMOUNT" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_AMOUNT_DESC" />
<action name="payment.version" title="COM_SUPPORTGROUPS_PAYMENTS_EDIT_VERSION" description="COM_SUPPORTGROUPS_PAYMENTS_EDIT_VERSION_DESC" />
</section>
<section name="clinic">
<action name="clinic.edit" title="COM_SUPPORTGROUPS_CLINICS_EDIT" description="COM_SUPPORTGROUPS_CLINICS_EDIT_DESC" />
<action name="clinic.edit.own" title="COM_SUPPORTGROUPS_CLINICS_EDIT_OWN" description="COM_SUPPORTGROUPS_CLINICS_EDIT_OWN_DESC" />
<action name="clinic.edit.state" title="COM_SUPPORTGROUPS_CLINICS_EDIT_STATE" description="COM_SUPPORTGROUPS_CLINICS_EDIT_STATE_DESC" />
<action name="clinic.edit.created_by" title="COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_BY_DESC" />
<action name="clinic.edit.created" title="COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_DATE_DESC" />
<action name="clinic.create" title="COM_SUPPORTGROUPS_CLINICS_CREATE" description="COM_SUPPORTGROUPS_CLINICS_CREATE_DESC" />
<action name="clinic.delete" title="COM_SUPPORTGROUPS_CLINICS_DELETE" description="COM_SUPPORTGROUPS_CLINICS_DELETE_DESC" />
<action name="clinic.access" title="COM_SUPPORTGROUPS_CLINICS_ACCESS" description="COM_SUPPORTGROUPS_CLINICS_ACCESS_DESC" />
<action name="clinic.edit.name" title="COM_SUPPORTGROUPS_CLINICS_EDIT_NAME" description="COM_SUPPORTGROUPS_CLINICS_EDIT_NAME_DESC" />
<action name="clinic.edit.phone" title="COM_SUPPORTGROUPS_CLINICS_EDIT_PHONE" description="COM_SUPPORTGROUPS_CLINICS_EDIT_PHONE_DESC" />
<action name="clinic.edit.note_set_area" title="COM_SUPPORTGROUPS_CLINICS_EDIT_NOTE_SET_AREA" description="COM_SUPPORTGROUPS_CLINICS_EDIT_NOTE_SET_AREA_DESC" />
<action name="clinic.version" title="COM_SUPPORTGROUPS_CLINICS_EDIT_VERSION" description="COM_SUPPORTGROUPS_CLINICS_EDIT_VERSION_DESC" />
</section>
<section name="location">
<action name="location.edit" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_DESC" />
<action name="location.edit.own" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_OWN" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_OWN_DESC" />
<action name="location.edit.state" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_STATE" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_STATE_DESC" />
<action name="location.edit.created_by" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_BY_DESC" />
<action name="location.edit.created" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_DATE_DESC" />
<action name="location.create" title="COM_SUPPORTGROUPS_LOCATIONS_CREATE" description="COM_SUPPORTGROUPS_LOCATIONS_CREATE_DESC" />
<action name="location.delete" title="COM_SUPPORTGROUPS_LOCATIONS_DELETE" description="COM_SUPPORTGROUPS_LOCATIONS_DELETE_DESC" />
<action name="location.access" title="COM_SUPPORTGROUPS_LOCATIONS_ACCESS" description="COM_SUPPORTGROUPS_LOCATIONS_ACCESS_DESC" />
<action name="location.edit.name" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_NAME" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_NAME_DESC" />
<action name="location.edit.region" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_REGION" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_REGION_DESC" />
<action name="location.version" title="COM_SUPPORTGROUPS_LOCATIONS_EDIT_VERSION" description="COM_SUPPORTGROUPS_LOCATIONS_EDIT_VERSION_DESC" />
</section>
<section name="region">
<action name="region.edit" title="COM_SUPPORTGROUPS_REGIONS_EDIT" description="COM_SUPPORTGROUPS_REGIONS_EDIT_DESC" />
<action name="region.edit.own" title="COM_SUPPORTGROUPS_REGIONS_EDIT_OWN" description="COM_SUPPORTGROUPS_REGIONS_EDIT_OWN_DESC" />
<action name="region.edit.state" title="COM_SUPPORTGROUPS_REGIONS_EDIT_STATE" description="COM_SUPPORTGROUPS_REGIONS_EDIT_STATE_DESC" />
<action name="region.edit.created_by" title="COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_BY" description="COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_BY_DESC" />
<action name="region.edit.created" title="COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_DATE" description="COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_DATE_DESC" />
<action name="region.create" title="COM_SUPPORTGROUPS_REGIONS_CREATE" description="COM_SUPPORTGROUPS_REGIONS_CREATE_DESC" />
<action name="region.delete" title="COM_SUPPORTGROUPS_REGIONS_DELETE" description="COM_SUPPORTGROUPS_REGIONS_DELETE_DESC" />
<action name="region.access" title="COM_SUPPORTGROUPS_REGIONS_ACCESS" description="COM_SUPPORTGROUPS_REGIONS_ACCESS_DESC" />
<action name="region.edit.name" title="COM_SUPPORTGROUPS_REGIONS_EDIT_NAME" description="COM_SUPPORTGROUPS_REGIONS_EDIT_NAME_DESC" />
<action name="region.edit.country" title="COM_SUPPORTGROUPS_REGIONS_EDIT_COUNTRY" description="COM_SUPPORTGROUPS_REGIONS_EDIT_COUNTRY_DESC" />
<action name="region.version" title="COM_SUPPORTGROUPS_REGIONS_EDIT_VERSION" description="COM_SUPPORTGROUPS_REGIONS_EDIT_VERSION_DESC" />
</section>
<section name="currency">
<action name="currency.edit" title="COM_SUPPORTGROUPS_CURRENCIES_EDIT" description="COM_SUPPORTGROUPS_CURRENCIES_EDIT_DESC" />
<action name="currency.edit.own" title="COM_SUPPORTGROUPS_CURRENCIES_EDIT_OWN" description="COM_SUPPORTGROUPS_CURRENCIES_EDIT_OWN_DESC" />
<action name="currency.edit.state" title="COM_SUPPORTGROUPS_CURRENCIES_EDIT_STATE" description="COM_SUPPORTGROUPS_CURRENCIES_EDIT_STATE_DESC" />
<action name="currency.create" title="COM_SUPPORTGROUPS_CURRENCIES_CREATE" description="COM_SUPPORTGROUPS_CURRENCIES_CREATE_DESC" />
<action name="currency.delete" title="COM_SUPPORTGROUPS_CURRENCIES_DELETE" description="COM_SUPPORTGROUPS_CURRENCIES_DELETE_DESC" />
<action name="currency.access" title="COM_SUPPORTGROUPS_CURRENCIES_ACCESS" description="COM_SUPPORTGROUPS_CURRENCIES_ACCESS_DESC" />
<action name="currency.version" title="COM_SUPPORTGROUPS_CURRENCIES_EDIT_VERSION" description="COM_SUPPORTGROUPS_CURRENCIES_EDIT_VERSION_DESC" />
</section>
<section name="country">
<action name="country.edit" title="COM_SUPPORTGROUPS_COUNTRIES_EDIT" description="COM_SUPPORTGROUPS_COUNTRIES_EDIT_DESC" />
<action name="country.edit.own" title="COM_SUPPORTGROUPS_COUNTRIES_EDIT_OWN" description="COM_SUPPORTGROUPS_COUNTRIES_EDIT_OWN_DESC" />
@ -98,4 +226,22 @@
<action name="country.access" title="COM_SUPPORTGROUPS_COUNTRIES_ACCESS" description="COM_SUPPORTGROUPS_COUNTRIES_ACCESS_DESC" />
<action name="country.version" title="COM_SUPPORTGROUPS_COUNTRIES_EDIT_VERSION" description="COM_SUPPORTGROUPS_COUNTRIES_EDIT_VERSION_DESC" />
</section>
<section name="currency">
<action name="currency.edit" title="COM_SUPPORTGROUPS_CURRENCIES_EDIT" description="COM_SUPPORTGROUPS_CURRENCIES_EDIT_DESC" />
<action name="currency.edit.own" title="COM_SUPPORTGROUPS_CURRENCIES_EDIT_OWN" description="COM_SUPPORTGROUPS_CURRENCIES_EDIT_OWN_DESC" />
<action name="currency.edit.state" title="COM_SUPPORTGROUPS_CURRENCIES_EDIT_STATE" description="COM_SUPPORTGROUPS_CURRENCIES_EDIT_STATE_DESC" />
<action name="currency.create" title="COM_SUPPORTGROUPS_CURRENCIES_CREATE" description="COM_SUPPORTGROUPS_CURRENCIES_CREATE_DESC" />
<action name="currency.delete" title="COM_SUPPORTGROUPS_CURRENCIES_DELETE" description="COM_SUPPORTGROUPS_CURRENCIES_DELETE_DESC" />
<action name="currency.access" title="COM_SUPPORTGROUPS_CURRENCIES_ACCESS" description="COM_SUPPORTGROUPS_CURRENCIES_ACCESS_DESC" />
<action name="currency.version" title="COM_SUPPORTGROUPS_CURRENCIES_EDIT_VERSION" description="COM_SUPPORTGROUPS_CURRENCIES_EDIT_VERSION_DESC" />
</section>
<section name="help_document">
<action name="help_document.edit" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_DESC" />
<action name="help_document.edit.own" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_OWN" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_OWN_DESC" />
<action name="help_document.edit.state" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_STATE" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_STATE_DESC" />
<action name="help_document.create" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_CREATE" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_CREATE_DESC" />
<action name="help_document.delete" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_DELETE" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_DELETE_DESC" />
<action name="help_document.access" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_ACCESS" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_ACCESS_DESC" />
<action name="help_document.version" title="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_VERSION" description="COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_VERSION_DESC" />
</section>
</access>

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinic.css
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinics.css
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help_document.css
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help_documents.css
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payment.css
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payments.css
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -89,10 +89,13 @@ class SupportgroupsController extends JControllerLegacy
{
$views = array(
'support_group' => 'support_groups',
'payment' => 'payments',
'clinic' => 'clinics',
'location' => 'locations',
'region' => 'regions',
'country' => 'countries',
'currency' => 'currencies',
'country' => 'countries'
'help_document' => 'help_documents'
);
// check if this is a list view
if (in_array($view,$views))

View File

@ -0,0 +1,326 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinic.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controllerform');
/**
* Clinic Controller
*/
class SupportgroupsControllerClinic extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'Clinics'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Access check.
$access = JFactory::getUser()->authorise('clinic.access', 'com_supportgroups');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('clinic.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('clinic.access', 'com_supportgroups.clinic.' . (int) $recordId) && $user->authorise('clinic.access', 'com_supportgroups'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('clinic.edit', 'com_supportgroups.clinic.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('clinic.edit.own', 'com_supportgroups.clinic.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('clinic.edit.own', 'com_supportgroups'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('clinic.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 12.2
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$tmpl = $this->input->get('tmpl');
$layout = $this->input->get('layout', 'edit', 'string');
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// Setup redirect info.
$append = '';
if ($refid)
{
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
}
elseif ($ref)
{
$append .= '&ref='.(string)$ref;
}
if ($tmpl)
{
$append .= '&tmpl=' . $tmpl;
}
if ($layout)
{
$append .= '&layout=' . $layout;
}
if ($recordId)
{
$append .= '&' . $urlVar . '=' . $recordId;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Clinic', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=clinics' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
$cancel = parent::cancel($key);
if ($cancel)
{
if ($this->refid)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
}
else
{
// Redirect to the items screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
if ($this->ref || $this->refid)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
if ($this->refid && $saved)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref && $saved)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,111 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinics.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controlleradmin library
jimport('joomla.application.component.controlleradmin');
/**
* Clinics Controller
*/
class SupportgroupsControllerClinics extends JControllerAdmin
{
protected $text_prefix = 'COM_SUPPORTGROUPS_CLINICS';
/**
* Proxy for getModel.
* @since 2.5
*/
public function getModel($name = 'Clinic', $prefix = 'SupportgroupsModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('clinic.export', 'com_supportgroups') && $user->authorise('core.export', 'com_supportgroups'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Clinics');
// get the data to export
$data = $model->getExportData($pks);
if (SupportgroupsHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
SupportgroupsHelper::xls($data,'Clinics_'.$date->format('jS_F_Y'),'Clinics exported ('.$date->format('jS F, Y').')','clinics');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SUPPORTGROUPS_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=clinics', false), $message, 'error');
return;
}
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('clinic.import', 'com_supportgroups') && $user->authorise('core.import', 'com_supportgroups'))
{
// Get the import model
$model = $this->getModel('Clinics');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SupportgroupsHelper::checkObject($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('clinic_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'clinics');
$session->set('dataType_VDM_IMPORTINTO', 'clinic');
// Redirect to import view.
$message = JText::_('COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_CLINICS');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SUPPORTGROUPS_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=clinics', false), $message, 'error');
return;
}
}

129
admin/controllers/help.php Normal file
View File

@ -0,0 +1,129 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controller');
/**
* Supportgroups Help Controller
*/
class SupportgroupsControllerHelp extends JControllerLegacy
{
public function __construct($config)
{
parent::__construct($config);
// load the tasks
$this->registerTask('getText', 'help');
}
public function help()
{
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && $token == $call_token){
$task = $this->getTask();
switch($task){
case 'getText':
try
{
$idValue = $jinput->get('id', 0, 'INT');
if($idValue)
{
$result = $this->getHelpDocumentText($idValue);
}
else
{
$result = '';
}
echo $result;
// stop execution gracefully
jexit();
}
catch(Exception $e)
{
// stop execution gracefully
jexit();
}
break;
}
}
else
{
// stop execution gracefully
jexit();
}
}
protected function getHelpDocumentText($id)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.title','a.content'));
$query->from('#__supportgroups_help_document AS a');
$query->where('a.id = '.(int) $id);
$query->where('a.published = 1');
$db->setQuery($query);
$db->execute();
if($db->getNumRows())
{
$text = array();
$document = $db->loadObject();
// fix image issue
$images['src="images'] = 'src="'.JURI::root().'images';
$images["src='images"] = "src='".JURI::root()."images";
$images['src="/images'] = 'src="'.JURI::root().'images';
$images["src='/images"] = "src='".JURI::root()."images";
// set document template
$text[] = "<!doctype html>";
$text[] = '<html>';
$text[] = "<head>";
$text[] = '<meta charset="utf-8">';
$text[] = "<title>".$document->title."</title>";
$text[] = '<link type="text/css" href="'.JURI::root().'media/com_supportgroups/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.JURI::root().'media/com_supportgroups/uikit/js/uikit.min.js"></script>';
$text[] = "</head>";
$text[] = '<body><br />';
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';
$text[] = '<div class="uk-panel uk-width-1-1 uk-panel-box uk-panel-box-primary">';
// build the help text
$text[] = '<h1 class="uk-panel-title">'.$document->title."</h1>";
$text[] = str_replace(array_keys($images),array_values($images),$document->content);
// end template
$text[] = '</div><br /><br />';
$text[] = '</div>';
$text[] = "</body>";
$text[] = "</html>";
return implode("\n",$text);
}
return false;
}
}

View File

@ -0,0 +1,326 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help_document.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controllerform');
/**
* Help_document Controller
*/
class SupportgroupsControllerHelp_document extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'Help_documents'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Access check.
$access = JFactory::getUser()->authorise('help_document.access', 'com_supportgroups');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('help_document.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('help_document.access', 'com_supportgroups.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_supportgroups'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit', 'com_supportgroups.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('help_document.edit.own', 'com_supportgroups.help_document.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('help_document.edit.own', 'com_supportgroups'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('help_document.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 12.2
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$tmpl = $this->input->get('tmpl');
$layout = $this->input->get('layout', 'edit', 'string');
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// Setup redirect info.
$append = '';
if ($refid)
{
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
}
elseif ($ref)
{
$append .= '&ref='.(string)$ref;
}
if ($tmpl)
{
$append .= '&tmpl=' . $tmpl;
}
if ($layout)
{
$append .= '&layout=' . $layout;
}
if ($recordId)
{
$append .= '&' . $urlVar . '=' . $recordId;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Help_document', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=help_documents' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
$cancel = parent::cancel($key);
if ($cancel)
{
if ($this->refid)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
}
else
{
// Redirect to the items screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
if ($this->ref || $this->refid)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
if ($this->refid && $saved)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref && $saved)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,111 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help_documents.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controlleradmin library
jimport('joomla.application.component.controlleradmin');
/**
* Help_documents Controller
*/
class SupportgroupsControllerHelp_documents extends JControllerAdmin
{
protected $text_prefix = 'COM_SUPPORTGROUPS_HELP_DOCUMENTS';
/**
* Proxy for getModel.
* @since 2.5
*/
public function getModel($name = 'Help_document', $prefix = 'SupportgroupsModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('help_document.export', 'com_supportgroups') && $user->authorise('core.export', 'com_supportgroups'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Help_documents');
// get the data to export
$data = $model->getExportData($pks);
if (SupportgroupsHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
SupportgroupsHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SUPPORTGROUPS_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=help_documents', false), $message, 'error');
return;
}
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('help_document.import', 'com_supportgroups') && $user->authorise('core.import', 'com_supportgroups'))
{
// Get the import model
$model = $this->getModel('Help_documents');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SupportgroupsHelper::checkObject($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('help_document_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'help_documents');
$session->set('dataType_VDM_IMPORTINTO', 'help_document');
// Redirect to import view.
$message = JText::_('COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SUPPORTGROUPS_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=help_documents', false), $message, 'error');
return;
}
}

View File

@ -59,8 +59,15 @@ class SupportgroupsControllerLocation extends JControllerForm
* @since 1.6
*/
protected function allowAdd($data = array())
{ // In the absense of better information, revert to the component permissions.
return parent::allowAdd($data);
{
// Access check.
$access = JFactory::getUser()->authorise('location.access', 'com_supportgroups');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('location.create', $this->option);
}
/**
@ -81,13 +88,20 @@ class SupportgroupsControllerLocation extends JControllerForm
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('location.access', 'com_supportgroups.location.' . (int) $recordId) && $user->authorise('location.access', 'com_supportgroups'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_supportgroups.location.' . (int) $recordId);
$permission = $user->authorise('location.edit', 'com_supportgroups.location.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('core.edit.own', 'com_supportgroups.location.' . $recordId))
if ($user->authorise('location.edit.own', 'com_supportgroups.location.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
@ -106,7 +120,7 @@ class SupportgroupsControllerLocation extends JControllerForm
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('core.edit.own', 'com_supportgroups'))
if ($user->authorise('location.edit.own', 'com_supportgroups'))
{
return true;
}
@ -116,7 +130,7 @@ class SupportgroupsControllerLocation extends JControllerForm
}
}
// Since there is no permission, revert to the component permissions.
return parent::allowEdit($data, $key);
return $user->authorise('location.edit', $this->option);
}
/**

View File

@ -0,0 +1,326 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payment.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controllerform');
/**
* Payment Controller
*/
class SupportgroupsControllerPayment extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'Payments'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Access check.
$access = JFactory::getUser()->authorise('payment.access', 'com_supportgroups');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('payment.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('payment.access', 'com_supportgroups.payment.' . (int) $recordId) && $user->authorise('payment.access', 'com_supportgroups'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('payment.edit', 'com_supportgroups.payment.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('payment.edit.own', 'com_supportgroups.payment.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('payment.edit.own', 'com_supportgroups'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('payment.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 12.2
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$tmpl = $this->input->get('tmpl');
$layout = $this->input->get('layout', 'edit', 'string');
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// Setup redirect info.
$append = '';
if ($refid)
{
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
}
elseif ($ref)
{
$append .= '&ref='.(string)$ref;
}
if ($tmpl)
{
$append .= '&tmpl=' . $tmpl;
}
if ($layout)
{
$append .= '&layout=' . $layout;
}
if ($recordId)
{
$append .= '&' . $urlVar . '=' . $recordId;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Payment', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=payments' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
$cancel = parent::cancel($key);
if ($cancel)
{
if ($this->refid)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
}
else
{
// Redirect to the items screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
if ($this->ref || $this->refid)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
if ($this->refid && $saved)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref && $saved)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,111 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payments.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controlleradmin library
jimport('joomla.application.component.controlleradmin');
/**
* Payments Controller
*/
class SupportgroupsControllerPayments extends JControllerAdmin
{
protected $text_prefix = 'COM_SUPPORTGROUPS_PAYMENTS';
/**
* Proxy for getModel.
* @since 2.5
*/
public function getModel($name = 'Payment', $prefix = 'SupportgroupsModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('payment.export', 'com_supportgroups') && $user->authorise('core.export', 'com_supportgroups'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Payments');
// get the data to export
$data = $model->getExportData($pks);
if (SupportgroupsHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
SupportgroupsHelper::xls($data,'Payments_'.$date->format('jS_F_Y'),'Payments exported ('.$date->format('jS F, Y').')','payments');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SUPPORTGROUPS_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=payments', false), $message, 'error');
return;
}
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('payment.import', 'com_supportgroups') && $user->authorise('core.import', 'com_supportgroups'))
{
// Get the import model
$model = $this->getModel('Payments');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SupportgroupsHelper::checkObject($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('payment_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'payments');
$session->set('dataType_VDM_IMPORTINTO', 'payment');
// Redirect to import view.
$message = JText::_('COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_PAYMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SUPPORTGROUPS_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_supportgroups&view=payments', false), $message, 'error');
return;
}
}

View File

@ -59,8 +59,15 @@ class SupportgroupsControllerRegion extends JControllerForm
* @since 1.6
*/
protected function allowAdd($data = array())
{ // In the absense of better information, revert to the component permissions.
return parent::allowAdd($data);
{
// Access check.
$access = JFactory::getUser()->authorise('region.access', 'com_supportgroups');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('region.create', $this->option);
}
/**
@ -81,13 +88,20 @@ class SupportgroupsControllerRegion extends JControllerForm
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('region.access', 'com_supportgroups.region.' . (int) $recordId) && $user->authorise('region.access', 'com_supportgroups'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_supportgroups.region.' . (int) $recordId);
$permission = $user->authorise('region.edit', 'com_supportgroups.region.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('core.edit.own', 'com_supportgroups.region.' . $recordId))
if ($user->authorise('region.edit.own', 'com_supportgroups.region.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
@ -106,7 +120,7 @@ class SupportgroupsControllerRegion extends JControllerForm
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('core.edit.own', 'com_supportgroups'))
if ($user->authorise('region.edit.own', 'com_supportgroups'))
{
return true;
}
@ -116,7 +130,7 @@ class SupportgroupsControllerRegion extends JControllerForm
}
}
// Since there is no permission, revert to the component permissions.
return parent::allowEdit($data, $key);
return $user->authorise('region.edit', $this->option);
}
/**

View File

@ -59,8 +59,15 @@ class SupportgroupsControllerSupport_group extends JControllerForm
* @since 1.6
*/
protected function allowAdd($data = array())
{ // In the absense of better information, revert to the component permissions.
return parent::allowAdd($data);
{
// Access check.
$access = JFactory::getUser()->authorise('support_group.access', 'com_supportgroups');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('support_group.create', $this->option);
}
/**
@ -81,13 +88,20 @@ class SupportgroupsControllerSupport_group extends JControllerForm
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('support_group.access', 'com_supportgroups.support_group.' . (int) $recordId) && $user->authorise('support_group.access', 'com_supportgroups'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_supportgroups.support_group.' . (int) $recordId);
$permission = $user->authorise('support_group.edit', 'com_supportgroups.support_group.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('core.edit.own', 'com_supportgroups.support_group.' . $recordId))
if ($user->authorise('support_group.edit.own', 'com_supportgroups.support_group.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
@ -106,7 +120,7 @@ class SupportgroupsControllerSupport_group extends JControllerForm
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('core.edit.own', 'com_supportgroups'))
if ($user->authorise('support_group.edit.own', 'com_supportgroups'))
{
return true;
}
@ -116,7 +130,7 @@ class SupportgroupsControllerSupport_group extends JControllerForm
}
}
// Since there is no permission, revert to the component permissions.
return parent::allowEdit($data, $key);
return $user->authorise('support_group.edit', $this->option);
}
/**

View File

@ -0,0 +1,67 @@
<?php
/**
*
* @version 1.0.0
* @package Detecting negative numbers
* @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
*
**/
// No direct access.
defined('_JEXEC') or die;
/**
* Detecting negative numbers
**/
class Expression
{
protected $expression;
protected $result;
public function __construct($expression)
{
$this->expression = $expression;
}
public function evaluate()
{
$this->result = eval("return ".$this->expression.";");
return $this;
}
public function getResult()
{
return $this->result;
}
}
class NegativeFinder
{
protected $expressionObj;
public function __construct(Expression $expressionObj)
{
$this->expressionObj = $expressionObj;
}
public function isItNegative()
{
$result = $this->expressionObj->evaluate()->getResult();
if($this->hasMinusSign($result))
{
return true;
}
else
{
return false;
}
}
protected function hasMinusSign($value)
{
return (substr(strval($value), 0, 1) == "-");
}
}

View File

@ -31,6 +31,112 @@ defined('_JEXEC') or die('Restricted access');
*/
abstract class SupportgroupsHelper
{
public static function setCurrency($amount,$support_group)
{
// get the currency id
$currency = self::getCurrency($support_group);
// make money
return self::makeMoney($amount,$currency);
}
protected static $currency = array();
public static function getCurrency($support_group)
{
if (!isset(self::$currency[$support_group]))
{
// get the location
$location = self::getVar('support_group', $support_group, 'id', 'location');
// get the Region
$region = self::getVar('location', $location, 'id', 'region');
// get the Country
$country = self::getVar('region', $region, 'id', 'country');
// get the Currency Codethree
$codethree = self::getVar('country', $country, 'id', 'currency');
// get currency id
self::$currency[$support_group] = self::getVar('currency', $codethree, 'codethree', 'id');
}
return self::$currency[$support_group];
}
protected static $currencyDetails = array();
public static function getCurrencyDetails($id = false)
{
if(is_numeric($id))
{
if (!isset(self::$currencyDetails[$id]))
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(
array( 'a.id','a.name','a.codethree','a.numericcode','a.symbol','a.thousands','a.decimalplace',
'a.decimalsymbol','a.positivestyle','a.negativestyle'),
array( 'currency_id','currency_name','currency_codethree','currency_numericcode','currency_symbol',
'currency_thousands','currency_decimalplace','currency_decimalsymbol','currency_positivestyle',
'currency_negativestyle')));
$query->from($db->quoteName('#__supportgroups_currency', 'a'));
$query->where($db->quoteName('id') . ' = '.(int) $id);
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
self::$currencyDetails[$id] = $db->loadObject();
}
else
{
self::$currencyDetails[$id] = false;
}
}
return self::$currencyDetails[$id];
}
return false;
}
public static function makeMoney($number,$currency = false)
{
// first check if we have a number
if (is_numeric($number))
{
// make sure to include the negative finder file
include_once 'negativefinder.php';
// check if the number is negative
$negativeFinderObj = new NegativeFinder(new Expression("$number"));
$negative = $negativeFinderObj->isItNegative() ? TRUE : FALSE;
}
else
{
throw new Exception('ERROR! ('.$number.') is not a number!');
}
// setup the currency
$currency = self::getCurrencyDetails($currency);
// set the number to currency
if (self::checkObject($currency))
{
if (!$negative)
{
$format = $currency->currency_positivestyle;
$sign = '+';
}
else
{
$format = $currency->currency_negativestyle;
$sign = '-';
$number = abs($number);
}
$setupNumber = number_format((float)$number, (int)$currency->currency_decimalplace, $currency->currency_decimalsymbol, ' '); //$currency->currency_thousands TODO);
$search = array('{sign}', '{number}', '{symbol}');
$replace = array($sign, $setupNumber, $currency->currency_symbol);
$moneyMade = str_replace ($search,$replace,$format);
return $moneyMade;
}
return $number;
}
/**
* Load the Component xml manifest.
**/
@ -79,13 +185,77 @@ abstract class SupportgroupsHelper
}
/**
* Can be used to build help urls.
* Load the Component Help URLs.
**/
public static function getHelpUrl($view)
{
$user = JFactory::getUser();
$groups = $user->get('groups');
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.id','a.groups','a.target','a.type','a.article','a.url'));
$query->from('#__supportgroups_help_document AS a');
$query->where('a.admin_view = '.$db->quote($view));
$query->where('a.location = 1');
$query->where('a.published = 1');
$db->setQuery($query);
$db->execute();
if($db->getNumRows())
{
$helps = $db->loadObjectList();
if (self::checkArray($helps))
{
foreach ($helps as $nr => $help)
{
if ($help->target == 1)
{
$targetgroups = json_decode($help->groups, true);
if (!array_intersect($targetgroups, $groups))
{
// if user not in those target groups then remove the item
unset($helps[$nr]);
continue;
}
}
// set the return type
switch ($help->type)
{
// set joomla article
case 1:
return self::loadArticleLink($help->article);
break;
// set help text
case 2:
return self::loadHelpTextLink($help->id);
break;
// set Link
case 3:
return $help->url;
break;
}
}
}
}
return false;
}
/**
* Get the Article Link.
**/
protected static function loadArticleLink($id)
{
return JURI::root().'index.php?option=com_content&view=article&id='.$id.'&tmpl=component&layout=modal';
}
/**
* Get the Help Text Link.
**/
protected static function loadHelpTextLink($id)
{
$token = JSession::getFormToken();
return 'index.php?option=com_supportgroups&task=help.getText&id=' . (int) $id . '&token=' . $token;
}
/**
* Configure the Linkbar.
**/
@ -95,17 +265,38 @@ abstract class SupportgroupsHelper
$user = JFactory::getUser();
// load the submenus to sidebar
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_DASHBOARD'), 'index.php?option=com_supportgroups&view=supportgroups', $submenu == 'supportgroups');
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_SUPPORT_GROUPS'), 'index.php?option=com_supportgroups&view=support_groups', $submenu == 'support_groups');
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_LOCATIONS'), 'index.php?option=com_supportgroups&view=locations', $submenu == 'locations');
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_REGIONS'), 'index.php?option=com_supportgroups&view=regions', $submenu == 'regions');
if ($user->authorise('currency.access', 'com_supportgroups') && $user->authorise('currency.submenu', 'com_supportgroups'))
if ($user->authorise('support_group.access', 'com_supportgroups') && $user->authorise('support_group.submenu', 'com_supportgroups'))
{
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_CURRENCIES'), 'index.php?option=com_supportgroups&view=currencies', $submenu == 'currencies');
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_SUPPORT_GROUPS'), 'index.php?option=com_supportgroups&view=support_groups', $submenu == 'support_groups');
}
if ($user->authorise('payment.access', 'com_supportgroups') && $user->authorise('payment.submenu', 'com_supportgroups'))
{
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_PAYMENTS'), 'index.php?option=com_supportgroups&view=payments', $submenu == 'payments');
}
if ($user->authorise('clinic.access', 'com_supportgroups') && $user->authorise('clinic.submenu', 'com_supportgroups'))
{
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_CLINICS'), 'index.php?option=com_supportgroups&view=clinics', $submenu == 'clinics');
}
if ($user->authorise('location.access', 'com_supportgroups') && $user->authorise('location.submenu', 'com_supportgroups'))
{
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_LOCATIONS'), 'index.php?option=com_supportgroups&view=locations', $submenu == 'locations');
}
if ($user->authorise('region.access', 'com_supportgroups') && $user->authorise('region.submenu', 'com_supportgroups'))
{
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_REGIONS'), 'index.php?option=com_supportgroups&view=regions', $submenu == 'regions');
}
if ($user->authorise('country.access', 'com_supportgroups') && $user->authorise('country.submenu', 'com_supportgroups'))
{
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_COUNTRIES'), 'index.php?option=com_supportgroups&view=countries', $submenu == 'countries');
}
if ($user->authorise('currency.access', 'com_supportgroups') && $user->authorise('currency.submenu', 'com_supportgroups'))
{
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_CURRENCIES'), 'index.php?option=com_supportgroups&view=currencies', $submenu == 'currencies');
}
if ($user->authorise('help_document.access', 'com_supportgroups') && $user->authorise('help_document.submenu', 'com_supportgroups'))
{
JHtmlSidebar::addEntry(JText::_('COM_SUPPORTGROUPS_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_supportgroups&view=help_documents', $submenu == 'help_documents');
}
}
/**

View File

@ -1,6 +1,88 @@
COM_SUPPORTGROUPS="Support Groups"
COM_SUPPORTGROUPS_AUTHOR="Author"
COM_SUPPORTGROUPS_BACK="Back"
COM_SUPPORTGROUPS_CLINIC="Clinic"
COM_SUPPORTGROUPS_CLINICS="Clinics"
COM_SUPPORTGROUPS_CLINICS_ACCESS="Clinics Access"
COM_SUPPORTGROUPS_CLINICS_ACCESS_DESC="Allows the users in this group to access access clinics"
COM_SUPPORTGROUPS_CLINICS_BATCH_OPTIONS="Batch process the selected Clinics"
COM_SUPPORTGROUPS_CLINICS_BATCH_TIP="All changes will be applied to all selected Clinics"
COM_SUPPORTGROUPS_CLINICS_BATCH_USE="Clinics Batch Use"
COM_SUPPORTGROUPS_CLINICS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch clinics"
COM_SUPPORTGROUPS_CLINICS_CREATE="Clinics Create"
COM_SUPPORTGROUPS_CLINICS_CREATE_DESC="Allows the users in this group to create create clinics"
COM_SUPPORTGROUPS_CLINICS_DASHBOARD_LIST="Clinics Dashboard List"
COM_SUPPORTGROUPS_CLINICS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the clinic"
COM_SUPPORTGROUPS_CLINICS_DELETE="Clinics Delete"
COM_SUPPORTGROUPS_CLINICS_DELETE_DESC="Allows the users in this group to delete delete clinics"
COM_SUPPORTGROUPS_CLINICS_EDIT="Clinics Edit"
COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_BY="Clinics Edit Created By"
COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by clinics"
COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_DATE="Clinics Edit Created Date"
COM_SUPPORTGROUPS_CLINICS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created clinics"
COM_SUPPORTGROUPS_CLINICS_EDIT_DESC="Allows the users in this group to edit the clinic"
COM_SUPPORTGROUPS_CLINICS_EDIT_NAME="Clinics Edit Name"
COM_SUPPORTGROUPS_CLINICS_EDIT_NAME_DESC="Allows the users in this group to update the edit name of the clinic"
COM_SUPPORTGROUPS_CLINICS_EDIT_NOTE_SET_AREA="Clinics Edit Note Set Area"
COM_SUPPORTGROUPS_CLINICS_EDIT_NOTE_SET_AREA_DESC="Allows the users in this group to update the edit note set area of the clinic"
COM_SUPPORTGROUPS_CLINICS_EDIT_OWN="Clinics Edit Own"
COM_SUPPORTGROUPS_CLINICS_EDIT_OWN_DESC="Allows the users in this group to edit edit own clinics created by them"
COM_SUPPORTGROUPS_CLINICS_EDIT_PHONE="Clinics Edit Phone"
COM_SUPPORTGROUPS_CLINICS_EDIT_PHONE_DESC="Allows the users in this group to update the edit phone of the clinic"
COM_SUPPORTGROUPS_CLINICS_EDIT_STATE="Clinics Edit State"
COM_SUPPORTGROUPS_CLINICS_EDIT_STATE_DESC="Allows the users in this group to update the state of the clinic"
COM_SUPPORTGROUPS_CLINICS_EDIT_VERSION="Clinics Edit Version"
COM_SUPPORTGROUPS_CLINICS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version clinics"
COM_SUPPORTGROUPS_CLINICS_EXPORT="Clinics Export"
COM_SUPPORTGROUPS_CLINICS_EXPORT_DESC="Allows the users in this group to export export clinics"
COM_SUPPORTGROUPS_CLINICS_IMPORT="Clinics Import"
COM_SUPPORTGROUPS_CLINICS_IMPORT_DESC="Allows the users in this group to import import clinics"
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_ARCHIVED="%s Clinics archived."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_ARCHIVED_1="%s Clinic archived."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_CHECKED_IN_0="No Clinic successfully checked in."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_CHECKED_IN_1="%d Clinic successfully checked in."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_CHECKED_IN_MORE="%d Clinics successfully checked in."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_DELETED="%s Clinics deleted."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_DELETED_1="%s Clinic deleted."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_FEATURED="%s Clinics featured."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_FEATURED_1="%s Clinic featured."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_PUBLISHED="%s Clinics published."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_PUBLISHED_1="%s Clinic published."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_TRASHED="%s Clinics trashed."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_TRASHED_1="%s Clinic trashed."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_UNFEATURED="%s Clinics unfeatured."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_UNFEATURED_1="%s Clinic unfeatured."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_UNPUBLISHED="%s Clinics unpublished."
COM_SUPPORTGROUPS_CLINICS_N_ITEMS_UNPUBLISHED_1="%s Clinic unpublished."
COM_SUPPORTGROUPS_CLINICS_SUBMENU="Clinics Submenu"
COM_SUPPORTGROUPS_CLINICS_SUBMENU_DESC="Allows the users in this group to update the submenu of the clinic"
COM_SUPPORTGROUPS_CLINIC_AREA="Area"
COM_SUPPORTGROUPS_CLINIC_CREATED_BY_DESC="The user that created the Clinic."
COM_SUPPORTGROUPS_CLINIC_CREATED_BY_LABEL="Created by"
COM_SUPPORTGROUPS_CLINIC_CREATED_DATE_DESC="The date Clinic was created."
COM_SUPPORTGROUPS_CLINIC_CREATED_DATE_LABEL="Created date"
COM_SUPPORTGROUPS_CLINIC_DETAILS="Details"
COM_SUPPORTGROUPS_CLINIC_EDIT="Editing the Clinic"
COM_SUPPORTGROUPS_CLINIC_ERROR_UNIQUE_ALIAS="Another Clinic has the same alias."
COM_SUPPORTGROUPS_CLINIC_ID="Id"
COM_SUPPORTGROUPS_CLINIC_NAME="Name"
COM_SUPPORTGROUPS_CLINIC_NAME_DESCRIPTION="Enter Name Here"
COM_SUPPORTGROUPS_CLINIC_NAME_HINT="Name Here"
COM_SUPPORTGROUPS_CLINIC_NAME_LABEL="Name"
COM_SUPPORTGROUPS_CLINIC_NEW="A New Clinic"
COM_SUPPORTGROUPS_CLINIC_NOTE_SET_AREA_DESCRIPTION="We will add a map here that the location can be drawn on."
COM_SUPPORTGROUPS_CLINIC_NOTE_SET_AREA_LABEL="Set Location"
COM_SUPPORTGROUPS_CLINIC_ORDERING_LABEL="Ordering"
COM_SUPPORTGROUPS_CLINIC_PERMISSION="Permissions"
COM_SUPPORTGROUPS_CLINIC_PHONE="Phone"
COM_SUPPORTGROUPS_CLINIC_PHONE_DESCRIPTION="The phone number of the contact person."
COM_SUPPORTGROUPS_CLINIC_PHONE_HINT="Phone Number Here!"
COM_SUPPORTGROUPS_CLINIC_PHONE_LABEL="Phone Number"
COM_SUPPORTGROUPS_CLINIC_PUBLISHING="Publishing"
COM_SUPPORTGROUPS_CLINIC_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Clinic to customise the alias."
COM_SUPPORTGROUPS_CLINIC_STATUS="Status"
COM_SUPPORTGROUPS_CLINIC_VERSION_DESC="A count of the number of times this Clinic has been revised."
COM_SUPPORTGROUPS_CLINIC_VERSION_LABEL="Revision"
COM_SUPPORTGROUPS_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
COM_SUPPORTGROUPS_CONFIG_AUTHOR="Author Info"
COM_SUPPORTGROUPS_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author of this component."
@ -219,12 +301,14 @@ COM_SUPPORTGROUPS_CURRENCY_VERSION_DESC="A count of the number of times this Cur
COM_SUPPORTGROUPS_CURRENCY_VERSION_LABEL="Revision"
COM_SUPPORTGROUPS_DASH="Dashboard"
COM_SUPPORTGROUPS_DASHBOARD="Support Groups Dashboard"
COM_SUPPORTGROUPS_DASHBOARD_CLINICS="Clinics<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_COUNTRIES="Countries<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_CURRENCIES="Currencies<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_HELP_DOCUMENTS="Help Documents<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_LOCATIONS="Locations<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_LOCATION_ADD="Add&nbsp;Location<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_PAYMENTS="Payments<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_PAYMENT_ADD="Add&nbsp;Payment<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_REGIONS="Regions<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_REGION_ADD="Add&nbsp;Region<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_SUPPORT_GROUPS="Support Groups<br /><br />"
COM_SUPPORTGROUPS_DASHBOARD_SUPPORT_GROUP_ADD="Add&nbsp;Support Group<br /><br />"
COM_SUPPORTGROUPS_DATE="Date"
@ -237,6 +321,107 @@ COM_SUPPORTGROUPS_EDIT_VERSIONS_DESC=" Allows users in this group to edit versio
COM_SUPPORTGROUPS_EXPORT_DATA="Export Data"
COM_SUPPORTGROUPS_EXPORT_DATA_DESC=" Allows users in this group to export data."
COM_SUPPORTGROUPS_EXPORT_FAILED="Export Failed"
COM_SUPPORTGROUPS_HELP_DOCUMENT="Help Document"
COM_SUPPORTGROUPS_HELP_DOCUMENTS="Help Documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_ACCESS="Help Documents Access"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_ACCESS_DESC="Allows the users in this group to access access help documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_BATCH_OPTIONS="Batch process the selected Help Documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_BATCH_TIP="All changes will be applied to all selected Help Documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch help documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_CREATE="Help Documents Create"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the help document"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_DELETE="Help Documents Delete"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_DELETE_DESC="Allows the users in this group to delete delete help documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT="Help Documents Edit"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_DESC="Allows the users in this group to edit the help document"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_OWN="Help Documents Edit Own"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_OWN_DESC="Allows the users in this group to edit edit own help documents created by them"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_STATE="Help Documents Edit State"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_STATE_DESC="Allows the users in this group to update the state of the help document"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_VERSION="Help Documents Edit Version"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version help documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EXPORT="Help Documents Export"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_EXPORT_DESC="Allows the users in this group to export export help documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_IMPORT="Help Documents Import"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_IMPORT_DESC="Allows the users in this group to import import help documents"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_ARCHIVED="%s Help Documents archived."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_ARCHIVED_1="%s Help Document archived."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_0="No Help Document successfully checked in."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_1="%d Help Document successfully checked in."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_MORE="%d Help Documents successfully checked in."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_DELETED="%s Help Documents deleted."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_DELETED_1="%s Help Document deleted."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_FEATURED="%s Help Documents featured."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_FEATURED_1="%s Help Document featured."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_PUBLISHED="%s Help Documents published."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_PUBLISHED_1="%s Help Document published."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_TRASHED="%s Help Documents trashed."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_TRASHED_1="%s Help Document trashed."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_UNFEATURED="%s Help Documents unfeatured."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_UNFEATURED_1="%s Help Document unfeatured."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_UNPUBLISHED="%s Help Documents unpublished."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_UNPUBLISHED_1="%s Help Document unpublished."
COM_SUPPORTGROUPS_HELP_DOCUMENTS_SUBMENU="Help Documents Submenu"
COM_SUPPORTGROUPS_HELP_DOCUMENTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the help document"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN="Admin"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW="Admin View"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION="Select the view being targeted"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW_LABEL="Admin Views"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ALIAS="Alias"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ALIAS_HINT="Auto-generated from name"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ALL="All"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ARTICLE="Article"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ARTICLE_LABEL="Article"
COM_SUPPORTGROUPS_HELP_DOCUMENT_CONTENT="Content"
COM_SUPPORTGROUPS_HELP_DOCUMENT_CONTENT_LABEL="Content"
COM_SUPPORTGROUPS_HELP_DOCUMENT_CREATED_BY_DESC="The user that created the Help Document."
COM_SUPPORTGROUPS_HELP_DOCUMENT_CREATED_BY_LABEL="Created by"
COM_SUPPORTGROUPS_HELP_DOCUMENT_CREATED_DATE_DESC="The date Help Document was created."
COM_SUPPORTGROUPS_HELP_DOCUMENT_CREATED_DATE_LABEL="Created date"
COM_SUPPORTGROUPS_HELP_DOCUMENT_DETAILS="Details"
COM_SUPPORTGROUPS_HELP_DOCUMENT_EDIT="Editing the Help Document"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ERROR_UNIQUE_ALIAS="Another Help Document has the same alias."
COM_SUPPORTGROUPS_HELP_DOCUMENT_GROUPS="Groups"
COM_SUPPORTGROUPS_HELP_DOCUMENT_GROUPS_DESCRIPTION="Select a group/s"
COM_SUPPORTGROUPS_HELP_DOCUMENT_GROUPS_LABEL="Group/s"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ID="Id"
COM_SUPPORTGROUPS_HELP_DOCUMENT_JOOMLA_ARTICLE="Joomla Article"
COM_SUPPORTGROUPS_HELP_DOCUMENT_LOCATION="Location"
COM_SUPPORTGROUPS_HELP_DOCUMENT_LOCATION_DESCRIPTION="Select the help target location."
COM_SUPPORTGROUPS_HELP_DOCUMENT_LOCATION_LABEL="Location"
COM_SUPPORTGROUPS_HELP_DOCUMENT_NEW="A New Help Document"
COM_SUPPORTGROUPS_HELP_DOCUMENT_NOT_REQUIRED="Not Required"
COM_SUPPORTGROUPS_HELP_DOCUMENT_ORDERING_LABEL="Ordering"
COM_SUPPORTGROUPS_HELP_DOCUMENT_PERMISSION="Permissions"
COM_SUPPORTGROUPS_HELP_DOCUMENT_PUBLISHING="Publishing"
COM_SUPPORTGROUPS_HELP_DOCUMENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Help Document to customise the alias."
COM_SUPPORTGROUPS_HELP_DOCUMENT_SELECT_AN_OPTION="Select an option"
COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE="Site"
COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW="Site View"
COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION="Select the view being targeted"
COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW_LABEL="Site Views"
COM_SUPPORTGROUPS_HELP_DOCUMENT_SOME="Some"
COM_SUPPORTGROUPS_HELP_DOCUMENT_STATUS="Status"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TARGET="Target"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TARGET_DESCRIPTION="Select the target option in relation to groups."
COM_SUPPORTGROUPS_HELP_DOCUMENT_TARGET_LABEL="Target Groups"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TEXT="Text"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TITLE="Title"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TITLE_DESCRIPTION="Enter Title Here"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TITLE_HINT="Title Here"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TITLE_LABEL="Title"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TYPE="Type"
COM_SUPPORTGROUPS_HELP_DOCUMENT_TYPE_DESCRIPTION="Select the help type."
COM_SUPPORTGROUPS_HELP_DOCUMENT_TYPE_LABEL="Type"
COM_SUPPORTGROUPS_HELP_DOCUMENT_URL="Url"
COM_SUPPORTGROUPS_HELP_DOCUMENT_URL_DESCRIPTION="Enter url"
COM_SUPPORTGROUPS_HELP_DOCUMENT_URL_HINT="http://www.example.com"
COM_SUPPORTGROUPS_HELP_DOCUMENT_URL_LABEL="URL"
COM_SUPPORTGROUPS_HELP_DOCUMENT_VERSION_DESC="A count of the number of times this Help Document has been revised."
COM_SUPPORTGROUPS_HELP_DOCUMENT_VERSION_LABEL="Revision"
COM_SUPPORTGROUPS_HELP_MANAGER="Help"
COM_SUPPORTGROUPS_IMPORT_CONTINUE="Continue"
COM_SUPPORTGROUPS_IMPORT_DATA="Import Data"
@ -266,9 +451,12 @@ COM_SUPPORTGROUPS_IMPORT_NO_IMPORT_TYPE_FOUND="Import type not found."
COM_SUPPORTGROUPS_IMPORT_PLEASE_SELECT_COLUMN="-- Please Select Column --"
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE="Select File"
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_DIRECTORY="Set the path to file"
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_CLINICS="Select the file to import data to clinics."
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_COUNTRIES="Select the file to import data to countries."
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_CURRENCIES="Select the file to import data to currencies."
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS="Select the file to import data to help_documents."
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_LOCATIONS="Select the file to import data to locations."
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_PAYMENTS="Select the file to import data to payments."
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_REGIONS="Select the file to import data to regions."
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_FOR_SUPPORT_GROUPS="Select the file to import data to support_groups."
COM_SUPPORTGROUPS_IMPORT_SELECT_FILE_URL="Enter file URL"
@ -284,18 +472,32 @@ COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE="- Keep Original State -"
COM_SUPPORTGROUPS_LICENSE="License"
COM_SUPPORTGROUPS_LOCATION="Location"
COM_SUPPORTGROUPS_LOCATIONS="Locations"
COM_SUPPORTGROUPS_LOCATIONS_ACCESS="Locations Access"
COM_SUPPORTGROUPS_LOCATIONS_ACCESS_DESC="Allows the users in this group to access access locations"
COM_SUPPORTGROUPS_LOCATIONS_BATCH_OPTIONS="Batch process the selected Locations"
COM_SUPPORTGROUPS_LOCATIONS_BATCH_TIP="All changes will be applied to all selected Locations"
COM_SUPPORTGROUPS_LOCATIONS_BATCH_USE="Locations Batch Use"
COM_SUPPORTGROUPS_LOCATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch locations"
COM_SUPPORTGROUPS_LOCATIONS_DASHBOARD_ADD="Locations Dashboard Add"
COM_SUPPORTGROUPS_LOCATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the location"
COM_SUPPORTGROUPS_LOCATIONS_CREATE="Locations Create"
COM_SUPPORTGROUPS_LOCATIONS_CREATE_DESC="Allows the users in this group to create create locations"
COM_SUPPORTGROUPS_LOCATIONS_DASHBOARD_LIST="Locations Dashboard List"
COM_SUPPORTGROUPS_LOCATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the location"
COM_SUPPORTGROUPS_LOCATIONS_DELETE="Locations Delete"
COM_SUPPORTGROUPS_LOCATIONS_DELETE_DESC="Allows the users in this group to delete delete locations"
COM_SUPPORTGROUPS_LOCATIONS_EDIT="Locations Edit"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_BY="Locations Edit Created By"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by locations"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_DATE="Locations Edit Created Date"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created locations"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_DESC="Allows the users in this group to edit the location"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_NAME="Locations Edit Name"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_NAME_DESC="Allows the users in this group to update the edit name of the location"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_OWN="Locations Edit Own"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_OWN_DESC="Allows the users in this group to edit edit own locations created by them"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_REGION="Locations Edit Region"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_REGION_DESC="Allows the users in this group to update the edit region of the location"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_STATE="Locations Edit State"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_STATE_DESC="Allows the users in this group to update the state of the location"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_VERSION="Locations Edit Version"
COM_SUPPORTGROUPS_LOCATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version locations"
COM_SUPPORTGROUPS_LOCATIONS_EXPORT="Locations Export"
@ -326,7 +528,6 @@ COM_SUPPORTGROUPS_LOCATION_CREATED_BY_DESC="The user that created the Location."
COM_SUPPORTGROUPS_LOCATION_CREATED_BY_LABEL="Created by"
COM_SUPPORTGROUPS_LOCATION_CREATED_DATE_DESC="The date Location was created."
COM_SUPPORTGROUPS_LOCATION_CREATED_DATE_LABEL="Created date"
COM_SUPPORTGROUPS_LOCATION_DETAILS="Details"
COM_SUPPORTGROUPS_LOCATION_EDIT="Editing the Location"
COM_SUPPORTGROUPS_LOCATION_ERROR_UNIQUE_ALIAS="Another Location has the same alias."
COM_SUPPORTGROUPS_LOCATION_ID="Id"
@ -344,25 +545,145 @@ COM_SUPPORTGROUPS_LOCATION_REGION="Region"
COM_SUPPORTGROUPS_LOCATION_REGION_DESCRIPTION="Please select the region this location belongs to."
COM_SUPPORTGROUPS_LOCATION_REGION_LABEL="Region"
COM_SUPPORTGROUPS_LOCATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Location to customise the alias."
COM_SUPPORTGROUPS_LOCATION_SETTINGS="Settings"
COM_SUPPORTGROUPS_LOCATION_STATUS="Status"
COM_SUPPORTGROUPS_LOCATION_SUPPORT_GROUPS="Support Groups"
COM_SUPPORTGROUPS_LOCATION_VERSION_DESC="A count of the number of times this Location has been revised."
COM_SUPPORTGROUPS_LOCATION_VERSION_LABEL="Revision"
COM_SUPPORTGROUPS_NEW="New"
COM_SUPPORTGROUPS_NO_ACCESS_GRANTED="No Access Granted!"
COM_SUPPORTGROUPS_PAYMENT="Payment"
COM_SUPPORTGROUPS_PAYMENTS="Payments"
COM_SUPPORTGROUPS_PAYMENTS_ACCESS="Payments Access"
COM_SUPPORTGROUPS_PAYMENTS_ACCESS_DESC="Allows the users in this group to access access payments"
COM_SUPPORTGROUPS_PAYMENTS_BATCH_OPTIONS="Batch process the selected Payments"
COM_SUPPORTGROUPS_PAYMENTS_BATCH_TIP="All changes will be applied to all selected Payments"
COM_SUPPORTGROUPS_PAYMENTS_BATCH_USE="Payments Batch Use"
COM_SUPPORTGROUPS_PAYMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch payments"
COM_SUPPORTGROUPS_PAYMENTS_CREATE="Payments Create"
COM_SUPPORTGROUPS_PAYMENTS_CREATE_DESC="Allows the users in this group to create create payments"
COM_SUPPORTGROUPS_PAYMENTS_DASHBOARD_ADD="Payments Dashboard Add"
COM_SUPPORTGROUPS_PAYMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the payment"
COM_SUPPORTGROUPS_PAYMENTS_DASHBOARD_LIST="Payments Dashboard List"
COM_SUPPORTGROUPS_PAYMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the payment"
COM_SUPPORTGROUPS_PAYMENTS_DELETE="Payments Delete"
COM_SUPPORTGROUPS_PAYMENTS_DELETE_DESC="Allows the users in this group to delete delete payments"
COM_SUPPORTGROUPS_PAYMENTS_EDIT="Payments Edit"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_AMOUNT="Payments Edit Amount"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_AMOUNT_DESC="Allows the users in this group to update the edit amount of the payment"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_BY="Payments Edit Created By"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by payments"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_DATE="Payments Edit Created Date"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created payments"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_DESC="Allows the users in this group to edit the payment"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_OWN="Payments Edit Own"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_OWN_DESC="Allows the users in this group to edit edit own payments created by them"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_STATE="Payments Edit State"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_STATE_DESC="Allows the users in this group to update the state of the payment"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_SUPPORT_GROUP="Payments Edit Support Group"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_SUPPORT_GROUP_DESC="Allows the users in this group to update the edit support group of the payment"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_VERSION="Payments Edit Version"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version payments"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_YEAR="Payments Edit Year"
COM_SUPPORTGROUPS_PAYMENTS_EDIT_YEAR_DESC="Allows the users in this group to update the edit year of the payment"
COM_SUPPORTGROUPS_PAYMENTS_EXPORT="Payments Export"
COM_SUPPORTGROUPS_PAYMENTS_EXPORT_DESC="Allows the users in this group to export export payments"
COM_SUPPORTGROUPS_PAYMENTS_IMPORT="Payments Import"
COM_SUPPORTGROUPS_PAYMENTS_IMPORT_DESC="Allows the users in this group to import import payments"
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_ARCHIVED="%s Payments archived."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_ARCHIVED_1="%s Payment archived."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_CHECKED_IN_0="No Payment successfully checked in."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_CHECKED_IN_1="%d Payment successfully checked in."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_CHECKED_IN_MORE="%d Payments successfully checked in."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_DELETED="%s Payments deleted."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_DELETED_1="%s Payment deleted."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_FEATURED="%s Payments featured."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_FEATURED_1="%s Payment featured."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_PUBLISHED="%s Payments published."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_PUBLISHED_1="%s Payment published."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_TRASHED="%s Payments trashed."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_TRASHED_1="%s Payment trashed."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_UNFEATURED="%s Payments unfeatured."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_UNFEATURED_1="%s Payment unfeatured."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_UNPUBLISHED="%s Payments unpublished."
COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_UNPUBLISHED_1="%s Payment unpublished."
COM_SUPPORTGROUPS_PAYMENTS_SUBMENU="Payments Submenu"
COM_SUPPORTGROUPS_PAYMENTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the payment"
COM_SUPPORTGROUPS_PAYMENT_AMOUNT="Amount"
COM_SUPPORTGROUPS_PAYMENT_AMOUNT_DESCRIPTION="The amount paid in this support group."
COM_SUPPORTGROUPS_PAYMENT_AMOUNT_HINT="Only Numbers & dot"
COM_SUPPORTGROUPS_PAYMENT_AMOUNT_LABEL="Amount"
COM_SUPPORTGROUPS_PAYMENT_CREATED_BY_DESC="The user that created the Payment."
COM_SUPPORTGROUPS_PAYMENT_CREATED_BY_LABEL="Created by"
COM_SUPPORTGROUPS_PAYMENT_CREATED_DATE_DESC="The date Payment was created."
COM_SUPPORTGROUPS_PAYMENT_CREATED_DATE_LABEL="Created date"
COM_SUPPORTGROUPS_PAYMENT_DETAILS="Details"
COM_SUPPORTGROUPS_PAYMENT_EDIT="Editing the Payment"
COM_SUPPORTGROUPS_PAYMENT_ERROR_UNIQUE_ALIAS="Another Payment has the same alias."
COM_SUPPORTGROUPS_PAYMENT_ID="Id"
COM_SUPPORTGROUPS_PAYMENT_NEW="A New Payment"
COM_SUPPORTGROUPS_PAYMENT_ORDERING_LABEL="Ordering"
COM_SUPPORTGROUPS_PAYMENT_PERMISSION="Permissions"
COM_SUPPORTGROUPS_PAYMENT_PUBLISHING="Publishing"
COM_SUPPORTGROUPS_PAYMENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Payment to customise the alias."
COM_SUPPORTGROUPS_PAYMENT_SELECT_A_YEAR="Select a year"
COM_SUPPORTGROUPS_PAYMENT_STATUS="Status"
COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP="Support Group"
COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_DESCRIPTION="Please select the support group this payment is from."
COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_LABEL="Support Group"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_EIGHTEEN="2018"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_ELEVEN="2011"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_FIFTEEN="2015"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_FOURTEEN="2014"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_NINETEEN="2019"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_SEVENTEEN="2017"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_SIXTEEN="2016"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TEN="2010"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_THIRTEEN="2013"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_THIRTY="2030"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWELVE="2012"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY="2020"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_EIGHT="2028"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_FIVE="2025"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_FOUR="2024"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_NINE="2029"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_ONE="2021"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_SEVEN="2027"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_SIX="2026"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_THREE="2023"
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_TWO="2022"
COM_SUPPORTGROUPS_PAYMENT_VERSION_DESC="A count of the number of times this Payment has been revised."
COM_SUPPORTGROUPS_PAYMENT_VERSION_LABEL="Revision"
COM_SUPPORTGROUPS_PAYMENT_YEAR="Year"
COM_SUPPORTGROUPS_PAYMENT_YEAR_LABEL="Year"
COM_SUPPORTGROUPS_REGION="Region"
COM_SUPPORTGROUPS_REGIONS="Regions"
COM_SUPPORTGROUPS_REGIONS_ACCESS="Regions Access"
COM_SUPPORTGROUPS_REGIONS_ACCESS_DESC="Allows the users in this group to access access regions"
COM_SUPPORTGROUPS_REGIONS_BATCH_OPTIONS="Batch process the selected Regions"
COM_SUPPORTGROUPS_REGIONS_BATCH_TIP="All changes will be applied to all selected Regions"
COM_SUPPORTGROUPS_REGIONS_BATCH_USE="Regions Batch Use"
COM_SUPPORTGROUPS_REGIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch regions"
COM_SUPPORTGROUPS_REGIONS_DASHBOARD_ADD="Regions Dashboard Add"
COM_SUPPORTGROUPS_REGIONS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the region"
COM_SUPPORTGROUPS_REGIONS_CREATE="Regions Create"
COM_SUPPORTGROUPS_REGIONS_CREATE_DESC="Allows the users in this group to create create regions"
COM_SUPPORTGROUPS_REGIONS_DASHBOARD_LIST="Regions Dashboard List"
COM_SUPPORTGROUPS_REGIONS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the region"
COM_SUPPORTGROUPS_REGIONS_DELETE="Regions Delete"
COM_SUPPORTGROUPS_REGIONS_DELETE_DESC="Allows the users in this group to delete delete regions"
COM_SUPPORTGROUPS_REGIONS_EDIT="Regions Edit"
COM_SUPPORTGROUPS_REGIONS_EDIT_COUNTRY="Regions Edit Country"
COM_SUPPORTGROUPS_REGIONS_EDIT_COUNTRY_DESC="Allows the users in this group to update the edit country of the region"
COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_BY="Regions Edit Created By"
COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by regions"
COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_DATE="Regions Edit Created Date"
COM_SUPPORTGROUPS_REGIONS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created regions"
COM_SUPPORTGROUPS_REGIONS_EDIT_DESC="Allows the users in this group to edit the region"
COM_SUPPORTGROUPS_REGIONS_EDIT_NAME="Regions Edit Name"
COM_SUPPORTGROUPS_REGIONS_EDIT_NAME_DESC="Allows the users in this group to update the edit name of the region"
COM_SUPPORTGROUPS_REGIONS_EDIT_OWN="Regions Edit Own"
COM_SUPPORTGROUPS_REGIONS_EDIT_OWN_DESC="Allows the users in this group to edit edit own regions created by them"
COM_SUPPORTGROUPS_REGIONS_EDIT_STATE="Regions Edit State"
COM_SUPPORTGROUPS_REGIONS_EDIT_STATE_DESC="Allows the users in this group to update the state of the region"
COM_SUPPORTGROUPS_REGIONS_EDIT_VERSION="Regions Edit Version"
COM_SUPPORTGROUPS_REGIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version regions"
COM_SUPPORTGROUPS_REGIONS_EXPORT="Regions Export"
@ -395,10 +716,10 @@ COM_SUPPORTGROUPS_REGION_CREATED_BY_DESC="The user that created the Region."
COM_SUPPORTGROUPS_REGION_CREATED_BY_LABEL="Created by"
COM_SUPPORTGROUPS_REGION_CREATED_DATE_DESC="The date Region was created."
COM_SUPPORTGROUPS_REGION_CREATED_DATE_LABEL="Created date"
COM_SUPPORTGROUPS_REGION_DETAILS="Details"
COM_SUPPORTGROUPS_REGION_EDIT="Editing the Region"
COM_SUPPORTGROUPS_REGION_ERROR_UNIQUE_ALIAS="Another Region has the same alias."
COM_SUPPORTGROUPS_REGION_ID="Id"
COM_SUPPORTGROUPS_REGION_LOCATIONS="Locations"
COM_SUPPORTGROUPS_REGION_NAME="Name"
COM_SUPPORTGROUPS_REGION_NAME_DESCRIPTION="Enter Name Here"
COM_SUPPORTGROUPS_REGION_NAME_HINT="Name Here"
@ -408,29 +729,65 @@ COM_SUPPORTGROUPS_REGION_ORDERING_LABEL="Ordering"
COM_SUPPORTGROUPS_REGION_PERMISSION="Permissions"
COM_SUPPORTGROUPS_REGION_PUBLISHING="Publishing"
COM_SUPPORTGROUPS_REGION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Region to customise the alias."
COM_SUPPORTGROUPS_REGION_SETTINGS="Settings"
COM_SUPPORTGROUPS_REGION_STATUS="Status"
COM_SUPPORTGROUPS_REGION_VERSION_DESC="A count of the number of times this Region has been revised."
COM_SUPPORTGROUPS_REGION_VERSION_LABEL="Revision"
COM_SUPPORTGROUPS_SAVE_SUCCESS="Great! Item successfully saved."
COM_SUPPORTGROUPS_SAVE_WARNING="The value already existed so please select another."
COM_SUPPORTGROUPS_SUBMENU_CLINICS="Clinics"
COM_SUPPORTGROUPS_SUBMENU_COUNTRIES="Countries"
COM_SUPPORTGROUPS_SUBMENU_CURRENCIES="Currencies"
COM_SUPPORTGROUPS_SUBMENU_DASHBOARD="Dashboard"
COM_SUPPORTGROUPS_SUBMENU_HELP_DOCUMENTS="Help Documents"
COM_SUPPORTGROUPS_SUBMENU_LOCATIONS="Locations"
COM_SUPPORTGROUPS_SUBMENU_PAYMENTS="Payments"
COM_SUPPORTGROUPS_SUBMENU_REGIONS="Regions"
COM_SUPPORTGROUPS_SUBMENU_SUPPORT_GROUPS="Support Groups"
COM_SUPPORTGROUPS_SUPPORT_GROUP="Support Group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS="Support Groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_ACCESS="Support Groups Access"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_ACCESS_DESC="Allows the users in this group to access access support groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_BATCH_OPTIONS="Batch process the selected Support Groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_BATCH_TIP="All changes will be applied to all selected Support Groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_BATCH_USE="Support Groups Batch Use"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch support groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_CREATE="Support Groups Create"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_CREATE_DESC="Allows the users in this group to create create support groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_DASHBOARD_ADD="Support Groups Dashboard Add"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_DASHBOARD_LIST="Support Groups Dashboard List"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_DELETE="Support Groups Delete"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_DELETE_DESC="Allows the users in this group to delete delete support groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT="Support Groups Edit"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CLINIC="Support Groups Edit Clinic"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CLINIC_DESC="Allows the users in this group to update the edit clinic of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_BY="Support Groups Edit Created By"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by support groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_DATE="Support Groups Edit Created Date"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created support groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_DESC="Allows the users in this group to edit the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE="Support Groups Edit Female"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_ART="Support Groups Edit Female Art"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_ART_DESC="Allows the users in this group to update the edit female art of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_FEMALE_DESC="Allows the users in this group to update the edit female of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_LOCATION="Support Groups Edit Location"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_LOCATION_DESC="Allows the users in this group to update the edit location of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE="Support Groups Edit Male"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_ART="Support Groups Edit Male Art"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_ART_DESC="Allows the users in this group to update the edit male art of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_CHILDREN="Support Groups Edit Male Children"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_CHILDREN_DESC="Allows the users in this group to update the edit male children of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_MALE_DESC="Allows the users in this group to update the edit male of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_NAME="Support Groups Edit Name"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_NAME_DESC="Allows the users in this group to update the edit name of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_OWN="Support Groups Edit Own"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_OWN_DESC="Allows the users in this group to edit edit own support groups created by them"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_PHONE="Support Groups Edit Phone"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_PHONE_DESC="Allows the users in this group to update the edit phone of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_STATE="Support Groups Edit State"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_STATE_DESC="Allows the users in this group to update the state of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_VERSION="Support Groups Edit Version"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version support groups"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_EXPORT="Support Groups Export"
@ -456,6 +813,10 @@ COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_UNPUBLISHED="%s Support Groups unpublis
COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_UNPUBLISHED_1="%s Support Group unpublished."
COM_SUPPORTGROUPS_SUPPORT_GROUPS_SUBMENU="Support Groups Submenu"
COM_SUPPORTGROUPS_SUPPORT_GROUPS_SUBMENU_DESC="Allows the users in this group to update the submenu of the support group"
COM_SUPPORTGROUPS_SUPPORT_GROUP_AREA="Area"
COM_SUPPORTGROUPS_SUPPORT_GROUP_CLINIC="Clinic"
COM_SUPPORTGROUPS_SUPPORT_GROUP_CLINIC_DESCRIPTION="Please select the nearest clinic."
COM_SUPPORTGROUPS_SUPPORT_GROUP_CLINIC_LABEL="Clinic"
COM_SUPPORTGROUPS_SUPPORT_GROUP_CREATED_BY_DESC="The user that created the Support Group."
COM_SUPPORTGROUPS_SUPPORT_GROUP_CREATED_BY_LABEL="Created by"
COM_SUPPORTGROUPS_SUPPORT_GROUP_CREATED_DATE_DESC="The date Support Group was created."
@ -463,14 +824,46 @@ COM_SUPPORTGROUPS_SUPPORT_GROUP_CREATED_DATE_LABEL="Created date"
COM_SUPPORTGROUPS_SUPPORT_GROUP_DETAILS="Details"
COM_SUPPORTGROUPS_SUPPORT_GROUP_EDIT="Editing the Support Group"
COM_SUPPORTGROUPS_SUPPORT_GROUP_ERROR_UNIQUE_ALIAS="Another Support Group has the same alias."
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE="Female"
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_ART="Female Art"
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_ART_DESCRIPTION="The number of female members on ART in this support group."
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_ART_HINT="Only Numbers"
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_ART_LABEL="Females on ART"
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_CHILDREN="Female Children"
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_CHILDREN_DESCRIPTION="The number of female members between the age of 5 and 14 years in this support group."
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_CHILDREN_HINT="Only Numbers"
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_CHILDREN_LABEL="Females (5-14)"
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_DESCRIPTION="The number of female members in this support group."
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_HINT="Only Numbers"
COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_LABEL="Females"
COM_SUPPORTGROUPS_SUPPORT_GROUP_ID="Id"
COM_SUPPORTGROUPS_SUPPORT_GROUP_LOCATION="Location"
COM_SUPPORTGROUPS_SUPPORT_GROUP_LOCATION_DESCRIPTION="Please select the location this support_group belongs to."
COM_SUPPORTGROUPS_SUPPORT_GROUP_LOCATION_LABEL="Location"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE="Male"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_ART="Male Art"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_ART_DESCRIPTION="The number of male members on ART in this support group."
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_ART_HINT="Only Numbers"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_ART_LABEL="Males on ART"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_CHILDREN="Male Children"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_CHILDREN_DESCRIPTION="The number of male members between the age of 5 and 14 years in this support group."
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_CHILDREN_HINT="Only Numbers"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_CHILDREN_LABEL="Males (5-14)"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_DESCRIPTION="The number of male members in this support group."
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_HINT="Only Numbers"
COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_LABEL="Males"
COM_SUPPORTGROUPS_SUPPORT_GROUP_NAME="Name"
COM_SUPPORTGROUPS_SUPPORT_GROUP_NAME_DESCRIPTION="Enter Name Here"
COM_SUPPORTGROUPS_SUPPORT_GROUP_NAME_HINT="Name Here"
COM_SUPPORTGROUPS_SUPPORT_GROUP_NAME_LABEL="Name"
COM_SUPPORTGROUPS_SUPPORT_GROUP_NEW="A New Support Group"
COM_SUPPORTGROUPS_SUPPORT_GROUP_ORDERING_LABEL="Ordering"
COM_SUPPORTGROUPS_SUPPORT_GROUP_PAYMENTS="Payments"
COM_SUPPORTGROUPS_SUPPORT_GROUP_PERMISSION="Permissions"
COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE="Phone"
COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE_DESCRIPTION="The phone number of the contact person."
COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE_HINT="Phone Number Here!"
COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE_LABEL="Phone Number"
COM_SUPPORTGROUPS_SUPPORT_GROUP_PUBLISHING="Publishing"
COM_SUPPORTGROUPS_SUPPORT_GROUP_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Support Group to customise the alias."
COM_SUPPORTGROUPS_SUPPORT_GROUP_STATUS="Status"

View File

@ -1,6 +1,8 @@
COM_SUPPORTGROUPS="Support Groups"
COM_SUPPORTGROUPS_CONFIGURATION="Support Groups Configuration"
COM_SUPPORTGROUPS_MENU="&#187; Support Groups"
COM_SUPPORTGROUPS_MENU_CLINICS="Clinics"
COM_SUPPORTGROUPS_MENU_LOCATIONS="Locations"
COM_SUPPORTGROUPS_MENU_PAYMENTS="Payments"
COM_SUPPORTGROUPS_MENU_REGIONS="Regions"
COM_SUPPORTGROUPS_MENU_SUPPORT_GROUPS="Support Groups"

View File

@ -31,7 +31,7 @@ $form = $displayData->getForm();
$fields = array(
'name',
'region'
'phone'
);
?>

View File

@ -30,8 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'note_set_area',
'area'
'note_set_area'
);
?>

View File

@ -0,0 +1,41 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_under.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'area'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,56 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage metadata.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
// JLayout for standard handling of metadata fields in the administrator content edit screens.
$fieldSets = $form->getFieldsets('metadata');
?>
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php
// Include the real fields in this panel.
if ($name == 'vdmmetadata')
{
echo $form->renderField('metadesc');
echo $form->renderField('metakey');
}
foreach ($form->getFieldset($name) as $field)
{
if ($field->name != 'jform[metadata][tags][]')
{
echo $field->renderField();
}
} ?>
<?php endforeach; ?>

View File

@ -0,0 +1,64 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage publishing.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'created',
'created_by',
'modified',
'modified_by',
'published',
'ordering',
'access',
'version',
'hits',
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -28,7 +28,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->vvvregions;
$items = $displayData->vvyregions;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_supportgroups&view=regions&task=region.edit";
@ -38,7 +38,7 @@ $can = SupportgroupsHelper::getActions('region');
?>
<div class="form-vertical">
<?php if ($can->get('core.create')): ?>
<?php if ($can->get('region.create')): ?>
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_SUPPORTGROUPS_NEW'); ?></a><br /><br />
<?php endif; ?>
<?php if (SupportgroupsHelper::checkArray($items)): ?>
@ -68,7 +68,7 @@ $can = SupportgroupsHelper::getActions('region');
?>
<tr>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<?php if ($canDo->get('region.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=country&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'regions.', $canCheckin); ?>

View File

@ -0,0 +1,42 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_above.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'title',
'alias'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -0,0 +1,48 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_fullwidth.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'content'
);
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@ -0,0 +1,58 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_left.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'target',
'groups',
'location',
'admin_view',
'site_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,56 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_right.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'type',
'url',
'article'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,41 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_under.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'not_required'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,58 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage publishing.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,60 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage publlshing.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'published',
'ordering',
'access',
'version',
'hits',
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,42 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage settings_above.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'name',
'region'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -0,0 +1,49 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage settings_fullwidth.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'note_set_area',
'area'
);
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@ -0,0 +1,155 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage support_groups_fullwidth.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->vvwsupport_groups;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_supportgroups&view=support_groups&task=support_group.edit";
$ref = ($id) ? "&ref=location&refid=".$id : "";
$new = "index.php?option=com_supportgroups&view=support_group&layout=edit".$ref;
$can = SupportgroupsHelper::getActions('support_group');
?>
<div class="form-vertical">
<?php if ($can->get('support_group.create')): ?>
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_SUPPORTGROUPS_NEW'); ?></a><br /><br />
<?php endif; ?>
<?php if (SupportgroupsHelper::checkArray($items)): ?>
<table class="footable table data support_groups metro-blue" data-filter="#filter_support_groups" data-page-size="20">
<thead>
<tr>
<th data-toggle="true">
<?php echo JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_NAME_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_LOCATION_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_CLINIC_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_ID'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = SupportgroupsHelper::getActions('support_group',$item,'support_groups');
?>
<tr>
<td class="nowrap">
<?php if ($canDo->get('support_group.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=location&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'support_groups.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->name); ?></div>
<?php endif; ?>
</td>
<td>
<?php echo $displayData->escape($item->phone); ?>
</td>
<td>
<?php echo $displayData->escape($item->location_name); ?>
</td>
<td class="nowrap">
<?php if ($user->authorise('clinic.edit', 'com_supportgroups.clinic.' . (int)$item->clinic)): ?>
<a href="index.php?option=com_supportgroups&view=clinics&task=clinic.edit&id=<?php echo $item->clinic; ?>&ref=location&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->clinic_name); ?></a>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->clinic_name); ?></div>
<?php endif; ?>
</td>
<td>
<?php echo $displayData->escape($item->male); ?>
</td>
<td>
<?php echo $displayData->escape($item->female); ?>
</td>
<?php if ($item->published == 1):?>
<td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('PUBLISHED'); ?>">
<?php echo JText::_('PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0):?>
<td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('INACTIVE'); ?>">
<?php echo JText::_('INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2):?>
<td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('ARCHIVED'); ?>">
<?php echo JText::_('ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2):?>
<td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('ARCHIVED'); ?>">
<?php echo JText::_('ARCHIVED'); ?>
</span>
</td>
<?php endif; ?>
<td class="nowrap center hidden-phone">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot class="hide-if-no-paging">
<tr>
<td colspan="8">
<div class="pagination pagination-centered"></div>
</td>
</tr>
</tfoot>
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,41 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_above.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'support_group'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'name'
'year'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'country'
'amount'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,58 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage publishing.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,60 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage publlshing.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'published',
'ordering',
'access',
'version',
'hits',
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,127 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage locations_fullwidth.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->vvxlocations;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_supportgroups&view=locations&task=location.edit";
$ref = ($id) ? "&ref=region&refid=".$id : "";
$new = "index.php?option=com_supportgroups&view=location&layout=edit".$ref;
$can = SupportgroupsHelper::getActions('location');
?>
<div class="form-vertical">
<?php if ($can->get('location.create')): ?>
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_SUPPORTGROUPS_NEW'); ?></a><br /><br />
<?php endif; ?>
<?php if (SupportgroupsHelper::checkArray($items)): ?>
<table class="footable table data locations metro-blue" data-filter="#filter_locations" data-page-size="20">
<thead>
<tr>
<th data-toggle="true">
<?php echo JText::_('COM_SUPPORTGROUPS_LOCATION_NAME_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SUPPORTGROUPS_LOCATION_REGION_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_LOCATION_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_LOCATION_ID'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = SupportgroupsHelper::getActions('location',$item,'locations');
?>
<tr>
<td class="nowrap">
<?php if ($canDo->get('location.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=region&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'locations.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->name); ?></div>
<?php endif; ?>
</td>
<td>
<?php echo $displayData->escape($item->region_name); ?>
</td>
<?php if ($item->published == 1):?>
<td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('PUBLISHED'); ?>">
<?php echo JText::_('PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0):?>
<td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('INACTIVE'); ?>">
<?php echo JText::_('INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2):?>
<td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('ARCHIVED'); ?>">
<?php echo JText::_('ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2):?>
<td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('ARCHIVED'); ?>">
<?php echo JText::_('ARCHIVED'); ?>
</span>
</td>
<?php endif; ?>
<td class="nowrap center hidden-phone">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot class="hide-if-no-paging">
<tr>
<td colspan="4">
<div class="pagination pagination-centered"></div>
</td>
</tr>
</tfoot>
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,54 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage settings_left.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'name'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,54 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage settings_right.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'country'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,41 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_above.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'name'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -30,7 +30,9 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'name'
'phone',
'location',
'clinic'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -0,0 +1,59 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_right.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'male',
'male_children',
'male_art',
'female',
'female_children',
'female_art'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,41 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage details_under.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'area'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -0,0 +1,133 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payments_fullwidth.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->vvvpayments;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_supportgroups&view=payments&task=payment.edit";
$ref = ($id) ? "&ref=support_group&refid=".$id : "";
$new = "index.php?option=com_supportgroups&view=payment&layout=edit".$ref;
$can = SupportgroupsHelper::getActions('payment');
?>
<div class="form-vertical">
<?php if ($can->get('payment.create')): ?>
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_SUPPORTGROUPS_NEW'); ?></a><br /><br />
<?php endif; ?>
<?php if (SupportgroupsHelper::checkArray($items)): ?>
<table class="footable table data payments metro-blue" data-filter="#filter_payments" data-page-size="20">
<thead>
<tr>
<th data-toggle="true">
<?php echo JText::_('COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SUPPORTGROUPS_PAYMENT_YEAR_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SUPPORTGROUPS_PAYMENT_AMOUNT_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_PAYMENT_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SUPPORTGROUPS_PAYMENT_ID'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = SupportgroupsHelper::getActions('payment',$item,'payments');
?>
<tr>
<td class="nowrap">
<?php if ($canDo->get('payment.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=support_group&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->support_group_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'payments.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->support_group_name); ?></div>
<?php endif; ?>
</td>
<td>
<?php echo JText::_($item->year); ?>
</td>
<td>
<?php echo $displayData->escape($item->amount); ?>
</td>
<?php if ($item->published == 1):?>
<td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('PUBLISHED'); ?>">
<?php echo JText::_('PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0):?>
<td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('INACTIVE'); ?>">
<?php echo JText::_('INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2):?>
<td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('ARCHIVED'); ?>">
<?php echo JText::_('ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2):?>
<td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('ARCHIVED'); ?>">
<?php echo JText::_('ARCHIVED'); ?>
</span>
</td>
<?php endif; ?>
<td class="nowrap center hidden-phone">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot class="hide-if-no-paging">
<tr>
<td colspan="5">
<div class="pagination pagination-centered"></div>
</td>
</tr>
</tfoot>
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

888
admin/models/clinic.php Normal file
View File

@ -0,0 +1,888 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinic.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
// import Joomla modelform library
jimport('joomla.application.component.modeladmin');
/**
* Supportgroups Clinic Model
*/
class SupportgroupsModelClinic extends JModelAdmin
{
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_SUPPORTGROUPS';
/**
* The type alias for this content type.
*
* @var string
* @since 3.2
*/
public $typeAlias = 'com_supportgroups.clinic';
/**
* Returns a Table object, always creating it
*
* @param type $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
*
* @since 1.6
*/
public function getTable($type = 'clinic', $prefix = 'SupportgroupsTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
}
/**
* Method to get a single record.
*
* @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
*
* @since 1.6
*/
public function getItem($pk = null)
{
if ($item = parent::getItem($pk))
{
if (!empty($item->params))
{
// Convert the params field to an array.
$registry = new Registry;
$registry->loadString($item->params);
$item->params = $registry->toArray();
}
if (!empty($item->metadata))
{
// Convert the metadata field to an array.
$registry = new Registry;
$registry->loadString($item->metadata);
$item->metadata = $registry->toArray();
}
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_supportgroups.clinic');
}
}
return $item;
}
/**
* Method to get the record form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return mixed A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // Get the form.
$form = $this->loadForm('com_supportgroups.clinic', 'clinic', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
{
return false;
}
$jinput = JFactory::getApplication()->input;
// The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
}
$user = JFactory::getUser();
// Check for existing item.
// Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('clinic.edit.state', 'com_supportgroups.clinic.' . (int) $id))
|| ($id == 0 && !$user->authorise('clinic.edit.state', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// If this is a new item insure the greated by is set.
if (0 == $id)
{
// Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('clinic.edit.created_by', 'com_supportgroups.clinic.' . (int) $id))
|| ($id == 0 && !$user->authorise('clinic.edit.created_by', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('clinic.edit.created', 'com_supportgroups.clinic.' . (int) $id))
|| ($id == 0 && !$user->authorise('clinic.edit.created', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// Modify the form based on Edit Name access controls.
if ($id != 0 && (!$user->authorise('clinic.edit.name', 'com_supportgroups.clinic.' . (int) $id))
|| ($id == 0 && !$user->authorise('clinic.edit.name', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('name', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('name', 'readonly', 'true');
if (!$form->getValue('name'))
{
// Disable fields while saving.
$form->setFieldAttribute('name', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('name', 'required', 'false');
}
}
// Modify the form based on Edit Phone access controls.
if ($id != 0 && (!$user->authorise('clinic.edit.phone', 'com_supportgroups.clinic.' . (int) $id))
|| ($id == 0 && !$user->authorise('clinic.edit.phone', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('phone', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('phone', 'readonly', 'true');
if (!$form->getValue('phone'))
{
// Disable fields while saving.
$form->setFieldAttribute('phone', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('phone', 'required', 'false');
}
}
// Modify the form based on Edit Note Set Area access controls.
if ($id != 0 && (!$user->authorise('clinic.edit.note_set_area', 'com_supportgroups.clinic.' . (int) $id))
|| ($id == 0 && !$user->authorise('clinic.edit.note_set_area', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('note_set_area', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('note_set_area', 'readonly', 'true');
if (!$form->getValue('note_set_area'))
{
// Disable fields while saving.
$form->setFieldAttribute('note_set_area', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('note_set_area', 'required', 'false');
}
}
// Only load these values if no id is found
if (0 == $id)
{
// Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
return $form;
}
/**
* Method to get the script that have to be included on the form
*
* @return string script files
*/
public function getScript()
{
return 'administrator/components/com_supportgroups/models/forms/clinic.js';
}
/**
* Method to test whether a record can be deleted.
*
* @param object $record A record object.
*
* @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canDelete($record)
{
if (!empty($record->id))
{
if ($record->published != -2)
{
return;
}
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
return $user->authorise('clinic.delete', 'com_supportgroups.clinic.' . (int) $record->id);
}
return false;
}
/**
* Method to test whether a record can have its state edited.
*
* @param object $record A record object.
*
* @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canEditState($record)
{
$user = JFactory::getUser();
$recordId = (!empty($record->id)) ? $record->id : 0;
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('clinic.edit.state', 'com_supportgroups.clinic.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('clinic.edit.state', 'com_supportgroups');
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
* @since 2.5
*/
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('clinic.edit', 'com_supportgroups.clinic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('clinic.edit', 'com_supportgroups');
}
/**
* Prepare and sanitise the table data prior to saving.
*
* @param JTable $table A JTable object.
*
* @return void
*
* @since 1.6
*/
protected function prepareTable($table)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if (isset($table->name))
{
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
}
if (isset($table->alias) && empty($table->alias))
{
$table->generateAlias();
}
if (empty($table->id))
{
$table->created = $date->toSql();
// set the user
if ($table->created_by == 0 || empty($table->created_by))
{
$table->created_by = $user->id;
}
// Set ordering to the last item if not set
if (empty($table->ordering))
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('MAX(ordering)')
->from($db->quoteName('#__supportgroups_clinic'));
$db->setQuery($query);
$max = $db->loadResult();
$table->ordering = $max + 1;
}
}
else
{
$table->modified = $date->toSql();
$table->modified_by = $user->id;
}
if (!empty($table->id))
{
// Increment the items version number.
$table->version++;
}
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_supportgroups.edit.clinic.data', array());
if (empty($data))
{
$data = $this->getItem();
}
return $data;
}
/**
* Method to get the unique fields of this table.
*
* @return mixed An array of field names, boolean false if none is set.
*
* @since 3.0
*/
protected function getUniqeFields()
{
return false;
}
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
* @since 12.2
*/
public function delete(&$pks)
{
if (!parent::delete($pks))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*
* @param array $commands An array of commands to perform.
* @param array $pks An array of item ids.
* @param array $contexts An array of item contexts.
*
* @return boolean Returns true on success, false on failure.
*
* @since 12.2
*/
public function batch($commands, $pks, $contexts)
{
// Sanitize ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true))
{
unset($pks[array_search(0, $pks, true)]);
}
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
$done = false;
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('clinic');
$this->batchSet = true;
if (!$this->canDo->get('core.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
if ($this->type == false)
{
$type = new JUcmType;
$this->type = $type->getTypeByAlias($this->typeAlias);
}
$this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags');
if (!empty($commands['move_copy']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c')
{
$result = $this->batchCopy($commands, $pks, $contexts);
if (is_array($result))
{
foreach ($result as $old => $new)
{
$contexts[$new] = $contexts[$old];
}
$pks = array_values($result);
}
else
{
return false;
}
}
elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts))
{
return false;
}
$done = true;
}
if (!$done)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
// Clear the cache
$this->cleanCache();
return true;
}
/**
* Batch copy items to a new category or current.
*
* @param integer $values The new values.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return mixed An array of new IDs on success, boolean false on failure.
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('clinic');
}
if (!$this->canDo->get('clinic.create') && !$this->canDo->get('clinic.batch'))
{
return false;
}
// get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// remove move_copy from array
unset($values['move_copy']);
// make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
}
elseif (isset($values['published']) && !$this->canDo->get('clinic.edit.state'))
{
$values['published'] = 0;
}
$newIds = array();
// Parent exists so let's proceed
while (!empty($pks))
{
// Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// only allow copy if user may edit this item.
if (!$this->user->authorise('clinic.edit', $contexts[$pk]))
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
$this->table->name = $this->generateUniqe('name',$this->table->name);
// insert all set values
if (SupportgroupsHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
if (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// update all uniqe fields
if (SupportgroupsHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField);
}
}
// Reset the ID because we are making a copy
$this->table->id = 0;
// TODO: Deal with ordering?
// $this->table->ordering = 1;
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
// Get the new item ID
$newId = $this->table->get('id');
// Add the new ID to the array
$newIds[$pk] = $newId;
}
// Clean the cache
$this->cleanCache();
return $newIds;
}
/**
* Batch move items to a new category
*
* @param integer $value The new category ID.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('clinic');
}
if (!$this->canDo->get('clinic.edit') && !$this->canDo->get('clinic.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('clinic.edit.state'))
{
unset($values['published']);
}
// remove move_copy from array
unset($values['move_copy']);
// Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('clinic.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// insert all set values.
if (SupportgroupsHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
}
elseif (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
}
// Clean the cache
$this->cleanCache();
return true;
}
/**
* Method to save the form data.
*
* @param array $data The form data.
*
* @return boolean True on success.
*
* @since 1.6
*/
public function save($data)
{
$input = JFactory::getApplication()->input;
$filter = JFilterInput::getInstance();
// set the metadata to the Item Data
if (isset($data['metadata']) && isset($data['metadata']['author']))
{
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{
$params = new JRegistry;
$params->loadArray($data['params']);
$data['params'] = (string) $params;
}
// Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SupportgroupsHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]);
}
}
}
if (parent::save($data))
{
return true;
}
return false;
}
/**
* Method to generate a uniqe value.
*
* @param string $field name.
* @param string $value data.
*
* @return string New value.
*
* @since 3.0
*/
protected function generateUniqe($field,$value)
{
// set field value uniqe
$table = $this->getTable();
while ($table->load(array($field => $value)))
{
$value = JString::increment($value);
}
return $value;
}
/**
* Method to change the title & alias.
*
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($title)
{
// Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))
{
$title = JString::increment($title);
}
return $title;
}
}

373
admin/models/clinics.php Normal file
View File

@ -0,0 +1,373 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinics.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the Joomla modellist library
jimport('joomla.application.component.modellist');
/**
* Clinics Model
*/
class SupportgroupsModelClinics extends JModelList
{
public function __construct($config = array())
{
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.name','name',
'a.phone','phone'
);
}
parent::__construct($config);
}
/**
* Method to auto-populate the model state.
*
* @return void
*/
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
}
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$phone = $this->getUserStateFromRequest($this->context . '.filter.phone', 'filter_phone');
$this->setState('filter.phone', $phone);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
$this->setState('filter.created_by', $created_by);
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
$this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
}
/**
* Method to get an array of data items.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
// check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('clinic.access', 'com_supportgroups.clinic.' . (int) $item->id) && $user->authorise('clinic.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// return items
return $items;
}
/**
* Method to build an SQL query to load the list data.
*
* @return string An SQL query
*/
protected function getListQuery()
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_item table
$query->from($db->quoteName('#__supportgroups_clinic', 'a'));
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.published = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.published = 0 OR a.published = 1)');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where('a.id = ' . (int) substr($search, 3));
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$query->where('(a.name LIKE '.$search.' OR a.phone LIKE '.$search.')');
}
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
}
return $query;
}
/**
* Method to get list export data.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
{
// setup the query
if (SupportgroupsHelper::checkArray($pks))
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_clinic table
$query->from($db->quoteName('#__supportgroups_clinic', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('clinic.access', 'com_supportgroups.clinic.' . (int) $item->id) && $user->authorise('clinic.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SupportgroupsHelper::checkObject($headers))
{
array_unshift($items,$headers);
}
return $items;
}
}
return false;
}
/**
* Method to get header.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExImPortHeaders()
{
// Get a db connection.
$db = JFactory::getDbo();
// get the columns
$columns = $db->getTableColumns("#__supportgroups_clinic");
if (SupportgroupsHelper::checkArray($columns))
{
// remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
$headers = new stdClass();
foreach ($columns as $column => $type)
{
$headers->{$column} = $column;
}
return $headers;
}
return false;
}
/**
* Method to get a store id based on model configuration state.
*
* @return string A store id.
*
*/
protected function getStoreId($id = '')
{
// Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.phone');
return parent::getStoreId($id);
}
/**
* Build an SQL query to checkin all items left checked out longer then a set time.
*
* @return a bool
*
*/
protected function checkInNow()
{
// Get set check in time
$time = JComponentHelper::getParams('com_supportgroups')->get('check_in');
if ($time)
{
// Get a db connection.
$db = JFactory::getDbo();
// reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__supportgroups_clinic'));
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
$query->update($db->quoteName('#__supportgroups_clinic'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}
}
return false;
}
}

View File

@ -101,7 +101,7 @@ class SupportgroupsModelCountry extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_supportgroups.country');
}
}
$this->countryvvvv = $item->id;
$this->countryvvvy = $item->id;
return $item;
}
@ -111,7 +111,7 @@ class SupportgroupsModelCountry extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getVvvregions()
public function getVvyregions()
{
// Get the user object.
$user = JFactory::getUser();
@ -129,15 +129,15 @@ class SupportgroupsModelCountry extends JModelAdmin
$query->select($db->quoteName('g.name','country_name'));
$query->join('LEFT', $db->quoteName('#__supportgroups_country', 'g') . ' ON (' . $db->quoteName('a.country') . ' = ' . $db->quoteName('g.id') . ')');
// Filter by countryvvvv global.
$countryvvvv = $this->countryvvvv;
if (is_numeric($countryvvvv ))
// Filter by countryvvvy global.
$countryvvvy = $this->countryvvvy;
if (is_numeric($countryvvvy ))
{
$query->where('a.country = ' . (int) $countryvvvv );
$query->where('a.country = ' . (int) $countryvvvy );
}
elseif (is_string($countryvvvv))
elseif (is_string($countryvvvy))
{
$query->where('a.country = ' . $db->quote($countryvvvv));
$query->where('a.country = ' . $db->quote($countryvvvy));
}
else
{
@ -168,6 +168,23 @@ class SupportgroupsModelCountry extends JModelAdmin
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('region.access', 'com_supportgroups.region.' . (int) $item->id) && $user->authorise('region.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
return $items;
}
return false;

View File

@ -0,0 +1,115 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage articles.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Articles Form Field class for the Supportgroups component
*/
class JFormFieldArticles extends JFormFieldList
{
/**
* The articles field type.
*
* @var string
*/
public $type = 'articles';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// only add if user allowed to create article
if ($user->authorise('core.create', 'com_supportgroups'))
{
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_supportgroups&amp;view=article&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SUPPORTGROUPS_NEW') . '</a>';
// return the button attached to input field
return $html . $button;
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
public function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.title','a.alias'),array('id','article_title','alias')));
$query->from($db->quoteName('#__content', 'a'));
$query->where($db->quoteName('a.state') . ' = 1');
$query->order('a.title ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = JHtml::_('select.option', '', 'Select an Article');
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->article_title . ' (' . $item->alias . ')');
}
}
return $options;
}
}

View File

@ -0,0 +1,115 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinics.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Clinics Form Field class for the Supportgroups component
*/
class JFormFieldClinics extends JFormFieldList
{
/**
* The clinics field type.
*
* @var string
*/
public $type = 'clinics';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// only add if user allowed to create clinic
if ($user->authorise('clinic.create', 'com_supportgroups'))
{
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_supportgroups&amp;view=clinic&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SUPPORTGROUPS_NEW') . '</a>';
// return the button attached to input field
return $html . $button;
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
public function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','clinic_name')));
$query->from($db->quoteName('#__supportgroups_clinic', 'a'));
$query->where($db->quoteName('a.published') . ' = 1');
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = JHtml::_('select.option', '', 'Select a clinic');
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->clinic_name);
}
}
return $options;
}
}

View File

@ -0,0 +1,119 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage locations.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Locations Form Field class for the Supportgroups component
*/
class JFormFieldLocations extends JFormFieldList
{
/**
* The locations field type.
*
* @var string
*/
public $type = 'locations';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// only add if user allowed to create location
if ($user->authorise('location.create', 'com_supportgroups'))
{
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_supportgroups&amp;view=location&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SUPPORTGROUPS_NEW') . '</a>';
// return the button attached to input field
return $html . $button;
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
public function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','b.name','c.codetwo'),array('id','location_name','region','country')));
$query->from($db->quoteName('#__supportgroups_location', 'a'));
$query->join('LEFT', '#__supportgroups_region AS b ON b.id = a.region');
$query->join('LEFT', '#__supportgroups_country AS c ON c.id = b.country');
$query->where($db->quoteName('a.published') . ' = 1');
$query->order('c.codetwo ASC');
$query->order('b.name ASC');
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = JHtml::_('select.option', '', 'Select a location');
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->location_name.' ('.$item->region.' - '.$item->country.')');
}
}
return $options;
}
}

View File

@ -59,7 +59,7 @@ class JFormFieldRegions extends JFormFieldList
{
$user = JFactory::getUser();
// only add if user allowed to create region
if ($user->authorise('core.create', 'com_supportgroups'))
if ($user->authorise('region.create', 'com_supportgroups'))
{
// get the input from url
$jinput = JFactory::getApplication()->input;

View File

@ -0,0 +1,115 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage supportgroups.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Supportgroups Form Field class for the Supportgroups component
*/
class JFormFieldSupportgroups extends JFormFieldList
{
/**
* The supportgroups field type.
*
* @var string
*/
public $type = 'supportgroups';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// only add if user allowed to create support_group
if ($user->authorise('support_group.create', 'com_supportgroups'))
{
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_supportgroups&amp;view=support_group&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SUPPORTGROUPS_NEW') . '</a>';
// return the button attached to input field
return $html . $button;
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
public function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','support_group_name')));
$query->from($db->quoteName('#__supportgroups_support_group', 'a'));
$query->where($db->quoteName('a.published') . ' = 1');
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = JHtml::_('select.option', '', 'Select a support group');
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->support_group_name);
}
}
return $options;
}
}

View File

@ -0,0 +1,25 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinic.js
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/

View File

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="utf-8"?>
<form
addrulepath="/administrator/components/com_supportgroups/models/rules"
addfieldpath="/administrator/components/com_supportgroups/models/fields"
>
<fieldset name="details">
<!-- Default Fields. -->
<!-- Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
label="COM_SUPPORTGROUPS_CLINIC_CREATED_DATE_LABEL"
description="COM_SUPPORTGROUPS_CLINIC_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SUPPORTGROUPS_CLINIC_CREATED_BY_LABEL"
description="COM_SUPPORTGROUPS_CLINIC_CREATED_BY_DESC"
/>
<!-- Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
<option value="1">
JPUBLISHED</option>
<option value="0">
JUNPUBLISHED</option>
<option value="2">
JARCHIVED</option>
<option value="-2">
JTRASHED</option>
</field>
<!-- Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
default="1"
required="false"
/>
<!-- Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
class="inputbox validate-ordering"
label="COM_SUPPORTGROUPS_CLINIC_ORDERING_LABEL"
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
class="readonly"
label="COM_SUPPORTGROUPS_CLINIC_VERSION_LABEL"
description="COM_SUPPORTGROUPS_CLINIC_VERSION_DESC"
size="6"
readonly="true"
filter="unset"
/>
<!-- Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
label="JFIELD_META_KEYWORDS_LABEL"
description="JFIELD_META_KEYWORDS_DESC"
rows="3"
cols="30"
/>
<!-- Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
label="JFIELD_META_DESCRIPTION_LABEL"
description="JFIELD_META_DESCRIPTION_DESC"
rows="3"
cols="30"
/>
<!-- Dynamic Fields. -->
<!-- Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
label="COM_SUPPORTGROUPS_CLINIC_NAME_LABEL"
size="40"
maxlength="150"
description="COM_SUPPORTGROUPS_CLINIC_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="Error! Please add name here."
hint="COM_SUPPORTGROUPS_CLINIC_NAME_HINT"
/>
<!-- Phone Field. Type: Tel. (joomla) -->
<field
type="tel"
name="phone"
label="COM_SUPPORTGROUPS_CLINIC_PHONE_LABEL"
size="60"
maxlength="150"
description="COM_SUPPORTGROUPS_CLINIC_PHONE_DESCRIPTION"
class="text_area"
required="true"
filter="STRING"
validated="tel"
message="Error! Please add phone number here."
hint="COM_SUPPORTGROUPS_CLINIC_PHONE_HINT"
/>
<!-- Note_set_area Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_set_area" label="COM_SUPPORTGROUPS_CLINIC_NOTE_SET_AREA_LABEL" description="COM_SUPPORTGROUPS_CLINIC_NOTE_SET_AREA_DESCRIPTION" heading="h2" class="note_set_area" />
<!-- Area Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="area"
default="1"
/>
</fieldset>
<!-- Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
description="JFIELD_METADATA_ROBOTS_DESC" >
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="index, follow">JGLOBAL_INDEX_FOLLOW</option>
<option value="noindex, follow">JGLOBAL_NOINDEX_FOLLOW</option>
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
/>
</fieldset>
</fields>
<!-- Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"
label="Permissions in relation to this clinic"
translate_label="false"
filter="rules"
validate="rules"
class="inputbox"
component="com_supportgroups"
section="clinic"
/>
</fieldset>
</form>

View File

@ -0,0 +1,311 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help_document.js
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_vvvvvvyvvz_required = false;
jform_vvvvvvzvwa_required = false;
jform_vvvvvwavwb_required = false;
jform_vvvvvwbvwc_required = false;
// Initial Script
jQuery(document).ready(function()
{
var location_vvvvvvw = jQuery("#jform_location input[type='radio']:checked").val();
vvvvvvw(location_vvvvvvw);
var location_vvvvvvx = jQuery("#jform_location input[type='radio']:checked").val();
vvvvvvx(location_vvvvvvx);
var type_vvvvvvy = jQuery("#jform_type").val();
vvvvvvy(type_vvvvvvy);
var type_vvvvvvz = jQuery("#jform_type").val();
vvvvvvz(type_vvvvvvz);
var type_vvvvvwa = jQuery("#jform_type").val();
vvvvvwa(type_vvvvvwa);
var target_vvvvvwb = jQuery("#jform_target input[type='radio']:checked").val();
vvvvvwb(target_vvvvvwb);
});
// the vvvvvvw function
function vvvvvvw(location_vvvvvvw)
{
// set the function logic
if (location_vvvvvvw == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
}
}
// the vvvvvvx function
function vvvvvvx(location_vvvvvvx)
{
// set the function logic
if (location_vvvvvvx == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
}
}
// the vvvvvvy function
function vvvvvvy(type_vvvvvvy)
{
if (isSet(type_vvvvvvy) && type_vvvvvvy.constructor !== Array)
{
var temp_vvvvvvy = type_vvvvvvy;
var type_vvvvvvy = [];
type_vvvvvvy.push(temp_vvvvvvy);
}
else if (!isSet(type_vvvvvvy))
{
var type_vvvvvvy = [];
}
var type = type_vvvvvvy.some(type_vvvvvvy_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_vvvvvvyvvz_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvvvyvvz_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_vvvvvvyvvz_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvvvyvvz_required = true;
}
}
}
// the vvvvvvy Some function
function type_vvvvvvy_SomeFunc(type_vvvvvvy)
{
// set the function logic
if (type_vvvvvvy == 3)
{
return true;
}
return false;
}
// the vvvvvvz function
function vvvvvvz(type_vvvvvvz)
{
if (isSet(type_vvvvvvz) && type_vvvvvvz.constructor !== Array)
{
var temp_vvvvvvz = type_vvvvvvz;
var type_vvvvvvz = [];
type_vvvvvvz.push(temp_vvvvvvz);
}
else if (!isSet(type_vvvvvvz))
{
var type_vvvvvvz = [];
}
var type = type_vvvvvvz.some(type_vvvvvvz_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
if (jform_vvvvvvzvwa_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvvvzvwa_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_vvvvvvzvwa_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvvvzvwa_required = true;
}
}
}
// the vvvvvvz Some function
function type_vvvvvvz_SomeFunc(type_vvvvvvz)
{
// set the function logic
if (type_vvvvvvz == 1)
{
return true;
}
return false;
}
// the vvvvvwa function
function vvvvvwa(type_vvvvvwa)
{
if (isSet(type_vvvvvwa) && type_vvvvvwa.constructor !== Array)
{
var temp_vvvvvwa = type_vvvvvwa;
var type_vvvvvwa = [];
type_vvvvvwa.push(temp_vvvvvwa);
}
else if (!isSet(type_vvvvvwa))
{
var type_vvvvvwa = [];
}
var type = type_vvvvvwa.some(type_vvvvvwa_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_vvvvvwavwb_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_vvvvvwavwb_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_vvvvvwavwb_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_vvvvvwavwb_required = true;
}
}
}
// the vvvvvwa Some function
function type_vvvvvwa_SomeFunc(type_vvvvvwa)
{
// set the function logic
if (type_vvvvvwa == 2)
{
return true;
}
return false;
}
// the vvvvvwb function
function vvvvvwb(target_vvvvvwb)
{
// set the function logic
if (target_vvvvvwb == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
if (jform_vvvvvwbvwc_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_vvvvvwbvwc_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
if (!jform_vvvvvwbvwc_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_vvvvvwbvwc_required = true;
}
}
}
// update required fields
function updateFieldRequired(name,status)
{
var not_required = jQuery('#jform_not_required').val();
if(status == 1)
{
if (isSet(not_required) && not_required != 0)
{
not_required = not_required+','+name;
}
else
{
not_required = ','+name;
}
}
else
{
if (isSet(not_required) && not_required != 0)
{
not_required = not_required.replace(','+name,'');
}
}
jQuery('#jform_not_required').val(not_required);
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !== val.length){
return true;
}
return false;
}

View File

@ -0,0 +1,253 @@
<?xml version="1.0" encoding="utf-8"?>
<form
addrulepath="/administrator/components/com_supportgroups/models/rules"
addfieldpath="/administrator/components/com_supportgroups/models/fields"
>
<fieldset name="details">
<!-- Default Fields. -->
<!-- Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_CREATED_DATE_LABEL"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_CREATED_BY_LABEL"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_CREATED_BY_DESC"
/>
<!-- Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
<option value="1">
JPUBLISHED</option>
<option value="0">
JUNPUBLISHED</option>
<option value="2">
JARCHIVED</option>
<option value="-2">
JTRASHED</option>
</field>
<!-- Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
default="1"
required="false"
/>
<!-- Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
class="inputbox validate-ordering"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_ORDERING_LABEL"
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
class="readonly"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_VERSION_LABEL"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_VERSION_DESC"
size="6"
readonly="true"
filter="unset"
/>
<!-- Dynamic Fields. -->
<!-- Title Field. Type: Text. (joomla) -->
<field
type="text"
name="title"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_TITLE_LABEL"
size="40"
maxlength="150"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_TITLE_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="Error! Please add title here."
hint="COM_SUPPORTGROUPS_HELP_DOCUMENT_TITLE_HINT"
/>
<!-- Type Field. Type: List. (joomla) -->
<field
type="list"
name="type"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_TYPE_LABEL"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_TYPE_DESCRIPTION"
class="list_class"
multiple="false"
required="true">
<!-- Option Set. -->
<option value="">
COM_SUPPORTGROUPS_HELP_DOCUMENT_SELECT_AN_OPTION</option>
<option value="1">
COM_SUPPORTGROUPS_HELP_DOCUMENT_JOOMLA_ARTICLE</option>
<option value="2">
COM_SUPPORTGROUPS_HELP_DOCUMENT_TEXT</option>
<option value="3">
COM_SUPPORTGROUPS_HELP_DOCUMENT_URL</option>
</field>
<!-- Groups Field. Type: Usergroup. (joomla) -->
<field
type="usergroup"
name="groups"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_GROUPS_LABEL"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_GROUPS_DESCRIPTION"
required="true"
multiple="true"
/>
<!-- Location Field. Type: Radio. (joomla) -->
<field
type="radio"
name="location"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_LOCATION_LABEL"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_LOCATION_DESCRIPTION"
class="btn-group"
required="true">
<!-- Option Set. -->
<option value="1">
COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN</option>
<option value="2">
COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE</option>
</field>
<!-- Admin_view Field. Type: Folderlist. (joomla) -->
<field
type="folderlist"
name="admin_view"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW_LABEL"
directory="/administrator/components/com_supportgroups/views"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION"
hide_none="true"
hide_default="true"
/>
<!-- Site_view Field. Type: Folderlist. (joomla) -->
<field
type="folderlist"
name="site_view"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW_LABEL"
directory="/components/com_supportgroups/views"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION"
hide_none="true"
hide_default="true"
/>
<!-- Target Field. Type: Radio. (joomla) -->
<field
type="radio"
name="target"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_TARGET_LABEL"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_TARGET_DESCRIPTION"
class="btn-group"
required="true">
<!-- Option Set. -->
<option value="1">
COM_SUPPORTGROUPS_HELP_DOCUMENT_SOME</option>
<option value="2">
COM_SUPPORTGROUPS_HELP_DOCUMENT_ALL</option>
</field>
<!-- Content Field. Type: Editor. (joomla) -->
<field
type="editor"
name="content"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_CONTENT_LABEL"
width="100%"
height="300 px"
buttons="false"
filter="safehtml"
required="true"
/>
<!-- Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
label="JFIELD_ALIAS_LABEL"
description="JFIELD_ALIAS_DESC"
filter="STRING"
hint="COM_SUPPORTGROUPS_HELP_DOCUMENT_ALIAS_HINT"
/>
<!-- Article Field. Type: Articles. (custom) -->
<field
type="articles"
name="article"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_ARTICLE_LABEL"
class="list_class"
multiple="false"
default="0"
required="true"
/>
<!-- Url Field. Type: Url. (joomla) -->
<field
type="url"
name="url"
label="COM_SUPPORTGROUPS_HELP_DOCUMENT_URL_LABEL"
size="60"
maxlength="150"
description="COM_SUPPORTGROUPS_HELP_DOCUMENT_URL_DESCRIPTION"
class="text_area"
required="true"
filter="url"
validated="url"
message="Error! Please add url here."
hint="COM_SUPPORTGROUPS_HELP_DOCUMENT_URL_HINT"
/>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
</fieldset>
<!-- Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"
label="Permissions in relation to this help_document"
translate_label="false"
filter="rules"
validate="rules"
class="inputbox"
component="com_supportgroups"
section="help_document"
/>
</fieldset>
</form>

View File

@ -126,6 +126,7 @@
description="COM_SUPPORTGROUPS_LOCATION_REGION_DESCRIPTION"
class="list_class"
multiple="false"
required="true"
button="true"
/>
<!-- Note_set_area Field. Type: Note. A None Database Field. (joomla) -->

View File

@ -0,0 +1,25 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payment.js
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/

View File

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<form
addrulepath="/administrator/components/com_supportgroups/models/rules"
addfieldpath="/administrator/components/com_supportgroups/models/fields"
>
<fieldset name="details">
<!-- Default Fields. -->
<!-- Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
label="COM_SUPPORTGROUPS_PAYMENT_CREATED_DATE_LABEL"
description="COM_SUPPORTGROUPS_PAYMENT_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SUPPORTGROUPS_PAYMENT_CREATED_BY_LABEL"
description="COM_SUPPORTGROUPS_PAYMENT_CREATED_BY_DESC"
/>
<!-- Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
<option value="1">
JPUBLISHED</option>
<option value="0">
JUNPUBLISHED</option>
<option value="2">
JARCHIVED</option>
<option value="-2">
JTRASHED</option>
</field>
<!-- Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
default="1"
required="false"
/>
<!-- Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
class="inputbox validate-ordering"
label="COM_SUPPORTGROUPS_PAYMENT_ORDERING_LABEL"
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
class="readonly"
label="COM_SUPPORTGROUPS_PAYMENT_VERSION_LABEL"
description="COM_SUPPORTGROUPS_PAYMENT_VERSION_DESC"
size="6"
readonly="true"
filter="unset"
/>
<!-- Dynamic Fields. -->
<!-- Support_group Field. Type: Supportgroups. (custom) -->
<field
type="supportgroups"
name="support_group"
label="COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_LABEL"
description="COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_DESCRIPTION"
class="list_class"
multiple="false"
required="true"
button="true"
/>
<!-- Year Field. Type: List. (joomla) -->
<field
type="list"
name="year"
label="COM_SUPPORTGROUPS_PAYMENT_YEAR_LABEL"
class="list_class"
multiple="false"
filter="INT"
required="true">
<!-- Option Set. -->
<option value="">
COM_SUPPORTGROUPS_PAYMENT_SELECT_A_YEAR</option>
<option value="2010">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TEN</option>
<option value="2011">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_ELEVEN</option>
<option value="2012">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWELVE</option>
<option value="2013">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_THIRTEEN</option>
<option value="2014">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_FOURTEEN</option>
<option value="2015">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_FIFTEEN</option>
<option value="2016">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_SIXTEEN</option>
<option value="2017">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_SEVENTEEN</option>
<option value="2018">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_EIGHTEEN</option>
<option value="2019">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_NINETEEN</option>
<option value="2020">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY</option>
<option value="2021">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_ONE</option>
<option value="2022">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_TWO</option>
<option value="2023">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_THREE</option>
<option value="2024">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_FOUR</option>
<option value="2025">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_FIVE</option>
<option value="2026">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_SIX</option>
<option value="2027">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_SEVEN</option>
<option value="2028">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_EIGHT</option>
<option value="2029">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_NINE</option>
<option value="2030">
COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_THIRTY</option>
</field>
<!-- Amount Field. Type: Text. (joomla) -->
<field
type="text"
name="amount"
label="COM_SUPPORTGROUPS_PAYMENT_AMOUNT_LABEL"
size="10"
maxlength="50"
description="COM_SUPPORTGROUPS_PAYMENT_AMOUNT_DESCRIPTION"
class="text_area"
filter="FLOAT"
message="Error! Please add amount paid here."
hint="COM_SUPPORTGROUPS_PAYMENT_AMOUNT_HINT"
onchange="if(!jQuery(this).val().match(/^\d+\.\d+$/)){jQuery(this).val('')};"
/>
</fieldset>
<!-- Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"
label="Permissions in relation to this payment"
translate_label="false"
filter="rules"
validate="rules"
class="inputbox"
component="com_supportgroups"
section="payment"
/>
</fieldset>
</form>

View File

@ -126,6 +126,7 @@
description="COM_SUPPORTGROUPS_REGION_COUNTRY_DESCRIPTION"
class="list_class"
multiple="false"
required="true"
button="false"
/>
</fieldset>

View File

@ -118,6 +118,133 @@
message="Error! Please add name here."
hint="COM_SUPPORTGROUPS_SUPPORT_GROUP_NAME_HINT"
/>
<!-- Phone Field. Type: Tel. (joomla) -->
<field
type="tel"
name="phone"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE_LABEL"
size="60"
maxlength="150"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE_DESCRIPTION"
class="text_area"
required="true"
filter="STRING"
validated="tel"
message="Error! Please add phone number here."
hint="COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE_HINT"
/>
<!-- Location Field. Type: Locations. (custom) -->
<field
type="locations"
name="location"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_LOCATION_LABEL"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_LOCATION_DESCRIPTION"
class="list_class"
multiple="false"
required="true"
button="true"
/>
<!-- Clinic Field. Type: Clinics. (custom) -->
<field
type="clinics"
name="clinic"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_CLINIC_LABEL"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_CLINIC_DESCRIPTION"
class="list_class"
multiple="false"
required="true"
button="true"
/>
<!-- Male Field. Type: Text. (joomla) -->
<field
type="text"
name="male"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_LABEL"
size="10"
maxlength="50"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_DESCRIPTION"
class="text_area"
filter="INT"
message="Error! Please add number of males text here."
hint="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_HINT"
onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};"
/>
<!-- Female Field. Type: Text. (joomla) -->
<field
type="text"
name="female"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_LABEL"
size="10"
maxlength="50"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_DESCRIPTION"
class="text_area"
filter="INT"
message="Error! Please add number of females text here."
hint="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_HINT"
onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};"
/>
<!-- Female_art Field. Type: Text. (joomla) -->
<field
type="text"
name="female_art"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_ART_LABEL"
size="10"
maxlength="50"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_ART_DESCRIPTION"
class="text_area"
filter="INT"
message="Error! Please add number of females on ART here."
hint="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_ART_HINT"
onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};"
/>
<!-- Male_art Field. Type: Text. (joomla) -->
<field
type="text"
name="male_art"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_ART_LABEL"
size="10"
maxlength="50"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_ART_DESCRIPTION"
class="text_area"
filter="INT"
message="Error! Please add number of males on ART here."
hint="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_ART_HINT"
onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};"
/>
<!-- Female_children Field. Type: Text. (joomla) -->
<field
type="text"
name="female_children"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_CHILDREN_LABEL"
size="10"
maxlength="50"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_CHILDREN_DESCRIPTION"
class="text_area"
filter="INT"
message="Error! Please add number of females here."
hint="COM_SUPPORTGROUPS_SUPPORT_GROUP_FEMALE_CHILDREN_HINT"
onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};"
/>
<!-- Male_children Field. Type: Text. (joomla) -->
<field
type="text"
name="male_children"
label="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_CHILDREN_LABEL"
size="10"
maxlength="50"
description="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_CHILDREN_DESCRIPTION"
class="text_area"
filter="INT"
message="Error! Please add number of males here."
hint="COM_SUPPORTGROUPS_SUPPORT_GROUP_MALE_CHILDREN_HINT"
onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};"
/>
<!-- Area Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="area"
default="1"
/>
</fieldset>
<!-- Metadata Fields. -->

View File

@ -0,0 +1,942 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help_document.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
// import Joomla modelform library
jimport('joomla.application.component.modeladmin');
/**
* Supportgroups Help_document Model
*/
class SupportgroupsModelHelp_document extends JModelAdmin
{
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_SUPPORTGROUPS';
/**
* The type alias for this content type.
*
* @var string
* @since 3.2
*/
public $typeAlias = 'com_supportgroups.help_document';
/**
* Returns a Table object, always creating it
*
* @param type $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
*
* @since 1.6
*/
public function getTable($type = 'help_document', $prefix = 'SupportgroupsTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
}
/**
* Method to get a single record.
*
* @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
*
* @since 1.6
*/
public function getItem($pk = null)
{
if ($item = parent::getItem($pk))
{
if (!empty($item->params))
{
// Convert the params field to an array.
$registry = new Registry;
$registry->loadString($item->params);
$item->params = $registry->toArray();
}
if (!empty($item->metadata))
{
// Convert the metadata field to an array.
$registry = new Registry;
$registry->loadString($item->metadata);
$item->metadata = $registry->toArray();
}
if (!empty($item->groups))
{
// JSON Decode groups.
$item->groups = json_decode($item->groups,true);
}
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_supportgroups.help_document');
}
}
return $item;
}
/**
* Method to get the record form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return mixed A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // Get the form.
$form = $this->loadForm('com_supportgroups.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
{
return false;
}
$jinput = JFactory::getApplication()->input;
// The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
}
$user = JFactory::getUser();
// Check for existing item.
// Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('help_document.edit.state', 'com_supportgroups.help_document.' . (int) $id))
|| ($id == 0 && !$user->authorise('help_document.edit.state', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// If this is a new item insure the greated by is set.
if (0 == $id)
{
// Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_supportgroups'))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_supportgroups'))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// Only load these values if no id is found
if (0 == $id)
{
// Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
return $form;
}
/**
* Method to get the script that have to be included on the form
*
* @return string script files
*/
public function getScript()
{
return 'administrator/components/com_supportgroups/models/forms/help_document.js';
}
/**
* Method to test whether a record can be deleted.
*
* @param object $record A record object.
*
* @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canDelete($record)
{
if (!empty($record->id))
{
if ($record->published != -2)
{
return;
}
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
return $user->authorise('help_document.delete', 'com_supportgroups.help_document.' . (int) $record->id);
}
return false;
}
/**
* Method to test whether a record can have its state edited.
*
* @param object $record A record object.
*
* @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canEditState($record)
{
$user = JFactory::getUser();
$recordId = (!empty($record->id)) ? $record->id : 0;
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit.state', 'com_supportgroups.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('help_document.edit.state', 'com_supportgroups');
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
* @since 2.5
*/
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('help_document.edit', 'com_supportgroups.help_document.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('help_document.edit', 'com_supportgroups');
}
/**
* Prepare and sanitise the table data prior to saving.
*
* @param JTable $table A JTable object.
*
* @return void
*
* @since 1.6
*/
protected function prepareTable($table)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if (isset($table->name))
{
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
}
if (isset($table->alias) && empty($table->alias))
{
$table->generateAlias();
}
if (empty($table->id))
{
$table->created = $date->toSql();
// set the user
if ($table->created_by == 0 || empty($table->created_by))
{
$table->created_by = $user->id;
}
// Set ordering to the last item if not set
if (empty($table->ordering))
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('MAX(ordering)')
->from($db->quoteName('#__supportgroups_help_document'));
$db->setQuery($query);
$max = $db->loadResult();
$table->ordering = $max + 1;
}
}
else
{
$table->modified = $date->toSql();
$table->modified_by = $user->id;
}
if (!empty($table->id))
{
// Increment the items version number.
$table->version++;
}
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_supportgroups.edit.help_document.data', array());
if (empty($data))
{
$data = $this->getItem();
}
return $data;
}
/**
* Method to validate the form data.
*
* @param JForm $form The form to validate against.
* @param array $data The data to validate.
* @param string $group The name of the field group to validate.
*
* @return mixed Array of filtered data if valid, false otherwise.
*
* @see JFormRule
* @see JFilterInput
* @since 12.2
*/
public function validate($form, $data, $group = null)
{
// check if the not_required field is set
if (SupportgroupsHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
// now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// make sure there is a string value
if (SupportgroupsHelper::checkString($requiredField))
{
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
}
}
}
return parent::validate($form, $data, $group);
}
/**
* Method to get the unique fields of this table.
*
* @return mixed An array of field names, boolean false if none is set.
*
* @since 3.0
*/
protected function getUniqeFields()
{
return false;
}
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
* @since 12.2
*/
public function delete(&$pks)
{
if (!parent::delete($pks))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*
* @param array $commands An array of commands to perform.
* @param array $pks An array of item ids.
* @param array $contexts An array of item contexts.
*
* @return boolean Returns true on success, false on failure.
*
* @since 12.2
*/
public function batch($commands, $pks, $contexts)
{
// Sanitize ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true))
{
unset($pks[array_search(0, $pks, true)]);
}
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
$done = false;
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('help_document');
$this->batchSet = true;
if (!$this->canDo->get('core.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
if ($this->type == false)
{
$type = new JUcmType;
$this->type = $type->getTypeByAlias($this->typeAlias);
}
$this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags');
if (!empty($commands['move_copy']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c')
{
$result = $this->batchCopy($commands, $pks, $contexts);
if (is_array($result))
{
foreach ($result as $old => $new)
{
$contexts[$new] = $contexts[$old];
}
$pks = array_values($result);
}
else
{
return false;
}
}
elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts))
{
return false;
}
$done = true;
}
if (!$done)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
// Clear the cache
$this->cleanCache();
return true;
}
/**
* Batch copy items to a new category or current.
*
* @param integer $values The new values.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return mixed An array of new IDs on success, boolean false on failure.
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('help_document');
}
if (!$this->canDo->get('help_document.create') && !$this->canDo->get('help_document.batch'))
{
return false;
}
// get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// remove move_copy from array
unset($values['move_copy']);
// make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
}
elseif (isset($values['published']) && !$this->canDo->get('help_document.edit.state'))
{
$values['published'] = 0;
}
$newIds = array();
// Parent exists so let's proceed
while (!empty($pks))
{
// Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// only allow copy if user may edit this item.
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
list($this->table->title, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->title);
// insert all set values
if (SupportgroupsHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
if (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// update all uniqe fields
if (SupportgroupsHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField);
}
}
// Reset the ID because we are making a copy
$this->table->id = 0;
// TODO: Deal with ordering?
// $this->table->ordering = 1;
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
// Get the new item ID
$newId = $this->table->get('id');
// Add the new ID to the array
$newIds[$pk] = $newId;
}
// Clean the cache
$this->cleanCache();
return $newIds;
}
/**
* Batch move items to a new category
*
* @param integer $value The new category ID.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('help_document');
}
if (!$this->canDo->get('help_document.edit') && !$this->canDo->get('help_document.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('help_document.edit.state'))
{
unset($values['published']);
}
// remove move_copy from array
unset($values['move_copy']);
// Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// insert all set values.
if (SupportgroupsHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
}
elseif (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
}
// Clean the cache
$this->cleanCache();
return true;
}
/**
* Method to save the form data.
*
* @param array $data The form data.
*
* @return boolean True on success.
*
* @since 1.6
*/
public function save($data)
{
$input = JFactory::getApplication()->input;
$filter = JFilterInput::getInstance();
// set the metadata to the Item Data
if (isset($data['metadata']) && isset($data['metadata']['author']))
{
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
// Set the groups string to JSON string.
if (isset($data['groups']))
{
$data['groups'] = (string) json_encode($data['groups']);
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{
$params = new JRegistry;
$params->loadArray($data['params']);
$data['params'] = (string) $params;
}
// Alter the title for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
$origTable->load($input->getInt('id'));
if ($data['title'] == $origTable->title)
{
list($title, $alias) = $this->_generateNewTitle($data['alias'], $data['title']);
$data['title'] = $title;
$data['alias'] = $alias;
}
else
{
if ($data['alias'] == $origTable->alias)
{
$data['alias'] = '';
}
}
$data['published'] = 0;
}
// Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
{
if (JFactory::getConfig()->get('unicodeslugs') == 1)
{
$data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['title']);
}
else
{
$data['alias'] = JFilterOutput::stringURLSafe($data['title']);
}
$table = JTable::getInstance('help_document', 'supportgroupsTable');
if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0))
{
$msg = JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_SAVE_WARNING');
}
list($title, $alias) = $this->_generateNewTitle($data['alias'], $data['title']);
$data['alias'] = $alias;
if (isset($msg))
{
JFactory::getApplication()->enqueueMessage($msg, 'warning');
}
}
}
// Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SupportgroupsHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]);
}
}
}
if (parent::save($data))
{
return true;
}
return false;
}
/**
* Method to generate a uniqe value.
*
* @param string $field name.
* @param string $value data.
*
* @return string New value.
*
* @since 3.0
*/
protected function generateUniqe($field,$value)
{
// set field value uniqe
$table = $this->getTable();
while ($table->load(array($field => $value)))
{
$value = JString::increment($value);
}
return $value;
}
/**
* Method to change the title & alias.
*
* @param string $alias The alias.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($alias, $title)
{
// Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))
{
$title = JString::increment($title);
$alias = JString::increment($alias, 'dash');
}
return array($title, $alias);
}
}

View File

@ -0,0 +1,479 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help_documents.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the Joomla modellist library
jimport('joomla.application.component.modellist');
/**
* Help_documents Model
*/
class SupportgroupsModelHelp_documents extends JModelList
{
public function __construct($config = array())
{
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.title','title',
'a.type','type',
'a.location','location',
'a.admin_view','admin_view',
'a.site_view','site_view'
);
}
parent::__construct($config);
}
/**
* Method to auto-populate the model state.
*
* @return void
*/
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
}
$title = $this->getUserStateFromRequest($this->context . '.filter.title', 'filter_title');
$this->setState('filter.title', $title);
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
$this->setState('filter.type', $type);
$location = $this->getUserStateFromRequest($this->context . '.filter.location', 'filter_location');
$this->setState('filter.location', $location);
$admin_view = $this->getUserStateFromRequest($this->context . '.filter.admin_view', 'filter_admin_view');
$this->setState('filter.admin_view', $admin_view);
$site_view = $this->getUserStateFromRequest($this->context . '.filter.site_view', 'filter_site_view');
$this->setState('filter.site_view', $site_view);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
$this->setState('filter.created_by', $created_by);
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
$this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
}
/**
* Method to get an array of data items.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
// check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('help_document.access', 'com_supportgroups.help_document.' . (int) $item->id) && $user->authorise('help_document.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// decode groups
$groupsArray = json_decode($item->groups, true);
if (SupportgroupsHelper::checkArray($groupsArray))
{
$groupsNames = '';
$counter = 0;
foreach ($groupsArray as $groups)
{
if ($counter == 0)
{
$groupsNames .= SupportgroupsHelper::getGroupName($groups);
}
else
{
$groupsNames .= ', '.SupportgroupsHelper::getGroupName($groups);
}
$counter++;
}
$item->groups = $groupsNames;
}
}
}
// set selection value to a translatable value
if (SupportgroupsHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// convert location
$item->location = $this->selectionTranslation($item->location, 'location');
}
}
// return items
return $items;
}
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslation($value,$name)
{
// Array of type language strings
if ($name == 'type')
{
$typeArray = array(
0 => 'COM_SUPPORTGROUPS_HELP_DOCUMENT_SELECT_AN_OPTION',
1 => 'COM_SUPPORTGROUPS_HELP_DOCUMENT_JOOMLA_ARTICLE',
2 => 'COM_SUPPORTGROUPS_HELP_DOCUMENT_TEXT',
3 => 'COM_SUPPORTGROUPS_HELP_DOCUMENT_URL'
);
// Now check if value is found in this array
if (isset($typeArray[$value]) && SupportgroupsHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
}
}
// Array of location language strings
if ($name == 'location')
{
$locationArray = array(
1 => 'COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN',
2 => 'COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE'
);
// Now check if value is found in this array
if (isset($locationArray[$value]) && SupportgroupsHelper::checkString($locationArray[$value]))
{
return $locationArray[$value];
}
}
return $value;
}
/**
* Method to build an SQL query to load the list data.
*
* @return string An SQL query
*/
protected function getListQuery()
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_item table
$query->from($db->quoteName('#__supportgroups_help_document', 'a'));
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.published = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.published = 0 OR a.published = 1)');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where('a.id = ' . (int) substr($search, 3));
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR a.site_view LIKE '.$search.')');
}
}
// Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
}
// Filter by Location.
if ($location = $this->getState('filter.location'))
{
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
}
// Filter by Admin_view.
if ($admin_view = $this->getState('filter.admin_view'))
{
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
}
// Filter by Site_view.
if ($site_view = $this->getState('filter.site_view'))
{
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
}
return $query;
}
/**
* Method to get list export data.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
{
// setup the query
if (SupportgroupsHelper::checkArray($pks))
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_help_document table
$query->from($db->quoteName('#__supportgroups_help_document', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('help_document.access', 'com_supportgroups.help_document.' . (int) $item->id) && $user->authorise('help_document.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SupportgroupsHelper::checkObject($headers))
{
array_unshift($items,$headers);
}
return $items;
}
}
return false;
}
/**
* Method to get header.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExImPortHeaders()
{
// Get a db connection.
$db = JFactory::getDbo();
// get the columns
$columns = $db->getTableColumns("#__supportgroups_help_document");
if (SupportgroupsHelper::checkArray($columns))
{
// remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
$headers = new stdClass();
foreach ($columns as $column => $type)
{
$headers->{$column} = $column;
}
return $headers;
}
return false;
}
/**
* Method to get a store id based on model configuration state.
*
* @return string A store id.
*
*/
protected function getStoreId($id = '')
{
// Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.title');
$id .= ':' . $this->getState('filter.type');
$id .= ':' . $this->getState('filter.location');
$id .= ':' . $this->getState('filter.admin_view');
$id .= ':' . $this->getState('filter.site_view');
return parent::getStoreId($id);
}
/**
* Build an SQL query to checkin all items left checked out longer then a set time.
*
* @return a bool
*
*/
protected function checkInNow()
{
// Get set check in time
$time = JComponentHelper::getParams('com_supportgroups')->get('check_in');
if ($time)
{
// Get a db connection.
$db = JFactory::getDbo();
// reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__supportgroups_help_document'));
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
$query->update($db->quoteName('#__supportgroups_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}
}
return false;
}
}

View File

@ -101,10 +101,99 @@ class SupportgroupsModelLocation extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_supportgroups.location');
}
}
$this->locationvvvw = $item->id;
return $item;
}
/**
* Method to get list data.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getVvwsupport_groups()
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_support_group table
$query->from($db->quoteName('#__supportgroups_support_group', 'a'));
// From the supportgroups_location table.
$query->select($db->quoteName('g.name','location_name'));
$query->join('LEFT', $db->quoteName('#__supportgroups_location', 'g') . ' ON (' . $db->quoteName('a.location') . ' = ' . $db->quoteName('g.id') . ')');
// From the supportgroups_clinic table.
$query->select($db->quoteName('h.name','clinic_name'));
$query->join('LEFT', $db->quoteName('#__supportgroups_clinic', 'h') . ' ON (' . $db->quoteName('a.clinic') . ' = ' . $db->quoteName('h.id') . ')');
// Filter by locationvvvw global.
$locationvvvw = $this->locationvvvw;
if (is_numeric($locationvvvw ))
{
$query->where('a.location = ' . (int) $locationvvvw );
}
elseif (is_string($locationvvvw))
{
$query->where('a.location = ' . $db->quote($locationvvvw));
}
else
{
$query->where('a.location = -5');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('support_group.access', 'com_supportgroups.support_group.' . (int) $item->id) && $user->authorise('support_group.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
return $items;
}
return false;
}
/**
* Method to get the record form.
*
@ -141,8 +230,8 @@ class SupportgroupsModelLocation extends JModelAdmin
// Check for existing item.
// Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('core.edit.state', 'com_supportgroups.location.' . (int) $id))
|| ($id == 0 && !$user->authorise('core.edit.state', 'com_supportgroups')))
if ($id != 0 && (!$user->authorise('location.edit.state', 'com_supportgroups.location.' . (int) $id))
|| ($id == 0 && !$user->authorise('location.edit.state', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
@ -158,7 +247,8 @@ class SupportgroupsModelLocation extends JModelAdmin
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_supportgroups'))
if ($id != 0 && (!$user->authorise('location.edit.created_by', 'com_supportgroups.location.' . (int) $id))
|| ($id == 0 && !$user->authorise('location.edit.created_by', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
@ -168,7 +258,8 @@ class SupportgroupsModelLocation extends JModelAdmin
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_supportgroups'))
if ($id != 0 && (!$user->authorise('location.edit.created', 'com_supportgroups.location.' . (int) $id))
|| ($id == 0 && !$user->authorise('location.edit.created', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
@ -254,7 +345,7 @@ class SupportgroupsModelLocation extends JModelAdmin
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
return $user->authorise('core.delete', 'com_supportgroups.location.' . (int) $record->id);
return $user->authorise('location.delete', 'com_supportgroups.location.' . (int) $record->id);
}
return false;
}
@ -276,14 +367,14 @@ class SupportgroupsModelLocation extends JModelAdmin
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit.state', 'com_supportgroups.location.' . (int) $recordId);
$permission = $user->authorise('location.edit.state', 'com_supportgroups.location.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
return parent::canEditState($record);
return $user->authorise('location.edit.state', 'com_supportgroups');
}
/**
@ -298,8 +389,9 @@ class SupportgroupsModelLocation extends JModelAdmin
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return JFactory::getUser()->authorise('core.edit', 'com_supportgroups.location.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
return $user->authorise('location.edit', 'com_supportgroups.location.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('location.edit', 'com_supportgroups');
}
/**
@ -531,7 +623,7 @@ class SupportgroupsModelLocation extends JModelAdmin
$this->canDo = SupportgroupsHelper::getActions('location');
}
if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch'))
if (!$this->canDo->get('location.create') && !$this->canDo->get('location.batch'))
{
return false;
}
@ -546,7 +638,7 @@ class SupportgroupsModelLocation extends JModelAdmin
{
$values['published'] = 0;
}
elseif (isset($values['published']) && !$this->canDo->get('core.edit.state'))
elseif (isset($values['published']) && !$this->canDo->get('location.edit.state'))
{
$values['published'] = 0;
}
@ -563,7 +655,7 @@ class SupportgroupsModelLocation extends JModelAdmin
// only allow copy if user may edit this item.
if (!$this->user->authorise('core.edit', $contexts[$pk]))
if (!$this->user->authorise('location.edit', $contexts[$pk]))
{
@ -680,14 +772,14 @@ class SupportgroupsModelLocation extends JModelAdmin
$this->canDo = SupportgroupsHelper::getActions('location');
}
if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch'))
if (!$this->canDo->get('location.edit') && !$this->canDo->get('location.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('core.edit.state'))
if (isset($values['published']) && !$this->canDo->get('location.edit.state'))
{
unset($values['published']);
}
@ -697,7 +789,7 @@ class SupportgroupsModelLocation extends JModelAdmin
// Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('core.edit', $contexts[$pk]))
if (!$this->user->authorise('location.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));

View File

@ -107,6 +107,23 @@ class SupportgroupsModelLocations extends JModelList
// load parent items
$items = parent::getItems();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('location.access', 'com_supportgroups.location.' . (int) $item->id) && $user->authorise('location.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// return items
return $items;
}
@ -233,8 +250,17 @@ class SupportgroupsModelLocations extends JModelList
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('location.access', 'com_supportgroups.location.' . (int) $item->id) && $user->authorise('location.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);

888
admin/models/payment.php Normal file
View File

@ -0,0 +1,888 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payment.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
// import Joomla modelform library
jimport('joomla.application.component.modeladmin');
/**
* Supportgroups Payment Model
*/
class SupportgroupsModelPayment extends JModelAdmin
{
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_SUPPORTGROUPS';
/**
* The type alias for this content type.
*
* @var string
* @since 3.2
*/
public $typeAlias = 'com_supportgroups.payment';
/**
* Returns a Table object, always creating it
*
* @param type $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
*
* @since 1.6
*/
public function getTable($type = 'payment', $prefix = 'SupportgroupsTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
}
/**
* Method to get a single record.
*
* @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
*
* @since 1.6
*/
public function getItem($pk = null)
{
if ($item = parent::getItem($pk))
{
if (!empty($item->params))
{
// Convert the params field to an array.
$registry = new Registry;
$registry->loadString($item->params);
$item->params = $registry->toArray();
}
if (!empty($item->metadata))
{
// Convert the metadata field to an array.
$registry = new Registry;
$registry->loadString($item->metadata);
$item->metadata = $registry->toArray();
}
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_supportgroups.payment');
}
}
return $item;
}
/**
* Method to get the record form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return mixed A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // Get the form.
$form = $this->loadForm('com_supportgroups.payment', 'payment', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
{
return false;
}
$jinput = JFactory::getApplication()->input;
// The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
}
$user = JFactory::getUser();
// Check for existing item.
// Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('payment.edit.state', 'com_supportgroups.payment.' . (int) $id))
|| ($id == 0 && !$user->authorise('payment.edit.state', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// If this is a new item insure the greated by is set.
if (0 == $id)
{
// Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('payment.edit.created_by', 'com_supportgroups.payment.' . (int) $id))
|| ($id == 0 && !$user->authorise('payment.edit.created_by', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('payment.edit.created', 'com_supportgroups.payment.' . (int) $id))
|| ($id == 0 && !$user->authorise('payment.edit.created', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// Modify the form based on Edit Support Group access controls.
if ($id != 0 && (!$user->authorise('payment.edit.support_group', 'com_supportgroups.payment.' . (int) $id))
|| ($id == 0 && !$user->authorise('payment.edit.support_group', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('support_group', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('support_group', 'readonly', 'true');
if (!$form->getValue('support_group'))
{
// Disable fields while saving.
$form->setFieldAttribute('support_group', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('support_group', 'required', 'false');
}
}
// Modify the form based on Edit Year access controls.
if ($id != 0 && (!$user->authorise('payment.edit.year', 'com_supportgroups.payment.' . (int) $id))
|| ($id == 0 && !$user->authorise('payment.edit.year', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('year', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('year', 'readonly', 'true');
if (!$form->getValue('year'))
{
// Disable fields while saving.
$form->setFieldAttribute('year', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('year', 'required', 'false');
}
}
// Modify the form based on Edit Amount access controls.
if ($id != 0 && (!$user->authorise('payment.edit.amount', 'com_supportgroups.payment.' . (int) $id))
|| ($id == 0 && !$user->authorise('payment.edit.amount', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('amount', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('amount', 'readonly', 'true');
if (!$form->getValue('amount'))
{
// Disable fields while saving.
$form->setFieldAttribute('amount', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('amount', 'required', 'false');
}
}
// Only load these values if no id is found
if (0 == $id)
{
// Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
return $form;
}
/**
* Method to get the script that have to be included on the form
*
* @return string script files
*/
public function getScript()
{
return 'administrator/components/com_supportgroups/models/forms/payment.js';
}
/**
* Method to test whether a record can be deleted.
*
* @param object $record A record object.
*
* @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canDelete($record)
{
if (!empty($record->id))
{
if ($record->published != -2)
{
return;
}
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
return $user->authorise('payment.delete', 'com_supportgroups.payment.' . (int) $record->id);
}
return false;
}
/**
* Method to test whether a record can have its state edited.
*
* @param object $record A record object.
*
* @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canEditState($record)
{
$user = JFactory::getUser();
$recordId = (!empty($record->id)) ? $record->id : 0;
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('payment.edit.state', 'com_supportgroups.payment.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('payment.edit.state', 'com_supportgroups');
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
* @since 2.5
*/
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('payment.edit', 'com_supportgroups.payment.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('payment.edit', 'com_supportgroups');
}
/**
* Prepare and sanitise the table data prior to saving.
*
* @param JTable $table A JTable object.
*
* @return void
*
* @since 1.6
*/
protected function prepareTable($table)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if (isset($table->name))
{
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
}
if (isset($table->alias) && empty($table->alias))
{
$table->generateAlias();
}
if (empty($table->id))
{
$table->created = $date->toSql();
// set the user
if ($table->created_by == 0 || empty($table->created_by))
{
$table->created_by = $user->id;
}
// Set ordering to the last item if not set
if (empty($table->ordering))
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('MAX(ordering)')
->from($db->quoteName('#__supportgroups_payment'));
$db->setQuery($query);
$max = $db->loadResult();
$table->ordering = $max + 1;
}
}
else
{
$table->modified = $date->toSql();
$table->modified_by = $user->id;
}
if (!empty($table->id))
{
// Increment the items version number.
$table->version++;
}
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_supportgroups.edit.payment.data', array());
if (empty($data))
{
$data = $this->getItem();
}
return $data;
}
/**
* Method to get the unique fields of this table.
*
* @return mixed An array of field names, boolean false if none is set.
*
* @since 3.0
*/
protected function getUniqeFields()
{
return false;
}
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
* @since 12.2
*/
public function delete(&$pks)
{
if (!parent::delete($pks))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*
* @param array $commands An array of commands to perform.
* @param array $pks An array of item ids.
* @param array $contexts An array of item contexts.
*
* @return boolean Returns true on success, false on failure.
*
* @since 12.2
*/
public function batch($commands, $pks, $contexts)
{
// Sanitize ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true))
{
unset($pks[array_search(0, $pks, true)]);
}
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
$done = false;
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('payment');
$this->batchSet = true;
if (!$this->canDo->get('core.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
if ($this->type == false)
{
$type = new JUcmType;
$this->type = $type->getTypeByAlias($this->typeAlias);
}
$this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags');
if (!empty($commands['move_copy']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c')
{
$result = $this->batchCopy($commands, $pks, $contexts);
if (is_array($result))
{
foreach ($result as $old => $new)
{
$contexts[$new] = $contexts[$old];
}
$pks = array_values($result);
}
else
{
return false;
}
}
elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts))
{
return false;
}
$done = true;
}
if (!$done)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
// Clear the cache
$this->cleanCache();
return true;
}
/**
* Batch copy items to a new category or current.
*
* @param integer $values The new values.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return mixed An array of new IDs on success, boolean false on failure.
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('payment');
}
if (!$this->canDo->get('payment.create') && !$this->canDo->get('payment.batch'))
{
return false;
}
// get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// remove move_copy from array
unset($values['move_copy']);
// make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
}
elseif (isset($values['published']) && !$this->canDo->get('payment.edit.state'))
{
$values['published'] = 0;
}
$newIds = array();
// Parent exists so let's proceed
while (!empty($pks))
{
// Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// only allow copy if user may edit this item.
if (!$this->user->authorise('payment.edit', $contexts[$pk]))
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
$this->table->support_group = $this->generateUniqe('support_group',$this->table->support_group);
// insert all set values
if (SupportgroupsHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
if (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// update all uniqe fields
if (SupportgroupsHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField);
}
}
// Reset the ID because we are making a copy
$this->table->id = 0;
// TODO: Deal with ordering?
// $this->table->ordering = 1;
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
// Get the new item ID
$newId = $this->table->get('id');
// Add the new ID to the array
$newIds[$pk] = $newId;
}
// Clean the cache
$this->cleanCache();
return $newIds;
}
/**
* Batch move items to a new category
*
* @param integer $value The new category ID.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = SupportgroupsHelper::getActions('payment');
}
if (!$this->canDo->get('payment.edit') && !$this->canDo->get('payment.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('payment.edit.state'))
{
unset($values['published']);
}
// remove move_copy from array
unset($values['move_copy']);
// Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('payment.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// insert all set values.
if (SupportgroupsHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
}
elseif (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
}
// Clean the cache
$this->cleanCache();
return true;
}
/**
* Method to save the form data.
*
* @param array $data The form data.
*
* @return boolean True on success.
*
* @since 1.6
*/
public function save($data)
{
$input = JFactory::getApplication()->input;
$filter = JFilterInput::getInstance();
// set the metadata to the Item Data
if (isset($data['metadata']) && isset($data['metadata']['author']))
{
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{
$params = new JRegistry;
$params->loadArray($data['params']);
$data['params'] = (string) $params;
}
// Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SupportgroupsHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]);
}
}
}
if (parent::save($data))
{
return true;
}
return false;
}
/**
* Method to generate a uniqe value.
*
* @param string $field name.
* @param string $value data.
*
* @return string New value.
*
* @since 3.0
*/
protected function generateUniqe($field,$value)
{
// set field value uniqe
$table = $this->getTable();
while ($table->load(array($field => $value)))
{
$value = JString::increment($value);
}
return $value;
}
/**
* Method to change the title & alias.
*
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($title)
{
// Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))
{
$title = JString::increment($title);
}
return $title;
}
}

466
admin/models/payments.php Normal file
View File

@ -0,0 +1,466 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payments.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the Joomla modellist library
jimport('joomla.application.component.modellist');
/**
* Payments Model
*/
class SupportgroupsModelPayments extends JModelList
{
public function __construct($config = array())
{
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.support_group','support_group',
'a.year','year',
'a.amount','amount'
);
}
parent::__construct($config);
}
/**
* Method to auto-populate the model state.
*
* @return void
*/
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
}
$support_group = $this->getUserStateFromRequest($this->context . '.filter.support_group', 'filter_support_group');
$this->setState('filter.support_group', $support_group);
$year = $this->getUserStateFromRequest($this->context . '.filter.year', 'filter_year');
$this->setState('filter.year', $year);
$amount = $this->getUserStateFromRequest($this->context . '.filter.amount', 'filter_amount');
$this->setState('filter.amount', $amount);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
$this->setState('filter.created_by', $created_by);
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
$this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
}
/**
* Method to get an array of data items.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
// check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('payment.access', 'com_supportgroups.payment.' . (int) $item->id) && $user->authorise('payment.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// Try Convert the Amount to the Currency value
if (SupportgroupsHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert to currency here
$item->amount = SupportgroupsHelper::setCurrency($item->amount, $item->support_group);
}
}
// set selection value to a translatable value
if (SupportgroupsHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert year
$item->year = $this->selectionTranslation($item->year, 'year');
}
}
// return items
return $items;
}
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslation($value,$name)
{
// Array of year language strings
if ($name == 'year')
{
$yearArray = array(
0 => 'COM_SUPPORTGROUPS_PAYMENT_SELECT_A_YEAR',
2010 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TEN',
2011 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_ELEVEN',
2012 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWELVE',
2013 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_THIRTEEN',
2014 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_FOURTEEN',
2015 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_FIFTEEN',
2016 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_SIXTEEN',
2017 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_SEVENTEEN',
2018 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_EIGHTEEN',
2019 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_NINETEEN',
2020 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY',
2021 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_ONE',
2022 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_TWO',
2023 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_THREE',
2024 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_FOUR',
2025 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_FIVE',
2026 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_SIX',
2027 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_SEVEN',
2028 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_EIGHT',
2029 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_NINE',
2030 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_THIRTY'
);
// Now check if value is found in this array
if (isset($yearArray[$value]) && SupportgroupsHelper::checkString($yearArray[$value]))
{
return $yearArray[$value];
}
}
return $value;
}
/**
* Method to build an SQL query to load the list data.
*
* @return string An SQL query
*/
protected function getListQuery()
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_item table
$query->from($db->quoteName('#__supportgroups_payment', 'a'));
// From the supportgroups_support_group table.
$query->select($db->quoteName('g.name','support_group_name'));
$query->join('LEFT', $db->quoteName('#__supportgroups_support_group', 'g') . ' ON (' . $db->quoteName('a.support_group') . ' = ' . $db->quoteName('g.id') . ')');
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.published = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.published = 0 OR a.published = 1)');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where('a.id = ' . (int) substr($search, 3));
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$query->where('(a.support_group LIKE '.$search.' OR g.name LIKE '.$search.' OR a.year LIKE '.$search.' OR a.amount LIKE '.$search.')');
}
}
// Filter by support_group.
if ($support_group = $this->getState('filter.support_group'))
{
$query->where('a.support_group = ' . $db->quote($db->escape($support_group, true)));
}
// Filter by Year.
if ($year = $this->getState('filter.year'))
{
$query->where('a.year = ' . $db->quote($db->escape($year, true)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
}
return $query;
}
/**
* Method to get list export data.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
{
// setup the query
if (SupportgroupsHelper::checkArray($pks))
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_payment table
$query->from($db->quoteName('#__supportgroups_payment', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('payment.access', 'com_supportgroups.payment.' . (int) $item->id) && $user->authorise('payment.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SupportgroupsHelper::checkObject($headers))
{
array_unshift($items,$headers);
}
// Try Convert the Amount to the Currency value
if (SupportgroupsHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert to currency here
$item->amount = SupportgroupsHelper::setCurrency($item->amount, $item->support_group);
}
}
return $items;
}
}
return false;
}
/**
* Method to get header.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExImPortHeaders()
{
// Get a db connection.
$db = JFactory::getDbo();
// get the columns
$columns = $db->getTableColumns("#__supportgroups_payment");
if (SupportgroupsHelper::checkArray($columns))
{
// remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
$headers = new stdClass();
foreach ($columns as $column => $type)
{
$headers->{$column} = $column;
}
return $headers;
}
return false;
}
/**
* Method to get a store id based on model configuration state.
*
* @return string A store id.
*
*/
protected function getStoreId($id = '')
{
// Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.support_group');
$id .= ':' . $this->getState('filter.year');
$id .= ':' . $this->getState('filter.amount');
return parent::getStoreId($id);
}
/**
* Build an SQL query to checkin all items left checked out longer then a set time.
*
* @return a bool
*
*/
protected function checkInNow()
{
// Get set check in time
$time = JComponentHelper::getParams('com_supportgroups')->get('check_in');
if ($time)
{
// Get a db connection.
$db = JFactory::getDbo();
// reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__supportgroups_payment'));
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
$query->update($db->quoteName('#__supportgroups_payment'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}
}
return false;
}
}

View File

@ -101,10 +101,95 @@ class SupportgroupsModelRegion extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_supportgroups.region');
}
}
$this->regionvvvx = $item->id;
return $item;
}
/**
* Method to get list data.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getVvxlocations()
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_location table
$query->from($db->quoteName('#__supportgroups_location', 'a'));
// From the supportgroups_region table.
$query->select($db->quoteName('g.name','region_name'));
$query->join('LEFT', $db->quoteName('#__supportgroups_region', 'g') . ' ON (' . $db->quoteName('a.region') . ' = ' . $db->quoteName('g.id') . ')');
// Filter by regionvvvx global.
$regionvvvx = $this->regionvvvx;
if (is_numeric($regionvvvx ))
{
$query->where('a.region = ' . (int) $regionvvvx );
}
elseif (is_string($regionvvvx))
{
$query->where('a.region = ' . $db->quote($regionvvvx));
}
else
{
$query->where('a.region = -5');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('location.access', 'com_supportgroups.location.' . (int) $item->id) && $user->authorise('location.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
return $items;
}
return false;
}
/**
* Method to get the record form.
*
@ -141,8 +226,8 @@ class SupportgroupsModelRegion extends JModelAdmin
// Check for existing item.
// Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('core.edit.state', 'com_supportgroups.region.' . (int) $id))
|| ($id == 0 && !$user->authorise('core.edit.state', 'com_supportgroups')))
if ($id != 0 && (!$user->authorise('region.edit.state', 'com_supportgroups.region.' . (int) $id))
|| ($id == 0 && !$user->authorise('region.edit.state', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
@ -158,7 +243,8 @@ class SupportgroupsModelRegion extends JModelAdmin
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_supportgroups'))
if ($id != 0 && (!$user->authorise('region.edit.created_by', 'com_supportgroups.region.' . (int) $id))
|| ($id == 0 && !$user->authorise('region.edit.created_by', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
@ -168,7 +254,8 @@ class SupportgroupsModelRegion extends JModelAdmin
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_supportgroups'))
if ($id != 0 && (!$user->authorise('region.edit.created', 'com_supportgroups.region.' . (int) $id))
|| ($id == 0 && !$user->authorise('region.edit.created', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
@ -254,7 +341,7 @@ class SupportgroupsModelRegion extends JModelAdmin
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
return $user->authorise('core.delete', 'com_supportgroups.region.' . (int) $record->id);
return $user->authorise('region.delete', 'com_supportgroups.region.' . (int) $record->id);
}
return false;
}
@ -276,14 +363,14 @@ class SupportgroupsModelRegion extends JModelAdmin
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit.state', 'com_supportgroups.region.' . (int) $recordId);
$permission = $user->authorise('region.edit.state', 'com_supportgroups.region.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
return parent::canEditState($record);
return $user->authorise('region.edit.state', 'com_supportgroups');
}
/**
@ -298,8 +385,9 @@ class SupportgroupsModelRegion extends JModelAdmin
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return JFactory::getUser()->authorise('core.edit', 'com_supportgroups.region.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
return $user->authorise('region.edit', 'com_supportgroups.region.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('region.edit', 'com_supportgroups');
}
/**
@ -531,7 +619,7 @@ class SupportgroupsModelRegion extends JModelAdmin
$this->canDo = SupportgroupsHelper::getActions('region');
}
if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch'))
if (!$this->canDo->get('region.create') && !$this->canDo->get('region.batch'))
{
return false;
}
@ -546,7 +634,7 @@ class SupportgroupsModelRegion extends JModelAdmin
{
$values['published'] = 0;
}
elseif (isset($values['published']) && !$this->canDo->get('core.edit.state'))
elseif (isset($values['published']) && !$this->canDo->get('region.edit.state'))
{
$values['published'] = 0;
}
@ -563,7 +651,7 @@ class SupportgroupsModelRegion extends JModelAdmin
// only allow copy if user may edit this item.
if (!$this->user->authorise('core.edit', $contexts[$pk]))
if (!$this->user->authorise('region.edit', $contexts[$pk]))
{
@ -680,14 +768,14 @@ class SupportgroupsModelRegion extends JModelAdmin
$this->canDo = SupportgroupsHelper::getActions('region');
}
if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch'))
if (!$this->canDo->get('region.edit') && !$this->canDo->get('region.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('core.edit.state'))
if (isset($values['published']) && !$this->canDo->get('region.edit.state'))
{
unset($values['published']);
}
@ -697,7 +785,7 @@ class SupportgroupsModelRegion extends JModelAdmin
// Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('core.edit', $contexts[$pk]))
if (!$this->user->authorise('region.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));

View File

@ -107,6 +107,23 @@ class SupportgroupsModelRegions extends JModelList
// load parent items
$items = parent::getItems();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('region.access', 'com_supportgroups.region.' . (int) $item->id) && $user->authorise('region.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// return items
return $items;
}
@ -233,8 +250,17 @@ class SupportgroupsModelRegions extends JModelList
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('region.access', 'com_supportgroups.region.' . (int) $item->id) && $user->authorise('region.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);

View File

@ -101,10 +101,159 @@ class SupportgroupsModelSupport_group extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_supportgroups.support_group');
}
}
$this->support_groupvvvv = $item->id;
return $item;
}
/**
* Method to get list data.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getVvvpayments()
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the supportgroups_payment table
$query->from($db->quoteName('#__supportgroups_payment', 'a'));
// From the supportgroups_support_group table.
$query->select($db->quoteName('g.name','support_group_name'));
$query->join('LEFT', $db->quoteName('#__supportgroups_support_group', 'g') . ' ON (' . $db->quoteName('a.support_group') . ' = ' . $db->quoteName('g.id') . ')');
// Filter by support_groupvvvv global.
$support_groupvvvv = $this->support_groupvvvv;
if (is_numeric($support_groupvvvv ))
{
$query->where('a.support_group = ' . (int) $support_groupvvvv );
}
elseif (is_string($support_groupvvvv))
{
$query->where('a.support_group = ' . $db->quote($support_groupvvvv));
}
else
{
$query->where('a.support_group = -5');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_supportgroups'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('payment.access', 'com_supportgroups.payment.' . (int) $item->id) && $user->authorise('payment.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// Try Convert the Amount to the Currency value
if (SupportgroupsHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert to currency here
$item->amount = SupportgroupsHelper::setCurrency($item->amount, $item->support_group);
}
}
// set selection value to a translatable value
if (SupportgroupsHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert year
$item->year = $this->selectionTranslationVvvpayments($item->year, 'year');
}
}
return $items;
}
return false;
}
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslationVvvpayments($value,$name)
{
// Array of year language strings
if ($name == 'year')
{
$yearArray = array(
0 => 'COM_SUPPORTGROUPS_PAYMENT_SELECT_A_YEAR',
2010 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TEN',
2011 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_ELEVEN',
2012 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWELVE',
2013 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_THIRTEEN',
2014 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_FOURTEEN',
2015 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_FIFTEEN',
2016 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_SIXTEEN',
2017 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_SEVENTEEN',
2018 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_EIGHTEEN',
2019 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_NINETEEN',
2020 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY',
2021 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_ONE',
2022 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_TWO',
2023 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_THREE',
2024 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_FOUR',
2025 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_FIVE',
2026 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_SIX',
2027 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_SEVEN',
2028 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_EIGHT',
2029 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_TWENTY_NINE',
2030 => 'COM_SUPPORTGROUPS_PAYMENT_TWO_THOUSAND_AND_THIRTY'
);
// Now check if value is found in this array
if (isset($yearArray[$value]) && SupportgroupsHelper::checkString($yearArray[$value]))
{
return $yearArray[$value];
}
}
return $value;
}
/**
* Method to get the record form.
*
@ -141,8 +290,8 @@ class SupportgroupsModelSupport_group extends JModelAdmin
// Check for existing item.
// Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('core.edit.state', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('core.edit.state', 'com_supportgroups')))
if ($id != 0 && (!$user->authorise('support_group.edit.state', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.state', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
@ -158,7 +307,8 @@ class SupportgroupsModelSupport_group extends JModelAdmin
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_supportgroups'))
if ($id != 0 && (!$user->authorise('support_group.edit.created_by', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.created_by', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
@ -168,7 +318,8 @@ class SupportgroupsModelSupport_group extends JModelAdmin
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_supportgroups'))
if ($id != 0 && (!$user->authorise('support_group.edit.created', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.created', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
@ -191,6 +342,134 @@ class SupportgroupsModelSupport_group extends JModelAdmin
$form->setFieldAttribute('name', 'required', 'false');
}
}
// Modify the form based on Edit Phone access controls.
if ($id != 0 && (!$user->authorise('support_group.edit.phone', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.phone', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('phone', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('phone', 'readonly', 'true');
if (!$form->getValue('phone'))
{
// Disable fields while saving.
$form->setFieldAttribute('phone', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('phone', 'required', 'false');
}
}
// Modify the form based on Edit Location access controls.
if ($id != 0 && (!$user->authorise('support_group.edit.location', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.location', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('location', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('location', 'readonly', 'true');
if (!$form->getValue('location'))
{
// Disable fields while saving.
$form->setFieldAttribute('location', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('location', 'required', 'false');
}
}
// Modify the form based on Edit Clinic access controls.
if ($id != 0 && (!$user->authorise('support_group.edit.clinic', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.clinic', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('clinic', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('clinic', 'readonly', 'true');
if (!$form->getValue('clinic'))
{
// Disable fields while saving.
$form->setFieldAttribute('clinic', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('clinic', 'required', 'false');
}
}
// Modify the form based on Edit Male access controls.
if ($id != 0 && (!$user->authorise('support_group.edit.male', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.male', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('male', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('male', 'readonly', 'true');
if (!$form->getValue('male'))
{
// Disable fields while saving.
$form->setFieldAttribute('male', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('male', 'required', 'false');
}
}
// Modify the form based on Edit Female access controls.
if ($id != 0 && (!$user->authorise('support_group.edit.female', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.female', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('female', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('female', 'readonly', 'true');
if (!$form->getValue('female'))
{
// Disable fields while saving.
$form->setFieldAttribute('female', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('female', 'required', 'false');
}
}
// Modify the form based on Edit Female Art access controls.
if ($id != 0 && (!$user->authorise('support_group.edit.female_art', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.female_art', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('female_art', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('female_art', 'readonly', 'true');
if (!$form->getValue('female_art'))
{
// Disable fields while saving.
$form->setFieldAttribute('female_art', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('female_art', 'required', 'false');
}
}
// Modify the form based on Edit Male Art access controls.
if ($id != 0 && (!$user->authorise('support_group.edit.male_art', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.male_art', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('male_art', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('male_art', 'readonly', 'true');
if (!$form->getValue('male_art'))
{
// Disable fields while saving.
$form->setFieldAttribute('male_art', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('male_art', 'required', 'false');
}
}
// Modify the form based on Edit Male Children access controls.
if ($id != 0 && (!$user->authorise('support_group.edit.male_children', 'com_supportgroups.support_group.' . (int) $id))
|| ($id == 0 && !$user->authorise('support_group.edit.male_children', 'com_supportgroups')))
{
// Disable fields for display.
$form->setFieldAttribute('male_children', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('male_children', 'readonly', 'true');
if (!$form->getValue('male_children'))
{
// Disable fields while saving.
$form->setFieldAttribute('male_children', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('male_children', 'required', 'false');
}
}
// Only load these values if no id is found
if (0 == $id)
{
@ -238,7 +517,7 @@ class SupportgroupsModelSupport_group extends JModelAdmin
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
return $user->authorise('core.delete', 'com_supportgroups.support_group.' . (int) $record->id);
return $user->authorise('support_group.delete', 'com_supportgroups.support_group.' . (int) $record->id);
}
return false;
}
@ -260,14 +539,14 @@ class SupportgroupsModelSupport_group extends JModelAdmin
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit.state', 'com_supportgroups.support_group.' . (int) $recordId);
$permission = $user->authorise('support_group.edit.state', 'com_supportgroups.support_group.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
return parent::canEditState($record);
return $user->authorise('support_group.edit.state', 'com_supportgroups');
}
/**
@ -282,8 +561,9 @@ class SupportgroupsModelSupport_group extends JModelAdmin
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return JFactory::getUser()->authorise('core.edit', 'com_supportgroups.support_group.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
return $user->authorise('support_group.edit', 'com_supportgroups.support_group.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('support_group.edit', 'com_supportgroups');
}
/**
@ -515,7 +795,7 @@ class SupportgroupsModelSupport_group extends JModelAdmin
$this->canDo = SupportgroupsHelper::getActions('support_group');
}
if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch'))
if (!$this->canDo->get('support_group.create') && !$this->canDo->get('support_group.batch'))
{
return false;
}
@ -530,7 +810,7 @@ class SupportgroupsModelSupport_group extends JModelAdmin
{
$values['published'] = 0;
}
elseif (isset($values['published']) && !$this->canDo->get('core.edit.state'))
elseif (isset($values['published']) && !$this->canDo->get('support_group.edit.state'))
{
$values['published'] = 0;
}
@ -547,7 +827,7 @@ class SupportgroupsModelSupport_group extends JModelAdmin
// only allow copy if user may edit this item.
if (!$this->user->authorise('core.edit', $contexts[$pk]))
if (!$this->user->authorise('support_group.edit', $contexts[$pk]))
{
@ -664,14 +944,14 @@ class SupportgroupsModelSupport_group extends JModelAdmin
$this->canDo = SupportgroupsHelper::getActions('support_group');
}
if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch'))
if (!$this->canDo->get('support_group.edit') && !$this->canDo->get('support_group.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('core.edit.state'))
if (isset($values['published']) && !$this->canDo->get('support_group.edit.state'))
{
unset($values['published']);
}
@ -681,7 +961,7 @@ class SupportgroupsModelSupport_group extends JModelAdmin
// Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('core.edit', $contexts[$pk]))
if (!$this->user->authorise('support_group.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));

View File

@ -44,7 +44,12 @@ class SupportgroupsModelSupport_groups extends JModelList
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.name','name'
'a.name','name',
'a.phone','phone',
'a.location','location',
'a.clinic','clinic',
'a.male','male',
'a.female','female'
);
}
@ -68,6 +73,21 @@ class SupportgroupsModelSupport_groups extends JModelList
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$phone = $this->getUserStateFromRequest($this->context . '.filter.phone', 'filter_phone');
$this->setState('filter.phone', $phone);
$location = $this->getUserStateFromRequest($this->context . '.filter.location', 'filter_location');
$this->setState('filter.location', $location);
$clinic = $this->getUserStateFromRequest($this->context . '.filter.clinic', 'filter_clinic');
$this->setState('filter.clinic', $clinic);
$male = $this->getUserStateFromRequest($this->context . '.filter.male', 'filter_male');
$this->setState('filter.male', $male);
$female = $this->getUserStateFromRequest($this->context . '.filter.female', 'filter_female');
$this->setState('filter.female', $female);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -103,6 +123,23 @@ class SupportgroupsModelSupport_groups extends JModelList
// load parent items
$items = parent::getItems();
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('support_group.access', 'com_supportgroups.support_group.' . (int) $item->id) && $user->authorise('support_group.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// return items
return $items;
}
@ -126,6 +163,14 @@ class SupportgroupsModelSupport_groups extends JModelList
// From the supportgroups_item table
$query->from($db->quoteName('#__supportgroups_support_group', 'a'));
// From the supportgroups_location table.
$query->select($db->quoteName('g.name','location_name'));
$query->join('LEFT', $db->quoteName('#__supportgroups_location', 'g') . ' ON (' . $db->quoteName('a.location') . ' = ' . $db->quoteName('g.id') . ')');
// From the supportgroups_clinic table.
$query->select($db->quoteName('h.name','clinic_name'));
$query->join('LEFT', $db->quoteName('#__supportgroups_clinic', 'h') . ' ON (' . $db->quoteName('a.clinic') . ' = ' . $db->quoteName('h.id') . ')');
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
@ -162,10 +207,20 @@ class SupportgroupsModelSupport_groups extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$query->where('(a.name LIKE '.$search.')');
$query->where('(a.name LIKE '.$search.' OR a.phone LIKE '.$search.' OR a.location LIKE '.$search.' OR g.name LIKE '.$search.' OR a.clinic LIKE '.$search.' OR h.name LIKE '.$search.')');
}
}
// Filter by location.
if ($location = $this->getState('filter.location'))
{
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
}
// Filter by clinic.
if ($clinic = $this->getState('filter.clinic'))
{
$query->where('a.clinic = ' . $db->quote($db->escape($clinic, true)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -220,8 +275,17 @@ class SupportgroupsModelSupport_groups extends JModelList
// set values to display correctly.
if (SupportgroupsHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('support_group.access', 'com_supportgroups.support_group.' . (int) $item->id) && $user->authorise('support_group.access', 'com_supportgroups'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
@ -283,6 +347,11 @@ class SupportgroupsModelSupport_groups extends JModelList
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.phone');
$id .= ':' . $this->getState('filter.location');
$id .= ':' . $this->getState('filter.clinic');
$id .= ':' . $this->getState('filter.male');
$id .= ':' . $this->getState('filter.female');
return parent::getStoreId($id);
}

View File

@ -43,29 +43,52 @@ class SupportgroupsModelSupportgroups extends JModelList
$icons = array();
// view groups array
$viewGroups = array(
'main' => array('png.support_group.add', 'png.support_groups', 'png.location.add', 'png.locations', 'png.region.add', 'png.regions', 'png.currencies', 'png.countries')
'main' => array('png.support_group.add', 'png.support_groups', 'png.payment.add', 'png.payments', 'png.clinics', 'png.locations', 'png.regions', 'png.countries', 'png.currencies', 'png.help_documents')
);
// view access array
$viewAccess = array(
'support_group.create' => 'support_group.create',
'support_groups.access' => 'support_group.access',
'support_group.access' => 'support_group.access',
'support_groups.submenu' => 'support_group.submenu',
'support_groups.dashboard_list' => 'support_group.dashboard_list',
'support_group.dashboard_add' => 'support_group.dashboard_add',
'payment.create' => 'payment.create',
'payments.access' => 'payment.access',
'payment.access' => 'payment.access',
'payments.submenu' => 'payment.submenu',
'payments.dashboard_list' => 'payment.dashboard_list',
'payment.dashboard_add' => 'payment.dashboard_add',
'clinic.create' => 'clinic.create',
'clinics.access' => 'clinic.access',
'clinic.access' => 'clinic.access',
'clinics.submenu' => 'clinic.submenu',
'clinics.dashboard_list' => 'clinic.dashboard_list',
'location.create' => 'location.create',
'locations.access' => 'location.access',
'location.access' => 'location.access',
'locations.submenu' => 'location.submenu',
'locations.dashboard_list' => 'location.dashboard_list',
'location.dashboard_add' => 'location.dashboard_add',
'region.create' => 'region.create',
'regions.access' => 'region.access',
'region.access' => 'region.access',
'regions.submenu' => 'region.submenu',
'regions.dashboard_list' => 'region.dashboard_list',
'region.dashboard_add' => 'region.dashboard_add',
'country.create' => 'country.create',
'countries.access' => 'country.access',
'country.access' => 'country.access',
'countries.submenu' => 'country.submenu',
'countries.dashboard_list' => 'country.dashboard_list',
'currency.create' => 'currency.create',
'currencies.access' => 'currency.access',
'currency.access' => 'currency.access',
'currencies.submenu' => 'currency.submenu',
'currencies.dashboard_list' => 'currency.dashboard_list',
'country.create' => 'country.create',
'countries.access' => 'country.access',
'country.access' => 'country.access',
'countries.submenu' => 'country.submenu',
'countries.dashboard_list' => 'country.dashboard_list');
'help_document.create' => 'help_document.create',
'help_documents.access' => 'help_document.access',
'help_document.access' => 'help_document.access',
'help_documents.submenu' => 'help_document.submenu',
'help_documents.dashboard_list' => 'help_document.dashboard_list');
foreach($viewGroups as $group => $views)
{
$i = 0;

View File

@ -1,7 +1,83 @@
CREATE TABLE IF NOT EXISTS `#__supportgroups_support_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
`area` TEXT NOT NULL DEFAULT '',
`clinic` INT(11) NOT NULL DEFAULT '0',
`female` INT(11) NOT NULL DEFAULT '0',
`female_art` INT(11) NOT NULL DEFAULT '0',
`female_children` INT(11) NOT NULL DEFAULT '0',
`location` INT(11) NOT NULL DEFAULT '0',
`male` INT(11) NOT NULL DEFAULT '0',
`male_art` INT(11) NOT NULL DEFAULT '0',
`male_children` INT(11) NOT NULL DEFAULT '0',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`phone` VARCHAR(64) NOT NULL DEFAULT '',
`params` TEXT NOT NULL DEFAULT '',
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
`modified_by` int(11) NOT NULL DEFAULT '0',
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`checked_out` int(11) NOT NULL,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`version` int(11) NOT NULL DEFAULT '1',
`hits` int(11) NOT NULL DEFAULT '0',
`access` int(11) DEFAULT NULL,
`ordering` int(11) NOT NULL DEFAULT '0',
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_name` (`name`),
KEY `idx_location` (`location`),
KEY `idx_clinic` (`clinic`),
KEY `idx_male` (`male`),
KEY `idx_female` (`female`),
KEY `idx_female_art` (`female_art`),
KEY `idx_male_art` (`male_art`),
KEY `idx_female_children` (`female_children`),
KEY `idx_male_children` (`male_children`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__supportgroups_payment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
`amount` VARCHAR(100) NOT NULL DEFAULT '0',
`support_group` INT(11) NOT NULL DEFAULT '0',
`year` INT(11) NOT NULL DEFAULT '0',
`params` TEXT NOT NULL DEFAULT '',
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
`modified_by` int(11) NOT NULL DEFAULT '0',
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`checked_out` int(11) NOT NULL,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`version` int(11) NOT NULL DEFAULT '1',
`hits` int(11) NOT NULL DEFAULT '0',
`access` int(11) DEFAULT NULL,
`ordering` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_support_group` (`support_group`),
KEY `idx_year` (`year`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__supportgroups_clinic` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
`area` TEXT NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`phone` VARCHAR(64) NOT NULL DEFAULT '',
`params` TEXT NOT NULL DEFAULT '',
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
@ -87,6 +163,44 @@ CREATE TABLE IF NOT EXISTS `#__supportgroups_region` (
KEY `idx_country` (`country`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__supportgroups_country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
`alias` CHAR(64) NOT NULL DEFAULT '',
`codethree` CHAR(7) NOT NULL DEFAULT '',
`codetwo` CHAR(7) NOT NULL DEFAULT '',
`currency` CHAR(7) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`worldzone` VARCHAR(255) NOT NULL DEFAULT '',
`params` TEXT NOT NULL DEFAULT '',
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
`modified_by` int(11) NOT NULL DEFAULT '0',
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`checked_out` int(11) NOT NULL,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`version` int(11) NOT NULL DEFAULT '1',
`hits` int(11) NOT NULL DEFAULT '0',
`access` int(11) DEFAULT NULL,
`ordering` int(11) NOT NULL DEFAULT '0',
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_name` (`name`),
KEY `idx_currency` (`currency`),
KEY `idx_worldzone` (`worldzone`),
KEY `idx_codethree` (`codethree`),
KEY `idx_codetwo` (`codetwo`),
KEY `idx_alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__supportgroups_currency` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
@ -127,15 +241,21 @@ CREATE TABLE IF NOT EXISTS `#__supportgroups_currency` (
KEY `idx_alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__supportgroups_country` (
CREATE TABLE IF NOT EXISTS `#__supportgroups_help_document` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
`admin_view` CHAR(255) NOT NULL DEFAULT '',
`alias` CHAR(64) NOT NULL DEFAULT '',
`codethree` CHAR(7) NOT NULL DEFAULT '',
`codetwo` CHAR(7) NOT NULL DEFAULT '',
`currency` CHAR(7) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`worldzone` VARCHAR(255) NOT NULL DEFAULT '',
`article` TINYINT(1) NOT NULL DEFAULT '0',
`content` TEXT NOT NULL DEFAULT '',
`groups` TEXT NOT NULL DEFAULT '',
`location` TINYINT(1) NOT NULL DEFAULT '0',
`not_required` INT(1) NOT NULL DEFAULT '0',
`site_view` CHAR(255) NOT NULL DEFAULT '',
`target` TINYINT(1) NOT NULL DEFAULT '0',
`title` CHAR(64) NOT NULL DEFAULT '',
`type` TINYINT(1) NOT NULL DEFAULT '0',
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` TEXT NOT NULL DEFAULT '',
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
@ -148,195 +268,22 @@ CREATE TABLE IF NOT EXISTS `#__supportgroups_country` (
`hits` int(11) NOT NULL DEFAULT '0',
`access` int(11) DEFAULT NULL,
`ordering` int(11) NOT NULL DEFAULT '0',
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_name` (`name`),
KEY `idx_currency` (`currency`),
KEY `idx_worldzone` (`worldzone`),
KEY `idx_codethree` (`codethree`),
KEY `idx_codetwo` (`codetwo`),
KEY `idx_alias` (`alias`)
KEY `idx_title` (`title`),
KEY `idx_type` (`type`),
KEY `idx_location` (`location`),
KEY `idx_target` (`target`),
KEY `idx_alias` (`alias`),
KEY `idx_article` (`article`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `#__supportgroups_currency`
--
INSERT INTO `#__supportgroups_currency` (`id`, `alias`, `codethree`, `decimalplace`, `decimalsymbol`, `name`, `negativestyle`, `numericcode`, `positivestyle`, `symbol`, `thousands`, `params`, `published`, `created_by`, `modified_by`, `created`, `modified`, `checked_out`, `checked_out_time`, `version`, `hits`, `access`, `ordering`) VALUES
(1, '', 'AED', 2, ',', 'United Arab Emirates dirham', '{sign}{number} {symbol}', 784, '{number} {symbol}', 'د.إ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 23),
(2, '', 'AFN', 2, ',', 'Afghan afghani', '{sign}{number} {symbol}', 971, '{number} {symbol}', '؋', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 24),
(3, '', 'ALL', 2, ',', 'Albanian lek', '{sign}{number} {symbol}', 8, '{number} {symbol}', 'Lek', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 25),
(4, '', 'AMD', 2, ',', 'Armenian dram', '{sign}{number} {symbol}', 51, '{number} {symbol}', 'դր.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 26),
(5, '', 'ANG', 2, ',', 'Netherlands Antillean gulden', '{sign}{number} {symbol}', 532, '{number} {symbol}', 'ƒ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 27),
(6, '', 'AOA', 2, ',', 'Angolan kwanza', '{sign}{number} {symbol}', 973, '{number} {symbol}', 'Kz', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 28),
(7, '', 'ARS', 2, ',', 'Argentine peso', '{sign}{number} {symbol}', 32, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 29),
(8, '', 'AUD', 2, '.', 'Australian dollar', '{sign}{symbol} {number}', 36, '{symbol} {number}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 5),
(9, '', 'AWG', 2, ',', 'Aruban florin', '{sign}{number} {symbol}', 533, '{number} {symbol}', 'ƒ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 30),
(10, '', 'AZN', 2, ',', 'Azerbaijani manat', '{sign}{number} {symbol}', 934, '{number} {symbol}', 'ман', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 31),
(11, '', 'BAM', 2, ',', 'Bosnia and Herzegovina convert', '{sign}{number} {symbol}', 977, '{number} {symbol}', 'KM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 32),
(12, '', 'BBD', 2, ',', 'Barbadian dollar', '{sign}{number} {symbol}', 52, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 33),
(13, '', 'BDT', 2, ',', 'Bangladeshi taka', '{sign}{number} {symbol}', 50, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 34),
(14, '', 'BGN', 2, ',', 'Bulgarian lev', '{sign}{number} {symbol}', 975, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 35),
(15, '', 'BHD', 2, ',', 'Bahraini dinar', '{sign}{number} {symbol}', 48, '{number} {symbol}', 'ب.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 36),
(16, '', 'BIF', '', '', 'Burundian franc', '{sign}{number} {symbol}', 108, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 37),
(17, '', 'BMD', 2, ',', 'Bermudian dollar', '{sign}{number} {symbol}', 60, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 38),
(18, '', 'BND', 2, ',', 'Brunei dollar', '{sign}{number} {symbol}', 96, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 39),
(19, '', 'BOB', 2, ',', 'Bolivian boliviano', '{sign}{number} {symbol}', 68, '{number} {symbol}', '$b', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 40),
(20, '', 'BOV', 2, ',', 'Mvdol', '{sign}{number} {symbol}', 984, '{number} {symbol}', 'BOV', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 41),
(21, '', 'BRL', 2, '.', 'Brazilian real', '{symbol} {sign}{number}', 986, '{symbol} {number}', 'R$', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 17),
(22, '', 'BSD', 2, ',', 'Bahamian dollar', '{sign}{number} {symbol}', 44, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 42),
(23, '', 'BTN', 2, ',', 'Bhutanese ngultrum', '{sign}{number} {symbol}', 64, '{number} {symbol}', 'BTN', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 43),
(24, '', 'BWP', 2, ',', 'Botswana pula', '{sign}{number} {symbol}', 72, '{number} {symbol}', 'P', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 44),
(25, '', 'BYR', '', '', 'Belarusian ruble', '{sign}{number} {symbol}', 974, '{number} {symbol}', 'p.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 45),
(26, '', 'BZD', 2, ',', 'Belize dollar', '{sign}{number} {symbol}', 84, '{number} {symbol}', 'BZ$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 46),
(27, '', 'CAD', 2, '.', 'Canadian dollar', '{symbol}{sign}{number}', 124, '{symbol}{number}', '$', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 7),
(28, '', 'CDF', 2, ',', 'Congolese franc', '{sign}{number} {symbol}', 976, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 47),
(29, '', 'CHE', 2, ',', 'WIR Euro', '{sign}{number} {symbol}', 947, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 48),
(30, '', 'CHF', 2, ',', 'Swiss franc', '{sign}{number} {symbol}', 756, '{number} {symbol}', 'CHF', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 6),
(31, '', 'CHW', 2, ',', 'WIR Franc', '{sign}{number} {symbol}', 948, '{number} {symbol}', 'CHW', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 49),
(32, '', 'CLF', '', ',', 'Unidad de Fomento', '{sign}{number} {symbol}', 990, '{number} {symbol}', 'CLF', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 50),
(33, '', 'CLP', 2, ',', 'Chilean peso', '{sign}{number} {symbol}', 152, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 51),
(34, '', 'CNY', 2, ',', 'Chinese renminbi yuan', '{sign}{number} {symbol}', 156, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 9),
(35, '', 'COP', 2, ',', 'Colombian peso', '{sign}{number} {symbol}', 170, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 52),
(36, '', 'COU', 2, ',', 'Unidad de Valor Real', '{sign}{number} {symbol}', 970, '{number} {symbol}', 'COU', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 53),
(37, '', 'CRC', 2, ',', 'Costa Rican colón', '{sign}{number} {symbol}', 188, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 54),
(38, '', 'CZK', 2, ',', 'Czech koruna', '{sign}{number} {symbol}', 203, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 57),
(39, '', 'CUP', 2, ',', 'Cuban peso', '{sign}{number} {symbol}', 192, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 55),
(40, '', 'CVE', '', '', 'Cape Verdean escudo', '{sign}{number} {symbol}', 132, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 56),
(41, '', 'DJF', '', '', 'Djiboutian franc', '{sign}{number} {symbol}', 262, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 58),
(42, '', 'DKK', 2, '.', 'Danish krone', '{symbol}{sign}{number}', 208, '{symbol}{number}', 'kr', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 19),
(43, '', 'DOP', 2, ',', 'Dominican peso', '{sign}{number} {symbol}', 214, '{number} {symbol}', 'RD$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 59),
(44, '', 'DZD', 2, ',', 'Algerian dinar', '{sign}{number} {symbol}', 12, '{number} {symbol}', 'د.ج', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 60),
(45, '', 'EGP', 2, ',', 'Egyptian pound', '{sign}{number} {symbol}', 818, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 61),
(46, '', 'ERN', 2, ',', 'Eritrean nakfa', '{sign}{number} {symbol}', 232, '{number} {symbol}', 'Nfk', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 62),
(47, '', 'ETB', 2, ',', 'Ethiopian birr', '{sign}{number} {symbol}', 230, '{number} {symbol}', 'ETB', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 63),
(48, '', 'EUR', 2, ',', 'Euro', '{sign}{number} {symbol}', 978, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 2),
(49, '', 'FJD', 2, ',', 'Fijian dollar', '{sign}{number} {symbol}', 242, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 64),
(50, '', 'FKP', 2, ',', 'Falkland pound', '{sign}{number} {symbol}', 238, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 65),
(51, '', 'GBP', 2, '.', 'British pound', '{symbol}{sign}{number}', 826, '{symbol}{number}', '£', ',', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 4),
(52, '', 'GEL', 2, ',', 'Georgian lari', '{sign}{number} {symbol}', 981, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 66),
(53, '', 'GHS', 2, ',', 'Ghanaian cedi', '{sign}{number} {symbol}', 936, '{number} {symbol}', '', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 67),
(54, '', 'GIP', 2, ',', 'Gibraltar pound', '{sign}{number} {symbol}', 292, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 68),
(55, '', 'GMD', 2, ',', 'Gambian dalasi', '{sign}{number} {symbol}', 270, '{number} {symbol}', 'D', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 69),
(56, '', 'GNF', '', '', 'Guinean franc', '{sign}{number} {symbol}', 324, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 70),
(57, '', 'GTQ', 2, ',', 'Guatemalan quetzal', '{sign}{number} {symbol}', 320, '{number} {symbol}', 'Q', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 71),
(58, '', 'GYD', 2, ',', 'Guyanese dollar', '{sign}{number} {symbol}', 328, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 72),
(59, '', 'HKD', 2, ',', 'Hong Kong dollar', '{sign}{number} {symbol}', 344, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 13),
(60, '', 'HNL', 2, ',', 'Honduran lempira', '{sign}{number} {symbol}', 340, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 73),
(61, '', 'HRK', 2, ',', 'Croatian kuna', '{sign}{number} {symbol}', 191, '{number} {symbol}', 'kn', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 74),
(62, '', 'HTG', 2, ',', 'Haitian gourde', '{sign}{number} {symbol}', 332, '{number} {symbol}', 'G', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 75),
(63, '', 'HUF', 2, ',', 'Hungarian forint', '{sign}{number} {symbol}', 348, '{number} {symbol}', 'Ft', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 76),
(64, '', 'IDR', '', '', 'Indonesian rupiah', '{symbol}{sign}{number}', 360, '{symbol}{number}', 'Rp', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 77),
(65, '', 'ILS', 2, ',', 'Israeli new sheqel', '{sign}{number} {symbol}', 376, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 20),
(66, '', 'INR', 2, ',', 'Indian rupee', '{sign}{number} {symbol}', 356, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 16),
(67, '', 'IQD', '', '', 'Iraqi dinar', '{sign}{number} {symbol}', 368, '{number} {symbol}', 'ع.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 78),
(68, '', 'IRR', 2, ',', 'Iranian rial', '{sign}{number}{symb0l}', 364, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 79),
(69, '', 'ISK', 2, ',', 'Icelandic króna', '{sign}{number} {symbol}', 352, '{number} {symbol}', 'kr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 80),
(70, '', 'JMD', 2, ',', 'Jamaican dollar', '{sign}{number} {symbol}', 388, '{number} {symbol}', 'J$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 81),
(71, '', 'JOD', 2, ',', 'Jordanian dinar', '{sign}{number} {symbol}', 400, '{number} {symbol}', 'د.ا', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 82),
(72, '', 'JPY', 2, ',', 'Japanese yen', '{sign}{number} {symbol}', 392, '{number} {symbol}', '¥', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 3),
(73, '', 'KES', 2, ',', 'Kenyan shilling', '{sign}{number} {symbol}', 404, '{number} {symbol}', 'Sh', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 83),
(74, '', 'KGS', 2, ',', 'Kyrgyzstani som', '{sign}{number} {symbol}', 417, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 84),
(75, '', 'KHR', 2, ',', 'Cambodian riel', '{sign}{number} {symbol}', 116, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 85),
(76, '', 'KMF', '', '', 'Comorian franc', '{sign}{number} {symbol}', 174, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 86),
(77, '', 'KPW', '', '', 'North Korean won', '{sign}{number} {symbol}', 408, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 87),
(78, '', 'KRW', '', '', 'South Korean won', '{sign}{number} {symbol}', 410, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 21),
(79, '', 'KWD', 2, ',', 'Kuwaiti dinar', '{sign}{number} {symbol}', 414, '{number} {symbol}', 'د.ك', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 88),
(80, '', 'KYD', 2, ',', 'Cayman Islands dollar', '{sign}{number} {symbol}', 136, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 89),
(81, '', 'KZT', 2, ',', 'Kazakhstani tenge', '{sign}{number} {symbol}', 398, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 90),
(82, '', 'LAK', '', '', 'Lao kip', '{sign}{number} {symbol}', 418, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 91),
(83, '', 'LBP', '', '', 'Lebanese pound', '{sign}{number} {symbol}', 422, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 92),
(84, '', 'LKR', 2, ',', 'Sri Lankan rupee', '{sign}{number} {symbol}', 144, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 93),
(85, '', 'LRD', 2, ',', 'Liberian dollar', '{sign}{number} {symbol}', 430, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 94),
(86, '', 'LSL', 2, ',', 'Lesotho loti', '{sign}{number} {symbol}', 426, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 95),
(87, '', 'LTL', 2, ',', 'Lithuanian litas', '{sign}{number} {symbol}', 440, '{number} {symbol}', 'Lt', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 96),
(88, '', 'LVL', 2, ',', 'Latvian lats', '{sign}{number} {symbol}', 428, '{number} {symbol}', 'Ls', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 97),
(89, '', 'LYD', 3, ',', 'Libyan dinar', '{sign}{number} {symbol}', 434, '{number} {symbol}', 'ل.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 98),
(90, '', 'MAD', 2, ',', 'Moroccan dirham', '{sign}{number} {symbol}', 504, '{number} {symbol}', 'د.م.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 99),
(91, '', 'MDL', 2, ',', 'Moldovan leu', '{sign}{number} {symbol}', 498, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 100),
(92, '', 'MGA', 2, ',', 'Malagasy ariary', '{sign}{number} {symbol}', 969, '{number} {symbol}', 'MGA', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 101),
(93, '', 'MKD', 2, ',', 'Macedonian denar', '{sign}{number} {symbol}', 807, '{number} {symbol}', 'ден', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 102),
(94, '', 'MMK', 2, ',', 'Myanmar kyat', '{symbol} {sign}{number}', 104, '{number} {symbol}', 'K', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 103),
(95, '', 'MNT', 2, ',', 'Mongolian tögrög', '{sign}{number} {symbol}', 496, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 104),
(96, '', 'MOP', 1, ',', 'Macanese pataca', '{symbol}{sign}{number}', 446, '{symbol}{number}', 'P', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 105),
(97, '', 'MRO', 2, ',', 'Mauritanian ouguiya', '{sign}{number} {symbol}', 478, '{number} {symbol}', 'UM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 106),
(98, '', 'MUR', 2, ',', 'Mauritian rupee', '{sign}{number} {symbol}', 480, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 107),
(99, '', 'MVR', 2, ',', 'Maldivian rufiyaa', '{sign}{number} {symbol}', 462, '{number} {symbol}', 'ރ.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 108),
(100, '', 'MWK', 2, ',', 'Malawian kwacha', '{sign}{number} {symbol}', 454, '{number} {symbol}', 'MK', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 109),
(101, '', 'MXN', 2, ',', 'Mexican peso', '{sign}{number} {symbol}', 484, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 8),
(102, '', 'MXV', 2, ',', 'Mexican Unid', '{sign}{number} {symbol}', 979, '{number} {symbol}', 'MXV', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 110),
(103, '', 'MYR', 2, ',', 'Malaysian ringgit', '{sign}{number} {symbol}', 458, '{number} {symbol}', 'RM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 111),
(104, '', 'MZN', 2, ',', 'Mozambican metical', '{sign}{number} {symbol}', 943, '{number} {symbol}', 'MT', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 112),
(105, '', 'NAD', 2, ',', 'Namibian dollar', '{symbol} {sign}{number}', 516, '{symbol} {number}', 'N$', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 113),
(106, '', 'NGN', 2, ',', 'Nigerian naira', '{sign}{number} {symbol}', 566, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 114),
(107, '', 'NIO', 2, ',', 'Nicaraguan córdoba', '{sign}{number} {symbol}', 558, '{number} {symbol}', 'C$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 115),
(108, '', 'NOK', 2, ',', 'Norwegian krone', '{symbol}{sign}{number}', 578, '{symbol}{number}', 'kr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 18),
(109, '', 'NPR', 2, ',', 'Nepalese rupee', '{sign}{number} {symbol}', 524, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 116),
(110, '', 'NZD', 2, ',', 'New Zealand dollar', '{symbol}{sign}{number}', 554, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 10),
(111, '', 'OMR', 3, '.', 'Omani rial', '{sign}{number} {symbol}', 512, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 117),
(112, '', 'PAB', 2, ',', 'Panamanian balboa', '{sign}{number} {symbol}', 590, '{number} {symbol}', 'B/.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 118),
(113, '', 'PEN', 2, ',', 'Peruvian nuevo sol', '{sign}{number} {symbol}', 604, '{number} {symbol}', 'S/.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 119),
(114, '', 'PGK', 2, ',', 'Papua New Guinean kina', '{sign}{number} {symbol}', 598, '{number} {symbol}', 'K', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 120),
(115, '', 'PHP', 2, ',', 'Philippine peso', '{sign}{number} {symbol}', 608, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 121),
(116, '', 'PKR', 2, ',', 'Pakistani rupee', '{sign}{number} {symbol}', 586, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 122),
(117, '', 'PLN', 2, ',', 'Polish Złoty', '{sign}{number} {symbol}', 985, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 123),
(118, '', 'PYG', '', '', 'Paraguayan guaraní', '{symbol} {sign}{number}', 600, '{symbol} {number}', '', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 124),
(119, '', 'QAR', 2, ',', 'Qatari riyal', '{sign}{number} {symbol}', 634, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 125),
(120, '', 'RON', 2, ',', 'Romanian leu', '{sign}{number} {symbol}', 946, '{number} {symbol}', 'lei', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 126),
(121, '', 'RWF', 2, ',', 'Rwandan franc', '{sign}{number} {symbol}', 646, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 128),
(122, '', 'SAR', 2, ',', 'Saudi riyal', '{sign}{number} {symbol}', 682, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 129),
(123, '', 'SBD', 2, ',', 'Solomon Islands dollar', '{sign}{number} {symbol}', 90, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 130),
(124, '', 'SCR', 2, ',', 'Seychellois rupee', '{sign}{number} {symbol}', 690, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 131),
(125, '', 'SDG', 2, ',', 'Sudanese pound', '{sign}{number} {symbol}', 938, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 132),
(126, '', 'SEK', 2, ',', 'Swedish krona', '{sign}{number} {symbol}', 752, '{number} {symbol}', 'kr', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 11),
(127, '', 'SGD', 2, ',', 'Singapore dollar', '{sign}{number} {symbol}', 702, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 14),
(128, '', 'SHP', 2, ',', 'Saint Helenian pound', '{sign}{number} {symbol}', 654, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 133),
(129, '', 'SLL', 2, ',', 'Sierra Leonean leone', '{sign}{number} {symbol}', 694, '{number} {symbol}', 'Le', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 134),
(130, '', 'SOS', 2, ',', 'Somali shilling', '{sign}{number} {symbol}', 706, '{number} {symbol}', 'S', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 135),
(131, '', 'SRD', 2, ',', 'Surinamese dollar', '{sign}{number} {symbol}', 968, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 136),
(132, '', 'STD', '', '', 'São Tomé and Príncipe dobra', '{sign}{number} {symbol}', 678, '{number} {symbol}', 'Db', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 137),
(133, '', 'RUB', 2, ',', 'Russian ruble', '{sign}{number} {symbol}', 643, '{number} {symbol}', 'руб', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 12),
(134, '', 'SVC', 2, ',', 'Salvadoran colón', '{sign}{number} {symbol}', 222, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 138),
(135, '', 'SYP', 2, ',', 'Syrian pound', '{sign}{number} {symbol}', 760, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 139),
(136, '', 'SZL', 2, ',', 'Swazi lilangeni', '{sign}{number} {symbol}', 748, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 140),
(137, '', 'THB', 2, ',', 'Thai baht', '{sign}{number} {symbol}', 764, '{number} {symbol}', '฿', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 141),
(138, '', 'TJS', 2, ',', 'Tajikistani somoni', '{sign}{number} {symbol}', 972, '{number} {symbol}', 'ЅМ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 142),
(139, '', 'TND', 3, ',', 'Tunisian dinar', '{sign}{number} {symbol}', 788, '{number} {symbol}', 'د.ت', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 143),
(140, '', 'TOP', 2, ',', 'Tongan paʻanga', '{sign}{number} {symbol}', 776, '{number} {symbol}', 'T$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 144),
(141, '', 'TRY', 2, ',', 'Turkish new lira', '{sign}{number} {symbol}', 949, '{number} {symbol}', 'YTL', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 15),
(142, '', 'TTD', 2, ',', 'Trinidad and Tobago dollar', '{sign}{number} {symbol}', 780, '{number} {symbol}', 'TT$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 145),
(143, '', 'TWD', 2, ',', 'New Taiwan dollar', '{sign}{number} {symbol}', 901, '{number} {symbol}', 'NT$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 146),
(144, '', 'TZS', 2, ',', 'Tanzanian shilling', '{sign}{number} {symbol}', 834, '{number} {symbol}', 'Sh', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 147),
(145, '', 'UAH', 2, ',', 'Ukrainian hryvnia', '{sign}{number} {symbol}', 980, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 148),
(146, '', 'UGX', 2, ',', 'Ugandan shilling', '{sign}{number} {symbol}', 800, '{number} {symbol}', 'Sh', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 149),
(147, '', 'USD', 2, '.', 'United States dollar', '{symbol}{sign}{number}', 840, '{symbol}{number}', '$', ',', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 1),
(148, '', 'UYI', 2, ',', 'Uruguay Peso', '{sign}{number} {symbol}', 940, '{number} {symbol}', 'UYI', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 150),
(149, '', 'UYU', '', '', 'Uruguayan peso', '{symbol}{sign}{number}', 858, '{symbol} {number}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 151),
(150, '', 'UZS', 2, ',', 'Uzbekistani som', '{sign}{number} {symbol}', 860, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 152),
(151, '', 'VEF', 2, ',', 'Venezuelan bolívar', '{sign}{number} {symbol}', 937, '{number} {symbol}', 'Bs', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 153),
(152, '', 'VND', '', '', 'Vietnamese Dong', '{sign}{number} {symbol}', 704, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 154),
(153, '', 'VUV', 2, ',', 'Vanuatu vatu', '{sign}{number} {symbol}', 548, '{number} {symbol}', 'Vt', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 155),
(154, '', 'WST', 2, ',', 'Samoan tala', '{sign}{number} {symbol}', 882, '{number} {symbol}', 'T', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 156),
(155, '', 'XAF', '', '', 'Central African CFA franc', '{sign}{number} {symbol}', 950, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 157),
(156, '', 'XCD', 2, ',', 'East Caribbean dollar', '{sign}{number} {symbol}', 951, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 158),
(157, '', 'XOF', 2, ',', 'West African CFA franc', '{sign}{number} {symbol}', 952, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 159),
(158, '', 'XPF', 2, ',', 'CFP franc', '{sign}{number} {symbol}', 953, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 160),
(159, '', 'YER', 2, ',', 'Yemeni rial', '{sign}{number} {symbol}', 886, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 161),
(160, '', 'RSD', 2, ',', 'Serbian dinar', '{sign}{number} {symbol}', 941, '{number} {symbol}', 'Дин.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 127),
(161, 'south-african-rand', 'ZAR', 2, ',', 'South African rand', '{symbol} {sign}{number}', 710, '{symbol} {number}', 'R', '', '', 1, '', 845, '0000-00-00 00:00:00', '2015-08-30 22:07:36', '', '0000-00-00 00:00:00', 2, '', 5, 22),
(162, '', 'ZMK', 2, ',', 'Zambian kwacha', '{sign}{number} {symbol}', 894, '{number} {symbol}', 'ZK', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 162),
(163, '', 'ZWD', 2, ',', 'Zimbabwean dollar', '{sign}{number} {symbol}', 932, '{number} {symbol}', 'Z$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 163),
(164, '', 'ZZZ', 2, ',', 'Reserved', '', '', '', 'O', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 164);
--
-- Dumping data for table `#__supportgroups_country`
--
@ -588,3 +535,173 @@ INSERT INTO `#__supportgroups_country` (`id`, `asset_id`, `alias`, `codethree`,
(244, '', '', 'MAF', 'MF', 'EUR', 'Sint Maarten (French Antilles)', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', ''),
(245, '', '', 'SXM', 'SX', 'ANG', 'Sint Maarten (Netherlands Antilles)', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', ''),
(246, '', '', 'ZZZ', 'ZZ', 'ZZZ', 'Reserved', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '');
--
-- Dumping data for table `#__supportgroups_currency`
--
INSERT INTO `#__supportgroups_currency` (`id`, `alias`, `codethree`, `decimalplace`, `decimalsymbol`, `name`, `negativestyle`, `numericcode`, `positivestyle`, `symbol`, `thousands`, `params`, `published`, `created_by`, `modified_by`, `created`, `modified`, `checked_out`, `checked_out_time`, `version`, `hits`, `access`, `ordering`) VALUES
(1, '', 'AED', 2, ',', 'United Arab Emirates dirham', '{sign}{number} {symbol}', 784, '{number} {symbol}', 'د.إ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 23),
(2, '', 'AFN', 2, ',', 'Afghan afghani', '{sign}{number} {symbol}', 971, '{number} {symbol}', '؋', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 24),
(3, '', 'ALL', 2, ',', 'Albanian lek', '{sign}{number} {symbol}', 8, '{number} {symbol}', 'Lek', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 25),
(4, '', 'AMD', 2, ',', 'Armenian dram', '{sign}{number} {symbol}', 51, '{number} {symbol}', 'դր.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 26),
(5, '', 'ANG', 2, ',', 'Netherlands Antillean gulden', '{sign}{number} {symbol}', 532, '{number} {symbol}', 'ƒ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 27),
(6, '', 'AOA', 2, ',', 'Angolan kwanza', '{sign}{number} {symbol}', 973, '{number} {symbol}', 'Kz', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 28),
(7, '', 'ARS', 2, ',', 'Argentine peso', '{sign}{number} {symbol}', 32, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 29),
(8, '', 'AUD', 2, '.', 'Australian dollar', '{sign}{symbol} {number}', 36, '{symbol} {number}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 5),
(9, '', 'AWG', 2, ',', 'Aruban florin', '{sign}{number} {symbol}', 533, '{number} {symbol}', 'ƒ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 30),
(10, '', 'AZN', 2, ',', 'Azerbaijani manat', '{sign}{number} {symbol}', 934, '{number} {symbol}', 'ман', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 31),
(11, '', 'BAM', 2, ',', 'Bosnia and Herzegovina convert', '{sign}{number} {symbol}', 977, '{number} {symbol}', 'KM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 32),
(12, '', 'BBD', 2, ',', 'Barbadian dollar', '{sign}{number} {symbol}', 52, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 33),
(13, '', 'BDT', 2, ',', 'Bangladeshi taka', '{sign}{number} {symbol}', 50, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 34),
(14, '', 'BGN', 2, ',', 'Bulgarian lev', '{sign}{number} {symbol}', 975, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 35),
(15, '', 'BHD', 2, ',', 'Bahraini dinar', '{sign}{number} {symbol}', 48, '{number} {symbol}', 'ب.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 36),
(16, '', 'BIF', '', '', 'Burundian franc', '{sign}{number} {symbol}', 108, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 37),
(17, '', 'BMD', 2, ',', 'Bermudian dollar', '{sign}{number} {symbol}', 60, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 38),
(18, '', 'BND', 2, ',', 'Brunei dollar', '{sign}{number} {symbol}', 96, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 39),
(19, '', 'BOB', 2, ',', 'Bolivian boliviano', '{sign}{number} {symbol}', 68, '{number} {symbol}', '$b', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 40),
(20, '', 'BOV', 2, ',', 'Mvdol', '{sign}{number} {symbol}', 984, '{number} {symbol}', 'BOV', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 41),
(21, '', 'BRL', 2, '.', 'Brazilian real', '{symbol} {sign}{number}', 986, '{symbol} {number}', 'R$', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 17),
(22, '', 'BSD', 2, ',', 'Bahamian dollar', '{sign}{number} {symbol}', 44, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 42),
(23, '', 'BTN', 2, ',', 'Bhutanese ngultrum', '{sign}{number} {symbol}', 64, '{number} {symbol}', 'BTN', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 43),
(24, '', 'BWP', 2, ',', 'Botswana pula', '{sign}{number} {symbol}', 72, '{number} {symbol}', 'P', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 44),
(25, '', 'BYR', '', '', 'Belarusian ruble', '{sign}{number} {symbol}', 974, '{number} {symbol}', 'p.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 45),
(26, '', 'BZD', 2, ',', 'Belize dollar', '{sign}{number} {symbol}', 84, '{number} {symbol}', 'BZ$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 46),
(27, '', 'CAD', 2, '.', 'Canadian dollar', '{symbol}{sign}{number}', 124, '{symbol}{number}', '$', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 7),
(28, '', 'CDF', 2, ',', 'Congolese franc', '{sign}{number} {symbol}', 976, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 47),
(29, '', 'CHE', 2, ',', 'WIR Euro', '{sign}{number} {symbol}', 947, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 48),
(30, '', 'CHF', 2, ',', 'Swiss franc', '{sign}{number} {symbol}', 756, '{number} {symbol}', 'CHF', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 6),
(31, '', 'CHW', 2, ',', 'WIR Franc', '{sign}{number} {symbol}', 948, '{number} {symbol}', 'CHW', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 49),
(32, '', 'CLF', '', ',', 'Unidad de Fomento', '{sign}{number} {symbol}', 990, '{number} {symbol}', 'CLF', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 50),
(33, '', 'CLP', 2, ',', 'Chilean peso', '{sign}{number} {symbol}', 152, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 51),
(34, '', 'CNY', 2, ',', 'Chinese renminbi yuan', '{sign}{number} {symbol}', 156, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 9),
(35, '', 'COP', 2, ',', 'Colombian peso', '{sign}{number} {symbol}', 170, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 52),
(36, '', 'COU', 2, ',', 'Unidad de Valor Real', '{sign}{number} {symbol}', 970, '{number} {symbol}', 'COU', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 53),
(37, '', 'CRC', 2, ',', 'Costa Rican colón', '{sign}{number} {symbol}', 188, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 54),
(38, '', 'CZK', 2, ',', 'Czech koruna', '{sign}{number} {symbol}', 203, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 57),
(39, '', 'CUP', 2, ',', 'Cuban peso', '{sign}{number} {symbol}', 192, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 55),
(40, '', 'CVE', '', '', 'Cape Verdean escudo', '{sign}{number} {symbol}', 132, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 56),
(41, '', 'DJF', '', '', 'Djiboutian franc', '{sign}{number} {symbol}', 262, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 58),
(42, '', 'DKK', 2, '.', 'Danish krone', '{symbol}{sign}{number}', 208, '{symbol}{number}', 'kr', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 19),
(43, '', 'DOP', 2, ',', 'Dominican peso', '{sign}{number} {symbol}', 214, '{number} {symbol}', 'RD$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 59),
(44, '', 'DZD', 2, ',', 'Algerian dinar', '{sign}{number} {symbol}', 12, '{number} {symbol}', 'د.ج', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 60),
(45, '', 'EGP', 2, ',', 'Egyptian pound', '{sign}{number} {symbol}', 818, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 61),
(46, '', 'ERN', 2, ',', 'Eritrean nakfa', '{sign}{number} {symbol}', 232, '{number} {symbol}', 'Nfk', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 62),
(47, '', 'ETB', 2, ',', 'Ethiopian birr', '{sign}{number} {symbol}', 230, '{number} {symbol}', 'ETB', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 63),
(48, '', 'EUR', 2, ',', 'Euro', '{sign}{number} {symbol}', 978, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 2),
(49, '', 'FJD', 2, ',', 'Fijian dollar', '{sign}{number} {symbol}', 242, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 64),
(50, '', 'FKP', 2, ',', 'Falkland pound', '{sign}{number} {symbol}', 238, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 65),
(51, '', 'GBP', 2, '.', 'British pound', '{symbol}{sign}{number}', 826, '{symbol}{number}', '£', ',', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 4),
(52, '', 'GEL', 2, ',', 'Georgian lari', '{sign}{number} {symbol}', 981, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 66),
(53, '', 'GHS', 2, ',', 'Ghanaian cedi', '{sign}{number} {symbol}', 936, '{number} {symbol}', '', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 67),
(54, '', 'GIP', 2, ',', 'Gibraltar pound', '{sign}{number} {symbol}', 292, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 68),
(55, '', 'GMD', 2, ',', 'Gambian dalasi', '{sign}{number} {symbol}', 270, '{number} {symbol}', 'D', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 69),
(56, '', 'GNF', '', '', 'Guinean franc', '{sign}{number} {symbol}', 324, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 70),
(57, '', 'GTQ', 2, ',', 'Guatemalan quetzal', '{sign}{number} {symbol}', 320, '{number} {symbol}', 'Q', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 71),
(58, '', 'GYD', 2, ',', 'Guyanese dollar', '{sign}{number} {symbol}', 328, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 72),
(59, '', 'HKD', 2, ',', 'Hong Kong dollar', '{sign}{number} {symbol}', 344, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 13),
(60, '', 'HNL', 2, ',', 'Honduran lempira', '{sign}{number} {symbol}', 340, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 73),
(61, '', 'HRK', 2, ',', 'Croatian kuna', '{sign}{number} {symbol}', 191, '{number} {symbol}', 'kn', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 74),
(62, '', 'HTG', 2, ',', 'Haitian gourde', '{sign}{number} {symbol}', 332, '{number} {symbol}', 'G', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 75),
(63, '', 'HUF', 2, ',', 'Hungarian forint', '{sign}{number} {symbol}', 348, '{number} {symbol}', 'Ft', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 76),
(64, '', 'IDR', '', '', 'Indonesian rupiah', '{symbol}{sign}{number}', 360, '{symbol}{number}', 'Rp', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 77),
(65, '', 'ILS', 2, ',', 'Israeli new sheqel', '{sign}{number} {symbol}', 376, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 20),
(66, '', 'INR', 2, ',', 'Indian rupee', '{sign}{number} {symbol}', 356, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 16),
(67, '', 'IQD', '', '', 'Iraqi dinar', '{sign}{number} {symbol}', 368, '{number} {symbol}', 'ع.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 78),
(68, '', 'IRR', 2, ',', 'Iranian rial', '{sign}{number}{symb0l}', 364, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 79),
(69, '', 'ISK', 2, ',', 'Icelandic króna', '{sign}{number} {symbol}', 352, '{number} {symbol}', 'kr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 80),
(70, '', 'JMD', 2, ',', 'Jamaican dollar', '{sign}{number} {symbol}', 388, '{number} {symbol}', 'J$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 81),
(71, '', 'JOD', 2, ',', 'Jordanian dinar', '{sign}{number} {symbol}', 400, '{number} {symbol}', 'د.ا', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 82),
(72, '', 'JPY', 2, ',', 'Japanese yen', '{sign}{number} {symbol}', 392, '{number} {symbol}', '¥', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 3),
(73, '', 'KES', 2, ',', 'Kenyan shilling', '{sign}{number} {symbol}', 404, '{number} {symbol}', 'Sh', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 83),
(74, '', 'KGS', 2, ',', 'Kyrgyzstani som', '{sign}{number} {symbol}', 417, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 84),
(75, '', 'KHR', 2, ',', 'Cambodian riel', '{sign}{number} {symbol}', 116, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 85),
(76, '', 'KMF', '', '', 'Comorian franc', '{sign}{number} {symbol}', 174, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 86),
(77, '', 'KPW', '', '', 'North Korean won', '{sign}{number} {symbol}', 408, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 87),
(78, '', 'KRW', '', '', 'South Korean won', '{sign}{number} {symbol}', 410, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 21),
(79, '', 'KWD', 2, ',', 'Kuwaiti dinar', '{sign}{number} {symbol}', 414, '{number} {symbol}', 'د.ك', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 88),
(80, '', 'KYD', 2, ',', 'Cayman Islands dollar', '{sign}{number} {symbol}', 136, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 89),
(81, '', 'KZT', 2, ',', 'Kazakhstani tenge', '{sign}{number} {symbol}', 398, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 90),
(82, '', 'LAK', '', '', 'Lao kip', '{sign}{number} {symbol}', 418, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 91),
(83, '', 'LBP', '', '', 'Lebanese pound', '{sign}{number} {symbol}', 422, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 92),
(84, '', 'LKR', 2, ',', 'Sri Lankan rupee', '{sign}{number} {symbol}', 144, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 93),
(85, '', 'LRD', 2, ',', 'Liberian dollar', '{sign}{number} {symbol}', 430, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 94),
(86, '', 'LSL', 2, ',', 'Lesotho loti', '{sign}{number} {symbol}', 426, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 95),
(87, '', 'LTL', 2, ',', 'Lithuanian litas', '{sign}{number} {symbol}', 440, '{number} {symbol}', 'Lt', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 96),
(88, '', 'LVL', 2, ',', 'Latvian lats', '{sign}{number} {symbol}', 428, '{number} {symbol}', 'Ls', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 97),
(89, '', 'LYD', 3, ',', 'Libyan dinar', '{sign}{number} {symbol}', 434, '{number} {symbol}', 'ل.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 98),
(90, '', 'MAD', 2, ',', 'Moroccan dirham', '{sign}{number} {symbol}', 504, '{number} {symbol}', 'د.م.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 99),
(91, '', 'MDL', 2, ',', 'Moldovan leu', '{sign}{number} {symbol}', 498, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 100),
(92, '', 'MGA', 2, ',', 'Malagasy ariary', '{sign}{number} {symbol}', 969, '{number} {symbol}', 'MGA', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 101),
(93, '', 'MKD', 2, ',', 'Macedonian denar', '{sign}{number} {symbol}', 807, '{number} {symbol}', 'ден', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 102),
(94, '', 'MMK', 2, ',', 'Myanmar kyat', '{symbol} {sign}{number}', 104, '{number} {symbol}', 'K', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 103),
(95, '', 'MNT', 2, ',', 'Mongolian tögrög', '{sign}{number} {symbol}', 496, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 104),
(96, '', 'MOP', 1, ',', 'Macanese pataca', '{symbol}{sign}{number}', 446, '{symbol}{number}', 'P', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 105),
(97, '', 'MRO', 2, ',', 'Mauritanian ouguiya', '{sign}{number} {symbol}', 478, '{number} {symbol}', 'UM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 106),
(98, '', 'MUR', 2, ',', 'Mauritian rupee', '{sign}{number} {symbol}', 480, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 107),
(99, '', 'MVR', 2, ',', 'Maldivian rufiyaa', '{sign}{number} {symbol}', 462, '{number} {symbol}', 'ރ.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 108),
(100, '', 'MWK', 2, ',', 'Malawian kwacha', '{sign}{number} {symbol}', 454, '{number} {symbol}', 'MK', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 109),
(101, '', 'MXN', 2, ',', 'Mexican peso', '{sign}{number} {symbol}', 484, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 8),
(102, '', 'MXV', 2, ',', 'Mexican Unid', '{sign}{number} {symbol}', 979, '{number} {symbol}', 'MXV', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 110),
(103, '', 'MYR', 2, ',', 'Malaysian ringgit', '{sign}{number} {symbol}', 458, '{number} {symbol}', 'RM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 111),
(104, '', 'MZN', 2, ',', 'Mozambican metical', '{sign}{number} {symbol}', 943, '{number} {symbol}', 'MT', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 112),
(105, '', 'NAD', 2, ',', 'Namibian dollar', '{symbol} {sign}{number}', 516, '{symbol} {number}', 'N$', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 113),
(106, '', 'NGN', 2, ',', 'Nigerian naira', '{sign}{number} {symbol}', 566, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 114),
(107, '', 'NIO', 2, ',', 'Nicaraguan córdoba', '{sign}{number} {symbol}', 558, '{number} {symbol}', 'C$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 115),
(108, '', 'NOK', 2, ',', 'Norwegian krone', '{symbol}{sign}{number}', 578, '{symbol}{number}', 'kr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 18),
(109, '', 'NPR', 2, ',', 'Nepalese rupee', '{sign}{number} {symbol}', 524, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 116),
(110, '', 'NZD', 2, ',', 'New Zealand dollar', '{symbol}{sign}{number}', 554, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 10),
(111, '', 'OMR', 3, '.', 'Omani rial', '{sign}{number} {symbol}', 512, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 117),
(112, '', 'PAB', 2, ',', 'Panamanian balboa', '{sign}{number} {symbol}', 590, '{number} {symbol}', 'B/.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 118),
(113, '', 'PEN', 2, ',', 'Peruvian nuevo sol', '{sign}{number} {symbol}', 604, '{number} {symbol}', 'S/.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 119),
(114, '', 'PGK', 2, ',', 'Papua New Guinean kina', '{sign}{number} {symbol}', 598, '{number} {symbol}', 'K', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 120),
(115, '', 'PHP', 2, ',', 'Philippine peso', '{sign}{number} {symbol}', 608, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 121),
(116, '', 'PKR', 2, ',', 'Pakistani rupee', '{sign}{number} {symbol}', 586, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 122),
(117, '', 'PLN', 2, ',', 'Polish Złoty', '{sign}{number} {symbol}', 985, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 123),
(118, '', 'PYG', '', '', 'Paraguayan guaraní', '{symbol} {sign}{number}', 600, '{symbol} {number}', '', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 124),
(119, '', 'QAR', 2, ',', 'Qatari riyal', '{sign}{number} {symbol}', 634, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 125),
(120, '', 'RON', 2, ',', 'Romanian leu', '{sign}{number} {symbol}', 946, '{number} {symbol}', 'lei', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 126),
(121, '', 'RWF', 2, ',', 'Rwandan franc', '{sign}{number} {symbol}', 646, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 128),
(122, '', 'SAR', 2, ',', 'Saudi riyal', '{sign}{number} {symbol}', 682, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 129),
(123, '', 'SBD', 2, ',', 'Solomon Islands dollar', '{sign}{number} {symbol}', 90, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 130),
(124, '', 'SCR', 2, ',', 'Seychellois rupee', '{sign}{number} {symbol}', 690, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 131),
(125, '', 'SDG', 2, ',', 'Sudanese pound', '{sign}{number} {symbol}', 938, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 132),
(126, '', 'SEK', 2, ',', 'Swedish krona', '{sign}{number} {symbol}', 752, '{number} {symbol}', 'kr', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 11),
(127, '', 'SGD', 2, ',', 'Singapore dollar', '{sign}{number} {symbol}', 702, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 14),
(128, '', 'SHP', 2, ',', 'Saint Helenian pound', '{sign}{number} {symbol}', 654, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 133),
(129, '', 'SLL', 2, ',', 'Sierra Leonean leone', '{sign}{number} {symbol}', 694, '{number} {symbol}', 'Le', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 134),
(130, '', 'SOS', 2, ',', 'Somali shilling', '{sign}{number} {symbol}', 706, '{number} {symbol}', 'S', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 135),
(131, '', 'SRD', 2, ',', 'Surinamese dollar', '{sign}{number} {symbol}', 968, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 136),
(132, '', 'STD', '', '', 'São Tomé and Príncipe dobra', '{sign}{number} {symbol}', 678, '{number} {symbol}', 'Db', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 137),
(133, '', 'RUB', 2, ',', 'Russian ruble', '{sign}{number} {symbol}', 643, '{number} {symbol}', 'руб', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 12),
(134, '', 'SVC', 2, ',', 'Salvadoran colón', '{sign}{number} {symbol}', 222, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 138),
(135, '', 'SYP', 2, ',', 'Syrian pound', '{sign}{number} {symbol}', 760, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 139),
(136, '', 'SZL', 2, ',', 'Swazi lilangeni', '{sign}{number} {symbol}', 748, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 140),
(137, '', 'THB', 2, ',', 'Thai baht', '{sign}{number} {symbol}', 764, '{number} {symbol}', '฿', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 141),
(138, '', 'TJS', 2, ',', 'Tajikistani somoni', '{sign}{number} {symbol}', 972, '{number} {symbol}', 'ЅМ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 142),
(139, '', 'TND', 3, ',', 'Tunisian dinar', '{sign}{number} {symbol}', 788, '{number} {symbol}', 'د.ت', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 143),
(140, '', 'TOP', 2, ',', 'Tongan paʻanga', '{sign}{number} {symbol}', 776, '{number} {symbol}', 'T$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 144),
(141, '', 'TRY', 2, ',', 'Turkish new lira', '{sign}{number} {symbol}', 949, '{number} {symbol}', 'YTL', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 15),
(142, '', 'TTD', 2, ',', 'Trinidad and Tobago dollar', '{sign}{number} {symbol}', 780, '{number} {symbol}', 'TT$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 145),
(143, '', 'TWD', 2, ',', 'New Taiwan dollar', '{sign}{number} {symbol}', 901, '{number} {symbol}', 'NT$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 146),
(144, '', 'TZS', 2, ',', 'Tanzanian shilling', '{sign}{number} {symbol}', 834, '{number} {symbol}', 'Sh', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 147),
(145, '', 'UAH', 2, ',', 'Ukrainian hryvnia', '{sign}{number} {symbol}', 980, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 148),
(146, '', 'UGX', 2, ',', 'Ugandan shilling', '{sign}{number} {symbol}', 800, '{number} {symbol}', 'Sh', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 149),
(147, '', 'USD', 2, '.', 'United States dollar', '{symbol}{sign}{number}', 840, '{symbol}{number}', '$', ',', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 1),
(148, '', 'UYI', 2, ',', 'Uruguay Peso', '{sign}{number} {symbol}', 940, '{number} {symbol}', 'UYI', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 150),
(149, '', 'UYU', '', '', 'Uruguayan peso', '{symbol}{sign}{number}', 858, '{symbol} {number}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 151),
(150, '', 'UZS', 2, ',', 'Uzbekistani som', '{sign}{number} {symbol}', 860, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 152),
(151, '', 'VEF', 2, ',', 'Venezuelan bolívar', '{sign}{number} {symbol}', 937, '{number} {symbol}', 'Bs', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 153),
(152, '', 'VND', '', '', 'Vietnamese Dong', '{sign}{number} {symbol}', 704, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 154),
(153, '', 'VUV', 2, ',', 'Vanuatu vatu', '{sign}{number} {symbol}', 548, '{number} {symbol}', 'Vt', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 155),
(154, '', 'WST', 2, ',', 'Samoan tala', '{sign}{number} {symbol}', 882, '{number} {symbol}', 'T', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 156),
(155, '', 'XAF', '', '', 'Central African CFA franc', '{sign}{number} {symbol}', 950, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 157),
(156, '', 'XCD', 2, ',', 'East Caribbean dollar', '{sign}{number} {symbol}', 951, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 158),
(157, '', 'XOF', 2, ',', 'West African CFA franc', '{sign}{number} {symbol}', 952, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 159),
(158, '', 'XPF', 2, ',', 'CFP franc', '{sign}{number} {symbol}', 953, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 160),
(159, '', 'YER', 2, ',', 'Yemeni rial', '{sign}{number} {symbol}', 886, '{number} {symbol}', '', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 161),
(160, '', 'RSD', 2, ',', 'Serbian dinar', '{sign}{number} {symbol}', 941, '{number} {symbol}', 'Дин.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 127),
(161, 'south-african-rand', 'ZAR', 2, ',', 'South African rand', '{symbol} {sign}{number}', 710, '{symbol} {number}', 'R', '', '', 1, '', 845, '0000-00-00 00:00:00', '2015-08-30 22:07:36', '', '0000-00-00 00:00:00', 2, '', 5, 22),
(162, '', 'ZMK', 2, ',', 'Zambian kwacha', '{sign}{number} {symbol}', 894, '{number} {symbol}', 'ZK', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 162),
(163, '', 'ZWD', 2, ',', 'Zimbabwean dollar', '{sign}{number} {symbol}', 932, '{number} {symbol}', 'Z$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 163),
(164, '', 'ZZZ', 2, ',', 'Reserved', '', '', '', 'O', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 164);

View File

@ -1,5 +1,8 @@
DROP TABLE IF EXISTS `#__supportgroups_support_group`;
DROP TABLE IF EXISTS `#__supportgroups_payment`;
DROP TABLE IF EXISTS `#__supportgroups_clinic`;
DROP TABLE IF EXISTS `#__supportgroups_location`;
DROP TABLE IF EXISTS `#__supportgroups_region`;
DROP TABLE IF EXISTS `#__supportgroups_currency`;
DROP TABLE IF EXISTS `#__supportgroups_country`;
DROP TABLE IF EXISTS `#__supportgroups_currency`;
DROP TABLE IF EXISTS `#__supportgroups_help_document`;

351
admin/tables/clinic.php Normal file
View File

@ -0,0 +1,351 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage clinic.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
// import Joomla table library
jimport('joomla.database.table');
/**
* Clinics Table class
*/
class SupportgroupsTableClinic extends JTable
{
/**
* Ensure the params and metadata in json encoded in the bind method
*
* @var array
* @since 3.3
*/
protected $_jsonEncode = array('params', 'metadata');
/**
* Constructor
*
* @param object Database connector object
*/
function __construct(&$db)
{
parent::__construct('#__supportgroups_clinic', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_supportgroups.clinic'));
}
public function bind($array, $ignore = '')
{
if (isset($array['params']) && is_array($array['params']))
{
$registry = new JRegistry;
$registry->loadArray($array['params']);
$array['params'] = (string) $registry;
}
if (isset($array['metadata']) && is_array($array['metadata']))
{
$registry = new JRegistry;
$registry->loadArray($array['metadata']);
$array['metadata'] = (string) $registry;
}
// Bind the rules.
if (isset($array['rules']) && is_array($array['rules']))
{
$rules = new JAccessRules($array['rules']);
$this->setRules($rules);
}
return parent::bind($array, $ignore);
}
/**
* Overload the store method for the Clinic table.
*
* @param boolean Toggle whether null values should be updated.
* @return boolean True on success, false on failure.
* @since 1.6
*/
public function store($updateNulls = false)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if ($this->id)
{
// Existing item
$this->modified = $date->toSql();
$this->modified_by = $user->get('id');
}
else
{
// New clinic. A clinic created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
$this->created = $date->toSql();
}
if (empty($this->created_by))
{
$this->created_by = $user->get('id');
}
}
if (isset($this->alias))
{
// Verify that the alias is unique
$table = JTable::getInstance('clinic', 'SupportgroupsTable');
if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_SUPPORTGROUPS_CLINIC_ERROR_UNIQUE_ALIAS'));
return false;
}
}
if (isset($this->url))
{
// Convert IDN urls to punycode
$this->url = JStringPunycode::urlToPunycode($this->url);
}
if (isset($this->website))
{
// Convert IDN urls to punycode
$this->website = JStringPunycode::urlToPunycode($this->website);
}
return parent::store($updateNulls);
}
/**
* Overloaded check method to ensure data integrity.
*
* @return boolean True on success.
*/
public function check()
{
if (isset($this->alias))
{
// Generate a valid alias
$this->generateAlias();
$table = JTable::getInstance('clinic', 'supportgroupsTable');
while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->alias = JString::increment($this->alias, 'dash');
}
}
/*
* Clean up keywords -- eliminate extra spaces between phrases
* and cr (\r) and lf (\n) characters from string.
* Only process if not empty.
*/
if (!empty($this->metakey))
{
// Array of characters to remove.
$bad_characters = array("\n", "\r", "\"", "<", ">");
// Remove bad characters.
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey);
// Create array using commas as delimiter.
$keys = explode(',', $after_clean);
$clean_keys = array();
foreach ($keys as $key)
{
// Ignore blank keywords.
if (trim($key))
{
$clean_keys[] = trim($key);
}
}
// Put array back together delimited by ", "
$this->metakey = implode(", ", $clean_keys);
}
// Clean up description -- eliminate quotes and <> brackets
if (!empty($this->metadesc))
{
// Only process if not empty
$bad_characters = array("\"", "<", ">");
$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
}
// If we don't have any access rules set at this point just use an empty JAccessRules class
if (!$this->getRules())
{
$rules = $this->getDefaultAssetValues('com_supportgroups.clinic.'.$this->id);
$this->setRules($rules);
}
// Set ordering
if ($this->published < 0)
{
// Set ordering to 0 if state is archived or trashed
$this->ordering = 0;
}
return true;
}
/**
* Gets the default asset values for a component.
*
* @param $string $component The component asset name to search for
*
* @return JAccessRules The JAccessRules object for the asset
*/
protected function getDefaultAssetValues($component, $try = true)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
if ($db->loadRowList())
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
}
// try again
elseif ($try)
{
$try = explode('.',$component);
$result = $this->getDefaultAssetValues($try[0], false);
if ($result instanceof JAccessRules)
{
if (isset($try[1]))
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($try[1] !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
else
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count($_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules;
$rules->mergeCollection($_result);
return $rules;
}
}
return $result;
}
}
return JAccess::getAssetRules(0);
}
/**
* Method to compute the default name of the asset.
* The default name is in the form 'table_name.id'
* where id is the value of the primary key of the table.
*
* @return string
* @since 2.5
*/
protected function _getAssetName()
{
$k = $this->_tbl_key;
return 'com_supportgroups.clinic.'.(int) $this->$k;
}
/**
* Method to return the title to use for the asset table.
*
* @return string
* @since 2.5
*/
protected function _getAssetTitle()
{
if (isset($this->title))
{
return $this->title;
}
return '';
}
/**
* Get the parent asset id for the record
*
* @return int
* @since 2.5
*/
protected function _getAssetParentId(JTable $table = NULL, $id = NULL)
{
$asset = JTable::getInstance('Asset');
$asset->loadByName('com_supportgroups');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
}

View File

@ -0,0 +1,351 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage help_document.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
// import Joomla table library
jimport('joomla.database.table');
/**
* Help_documents Table class
*/
class SupportgroupsTableHelp_document extends JTable
{
/**
* Ensure the params and metadata in json encoded in the bind method
*
* @var array
* @since 3.3
*/
protected $_jsonEncode = array('params', 'metadata');
/**
* Constructor
*
* @param object Database connector object
*/
function __construct(&$db)
{
parent::__construct('#__supportgroups_help_document', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_supportgroups.help_document'));
}
public function bind($array, $ignore = '')
{
if (isset($array['params']) && is_array($array['params']))
{
$registry = new JRegistry;
$registry->loadArray($array['params']);
$array['params'] = (string) $registry;
}
if (isset($array['metadata']) && is_array($array['metadata']))
{
$registry = new JRegistry;
$registry->loadArray($array['metadata']);
$array['metadata'] = (string) $registry;
}
// Bind the rules.
if (isset($array['rules']) && is_array($array['rules']))
{
$rules = new JAccessRules($array['rules']);
$this->setRules($rules);
}
return parent::bind($array, $ignore);
}
/**
* Overload the store method for the Help_document table.
*
* @param boolean Toggle whether null values should be updated.
* @return boolean True on success, false on failure.
* @since 1.6
*/
public function store($updateNulls = false)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if ($this->id)
{
// Existing item
$this->modified = $date->toSql();
$this->modified_by = $user->get('id');
}
else
{
// New help_document. A help_document created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
$this->created = $date->toSql();
}
if (empty($this->created_by))
{
$this->created_by = $user->get('id');
}
}
if (isset($this->alias))
{
// Verify that the alias is unique
$table = JTable::getInstance('help_document', 'SupportgroupsTable');
if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_ERROR_UNIQUE_ALIAS'));
return false;
}
}
if (isset($this->url))
{
// Convert IDN urls to punycode
$this->url = JStringPunycode::urlToPunycode($this->url);
}
if (isset($this->website))
{
// Convert IDN urls to punycode
$this->website = JStringPunycode::urlToPunycode($this->website);
}
return parent::store($updateNulls);
}
/**
* Overloaded check method to ensure data integrity.
*
* @return boolean True on success.
*/
public function check()
{
if (isset($this->alias))
{
// Generate a valid alias
$this->generateAlias();
$table = JTable::getInstance('help_document', 'supportgroupsTable');
while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->alias = JString::increment($this->alias, 'dash');
}
}
/*
* Clean up keywords -- eliminate extra spaces between phrases
* and cr (\r) and lf (\n) characters from string.
* Only process if not empty.
*/
if (!empty($this->metakey))
{
// Array of characters to remove.
$bad_characters = array("\n", "\r", "\"", "<", ">");
// Remove bad characters.
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey);
// Create array using commas as delimiter.
$keys = explode(',', $after_clean);
$clean_keys = array();
foreach ($keys as $key)
{
// Ignore blank keywords.
if (trim($key))
{
$clean_keys[] = trim($key);
}
}
// Put array back together delimited by ", "
$this->metakey = implode(", ", $clean_keys);
}
// Clean up description -- eliminate quotes and <> brackets
if (!empty($this->metadesc))
{
// Only process if not empty
$bad_characters = array("\"", "<", ">");
$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
}
// If we don't have any access rules set at this point just use an empty JAccessRules class
if (!$this->getRules())
{
$rules = $this->getDefaultAssetValues('com_supportgroups.help_document.'.$this->id);
$this->setRules($rules);
}
// Set ordering
if ($this->published < 0)
{
// Set ordering to 0 if state is archived or trashed
$this->ordering = 0;
}
return true;
}
/**
* Gets the default asset values for a component.
*
* @param $string $component The component asset name to search for
*
* @return JAccessRules The JAccessRules object for the asset
*/
protected function getDefaultAssetValues($component, $try = true)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
if ($db->loadRowList())
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
}
// try again
elseif ($try)
{
$try = explode('.',$component);
$result = $this->getDefaultAssetValues($try[0], false);
if ($result instanceof JAccessRules)
{
if (isset($try[1]))
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($try[1] !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
else
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count($_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules;
$rules->mergeCollection($_result);
return $rules;
}
}
return $result;
}
}
return JAccess::getAssetRules(0);
}
/**
* Method to compute the default name of the asset.
* The default name is in the form 'table_name.id'
* where id is the value of the primary key of the table.
*
* @return string
* @since 2.5
*/
protected function _getAssetName()
{
$k = $this->_tbl_key;
return 'com_supportgroups.help_document.'.(int) $this->$k;
}
/**
* Method to return the title to use for the asset table.
*
* @return string
* @since 2.5
*/
protected function _getAssetTitle()
{
if (isset($this->title))
{
return $this->title;
}
return '';
}
/**
* Get the parent asset id for the record
*
* @return int
* @since 2.5
*/
protected function _getAssetParentId(JTable $table = NULL, $id = NULL)
{
$asset = JTable::getInstance('Asset');
$asset->loadByName('com_supportgroups');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
}

351
admin/tables/payment.php Normal file
View File

@ -0,0 +1,351 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage payment.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
// import Joomla table library
jimport('joomla.database.table');
/**
* Payments Table class
*/
class SupportgroupsTablePayment extends JTable
{
/**
* Ensure the params and metadata in json encoded in the bind method
*
* @var array
* @since 3.3
*/
protected $_jsonEncode = array('params', 'metadata');
/**
* Constructor
*
* @param object Database connector object
*/
function __construct(&$db)
{
parent::__construct('#__supportgroups_payment', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_supportgroups.payment'));
}
public function bind($array, $ignore = '')
{
if (isset($array['params']) && is_array($array['params']))
{
$registry = new JRegistry;
$registry->loadArray($array['params']);
$array['params'] = (string) $registry;
}
if (isset($array['metadata']) && is_array($array['metadata']))
{
$registry = new JRegistry;
$registry->loadArray($array['metadata']);
$array['metadata'] = (string) $registry;
}
// Bind the rules.
if (isset($array['rules']) && is_array($array['rules']))
{
$rules = new JAccessRules($array['rules']);
$this->setRules($rules);
}
return parent::bind($array, $ignore);
}
/**
* Overload the store method for the Payment table.
*
* @param boolean Toggle whether null values should be updated.
* @return boolean True on success, false on failure.
* @since 1.6
*/
public function store($updateNulls = false)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if ($this->id)
{
// Existing item
$this->modified = $date->toSql();
$this->modified_by = $user->get('id');
}
else
{
// New payment. A payment created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
$this->created = $date->toSql();
}
if (empty($this->created_by))
{
$this->created_by = $user->get('id');
}
}
if (isset($this->alias))
{
// Verify that the alias is unique
$table = JTable::getInstance('payment', 'SupportgroupsTable');
if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_SUPPORTGROUPS_PAYMENT_ERROR_UNIQUE_ALIAS'));
return false;
}
}
if (isset($this->url))
{
// Convert IDN urls to punycode
$this->url = JStringPunycode::urlToPunycode($this->url);
}
if (isset($this->website))
{
// Convert IDN urls to punycode
$this->website = JStringPunycode::urlToPunycode($this->website);
}
return parent::store($updateNulls);
}
/**
* Overloaded check method to ensure data integrity.
*
* @return boolean True on success.
*/
public function check()
{
if (isset($this->alias))
{
// Generate a valid alias
$this->generateAlias();
$table = JTable::getInstance('payment', 'supportgroupsTable');
while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->alias = JString::increment($this->alias, 'dash');
}
}
/*
* Clean up keywords -- eliminate extra spaces between phrases
* and cr (\r) and lf (\n) characters from string.
* Only process if not empty.
*/
if (!empty($this->metakey))
{
// Array of characters to remove.
$bad_characters = array("\n", "\r", "\"", "<", ">");
// Remove bad characters.
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey);
// Create array using commas as delimiter.
$keys = explode(',', $after_clean);
$clean_keys = array();
foreach ($keys as $key)
{
// Ignore blank keywords.
if (trim($key))
{
$clean_keys[] = trim($key);
}
}
// Put array back together delimited by ", "
$this->metakey = implode(", ", $clean_keys);
}
// Clean up description -- eliminate quotes and <> brackets
if (!empty($this->metadesc))
{
// Only process if not empty
$bad_characters = array("\"", "<", ">");
$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
}
// If we don't have any access rules set at this point just use an empty JAccessRules class
if (!$this->getRules())
{
$rules = $this->getDefaultAssetValues('com_supportgroups.payment.'.$this->id);
$this->setRules($rules);
}
// Set ordering
if ($this->published < 0)
{
// Set ordering to 0 if state is archived or trashed
$this->ordering = 0;
}
return true;
}
/**
* Gets the default asset values for a component.
*
* @param $string $component The component asset name to search for
*
* @return JAccessRules The JAccessRules object for the asset
*/
protected function getDefaultAssetValues($component, $try = true)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
if ($db->loadRowList())
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
}
// try again
elseif ($try)
{
$try = explode('.',$component);
$result = $this->getDefaultAssetValues($try[0], false);
if ($result instanceof JAccessRules)
{
if (isset($try[1]))
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($try[1] !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
else
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count($_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules;
$rules->mergeCollection($_result);
return $rules;
}
}
return $result;
}
}
return JAccess::getAssetRules(0);
}
/**
* Method to compute the default name of the asset.
* The default name is in the form 'table_name.id'
* where id is the value of the primary key of the table.
*
* @return string
* @since 2.5
*/
protected function _getAssetName()
{
$k = $this->_tbl_key;
return 'com_supportgroups.payment.'.(int) $this->$k;
}
/**
* Method to return the title to use for the asset table.
*
* @return string
* @since 2.5
*/
protected function _getAssetTitle()
{
if (isset($this->title))
{
return $this->title;
}
return '';
}
/**
* Get the parent asset id for the record
*
* @return int
* @since 2.5
*/
protected function _getAssetParentId(JTable $table = NULL, $id = NULL)
{
$asset = JTable::getInstance('Asset');
$asset->loadByName('com_supportgroups');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
}

View File

@ -0,0 +1,49 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage submitbutton.js
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
Joomla.submitbutton = function(task)
{
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true;
} else {
alert(Joomla.JText._('clinic, some values are not acceptable.','Some values are unacceptable'));
return false;
}
}
}

View File

@ -0,0 +1,95 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage edit.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_supportgroups');
?>
<form action="<?php echo JRoute::_('index.php?option=com_supportgroups&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<?php echo JLayoutHelper::render('clinic.details_above', $this); ?><div class="form-horizontal">
<?php echo JHtml::_('bootstrap.startTabSet', 'clinicTab', array('active' => 'details')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'clinicTab', 'details', JText::_('COM_SUPPORTGROUPS_CLINIC_DETAILS', true)); ?>
<div class="row-fluid form-horizontal-desktop">
</div>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<?php echo JLayoutHelper::render('clinic.details_fullwidth', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if ($this->canDo->get('clinic.delete') || $this->canDo->get('clinic.edit.created_by') || $this->canDo->get('clinic.edit.state') || $this->canDo->get('clinic.edit.created')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'clinicTab', 'publishing', JText::_('COM_SUPPORTGROUPS_CLINIC_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('clinic.publishing', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('clinic.metadata', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'clinicTab', 'permissions', JText::_('COM_SUPPORTGROUPS_CLINIC_PERMISSION', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div>
</fieldset>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<div>
<input type="hidden" name="task" value="clinic.edit" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
<div class="clearfix"></div>
<?php echo JLayoutHelper::render('clinic.details_under', $this); ?>
</form>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,200 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.3
@build 6th March, 2016
@created 24th February, 2016
@package Support Groups
@subpackage view.html.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Support Groups
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla view library
jimport('joomla.application.component.view');
/**
* Clinic View class
*/
class SupportgroupsViewClinic extends JViewLegacy
{
/**
* display method of View
* @return void
*/
public function display($tpl = null)
{
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode('<br />', $errors));
return false;
}
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = SupportgroupsHelper::getActions('clinic',$this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');
$this->refid = $jinput->get('refid', 0, 'int');
$this->referral = '';
if ($this->refid)
{
// return to the item that refered to this item
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
}
elseif($this->ref)
{
// return to the list view that refered to this item
$this->referral = '&ref='.(string)$this->ref;
}
// Set the toolbar
$this->addToolBar();
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->id;
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_SUPPORTGROUPS_CLINIC_NEW' : 'COM_SUPPORTGROUPS_CLINIC_EDIT'), 'pencil-2 article-add');
// Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('clinic.create') && $isNew)
{
// We can create the record.
JToolBarHelper::save('clinic.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('clinic.edit'))
{
// We can save the record.
JToolBarHelper::save('clinic.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// Do not creat but cancel.
JToolBarHelper::cancel('clinic.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// We can close it.
JToolBarHelper::cancel('clinic.cancel', 'JTOOLBAR_CLOSE');
}
}
else
{
if ($isNew)
{
// For new records, check the create permission.
if ($this->canDo->get('clinic.create'))
{
JToolBarHelper::apply('clinic.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('clinic.save', 'JTOOLBAR_SAVE');
JToolBarHelper::custom('clinic.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
};
JToolBarHelper::cancel('clinic.cancel', 'JTOOLBAR_CANCEL');
}
else
{
if ($this->canDo->get('clinic.edit'))
{
// We can save the new record
JToolBarHelper::apply('clinic.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('clinic.save', 'JTOOLBAR_SAVE');
// We can save this record, but check the create permission to see
// if we can return to make a new one.
if ($this->canDo->get('clinic.create'))
{
JToolBarHelper::custom('clinic.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
}
}
$canVersion = ($this->canDo->get('core.version') && $this->canDo->get('clinic.version'));
if ($this->state->params->get('save_history', 1) && $this->canDo->get('clinic.edit') && $canVersion)
{
JToolbarHelper::versions('com_supportgroups.clinic', $this->item->id);
}
if ($this->canDo->get('clinic.create'))
{
JToolBarHelper::custom('clinic.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
}
JToolBarHelper::cancel('clinic.cancel', 'JTOOLBAR_CLOSE');
}
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = SupportgroupsHelper::getHelpUrl('clinic');
if (SupportgroupsHelper::checkString($help_url))
{
JToolbarHelper::help('COM_SUPPORTGROUPS_HELP_MANAGER', false, $help_url);
}
}
/**
* Escapes a value for output in a view script.
*
* @param mixed $var The output to escape.
*
* @return mixed The escaped value.
*/
public function escape($var)
{
if(strlen($var) > 30)
{
// use the helper htmlEscape method instead and shorten the string
return SupportgroupsHelper::htmlEscape($var, $this->_charset, true, 30);
}
// use the helper htmlEscape method instead.
return SupportgroupsHelper::htmlEscape($var, $this->_charset);
}
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$isNew = ($this->item->id < 1);
$document = JFactory::getDocument();
$document->setTitle(JText::_($isNew ? 'COM_SUPPORTGROUPS_CLINIC_NEW' : 'COM_SUPPORTGROUPS_CLINIC_EDIT'));
$document->addStyleSheet(JURI::root() . "administrator/components/com_supportgroups/assets/css/clinic.css");
$document->addScript(JURI::root() . $this->script);
$document->addScript(JURI::root() . "administrator/components/com_supportgroups/views/clinic/submitbutton.js");
JText::script('view not acceptable. Error');
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

Some files were not shown because too many files have changed in this diff Show More