Fixed the input get of import method, all other changes are only random variable name and date changes (due to automation sorry)
This commit is contained in:
parent
8c18416d34
commit
6003da1e7b
@ -22,11 +22,11 @@ max_input_vars = 5000
|
|||||||
+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
|
+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
|
||||||
+ *Name*: [Cost Benefit Projection] (https://www.staffhealthcbp.com/)
|
+ *Name*: [Cost Benefit Projection] (https://www.staffhealthcbp.com/)
|
||||||
+ *First Build*: 15th June, 2012
|
+ *First Build*: 15th June, 2012
|
||||||
+ *Last Build*: 23rd December, 2015
|
+ *Last Build*: 6th January, 2016
|
||||||
+ *Version*: 3.1.0
|
+ *Version*: 3.1.0
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
+ *Line count*: **80206**
|
+ *Line count*: **80210**
|
||||||
+ *File count*: **545**
|
+ *File count*: **545**
|
||||||
+ *Folder count*: **101**
|
+ *Folder count*: **101**
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage admin.css
|
@subpackage admin.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage causerisk.css
|
@subpackage causerisk.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage causesrisks.css
|
@subpackage causesrisks.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage combinedresults.css
|
@subpackage combinedresults.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage companies.css
|
@subpackage companies.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage company.css
|
@subpackage company.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage companyresults.css
|
@subpackage companyresults.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage countries.css
|
@subpackage countries.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage country.css
|
@subpackage country.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage currencies.css
|
@subpackage currencies.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage currency.css
|
@subpackage currency.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage dashboard.css
|
@subpackage dashboard.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage health_data.css
|
@subpackage health_data.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage health_data_sets.css
|
@subpackage health_data_sets.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage help_document.css
|
@subpackage help_document.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage help_documents.css
|
@subpackage help_documents.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage intervention.css
|
@subpackage intervention.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage interventions.css
|
@subpackage interventions.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage scaling_factor.css
|
@subpackage scaling_factor.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage scaling_factors.css
|
@subpackage scaling_factors.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage service_provider.css
|
@subpackage service_provider.css
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage service_providers.css
|
@subpackage service_providers.css
|
||||||
|
@ -355,7 +355,7 @@
|
|||||||
multiple="true"
|
multiple="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- [11622] Memberbasicgroup Field. Type: Usergroup. (joomla) -->
|
<!-- [11631] Memberbasicgroup Field. Type: Usergroup. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="usergroup"
|
type="usergroup"
|
||||||
name="memberbasicgroup"
|
name="memberbasicgroup"
|
||||||
@ -363,7 +363,7 @@
|
|||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_MEMBERBASICGROUP_DESCRIPTION"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_MEMBERBASICGROUP_DESCRIPTION"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
/>
|
/>
|
||||||
<!-- [11622] Advancedmembergroup Field. Type: Usergroup. (joomla) -->
|
<!-- [11631] Advancedmembergroup Field. Type: Usergroup. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="usergroup"
|
type="usergroup"
|
||||||
name="advancedmembergroup"
|
name="advancedmembergroup"
|
||||||
@ -382,7 +382,7 @@
|
|||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LOAD_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LOAD_DESC"
|
||||||
class="btn-group btn-group-yesno"
|
class="btn-group btn-group-yesno"
|
||||||
default="">
|
default="">
|
||||||
<!-- [13495] Option Set. -->
|
<!-- [13519] Option Set. -->
|
||||||
<option value="">
|
<option value="">
|
||||||
COM_COSTBENEFITPROJECTION_CONFIG_AUTO_LOAD</option>"
|
COM_COSTBENEFITPROJECTION_CONFIG_AUTO_LOAD</option>"
|
||||||
<option value="1">
|
<option value="1">
|
||||||
@ -398,7 +398,7 @@
|
|||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_MIN_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_MIN_DESC"
|
||||||
class="btn-group btn-group-yesno"
|
class="btn-group btn-group-yesno"
|
||||||
default="">
|
default="">
|
||||||
<!-- [13520] Option Set. -->
|
<!-- [13544] Option Set. -->
|
||||||
<option value="">
|
<option value="">
|
||||||
COM_COSTBENEFITPROJECTION_CONFIG_NO</option>"
|
COM_COSTBENEFITPROJECTION_CONFIG_NO</option>"
|
||||||
<option value=".min">
|
<option value=".min">
|
||||||
@ -410,7 +410,7 @@
|
|||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_STYLE_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_STYLE_DESC"
|
||||||
class="btn-group btn-group-yesno"
|
class="btn-group btn-group-yesno"
|
||||||
default="">
|
default="">
|
||||||
<!-- [13541] Option Set. -->
|
<!-- [13565] Option Set. -->
|
||||||
<option value="">
|
<option value="">
|
||||||
COM_COSTBENEFITPROJECTION_CONFIG_FLAT_LOAD</option>"
|
COM_COSTBENEFITPROJECTION_CONFIG_FLAT_LOAD</option>"
|
||||||
<option value=".almost-flat">
|
<option value=".almost-flat">
|
||||||
@ -426,7 +426,7 @@
|
|||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHART_SETTINGS_DESC">
|
description="COM_COSTBENEFITPROJECTION_CONFIG_CHART_SETTINGS_DESC">
|
||||||
|
|
||||||
<field type="note" name="chart_admin_naote" class="alert alert-info" label="COM_COSTBENEFITPROJECTION_CONFIG_ADMIN_CHART_NOTE_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_ADMIN_CHART_NOTE_DESC" />
|
<field type="note" name="chart_admin_naote" class="alert alert-info" label="COM_COSTBENEFITPROJECTION_CONFIG_ADMIN_CHART_NOTE_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_ADMIN_CHART_NOTE_DESC" />
|
||||||
<!-- [13573] Admin_chartbackground Field. Type: Color. -->
|
<!-- [13597] Admin_chartbackground Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="admin_chartbackground"
|
name="admin_chartbackground"
|
||||||
@ -434,7 +434,7 @@
|
|||||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_LABEL"
|
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_LABEL"
|
||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_DESC"
|
||||||
/>
|
/>
|
||||||
<!-- [13581] Admin_mainwidth Field. Type: Text. -->
|
<!-- [13605] Admin_mainwidth Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="admin_mainwidth"
|
name="admin_mainwidth"
|
||||||
@ -447,9 +447,9 @@
|
|||||||
message="Error! Please add area width here."
|
message="Error! Please add area width here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13594] Spacer_chartadmin_hr_a Field. Type: Spacer. A None Database Field. -->
|
<!-- [13618] Spacer_chartadmin_hr_a Field. Type: Spacer. A None Database Field. -->
|
||||||
<field type="spacer" name="spacer_chartadmin_hr_a" hr="true" class="spacer_chartadmin_hr_a" />
|
<field type="spacer" name="spacer_chartadmin_hr_a" hr="true" class="spacer_chartadmin_hr_a" />
|
||||||
<!-- [13596] Admin_chartareatop Field. Type: Text. -->
|
<!-- [13620] Admin_chartareatop Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="admin_chartareatop"
|
name="admin_chartareatop"
|
||||||
@ -462,7 +462,7 @@
|
|||||||
message="Error! Please add top spacing here."
|
message="Error! Please add top spacing here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13609] Admin_chartarealeft Field. Type: Text. -->
|
<!-- [13633] Admin_chartarealeft Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="admin_chartarealeft"
|
name="admin_chartarealeft"
|
||||||
@ -475,7 +475,7 @@
|
|||||||
message="Error! Please add left spacing here."
|
message="Error! Please add left spacing here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13622] Admin_chartareawidth Field. Type: Text. -->
|
<!-- [13646] Admin_chartareawidth Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="admin_chartareawidth"
|
name="admin_chartareawidth"
|
||||||
@ -488,9 +488,9 @@
|
|||||||
message="Error! Please add chart width here."
|
message="Error! Please add chart width here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13635] Spacer_chartadmin_hr_b Field. Type: Spacer. A None Database Field. -->
|
<!-- [13659] Spacer_chartadmin_hr_b Field. Type: Spacer. A None Database Field. -->
|
||||||
<field type="spacer" name="spacer_chartadmin_hr_b" hr="true" class="spacer_chartadmin_hr_b" />
|
<field type="spacer" name="spacer_chartadmin_hr_b" hr="true" class="spacer_chartadmin_hr_b" />
|
||||||
<!-- [13637] Admin_legendtextstylefontcolor Field. Type: Color. -->
|
<!-- [13661] Admin_legendtextstylefontcolor Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="admin_legendtextstylefontcolor"
|
name="admin_legendtextstylefontcolor"
|
||||||
@ -498,7 +498,7 @@
|
|||||||
label="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_LABEL"
|
label="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_LABEL"
|
||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_DESC"
|
||||||
/>
|
/>
|
||||||
<!-- [13645] Admin_legendtextstylefontsize Field. Type: Text. -->
|
<!-- [13669] Admin_legendtextstylefontsize Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="admin_legendtextstylefontsize"
|
name="admin_legendtextstylefontsize"
|
||||||
@ -511,9 +511,9 @@
|
|||||||
message="Error! Please add size of the legend here."
|
message="Error! Please add size of the legend here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13658] Spacer_chartadmin_hr_c Field. Type: Spacer. A None Database Field. -->
|
<!-- [13682] Spacer_chartadmin_hr_c Field. Type: Spacer. A None Database Field. -->
|
||||||
<field type="spacer" name="spacer_chartadmin_hr_c" hr="true" class="spacer_chartadmin_hr_c" />
|
<field type="spacer" name="spacer_chartadmin_hr_c" hr="true" class="spacer_chartadmin_hr_c" />
|
||||||
<!-- [13660] Admin_vaxistextstylefontcolor Field. Type: Color. -->
|
<!-- [13684] Admin_vaxistextstylefontcolor Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="admin_vaxistextstylefontcolor"
|
name="admin_vaxistextstylefontcolor"
|
||||||
@ -521,9 +521,9 @@
|
|||||||
label="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_LABEL"
|
label="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_LABEL"
|
||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_DESC"
|
||||||
/>
|
/>
|
||||||
<!-- [13668] Spacer_chartadmin_hr_d Field. Type: Spacer. A None Database Field. -->
|
<!-- [13692] Spacer_chartadmin_hr_d Field. Type: Spacer. A None Database Field. -->
|
||||||
<field type="spacer" name="spacer_chartadmin_hr_d" hr="true" class="spacer_chartadmin_hr_d" />
|
<field type="spacer" name="spacer_chartadmin_hr_d" hr="true" class="spacer_chartadmin_hr_d" />
|
||||||
<!-- [13670] Admin_haxistextstylefontcolor Field. Type: Color. -->
|
<!-- [13694] Admin_haxistextstylefontcolor Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="admin_haxistextstylefontcolor"
|
name="admin_haxistextstylefontcolor"
|
||||||
@ -531,7 +531,7 @@
|
|||||||
label="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_LABEL"
|
label="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_LABEL"
|
||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_DESC"
|
||||||
/>
|
/>
|
||||||
<!-- [13678] Admin_haxistitletextstylefontcolor Field. Type: Color. -->
|
<!-- [13702] Admin_haxistitletextstylefontcolor Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="admin_haxistitletextstylefontcolor"
|
name="admin_haxistitletextstylefontcolor"
|
||||||
@ -542,7 +542,7 @@
|
|||||||
|
|
||||||
<field type="note" name="chart_site_note" class="alert alert-info" label="COM_COSTBENEFITPROJECTION_CONFIG_SITE_CHART_NOTE_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_SITE_CHART_NOTE_DESC" />
|
<field type="note" name="chart_site_note" class="alert alert-info" label="COM_COSTBENEFITPROJECTION_CONFIG_SITE_CHART_NOTE_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_SITE_CHART_NOTE_DESC" />
|
||||||
|
|
||||||
<!-- [13689] Site_chartbackground Field. Type: Color. -->
|
<!-- [13713] Site_chartbackground Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="site_chartbackground"
|
name="site_chartbackground"
|
||||||
@ -550,7 +550,7 @@
|
|||||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_LABEL"
|
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_LABEL"
|
||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_DESC"
|
||||||
/>
|
/>
|
||||||
<!-- [13697] Site_mainwidth Field. Type: Text. -->
|
<!-- [13721] Site_mainwidth Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="site_mainwidth"
|
name="site_mainwidth"
|
||||||
@ -563,9 +563,9 @@
|
|||||||
message="Error! Please add area width here."
|
message="Error! Please add area width here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13710] Spacer_chartsite_hr_a Field. Type: Spacer. A None Database Field. -->
|
<!-- [13734] Spacer_chartsite_hr_a Field. Type: Spacer. A None Database Field. -->
|
||||||
<field type="spacer" name="spacer_chartsite_hr_a" hr="true" class="spacer_chartsite_hr_a" />
|
<field type="spacer" name="spacer_chartsite_hr_a" hr="true" class="spacer_chartsite_hr_a" />
|
||||||
<!-- [13712] Site_chartareatop Field. Type: Text. -->
|
<!-- [13736] Site_chartareatop Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="site_chartareatop"
|
name="site_chartareatop"
|
||||||
@ -578,7 +578,7 @@
|
|||||||
message="Error! Please add top spacing here."
|
message="Error! Please add top spacing here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13725] Site_chartarealeft Field. Type: Text. -->
|
<!-- [13749] Site_chartarealeft Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="site_chartarealeft"
|
name="site_chartarealeft"
|
||||||
@ -591,7 +591,7 @@
|
|||||||
message="Error! Please add left spacing here."
|
message="Error! Please add left spacing here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13738] Site_chartareawidth Field. Type: Text. -->
|
<!-- [13762] Site_chartareawidth Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="site_chartareawidth"
|
name="site_chartareawidth"
|
||||||
@ -604,9 +604,9 @@
|
|||||||
message="Error! Please add chart width here."
|
message="Error! Please add chart width here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13751] Spacer_chartsite_hr_b Field. Type: Spacer. A None Database Field. -->
|
<!-- [13775] Spacer_chartsite_hr_b Field. Type: Spacer. A None Database Field. -->
|
||||||
<field type="spacer" name="spacer_chartsite_hr_b" hr="true" class="spacer_chartsite_hr_b" />
|
<field type="spacer" name="spacer_chartsite_hr_b" hr="true" class="spacer_chartsite_hr_b" />
|
||||||
<!-- [13753] Site_legendtextstylefontcolor Field. Type: Color. -->
|
<!-- [13777] Site_legendtextstylefontcolor Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="site_legendtextstylefontcolor"
|
name="site_legendtextstylefontcolor"
|
||||||
@ -614,7 +614,7 @@
|
|||||||
label="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_LABEL"
|
label="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_LABEL"
|
||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_DESC"
|
||||||
/>
|
/>
|
||||||
<!-- [13761] Site_legendtextstylefontsize Field. Type: Text. -->
|
<!-- [13785] Site_legendtextstylefontsize Field. Type: Text. -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="site_legendtextstylefontsize"
|
name="site_legendtextstylefontsize"
|
||||||
@ -627,9 +627,9 @@
|
|||||||
message="Error! Please add size of the legend here."
|
message="Error! Please add size of the legend here."
|
||||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_HINT"
|
hint="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- [13774] Spacer_chartsite_hr_c Field. Type: Spacer. A None Database Field. -->
|
<!-- [13798] Spacer_chartsite_hr_c Field. Type: Spacer. A None Database Field. -->
|
||||||
<field type="spacer" name="spacer_chartsite_hr_c" hr="true" class="spacer_chartsite_hr_c" />
|
<field type="spacer" name="spacer_chartsite_hr_c" hr="true" class="spacer_chartsite_hr_c" />
|
||||||
<!-- [13776] Site_vaxistextstylefontcolor Field. Type: Color. -->
|
<!-- [13800] Site_vaxistextstylefontcolor Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="site_vaxistextstylefontcolor"
|
name="site_vaxistextstylefontcolor"
|
||||||
@ -637,9 +637,9 @@
|
|||||||
label="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_LABEL"
|
label="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_LABEL"
|
||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_DESC"
|
||||||
/>
|
/>
|
||||||
<!-- [13784] Spacer_chartsite_hr_d Field. Type: Spacer. A None Database Field. -->
|
<!-- [13808] Spacer_chartsite_hr_d Field. Type: Spacer. A None Database Field. -->
|
||||||
<field type="spacer" name="spacer_chartsite_hr_d" hr="true" class="spacer_chartsite_hr_d" />
|
<field type="spacer" name="spacer_chartsite_hr_d" hr="true" class="spacer_chartsite_hr_d" />
|
||||||
<!-- [13786] Site_haxistextstylefontcolor Field. Type: Color. -->
|
<!-- [13810] Site_haxistextstylefontcolor Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="site_haxistextstylefontcolor"
|
name="site_haxistextstylefontcolor"
|
||||||
@ -647,7 +647,7 @@
|
|||||||
label="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_LABEL"
|
label="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_LABEL"
|
||||||
description="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_DESC"
|
description="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_DESC"
|
||||||
/>
|
/>
|
||||||
<!-- [13794] Site_haxistitletextstylefontcolor Field. Type: Color. -->
|
<!-- [13818] Site_haxistitletextstylefontcolor Field. Type: Color. -->
|
||||||
<field
|
<field
|
||||||
type="color"
|
type="color"
|
||||||
name="site_haxistitletextstylefontcolor"
|
name="site_haxistitletextstylefontcolor"
|
||||||
@ -669,7 +669,7 @@
|
|||||||
default=""
|
default=""
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- [11622] Resultpath Field. Type: Text. (joomla) -->
|
<!-- [11631] Resultpath Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="text"
|
||||||
name="resultpath"
|
name="resultpath"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage controller.php
|
@subpackage controller.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage ajax.json.php
|
@subpackage ajax.json.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage causerisk.php
|
@subpackage causerisk.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerCauserisk extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('causerisk.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('causerisk.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('causerisk.create', $this->option);
|
return JFactory::getUser()->authorise('causerisk.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,13 +76,13 @@ class CostbenefitprojectionControllerCauserisk extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
|
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('causerisk.access', 'com_costbenefitprojection.causerisk.' . (int) $recordId) && $user->authorise('causerisk.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('causerisk.access', 'com_costbenefitprojection.causerisk.' . (int) $recordId) && $user->authorise('causerisk.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -91,17 +91,17 @@ class CostbenefitprojectionControllerCauserisk extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('causerisk.edit', 'com_costbenefitprojection.causerisk.' . (int) $recordId);
|
$permission = $user->authorise('causerisk.edit', 'com_costbenefitprojection.causerisk.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('causerisk.edit.own', 'com_costbenefitprojection.causerisk.' . $recordId))
|
if ($user->authorise('causerisk.edit.own', 'com_costbenefitprojection.causerisk.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -111,7 +111,7 @@ class CostbenefitprojectionControllerCauserisk extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('causerisk.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('causerisk.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -123,7 +123,7 @@ class CostbenefitprojectionControllerCauserisk extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('causerisk.edit', $this->option);
|
return $user->authorise('causerisk.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage causesrisks.php
|
@subpackage causesrisks.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerCausesrisks extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('causerisk.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('causerisk.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Causesrisks');
|
$model = $this->getModel('Causesrisks');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Causesrisks_'.$date->format('jS_F_Y'),'Causesrisks exported ('.$date->format('jS F, Y').')','causesrisks');
|
CostbenefitprojectionHelper::xls($data,'Causesrisks_'.$date->format('jS_F_Y'),'Causesrisks exported ('.$date->format('jS F, Y').')','causesrisks');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=causesrisks', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=causesrisks', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerCausesrisks extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('causerisk.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('causerisk.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Causesrisks');
|
$model = $this->getModel('Causesrisks');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('causerisk_VDM_IMPORTHEADERS', $headers);
|
$session->set('causerisk_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'causesrisks');
|
$session->set('backto_VDM_IMPORT', 'causesrisks');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'causerisk');
|
$session->set('dataType_VDM_IMPORTINTO', 'causerisk');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_CAUSESRISKS');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_CAUSESRISKS');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=causesrisks', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=causesrisks', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage combinedresults.php
|
@subpackage combinedresults.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage companies.php
|
@subpackage companies.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerCompanies extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('company.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('company.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Companies');
|
$model = $this->getModel('Companies');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Companies_'.$date->format('jS_F_Y'),'Companies exported ('.$date->format('jS F, Y').')','companies');
|
CostbenefitprojectionHelper::xls($data,'Companies_'.$date->format('jS_F_Y'),'Companies exported ('.$date->format('jS F, Y').')','companies');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerCompanies extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('company.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('company.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Companies');
|
$model = $this->getModel('Companies');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('company_VDM_IMPORTHEADERS', $headers);
|
$session->set('company_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'companies');
|
$session->set('backto_VDM_IMPORT', 'companies');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'company');
|
$session->set('dataType_VDM_IMPORTINTO', 'company');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_COMPANIES');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_COMPANIES');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -105,23 +105,23 @@ class CostbenefitprojectionControllerCompanies extends JControllerAdmin
|
|||||||
|
|
||||||
public function redirectToCombinedresults()
|
public function redirectToCombinedresults()
|
||||||
{
|
{
|
||||||
// [7393] Check for request forgeries
|
// [7402] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7395] check if export is allowed for this user.
|
// [7404] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('combinedresults.access', 'com_costbenefitprojection'))
|
if ($user->authorise('combinedresults.access', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7399] Get the input
|
// [7408] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7402] Sanitize the input
|
// [7411] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7404] convert to string
|
// [7413] convert to string
|
||||||
$ids = implode('_', $pks);
|
$ids = implode('_', $pks);
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=combinedresults&cid='.$ids, false));
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=combinedresults&cid='.$ids, false));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// [7409] Redirect to the list screen with error.
|
// [7418] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_ACCESS_TO_COMBINEDRESULTS_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_ACCESS_TO_COMBINEDRESULTS_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage company.php
|
@subpackage company.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('company.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('company.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('company.create', $this->option);
|
return JFactory::getUser()->authorise('company.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +76,9 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('company.access', 'com_costbenefitprojection.company.' . (int) $recordId) && $user->authorise('company.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('company.access', 'com_costbenefitprojection.company.' . (int) $recordId) && $user->authorise('company.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -106,17 +106,17 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('company.edit', 'com_costbenefitprojection.company.' . (int) $recordId);
|
$permission = $user->authorise('company.edit', 'com_costbenefitprojection.company.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('company.edit.own', 'com_costbenefitprojection.company.' . $recordId))
|
if ($user->authorise('company.edit.own', 'com_costbenefitprojection.company.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -126,7 +126,7 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('company.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('company.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -138,7 +138,7 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('company.edit', $this->option);
|
return $user->authorise('company.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage companyresults.php
|
@subpackage companyresults.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage costbenefitprojection.php
|
@subpackage costbenefitprojection.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage countries.php
|
@subpackage countries.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerCountries extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('country.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('country.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Countries');
|
$model = $this->getModel('Countries');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Countries_'.$date->format('jS_F_Y'),'Countries exported ('.$date->format('jS F, Y').')','countries');
|
CostbenefitprojectionHelper::xls($data,'Countries_'.$date->format('jS_F_Y'),'Countries exported ('.$date->format('jS F, Y').')','countries');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=countries', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=countries', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerCountries extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('country.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('country.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Countries');
|
$model = $this->getModel('Countries');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('country_VDM_IMPORTHEADERS', $headers);
|
$session->set('country_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'countries');
|
$session->set('backto_VDM_IMPORT', 'countries');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'country');
|
$session->set('dataType_VDM_IMPORTINTO', 'country');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_COUNTRIES');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_COUNTRIES');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=countries', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=countries', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage country.php
|
@subpackage country.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerCountry extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('country.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('country.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('country.create', $this->option);
|
return JFactory::getUser()->authorise('country.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +76,9 @@ class CostbenefitprojectionControllerCountry extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
@ -91,7 +91,7 @@ class CostbenefitprojectionControllerCountry extends JControllerForm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('country.access', 'com_costbenefitprojection.country.' . (int) $recordId) && $user->authorise('country.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('country.access', 'com_costbenefitprojection.country.' . (int) $recordId) && $user->authorise('country.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -100,17 +100,17 @@ class CostbenefitprojectionControllerCountry extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('country.edit', 'com_costbenefitprojection.country.' . (int) $recordId);
|
$permission = $user->authorise('country.edit', 'com_costbenefitprojection.country.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('country.edit.own', 'com_costbenefitprojection.country.' . $recordId))
|
if ($user->authorise('country.edit.own', 'com_costbenefitprojection.country.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -120,7 +120,7 @@ class CostbenefitprojectionControllerCountry extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('country.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('country.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -132,7 +132,7 @@ class CostbenefitprojectionControllerCountry extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('country.edit', $this->option);
|
return $user->authorise('country.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage currencies.php
|
@subpackage currencies.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerCurrencies extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('currency.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('currency.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Currencies');
|
$model = $this->getModel('Currencies');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Currencies_'.$date->format('jS_F_Y'),'Currencies exported ('.$date->format('jS F, Y').')','currencies');
|
CostbenefitprojectionHelper::xls($data,'Currencies_'.$date->format('jS_F_Y'),'Currencies exported ('.$date->format('jS F, Y').')','currencies');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=currencies', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=currencies', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerCurrencies extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('currency.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('currency.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Currencies');
|
$model = $this->getModel('Currencies');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('currency_VDM_IMPORTHEADERS', $headers);
|
$session->set('currency_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'currencies');
|
$session->set('backto_VDM_IMPORT', 'currencies');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'currency');
|
$session->set('dataType_VDM_IMPORTINTO', 'currency');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_CURRENCIES');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_CURRENCIES');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=currencies', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=currencies', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage currency.php
|
@subpackage currency.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerCurrency extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('currency.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('currency.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('currency.create', $this->option);
|
return JFactory::getUser()->authorise('currency.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,13 +76,13 @@ class CostbenefitprojectionControllerCurrency extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
|
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('currency.access', 'com_costbenefitprojection.currency.' . (int) $recordId) && $user->authorise('currency.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('currency.access', 'com_costbenefitprojection.currency.' . (int) $recordId) && $user->authorise('currency.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -91,17 +91,17 @@ class CostbenefitprojectionControllerCurrency extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('currency.edit', 'com_costbenefitprojection.currency.' . (int) $recordId);
|
$permission = $user->authorise('currency.edit', 'com_costbenefitprojection.currency.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('currency.edit.own', 'com_costbenefitprojection.currency.' . $recordId))
|
if ($user->authorise('currency.edit.own', 'com_costbenefitprojection.currency.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -111,7 +111,7 @@ class CostbenefitprojectionControllerCurrency extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('currency.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('currency.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -123,7 +123,7 @@ class CostbenefitprojectionControllerCurrency extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('currency.edit', $this->option);
|
return $user->authorise('currency.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage health_data.php
|
@subpackage health_data.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('health_data.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('health_data.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('health_data.create', $this->option);
|
return JFactory::getUser()->authorise('health_data.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +76,9 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
@ -92,7 +92,7 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('health_data.access', 'com_costbenefitprojection.health_data.' . (int) $recordId) && $user->authorise('health_data.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('health_data.access', 'com_costbenefitprojection.health_data.' . (int) $recordId) && $user->authorise('health_data.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -101,17 +101,17 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('health_data.edit', 'com_costbenefitprojection.health_data.' . (int) $recordId);
|
$permission = $user->authorise('health_data.edit', 'com_costbenefitprojection.health_data.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('health_data.edit.own', 'com_costbenefitprojection.health_data.' . $recordId))
|
if ($user->authorise('health_data.edit.own', 'com_costbenefitprojection.health_data.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -121,7 +121,7 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('health_data.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('health_data.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -133,7 +133,7 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('health_data.edit', $this->option);
|
return $user->authorise('health_data.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage health_data_sets.php
|
@subpackage health_data_sets.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerHealth_data_sets extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('health_data.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('health_data.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Health_data_sets');
|
$model = $this->getModel('Health_data_sets');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Health_data_sets_'.$date->format('jS_F_Y'),'Health data sets exported ('.$date->format('jS F, Y').')','health data sets');
|
CostbenefitprojectionHelper::xls($data,'Health_data_sets_'.$date->format('jS_F_Y'),'Health data sets exported ('.$date->format('jS F, Y').')','health data sets');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerHealth_data_sets extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('health_data.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('health_data.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Health_data_sets');
|
$model = $this->getModel('Health_data_sets');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('health_data_VDM_IMPORTHEADERS', $headers);
|
$session->set('health_data_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'health_data_sets');
|
$session->set('backto_VDM_IMPORT', 'health_data_sets');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'health_data');
|
$session->set('dataType_VDM_IMPORTINTO', 'health_data');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_HEALTH_DATA_SETS');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_HEALTH_DATA_SETS');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage help.php
|
@subpackage help.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage help_document.php
|
@subpackage help_document.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerHelp_document extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('help_document.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('help_document.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('help_document.create', $this->option);
|
return JFactory::getUser()->authorise('help_document.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,13 +76,13 @@ class CostbenefitprojectionControllerHelp_document extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
|
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('help_document.access', 'com_costbenefitprojection.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('help_document.access', 'com_costbenefitprojection.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -91,17 +91,17 @@ class CostbenefitprojectionControllerHelp_document extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('help_document.edit', 'com_costbenefitprojection.help_document.' . (int) $recordId);
|
$permission = $user->authorise('help_document.edit', 'com_costbenefitprojection.help_document.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('help_document.edit.own', 'com_costbenefitprojection.help_document.' . $recordId))
|
if ($user->authorise('help_document.edit.own', 'com_costbenefitprojection.help_document.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -111,7 +111,7 @@ class CostbenefitprojectionControllerHelp_document extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('help_document.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('help_document.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -123,7 +123,7 @@ class CostbenefitprojectionControllerHelp_document extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('help_document.edit', $this->option);
|
return $user->authorise('help_document.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage help_documents.php
|
@subpackage help_documents.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerHelp_documents extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('help_document.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('help_document.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Help_documents');
|
$model = $this->getModel('Help_documents');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
|
CostbenefitprojectionHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=help_documents', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=help_documents', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerHelp_documents extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('help_document.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('help_document.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Help_documents');
|
$model = $this->getModel('Help_documents');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('help_document_VDM_IMPORTHEADERS', $headers);
|
$session->set('help_document_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'help_documents');
|
$session->set('backto_VDM_IMPORT', 'help_documents');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'help_document');
|
$session->set('dataType_VDM_IMPORTINTO', 'help_document');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=help_documents', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=help_documents', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage import.php
|
@subpackage import.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage intervention.php
|
@subpackage intervention.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('intervention.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('intervention.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('intervention.create', $this->option);
|
return JFactory::getUser()->authorise('intervention.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +76,9 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
// get company id
|
// get company id
|
||||||
$company = CostbenefitprojectionHelper::getId('intervention',$recordId,'id','company');
|
$company = CostbenefitprojectionHelper::getId('intervention',$recordId,'id','company');
|
||||||
@ -97,7 +97,7 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('intervention.access', 'com_costbenefitprojection.intervention.' . (int) $recordId) && $user->authorise('intervention.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('intervention.access', 'com_costbenefitprojection.intervention.' . (int) $recordId) && $user->authorise('intervention.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -106,17 +106,17 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('intervention.edit', 'com_costbenefitprojection.intervention.' . (int) $recordId);
|
$permission = $user->authorise('intervention.edit', 'com_costbenefitprojection.intervention.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('intervention.edit.own', 'com_costbenefitprojection.intervention.' . $recordId))
|
if ($user->authorise('intervention.edit.own', 'com_costbenefitprojection.intervention.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -126,7 +126,7 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('intervention.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('intervention.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -138,7 +138,7 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('intervention.edit', $this->option);
|
return $user->authorise('intervention.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage interventions.php
|
@subpackage interventions.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerInterventions extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('intervention.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('intervention.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Interventions');
|
$model = $this->getModel('Interventions');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Interventions_'.$date->format('jS_F_Y'),'Interventions exported ('.$date->format('jS F, Y').')','interventions');
|
CostbenefitprojectionHelper::xls($data,'Interventions_'.$date->format('jS_F_Y'),'Interventions exported ('.$date->format('jS F, Y').')','interventions');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=interventions', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=interventions', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerInterventions extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('intervention.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('intervention.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Interventions');
|
$model = $this->getModel('Interventions');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('intervention_VDM_IMPORTHEADERS', $headers);
|
$session->set('intervention_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'interventions');
|
$session->set('backto_VDM_IMPORT', 'interventions');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'intervention');
|
$session->set('dataType_VDM_IMPORTINTO', 'intervention');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_INTERVENTIONS');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_INTERVENTIONS');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=interventions', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=interventions', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage scaling_factor.php
|
@subpackage scaling_factor.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('scaling_factor.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('scaling_factor.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('scaling_factor.create', $this->option);
|
return JFactory::getUser()->authorise('scaling_factor.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +76,9 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
@ -91,7 +91,7 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('scaling_factor.access', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId) && $user->authorise('scaling_factor.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('scaling_factor.access', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId) && $user->authorise('scaling_factor.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -100,17 +100,17 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('scaling_factor.edit', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId);
|
$permission = $user->authorise('scaling_factor.edit', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection.scaling_factor.' . $recordId))
|
if ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection.scaling_factor.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -120,7 +120,7 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -132,7 +132,7 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('scaling_factor.edit', $this->option);
|
return $user->authorise('scaling_factor.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage scaling_factors.php
|
@subpackage scaling_factors.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerScaling_factors extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('scaling_factor.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('scaling_factor.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Scaling_factors');
|
$model = $this->getModel('Scaling_factors');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Scaling_factors_'.$date->format('jS_F_Y'),'Scaling factors exported ('.$date->format('jS F, Y').')','scaling factors');
|
CostbenefitprojectionHelper::xls($data,'Scaling_factors_'.$date->format('jS_F_Y'),'Scaling factors exported ('.$date->format('jS F, Y').')','scaling factors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=scaling_factors', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=scaling_factors', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerScaling_factors extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('scaling_factor.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('scaling_factor.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Scaling_factors');
|
$model = $this->getModel('Scaling_factors');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('scaling_factor_VDM_IMPORTHEADERS', $headers);
|
$session->set('scaling_factor_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'scaling_factors');
|
$session->set('backto_VDM_IMPORT', 'scaling_factors');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'scaling_factor');
|
$session->set('dataType_VDM_IMPORTINTO', 'scaling_factor');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_SCALING_FACTORS');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_SCALING_FACTORS');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=scaling_factors', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=scaling_factors', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage service_provider.php
|
@subpackage service_provider.php
|
||||||
@ -54,13 +54,13 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowAdd($data = array())
|
protected function allowAdd($data = array())
|
||||||
{
|
{
|
||||||
// [9571] Access check.
|
// [9580] Access check.
|
||||||
$access = JFactory::getUser()->authorise('service_provider.access', 'com_costbenefitprojection');
|
$access = JFactory::getUser()->authorise('service_provider.access', 'com_costbenefitprojection');
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// [9582] In the absense of better information, revert to the component permissions.
|
// [9591] In the absense of better information, revert to the component permissions.
|
||||||
return JFactory::getUser()->authorise('service_provider.create', $this->option);
|
return JFactory::getUser()->authorise('service_provider.create', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +76,9 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm
|
|||||||
*/
|
*/
|
||||||
protected function allowEdit($data = array(), $key = 'id')
|
protected function allowEdit($data = array(), $key = 'id')
|
||||||
{
|
{
|
||||||
// [9725] get user object.
|
// [9734] get user object.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
// [9727] get record id.
|
// [9736] get record id.
|
||||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
@ -90,7 +90,7 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9734] Access check.
|
// [9743] Access check.
|
||||||
$access = ($user->authorise('service_provider.access', 'com_costbenefitprojection.service_provider.' . (int) $recordId) && $user->authorise('service_provider.access', 'com_costbenefitprojection'));
|
$access = ($user->authorise('service_provider.access', 'com_costbenefitprojection.service_provider.' . (int) $recordId) && $user->authorise('service_provider.access', 'com_costbenefitprojection'));
|
||||||
if (!$access)
|
if (!$access)
|
||||||
{
|
{
|
||||||
@ -99,17 +99,17 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm
|
|||||||
|
|
||||||
if ($recordId)
|
if ($recordId)
|
||||||
{
|
{
|
||||||
// [9743] The record has been set. Check the record permissions.
|
// [9752] The record has been set. Check the record permissions.
|
||||||
$permission = $user->authorise('service_provider.edit', 'com_costbenefitprojection.service_provider.' . (int) $recordId);
|
$permission = $user->authorise('service_provider.edit', 'com_costbenefitprojection.service_provider.' . (int) $recordId);
|
||||||
if (!$permission && !is_null($permission))
|
if (!$permission && !is_null($permission))
|
||||||
{
|
{
|
||||||
if ($user->authorise('service_provider.edit.own', 'com_costbenefitprojection.service_provider.' . $recordId))
|
if ($user->authorise('service_provider.edit.own', 'com_costbenefitprojection.service_provider.' . $recordId))
|
||||||
{
|
{
|
||||||
// [9765] Now test the owner is the user.
|
// [9774] Now test the owner is the user.
|
||||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
if (empty($ownerId))
|
if (empty($ownerId))
|
||||||
{
|
{
|
||||||
// [9769] Need to do a lookup from the model.
|
// [9778] Need to do a lookup from the model.
|
||||||
$record = $this->getModel()->getItem($recordId);
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
if (empty($record))
|
if (empty($record))
|
||||||
@ -119,7 +119,7 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm
|
|||||||
$ownerId = $record->created_by;
|
$ownerId = $record->created_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [9777] If the owner matches 'me' then allow.
|
// [9786] If the owner matches 'me' then allow.
|
||||||
if ($ownerId == $user->id)
|
if ($ownerId == $user->id)
|
||||||
{
|
{
|
||||||
if ($user->authorise('service_provider.edit.own', 'com_costbenefitprojection'))
|
if ($user->authorise('service_provider.edit.own', 'com_costbenefitprojection'))
|
||||||
@ -131,7 +131,7 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [9799] Since there is no permission, revert to the component permissions.
|
// [9808] Since there is no permission, revert to the component permissions.
|
||||||
return $user->authorise('service_provider.edit', $this->option);
|
return $user->authorise('service_provider.edit', $this->option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage service_providers.php
|
@subpackage service_providers.php
|
||||||
@ -42,29 +42,29 @@ class CostbenefitprojectionControllerService_providers extends JControllerAdmin
|
|||||||
|
|
||||||
public function exportData()
|
public function exportData()
|
||||||
{
|
{
|
||||||
// [7521] Check for request forgeries
|
// [7530] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7523] check if export is allowed for this user.
|
// [7532] check if export is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('service_provider.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
if ($user->authorise('service_provider.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7527] Get the input
|
// [7536] Get the input
|
||||||
$input = JFactory::getApplication()->input;
|
$input = JFactory::getApplication()->input;
|
||||||
$pks = $input->post->get('cid', array(), 'array');
|
$pks = $input->post->get('cid', array(), 'array');
|
||||||
// [7530] Sanitize the input
|
// [7539] Sanitize the input
|
||||||
JArrayHelper::toInteger($pks);
|
JArrayHelper::toInteger($pks);
|
||||||
// [7532] Get the model
|
// [7541] Get the model
|
||||||
$model = $this->getModel('Service_providers');
|
$model = $this->getModel('Service_providers');
|
||||||
// [7534] get the data to export
|
// [7543] get the data to export
|
||||||
$data = $model->getExportData($pks);
|
$data = $model->getExportData($pks);
|
||||||
if (CostbenefitprojectionHelper::checkArray($data))
|
if (CostbenefitprojectionHelper::checkArray($data))
|
||||||
{
|
{
|
||||||
// [7538] now set the data to the spreadsheet
|
// [7547] now set the data to the spreadsheet
|
||||||
$date = JFactory::getDate();
|
$date = JFactory::getDate();
|
||||||
CostbenefitprojectionHelper::xls($data,'Service_providers_'.$date->format('jS_F_Y'),'Service providers exported ('.$date->format('jS F, Y').')','service providers');
|
CostbenefitprojectionHelper::xls($data,'Service_providers_'.$date->format('jS_F_Y'),'Service providers exported ('.$date->format('jS F, Y').')','service providers');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7543] Redirect to the list screen with error.
|
// [7552] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=service_providers', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=service_providers', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
@ -73,31 +73,31 @@ class CostbenefitprojectionControllerService_providers extends JControllerAdmin
|
|||||||
|
|
||||||
public function importData()
|
public function importData()
|
||||||
{
|
{
|
||||||
// [7552] Check for request forgeries
|
// [7561] Check for request forgeries
|
||||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||||
// [7554] check if import is allowed for this user.
|
// [7563] check if import is allowed for this user.
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
if ($user->authorise('service_provider.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
if ($user->authorise('service_provider.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||||
{
|
{
|
||||||
// [7558] Get the import model
|
// [7567] Get the import model
|
||||||
$model = $this->getModel('Service_providers');
|
$model = $this->getModel('Service_providers');
|
||||||
// [7560] get the headers to import
|
// [7569] get the headers to import
|
||||||
$headers = $model->getExImPortHeaders();
|
$headers = $model->getExImPortHeaders();
|
||||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||||
{
|
{
|
||||||
// [7564] Load headers to session.
|
// [7573] Load headers to session.
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$headers = json_encode($headers);
|
$headers = json_encode($headers);
|
||||||
$session->set('service_provider_VDM_IMPORTHEADERS', $headers);
|
$session->set('service_provider_VDM_IMPORTHEADERS', $headers);
|
||||||
$session->set('backto_VDM_IMPORT', 'service_providers');
|
$session->set('backto_VDM_IMPORT', 'service_providers');
|
||||||
$session->set('dataType_VDM_IMPORTINTO', 'service_provider');
|
$session->set('dataType_VDM_IMPORTINTO', 'service_provider');
|
||||||
// [7570] Redirect to import view.
|
// [7579] Redirect to import view.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_SERVICE_PROVIDERS');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_SERVICE_PROVIDERS');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [7582] Redirect to the list screen with error.
|
// [7591] Redirect to the list screen with error.
|
||||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=service_providers', false), $message, 'error');
|
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=service_providers', false), $message, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage costbenefitprojection.php
|
@subpackage costbenefitprojection.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage costbenefitprojection.php
|
@subpackage costbenefitprojection.php
|
||||||
@ -752,23 +752,23 @@ abstract class CostbenefitprojectionHelper
|
|||||||
$targetgroups = json_decode($help->groups, true);
|
$targetgroups = json_decode($help->groups, true);
|
||||||
if (!array_intersect($targetgroups, $groups))
|
if (!array_intersect($targetgroups, $groups))
|
||||||
{
|
{
|
||||||
// [1482] if user not in those target groups then remove the item
|
// [1487] if user not in those target groups then remove the item
|
||||||
unset($helps[$nr]);
|
unset($helps[$nr]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [1487] set the return type
|
// [1492] set the return type
|
||||||
switch ($help->type)
|
switch ($help->type)
|
||||||
{
|
{
|
||||||
// [1490] set joomla article
|
// [1495] set joomla article
|
||||||
case 1:
|
case 1:
|
||||||
return self::loadArticleLink($help->article);
|
return self::loadArticleLink($help->article);
|
||||||
break;
|
break;
|
||||||
// [1494] set help text
|
// [1499] set help text
|
||||||
case 2:
|
case 2:
|
||||||
return self::loadHelpTextLink($help->id);
|
return self::loadHelpTextLink($help->id);
|
||||||
break;
|
break;
|
||||||
// [1498] set Link
|
// [1503] set Link
|
||||||
case 3:
|
case 3:
|
||||||
return $help->url;
|
return $help->url;
|
||||||
break;
|
break;
|
||||||
@ -848,33 +848,33 @@ abstract class CostbenefitprojectionHelper
|
|||||||
*/
|
*/
|
||||||
public static function createUser($new)
|
public static function createUser($new)
|
||||||
{
|
{
|
||||||
// [1716] load the user component language files if there is an error.
|
// [1721] load the user component language files if there is an error.
|
||||||
$lang = JFactory::getLanguage();
|
$lang = JFactory::getLanguage();
|
||||||
$extension = 'com_users';
|
$extension = 'com_users';
|
||||||
$base_dir = JPATH_SITE;
|
$base_dir = JPATH_SITE;
|
||||||
$language_tag = 'en-GB';
|
$language_tag = 'en-GB';
|
||||||
$reload = true;
|
$reload = true;
|
||||||
$lang->load($extension, $base_dir, $language_tag, $reload);
|
$lang->load($extension, $base_dir, $language_tag, $reload);
|
||||||
// [1723] load the user regestration model
|
// [1728] load the user regestration model
|
||||||
$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');
|
$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');
|
||||||
// [1725] make sure no activation is needed
|
// [1730] make sure no activation is needed
|
||||||
$useractivation = self::setParams('com_users','useractivation',0);
|
$useractivation = self::setParams('com_users','useractivation',0);
|
||||||
// [1727] make sure password is send
|
// [1732] make sure password is send
|
||||||
$sendpassword = self::setParams('com_users','sendpassword',1);
|
$sendpassword = self::setParams('com_users','sendpassword',1);
|
||||||
// [1729] Check if password was set
|
// [1734] Check if password was set
|
||||||
if (isset($new['password']) && isset($new['password2']) && self::checkString($new['password']) && self::checkString($new['password2']))
|
if (isset($new['password']) && isset($new['password2']) && self::checkString($new['password']) && self::checkString($new['password2']))
|
||||||
{
|
{
|
||||||
// [1732] Use the users passwords
|
// [1737] Use the users passwords
|
||||||
$password = $new['password'];
|
$password = $new['password'];
|
||||||
$password2 = $new['password2'];
|
$password2 = $new['password2'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// [1738] Set random password
|
// [1743] Set random password
|
||||||
$password = self::randomkey(8);
|
$password = self::randomkey(8);
|
||||||
$password2 = $password;
|
$password2 = $password;
|
||||||
}
|
}
|
||||||
// [1742] set username
|
// [1747] set username
|
||||||
if (isset($new['username']) && self::checkString($new['username']))
|
if (isset($new['username']) && self::checkString($new['username']))
|
||||||
{
|
{
|
||||||
$new['username'] = self::safeString($new['username']);
|
$new['username'] = self::safeString($new['username']);
|
||||||
@ -883,7 +883,7 @@ abstract class CostbenefitprojectionHelper
|
|||||||
{
|
{
|
||||||
$new['username'] = self::safeString($new['name']);
|
$new['username'] = self::safeString($new['name']);
|
||||||
}
|
}
|
||||||
// [1751] linup new user data
|
// [1756] linup new user data
|
||||||
$data = array(
|
$data = array(
|
||||||
'username' => $new['username'],
|
'username' => $new['username'],
|
||||||
'name' => $new['name'],
|
'name' => $new['name'],
|
||||||
@ -891,13 +891,13 @@ abstract class CostbenefitprojectionHelper
|
|||||||
'password1' => $password, // First password field
|
'password1' => $password, // First password field
|
||||||
'password2' => $password2, // Confirm password field
|
'password2' => $password2, // Confirm password field
|
||||||
'block' => 0 );
|
'block' => 0 );
|
||||||
// [1759] register the new user
|
// [1764] register the new user
|
||||||
$userId = $model->register($data);
|
$userId = $model->register($data);
|
||||||
// [1761] set activation back to default
|
// [1766] set activation back to default
|
||||||
self::setParams('com_users','useractivation',$useractivation);
|
self::setParams('com_users','useractivation',$useractivation);
|
||||||
// [1763] set send password back to default
|
// [1768] set send password back to default
|
||||||
self::setParams('com_users','sendpassword',$sendpassword);
|
self::setParams('com_users','sendpassword',$sendpassword);
|
||||||
// [1765] if user is created
|
// [1770] if user is created
|
||||||
if ($userId > 0)
|
if ($userId > 0)
|
||||||
{
|
{
|
||||||
return $userId;
|
return $userId;
|
||||||
@ -907,21 +907,21 @@ abstract class CostbenefitprojectionHelper
|
|||||||
|
|
||||||
protected static function setParams($component,$target,$value)
|
protected static function setParams($component,$target,$value)
|
||||||
{
|
{
|
||||||
// [1775] Get the params and set the new values
|
// [1780] Get the params and set the new values
|
||||||
$params = JComponentHelper::getParams($component);
|
$params = JComponentHelper::getParams($component);
|
||||||
$was = $params->get($target, null);
|
$was = $params->get($target, null);
|
||||||
if ($was != $value)
|
if ($was != $value)
|
||||||
{
|
{
|
||||||
$params->set($target, $value);
|
$params->set($target, $value);
|
||||||
// [1781] Get a new database query instance
|
// [1786] Get a new database query instance
|
||||||
$db = JFactory::getDBO();
|
$db = JFactory::getDBO();
|
||||||
$query = $db->getQuery(true);
|
$query = $db->getQuery(true);
|
||||||
// [1784] Build the query
|
// [1789] Build the query
|
||||||
$query->update('#__extensions AS a');
|
$query->update('#__extensions AS a');
|
||||||
$query->set('a.params = ' . $db->quote((string)$params));
|
$query->set('a.params = ' . $db->quote((string)$params));
|
||||||
$query->where('a.element = ' . $db->quote((string)$component));
|
$query->where('a.element = ' . $db->quote((string)$component));
|
||||||
|
|
||||||
// [1789] Execute the query
|
// [1794] Execute the query
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
$db->query();
|
$db->query();
|
||||||
}
|
}
|
||||||
@ -997,7 +997,7 @@ abstract class CostbenefitprojectionHelper
|
|||||||
{
|
{
|
||||||
if (strpos($content,'class="uk-') !== false)
|
if (strpos($content,'class="uk-') !== false)
|
||||||
{
|
{
|
||||||
// [2726] reset
|
// [2731] reset
|
||||||
$temp = array();
|
$temp = array();
|
||||||
foreach (self::$uk_components as $looking => $add)
|
foreach (self::$uk_components as $looking => $add)
|
||||||
{
|
{
|
||||||
@ -1006,15 +1006,15 @@ abstract class CostbenefitprojectionHelper
|
|||||||
$temp[] = $looking;
|
$temp[] = $looking;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [2735] make sure uikit is loaded to config
|
// [2740] make sure uikit is loaded to config
|
||||||
if (strpos($content,'class="uk-') !== false)
|
if (strpos($content,'class="uk-') !== false)
|
||||||
{
|
{
|
||||||
self::$uikit = true;
|
self::$uikit = true;
|
||||||
}
|
}
|
||||||
// [2740] sorter
|
// [2745] sorter
|
||||||
if (self::checkArray($temp))
|
if (self::checkArray($temp))
|
||||||
{
|
{
|
||||||
// [2743] merger
|
// [2748] merger
|
||||||
if (self::checkArray($classes))
|
if (self::checkArray($classes))
|
||||||
{
|
{
|
||||||
$newTemp = array_merge($temp,$classes);
|
$newTemp = array_merge($temp,$classes);
|
||||||
@ -1035,37 +1035,37 @@ abstract class CostbenefitprojectionHelper
|
|||||||
*/
|
*/
|
||||||
public static function xls($rows,$fileName = null,$title = null,$subjectTab = null,$creator = 'Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb',$description = null,$category = null,$keywords = null,$modified = null)
|
public static function xls($rows,$fileName = null,$title = null,$subjectTab = null,$creator = 'Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb',$description = null,$category = null,$keywords = null,$modified = null)
|
||||||
{
|
{
|
||||||
// [1537] set the user
|
// [1542] set the user
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
|
|
||||||
// [1540] set fieldname if not set
|
// [1545] set fieldname if not set
|
||||||
if (!$fileName)
|
if (!$fileName)
|
||||||
{
|
{
|
||||||
$fileName = 'exported_'.JFactory::getDate()->format('jS_F_Y');
|
$fileName = 'exported_'.JFactory::getDate()->format('jS_F_Y');
|
||||||
}
|
}
|
||||||
// [1545] set modiefied if not set
|
// [1550] set modiefied if not set
|
||||||
if (!$modified)
|
if (!$modified)
|
||||||
{
|
{
|
||||||
$modified = $user->name;
|
$modified = $user->name;
|
||||||
}
|
}
|
||||||
// [1550] set title if not set
|
// [1555] set title if not set
|
||||||
if (!$title)
|
if (!$title)
|
||||||
{
|
{
|
||||||
$title = 'Book1';
|
$title = 'Book1';
|
||||||
}
|
}
|
||||||
// [1555] set tab name if not set
|
// [1560] set tab name if not set
|
||||||
if (!$subjectTab)
|
if (!$subjectTab)
|
||||||
{
|
{
|
||||||
$subjectTab = 'Sheet1';
|
$subjectTab = 'Sheet1';
|
||||||
}
|
}
|
||||||
|
|
||||||
// [1561] make sure the file is loaded
|
// [1566] make sure the file is loaded
|
||||||
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
|
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
|
||||||
|
|
||||||
// [1564] Create new PHPExcel object
|
// [1569] Create new PHPExcel object
|
||||||
$objPHPExcel = new PHPExcel();
|
$objPHPExcel = new PHPExcel();
|
||||||
|
|
||||||
// [1567] Set document properties
|
// [1572] Set document properties
|
||||||
$objPHPExcel->getProperties()->setCreator($creator)
|
$objPHPExcel->getProperties()->setCreator($creator)
|
||||||
->setCompany('Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb')
|
->setCompany('Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb')
|
||||||
->setLastModifiedBy($modified)
|
->setLastModifiedBy($modified)
|
||||||
@ -1084,7 +1084,7 @@ abstract class CostbenefitprojectionHelper
|
|||||||
$objPHPExcel->getProperties()->setCategory($category);
|
$objPHPExcel->getProperties()->setCategory($category);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [1586] Some styles
|
// [1591] Some styles
|
||||||
$headerStyles = array(
|
$headerStyles = array(
|
||||||
'font' => array(
|
'font' => array(
|
||||||
'bold' => true,
|
'bold' => true,
|
||||||
@ -1106,7 +1106,7 @@ abstract class CostbenefitprojectionHelper
|
|||||||
'name' => 'Verdana'
|
'name' => 'Verdana'
|
||||||
));
|
));
|
||||||
|
|
||||||
// [1608] Add some data
|
// [1613] Add some data
|
||||||
if (self::checkArray($rows))
|
if (self::checkArray($rows))
|
||||||
{
|
{
|
||||||
$i = 1;
|
$i = 1;
|
||||||
@ -1133,20 +1133,20 @@ abstract class CostbenefitprojectionHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [1635] Rename worksheet
|
// [1640] Rename worksheet
|
||||||
$objPHPExcel->getActiveSheet()->setTitle($subjectTab);
|
$objPHPExcel->getActiveSheet()->setTitle($subjectTab);
|
||||||
|
|
||||||
// [1638] Set active sheet index to the first sheet, so Excel opens this as the first sheet
|
// [1643] Set active sheet index to the first sheet, so Excel opens this as the first sheet
|
||||||
$objPHPExcel->setActiveSheetIndex(0);
|
$objPHPExcel->setActiveSheetIndex(0);
|
||||||
|
|
||||||
// [1641] Redirect output to a client's web browser (Excel5)
|
// [1646] Redirect output to a client's web browser (Excel5)
|
||||||
header('Content-Type: application/vnd.ms-excel');
|
header('Content-Type: application/vnd.ms-excel');
|
||||||
header('Content-Disposition: attachment;filename="'.$fileName.'.xls"');
|
header('Content-Disposition: attachment;filename="'.$fileName.'.xls"');
|
||||||
header('Cache-Control: max-age=0');
|
header('Cache-Control: max-age=0');
|
||||||
// [1645] If you're serving to IE 9, then the following may be needed
|
// [1650] If you're serving to IE 9, then the following may be needed
|
||||||
header('Cache-Control: max-age=1');
|
header('Cache-Control: max-age=1');
|
||||||
|
|
||||||
// [1648] If you're serving to IE over SSL, then the following may be needed
|
// [1653] If you're serving to IE over SSL, then the following may be needed
|
||||||
header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
|
header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
|
||||||
header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
|
header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
|
||||||
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
|
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
|
||||||
@ -1162,13 +1162,13 @@ abstract class CostbenefitprojectionHelper
|
|||||||
*/
|
*/
|
||||||
public static function getFileHeaders($dataType)
|
public static function getFileHeaders($dataType)
|
||||||
{
|
{
|
||||||
// [1664] make sure the file is loaded
|
// [1669] make sure the file is loaded
|
||||||
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
|
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
|
||||||
// [1666] get session object
|
// [1671] get session object
|
||||||
$session = JFactory::getSession();
|
$session = JFactory::getSession();
|
||||||
$package = $session->get('package', null);
|
$package = $session->get('package', null);
|
||||||
$package = json_decode($package, true);
|
$package = json_decode($package, true);
|
||||||
// [1670] set the headers
|
// [1675] set the headers
|
||||||
if(isset($package['dir']))
|
if(isset($package['dir']))
|
||||||
{
|
{
|
||||||
$inputFileType = PHPExcel_IOFactory::identify($package['dir']);
|
$inputFileType = PHPExcel_IOFactory::identify($package['dir']);
|
||||||
@ -1969,12 +1969,12 @@ abstract class CostbenefitprojectionHelper
|
|||||||
{
|
{
|
||||||
if ('advanced' == $type)
|
if ('advanced' == $type)
|
||||||
{
|
{
|
||||||
// [1289] Get the global params
|
// [1294] Get the global params
|
||||||
$params = JComponentHelper::getParams('com_costbenefitprojection', true);
|
$params = JComponentHelper::getParams('com_costbenefitprojection', true);
|
||||||
$advanced_key = $params->get('advanced_key', null);
|
$advanced_key = $params->get('advanced_key', null);
|
||||||
if ($advanced_key)
|
if ($advanced_key)
|
||||||
{
|
{
|
||||||
// [1294] load the file
|
// [1299] load the file
|
||||||
JLoader::import( 'vdm', JPATH_COMPONENT_ADMINISTRATOR);
|
JLoader::import( 'vdm', JPATH_COMPONENT_ADMINISTRATOR);
|
||||||
|
|
||||||
$the = new VDM($advanced_key);
|
$the = new VDM($advanced_key);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage batch_.php
|
@subpackage batch_.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage sum.php
|
@subpackage sum.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage sumcombine.php
|
@subpackage sumcombine.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage batchselection.php
|
@subpackage batchselection.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_above.php
|
@subpackage details_above.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_left.php
|
@subpackage details_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publishing.php
|
@subpackage publishing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publlshing.php
|
@subpackage publlshing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage age_groups_percentages_fullwidth.php
|
@subpackage age_groups_percentages_fullwidth.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage age_groups_percentages_left.php
|
@subpackage age_groups_percentages_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage age_groups_percentages_right.php
|
@subpackage age_groups_percentages_right.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage causerisk_selection_fullwidth.php
|
@subpackage causerisk_selection_fullwidth.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_above.php
|
@subpackage details_above.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_left.php
|
@subpackage details_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_right.php
|
@subpackage details_right.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_under.php
|
@subpackage details_under.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage interventions_fullwidth.php
|
@subpackage interventions_fullwidth.php
|
||||||
@ -22,7 +22,7 @@
|
|||||||
defined('_JEXEC') or die('Restricted access');
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
// set the defaults
|
// set the defaults
|
||||||
$items = $displayData->wrkinterventions;
|
$items = $displayData->fwvinterventions;
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
$id = $displayData->item->id;
|
$id = $displayData->item->id;
|
||||||
$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit";
|
$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit";
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publishing.php
|
@subpackage publishing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publlshing.php
|
@subpackage publlshing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage scaling_factors_fullwidth.php
|
@subpackage scaling_factors_fullwidth.php
|
||||||
@ -22,7 +22,7 @@
|
|||||||
defined('_JEXEC') or die('Restricted access');
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
// set the defaults
|
// set the defaults
|
||||||
$items = $displayData->rxjscaling_factors;
|
$items = $displayData->haascaling_factors;
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
$id = $displayData->item->id;
|
$id = $displayData->item->id;
|
||||||
$edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=scaling_factor.edit";
|
$edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=scaling_factor.edit";
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage age_groups_percentages_left.php
|
@subpackage age_groups_percentages_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage age_groups_percentages_right.php
|
@subpackage age_groups_percentages_right.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage causerisk_selection_fullwidth.php
|
@subpackage causerisk_selection_fullwidth.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage companies_fullwidth.php
|
@subpackage companies_fullwidth.php
|
||||||
@ -22,7 +22,7 @@
|
|||||||
defined('_JEXEC') or die('Restricted access');
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
// set the defaults
|
// set the defaults
|
||||||
$items = $displayData->myzcompanies;
|
$items = $displayData->goxcompanies;
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
$id = $displayData->item->id;
|
$id = $displayData->item->id;
|
||||||
$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit";
|
$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit";
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_above.php
|
@subpackage details_above.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_left.php
|
@subpackage details_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_right.php
|
@subpackage details_right.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage health_data_totals_left.php
|
@subpackage health_data_totals_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage health_data_totals_right.php
|
@subpackage health_data_totals_right.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage public_details_fullwidth.php
|
@subpackage public_details_fullwidth.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publishing.php
|
@subpackage publishing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publlshing.php
|
@subpackage publlshing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage service_providers_fullwidth.php
|
@subpackage service_providers_fullwidth.php
|
||||||
@ -22,7 +22,7 @@
|
|||||||
defined('_JEXEC') or die('Restricted access');
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
// set the defaults
|
// set the defaults
|
||||||
$items = $displayData->zrcservice_providers;
|
$items = $displayData->zjpservice_providers;
|
||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
$id = $displayData->item->id;
|
$id = $displayData->item->id;
|
||||||
$edit = "index.php?option=com_costbenefitprojection&view=service_providers&task=service_provider.edit";
|
$edit = "index.php?option=com_costbenefitprojection&view=service_providers&task=service_provider.edit";
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_above.php
|
@subpackage details_above.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_left.php
|
@subpackage details_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_right.php
|
@subpackage details_right.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publishing.php
|
@subpackage publishing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publlshing.php
|
@subpackage publlshing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_above.php
|
@subpackage details_above.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_left.php
|
@subpackage details_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_right.php
|
@subpackage details_right.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_rightside.php
|
@subpackage details_rightside.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publishing.php
|
@subpackage publishing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage publlshing.php
|
@subpackage publlshing.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_above.php
|
@subpackage details_above.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_fullwidth.php
|
@subpackage details_fullwidth.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_left.php
|
@subpackage details_left.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_right.php
|
@subpackage details_right.php
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 3.1.0
|
@version 3.1.0
|
||||||
@build 23rd December, 2015
|
@build 6th January, 2016
|
||||||
@created 15th June, 2012
|
@created 15th June, 2012
|
||||||
@package Cost Benefit Projection
|
@package Cost Benefit Projection
|
||||||
@subpackage details_under.php
|
@subpackage details_under.php
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user