diff --git a/README.md b/README.md index 0fc59067..b39c5503 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Cost Benefit Projection (3.4.2) +# Cost Benefit Projection (3.4.3) -This is a [Joomla 3.x] (http://www.joomla.org/) component. +This is a [Joomla 3.x](http://www.joomla.org/) component. - ![Cost Benefit Projection image] (https://raw.githubusercontent.com/namibia/CBP-Joomla-3-Component/master/admin/assets/images/component-300.png "The Cost Benefit Projection") + ![Cost Benefit Projection image](https://raw.githubusercontent.com/namibia/CBP-Joomla-3-Component/master/admin/assets/images/vdm-component.png "The Cost Benefit Projection") -[Create Epidemiological Profiles] (https://www.staffhealthcbp.com/) for diseases and risks affecting your company. Detailed information on projected work days lost and costs. Create and edit activities and wellness responses for your workplace. Access to Small Business Modelling. Results displayed by gender. Network with other companies and wellness professionals. +Create Epidemiological Profiles for diseases and risks affecting your company. Detailed information on projected work days lost and costs. Create and edit activities and wellness responses for your workplace. Access to Small Business Modeling. Results displayed by gender. Network with other companies and wellness professionals. Having seen the health priorities for your workforce, the tool outputs projections for how the interventions – which you have designed - are expected to benefit the company financially. @@ -18,17 +18,17 @@ max_input_vars = 5000 ``` # Build Details -+ *Company*: [Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb] (https://www.staffhealthcbp.com/) -+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io) -+ *Name*: [Cost Benefit Projection] (https://www.staffhealthcbp.com/) ++ *Company*: [Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb](https://www.staffhealthcbp.com/) ++ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) ++ *Name*: [Cost Benefit Projection](https://www.staffhealthcbp.com/) + *First Build*: 15th June, 2012 -+ *Last Build*: 16th August, 2016 -+ *Version*: 3.4.2 ++ *Last Build*: 5th May, 2018 ++ *Version*: 3.4.3 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **91716** -+ *File count*: **572** ++ *Line count*: **91257** ++ *File count*: **584** + *Folder count*: **103** -> This **component** was build with a Joomla [Automated Component Builder] (https://www.vdm.io/joomla-component-builder). -> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io) \ No newline at end of file +> This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder). +> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) \ No newline at end of file diff --git a/admin/README.txt b/admin/README.txt new file mode 100644 index 00000000..b39c5503 --- /dev/null +++ b/admin/README.txt @@ -0,0 +1,34 @@ +# Cost Benefit Projection (3.4.3) + +This is a [Joomla 3.x](http://www.joomla.org/) component. + + ![Cost Benefit Projection image](https://raw.githubusercontent.com/namibia/CBP-Joomla-3-Component/master/admin/assets/images/vdm-component.png "The Cost Benefit Projection") + +Create Epidemiological Profiles for diseases and risks affecting your company. Detailed information on projected work days lost and costs. Create and edit activities and wellness responses for your workplace. Access to Small Business Modeling. Results displayed by gender. Network with other companies and wellness professionals. + +Having seen the health priorities for your workforce, the tool outputs projections for how the interventions – which you have designed - are expected to benefit the company financially. + +Benefits are calculated based on the model projecting reductions in workdays lost due to sickness, presenteeism and death. + +# Requirements + +Due to the size of the permissional structure, you will need to increase max_input_vars until the permissions are able to save. +``` +max_input_vars = 5000 +``` +# Build Details + ++ *Company*: [Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb](https://www.staffhealthcbp.com/) ++ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) ++ *Name*: [Cost Benefit Projection](https://www.staffhealthcbp.com/) ++ *First Build*: 15th June, 2012 ++ *Last Build*: 5th May, 2018 ++ *Version*: 3.4.3 ++ *Copyright*: Copyright (C) 2015. All Rights Reserved ++ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html ++ *Line count*: **91257** ++ *File count*: **584** ++ *Folder count*: **103** + +> This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder). +> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) \ No newline at end of file diff --git a/admin/access.xml b/admin/access.xml index 0dfdd180..55c4427e 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -131,7 +131,6 @@ - @@ -174,8 +173,8 @@ - + @@ -217,10 +216,10 @@ + -
diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 52097495..9a2ac6ba 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -2,8 +2,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage admin.css diff --git a/admin/assets/css/causerisk.css b/admin/assets/css/causerisk.css index 13b0e59d..20e87dea 100644 --- a/admin/assets/css/causerisk.css +++ b/admin/assets/css/causerisk.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage causerisk.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/causesrisks.css b/admin/assets/css/causesrisks.css index 09ed5fb8..eba19096 100644 --- a/admin/assets/css/causesrisks.css +++ b/admin/assets/css/causesrisks.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage causesrisks.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/combinedresults.css b/admin/assets/css/combinedresults.css index 30f7858f..bb546951 100644 --- a/admin/assets/css/combinedresults.css +++ b/admin/assets/css/combinedresults.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 22 of this MVC + @build 14th October, 2017 + @created 3rd October, 2015 @package Cost Benefit Projection @subpackage combinedresults.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/companies.css b/admin/assets/css/companies.css index 88826678..57e751ea 100644 --- a/admin/assets/css/companies.css +++ b/admin/assets/css/companies.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 101 of this MVC + @build 29th June, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage companies.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/company.css b/admin/assets/css/company.css index 3953d4a6..7242db84 100644 --- a/admin/assets/css/company.css +++ b/admin/assets/css/company.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 101 of this MVC + @build 29th June, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage company.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/companyresults.css b/admin/assets/css/companyresults.css index e8f55a42..2a330afd 100644 --- a/admin/assets/css/companyresults.css +++ b/admin/assets/css/companyresults.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 60 of this MVC + @build 14th October, 2017 + @created 13th August, 2015 @package Cost Benefit Projection @subpackage companyresults.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/countries.css b/admin/assets/css/countries.css index b6c9b669..5e492cd1 100644 --- a/admin/assets/css/countries.css +++ b/admin/assets/css/countries.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 52 of this MVC + @build 25th October, 2017 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage countries.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/country.css b/admin/assets/css/country.css index 2de562f1..950f2df6 100644 --- a/admin/assets/css/country.css +++ b/admin/assets/css/country.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 52 of this MVC + @build 25th October, 2017 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage country.css @author Llewellyn van der Merwe @@ -18,4 +18,7 @@ /* CSS Document */ - + +input[type="checkbox"] { + margin: 0 !important; +} diff --git a/admin/assets/css/currencies.css b/admin/assets/css/currencies.css index 67ca9ffd..6a7779f9 100644 --- a/admin/assets/css/currencies.css +++ b/admin/assets/css/currencies.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage currencies.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/currency.css b/admin/assets/css/currency.css index 7233b12a..70db0563 100644 --- a/admin/assets/css/currency.css +++ b/admin/assets/css/currency.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage currency.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 12e7095f..aa8b1226 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -2,8 +2,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage dashboard.css diff --git a/admin/assets/css/health_data.css b/admin/assets/css/health_data.css index 3db229e1..b3e625b7 100644 --- a/admin/assets/css/health_data.css +++ b/admin/assets/css/health_data.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage health_data.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/health_data_sets.css b/admin/assets/css/health_data_sets.css index ad8de120..5070568f 100644 --- a/admin/assets/css/health_data_sets.css +++ b/admin/assets/css/health_data_sets.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage health_data_sets.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/help_document.css b/admin/assets/css/help_document.css index d291d57f..72b1e085 100644 --- a/admin/assets/css/help_document.css +++ b/admin/assets/css/help_document.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 13th April, 2018 + @created 13th July, 2015 @package Cost Benefit Projection @subpackage help_document.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/help_documents.css b/admin/assets/css/help_documents.css index 870e80bf..0e3ee30c 100644 --- a/admin/assets/css/help_documents.css +++ b/admin/assets/css/help_documents.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 13th April, 2018 + @created 13th July, 2015 @package Cost Benefit Projection @subpackage help_documents.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/intervention.css b/admin/assets/css/intervention.css index 504fecca..3e0249a6 100644 --- a/admin/assets/css/intervention.css +++ b/admin/assets/css/intervention.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 71 of this MVC + @build 12th November, 2016 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage intervention.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/interventions.css b/admin/assets/css/interventions.css index 42feb907..0ca279be 100644 --- a/admin/assets/css/interventions.css +++ b/admin/assets/css/interventions.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 71 of this MVC + @build 12th November, 2016 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage interventions.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/scaling_factor.css b/admin/assets/css/scaling_factor.css index 5f5c4272..916b18b8 100644 --- a/admin/assets/css/scaling_factor.css +++ b/admin/assets/css/scaling_factor.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 + @version @update number 21 of this MVC @build 16th August, 2016 - @created 15th June, 2012 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage scaling_factor.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/scaling_factors.css b/admin/assets/css/scaling_factors.css index 26b4b756..20d1844c 100644 --- a/admin/assets/css/scaling_factors.css +++ b/admin/assets/css/scaling_factors.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 + @version @update number 21 of this MVC @build 16th August, 2016 - @created 15th June, 2012 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage scaling_factors.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/service_provider.css b/admin/assets/css/service_provider.css index 1c8ceb87..9367deb1 100644 --- a/admin/assets/css/service_provider.css +++ b/admin/assets/css/service_provider.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 35 of this MVC + @build 22nd March, 2016 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage service_provider.css @author Llewellyn van der Merwe diff --git a/admin/assets/css/service_providers.css b/admin/assets/css/service_providers.css index 1c9ab29a..3d38cbe5 100644 --- a/admin/assets/css/service_providers.css +++ b/admin/assets/css/service_providers.css @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 35 of this MVC + @build 22nd March, 2016 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage service_providers.css @author Llewellyn van der Merwe diff --git a/admin/assets/images/component-300.png b/admin/assets/images/vdm-component.png similarity index 100% rename from admin/assets/images/component-300.png rename to admin/assets/images/vdm-component.png diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index e69de29b..d266b102 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -0,0 +1,19 @@ +/*----------------------------------------------------------------------------------| www.giz.de |----/ + Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb +/-------------------------------------------------------------------------------------------------------/ + + @version 3.4.3 + @build 5th May, 2018 + @created 15th June, 2012 + @package Cost Benefit Projection + @subpackage admin.js + @author Llewellyn van der Merwe + @owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + +/-------------------------------------------------------------------------------------------------------/ + Cost Benefit Projection Tool. +/------------------------------------------------------------------------------------------------------*/ + +/* JS Document */ diff --git a/admin/config.xml b/admin/config.xml index 306389f0..d8eb1c71 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -64,7 +64,7 @@ label="COM_COSTBENEFITPROJECTION_CONFIG_AUTHOR_EMAIL_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_AUTHOR_EMAIL_DESC" size="60" - default="llewellyn@vdm.io" + default="joomla@vdm.io" readonly="true" class="readonly" /> @@ -364,7 +364,7 @@ label="COM_COSTBENEFITPROJECTION_CONFIG_MEMBERBASICGROUP_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_MEMBERBASICGROUP_DESCRIPTION" multiple="true" - /> + /> - + @@ -682,7 +682,7 @@ class="text_area" required="true" filter="PATH" - message="Error! Please add the path where the result json should be sotred here." + message="COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_HINT" /> @@ -701,7 +701,7 @@ class="text_area" filter="url" validated="url" - message="Error! Please add information url here." + message="COM_COSTBENEFITPROJECTION_CONFIG_INFORMATION_URL_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CONFIG_INFORMATION_URL_HINT" /> diff --git a/admin/controller.php b/admin/controller.php index 87cc52a0..f2a0a9fe 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage controller.php @@ -28,60 +28,79 @@ jimport('joomla.application.component.controller'); */ class CostbenefitprojectionController extends JControllerLegacy { + /** + * Constructor. + * + * @param array $config An optional associative array of configuration settings. + * Recognized key values include 'name', 'default_task', 'model_path', and + * 'view_path' (this list is not meant to be comprehensive). + * + * @since 3.0 + */ + public function __construct($config = array()) + { + // set the default view + $config['default_view'] = 'costbenefitprojection'; + + parent::__construct($config); + } + /** * display task * * @return void */ - function display($cachable = false, $urlparams = false) + function display($cachable = false, $urlparams = false) { // set default view if not set - $view = $this->input->getCmd('view', 'Costbenefitprojection'); + $view = $this->input->getCmd('view', 'costbenefitprojection'); $data = $this->getViewRelation($view); $layout = $this->input->get('layout', null, 'WORD'); $id = $this->input->getInt('id'); // Check for edit form. - if(CostbenefitprojectionHelper::checkArray($data)) - { - if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_costbenefitprojection.edit.'.$data['view'], $id)) - { - // Somehow the person just went to the form - we don't allow that. - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); - $this->setMessage($this->getError(), 'error'); - // check if item was opend from other then its own list view - $ref = $this->input->getCmd('ref', 0); - $refid = $this->input->getInt('refid', 0); - // set redirect - if ($refid > 0 && CostbenefitprojectionHelper::checkString($ref)) - { - // redirect to item of ref - $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false)); - } - elseif (CostbenefitprojectionHelper::checkString($ref)) - { + if(CostbenefitprojectionHelper::checkArray($data)) + { + if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_costbenefitprojection.edit.'.$data['view'], $id)) + { + // Somehow the person just went to the form - we don't allow that. + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); + $this->setMessage($this->getError(), 'error'); + // check if item was opend from other then its own list view + $ref = $this->input->getCmd('ref', 0); + $refid = $this->input->getInt('refid', 0); + // set redirect + if ($refid > 0 && CostbenefitprojectionHelper::checkString($ref)) + { + // redirect to item of ref + $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false)); + } + elseif (CostbenefitprojectionHelper::checkString($ref)) + { - // redirect to ref - $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.(string)$ref, false)); - } - else - { - // normal redirect back to the list view - $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.$data['views'], false)); - } + // redirect to ref + $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.(string)$ref, false)); + } + else + { + // normal redirect back to the list view + $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.$data['views'], false)); + } - return false; - } - } + return false; + } + } return parent::display($cachable, $urlparams); } protected function getViewRelation($view) { - if (CostbenefitprojectionHelper::checkString($view)) - { - $views = array( + // check the we have a value + if (CostbenefitprojectionHelper::checkString($view)) + { + // the view relationships + $views = array( 'company' => 'companies', 'service_provider' => 'service_providers', 'country' => 'countries', @@ -91,18 +110,20 @@ class CostbenefitprojectionController extends JControllerLegacy 'intervention' => 'interventions', 'currency' => 'currencies', 'help_document' => 'help_documents' - ); - // check if this is a list view - if (in_array($view,$views)) - { - return array('edit' => false, 'view' => array_search($view,$views), 'views' => $view); - } - // check if it is an edit view - elseif (array_key_exists($view,$views)) - { - return array('edit' => true, 'view' => $view, 'views' => $views[$view]); - } - } + ); + // check if this is a list view + if (in_array($view, $views)) + { + // this is a list view + return array('edit' => false, 'view' => array_search($view,$views), 'views' => $view); + } + // check if it is an edit view + elseif (array_key_exists($view, $views)) + { + // this is a edit view + return array('edit' => true, 'view' => $view, 'views' => $views[$view]); + } + } return false; } } diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 58259484..0d973372 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage ajax.json.php @@ -38,7 +38,9 @@ class CostbenefitprojectionControllerAjax extends JControllerLegacy // load the tasks $this->registerTask('calculatedResult', 'ajax'); $this->registerTask('interventionBuildTable', 'ajax'); - $this->registerTask('getClusterData', 'ajax'); + $this->registerTask('getClusterData', 'ajax'); + $this->registerTask('isNew', 'ajax'); + $this->registerTask('isRead', 'ajax'); } public function ajax() @@ -49,17 +51,17 @@ class CostbenefitprojectionControllerAjax extends JControllerLegacy $token = JSession::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); if($token == $call_token) - { + { $task = $this->getTask(); switch($task) - { + { case 'calculatedResult': try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); $dataValue = $jinput->get('data', NULL, 'BASE64'); - if($idValue && $dataValue && $user->id != 0) + if($idValue && $dataValue) { $result = $this->getModel('ajax')->getCalculatedResult($idValue, $dataValue); } @@ -170,17 +172,93 @@ class CostbenefitprojectionControllerAjax extends JControllerLegacy echo "(".json_encode($e).");"; } } + break; + case 'isNew': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $noticeValue = $jinput->get('notice', NULL, 'STRING'); + if($noticeValue && $user->id != 0) + { + $result = $this->getModel('ajax')->isNew($noticeValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; + case 'isRead': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $noticeValue = $jinput->get('notice', NULL, 'STRING'); + if($noticeValue && $user->id != 0) + { + $result = $this->getModel('ajax')->isRead($noticeValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } break; } } - else - { + else + { if($callback = $jinput->get('callback', null, 'CMD')) - { + { echo $callback."(".json_encode(false).");"; } - else - { + else + { echo "(".json_encode(false).");"; } } diff --git a/admin/controllers/causerisk.php b/admin/controllers/causerisk.php index 9f3cd7c0..677f6600 100644 --- a/admin/controllers/causerisk.php +++ b/admin/controllers/causerisk.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage causerisk.php @author Llewellyn van der Merwe @@ -93,7 +93,7 @@ class CostbenefitprojectionControllerCauserisk extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('causerisk.edit', 'com_costbenefitprojection.causerisk.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('causerisk.edit.own', 'com_costbenefitprojection.causerisk.' . $recordId)) { @@ -153,10 +153,10 @@ class CostbenefitprojectionControllerCauserisk extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -268,11 +268,11 @@ class CostbenefitprojectionControllerCauserisk extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/causesrisks.php b/admin/controllers/causesrisks.php index 4cdc3bc7..3d1c6e59 100644 --- a/admin/controllers/causesrisks.php +++ b/admin/controllers/causesrisks.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage causesrisks.php @author Llewellyn van der Merwe @@ -101,5 +101,5 @@ class CostbenefitprojectionControllerCausesrisks extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=causesrisks', false), $message, 'error'); return; - } + } } diff --git a/admin/controllers/combinedresults.php b/admin/controllers/combinedresults.php index 14a80518..9661f5eb 100644 --- a/admin/controllers/combinedresults.php +++ b/admin/controllers/combinedresults.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 22 of this MVC + @build 14th October, 2017 + @created 3rd October, 2015 @package Cost Benefit Projection @subpackage combinedresults.php @author Llewellyn van der Merwe diff --git a/admin/controllers/companies.php b/admin/controllers/companies.php index 8b7a0627..ad2e8079 100644 --- a/admin/controllers/companies.php +++ b/admin/controllers/companies.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 101 of this MVC + @build 29th June, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage companies.php @author Llewellyn van der Merwe @@ -125,5 +125,5 @@ class CostbenefitprojectionControllerCompanies extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_ACCESS_TO_COMBINEDRESULTS_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error'); return; - } + } } diff --git a/admin/controllers/company.php b/admin/controllers/company.php index 4e9dc7ec..25e3f92f 100644 --- a/admin/controllers/company.php +++ b/admin/controllers/company.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 101 of this MVC + @build 29th June, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage company.php @author Llewellyn van der Merwe @@ -108,7 +108,7 @@ class CostbenefitprojectionControllerCompany extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('company.edit', 'com_costbenefitprojection.company.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('company.edit.own', 'com_costbenefitprojection.company.' . $recordId)) { @@ -168,10 +168,10 @@ class CostbenefitprojectionControllerCompany extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -283,11 +283,11 @@ class CostbenefitprojectionControllerCompany extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/companyresults.php b/admin/controllers/companyresults.php index d0e90087..24914299 100644 --- a/admin/controllers/companyresults.php +++ b/admin/controllers/companyresults.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 60 of this MVC + @build 14th October, 2017 + @created 13th August, 2015 @package Cost Benefit Projection @subpackage companyresults.php @author Llewellyn van der Merwe @@ -33,7 +33,7 @@ class CostbenefitprojectionControllerCompanyresults extends JControllerLegacy parent::__construct($config); } - public function dashboard() + public function dashboard() { $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection', false)); return; diff --git a/admin/controllers/costbenefitprojection.php b/admin/controllers/costbenefitprojection.php index 8d783a4d..126072a1 100644 --- a/admin/controllers/costbenefitprojection.php +++ b/admin/controllers/costbenefitprojection.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage costbenefitprojection.php diff --git a/admin/controllers/countries.php b/admin/controllers/countries.php index 47a650bb..cd83341b 100644 --- a/admin/controllers/countries.php +++ b/admin/controllers/countries.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 52 of this MVC + @build 25th October, 2017 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage countries.php @author Llewellyn van der Merwe @@ -101,5 +101,5 @@ class CostbenefitprojectionControllerCountries extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=countries', false), $message, 'error'); return; - } + } } diff --git a/admin/controllers/country.php b/admin/controllers/country.php index af878f31..2f0733ec 100644 --- a/admin/controllers/country.php +++ b/admin/controllers/country.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 52 of this MVC + @build 25th October, 2017 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage country.php @author Llewellyn van der Merwe @@ -102,7 +102,7 @@ class CostbenefitprojectionControllerCountry extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('country.edit', 'com_costbenefitprojection.country.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('country.edit.own', 'com_costbenefitprojection.country.' . $recordId)) { @@ -162,10 +162,10 @@ class CostbenefitprojectionControllerCountry extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -277,11 +277,11 @@ class CostbenefitprojectionControllerCountry extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/currencies.php b/admin/controllers/currencies.php index 7c3e5968..7d483429 100644 --- a/admin/controllers/currencies.php +++ b/admin/controllers/currencies.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage currencies.php @author Llewellyn van der Merwe @@ -101,5 +101,5 @@ class CostbenefitprojectionControllerCurrencies extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=currencies', false), $message, 'error'); return; - } + } } diff --git a/admin/controllers/currency.php b/admin/controllers/currency.php index c7f30507..13743751 100644 --- a/admin/controllers/currency.php +++ b/admin/controllers/currency.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage currency.php @author Llewellyn van der Merwe @@ -93,7 +93,7 @@ class CostbenefitprojectionControllerCurrency extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('currency.edit', 'com_costbenefitprojection.currency.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('currency.edit.own', 'com_costbenefitprojection.currency.' . $recordId)) { @@ -153,10 +153,10 @@ class CostbenefitprojectionControllerCurrency extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -268,11 +268,11 @@ class CostbenefitprojectionControllerCurrency extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/health_data.php b/admin/controllers/health_data.php index 288ecad6..270fa419 100644 --- a/admin/controllers/health_data.php +++ b/admin/controllers/health_data.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage health_data.php @author Llewellyn van der Merwe @@ -103,7 +103,7 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('health_data.edit', 'com_costbenefitprojection.health_data.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('health_data.edit.own', 'com_costbenefitprojection.health_data.' . $recordId)) { @@ -163,10 +163,10 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -278,11 +278,11 @@ class CostbenefitprojectionControllerHealth_data extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/health_data_sets.php b/admin/controllers/health_data_sets.php index 4ceb2f2a..903eefac 100644 --- a/admin/controllers/health_data_sets.php +++ b/admin/controllers/health_data_sets.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage health_data_sets.php @author Llewellyn van der Merwe @@ -101,5 +101,5 @@ class CostbenefitprojectionControllerHealth_data_sets extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, 'error'); return; - } + } } diff --git a/admin/controllers/help.php b/admin/controllers/help.php index a09534db..5573ca56 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage help.php @@ -42,7 +42,8 @@ class CostbenefitprojectionControllerHelp extends JControllerLegacy // Check Token! $token = JSession::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); - if($user->id != 0 && $token == $call_token){ + if($user->id != 0 && $token == $call_token) + { $task = $this->getTask(); switch($task){ case 'getText': @@ -58,25 +59,25 @@ class CostbenefitprojectionControllerHelp extends JControllerLegacy $result = ''; } echo $result; - // stop execution gracefully - jexit(); + // stop execution gracefully + jexit(); } - catch(Exception $e) + catch(Exception $e) { - // stop execution gracefully + // stop execution gracefully jexit(); } break; } } - else - { - // stop execution gracefully + else + { + // stop execution gracefully jexit(); } } - protected function getHelpDocumentText($id) + protected function getHelpDocumentText($id) { $db = JFactory::getDbo(); $query = $db->getQuery(true); diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php index 144b8c67..ad1cee93 100644 --- a/admin/controllers/help_document.php +++ b/admin/controllers/help_document.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 13th April, 2018 + @created 13th July, 2015 @package Cost Benefit Projection @subpackage help_document.php @author Llewellyn van der Merwe @@ -93,7 +93,7 @@ class CostbenefitprojectionControllerHelp_document extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('help_document.edit', 'com_costbenefitprojection.help_document.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('help_document.edit.own', 'com_costbenefitprojection.help_document.' . $recordId)) { @@ -153,10 +153,10 @@ class CostbenefitprojectionControllerHelp_document extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -268,11 +268,11 @@ class CostbenefitprojectionControllerHelp_document extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php index 04b755ad..e5bc38df 100644 --- a/admin/controllers/help_documents.php +++ b/admin/controllers/help_documents.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 13th April, 2018 + @created 13th July, 2015 @package Cost Benefit Projection @subpackage help_documents.php @author Llewellyn van der Merwe @@ -101,5 +101,5 @@ class CostbenefitprojectionControllerHelp_documents extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=help_documents', false), $message, 'error'); return; - } + } } diff --git a/admin/controllers/import.php b/admin/controllers/import.php index c288115e..2cfd8549 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage import.php diff --git a/admin/controllers/import_health_data_sets.php b/admin/controllers/import_health_data_sets.php index 6ab11abb..d2c50e77 100644 --- a/admin/controllers/import_health_data_sets.php +++ b/admin/controllers/import_health_data_sets.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage import_health_data_sets.php diff --git a/admin/controllers/intervention.php b/admin/controllers/intervention.php index a36cde4d..6b013fdb 100644 --- a/admin/controllers/intervention.php +++ b/admin/controllers/intervention.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 71 of this MVC + @build 12th November, 2016 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage intervention.php @author Llewellyn van der Merwe @@ -108,7 +108,7 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('intervention.edit', 'com_costbenefitprojection.intervention.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('intervention.edit.own', 'com_costbenefitprojection.intervention.' . $recordId)) { @@ -168,10 +168,10 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -283,11 +283,11 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/interventions.php b/admin/controllers/interventions.php index 1d898cb1..7df78972 100644 --- a/admin/controllers/interventions.php +++ b/admin/controllers/interventions.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 71 of this MVC + @build 12th November, 2016 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage interventions.php @author Llewellyn van der Merwe @@ -101,5 +101,5 @@ class CostbenefitprojectionControllerInterventions extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=interventions', false), $message, 'error'); return; - } + } } diff --git a/admin/controllers/scaling_factor.php b/admin/controllers/scaling_factor.php index 6e58f860..d039aebf 100644 --- a/admin/controllers/scaling_factor.php +++ b/admin/controllers/scaling_factor.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 + @version @update number 21 of this MVC @build 16th August, 2016 - @created 15th June, 2012 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage scaling_factor.php @author Llewellyn van der Merwe @@ -102,7 +102,7 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('scaling_factor.edit', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection.scaling_factor.' . $recordId)) { @@ -162,10 +162,10 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -277,11 +277,11 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/scaling_factors.php b/admin/controllers/scaling_factors.php index 584ac82a..6fb1899e 100644 --- a/admin/controllers/scaling_factors.php +++ b/admin/controllers/scaling_factors.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 + @version @update number 21 of this MVC @build 16th August, 2016 - @created 15th June, 2012 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage scaling_factors.php @author Llewellyn van der Merwe @@ -101,5 +101,5 @@ class CostbenefitprojectionControllerScaling_factors extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=scaling_factors', false), $message, 'error'); return; - } + } } diff --git a/admin/controllers/service_provider.php b/admin/controllers/service_provider.php index 04ae9777..73ef90db 100644 --- a/admin/controllers/service_provider.php +++ b/admin/controllers/service_provider.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 35 of this MVC + @build 22nd March, 2016 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage service_provider.php @author Llewellyn van der Merwe @@ -101,7 +101,7 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm { // The record has been set. Check the record permissions. $permission = $user->authorise('service_provider.edit', 'com_costbenefitprojection.service_provider.' . (int) $recordId); - if (!$permission && !is_null($permission)) + if (!$permission) { if ($user->authorise('service_provider.edit.own', 'com_costbenefitprojection.service_provider.' . $recordId)) { @@ -161,10 +161,10 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm { $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; } - elseif ($ref) - { + elseif ($ref) + { $append .= '&ref='.(string)$ref; - } + } if ($tmpl) { @@ -276,11 +276,11 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); - if ($this->ref || $this->refid) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } $saved = parent::save($key, $urlVar); diff --git a/admin/controllers/service_providers.php b/admin/controllers/service_providers.php index 7f2f74e1..fe340446 100644 --- a/admin/controllers/service_providers.php +++ b/admin/controllers/service_providers.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 35 of this MVC + @build 22nd March, 2016 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage service_providers.php @author Llewellyn van der Merwe @@ -101,5 +101,5 @@ class CostbenefitprojectionControllerService_providers extends JControllerAdmin $message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=service_providers', false), $message, 'error'); return; - } + } } diff --git a/admin/costbenefitprojection.php b/admin/costbenefitprojection.php index fd324ada..746cec72 100644 --- a/admin/costbenefitprojection.php +++ b/admin/costbenefitprojection.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage costbenefitprojection.php diff --git a/admin/helpers/aes.php b/admin/helpers/aes.php new file mode 100644 index 00000000..d340dee0 --- /dev/null +++ b/admin/helpers/aes.php @@ -0,0 +1,239 @@ +_keyString = $key; + + switch ($strength) + { + case 256: + default: + $this->_cipherType = MCRYPT_RIJNDAEL_256; + break; + + case 192: + $this->_cipherType = MCRYPT_RIJNDAEL_192; + break; + + case 128: + $this->_cipherType = MCRYPT_RIJNDAEL_128; + break; + } + + switch (strtoupper($mode)) + { + case 'ECB': + $this->_cipherMode = MCRYPT_MODE_ECB; + break; + + case 'CBC': + $this->_cipherMode = MCRYPT_MODE_CBC; + break; + } + } + + /** + * Encrypts a string using AES + * + * @param string $stringToEncrypt The plaintext to encrypt + * @param bool $base64encoded Should I Base64-encode the result? + * + * @return string The cryptotext. Please note that the first 16 bytes of + * the raw string is the IV (initialisation vector) which + * is necessary for decoding the string. + */ + public function encryptString($stringToEncrypt, $base64encoded = true) + { + if (strlen($this->_keyString) != 32) + { + $key = hash('sha256', $this->_keyString, true); + } + else + { + $key = $this->_keyString; + } + + // Set up the IV (Initialization Vector) + $iv_size = mcrypt_get_iv_size($this->_cipherType, $this->_cipherMode); + $iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM); + + if (empty($iv)) + { + $iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_RANDOM); + } + + if (empty($iv)) + { + $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); + } + + // Encrypt the data + $cipherText = mcrypt_encrypt($this->_cipherType, $key, $stringToEncrypt, $this->_cipherMode, $iv); + + // Prepend the IV to the ciphertext + $cipherText = $iv . $cipherText; + + // Optionally pass the result through Base64 encoding + if ($base64encoded) + { + $cipherText = base64_encode($cipherText); + } + + // Return the result + return $cipherText; + } + + /** + * Decrypts a ciphertext into a plaintext string using AES + * + * @param string $stringToDecrypt The ciphertext to decrypt. The first 16 bytes of the raw string must contain the IV (initialisation vector). + * @param bool $base64encoded Should I Base64-decode the data before decryption? + * + * @return string The plain text string + */ + public function decryptString($stringToDecrypt, $base64encoded = true) + { + if (strlen($this->_keyString) != 32) + { + $key = hash('sha256', $this->_keyString, true); + } + else + { + $key = $this->_keyString; + } + + if ($base64encoded) + { + $stringToDecrypt = base64_decode($stringToDecrypt); + } + + // Calculate the IV size + $iv_size = mcrypt_get_iv_size($this->_cipherType, $this->_cipherMode); + + // Extract IV + $iv = substr($stringToDecrypt, 0, $iv_size); + $stringToDecrypt = substr($stringToDecrypt, $iv_size); + + // Decrypt the data + $plainText = mcrypt_decrypt($this->_cipherType, $key, $stringToDecrypt, $this->_cipherMode, $iv); + + return $plainText; + } + + /** + * Is AES encryption supported by this PHP installation? + * + * @return boolean + */ + public static function isSupported() + { + if (!function_exists('mcrypt_get_key_size')) + { + return false; + } + + if (!function_exists('mcrypt_get_iv_size')) + { + return false; + } + + if (!function_exists('mcrypt_create_iv')) + { + return false; + } + + if (!function_exists('mcrypt_encrypt')) + { + return false; + } + + if (!function_exists('mcrypt_decrypt')) + { + return false; + } + + if (!function_exists('mcrypt_list_algorithms')) + { + return false; + } + + if (!function_exists('hash')) + { + return false; + } + + if (!function_exists('hash_algos')) + { + return false; + } + + if (!function_exists('base64_encode')) + { + return false; + } + + if (!function_exists('base64_decode')) + { + return false; + } + + $algorightms = mcrypt_list_algorithms(); + + if (!in_array('rijndael-128', $algorightms)) + { + return false; + } + + if (!in_array('rijndael-192', $algorightms)) + { + return false; + } + + if (!in_array('rijndael-256', $algorightms)) + { + return false; + } + + $algorightms = hash_algos(); + + if (!in_array('sha256', $algorightms)) + { + return false; + } + + return true; + } +} diff --git a/admin/helpers/costbenefitprojection.php b/admin/helpers/costbenefitprojection.php index d8040333..8ffed85f 100644 --- a/admin/helpers/costbenefitprojection.php +++ b/admin/helpers/costbenefitprojection.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage costbenefitprojection.php @@ -720,13 +720,66 @@ abstract class CostbenefitprojectionHelper } return false; } + + /** + * The user notice info File Name + **/ + protected static $usernotice = false; + + public static function getFilePath($type, $name = 'listing', $key = '', $fileType = '.json', $PATH = JPATH_COMPONENT_SITE) + { + if (!self::checkString(self::${$type.$name})) + { + // Get local key + $localkey = self::getLocalKey(); + // set the name + $fileName = md5($type.$name.$localkey.$key); + // set file path + self::${$type.$name} = $PATH.'/helpers/'.$fileName.$fileType; + } + // return the path + return self::${$type.$name}; + } + + /** + * get the localkey + **/ + protected static $localkey = false; + + public static function getLocalKey() + { + if (!self::$localkey) + { + // get the main key + self::$localkey = md5(JComponentHelper::getParams('com_costbenefitprojection')->get('basic', 'localKey34fdWEkl')); + } + return self::$localkey; + } /** * Load the Component xml manifest. **/ - public static function manifest() + public static function manifest() { - $manifestUrl = JPATH_ADMINISTRATOR."/components/com_costbenefitprojection/costbenefitprojection.xml"; - return simplexml_load_file($manifestUrl); + $manifestUrl = JPATH_ADMINISTRATOR."/components/com_costbenefitprojection/costbenefitprojection.xml"; + return simplexml_load_file($manifestUrl); + } + + /** + * Joomla version object + **/ + protected static $JVersion; + + /** + * set/get Joomla version + **/ + public static function jVersion() + { + // check if set + if (!self::checkObject(self::$JVersion)) + { + self::$JVersion = new JVersion(); + } + return self::$JVersion; } /** @@ -741,22 +794,22 @@ abstract class CostbenefitprojectionHelper // get all Contributors (max 20) $searchArray = range('0','20'); foreach($searchArray as $nr) - { + { if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 1 || $params->get("showContributor".$nr) == 3)) - { + { // set link based of selected option if($params->get("useContributor".$nr) == 1) - { + { $link_front = ''; $link_back = ''; } - elseif($params->get("useContributor".$nr) == 2) - { + elseif($params->get("useContributor".$nr) == 2) + { $link_front = ''; $link_back = ''; } - else - { + else + { $link_front = ''; $link_back = ''; } @@ -844,45 +897,45 @@ abstract class CostbenefitprojectionHelper **/ public static function addSubmenu($submenu) { - // load user for access menus - $user = JFactory::getUser(); - // load the submenus to sidebar - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_DASHBOARD'), 'index.php?option=com_costbenefitprojection&view=costbenefitprojection', $submenu == 'costbenefitprojection'); + // load user for access menus + $user = JFactory::getUser(); + // load the submenus to sidebar + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_DASHBOARD'), 'index.php?option=com_costbenefitprojection&view=costbenefitprojection', $submenu === 'costbenefitprojection'); if ($user->authorise('company.access', 'com_costbenefitprojection') && $user->authorise('company.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_COMPANIES'), 'index.php?option=com_costbenefitprojection&view=companies', $submenu == 'companies'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_COMPANIES'), 'index.php?option=com_costbenefitprojection&view=companies', $submenu === 'companies'); } if ($user->authorise('service_provider.access', 'com_costbenefitprojection') && $user->authorise('service_provider.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_SERVICE_PROVIDERS'), 'index.php?option=com_costbenefitprojection&view=service_providers', $submenu == 'service_providers'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_SERVICE_PROVIDERS'), 'index.php?option=com_costbenefitprojection&view=service_providers', $submenu === 'service_providers'); } if ($user->authorise('country.access', 'com_costbenefitprojection') && $user->authorise('country.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_COUNTRIES'), 'index.php?option=com_costbenefitprojection&view=countries', $submenu == 'countries'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_COUNTRIES'), 'index.php?option=com_costbenefitprojection&view=countries', $submenu === 'countries'); } if ($user->authorise('causerisk.access', 'com_costbenefitprojection') && $user->authorise('causerisk.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_CAUSESRISKS'), 'index.php?option=com_costbenefitprojection&view=causesrisks', $submenu == 'causesrisks'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_CAUSESRISKS'), 'index.php?option=com_costbenefitprojection&view=causesrisks', $submenu === 'causesrisks'); } if ($user->authorise('health_data.access', 'com_costbenefitprojection') && $user->authorise('health_data.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_HEALTH_DATA_SETS'), 'index.php?option=com_costbenefitprojection&view=health_data_sets', $submenu == 'health_data_sets'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_HEALTH_DATA_SETS'), 'index.php?option=com_costbenefitprojection&view=health_data_sets', $submenu === 'health_data_sets'); } if ($user->authorise('scaling_factor.access', 'com_costbenefitprojection') && $user->authorise('scaling_factor.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_SCALING_FACTORS'), 'index.php?option=com_costbenefitprojection&view=scaling_factors', $submenu == 'scaling_factors'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_SCALING_FACTORS'), 'index.php?option=com_costbenefitprojection&view=scaling_factors', $submenu === 'scaling_factors'); } if ($user->authorise('intervention.access', 'com_costbenefitprojection') && $user->authorise('intervention.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_INTERVENTIONS'), 'index.php?option=com_costbenefitprojection&view=interventions', $submenu == 'interventions'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_INTERVENTIONS'), 'index.php?option=com_costbenefitprojection&view=interventions', $submenu === 'interventions'); } if ($user->authorise('currency.access', 'com_costbenefitprojection') && $user->authorise('currency.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_CURRENCIES'), 'index.php?option=com_costbenefitprojection&view=currencies', $submenu == 'currencies'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_CURRENCIES'), 'index.php?option=com_costbenefitprojection&view=currencies', $submenu === 'currencies'); } if ($user->authorise('help_document.access', 'com_costbenefitprojection') && $user->authorise('help_document.submenu', 'com_costbenefitprojection')) { - JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_costbenefitprojection&view=help_documents', $submenu == 'help_documents'); + JHtmlSidebar::addEntry(JText::_('COM_COSTBENEFITPROJECTION_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_costbenefitprojection&view=help_documents', $submenu === 'help_documents'); } } @@ -917,14 +970,10 @@ abstract class CostbenefitprojectionHelper $password = self::randomkey(8); $password2 = $password; } - // set username - if (isset($new['username']) && self::checkString($new['username'])) + // set username if not set + if (!isset($new['username']) || !self::checkString($new['username'])) { - $new['username'] = self::safeString($new['username']); - } - else - { - $new['username'] = self::safeString($new['name']); + $new['username'] = self::safeString($new['name']); } // linup new user data $data = array( @@ -1210,7 +1259,7 @@ abstract class CostbenefitprojectionHelper $objPHPExcel->getActiveSheet()->getColumnDimension($a)->setAutoSize(true); $objPHPExcel->getActiveSheet()->getStyle($a.$i)->applyFromArray($headerStyles); $objPHPExcel->getActiveSheet()->getStyle($a.$i)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); - } elseif ($a == 'A'){ + } elseif ($a === 'A'){ $objPHPExcel->getActiveSheet()->getStyle($a.$i)->applyFromArray($sideStyles); } else { $objPHPExcel->getActiveSheet()->getStyle($a.$i)->applyFromArray($normalStyles); @@ -1300,6 +1349,19 @@ abstract class CostbenefitprojectionHelper return false; } + /** + * Get a Variable + * + * @param string $table The table from which to get the variable + * @param string $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * + * @return mix string/int/float + * + */ public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'costbenefitprojection') { if(!$where) @@ -1340,6 +1402,20 @@ abstract class CostbenefitprojectionHelper return false; } + /** + * Get array of variables + * + * @param string $table The table from which to get the variables + * @param string $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * @param bool $unique The switch to return a unique array + * + * @return array + * + */ public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'costbenefitprojection', $unique = true) { if(!$where) @@ -1354,13 +1430,25 @@ abstract class CostbenefitprojectionHelper if (self::checkArray($where)) { + // prep main <-- why? well if $main='' is empty then $table can be categories or users + if (self::checkString($main)) + { + $main = '_'.ltrim($main, '_'); + } // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); $query->select($db->quoteName(array($what))); - $query->from($db->quoteName('#__'.$main.'_'.$table)); + if (empty($table)) + { + $query->from($db->quoteName('#__'.$main)); + } + else + { + $query->from($db->quoteName('#_'.$main.'_'.$table)); + } $query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')'); $db->setQuery($query); $db->execute(); @@ -1376,11 +1464,18 @@ abstract class CostbenefitprojectionHelper return false; } - public static function jsonToString($value, $sperator = ", ", $table = null) + public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name') { - // check if string is JSON - $result = json_decode($value, true); - if (json_last_error() === JSON_ERROR_NONE) + // do some table foot work + $external = false; + if (strpos($table, '#__') !== false) + { + $external = true; + $table = str_replace('#__', '', $table); + } + // check if string is JSON + $result = json_decode($value, true); + if (json_last_error() === JSON_ERROR_NONE) { // is JSON if (self::checkArray($result)) @@ -1390,9 +1485,19 @@ abstract class CostbenefitprojectionHelper $names = array(); foreach ($result as $val) { - if ($name = self::getVar($table, $val, 'id', 'name')) + if ($external) { - $names[] = $name; + if ($name = self::getVar(null, $val, $id, $name, '=', $table)) + { + $names[] = $name; + } + } + else + { + if ($name = self::getVar($table, $val, $id, $name)) + { + $names[] = $name; + } } } if (self::checkArray($names)) @@ -1402,15 +1507,15 @@ abstract class CostbenefitprojectionHelper } return (string) implode($sperator,$result); } - return (string) json_decode($value); - } - return $value; - } + return (string) json_decode($value); + } + return $value; + } public static function isPublished($id,$type) { if ($type == 'raw') - { + { $type = 'item'; } $db = JFactory::getDbo(); @@ -1423,7 +1528,7 @@ abstract class CostbenefitprojectionHelper $db->execute(); $found = $db->getNumRows(); if($found) - { + { return true; } return false; @@ -1440,40 +1545,40 @@ abstract class CostbenefitprojectionHelper $db->execute(); $found = $db->getNumRows(); if($found) - { + { return $db->loadResult(); } return $id; } - /** + /** * Get the actions permissions **/ - public static function getActions($view,&$record = null,$views = null) + public static function getActions($view,&$record = null,$views = null) { jimport('joomla.access.access'); $user = JFactory::getUser(); $result = new JObject; $view = self::safeString($view); - if (self::checkString($views)) - { + if (self::checkString($views)) + { $views = self::safeString($views); - } + } // get all actions from component $actions = JAccess::getActions('com_costbenefitprojection', 'component'); - // set acctions only set in component settiongs - $componentActions = array('core.admin','core.manage','core.options','core.export'); + // set acctions only set in component settiongs + $componentActions = array('core.admin','core.manage','core.options','core.export'); // loop the actions and set the permissions foreach ($actions as $action) - { + { // set to use component default $fallback= true; if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions)) { // The record has been set. Check the record permissions. $permission = $user->authorise($action->name, 'com_costbenefitprojection.'.$view.'.' . (int) $record->id); - if (!$permission && !is_null($permission)) + if (!$permission) // TODO removed && !is_null($permission) { if ($action->name == 'core.edit' || $action->name == $view.'.edit') { @@ -1545,17 +1650,17 @@ abstract class CostbenefitprojectionHelper } elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0) { - // make sure we use the core. action check for the categories - if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) { - $coreCheck = explode('.',$action->name); - $coreCheck[0] = 'core'; - $categoryCheck = implode('.',$coreCheck); - } - else - { - $categoryCheck = $action->name; - } - // The record has a category. Check the category permissions. + // make sure we use the core. action check for the categories + if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) { + $coreCheck = explode('.',$action->name); + $coreCheck[0] = 'core'; + $categoryCheck = implode('.',$coreCheck); + } + else + { + $categoryCheck = $action->name; + } + // The record has a category. Check the category permissions. $catpermission = $user->authorise($categoryCheck, 'com_costbenefitprojection.'.$views.'.category.' . (int) $record->catid); if (!$catpermission && !is_null($catpermission)) { @@ -1641,16 +1746,47 @@ abstract class CostbenefitprojectionHelper /** * Get any component's model **/ - public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'costbenefitprojection') + public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'Costbenefitprojection', $config = array()) { - // load some joomla helpers - JLoader::import('joomla.application.component.model'); + // fix the name + $name = self::safeString($name); + // full path + $fullPath = $path . '/models'; + // set prefix + $prefix = $component.'Model'; // load the model file - JLoader::import( $name, $path . '/models' ); - // return instance - return JModelLegacy::getInstance( $name, $component.'Model' ); + JModelLegacy::addIncludePath($fullPath, $prefix); + // get instance + $model = JModelLegacy::getInstance($name, $prefix, $config); + // if model not found (strange) + if ($model == false) + { + jimport('joomla.filesystem.file'); + // get file path + $filePath = $path.'/'.$name.'.php'; + $fullPath = $fullPath.'/'.$name.'.php'; + // check if it exists + if (JFile::exists($filePath)) + { + // get the file + require_once $filePath; + } + elseif (JFile::exists($fullPath)) + { + // get the file + require_once $fullPath; + } + // build class names + $modelClass = $prefix.$name; + if (class_exists($modelClass)) + { + // initialize the model + return new $modelClass($config); + } + } + return $model; } - + /** * Add to asset Table */ @@ -1712,7 +1848,7 @@ abstract class CostbenefitprojectionHelper } return false; } - + /** * Gets the default asset Rules for a component/view. */ @@ -1765,30 +1901,150 @@ abstract class CostbenefitprojectionHelper return JAccess::getAssetRules(0); } + /** + * xmlAppend + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement + * + * @return null + * + */ + public static function xmlAppend(&$xml, $node) + { + if (!$node) + { + // element was not returned + return; + } + switch (get_class($node)) + { + case 'stdClass': + if (property_exists($node, 'comment')) + { + self::xmlComment($xml, $node->comment); + } + if (property_exists($node, 'fieldXML')) + { + self::xmlAppend($xml, $node->fieldXML); + } + break; + case 'SimpleXMLElement': + $domXML = dom_import_simplexml($xml); + $domNode = dom_import_simplexml($node); + $domXML->appendChild($domXML->ownerDocument->importNode($domNode, true)); + $xml = simplexml_import_dom($domXML); + break; + } + } + + /** + * xmlComment + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param string $comment The comment to inject + * + * @return null + * + */ + public static function xmlComment(&$xml, $comment) + { + $domXML = dom_import_simplexml($xml); + $domComment = new DOMComment($comment); + $nodeTarget = $domXML->ownerDocument->importNode($domComment, true); + $domXML->appendChild($nodeTarget); + $xml = simplexml_import_dom($domXML); + } + + /** + * xmlAddAttributes + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $attributes The attributes to apply to the XML element + * + * @return null + * + */ + public static function xmlAddAttributes(&$xml, $attributes = array()) + { + foreach ($attributes as $key => $value) + { + $xml->addAttribute($key, $value); + } + } + + /** + * xmlAddOptions + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $options The options to apply to the XML element + * + * @return void + * + */ + public static function xmlAddOptions(&$xml, $options = array()) + { + foreach ($options as $key => $value) + { + $addOption = $xml->addChild('option'); + $addOption->addAttribute('value', $key); + $addOption[] = $value; + } + } + + /** + * Render Bool Button + * + * @param array $args All the args for the button + * 0) name + * 1) additional (options class) // not used at this time + * 2) default + * 3) yes (name) + * 4) no (name) + * + * @return string The input html of the button + * + */ public static function renderBoolButton() { $args = func_get_args(); + // check if there is additional button class + $additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time + // start the xml + $buttonXML = new SimpleXMLElement(''); + // button attributes + $buttonAttributes = array( + 'type' => 'radio', + 'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button', + 'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway + 'class' => 'btn-group', + 'filter' => 'INT', + 'default' => isset($args[2]) ? (int) $args[2] : 0); + // load the haskey attributes + self::xmlAddAttributes($buttonXML, $buttonAttributes); + // set the button options + $buttonOptions = array( + '1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES', + '0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'); + // load the button options + self::xmlAddOptions($buttonXML, $buttonOptions); // get the radio element $button = JFormHelper::loadFieldType('radio'); - // setup the properties - $name = self::htmlEscape($args[0]); - $additional = isset($args[1]) ? (string) $args[1] : ''; - $value = $args[2]; - $yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES'; - $no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'; - - // prepare the xml - $element = new SimpleXMLElement(''); - // run - $button->setup($element, $value); + $button->setup($buttonXML, $buttonAttributes['default']); return $button->input; - } - + + /** + * Check if have an json string + * + * @input string The json string to check + * + * @returns bool true on success + **/ public static function checkJson($string) { if (self::checkString($string)) @@ -1799,24 +2055,57 @@ abstract class CostbenefitprojectionHelper return false; } + /** + * Check if have an object with a length + * + * @input object The object to check + * + * @returns bool true on success + **/ public static function checkObject($object) { - if (isset($object) && is_object($object) && count($object) > 0) + if (isset($object) && is_object($object)) { - return true; + return count((array)$object) > 0; } return false; } - public static function checkArray($array) + /** + * Check if have an array with a length + * + * @input array The array to check + * + * @returns bool true on success + **/ + public static function checkArray($array, $removeEmptyString = false) { if (isset($array) && is_array($array) && count($array) > 0) { + // also make sure the empty strings are removed + if ($removeEmptyString) + { + foreach ($array as $key => $string) + { + if (empty($string)) + { + unset($array[$key]); + } + } + return self::checkArray($array, false); + } return true; } return false; } + /** + * Check if have a string with a length + * + * @input string The string to check + * + * @returns bool true on success + **/ public static function checkString($string) { if (isset($string) && is_string($string) && strlen($string) > 0) @@ -1826,6 +2115,38 @@ abstract class CostbenefitprojectionHelper return false; } + /** + * Check if we are connected + * Thanks https://stackoverflow.com/a/4860432/1429677 + * + * @returns bool true on success + **/ + public static function isConnected() + { + // If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right? + $connected = @fsockopen("www.example.com", 80); + // website, port (try 80 or 443) + if ($connected) + { + //action when connected + $is_conn = true; + fclose($connected); + } + else + { + //action in connection failure + $is_conn = false; + } + return $is_conn; + } + + /** + * Merge an array of array's + * + * @input array The arrays you would like to merge + * + * @returns array on success + **/ public static function mergeArrays($arrays) { if(self::checkArray($arrays)) @@ -1843,10 +2164,23 @@ abstract class CostbenefitprojectionHelper return false; } + // typo sorry! public static function sorten($string, $length = 40, $addTip = true) + { + return self::shorten($string, $length, $addTip); + } + + /** + * Shorten a string + * + * @input string The you would like to shorten + * + * @returns string on success + **/ + public static function shorten($string, $length = 40, $addTip = true) { if (self::checkString($string)) - { + { $initial = strlen($string); $words = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE); $words_count = count($words); @@ -1866,7 +2200,7 @@ abstract class CostbenefitprojectionHelper $final = strlen($newString); if ($initial != $final && $addTip) { - $title = self::sorten($string, 400 , false); + $title = self::shorten($string, 400 , false); return ''.trim($newString).'...'; } elseif ($initial != $final && !$addTip) @@ -1877,80 +2211,117 @@ abstract class CostbenefitprojectionHelper return $string; } - public static function safeString($string, $type = 'L', $spacer = '_') + /** + * Making strings safe (various ways) + * + * @input string The you would like to make safe + * + * @returns string on success + **/ + public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true) { - // remove all numbers and replace with english text version (works well only up to a thousand) - $string = self::replaceNumbers($string); - - if (self::checkString($string)) - { - // remove all other characters - $string = trim($string); - $string = preg_replace('/'.$spacer.'+/', ' ', $string); - $string = preg_replace('/\s+/', ' ', $string); - $string = preg_replace("/[^A-Za-z ]/", '', $string); - // return a string with all first letter of each word uppercase(no undersocre) - if ($type == 'W') - { - return ucwords(strtolower($string)); - } - elseif ($type == 'w') - { - return strtolower($string); - } - elseif ($type == 'Ww') - { - return ucfirst(strtolower($string)); - } - elseif ($type == 'WW') - { - return strtoupper($string); - } - elseif ($type == 'U') - { - // replace white space with underscore - $string = preg_replace('/\s+/', $spacer, $string); - // return all upper - return strtoupper($string); - } - elseif ($type == 'F') - { - // replace white space with underscore - $string = preg_replace('/\s+/', $spacer, $string); - // return with first caracter to upper - return ucfirst(strtolower($string)); - } - elseif ($type == 'L') - { - // replace white space with underscore - $string = preg_replace('/\s+/', $spacer, $string); - // default is to return lower - return strtolower($string); - } - - // return string - return $string; - } - // not a string - return ''; + if ($replaceNumbers === true) + { + // remove all numbers and replace with english text version (works well only up to millions) + $string = self::replaceNumbers($string); + } + // 0nly continue if we have a string + if (self::checkString($string)) + { + // create file name without the extention that is safe + if ($type === 'filename') + { + // make sure VDM is not in the string + $string = str_replace('VDM', 'vDm', $string); + // Remove anything which isn't a word, whitespace, number + // or any of the following caracters -_() + // If you don't need to handle multi-byte characters + // you can use preg_replace rather than mb_ereg_replace + // Thanks @Łukasz Rysiak! + // $string = mb_ereg_replace("([^\w\s\d\-_\(\)])", '', $string); + $string = preg_replace("([^\w\s\d\-_\(\)])", '', $string); + // http://stackoverflow.com/a/2021729/1429677 + return preg_replace('/\s+/', ' ', $string); + } + // remove all other characters + $string = trim($string); + $string = preg_replace('/'.$spacer.'+/', ' ', $string); + $string = preg_replace('/\s+/', ' ', $string); + $string = preg_replace("/[^A-Za-z ]/", '', $string); + // select final adaptations + if ($type === 'L' || $type === 'strtolower') + { + // replace white space with underscore + $string = preg_replace('/\s+/', $spacer, $string); + // default is to return lower + return strtolower($string); + } + elseif ($type === 'W') + { + // return a string with all first letter of each word uppercase(no undersocre) + return ucwords(strtolower($string)); + } + elseif ($type === 'w' || $type === 'word') + { + // return a string with all lowercase(no undersocre) + return strtolower($string); + } + elseif ($type === 'Ww' || $type === 'Word') + { + // return a string with first letter of the first word uppercase and all the rest lowercase(no undersocre) + return ucfirst(strtolower($string)); + } + elseif ($type === 'WW' || $type === 'WORD') + { + // return a string with all the uppercase(no undersocre) + return strtoupper($string); + } + elseif ($type === 'U' || $type === 'strtoupper') + { + // replace white space with underscore + $string = preg_replace('/\s+/', $spacer, $string); + // return all upper + return strtoupper($string); + } + elseif ($type === 'F' || $type === 'ucfirst') + { + // replace white space with underscore + $string = preg_replace('/\s+/', $spacer, $string); + // return with first caracter to upper + return ucfirst(strtolower($string)); + } + elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase') + { + // convert all words to first letter uppercase + $string = ucwords(strtolower($string)); + // remove white space + $string = preg_replace('/\s+/', '', $string); + // now return first letter lowercase + return lcfirst($string); + } + // return string + return $string; + } + // not a string + return ''; } - public static function htmlEscape($var, $charset = 'UTF-8', $sorten = false, $length = 40) + public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40) { if (self::checkString($var)) { $filter = new JFilterInput(); $string = $filter->clean(html_entity_decode(htmlentities($var, ENT_COMPAT, $charset)), 'HTML'); - if ($sorten) + if ($shorten) { - return self::sorten($string,$length); + return self::shorten($string,$length); } return $string; - } + } else { return ''; - } + } } public static function replaceNumbers($string) @@ -1974,7 +2345,7 @@ abstract class CostbenefitprojectionHelper // return the string with no numbers remaining. return $string; } - + /** * Convert an integer into an English word string * Thanks to Tom Nicholson @@ -2084,23 +2455,34 @@ abstract class CostbenefitprojectionHelper return implode($key); } - public static function getCryptKey($type) + /** + * Get The Encryption Keys + * + * @param string $type The type of key + * @param string/bool $default The return value if no key was found + * + * @return string On success + * + **/ + public static function getCryptKey($type, $default = false) { - if ('advanced' == $type) + // Get the global params + $params = JComponentHelper::getParams('com_costbenefitprojection', true); + // WHMCS Encryption Type + if ('whmcs' === $type || 'advanced' === $type) { - // Get the global params - $params = JComponentHelper::getParams('com_costbenefitprojection', true); - $advanced_key = $params->get('advanced_key', null); - if ($advanced_key) + $key = $params->get('advanced_key', $default); + if (self::checkString($key)) { // load the file - JLoader::import( 'vdm', JPATH_COMPONENT_ADMINISTRATOR); + JLoader::import( 'whmcs', JPATH_COMPONENT_ADMINISTRATOR); - $the = new VDM($advanced_key); + $the = new WHMCS($key); return $the->_key; } } - return false; + + return $default; } } diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php new file mode 100644 index 00000000..3b24ae1b --- /dev/null +++ b/admin/helpers/headercheck.php @@ -0,0 +1,79 @@ + + @owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + +/-------------------------------------------------------------------------------------------------------/ + Cost Benefit Projection Tool. +/------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +class costbenefitprojectionHeaderCheck +{ + function js_loaded($script_name) + { + // UIkit check point + if (strpos($script_name,'uikit') !== false) + { + $app = JFactory::getApplication(); + $getTemplateName = $app->getTemplate('template')->template; + + if (strpos($getTemplateName,'yoo') !== false) + { + return true; + } + } + + $document = JFactory::getDocument(); + $head_data = $document->getHeadData(); + foreach (array_keys($head_data['scripts']) as $script) + { + if (stristr($script, $script_name)) + { + return true; + } + } + + return false; + } + + function css_loaded($script_name) + { + // UIkit check point + if (strpos($script_name,'uikit') !== false) + { + $app = JFactory::getApplication(); + $getTemplateName = $app->getTemplate('template')->template; + + if (strpos($getTemplateName,'yoo') !== false) + { + return true; + } + } + + $document = JFactory::getDocument(); + $head_data = $document->getHeadData(); + + foreach (array_keys($head_data['styleSheets']) as $script) + { + if (stristr($script, $script_name)) + { + return true; + } + } + + return false; + } +} \ No newline at end of file diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index 957231db..450252e7 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage batch_.php diff --git a/admin/helpers/sum.php b/admin/helpers/sum.php index cf6da728..69261649 100644 --- a/admin/helpers/sum.php +++ b/admin/helpers/sum.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage sum.php diff --git a/admin/helpers/sumcombine.php b/admin/helpers/sumcombine.php index 9f18dab9..2c72494d 100644 --- a/admin/helpers/sumcombine.php +++ b/admin/helpers/sumcombine.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage sumcombine.php diff --git a/admin/language/en-GB/en-GB.com_costbenefitprojection.ini b/admin/language/en-GB/en-GB.com_costbenefitprojection.ini index f772683d..1cdae03b 100644 --- a/admin/language/en-GB/en-GB.com_costbenefitprojection.ini +++ b/admin/language/en-GB/en-GB.com_costbenefitprojection.ini @@ -1,10 +1,16 @@ COM_COSTBENEFITPROJECTION="Cost Benefit Projection" +COM_COSTBENEFITPROJECTION_ACCESS_DENIED="Access denied!" COM_COSTBENEFITPROJECTION_ACCESS_TO_COMBINEDRESULTS_FAILED="Access to combinedresults was denied." COM_COSTBENEFITPROJECTION_ADVANCED_METHOD="Advanced Method" COM_COSTBENEFITPROJECTION_AGE_ID="Age id" COM_COSTBENEFITPROJECTION_AGE_NAME="Age name" +COM_COSTBENEFITPROJECTION_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter." COM_COSTBENEFITPROJECTION_ALL_NUMBERS_IN_BRACKETS_ARE_THE_RELATED_EMPLOYEES="All numbers in brackets are the related employees." +COM_COSTBENEFITPROJECTION_ARCHIVED="Archived" COM_COSTBENEFITPROJECTION_AUTHOR="Author" +COM_COSTBENEFITPROJECTION_A_COUNTRY="A Country" +COM_COSTBENEFITPROJECTION_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" +COM_COSTBENEFITPROJECTION_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" COM_COSTBENEFITPROJECTION_BACK="Back" COM_COSTBENEFITPROJECTION_BASIC_METHOD="Basic Method" COM_COSTBENEFITPROJECTION_BENEFIT="Benefit" @@ -30,9 +36,11 @@ COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME="Importname" COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME_DESCRIPTION="Enter Import Name Here" COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME_HINT="Import Name Here" COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME_LABEL="Import Name" +COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME_MESSAGE="Error! Please add import name here." COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORT_ID="Import Id" COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORT_ID_DESCRIPTION="This is the id that is used during import of the health data." COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORT_ID_LABEL="Import ID" +COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORT_ID_MESSAGE="Error! Please add some the import ID here." COM_COSTBENEFITPROJECTION_CAUSERISK_MODIFIED_BY_DESC="The last user that modified this Cause/Risk." COM_COSTBENEFITPROJECTION_CAUSERISK_MODIFIED_BY_LABEL="Modified By" COM_COSTBENEFITPROJECTION_CAUSERISK_MODIFIED_DATE_DESC="The date this Cause/Risk was modified." @@ -41,6 +49,7 @@ COM_COSTBENEFITPROJECTION_CAUSERISK_NAME="Name" COM_COSTBENEFITPROJECTION_CAUSERISK_NAME_DESCRIPTION="Enter Name Here" COM_COSTBENEFITPROJECTION_CAUSERISK_NAME_HINT="Name Here" COM_COSTBENEFITPROJECTION_CAUSERISK_NAME_LABEL="Name" +COM_COSTBENEFITPROJECTION_CAUSERISK_NAME_MESSAGE="Error! Please add name here." COM_COSTBENEFITPROJECTION_CAUSERISK_NEW="A New Cause/Risk" COM_COSTBENEFITPROJECTION_CAUSERISK_ORDERING_LABEL="Ordering" COM_COSTBENEFITPROJECTION_CAUSERISK_PERMISSION="Permissions" @@ -49,6 +58,7 @@ COM_COSTBENEFITPROJECTION_CAUSERISK_REF="Ref" COM_COSTBENEFITPROJECTION_CAUSERISK_REF_DESCRIPTION="The reference number for this cause/risk" COM_COSTBENEFITPROJECTION_CAUSERISK_REF_HINT="Ref Number Here" COM_COSTBENEFITPROJECTION_CAUSERISK_REF_LABEL="Ref Nr" +COM_COSTBENEFITPROJECTION_CAUSERISK_REF_MESSAGE="Error! Please add the reference number here." COM_COSTBENEFITPROJECTION_CAUSERISK_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Cause/Risk to customise the alias." COM_COSTBENEFITPROJECTION_CAUSERISK_STATUS="Status" COM_COSTBENEFITPROJECTION_CAUSERISK_VERSION_DESC="A count of the number of times this Cause/Risk has been revised." @@ -103,10 +113,11 @@ COM_COSTBENEFITPROJECTION_CAUSE_ID="Cause id" COM_COSTBENEFITPROJECTION_CAUSE_NAME="Cause name" COM_COSTBENEFITPROJECTION_CHARTS_MENU="Charts Menu" COM_COSTBENEFITPROJECTION_CHARTS_QUICK_LINKS="Charts ›› Quick Links" +COM_COSTBENEFITPROJECTION_CLOSE_NEW="Close & New" COM_COSTBENEFITPROJECTION_COMBINEDRESULTS="Combined results" COM_COSTBENEFITPROJECTION_COMBINEDRESULTS_DESC="The companies combine results" COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS="Combined Results Access" -COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_DESC=" Allows the users in this group to access combined results." +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_DESC="Allows the users in this group to access Combined Results" COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_SITE="Combined Results (Site) Access" COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_SITE_DESC=" Allows the users in this group to access site combined results." COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_COMPANIES_BUTTON_ACCESS="Combined Results Companies Button Access" @@ -216,11 +227,13 @@ COM_COSTBENEFITPROJECTION_COMPANY_EMAIL="Email" COM_COSTBENEFITPROJECTION_COMPANY_EMAIL_DESCRIPTION="Enter Email" COM_COSTBENEFITPROJECTION_COMPANY_EMAIL_HINT="demo@example.com" COM_COSTBENEFITPROJECTION_COMPANY_EMAIL_LABEL="Email" +COM_COSTBENEFITPROJECTION_COMPANY_EMAIL_MESSAGE="Error! Please add email address here." COM_COSTBENEFITPROJECTION_COMPANY_ERROR_UNIQUE_ALIAS="Another Company has the same alias." COM_COSTBENEFITPROJECTION_COMPANY_FEMALES="Females" COM_COSTBENEFITPROJECTION_COMPANY_FEMALES_DESCRIPTION="The Total Number of Female Employees." COM_COSTBENEFITPROJECTION_COMPANY_FEMALES_HINT="Just A Number" COM_COSTBENEFITPROJECTION_COMPANY_FEMALES_LABEL="Total Female Employees" +COM_COSTBENEFITPROJECTION_COMPANY_FEMALES_MESSAGE="Error! Please add total female employees here." COM_COSTBENEFITPROJECTION_COMPANY_FIFTEENNINETEEN="15-19" COM_COSTBENEFITPROJECTION_COMPANY_FIFTYFIFTY_FOUR="50-54" COM_COSTBENEFITPROJECTION_COMPANY_FIFTY_FIVEFIFTY_NINE="55-59" @@ -233,14 +246,17 @@ COM_COSTBENEFITPROJECTION_COMPANY_MALES="Males" COM_COSTBENEFITPROJECTION_COMPANY_MALES_DESCRIPTION="The Total Number of Male Employees." COM_COSTBENEFITPROJECTION_COMPANY_MALES_HINT="Just A Number" COM_COSTBENEFITPROJECTION_COMPANY_MALES_LABEL="Total Male Employees" +COM_COSTBENEFITPROJECTION_COMPANY_MALES_MESSAGE="Error! Please add total male employees here." COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_FEMALES="Medical Turnovers Females" COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_FEMALES_DESCRIPTION="The total number of medical turnovers for females per/year." COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_FEMALES_HINT="per/year" COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_FEMALES_LABEL="Total Number Medical Turnovers Female" +COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_FEMALES_MESSAGE="Error! Please add total number of medical turnovers for females here." COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_MALES="Medical Turnovers Males" COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_MALES_DESCRIPTION="The total number of medical turnovers for males per/year." COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_MALES_HINT="per/year" COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_MALES_LABEL="Total Number Medical Turnovers Male" +COM_COSTBENEFITPROJECTION_COMPANY_MEDICAL_TURNOVERS_MALES_MESSAGE="Error! Please add total number of medical turnovers for males here." COM_COSTBENEFITPROJECTION_COMPANY_MODIFIED_BY_DESC="The last user that modified this Company." COM_COSTBENEFITPROJECTION_COMPANY_MODIFIED_BY_LABEL="Modified By" COM_COSTBENEFITPROJECTION_COMPANY_MODIFIED_DATE_DESC="The date this Company was modified." @@ -249,6 +265,7 @@ COM_COSTBENEFITPROJECTION_COMPANY_NAME="Name" COM_COSTBENEFITPROJECTION_COMPANY_NAME_DESCRIPTION="Enter Company Name Here" COM_COSTBENEFITPROJECTION_COMPANY_NAME_HINT="Company Name Here" COM_COSTBENEFITPROJECTION_COMPANY_NAME_LABEL="Company Name" +COM_COSTBENEFITPROJECTION_COMPANY_NAME_MESSAGE="Error! Please add company name here." COM_COSTBENEFITPROJECTION_COMPANY_NEW="A New Company" COM_COSTBENEFITPROJECTION_COMPANY_NOT_REQUIRED="Not Required" COM_COSTBENEFITPROJECTION_COMPANY_OPEN="Open" @@ -256,12 +273,15 @@ COM_COSTBENEFITPROJECTION_COMPANY_ORDERING_LABEL="Ordering" COM_COSTBENEFITPROJECTION_COMPANY_PER="Per" COM_COSTBENEFITPROJECTION_COMPANY_PERCENTFEMALE="Percentfemale" COM_COSTBENEFITPROJECTION_COMPANY_PERCENTFEMALE_DESCRIPTION="Here you can add females age groups percent." +COM_COSTBENEFITPROJECTION_COMPANY_PERCENTFEMALE_LABEL="Set Females Age Groups Percent" COM_COSTBENEFITPROJECTION_COMPANY_PERCENTFEMALE_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_COMPANY_PERCENTMALE="Percentmale" COM_COSTBENEFITPROJECTION_COMPANY_PERCENTMALE_DESCRIPTION="Here you can add males age groups percent." +COM_COSTBENEFITPROJECTION_COMPANY_PERCENTMALE_LABEL="Set Males Age Groups Percent" COM_COSTBENEFITPROJECTION_COMPANY_PERCENTMALE_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_COMPANY_PERCENT_HINT="Percent Here" COM_COSTBENEFITPROJECTION_COMPANY_PERCENT_LABEL="Percent" +COM_COSTBENEFITPROJECTION_COMPANY_PERCENT_MESSAGE="Error! Please add percent here." COM_COSTBENEFITPROJECTION_COMPANY_PERMISSION="Permissions" COM_COSTBENEFITPROJECTION_COMPANY_PER_DESCRIPTION="Select your profile access status" COM_COSTBENEFITPROJECTION_COMPANY_PER_LABEL="Profile Status" @@ -269,9 +289,10 @@ COM_COSTBENEFITPROJECTION_COMPANY_PRODUCTIVITY_LOSSES="Productivity Losses" COM_COSTBENEFITPROJECTION_COMPANY_PRODUCTIVITY_LOSSES_DESCRIPTION="The proportion of annual salary that it costs to replace an employee for medical reasons." COM_COSTBENEFITPROJECTION_COMPANY_PRODUCTIVITY_LOSSES_HINT="0.05" COM_COSTBENEFITPROJECTION_COMPANY_PRODUCTIVITY_LOSSES_LABEL="Medical Turnover Cost Factor" +COM_COSTBENEFITPROJECTION_COMPANY_PRODUCTIVITY_LOSSES_MESSAGE="Error! Please add medical turnover cost factor here." COM_COSTBENEFITPROJECTION_COMPANY_PUBLISHING="Publishing" COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS="Company Results Access" -COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_DESC=" Allows the users in this group to access company results." +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_DESC="Allows the users in this group to access Company Results" COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_SITE="Company results (Site) Access" COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_SITE_DESC=" Allows the users in this group to access site company results." COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_COMPANIES_BUTTON_ACCESS="Company Results Companies Button Access" @@ -286,10 +307,12 @@ COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_FEMALES="Sick Leave Females" COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_FEMALES_DESCRIPTION="The total number of sick leave days for females per/year." COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_FEMALES_HINT="per/year" COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_FEMALES_LABEL="Total Number Sick Leave Days Females" +COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_FEMALES_MESSAGE="Error! Please add total number of sick leave days for females here." COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_MALES="Sick Leave Males" COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_MALES_DESCRIPTION="The total number of sick leave days for males per/year." COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_MALES_HINT="per/year" COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_MALES_LABEL="Total Number Sick Leave Days Males" +COM_COSTBENEFITPROJECTION_COMPANY_SICK_LEAVE_MALES_MESSAGE="Error! Please add total number of sick leave days for males here." COM_COSTBENEFITPROJECTION_COMPANY_SIXTYSIXTY_FOUR="60-64" COM_COSTBENEFITPROJECTION_COMPANY_STATUS="Status" COM_COSTBENEFITPROJECTION_COMPANY_THIRTYTHIRTY_FOUR="30-34" @@ -298,10 +321,12 @@ COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_HEALTHCARE="Total Healthcare" COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_HEALTHCARE_DESCRIPTION="The total healthcare payed per/year" COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_HEALTHCARE_HINT="per/year" COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_HEALTHCARE_LABEL="Total Healthcare Costs" +COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_HEALTHCARE_MESSAGE="Error! Please add total healthcare costs here." COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_SALARY="Total Salary" COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_SALARY_DESCRIPTION="The total salary payed per/year" COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_SALARY_HINT="per/year" COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_SALARY_LABEL="Total Salary" +COM_COSTBENEFITPROJECTION_COMPANY_TOTAL_SALARY_MESSAGE="Error! Please add total salary here." COM_COSTBENEFITPROJECTION_COMPANY_TURNOVER_COMMENT="Turnover Comment" COM_COSTBENEFITPROJECTION_COMPANY_TURNOVER_COMMENT_DESCRIPTION="Here you can explain how many deaths your company has had over any given period. This will help us understand how you came to the numbers used above in the male and female medical turnovers." COM_COSTBENEFITPROJECTION_COMPANY_TURNOVER_COMMENT_HINT="You can make a comment here to indicate how you arrived at the given numbers above for male and female medical turnovers." @@ -374,7 +399,7 @@ COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_NONE="None" COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_WWW="Website" COM_COSTBENEFITPROJECTION_CONFIG_CPANEL="cPanel" COM_COSTBENEFITPROJECTION_CONFIG_DONT_LOAD="Not" -COM_COSTBENEFITPROJECTION_CONFIG_ENCRYPTION_DESC="The encription key for the field encryption is set here." +COM_COSTBENEFITPROJECTION_CONFIG_ENCRYPTION_DESC="The encryption key for the field encryption is set here." COM_COSTBENEFITPROJECTION_CONFIG_ENCRYPTION_LABEL="Encryption Settings" COM_COSTBENEFITPROJECTION_CONFIG_FLAT_LOAD="Flat" COM_COSTBENEFITPROJECTION_CONFIG_FORCE_LOAD="Force" @@ -390,6 +415,7 @@ COM_COSTBENEFITPROJECTION_CONFIG_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL="hAxis Title COM_COSTBENEFITPROJECTION_CONFIG_INFORMATION_URL_DESCRIPTION="Enter the URL where more information is found about the CPB tool." COM_COSTBENEFITPROJECTION_CONFIG_INFORMATION_URL_HINT="http://www.yourwebsite.com/" COM_COSTBENEFITPROJECTION_CONFIG_INFORMATION_URL_LABEL="Information URL" +COM_COSTBENEFITPROJECTION_CONFIG_INFORMATION_URL_MESSAGE="Error! Please add information url here." COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_DESC="Select the legend font color." COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_LABEL="Legend Font Color" COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_DESC="Set in pixels the font size of the legend" @@ -405,12 +431,13 @@ COM_COSTBENEFITPROJECTION_CONFIG_ONLY_EXTRA="Only Extra" COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_DESCRIPTION="Please set the path where the result json files should be stored, make sure it is outside the public folder." COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_HINT="/home/username/temp" COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_LABEL="Result Path" +COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_MESSAGE="Error! Please add the path where the result json should be sotred here." COM_COSTBENEFITPROJECTION_CONFIG_SITE_CHART_NOTE_DESC="The following settings are used on the front-end of the site called (site)." COM_COSTBENEFITPROJECTION_CONFIG_SITE_CHART_NOTE_LABEL="Site Settings" COM_COSTBENEFITPROJECTION_CONFIG_TARGET_GROUP_DESC="Set the group/s being targeted by this user type." COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_DESC="The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework -for developing fast and powerful web interfaces. For more info visit http://getuikit.com/" -COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LABEL="Uikit Settings" +for developing fast and powerful web interfaces. For more info visit https://getuikit.com/v2/" +COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LABEL="Uikit2 Settings" COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LOAD_DESC="Set the uikit loading option." COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LOAD_LABEL="Loading Options" COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_MIN_DESC="Should the minified version of uikit files be loaded?" @@ -419,10 +446,10 @@ COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_STYLE_DESC="Set the css style that should COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_STYLE_LABEL="css Style" COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_DESC="Select the vertical axis font color." COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_LABEL="vAxis Font Color" -COM_COSTBENEFITPROJECTION_CONFIG_VDM_KEY_DESC="Add the advanced key here." -COM_COSTBENEFITPROJECTION_CONFIG_VDM_KEY_LABEL="Advanced Key (advanced encryption)" -COM_COSTBENEFITPROJECTION_CONFIG_VDM_KEY_NOTE_DESC="When using the advanced encryption you need to get an advanced key from Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb.
Never change this advanced key once it is set! DATA WILL GET CORRUPTED IF YOU DO!" -COM_COSTBENEFITPROJECTION_CONFIG_VDM_KEY_NOTE_LABEL="Advanced Encryption" +COM_COSTBENEFITPROJECTION_CONFIG_WHMCS_KEY_DESC="Add the key you recieved from Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb here." +COM_COSTBENEFITPROJECTION_CONFIG_WHMCS_KEY_LABEL="WHMCS Key" +COM_COSTBENEFITPROJECTION_CONFIG_WHMCS_KEY_NOTE_DESC="When using this (whmcs) encryption you need to get a key from Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb.
Never change this key once it is set! DATA WILL GET CORRUPTED IF YOU DO!" +COM_COSTBENEFITPROJECTION_CONFIG_WHMCS_KEY_NOTE_LABEL="Field Encryption (whmcs)" COM_COSTBENEFITPROJECTION_CONFIG_YES="Yes" COM_COSTBENEFITPROJECTION_CONTRIBUTION_TO_COSTS="Contribution to Costs" COM_COSTBENEFITPROJECTION_CONTRIBUTOR="Contributor" @@ -438,7 +465,7 @@ COM_COSTBENEFITPROJECTION_COST_MORTALITY="Cost Mortality" COM_COSTBENEFITPROJECTION_COST_OF_INTERVENTION="Cost of Intervention" COM_COSTBENEFITPROJECTION_COST_OF_PROBLEM="Cost of Problem" COM_COSTBENEFITPROJECTION_COST_PERCENT="Cost Percent" -COM_COSTBENEFITPROJECTION_COST_PER_EMPLOYEE="Cost per Employee" +COM_COSTBENEFITPROJECTION_COST_PER_EMPLOYEE="Cost Per Employee" COM_COSTBENEFITPROJECTION_COST_PRESENTEEISM_DUE_TO_MORBIDITY="Cost Presenteeism (due to morbidity)" COM_COSTBENEFITPROJECTION_COST_SUMMARY="Cost Summary" COM_COSTBENEFITPROJECTION_COUNTRIES="Countries" @@ -498,10 +525,12 @@ COM_COSTBENEFITPROJECTION_COUNTRY_CODETHREE="Codethree" COM_COSTBENEFITPROJECTION_COUNTRY_CODETHREE_DESCRIPTION="ISO 3166-1 alpha-3 codes are three-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the International Organization for Standardization (ISO), to represent countries, dependent territories, and special areas of geographical interest." COM_COSTBENEFITPROJECTION_COUNTRY_CODETHREE_HINT="NAM" COM_COSTBENEFITPROJECTION_COUNTRY_CODETHREE_LABEL="Code Three" +COM_COSTBENEFITPROJECTION_COUNTRY_CODETHREE_MESSAGE="Error! Please add three-letter country code here." COM_COSTBENEFITPROJECTION_COUNTRY_CODETWO="Codetwo" COM_COSTBENEFITPROJECTION_COUNTRY_CODETWO_DESCRIPTION="ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the International Organization for Standardization (ISO), to represent countries, dependent territories, and special areas of geographical interest." COM_COSTBENEFITPROJECTION_COUNTRY_CODETWO_HINT="NA" COM_COSTBENEFITPROJECTION_COUNTRY_CODETWO_LABEL="Code Two" +COM_COSTBENEFITPROJECTION_COUNTRY_CODETWO_MESSAGE="Error! Please add two-letter country code here." COM_COSTBENEFITPROJECTION_COUNTRY_COMPANIES="Companies" COM_COSTBENEFITPROJECTION_COUNTRY_CREATED_BY_DESC="The user that created this Country." COM_COSTBENEFITPROJECTION_COUNTRY_CREATED_BY_LABEL="Created By" @@ -518,9 +547,11 @@ COM_COSTBENEFITPROJECTION_COUNTRY_EDIT="Editing the Country" COM_COSTBENEFITPROJECTION_COUNTRY_ERROR_UNIQUE_ALIAS="Another Country has the same alias." COM_COSTBENEFITPROJECTION_COUNTRY_FEMALEDEATH="Femaledeath" COM_COSTBENEFITPROJECTION_COUNTRY_FEMALEDEATH_DESCRIPTION="Here you can add total females death data." +COM_COSTBENEFITPROJECTION_COUNTRY_FEMALEDEATH_LABEL="Set Females Total Deaths" COM_COSTBENEFITPROJECTION_COUNTRY_FEMALEDEATH_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_COUNTRY_FEMALEYLD="Femaleyld" COM_COSTBENEFITPROJECTION_COUNTRY_FEMALEYLD_DESCRIPTION="Here you can add females total YLD data." +COM_COSTBENEFITPROJECTION_COUNTRY_FEMALEYLD_LABEL="Set Females Total YLDs" COM_COSTBENEFITPROJECTION_COUNTRY_FEMALEYLD_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_COUNTRY_FIFTEENNINETEEN="15-19" COM_COSTBENEFITPROJECTION_COUNTRY_FIFTYFIFTY_FOUR="50-54" @@ -531,19 +562,23 @@ COM_COSTBENEFITPROJECTION_COUNTRY_HEALTHCARE="Healthcare" COM_COSTBENEFITPROJECTION_COUNTRY_HEALTHCARE_DESCRIPTION="The healthcare costs as a % of total salary costs. This figure is used for the calculations as default." COM_COSTBENEFITPROJECTION_COUNTRY_HEALTHCARE_HINT="10" COM_COSTBENEFITPROJECTION_COUNTRY_HEALTHCARE_LABEL="Default Healthcare Costs" +COM_COSTBENEFITPROJECTION_COUNTRY_HEALTHCARE_MESSAGE="Error! Please add healthcare cost here." COM_COSTBENEFITPROJECTION_COUNTRY_HEALTH_DATA_TOTALS="Health Data Totals" COM_COSTBENEFITPROJECTION_COUNTRY_ID="Id" COM_COSTBENEFITPROJECTION_COUNTRY_INTERVENTIONS="Interventions" COM_COSTBENEFITPROJECTION_COUNTRY_MALEDEATH="Maledeath" COM_COSTBENEFITPROJECTION_COUNTRY_MALEDEATH_DESCRIPTION="Here you can add males total death data." +COM_COSTBENEFITPROJECTION_COUNTRY_MALEDEATH_LABEL="Set Males Total Deaths" COM_COSTBENEFITPROJECTION_COUNTRY_MALEDEATH_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_COUNTRY_MALEYLD="Maleyld" COM_COSTBENEFITPROJECTION_COUNTRY_MALEYLD_DESCRIPTION="Here you can add males total YLD data." +COM_COSTBENEFITPROJECTION_COUNTRY_MALEYLD_LABEL="Set Males Total YLDs" COM_COSTBENEFITPROJECTION_COUNTRY_MALEYLD_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_COUNTRY_MEDICAL_TURNOVERS="Medical Turnovers" COM_COSTBENEFITPROJECTION_COUNTRY_MEDICAL_TURNOVERS_DESCRIPTION="The average medical turnover per/100,000." COM_COSTBENEFITPROJECTION_COUNTRY_MEDICAL_TURNOVERS_HINT="12" COM_COSTBENEFITPROJECTION_COUNTRY_MEDICAL_TURNOVERS_LABEL="Default Ave. Medical Turnover" +COM_COSTBENEFITPROJECTION_COUNTRY_MEDICAL_TURNOVERS_MESSAGE="Error! Please add ave. medical turnover here." COM_COSTBENEFITPROJECTION_COUNTRY_MODIFIED_BY_DESC="The last user that modified this Country." COM_COSTBENEFITPROJECTION_COUNTRY_MODIFIED_BY_LABEL="Modified By" COM_COSTBENEFITPROJECTION_COUNTRY_MODIFIED_DATE_DESC="The date this Country was modified." @@ -552,41 +587,51 @@ COM_COSTBENEFITPROJECTION_COUNTRY_NAME="Name" COM_COSTBENEFITPROJECTION_COUNTRY_NAME_DESCRIPTION="Enter Name Here" COM_COSTBENEFITPROJECTION_COUNTRY_NAME_HINT="Name Here" COM_COSTBENEFITPROJECTION_COUNTRY_NAME_LABEL="Name" +COM_COSTBENEFITPROJECTION_COUNTRY_NAME_MESSAGE="Error! Please add name here." COM_COSTBENEFITPROJECTION_COUNTRY_NEW="A New Country" COM_COSTBENEFITPROJECTION_COUNTRY_NUMBER_HINT="Number Here" COM_COSTBENEFITPROJECTION_COUNTRY_NUMBER_LABEL="Number" +COM_COSTBENEFITPROJECTION_COUNTRY_NUMBER_MESSAGE="Error! Please add number here." COM_COSTBENEFITPROJECTION_COUNTRY_ORDERING_LABEL="Ordering" COM_COSTBENEFITPROJECTION_COUNTRY_PERCENTFEMALE="Percentfemale" COM_COSTBENEFITPROJECTION_COUNTRY_PERCENTFEMALE_DESCRIPTION="Here you can add females age groups percent." +COM_COSTBENEFITPROJECTION_COUNTRY_PERCENTFEMALE_LABEL="Set Females Age Groups Percent" COM_COSTBENEFITPROJECTION_COUNTRY_PERCENTFEMALE_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_COUNTRY_PERCENTMALE="Percentmale" COM_COSTBENEFITPROJECTION_COUNTRY_PERCENTMALE_DESCRIPTION="Here you can add males age groups percent." +COM_COSTBENEFITPROJECTION_COUNTRY_PERCENTMALE_LABEL="Set Males Age Groups Percent" COM_COSTBENEFITPROJECTION_COUNTRY_PERCENTMALE_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_COUNTRY_PERCENT_HINT="Percent Here" COM_COSTBENEFITPROJECTION_COUNTRY_PERCENT_LABEL="Percent" +COM_COSTBENEFITPROJECTION_COUNTRY_PERCENT_MESSAGE="Error! Please add percent here." COM_COSTBENEFITPROJECTION_COUNTRY_PERMISSION="Permissions" COM_COSTBENEFITPROJECTION_COUNTRY_PRESENTEEISM="Presenteeism" COM_COSTBENEFITPROJECTION_COUNTRY_PRESENTEEISM_DESCRIPTION="The presenteeism constant." COM_COSTBENEFITPROJECTION_COUNTRY_PRESENTEEISM_HINT="0.25" COM_COSTBENEFITPROJECTION_COUNTRY_PRESENTEEISM_LABEL="Presenteeism Constant" +COM_COSTBENEFITPROJECTION_COUNTRY_PRESENTEEISM_MESSAGE="Error! Please add presenteeism constant here." COM_COSTBENEFITPROJECTION_COUNTRY_PRODUCTIVITY_LOSSES="Productivity Losses" COM_COSTBENEFITPROJECTION_COUNTRY_PRODUCTIVITY_LOSSES_DESCRIPTION="The interim number between 0 and 1 reflecting the amount of a year in lost productivity due to medical retirement/death of an employee. This figure is used for the default." COM_COSTBENEFITPROJECTION_COUNTRY_PRODUCTIVITY_LOSSES_HINT="0.5" COM_COSTBENEFITPROJECTION_COUNTRY_PRODUCTIVITY_LOSSES_LABEL="Default Productivity Losses" +COM_COSTBENEFITPROJECTION_COUNTRY_PRODUCTIVITY_LOSSES_MESSAGE="Error! Please add productivity losses here." COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICADDRESS="Publicaddress" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICADDRESS_LABEL="Public Address" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICEMAIL="Publicemail" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICEMAIL_DESCRIPTION="The email we may use publicly" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICEMAIL_HINT="Public Email Here" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICEMAIL_LABEL="Public Email" +COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICEMAIL_MESSAGE="Error! Please public email address here." COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNAME="Publicname" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNAME_DESCRIPTION="The name we may use publicly" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNAME_HINT="Public Name Here" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNAME_LABEL="Public Name" +COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNAME_MESSAGE="Error! Please add public name here." COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNUMBER="Publicnumber" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNUMBER_DESCRIPTION="The phone number we may use publicly" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNUMBER_HINT="Public Phone Here" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNUMBER_LABEL="Public Phone" +COM_COSTBENEFITPROJECTION_COUNTRY_PUBLICNUMBER_MESSAGE="Error! Please add public phone number here." COM_COSTBENEFITPROJECTION_COUNTRY_PUBLIC_DETAILS="Public Details" COM_COSTBENEFITPROJECTION_COUNTRY_PUBLISHING="Publishing" COM_COSTBENEFITPROJECTION_COUNTRY_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Country to customise the alias." @@ -596,6 +641,7 @@ COM_COSTBENEFITPROJECTION_COUNTRY_SICK_LEAVE="Sick Leave" COM_COSTBENEFITPROJECTION_COUNTRY_SICK_LEAVE_DESCRIPTION="The average sick leave days per/person." COM_COSTBENEFITPROJECTION_COUNTRY_SICK_LEAVE_HINT="12" COM_COSTBENEFITPROJECTION_COUNTRY_SICK_LEAVE_LABEL="Default Ave. Sick Leave" +COM_COSTBENEFITPROJECTION_COUNTRY_SICK_LEAVE_MESSAGE="Error! Please add ave. sick leave here." COM_COSTBENEFITPROJECTION_COUNTRY_SIXTYSIXTY_FOUR="60-64" COM_COSTBENEFITPROJECTION_COUNTRY_STATUS="Status" COM_COSTBENEFITPROJECTION_COUNTRY_THIRTYTHIRTY_FOUR="30-34" @@ -629,6 +675,7 @@ COM_COSTBENEFITPROJECTION_COUNTRY_WORLDZONE="Worldzone" COM_COSTBENEFITPROJECTION_COUNTRY_WORLDZONE_DESCRIPTION="The zone this country belongs to" COM_COSTBENEFITPROJECTION_COUNTRY_WORLDZONE_HINT="only number" COM_COSTBENEFITPROJECTION_COUNTRY_WORLDZONE_LABEL="Worldzone" +COM_COSTBENEFITPROJECTION_COUNTRY_WORLDZONE_MESSAGE="Error! Please add zone code here." COM_COSTBENEFITPROJECTION_COUNTRY_YEAR_LABEL="Data Year" COM_COSTBENEFITPROJECTION_COVERAGE_S="Coverage: %s" COM_COSTBENEFITPROJECTION_CPANEL_ACCESS_SITE="cPanel (Site) Access" @@ -688,6 +735,7 @@ COM_COSTBENEFITPROJECTION_CURRENCY_CODETHREE="Codethree" COM_COSTBENEFITPROJECTION_CURRENCY_CODETHREE_DESCRIPTION="The following is a list of active codes of official ISO 4217 currency names." COM_COSTBENEFITPROJECTION_CURRENCY_CODETHREE_HINT="NAD" COM_COSTBENEFITPROJECTION_CURRENCY_CODETHREE_LABEL="Code Three" +COM_COSTBENEFITPROJECTION_CURRENCY_CODETHREE_MESSAGE="Error! Please add three-letter currency code here." COM_COSTBENEFITPROJECTION_CURRENCY_CREATED_BY_DESC="The user that created this Currency." COM_COSTBENEFITPROJECTION_CURRENCY_CREATED_BY_LABEL="Created By" COM_COSTBENEFITPROJECTION_CURRENCY_CREATED_DATE_DESC="The date this Currency was created." @@ -696,10 +744,12 @@ COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALPLACE="Decimalplace" COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALPLACE_DESCRIPTION=" The position of a digit to the right of a decimal point, usually identified by successive ascending ordinal numbers with the digit immediately to the right of the decimal point being first: a figure accurate to the third decimal place." COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALPLACE_HINT="2" COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALPLACE_LABEL="Decimal place" +COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALPLACE_MESSAGE="Error! Please add currency decimal place here." COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALSYMBOL="Decimalsymbol" COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALSYMBOL_DESCRIPTION=" The symbol used to separate the integer part of a decimal number from its fractional part is called the decimal point." COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALSYMBOL_HINT="." COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALSYMBOL_LABEL="Decimal symbol" +COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALSYMBOL_MESSAGE="Error! Please add currency decimal symbol here." COM_COSTBENEFITPROJECTION_CURRENCY_DETAILS="Details" COM_COSTBENEFITPROJECTION_CURRENCY_EDIT="Editing the Currency" COM_COSTBENEFITPROJECTION_CURRENCY_ERROR_UNIQUE_ALIAS="Another Currency has the same alias." @@ -712,21 +762,25 @@ COM_COSTBENEFITPROJECTION_CURRENCY_NAME="Name" COM_COSTBENEFITPROJECTION_CURRENCY_NAME_DESCRIPTION="Enter Name Here" COM_COSTBENEFITPROJECTION_CURRENCY_NAME_HINT="Name Here" COM_COSTBENEFITPROJECTION_CURRENCY_NAME_LABEL="Name" +COM_COSTBENEFITPROJECTION_CURRENCY_NAME_MESSAGE="Error! Please add name here." COM_COSTBENEFITPROJECTION_CURRENCY_NEGATIVESTYLE="Negativestyle" COM_COSTBENEFITPROJECTION_CURRENCY_NEGATIVESTYLE_DESCRIPTION="Please use the following placeholders {sign}{number} {symbol} to build the currency negative style." COM_COSTBENEFITPROJECTION_CURRENCY_NEGATIVESTYLE_HINT="{sign}{number} {symbol}" COM_COSTBENEFITPROJECTION_CURRENCY_NEGATIVESTYLE_LABEL="Negative style" +COM_COSTBENEFITPROJECTION_CURRENCY_NEGATIVESTYLE_MESSAGE="Error! Please add currency negative style here." COM_COSTBENEFITPROJECTION_CURRENCY_NEW="A New Currency" COM_COSTBENEFITPROJECTION_CURRENCY_NUMERICCODE="Numericcode" COM_COSTBENEFITPROJECTION_CURRENCY_NUMERICCODE_DESCRIPTION="There is also a three-digit code number assigned to each currency, in the same manner as there is also a three-digit code number assigned to each country as part of ISO 3166. This numeric code is usually the same as the ISO 3166-1 numeric code. For example, USD (United States dollar) has code 840 which is also the numeric code for the US (United States)." COM_COSTBENEFITPROJECTION_CURRENCY_NUMERICCODE_HINT="516" COM_COSTBENEFITPROJECTION_CURRENCY_NUMERICCODE_LABEL="Numeric Code" +COM_COSTBENEFITPROJECTION_CURRENCY_NUMERICCODE_MESSAGE="Error! Please add numeric code here." COM_COSTBENEFITPROJECTION_CURRENCY_ORDERING_LABEL="Ordering" COM_COSTBENEFITPROJECTION_CURRENCY_PERMISSION="Permissions" COM_COSTBENEFITPROJECTION_CURRENCY_POSITIVESTYLE="Positivestyle" COM_COSTBENEFITPROJECTION_CURRENCY_POSITIVESTYLE_DESCRIPTION="Please use the following placeholders {number} {symbol} to build the currency positive style." COM_COSTBENEFITPROJECTION_CURRENCY_POSITIVESTYLE_HINT="{number} {symbol}" COM_COSTBENEFITPROJECTION_CURRENCY_POSITIVESTYLE_LABEL="Positive style" +COM_COSTBENEFITPROJECTION_CURRENCY_POSITIVESTYLE_MESSAGE="Error! Please add currency positive style here." COM_COSTBENEFITPROJECTION_CURRENCY_PUBLISHING="Publishing" COM_COSTBENEFITPROJECTION_CURRENCY_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Currency to customise the alias." COM_COSTBENEFITPROJECTION_CURRENCY_STATUS="Status" @@ -734,9 +788,11 @@ COM_COSTBENEFITPROJECTION_CURRENCY_SYMBOL="Symbol" COM_COSTBENEFITPROJECTION_CURRENCY_SYMBOL_DESCRIPTION="A currency symbol is a graphic symbol used as a shorthand for a currency's name, especially in reference to amounts of money." COM_COSTBENEFITPROJECTION_CURRENCY_SYMBOL_HINT="N$" COM_COSTBENEFITPROJECTION_CURRENCY_SYMBOL_LABEL="Symbol" +COM_COSTBENEFITPROJECTION_CURRENCY_SYMBOL_MESSAGE="Error! Please add currency symbol here." COM_COSTBENEFITPROJECTION_CURRENCY_THOUSANDS="Thousands" COM_COSTBENEFITPROJECTION_CURRENCY_THOUSANDS_HINT=" " COM_COSTBENEFITPROJECTION_CURRENCY_THOUSANDS_LABEL="Thousands separator" +COM_COSTBENEFITPROJECTION_CURRENCY_THOUSANDS_MESSAGE="Error! Please add currency thousands separator here." COM_COSTBENEFITPROJECTION_CURRENCY_VERSION_DESC="A count of the number of times this Currency has been revised." COM_COSTBENEFITPROJECTION_CURRENCY_VERSION_LABEL="Revision" COM_COSTBENEFITPROJECTION_DASH="Dashboard" @@ -797,9 +853,11 @@ COM_COSTBENEFITPROJECTION_HEALTH_DATA_EDIT="Editing the Health Data" COM_COSTBENEFITPROJECTION_HEALTH_DATA_ERROR_UNIQUE_ALIAS="Another Health Data has the same alias." COM_COSTBENEFITPROJECTION_HEALTH_DATA_FEMALEDEATH="Femaledeath" COM_COSTBENEFITPROJECTION_HEALTH_DATA_FEMALEDEATH_DESCRIPTION="Here you can add females death data." +COM_COSTBENEFITPROJECTION_HEALTH_DATA_FEMALEDEATH_LABEL="Set Females Death" COM_COSTBENEFITPROJECTION_HEALTH_DATA_FEMALEDEATH_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_HEALTH_DATA_FEMALEYLD="Femaleyld" COM_COSTBENEFITPROJECTION_HEALTH_DATA_FEMALEYLD_DESCRIPTION="Here you can add females YLD data." +COM_COSTBENEFITPROJECTION_HEALTH_DATA_FEMALEYLD_LABEL="Set Females YLD" COM_COSTBENEFITPROJECTION_HEALTH_DATA_FEMALEYLD_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_HEALTH_DATA_FIFTEENNINETEEN="15-19" COM_COSTBENEFITPROJECTION_HEALTH_DATA_FIFTYFIFTY_FOUR="50-54" @@ -809,9 +867,11 @@ COM_COSTBENEFITPROJECTION_HEALTH_DATA_FORTY_FIVEFORTY_NINE="45-49" COM_COSTBENEFITPROJECTION_HEALTH_DATA_ID="Id" COM_COSTBENEFITPROJECTION_HEALTH_DATA_MALEDEATH="Maledeath" COM_COSTBENEFITPROJECTION_HEALTH_DATA_MALEDEATH_DESCRIPTION="Here you can add males death data." +COM_COSTBENEFITPROJECTION_HEALTH_DATA_MALEDEATH_LABEL="Set Males Death" COM_COSTBENEFITPROJECTION_HEALTH_DATA_MALEDEATH_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_HEALTH_DATA_MALEYLD="Maleyld" COM_COSTBENEFITPROJECTION_HEALTH_DATA_MALEYLD_DESCRIPTION="Here you can add males YLD data." +COM_COSTBENEFITPROJECTION_HEALTH_DATA_MALEYLD_LABEL="Set Males YLD" COM_COSTBENEFITPROJECTION_HEALTH_DATA_MALEYLD_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_HEALTH_DATA_MODIFIED_BY_DESC="The last user that modified this Health Data." COM_COSTBENEFITPROJECTION_HEALTH_DATA_MODIFIED_BY_LABEL="Modified By" @@ -820,6 +880,7 @@ COM_COSTBENEFITPROJECTION_HEALTH_DATA_MODIFIED_DATE_LABEL="Modified Date" COM_COSTBENEFITPROJECTION_HEALTH_DATA_NEW="A New Health Data" COM_COSTBENEFITPROJECTION_HEALTH_DATA_NUMBER_HINT="Number Here" COM_COSTBENEFITPROJECTION_HEALTH_DATA_NUMBER_LABEL="Number" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_NUMBER_MESSAGE="Error! Please add number here." COM_COSTBENEFITPROJECTION_HEALTH_DATA_ORDERING_LABEL="Ordering" COM_COSTBENEFITPROJECTION_HEALTH_DATA_PERMISSION="Permissions" COM_COSTBENEFITPROJECTION_HEALTH_DATA_PUBLISHING="Publishing" @@ -955,7 +1016,7 @@ COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_SUBMENU="Help Documents Submenu" COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the help document" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ADMIN="Admin" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ADMIN_VIEW="Admin View" -COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION="Select the view being targeted" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION="Select the view being target." COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ADMIN_VIEW_LABEL="Admin Views" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ALIAS="Alias" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ALIAS_HINT="Auto-generated from name" @@ -993,7 +1054,7 @@ COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SAVE_WARNING="Alias already existed so a COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SELECT_AN_OPTION="Select an option" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SITE="Site" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SITE_VIEW="Site View" -COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION="Select the view being targeted" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION="Select the view being target." COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SITE_VIEW_LABEL="Site Views" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SOME="Some" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_STATUS="Status" @@ -1005,6 +1066,7 @@ COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TITLE="Title" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TITLE_DESCRIPTION="Enter Title Here" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TITLE_HINT="Title Here" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TITLE_LABEL="Title" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TITLE_MESSAGE="Error! Please add title here." COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TYPE="Type" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TYPE_DESCRIPTION="Select the help type." COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TYPE_LABEL="Type" @@ -1012,6 +1074,7 @@ COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_URL="Url" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_URL_DESCRIPTION="Enter url" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_URL_HINT="http://www.example.com" COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_URL_LABEL="URL" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_URL_MESSAGE="Error! Please add url here." COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_VERSION_DESC="A count of the number of times this Help Document has been revised." COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_VERSION_LABEL="Revision" COM_COSTBENEFITPROJECTION_HELP_MANAGER="Help" @@ -1060,6 +1123,7 @@ COM_COSTBENEFITPROJECTION_IMPORT_TITLE="Data Importer" COM_COSTBENEFITPROJECTION_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import not found." COM_COSTBENEFITPROJECTION_IMPORT_UPDATE_DATA="Import Data" COM_COSTBENEFITPROJECTION_IMPORT_UPLOAD_BOTTON="Upload File" +COM_COSTBENEFITPROJECTION_INACTIVE="Inactive" COM_COSTBENEFITPROJECTION_INTERVENTION="Intervention" COM_COSTBENEFITPROJECTION_INTERVENTIONS="Interventions" COM_COSTBENEFITPROJECTION_INTERVENTIONS_ACCESS="Interventions Access" @@ -1142,6 +1206,7 @@ COM_COSTBENEFITPROJECTION_INTERVENTION_INTERVENTION="Intervention" COM_COSTBENEFITPROJECTION_INTERVENTION_INTERVENTIONS="Interventions" COM_COSTBENEFITPROJECTION_INTERVENTION_INTERVENTIONS_LABEL="Interventions" COM_COSTBENEFITPROJECTION_INTERVENTION_INTERVENTION_DESCRIPTION="Here you can add & edit interventions." +COM_COSTBENEFITPROJECTION_INTERVENTION_INTERVENTION_LABEL="Set Intervention" COM_COSTBENEFITPROJECTION_INTERVENTION_INTERVENTION_SELECT="Edit/Add" COM_COSTBENEFITPROJECTION_INTERVENTION_MBR_DESCRIPTION="Percentage estimate" COM_COSTBENEFITPROJECTION_INTERVENTION_MBR_LABEL="Morbidity Reduction" @@ -1155,6 +1220,7 @@ COM_COSTBENEFITPROJECTION_INTERVENTION_NAME="Name" COM_COSTBENEFITPROJECTION_INTERVENTION_NAME_DESCRIPTION="Enter Intervention Name Here" COM_COSTBENEFITPROJECTION_INTERVENTION_NAME_HINT="Name Here" COM_COSTBENEFITPROJECTION_INTERVENTION_NAME_LABEL="Name" +COM_COSTBENEFITPROJECTION_INTERVENTION_NAME_MESSAGE="Error! Please add intervention name here." COM_COSTBENEFITPROJECTION_INTERVENTION_NET_BENEFIT="Intervention Net Benefit" COM_COSTBENEFITPROJECTION_INTERVENTION_NEW="A New Intervention" COM_COSTBENEFITPROJECTION_INTERVENTION_NOT_REQUIRED="Not Required" @@ -1195,25 +1261,30 @@ COM_COSTBENEFITPROJECTION_MORTALITY_REDUCTION="Mortality Reduction" COM_COSTBENEFITPROJECTION_NBSPNBSPLARRNBSPEASYBRNBSPNBSPNBSPNBSPNAVIGATIONBRNBSPNBSPNBSPNBSPMENU="  ← easy
    navigation
    menu" COM_COSTBENEFITPROJECTION_NET_BENEFIT="Net Benefit" COM_COSTBENEFITPROJECTION_NEW="New" +COM_COSTBENEFITPROJECTION_NEW_ISSUE="New Issue" COM_COSTBENEFITPROJECTION_NONE_LOADED="None Loaded..." -COM_COSTBENEFITPROJECTION_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied." +COM_COSTBENEFITPROJECTION_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!" COM_COSTBENEFITPROJECTION_NO_ACCESS_GRANTED="No Access Granted!" COM_COSTBENEFITPROJECTION_NO_CAUSERISK_SELECTED="No Cause/Risk Selected" +COM_COSTBENEFITPROJECTION_NO_COMPANIES_SELECTED="No companies selected!" COM_COSTBENEFITPROJECTION_NO_DISEASERISK_SELECTED="No Disease/Risk Selected" COM_COSTBENEFITPROJECTION_NO_INTERVENTION_SELECTED="No Intervention Selected" COM_COSTBENEFITPROJECTION_NUMBER_OF_WORK_DAYS_LOST="Number of work days lost" COM_COSTBENEFITPROJECTION_ONLY_USE_THE_ADVANCED_IMPORT_WHEN_IMPORTING_THE_CSV_FILES_FROM_HTTPGHDXHEALTHDATAORG="Only use the advanced import when importing the CSV files from http://ghdx.healthdata.org" +COM_COSTBENEFITPROJECTION_OPENED_BY="opened by" COM_COSTBENEFITPROJECTION_PERCENT_OF_BESTIMATED_BURDENB_BEING_TARGETED_BY_THIS_DISEASERISK_SELECTION="Percent of Estimated Burden being targeted by this Disease/Risk selection" COM_COSTBENEFITPROJECTION_PERCENT_OF_TOTAL_COST="Percent of Total Cost" COM_COSTBENEFITPROJECTION_PERCENT_OF_TOTAL_DAYS_LOST="Percent of Total Days Lost" +COM_COSTBENEFITPROJECTION_PLEASE_CHECK_AGAIN_LATTER="Please check again latter." COM_COSTBENEFITPROJECTION_PLEASE_NOTE_THAT_ADVANCE_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT="Please note that advance import only works with the following format:" COM_COSTBENEFITPROJECTION_PLEASE_WAIT="please wait" COM_COSTBENEFITPROJECTION_PRESENTEEISM_MORBIDITY="Presenteeism (morbidity)" -COM_COSTBENEFITPROJECTION_PUBLIC_RESULTS_ACCESS_SITE="Public results (Site) Access" -COM_COSTBENEFITPROJECTION_PUBLIC_RESULTS_ACCESS_SITE_DESC=" Allows the users in this group to access site public results." +COM_COSTBENEFITPROJECTION_PUBLISHED="Published" COM_COSTBENEFITPROJECTION_REDUCTION_IN_MORBIDITY_COSTS="Reduction in Morbidity Costs" COM_COSTBENEFITPROJECTION_REDUCTION_IN_MORTALITY_COST="Reduction in Mortality Cost" +COM_COSTBENEFITPROJECTION_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github" COM_COSTBENEFITPROJECTION_RESULTS_MENU="Results Menu" +COM_COSTBENEFITPROJECTION_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github" COM_COSTBENEFITPROJECTION_RISK_ID="Risk id" COM_COSTBENEFITPROJECTION_RISK_NAME="Risk name" COM_COSTBENEFITPROJECTION_RT_MEAN_VALUE="rt mean - value" @@ -1284,6 +1355,7 @@ COM_COSTBENEFITPROJECTION_SCALING_FACTOR_HEALTH_SCALING_FACTOR="Health Scaling F COM_COSTBENEFITPROJECTION_SCALING_FACTOR_HEALTH_SCALING_FACTOR_DESCRIPTION="Health scaling factor" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_HEALTH_SCALING_FACTOR_HINT="Number Here" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_HEALTH_SCALING_FACTOR_LABEL="Health Scaling" +COM_COSTBENEFITPROJECTION_SCALING_FACTOR_HEALTH_SCALING_FACTOR_MESSAGE="Error! Please add scaling factor for health here." COM_COSTBENEFITPROJECTION_SCALING_FACTOR_ID="Id" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MODIFIED_BY_DESC="The last user that modified this Scaling Factor." COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MODIFIED_BY_LABEL="Modified By" @@ -1293,10 +1365,12 @@ COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_FEMALES="Morta COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_FEMALES_DESCRIPTION="Mortality scaling factor for females" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_FEMALES_HINT="Number Here" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_FEMALES_LABEL="Mortality Scaling Female" +COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_FEMALES_MESSAGE="Error! Please add scaling factor for females here." COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_MALES="Mortality Scaling Factor Males" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_MALES_DESCRIPTION="Mortality scaling factor for males" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_MALES_HINT="Number Here" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_MALES_LABEL="Mortality Scaling Male" +COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_MALES_MESSAGE="Error! Please add scaling factor for males here." COM_COSTBENEFITPROJECTION_SCALING_FACTOR_NEW="A New Scaling Factor" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_ORDERING_LABEL="Ordering" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PERMISSION="Permissions" @@ -1304,10 +1378,12 @@ COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_FEMALES="Pr COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_FEMALES_DESCRIPTION="Presenteeism scaling factor for females" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_FEMALES_HINT="Number Here" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_FEMALES_LABEL="Presenteeism Scaling Female" +COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_FEMALES_MESSAGE="Error! Please add scaling factor for females here." COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_MALES="Presenteeism Scaling Factor Males" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_MALES_DESCRIPTION="Presenteeism scaling factor for Males" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_MALES_HINT="Number Here" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_MALES_LABEL="Presenteeism Scaling Male" +COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_MALES_MESSAGE="Error! Please add scaling factor for males here." COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PUBLISHING="Publishing" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_REFERENCE="Reference" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_REFERENCE_DESCRIPTION="Please give reference to the source of your data used in the scaling factors." @@ -1321,10 +1397,12 @@ COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_FEMALES="Yld Scaling COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_FEMALES_DESCRIPTION="Absenteeism scaling factor for females" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_FEMALES_HINT="Number Here" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_FEMALES_LABEL="Absenteeism Scaling Female" +COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_FEMALES_MESSAGE="Error! Please add scaling factor for females here." COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_MALES="Yld Scaling Factor Males" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_MALES_DESCRIPTION="Absenteeism scaling factor for males" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_MALES_HINT="Number Here" COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_MALES_LABEL="Absenteeism Scaling Male" +COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_MALES_MESSAGE="Error! Please add scaling factor for males here." COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER="Service Provider" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS="Service Providers" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_ACCESS="Service Providers Access" @@ -1397,14 +1475,17 @@ COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICEMAIL="Publicemail" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICEMAIL_DESCRIPTION="The email we may use publicly" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICEMAIL_HINT="Public Email Here" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICEMAIL_LABEL="Public Email" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICEMAIL_MESSAGE="Error! Please public email address here." COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNAME="Publicname" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNAME_DESCRIPTION="The name we may use publicly" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNAME_HINT="Public Name Here" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNAME_LABEL="Public Name" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNAME_MESSAGE="Error! Please add public name here." COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNUMBER="Publicnumber" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNUMBER_DESCRIPTION="The phone number we may use publicly" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNUMBER_HINT="Public Phone Here" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNUMBER_LABEL="Public Phone" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNUMBER_MESSAGE="Error! Please add public phone number here." COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLIC_DETAILS_NOTE_DESCRIPTION="Your Public Contact Details" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLISHING="Publishing" COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Service Provider to customise the alias." @@ -1429,7 +1510,10 @@ COM_COSTBENEFITPROJECTION_SUBMENU_SCALING_FACTORS="Scaling Factors" COM_COSTBENEFITPROJECTION_SUBMENU_SERVICE_PROVIDERS="Service Providers" COM_COSTBENEFITPROJECTION_TABLES_MENU="Tables Menu" COM_COSTBENEFITPROJECTION_TABLES_QUICK_LINKS="Tables ›› Quick Links" +COM_COSTBENEFITPROJECTION_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading" +COM_COSTBENEFITPROJECTION_THE_README_IS_LOADING="The readme is loading" COM_COSTBENEFITPROJECTION_THE_STATISTICAL_DATA_COULD_NOT_BE_RETURNED_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="The statistical data could not be returned. Please contact your system administrator." +COM_COSTBENEFITPROJECTION_THE_WIKI_IS_LOADING="The wiki is loading" COM_COSTBENEFITPROJECTION_TOTAL="Total" COM_COSTBENEFITPROJECTION_TOTAL_COST="Total Cost" COM_COSTBENEFITPROJECTION_TOTAL_COSTS="Total Costs" @@ -1440,6 +1524,7 @@ COM_COSTBENEFITPROJECTION_TOTAL_DAYS_LOST_AND_CONTRIBUTION_OF_MORBIDITY_MORTALIT COM_COSTBENEFITPROJECTION_TOTAL_DAYS_LOST_PER_DISEASERISK_FACTOR="Total Days Lost Per Disease/Risk Factor" COM_COSTBENEFITPROJECTION_TOTAL_EMPLOYEESBR_IN_RELATION_TO_THIS_NUMBER="total employees
in relation to this number." COM_COSTBENEFITPROJECTION_TOTAL_EMPLOYEESBR_IN_RELATION_TO_THIS_TOTAL="total employees
in relation to this total." +COM_COSTBENEFITPROJECTION_TRASHED="Trashed" COM_COSTBENEFITPROJECTION_UNAVAILABLE_AT_THIS_TIME="Unavailable at this time." COM_COSTBENEFITPROJECTION_USER_COUNTRY_GROUP="User Country Group" COM_COSTBENEFITPROJECTION_USER_MEMBER_GROUP="User Member Group" @@ -1447,6 +1532,7 @@ COM_COSTBENEFITPROJECTION_USER_SERVICE_PROVIDER_GROUP="User Service Provider Gro COM_COSTBENEFITPROJECTION_USE_BATCH="Use Batch" COM_COSTBENEFITPROJECTION_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method." COM_COSTBENEFITPROJECTION_VERSION="Version" +COM_COSTBENEFITPROJECTION_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" COM_COSTBENEFITPROJECTION_WARNING="Warning" COM_COSTBENEFITPROJECTION_WEBSITE="Website" COM_COSTBENEFITPROJECTION_WORK_DAYS_LOST="Work Days Lost" @@ -1455,4 +1541,4 @@ COM_COSTBENEFITPROJECTION_WORK_DAYS_LOST_SUMMARY="Work Days Lost Summary" COM_COSTBENEFITPROJECTION_WORK_DAY_LOST_PERCENT="Work Day Lost Percent" COM_COSTBENEFITPROJECTION_YEAR="Year" COM_COSTBENEFITPROJECTION__OF_ALL_HEALTHCARE_COSTS_CAUSED_BY_THE_CAUSERISK_FACTOR="% of all healthcare costs caused by the cause/risk factor" -COM_COSTBENEFITPROJECTION__OF_WORK_DAYS_LOST_DUE_TO_THE_CAUSERISK_FACTOR="% of work days lost due to the cause/risk factor" +COM_COSTBENEFITPROJECTION__OF_WORK_DAYS_LOST_DUE_TO_THE_CAUSERISK_FACTOR="% of work days lost due to the cause/risk factor" \ No newline at end of file diff --git a/admin/language/en-GB/en-GB.com_costbenefitprojection.sys.ini b/admin/language/en-GB/en-GB.com_costbenefitprojection.sys.ini index dbb8b25d..84071f77 100644 --- a/admin/language/en-GB/en-GB.com_costbenefitprojection.sys.ini +++ b/admin/language/en-GB/en-GB.com_costbenefitprojection.sys.ini @@ -1,5 +1,247 @@ COM_COSTBENEFITPROJECTION="Cost Benefit Projection" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_ACCESS="Causesrisks Access" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_ACCESS_DESC="Allows the users in this group to access access causesrisks" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_BATCH_USE="Causesrisks Batch Use" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch causesrisks" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_CREATE="Causesrisks Create" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_CREATE_DESC="Allows the users in this group to create create causesrisks" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_DASHBOARD_ADD="Causesrisks Dashboard Add" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the causerisk" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_DASHBOARD_LIST="Causesrisks Dashboard List" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the causerisk" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_DELETE="Causesrisks Delete" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_DELETE_DESC="Allows the users in this group to delete delete causesrisks" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT="Causesrisks Edit" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_DESC="Allows the users in this group to edit the causerisk" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_OWN="Causesrisks Edit Own" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_OWN_DESC="Allows the users in this group to edit edit own causesrisks created by them" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_STATE="Causesrisks Edit State" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_STATE_DESC="Allows the users in this group to update the state of the causerisk" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_VERSION="Causesrisks Edit Version" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version causesrisks" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EXPORT="Causesrisks Export" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_EXPORT_DESC="Allows the users in this group to export export causesrisks" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_IMPORT="Causesrisks Import" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_IMPORT_DESC="Allows the users in this group to import import causesrisks" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_SUBMENU="Causesrisks Submenu" +COM_COSTBENEFITPROJECTION_CAUSESRISKS_SUBMENU_DESC="Allows the users in this group to update the submenu of the causerisk" +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS="Combined Results Access" +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_DESC="Allows the users in this group to access Combined Results" +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_SITE="Combined Results (Site) Access" +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_SITE_DESC=" Allows the users in this group to access site combined results." +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_COMPANIES_BUTTON_ACCESS="Combined Results Companies Button Access" +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_COMPANIES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the companies button." +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_DASHBOARD_LIST="Combined Results Dashboard List" +COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the Combined Results" +COM_COSTBENEFITPROJECTION_COMPANIES_ACCESS="Companies Access" +COM_COSTBENEFITPROJECTION_COMPANIES_ACCESS_DESC="Allows the users in this group to access access companies" +COM_COSTBENEFITPROJECTION_COMPANIES_BATCH_USE="Companies Batch Use" +COM_COSTBENEFITPROJECTION_COMPANIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch companies" +COM_COSTBENEFITPROJECTION_COMPANIES_CREATE="Companies Create" +COM_COSTBENEFITPROJECTION_COMPANIES_CREATE_DESC="Allows the users in this group to create create companies" +COM_COSTBENEFITPROJECTION_COMPANIES_DASHBOARD_ADD="Companies Dashboard Add" +COM_COSTBENEFITPROJECTION_COMPANIES_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_DASHBOARD_LIST="Companies Dashboard List" +COM_COSTBENEFITPROJECTION_COMPANIES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_DELETE="Companies Delete" +COM_COSTBENEFITPROJECTION_COMPANIES_DELETE_DESC="Allows the users in this group to delete delete companies" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT="Companies Edit" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CAUSESRISKS="Companies Edit Causesrisks" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CAUSESRISKS_DESC="Allows the users in this group to update the edit causesrisks of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_COUNTRY="Companies Edit Country" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_COUNTRY_DESC="Allows the users in this group to update the edit country of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_BY="Companies Edit Created By" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by companies" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_DATE="Companies Edit Created Date" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created companies" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DATAYEAR="Companies Edit Datayear" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DATAYEAR_DESC="Allows the users in this group to update the edit datayear of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DEPARTMENT="Companies Edit Department" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DEPARTMENT_DESC="Allows the users in this group to update the edit department of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DESC="Allows the users in this group to edit the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_EMAIL="Companies Edit Email" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_EMAIL_DESC="Allows the users in this group to update the edit email of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_OWN="Companies Edit Own" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own companies created by them" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PER="Companies Edit Per" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTFEMALE="Companies Edit Percentfemale" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTFEMALE_DESC="Allows the users in this group to update the edit percentfemale of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTMALE="Companies Edit Percentmale" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTMALE_DESC="Allows the users in this group to update the edit percentmale of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PER_DESC="Allows the users in this group to update the edit per of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_SERVICE_PROVIDER="Companies Edit Service Provider" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_SERVICE_PROVIDER_DESC="Allows the users in this group to update the edit service provider of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_STATE="Companies Edit State" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_USER="Companies Edit User" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_USER_DESC="Allows the users in this group to update the edit user of the company" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_VERSION="Companies Edit Version" +COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version companies" +COM_COSTBENEFITPROJECTION_COMPANIES_EXPORT="Companies Export" +COM_COSTBENEFITPROJECTION_COMPANIES_EXPORT_DESC="Allows the users in this group to export export companies" +COM_COSTBENEFITPROJECTION_COMPANIES_IMPORT="Companies Import" +COM_COSTBENEFITPROJECTION_COMPANIES_IMPORT_DESC="Allows the users in this group to import import companies" +COM_COSTBENEFITPROJECTION_COMPANIES_SUBMENU="Companies Submenu" +COM_COSTBENEFITPROJECTION_COMPANIES_SUBMENU_DESC="Allows the users in this group to update the submenu of the company" +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS="Company Results Access" +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_DESC="Allows the users in this group to access Company Results" +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_SITE="Company results (Site) Access" +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_SITE_DESC=" Allows the users in this group to access site company results." +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_COMPANIES_BUTTON_ACCESS="Company Results Companies Button Access" +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_COMPANIES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the companies button." +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_EDIT_BUTTON_ACCESS="Company Results Edit Button Access" +COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_EDIT_BUTTON_ACCESS_DESC=" Allows the users in this group to access the edit button." COM_COSTBENEFITPROJECTION_CONFIGURATION="Cost Benefit Projection Configuration" +COM_COSTBENEFITPROJECTION_COUNTRIES_ACCESS="Countries Access" +COM_COSTBENEFITPROJECTION_COUNTRIES_ACCESS_DESC="Allows the users in this group to access access countries" +COM_COSTBENEFITPROJECTION_COUNTRIES_BATCH_USE="Countries Batch Use" +COM_COSTBENEFITPROJECTION_COUNTRIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch countries" +COM_COSTBENEFITPROJECTION_COUNTRIES_CREATE="Countries Create" +COM_COSTBENEFITPROJECTION_COUNTRIES_CREATE_DESC="Allows the users in this group to create create countries" +COM_COSTBENEFITPROJECTION_COUNTRIES_DASHBOARD_LIST="Countries Dashboard List" +COM_COSTBENEFITPROJECTION_COUNTRIES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the country" +COM_COSTBENEFITPROJECTION_COUNTRIES_DELETE="Countries Delete" +COM_COSTBENEFITPROJECTION_COUNTRIES_DELETE_DESC="Allows the users in this group to delete delete countries" +COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT="Countries Edit" +COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_DESC="Allows the users in this group to edit the country" +COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_OWN="Countries Edit Own" +COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own countries created by them" +COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_STATE="Countries Edit State" +COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the country" +COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_VERSION="Countries Edit Version" +COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version countries" +COM_COSTBENEFITPROJECTION_COUNTRIES_EXPORT="Countries Export" +COM_COSTBENEFITPROJECTION_COUNTRIES_EXPORT_DESC="Allows the users in this group to export export countries" +COM_COSTBENEFITPROJECTION_COUNTRIES_IMPORT="Countries Import" +COM_COSTBENEFITPROJECTION_COUNTRIES_IMPORT_DESC="Allows the users in this group to import import countries" +COM_COSTBENEFITPROJECTION_COUNTRIES_SUBMENU="Countries Submenu" +COM_COSTBENEFITPROJECTION_COUNTRIES_SUBMENU_DESC="Allows the users in this group to update the submenu of the country" +COM_COSTBENEFITPROJECTION_CPANEL_ACCESS_SITE="cPanel (Site) Access" +COM_COSTBENEFITPROJECTION_CPANEL_ACCESS_SITE_DESC=" Allows the users in this group to access site cpanel." +COM_COSTBENEFITPROJECTION_CREATE_ACCOUNT_GIZ_ACCESS_SITE="Create Account (giz) (Site) Access" +COM_COSTBENEFITPROJECTION_CREATE_ACCOUNT_GIZ_ACCESS_SITE_DESC=" Allows the users in this group to access site create account giz." +COM_COSTBENEFITPROJECTION_CURRENCIES_ACCESS="Currencies Access" +COM_COSTBENEFITPROJECTION_CURRENCIES_ACCESS_DESC="Allows the users in this group to access access currencies" +COM_COSTBENEFITPROJECTION_CURRENCIES_BATCH_USE="Currencies Batch Use" +COM_COSTBENEFITPROJECTION_CURRENCIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch currencies" +COM_COSTBENEFITPROJECTION_CURRENCIES_CREATE="Currencies Create" +COM_COSTBENEFITPROJECTION_CURRENCIES_CREATE_DESC="Allows the users in this group to create create currencies" +COM_COSTBENEFITPROJECTION_CURRENCIES_DASHBOARD_LIST="Currencies Dashboard List" +COM_COSTBENEFITPROJECTION_CURRENCIES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the currency" +COM_COSTBENEFITPROJECTION_CURRENCIES_DELETE="Currencies Delete" +COM_COSTBENEFITPROJECTION_CURRENCIES_DELETE_DESC="Allows the users in this group to delete delete currencies" +COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT="Currencies Edit" +COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_DESC="Allows the users in this group to edit the currency" +COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_OWN="Currencies Edit Own" +COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own currencies created by them" +COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_STATE="Currencies Edit State" +COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the currency" +COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_VERSION="Currencies Edit Version" +COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version currencies" +COM_COSTBENEFITPROJECTION_CURRENCIES_EXPORT="Currencies Export" +COM_COSTBENEFITPROJECTION_CURRENCIES_EXPORT_DESC="Allows the users in this group to export export currencies" +COM_COSTBENEFITPROJECTION_CURRENCIES_IMPORT="Currencies Import" +COM_COSTBENEFITPROJECTION_CURRENCIES_IMPORT_DESC="Allows the users in this group to import import currencies" +COM_COSTBENEFITPROJECTION_CURRENCIES_SUBMENU="Currencies Submenu" +COM_COSTBENEFITPROJECTION_CURRENCIES_SUBMENU_DESC="Allows the users in this group to update the submenu of the currency" +COM_COSTBENEFITPROJECTION_EDIT_CREATED_BY="Edit Created By" +COM_COSTBENEFITPROJECTION_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by." +COM_COSTBENEFITPROJECTION_EDIT_CREATED_DATE="Edit Created Date" +COM_COSTBENEFITPROJECTION_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date." +COM_COSTBENEFITPROJECTION_EDIT_VERSIONS="Edit Version" +COM_COSTBENEFITPROJECTION_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions." +COM_COSTBENEFITPROJECTION_EXPORT_DATA="Export Data" +COM_COSTBENEFITPROJECTION_EXPORT_DATA_DESC=" Allows users in this group to export data." +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_ACCESS="Health Data Sets Access" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_ACCESS_DESC="Allows the users in this group to access access health data sets" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_BATCH_USE="Health Data Sets Batch Use" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch health data sets" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_CREATE="Health Data Sets Create" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_CREATE_DESC="Allows the users in this group to create create health data sets" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DASHBOARD_LIST="Health Data Sets Dashboard List" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DELETE="Health Data Sets Delete" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DELETE_DESC="Allows the users in this group to delete delete health data sets" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT="Health Data Sets Edit" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_CAUSERISK="Health Data Sets Edit Causerisk" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_CAUSERISK_DESC="Allows the users in this group to update the edit causerisk of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_COUNTRY="Health Data Sets Edit Country" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_COUNTRY_DESC="Allows the users in this group to update the edit country of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_DESC="Allows the users in this group to edit the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEDEATH="Health Data Sets Edit Femaledeath" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEDEATH_DESC="Allows the users in this group to update the edit femaledeath of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEYLD="Health Data Sets Edit Femaleyld" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEYLD_DESC="Allows the users in this group to update the edit femaleyld of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEDEATH="Health Data Sets Edit Maledeath" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEDEATH_DESC="Allows the users in this group to update the edit maledeath of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEYLD="Health Data Sets Edit Maleyld" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEYLD_DESC="Allows the users in this group to update the edit maleyld of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_OWN="Health Data Sets Edit Own" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_OWN_DESC="Allows the users in this group to edit edit own health data sets created by them" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_STATE="Health Data Sets Edit State" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_STATE_DESC="Allows the users in this group to update the state of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_VERSION="Health Data Sets Edit Version" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version health data sets" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_YEAR="Health Data Sets Edit Year" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_YEAR_DESC="Allows the users in this group to update the edit year of the health data" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EXPORT="Health Data Sets Export" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EXPORT_DESC="Allows the users in this group to export export health data sets" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_IMPORT="Health Data Sets Import" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_IMPORT_DESC="Allows the users in this group to import import health data sets" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_SUBMENU="Health Data Sets Submenu" +COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_SUBMENU_DESC="Allows the users in this group to update the submenu of the health data" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_ACCESS="Help Documents Access" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_ACCESS_DESC="Allows the users in this group to access access help documents" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch help documents" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_CREATE="Help Documents Create" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the help document" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DELETE="Help Documents Delete" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DELETE_DESC="Allows the users in this group to delete delete help documents" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT="Help Documents Edit" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_DESC="Allows the users in this group to edit the help document" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_OWN="Help Documents Edit Own" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_OWN_DESC="Allows the users in this group to edit edit own help documents created by them" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_STATE="Help Documents Edit State" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_STATE_DESC="Allows the users in this group to update the state of the help document" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_VERSION="Help Documents Edit Version" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version help documents" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EXPORT="Help Documents Export" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EXPORT_DESC="Allows the users in this group to export export help documents" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_IMPORT="Help Documents Import" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_IMPORT_DESC="Allows the users in this group to import import help documents" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_SUBMENU="Help Documents Submenu" +COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the help document" +COM_COSTBENEFITPROJECTION_IMPORT_DATA="Import Data" +COM_COSTBENEFITPROJECTION_IMPORT_DATA_DESC=" Allows users in this group to import data." +COM_COSTBENEFITPROJECTION_INTERVENTIONS_ACCESS="Interventions Access" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_ACCESS_DESC="Allows the users in this group to access access interventions" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_BATCH_USE="Interventions Batch Use" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch interventions" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_CREATE="Interventions Create" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_CREATE_DESC="Allows the users in this group to create create interventions" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_DASHBOARD_ADD="Interventions Dashboard Add" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the intervention" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_DASHBOARD_LIST="Interventions Dashboard List" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the intervention" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_DELETE="Interventions Delete" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_DELETE_DESC="Allows the users in this group to delete delete interventions" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT="Interventions Edit" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_DESC="Allows the users in this group to edit the intervention" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_OWN="Interventions Edit Own" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_OWN_DESC="Allows the users in this group to edit edit own interventions created by them" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_STATE="Interventions Edit State" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_STATE_DESC="Allows the users in this group to update the state of the intervention" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_VERSION="Interventions Edit Version" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version interventions" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EXPORT="Interventions Export" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_EXPORT_DESC="Allows the users in this group to export export interventions" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_IMPORT="Interventions Import" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_IMPORT_DESC="Allows the users in this group to import import interventions" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_SUBMENU="Interventions Submenu" +COM_COSTBENEFITPROJECTION_INTERVENTIONS_SUBMENU_DESC="Allows the users in this group to update the submenu of the intervention" COM_COSTBENEFITPROJECTION_MENU="» Cost Benefit Projection" COM_COSTBENEFITPROJECTION_MENU_COMPANIES="Companies" COM_COSTBENEFITPROJECTION_MENU_CPANEL_DESC="The cpanel fo the front end" @@ -11,3 +253,57 @@ COM_COSTBENEFITPROJECTION_MENU_CREATEACCOUNT_TITLE="Create Account (giz)" COM_COSTBENEFITPROJECTION_MENU_INTERVENTIONS="Interventions" COM_COSTBENEFITPROJECTION_MENU_SCALING_FACTORS="Scaling Factors" COM_COSTBENEFITPROJECTION_MENU_SERVICE_PROVIDERS="Service Providers" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_ACCESS="Scaling Factors Access" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_ACCESS_DESC="Allows the users in this group to access access scaling factors" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_BATCH_USE="Scaling Factors Batch Use" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch scaling factors" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_CREATE="Scaling Factors Create" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_CREATE_DESC="Allows the users in this group to create create scaling factors" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DASHBOARD_ADD="Scaling Factors Dashboard Add" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the scaling factor" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DASHBOARD_LIST="Scaling Factors Dashboard List" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the scaling factor" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DELETE="Scaling Factors Delete" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DELETE_DESC="Allows the users in this group to delete delete scaling factors" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT="Scaling Factors Edit" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_DESC="Allows the users in this group to edit the scaling factor" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_OWN="Scaling Factors Edit Own" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_OWN_DESC="Allows the users in this group to edit edit own scaling factors created by them" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_STATE="Scaling Factors Edit State" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_STATE_DESC="Allows the users in this group to update the state of the scaling factor" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_VERSION="Scaling Factors Edit Version" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version scaling factors" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EXPORT="Scaling Factors Export" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EXPORT_DESC="Allows the users in this group to export export scaling factors" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_IMPORT="Scaling Factors Import" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_IMPORT_DESC="Allows the users in this group to import import scaling factors" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_SUBMENU="Scaling Factors Submenu" +COM_COSTBENEFITPROJECTION_SCALING_FACTORS_SUBMENU_DESC="Allows the users in this group to update the submenu of the scaling factor" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_ACCESS="Service Providers Access" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_ACCESS_DESC="Allows the users in this group to access access service providers" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_BATCH_USE="Service Providers Batch Use" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch service providers" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_CREATE="Service Providers Create" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_CREATE_DESC="Allows the users in this group to create create service providers" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DASHBOARD_ADD="Service Providers Dashboard Add" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the service provider" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DASHBOARD_LIST="Service Providers Dashboard List" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the service provider" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DELETE="Service Providers Delete" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DELETE_DESC="Allows the users in this group to delete delete service providers" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT="Service Providers Edit" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_DESC="Allows the users in this group to edit the service provider" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_OWN="Service Providers Edit Own" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own service providers created by them" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_STATE="Service Providers Edit State" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the service provider" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_VERSION="Service Providers Edit Version" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version service providers" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EXPORT="Service Providers Export" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EXPORT_DESC="Allows the users in this group to export export service providers" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_IMPORT="Service Providers Import" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_IMPORT_DESC="Allows the users in this group to import import service providers" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_SUBMENU="Service Providers Submenu" +COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_SUBMENU_DESC="Allows the users in this group to update the submenu of the service provider" +COM_COSTBENEFITPROJECTION_USE_BATCH="Use Batch" +COM_COSTBENEFITPROJECTION_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method." \ No newline at end of file diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index eacad6e5..86412769 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage batchselection.php diff --git a/admin/layouts/causerisk/details_above.php b/admin/layouts/causerisk/details_above.php index 07f0d95f..54b11c9e 100644 --- a/admin/layouts/causerisk/details_above.php +++ b/admin/layouts/causerisk/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/causerisk/details_fullwidth.php b/admin/layouts/causerisk/details_fullwidth.php index f4e58817..2a9b76aa 100644 --- a/admin/layouts/causerisk/details_fullwidth.php +++ b/admin/layouts/causerisk/details_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_fullwidth.php diff --git a/admin/layouts/causerisk/details_left.php b/admin/layouts/causerisk/details_left.php index db4d88a0..fdf2cd80 100644 --- a/admin/layouts/causerisk/details_left.php +++ b/admin/layouts/causerisk/details_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_left.php diff --git a/admin/layouts/causerisk/details_right.php b/admin/layouts/causerisk/details_right.php index 19dd88af..22a885f8 100644 --- a/admin/layouts/causerisk/details_right.php +++ b/admin/layouts/causerisk/details_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_right.php diff --git a/admin/layouts/causerisk/publishing.php b/admin/layouts/causerisk/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/causerisk/publishing.php +++ b/admin/layouts/causerisk/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/causerisk/publlshing.php b/admin/layouts/causerisk/publlshing.php index da4e61db..af4e1b74 100644 --- a/admin/layouts/causerisk/publlshing.php +++ b/admin/layouts/causerisk/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/layouts/company/age_groups_percentages_fullwidth.php b/admin/layouts/company/age_groups_percentages_fullwidth.php index 3253e732..0b132f62 100644 --- a/admin/layouts/company/age_groups_percentages_fullwidth.php +++ b/admin/layouts/company/age_groups_percentages_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage age_groups_percentages_fullwidth.php diff --git a/admin/layouts/company/age_groups_percentages_left.php b/admin/layouts/company/age_groups_percentages_left.php index 8599f9ff..f7bd638b 100644 --- a/admin/layouts/company/age_groups_percentages_left.php +++ b/admin/layouts/company/age_groups_percentages_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage age_groups_percentages_left.php diff --git a/admin/layouts/company/age_groups_percentages_right.php b/admin/layouts/company/age_groups_percentages_right.php index f38bb5d2..f3dfac49 100644 --- a/admin/layouts/company/age_groups_percentages_right.php +++ b/admin/layouts/company/age_groups_percentages_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage age_groups_percentages_right.php diff --git a/admin/layouts/company/causerisk_selection_fullwidth.php b/admin/layouts/company/causerisk_selection_fullwidth.php index 89431956..e6961afd 100644 --- a/admin/layouts/company/causerisk_selection_fullwidth.php +++ b/admin/layouts/company/causerisk_selection_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage causerisk_selection_fullwidth.php diff --git a/admin/layouts/company/details_above.php b/admin/layouts/company/details_above.php index fd8fba41..b4d83db7 100644 --- a/admin/layouts/company/details_above.php +++ b/admin/layouts/company/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/company/details_left.php b/admin/layouts/company/details_left.php index 3abcf06c..e04c0611 100644 --- a/admin/layouts/company/details_left.php +++ b/admin/layouts/company/details_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_left.php diff --git a/admin/layouts/company/details_right.php b/admin/layouts/company/details_right.php index 0c7ccb4e..b85ba31a 100644 --- a/admin/layouts/company/details_right.php +++ b/admin/layouts/company/details_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_right.php diff --git a/admin/layouts/company/details_under.php b/admin/layouts/company/details_under.php index 0cb8b104..baf794a2 100644 --- a/admin/layouts/company/details_under.php +++ b/admin/layouts/company/details_under.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_under.php diff --git a/admin/layouts/company/interventions_fullwidth.php b/admin/layouts/company/interventions_fullwidth.php index 1beda9a4..2d1eccc9 100644 --- a/admin/layouts/company/interventions_fullwidth.php +++ b/admin/layouts/company/interventions_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage interventions_fullwidth.php @@ -25,10 +25,10 @@ defined('_JEXEC') or die('Restricted access'); $items = $displayData->vwdinterventions; $user = JFactory::getUser(); $id = $displayData->item->id; -$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit"; -$ref = ($id) ? "&ref=company&refid=".$id : ""; -$new = "index.php?option=com_costbenefitprojection&view=intervention&layout=edit".$ref; -$can = CostbenefitprojectionHelper::getActions('intervention'); +$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit"; +$ref = ($id) ? "&ref=company&refid=".$id : ""; +$new = "index.php?option=com_costbenefitprojection&view=intervention&layout=edit".$ref; +$can = CostbenefitprojectionHelper::getActions('intervention'); ?>
@@ -100,26 +100,26 @@ $can = CostbenefitprojectionHelper::getActions('intervention'); published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/company/publishing.php b/admin/layouts/company/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/company/publishing.php +++ b/admin/layouts/company/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/company/publlshing.php b/admin/layouts/company/publlshing.php index da4e61db..af4e1b74 100644 --- a/admin/layouts/company/publlshing.php +++ b/admin/layouts/company/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/layouts/company/scaling_factors_fullwidth.php b/admin/layouts/company/scaling_factors_fullwidth.php index a1330057..56c91155 100644 --- a/admin/layouts/company/scaling_factors_fullwidth.php +++ b/admin/layouts/company/scaling_factors_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage scaling_factors_fullwidth.php @@ -25,7 +25,7 @@ defined('_JEXEC') or die('Restricted access'); $items = $displayData->vwcscaling_factors; $user = JFactory::getUser(); $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"; ?>
@@ -106,26 +106,26 @@ $edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=sc published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/country/age_groups_percentages_left.php b/admin/layouts/country/age_groups_percentages_left.php index 8599f9ff..f7bd638b 100644 --- a/admin/layouts/country/age_groups_percentages_left.php +++ b/admin/layouts/country/age_groups_percentages_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage age_groups_percentages_left.php diff --git a/admin/layouts/country/age_groups_percentages_right.php b/admin/layouts/country/age_groups_percentages_right.php index f38bb5d2..f3dfac49 100644 --- a/admin/layouts/country/age_groups_percentages_right.php +++ b/admin/layouts/country/age_groups_percentages_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage age_groups_percentages_right.php diff --git a/admin/layouts/country/causerisk_selection_fullwidth.php b/admin/layouts/country/causerisk_selection_fullwidth.php index 362996a1..0e361722 100644 --- a/admin/layouts/country/causerisk_selection_fullwidth.php +++ b/admin/layouts/country/causerisk_selection_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage causerisk_selection_fullwidth.php diff --git a/admin/layouts/country/companies_fullwidth.php b/admin/layouts/country/companies_fullwidth.php index 3edc0e39..d56447b6 100644 --- a/admin/layouts/country/companies_fullwidth.php +++ b/admin/layouts/country/companies_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage companies_fullwidth.php @@ -25,10 +25,10 @@ defined('_JEXEC') or die('Restricted access'); $items = $displayData->vwhcompanies; $user = JFactory::getUser(); $id = $displayData->item->id; -$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit"; -$ref = ($id) ? "&ref=country&refid=".$id : ""; -$new = "index.php?option=com_costbenefitprojection&view=company&layout=edit".$ref; -$can = CostbenefitprojectionHelper::getActions('company'); +$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit"; +$ref = ($id) ? "&ref=country&refid=".$id : ""; +$new = "index.php?option=com_costbenefitprojection&view=company&layout=edit".$ref; +$can = CostbenefitprojectionHelper::getActions('company'); ?>
@@ -116,26 +116,26 @@ $can = CostbenefitprojectionHelper::getActions('company'); published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/country/details_above.php b/admin/layouts/country/details_above.php index 2f9905bb..323eda98 100644 --- a/admin/layouts/country/details_above.php +++ b/admin/layouts/country/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/country/details_left.php b/admin/layouts/country/details_left.php index 532a7756..41e0fff5 100644 --- a/admin/layouts/country/details_left.php +++ b/admin/layouts/country/details_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_left.php diff --git a/admin/layouts/country/details_right.php b/admin/layouts/country/details_right.php index 0986a9f4..2d09fda7 100644 --- a/admin/layouts/country/details_right.php +++ b/admin/layouts/country/details_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_right.php diff --git a/admin/layouts/country/health_data_totals_left.php b/admin/layouts/country/health_data_totals_left.php index d5851480..c02fcdec 100644 --- a/admin/layouts/country/health_data_totals_left.php +++ b/admin/layouts/country/health_data_totals_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage health_data_totals_left.php diff --git a/admin/layouts/country/health_data_totals_right.php b/admin/layouts/country/health_data_totals_right.php index 28f56169..5ee54b40 100644 --- a/admin/layouts/country/health_data_totals_right.php +++ b/admin/layouts/country/health_data_totals_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage health_data_totals_right.php diff --git a/admin/layouts/country/interventions_fullwidth.php b/admin/layouts/country/interventions_fullwidth.php index a6ba3396..31c4964c 100644 --- a/admin/layouts/country/interventions_fullwidth.php +++ b/admin/layouts/country/interventions_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage interventions_fullwidth.php @@ -25,10 +25,10 @@ defined('_JEXEC') or die('Restricted access'); $items = $displayData->vwfinterventions; $user = JFactory::getUser(); $id = $displayData->item->id; -$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit"; -$ref = ($id) ? "&ref=country&refid=".$id : ""; -$new = "index.php?option=com_costbenefitprojection&view=intervention&layout=edit".$ref; -$can = CostbenefitprojectionHelper::getActions('intervention'); +$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit"; +$ref = ($id) ? "&ref=country&refid=".$id : ""; +$new = "index.php?option=com_costbenefitprojection&view=intervention&layout=edit".$ref; +$can = CostbenefitprojectionHelper::getActions('intervention'); ?>
@@ -104,26 +104,26 @@ $can = CostbenefitprojectionHelper::getActions('intervention'); published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/country/public_details_fullwidth.php b/admin/layouts/country/public_details_fullwidth.php index af969343..04300d3a 100644 --- a/admin/layouts/country/public_details_fullwidth.php +++ b/admin/layouts/country/public_details_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage public_details_fullwidth.php diff --git a/admin/layouts/country/publishing.php b/admin/layouts/country/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/country/publishing.php +++ b/admin/layouts/country/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/country/publlshing.php b/admin/layouts/country/publlshing.php index da4e61db..af4e1b74 100644 --- a/admin/layouts/country/publlshing.php +++ b/admin/layouts/country/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/layouts/country/service_providers_fullwidth.php b/admin/layouts/country/service_providers_fullwidth.php index 31ace14c..fe3c7498 100644 --- a/admin/layouts/country/service_providers_fullwidth.php +++ b/admin/layouts/country/service_providers_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage service_providers_fullwidth.php @@ -25,10 +25,10 @@ defined('_JEXEC') or die('Restricted access'); $items = $displayData->vwgservice_providers; $user = JFactory::getUser(); $id = $displayData->item->id; -$edit = "index.php?option=com_costbenefitprojection&view=service_providers&task=service_provider.edit"; -$ref = ($id) ? "&ref=country&refid=".$id : ""; -$new = "index.php?option=com_costbenefitprojection&view=service_provider&layout=edit".$ref; -$can = CostbenefitprojectionHelper::getActions('service_provider'); +$edit = "index.php?option=com_costbenefitprojection&view=service_providers&task=service_provider.edit"; +$ref = ($id) ? "&ref=country&refid=".$id : ""; +$new = "index.php?option=com_costbenefitprojection&view=service_provider&layout=edit".$ref; +$can = CostbenefitprojectionHelper::getActions('service_provider'); ?>
@@ -100,26 +100,26 @@ $can = CostbenefitprojectionHelper::getActions('service_provider'); published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/currency/details_above.php b/admin/layouts/currency/details_above.php index 10f2adc3..dce7aef8 100644 --- a/admin/layouts/currency/details_above.php +++ b/admin/layouts/currency/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/currency/details_left.php b/admin/layouts/currency/details_left.php index 1113d00a..e23a8095 100644 --- a/admin/layouts/currency/details_left.php +++ b/admin/layouts/currency/details_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_left.php diff --git a/admin/layouts/currency/details_right.php b/admin/layouts/currency/details_right.php index b670f001..c78ee846 100644 --- a/admin/layouts/currency/details_right.php +++ b/admin/layouts/currency/details_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_right.php diff --git a/admin/layouts/currency/publishing.php b/admin/layouts/currency/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/currency/publishing.php +++ b/admin/layouts/currency/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/currency/publlshing.php b/admin/layouts/currency/publlshing.php index da4e61db..af4e1b74 100644 --- a/admin/layouts/currency/publlshing.php +++ b/admin/layouts/currency/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/layouts/databreakdownmalefemale.php b/admin/layouts/databreakdownmalefemale.php index 7d02b3e1..84c9e99e 100644 --- a/admin/layouts/databreakdownmalefemale.php +++ b/admin/layouts/databreakdownmalefemale.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage databreakdownmalefemale.php diff --git a/admin/layouts/health_data/details_above.php b/admin/layouts/health_data/details_above.php index a1bab4cf..a6ced890 100644 --- a/admin/layouts/health_data/details_above.php +++ b/admin/layouts/health_data/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/health_data/details_left.php b/admin/layouts/health_data/details_left.php index 861a9eab..e3d0962b 100644 --- a/admin/layouts/health_data/details_left.php +++ b/admin/layouts/health_data/details_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_left.php diff --git a/admin/layouts/health_data/details_right.php b/admin/layouts/health_data/details_right.php index a19f6558..ec5f51ef 100644 --- a/admin/layouts/health_data/details_right.php +++ b/admin/layouts/health_data/details_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_right.php diff --git a/admin/layouts/health_data/details_rightside.php b/admin/layouts/health_data/details_rightside.php index 1b5f4f38..bdf99a75 100644 --- a/admin/layouts/health_data/details_rightside.php +++ b/admin/layouts/health_data/details_rightside.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_rightside.php diff --git a/admin/layouts/health_data/publishing.php b/admin/layouts/health_data/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/health_data/publishing.php +++ b/admin/layouts/health_data/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/health_data/publlshing.php b/admin/layouts/health_data/publlshing.php index da4e61db..af4e1b74 100644 --- a/admin/layouts/health_data/publlshing.php +++ b/admin/layouts/health_data/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index b38da1e3..bb38a026 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index d0f0aa28..1a194128 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_fullwidth.php diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index 4e8c0c45..87ed0857 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_left.php diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index f12b46b3..e81df7fe 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_right.php diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 0cb8b104..baf794a2 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_under.php diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index caf3950e..3387c5c2 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/layouts/intervention/details_above.php b/admin/layouts/intervention/details_above.php index 550b120e..5e82795b 100644 --- a/admin/layouts/intervention/details_above.php +++ b/admin/layouts/intervention/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/intervention/details_fullwidth.php b/admin/layouts/intervention/details_fullwidth.php index 9e04a877..e4e2cd89 100644 --- a/admin/layouts/intervention/details_fullwidth.php +++ b/admin/layouts/intervention/details_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_fullwidth.php diff --git a/admin/layouts/intervention/details_under.php b/admin/layouts/intervention/details_under.php index 0cb8b104..baf794a2 100644 --- a/admin/layouts/intervention/details_under.php +++ b/admin/layouts/intervention/details_under.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_under.php diff --git a/admin/layouts/intervention/publishing.php b/admin/layouts/intervention/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/intervention/publishing.php +++ b/admin/layouts/intervention/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/intervention/publlshing.php b/admin/layouts/intervention/publlshing.php index caf3950e..3387c5c2 100644 --- a/admin/layouts/intervention/publlshing.php +++ b/admin/layouts/intervention/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/layouts/intervention/settings_fullwidth.php b/admin/layouts/intervention/settings_fullwidth.php index 58c7800d..7f283f37 100644 --- a/admin/layouts/intervention/settings_fullwidth.php +++ b/admin/layouts/intervention/settings_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage settings_fullwidth.php diff --git a/admin/layouts/intervention/settings_left.php b/admin/layouts/intervention/settings_left.php index 83c75c81..a401d6f6 100644 --- a/admin/layouts/intervention/settings_left.php +++ b/admin/layouts/intervention/settings_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage settings_left.php diff --git a/admin/layouts/scaling_factor/details_above.php b/admin/layouts/scaling_factor/details_above.php index d55535c4..cc358de0 100644 --- a/admin/layouts/scaling_factor/details_above.php +++ b/admin/layouts/scaling_factor/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/scaling_factor/details_left.php b/admin/layouts/scaling_factor/details_left.php index 0bfcde55..f340810a 100644 --- a/admin/layouts/scaling_factor/details_left.php +++ b/admin/layouts/scaling_factor/details_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_left.php diff --git a/admin/layouts/scaling_factor/details_right.php b/admin/layouts/scaling_factor/details_right.php index 860edab5..597acccb 100644 --- a/admin/layouts/scaling_factor/details_right.php +++ b/admin/layouts/scaling_factor/details_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_right.php diff --git a/admin/layouts/scaling_factor/publishing.php b/admin/layouts/scaling_factor/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/scaling_factor/publishing.php +++ b/admin/layouts/scaling_factor/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/scaling_factor/publlshing.php b/admin/layouts/scaling_factor/publlshing.php index caf3950e..3387c5c2 100644 --- a/admin/layouts/scaling_factor/publlshing.php +++ b/admin/layouts/scaling_factor/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/layouts/service_provider/companies_fullwidth.php b/admin/layouts/service_provider/companies_fullwidth.php index 9e9d0895..780b317f 100644 --- a/admin/layouts/service_provider/companies_fullwidth.php +++ b/admin/layouts/service_provider/companies_fullwidth.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage companies_fullwidth.php @@ -25,10 +25,10 @@ defined('_JEXEC') or die('Restricted access'); $items = $displayData->vwecompanies; $user = JFactory::getUser(); $id = $displayData->item->id; -$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit"; -$ref = ($id) ? "&ref=service_provider&refid=".$id : ""; -$new = "index.php?option=com_costbenefitprojection&view=company&layout=edit".$ref; -$can = CostbenefitprojectionHelper::getActions('company'); +$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit"; +$ref = ($id) ? "&ref=service_provider&refid=".$id : ""; +$new = "index.php?option=com_costbenefitprojection&view=company&layout=edit".$ref; +$can = CostbenefitprojectionHelper::getActions('company'); ?>
@@ -116,26 +116,26 @@ $can = CostbenefitprojectionHelper::getActions('company'); published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/service_provider/details_above.php b/admin/layouts/service_provider/details_above.php index 26df25ed..ecc04028 100644 --- a/admin/layouts/service_provider/details_above.php +++ b/admin/layouts/service_provider/details_above.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_above.php diff --git a/admin/layouts/service_provider/details_left.php b/admin/layouts/service_provider/details_left.php index 7aa21305..4c3abc9c 100644 --- a/admin/layouts/service_provider/details_left.php +++ b/admin/layouts/service_provider/details_left.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_left.php diff --git a/admin/layouts/service_provider/details_right.php b/admin/layouts/service_provider/details_right.php index dc371a4d..c6fe0825 100644 --- a/admin/layouts/service_provider/details_right.php +++ b/admin/layouts/service_provider/details_right.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage details_right.php diff --git a/admin/layouts/service_provider/publishing.php b/admin/layouts/service_provider/publishing.php index 0bab590a..bd611980 100644 --- a/admin/layouts/service_provider/publishing.php +++ b/admin/layouts/service_provider/publishing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publishing.php diff --git a/admin/layouts/service_provider/publlshing.php b/admin/layouts/service_provider/publlshing.php index caf3950e..3387c5c2 100644 --- a/admin/layouts/service_provider/publlshing.php +++ b/admin/layouts/service_provider/publlshing.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage publlshing.php diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 51fdf547..5da238bf 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage ajax.php @@ -235,4 +235,52 @@ public function getInterventionBuildTable($idName,$oject,$cluster) } return $new; } + + /** + * Check and if a vdm notice is new (per/user) + **/ + public function isNew($notice) + { + // first get the file path + $path_filename = CostbenefitprojectionHelper::getFilePath('user', 'notice', JFactory::getUser()->username, $fileType = '.md', JPATH_COMPONENT_ADMINISTRATOR); + // check if the file is set + if (($content = @file_get_contents($path_filename)) !== FALSE) + { + if ($notice == $content) + { + return false; + } + } + return true; + } + + /** + * set That a notice has been read (per/user) + **/ + public function isRead($notice) + { + // first get the file path + $path_filename = CostbenefitprojectionHelper::getFilePath('user', 'notice', JFactory::getUser()->username, $fileType = '.md', JPATH_COMPONENT_ADMINISTRATOR); + // set as read if not already set + if (($content = @file_get_contents($path_filename)) !== FALSE) + { + if ($notice == $content) + { + return true; + } + } + return $this->saveFile($notice,$path_filename); + } + + protected function saveFile($data,$path_filename) + { + if (CostbenefitprojectionHelper::checkString($data)) + { + $fp = fopen($path_filename, 'w'); + fwrite($fp, $data); + fclose($fp); + return true; + } + return false; + } } diff --git a/admin/models/causerisk.php b/admin/models/causerisk.php index 4a28bdfa..075055fb 100644 --- a/admin/models/causerisk.php +++ b/admin/models/causerisk.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage causerisk.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -110,7 +110,8 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.causerisk', 'causerisk', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -373,6 +374,26 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -489,8 +510,6 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('causerisk'); } @@ -515,7 +534,6 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -525,17 +543,11 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('causerisk.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -545,7 +557,6 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -555,7 +566,6 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin continue; } } - list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values @@ -638,8 +648,6 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('causerisk'); } @@ -663,7 +671,6 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin if (!$this->user->authorise('causerisk.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -674,7 +681,6 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -691,7 +697,7 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -764,7 +770,7 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin } // Alter the name for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { $origTable = clone $this->getTable(); $origTable->load($input->getInt('id')); @@ -789,7 +795,7 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin // Automatic handling of alias for empty fields if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0) { - if ($data['alias'] == null) + if ($data['alias'] == null || empty($data['alias'])) { if (JFactory::getConfig()->get('unicodeslugs') == 1) { @@ -807,8 +813,7 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin $msg = JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_SAVE_WARNING'); } - list($name, $alias) = $this->_generateNewTitle($data['alias'], $data['name']); - $data['alias'] = $alias; + $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { @@ -818,7 +823,7 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -863,26 +868,49 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title/s & alias. * - * @param string $alias The alias. - * @param string $title The title. + * @param string $alias The alias. + * @param string/array $title The title. * - * @return array Contains the modified title and alias. + * @return array/string Contains the modified title/s and/or alias. * */ - protected function _generateNewTitle($alias, $title) + protected function _generateNewTitle($alias, $title = null) { - // Alter the title & alias + // Alter the title/s & alias $table = $this->getTable(); while ($table->load(array('alias' => $alias))) { - $title = JString::increment($title); + // Check if this is an array of titles + if (CostbenefitprojectionHelper::checkArray($title)) + { + foreach($title as $nr => &$_title) + { + $_title = JString::increment($_title); + } + } + // Make sure we have a title + elseif ($title) + { + $title = JString::increment($title); + } $alias = JString::increment($alias, 'dash'); } - - return array($title, $alias); + // Check if this is an array of titles + if (CostbenefitprojectionHelper::checkArray($title)) + { + $title[] = $alias; + return $title; + } + // Make sure we have a title + elseif ($title) + { + return array($title, $alias); + } + // We only had an alias + return $alias; } } diff --git a/admin/models/causesrisks.php b/admin/models/causesrisks.php index 77c8b94a..9e68f4ec 100644 --- a/admin/models/causesrisks.php +++ b/admin/models/causesrisks.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage causesrisks.php @author Llewellyn van der Merwe @@ -116,7 +116,7 @@ class CostbenefitprojectionModelCausesrisks extends JModelList } } - } + } // return items return $items; @@ -176,7 +176,7 @@ class CostbenefitprojectionModelCausesrisks extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); + $search = $db->quote('%' . $db->escape($search) . '%'); $query->where('(a.name LIKE '.$search.' OR a.ref LIKE '.$search.' OR a.importname LIKE '.$search.' OR a.description LIKE '.$search.' OR a.alias LIKE '.$search.')'); } } diff --git a/admin/models/combinedresults.php b/admin/models/combinedresults.php index bb0307bd..f6440bca 100644 --- a/admin/models/combinedresults.php +++ b/admin/models/combinedresults.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 22 of this MVC + @build 14th October, 2017 + @created 3rd October, 2015 @package Cost Benefit Projection @subpackage combinedresults.php @author Llewellyn van der Merwe @@ -28,16 +28,16 @@ jimport('joomla.application.component.modellist'); */ class CostbenefitprojectionModelCombinedresults extends JModelList { - /** + /** * Model user data. * - * @var strings + * @var strings */ - protected $user; - protected $userId; - protected $guest; - protected $groups; - protected $levels; + protected $user; + protected $userId; + protected $guest; + protected $groups; + protected $levels; protected $app; protected $input; protected $uikitComp; @@ -49,16 +49,16 @@ class CostbenefitprojectionModelCombinedresults extends JModelList */ protected function getListQuery() { - // Get the current user for authorisation checks - $this->user = JFactory::getUser(); - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->app = JFactory::getApplication(); - $this->input = $this->app->input; - $this->initSet = true; + // Get the current user for authorisation checks + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->app = JFactory::getApplication(); + $this->input = $this->app->input; + $this->initSet = true; // Make sure all records load, since no pagination allowed. $this->setState('list.limit', 0); // Get a db connection. @@ -68,6 +68,7 @@ class CostbenefitprojectionModelCombinedresults extends JModelList $query = $db->getQuery(true); // Filtering. + $ids = (array) array_map('intval',explode('_', $this->input->get('cid', null, 'CMD'))); if (!$this->user->authorise('core.options', 'com_costbenefitprojection') && CostbenefitprojectionHelper::checkArray($ids)) { @@ -86,7 +87,7 @@ class CostbenefitprojectionModelCombinedresults extends JModelList if (!CostbenefitprojectionHelper::checkArray($ids)) { // redirect away if not a correct (TODO for now we go to default view) - JError::raiseWarning(500, JText::_('No companies selected!')); + JError::raiseWarning(500, JText::_('COM_COSTBENEFITPROJECTION_NO_COMPANIES_SELECTED')); $app = JFactory::getApplication(); if ($app->isAdmin()) { @@ -137,108 +138,117 @@ class CostbenefitprojectionModelCombinedresults extends JModelList */ public function getItems() { - $user = JFactory::getUser(); - // check if this user has permission to access items - if (!$user->authorise('combinedresults.access', 'com_costbenefitprojection')) - { + $user = JFactory::getUser(); + // check if this user has permission to access items + if (!$user->authorise('combinedresults.access', 'com_costbenefitprojection')) + { $app = JFactory::getApplication(); $app->enqueueMessage(JText::_('Not authorised!'), 'error'); // redirect away if not a correct (TODO for now we go to default view) $app->redirect('index.php?option=com_costbenefitprojection'); return false; - } + } // load parent items $items = parent::getItems(); // Get the global params $globalParams = JComponentHelper::getParams('com_costbenefitprojection', true); - // Get the advanced encription. - $advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced'); - // Get the encription object. - $advanced = new FOFEncryptAes($advancedkey, 256); + // Get the whmcs encryption. + $whmcskey = CostbenefitprojectionHelper::getCryptKey('whmcs'); + // Get the encryption object. + $whmcs = new FOFEncryptAes($whmcskey); - // Convert the parameter fields into objects. - foreach ($items as $nr => &$item) + // Insure all item fields are adapted where needed. + if (CostbenefitprojectionHelper::checkArray($items)) { - // Always create a slug for sef URL's - $item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id; - if (!empty($item->medical_turnovers_females) && $advancedkey && !is_numeric($item->medical_turnovers_females) && $item->medical_turnovers_females === base64_encode(base64_decode($item->medical_turnovers_females, true))) + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); + foreach ($items as $nr => &$item) { - // Decode medical_turnovers_females - $item->medical_turnovers_females = rtrim($advanced->decryptString($item->medical_turnovers_females), "\0"); + // Always create a slug for sef URL's + $item->slug = (isset($item->alias) && isset($item->id)) ? $item->id.':'.$item->alias : $item->id; + if (!empty($item->medical_turnovers_males) && $whmcskey && !is_numeric($item->medical_turnovers_males) && $item->medical_turnovers_males === base64_encode(base64_decode($item->medical_turnovers_males, true))) + { + // Decode medical_turnovers_males + $item->medical_turnovers_males = rtrim($whmcs->decryptString($item->medical_turnovers_males), "\0"); + } + if (!empty($item->females) && $whmcskey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true))) + { + // Decode females + $item->females = rtrim($whmcs->decryptString($item->females), "\0"); + } + if (CostbenefitprojectionHelper::checkJson($item->causesrisks)) + { + // Decode causesrisks + $item->causesrisks = json_decode($item->causesrisks, true); + } + if (!empty($item->sick_leave_males) && $whmcskey && !is_numeric($item->sick_leave_males) && $item->sick_leave_males === base64_encode(base64_decode($item->sick_leave_males, true))) + { + // Decode sick_leave_males + $item->sick_leave_males = rtrim($whmcs->decryptString($item->sick_leave_males), "\0"); + } + if (!empty($item->medical_turnovers_females) && $whmcskey && !is_numeric($item->medical_turnovers_females) && $item->medical_turnovers_females === base64_encode(base64_decode($item->medical_turnovers_females, true))) + { + // Decode medical_turnovers_females + $item->medical_turnovers_females = rtrim($whmcs->decryptString($item->medical_turnovers_females), "\0"); + } + if (!empty($item->sick_leave_females) && $whmcskey && !is_numeric($item->sick_leave_females) && $item->sick_leave_females === base64_encode(base64_decode($item->sick_leave_females, true))) + { + // Decode sick_leave_females + $item->sick_leave_females = rtrim($whmcs->decryptString($item->sick_leave_females), "\0"); + } + if (!empty($item->total_salary) && $whmcskey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true))) + { + // Decode total_salary + $item->total_salary = rtrim($whmcs->decryptString($item->total_salary), "\0"); + } + if (!empty($item->total_healthcare) && $whmcskey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true))) + { + // Decode total_healthcare + $item->total_healthcare = rtrim($whmcs->decryptString($item->total_healthcare), "\0"); + } + if (!empty($item->males) && $whmcskey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true))) + { + // Decode males + $item->males = rtrim($whmcs->decryptString($item->males), "\0"); + } + if (CostbenefitprojectionHelper::checkJson($item->country_causesrisks)) + { + // Decode country_causesrisks + $item->country_causesrisks = json_decode($item->country_causesrisks, true); + } + // Make sure the content prepare plugins fire on country_publicaddress + $_country_publicaddress = new stdClass(); + $_country_publicaddress->text =& $item->country_publicaddress; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (country_publicaddress) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.combinedresults.country_publicaddress', &$_country_publicaddress, &$this->params, 0)); + // Checking if country_publicaddress has uikit components that must be loaded. + $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->country_publicaddress,$this->uikitComp); + // set the global causesrisks value. + $this->a_causesrisks = $item->causesrisks; + // set the global datayear value. + $this->a_datayear = $item->datayear; + // set the global datayear value. + $this->e_datayear = $item->country_datayear; + // set the global causesrisks value. + $this->e_causesrisks = $item->country_causesrisks; + // set countryCountryHealth_dataB to the $item object. + $item->countryCountryHealth_dataB = $this->getCountryCountryHealth_dataBcbb_B($item->country); + // set idCompanyScaling_factorC to the $item object. + $item->idCompanyScaling_factorC = $this->getIdCompanyScaling_factorBcbb_C($item->id); + // set idCompanyInterventionD to the $item object. + $item->idCompanyInterventionD = $this->getIdCompanyInterventionBcbb_D($item->id); + // set causesrisksIdCauseriskG to the $item object. + $item->causesrisksIdCauseriskG = $this->getCausesrisksIdCauseriskBcbb_G($item->causesrisks); + // set countryCountryHealth_dataBB to the $item object. + $item->countryCountryHealth_dataBB = $this->getCountryCountryHealth_dataBcbb_BB($item->country); + // set causesrisksIdCauseriskGG to the $item object. + $item->causesrisksIdCauseriskGG = $this->getCausesrisksIdCauseriskBcbb_GG($item->country_causesrisks); + // set countryCountryInterventionDD to the $item object. + $item->countryCountryInterventionDD = $this->getCountryCountryInterventionBcbb_DD($item->country); } - if (!empty($item->females) && $advancedkey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true))) - { - // Decode females - $item->females = rtrim($advanced->decryptString($item->females), "\0"); - } - if (!empty($item->sick_leave_males) && $advancedkey && !is_numeric($item->sick_leave_males) && $item->sick_leave_males === base64_encode(base64_decode($item->sick_leave_males, true))) - { - // Decode sick_leave_males - $item->sick_leave_males = rtrim($advanced->decryptString($item->sick_leave_males), "\0"); - } - if (CostbenefitprojectionHelper::checkString($item->causesrisks)) - { - // Decode causesrisks - $item->causesrisks = json_decode($item->causesrisks, true); - } - if (!empty($item->medical_turnovers_males) && $advancedkey && !is_numeric($item->medical_turnovers_males) && $item->medical_turnovers_males === base64_encode(base64_decode($item->medical_turnovers_males, true))) - { - // Decode medical_turnovers_males - $item->medical_turnovers_males = rtrim($advanced->decryptString($item->medical_turnovers_males), "\0"); - } - if (!empty($item->total_salary) && $advancedkey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true))) - { - // Decode total_salary - $item->total_salary = rtrim($advanced->decryptString($item->total_salary), "\0"); - } - if (!empty($item->sick_leave_females) && $advancedkey && !is_numeric($item->sick_leave_females) && $item->sick_leave_females === base64_encode(base64_decode($item->sick_leave_females, true))) - { - // Decode sick_leave_females - $item->sick_leave_females = rtrim($advanced->decryptString($item->sick_leave_females), "\0"); - } - if (!empty($item->total_healthcare) && $advancedkey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true))) - { - // Decode total_healthcare - $item->total_healthcare = rtrim($advanced->decryptString($item->total_healthcare), "\0"); - } - if (!empty($item->males) && $advancedkey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true))) - { - // Decode males - $item->males = rtrim($advanced->decryptString($item->males), "\0"); - } - if (CostbenefitprojectionHelper::checkString($item->country_causesrisks)) - { - // Decode country_causesrisks - $item->country_causesrisks = json_decode($item->country_causesrisks, true); - } - // Make sure the content prepare plugins fire on country_publicaddress. - $item->country_publicaddress = JHtml::_('content.prepare',$item->country_publicaddress); - // Checking if country_publicaddress has uikit components that must be loaded. - $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->country_publicaddress,$this->uikitComp); - // set the global causesrisks value. - $this->a_causesrisks = $item->causesrisks; - // set the global datayear value. - $this->a_datayear = $item->datayear; - // set the global datayear value. - $this->e_datayear = $item->country_datayear; - // set the global causesrisks value. - $this->e_causesrisks = $item->country_causesrisks; - // set countryCountryHealth_dataB to the $item object. - $item->countryCountryHealth_dataB = $this->getCountryCountryHealth_dataBcbb_B($item->country); - // set idCompanyScaling_factorC to the $item object. - $item->idCompanyScaling_factorC = $this->getIdCompanyScaling_factorBcbb_C($item->id); - // set idCompanyInterventionD to the $item object. - $item->idCompanyInterventionD = $this->getIdCompanyInterventionBcbb_D($item->id); - // set causesrisksIdCauseriskG to the $item object. - $item->causesrisksIdCauseriskG = $this->getCausesrisksIdCauseriskBcbb_G($item->causesrisks); - // set countryCountryHealth_dataBB to the $item object. - $item->countryCountryHealth_dataBB = $this->getCountryCountryHealth_dataBcbb_BB($item->country); - // set causesrisksIdCauseriskGG to the $item object. - $item->causesrisksIdCauseriskGG = $this->getCausesrisksIdCauseriskBcbb_GG($item->country_causesrisks); - // set countryCountryInterventionDD to the $item object. - $item->countryCountryInterventionDD = $this->getCountryCountryInterventionBcbb_DD($item->country); } // return items @@ -275,7 +285,9 @@ class CostbenefitprojectionModelCombinedresults extends JModelList { return false; } + // Get where b.published is 1 $query->where('b.published = 1'); + // Get where b.year is $this->a_datayear $query->where('b.year = ' . $db->quote($this->a_datayear)); $query->order('b.ordering ASC'); @@ -286,6 +298,9 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); return $db->loadObjectList(); } return false; @@ -311,6 +326,7 @@ class CostbenefitprojectionModelCombinedresults extends JModelList array('id','causerisk','reference','yld_scaling_factor_males','yld_scaling_factor_females','mortality_scaling_factor_males','mortality_scaling_factor_females','presenteeism_scaling_factor_males','presenteeism_scaling_factor_females','health_scaling_factor','published'))); $query->from($db->quoteName('#__costbenefitprojection_scaling_factor', 'c')); $query->where('c.company = ' . $db->quote($id)); + // Get where c.published is 1 $query->where('c.published = 1'); $query->order('c.published ASC'); $query->order('c.ordering ASC'); @@ -322,13 +338,19 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); $items = $db->loadObjectList(); // Convert the parameter fields into objects. foreach ($items as $nr => &$item) { - // Make sure the content prepare plugins fire on reference. - $item->reference = JHtml::_('content.prepare',$item->reference); + // Make sure the content prepare plugins fire on reference + $_reference = new stdClass(); + $_reference->text =& $item->reference; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (reference) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.combinedresults.reference', &$_reference, &$this->params, 0)); // Checking if reference has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp); } @@ -357,6 +379,7 @@ class CostbenefitprojectionModelCombinedresults extends JModelList array('id','name','type','coverage','duration','share','description','reference','interventions','intervention','published','created_by','modified_by','created','modified'))); $query->from($db->quoteName('#__costbenefitprojection_intervention', 'd')); $query->where('d.company = ' . $db->quote($id)); + // Get where d.published is 1 $query->where('d.published = 1'); $query->order('d.ordering ASC'); @@ -367,13 +390,19 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); $items = $db->loadObjectList(); // Convert the parameter fields into objects. foreach ($items as $nr => &$item) { - // Make sure the content prepare plugins fire on reference. - $item->reference = JHtml::_('content.prepare',$item->reference); + // Make sure the content prepare plugins fire on reference + $_reference = new stdClass(); + $_reference->text =& $item->reference; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (reference) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.combinedresults.reference', &$_reference, &$this->params, 0)); // Checking if reference has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp); } @@ -404,7 +433,7 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // Check if $causesrisks is an array with values. $array = $causesrisks; - if (isset($array) && CostbenefitprojectionHelper::checkArray($array)) + if (isset($array) && CostbenefitprojectionHelper::checkArray($array, true)) { $query->where('g.id IN (' . implode(',', $array) . ')'); } @@ -420,6 +449,9 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); return $db->loadObjectList(); } return false; @@ -455,7 +487,9 @@ class CostbenefitprojectionModelCombinedresults extends JModelList { return false; } + // Get where bb.published is 1 $query->where('bb.published = 1'); + // Get where bb.year is $this->e_datayear $query->where('bb.year = ' . $db->quote($this->e_datayear)); $query->order('bb.ordering ASC'); @@ -466,6 +500,9 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); return $db->loadObjectList(); } return false; @@ -493,7 +530,7 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // Check if $causesrisks is an array with values. $array = $causesrisks; - if (isset($array) && CostbenefitprojectionHelper::checkArray($array)) + if (isset($array) && CostbenefitprojectionHelper::checkArray($array, true)) { $query->where('gg.id IN (' . implode(',', $array) . ')'); } @@ -509,13 +546,19 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); $items = $db->loadObjectList(); // Convert the parameter fields into objects. foreach ($items as $nr => &$item) { - // Make sure the content prepare plugins fire on description. - $item->description = JHtml::_('content.prepare',$item->description); + // Make sure the content prepare plugins fire on description + $_description = new stdClass(); + $_description->text =& $item->description; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (description) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.combinedresults.description', &$_description, &$this->params, 0)); // Checking if description has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp); } @@ -544,6 +587,7 @@ class CostbenefitprojectionModelCombinedresults extends JModelList array('id','name','type','coverage','duration','share','description','reference','interventions','intervention','published','created_by','modified_by','created','modified'))); $query->from($db->quoteName('#__costbenefitprojection_intervention', 'dd')); $query->where('dd.country = ' . $db->quote($country)); + // Get where dd.published is 1 $query->where('dd.published = 1'); $query->order('dd.ordering ASC'); @@ -554,22 +598,31 @@ class CostbenefitprojectionModelCombinedresults extends JModelList // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); $items = $db->loadObjectList(); // Convert the parameter fields into objects. foreach ($items as $nr => &$item) { - if (CostbenefitprojectionHelper::checkString($item->interventions)) + if (CostbenefitprojectionHelper::checkJson($item->interventions)) { // Decode interventions $item->interventions = json_decode($item->interventions, true); } - // Make sure the content prepare plugins fire on description. - $item->description = JHtml::_('content.prepare',$item->description); + // Make sure the content prepare plugins fire on description + $_description = new stdClass(); + $_description->text =& $item->description; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (description) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.combinedresults.description', &$_description, &$this->params, 0)); + // Make sure the content prepare plugins fire on reference + $_reference = new stdClass(); + $_reference->text =& $item->reference; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (reference) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.combinedresults.reference', &$_reference, &$this->params, 0)); // Checking if description has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp); - // Make sure the content prepare plugins fire on reference. - $item->reference = JHtml::_('content.prepare',$item->reference); // Checking if reference has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp); } diff --git a/admin/models/companies.php b/admin/models/companies.php index ad1d3d54..9eef0536 100644 --- a/admin/models/companies.php +++ b/admin/models/companies.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 101 of this MVC + @build 29th June, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage companies.php @author Llewellyn van der Merwe @@ -145,7 +145,7 @@ class CostbenefitprojectionModelCompanies extends JModelList $item->per = $this->selectionTranslation($item->per, 'per'); } } - + // return items return $items; @@ -159,7 +159,7 @@ class CostbenefitprojectionModelCompanies extends JModelList public function selectionTranslation($value,$name) { // Array of department language strings - if ($name == 'department') + if ($name === 'department') { $departmentArray = array( 1 => 'COM_COSTBENEFITPROJECTION_COMPANY_BASIC', @@ -172,7 +172,7 @@ class CostbenefitprojectionModelCompanies extends JModelList } } // Array of per language strings - if ($name == 'per') + if ($name === 'per') { $perArray = array( 1 => 'COM_COSTBENEFITPROJECTION_COMPANY_OPEN', @@ -270,7 +270,7 @@ class CostbenefitprojectionModelCompanies extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); + $search = $db->quote('%' . $db->escape($search) . '%'); $query->where('(a.name LIKE '.$search.' OR a.email LIKE '.$search.' OR a.user LIKE '.$search.' OR g.name LIKE '.$search.' OR a.department LIKE '.$search.' OR a.country LIKE '.$search.' OR h.name LIKE '.$search.' OR a.service_provider LIKE '.$search.' OR i.user LIKE '.$search.' OR a.per LIKE '.$search.')'); } } @@ -278,22 +278,22 @@ class CostbenefitprojectionModelCompanies extends JModelList // Filter by Department. if ($department = $this->getState('filter.department')) { - $query->where('a.department = ' . $db->quote($db->escape($department, true))); + $query->where('a.department = ' . $db->quote($db->escape($department))); } // Filter by country. if ($country = $this->getState('filter.country')) { - $query->where('a.country = ' . $db->quote($db->escape($country, true))); + $query->where('a.country = ' . $db->quote($db->escape($country))); } // Filter by service_provider. if ($service_provider = $this->getState('filter.service_provider')) { - $query->where('a.service_provider = ' . $db->quote($db->escape($service_provider, true))); + $query->where('a.service_provider = ' . $db->quote($db->escape($service_provider))); } // Filter by Per. if ($per = $this->getState('filter.per')) { - $query->where('a.per = ' . $db->quote($db->escape($per, true))); + $query->where('a.per = ' . $db->quote($db->escape($per))); } // Add the list ordering clause. @@ -365,10 +365,10 @@ class CostbenefitprojectionModelCompanies extends JModelList { $items = $db->loadObjectList(); - // Get the advanced encription key. - $advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced'); - // Get the encription object. - $advanced = new FOFEncryptAes($advancedkey, 256); + // Get the whmcs encryption key. + $whmcskey = CostbenefitprojectionHelper::getCryptKey('whmcs'); + // Get the encryption object. + $whmcs = new FOFEncryptAes($whmcskey); // set values to display correctly. if (CostbenefitprojectionHelper::checkArray($items)) @@ -384,45 +384,45 @@ class CostbenefitprojectionModelCompanies extends JModelList continue; } - if ($advancedkey && !is_numeric($item->medical_turnovers_females) && $item->medical_turnovers_females === base64_encode(base64_decode($item->medical_turnovers_females, true))) - { - // decrypt medical_turnovers_females - $item->medical_turnovers_females = $advanced->decryptString($item->medical_turnovers_females); - } - if ($advancedkey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true))) - { - // decrypt females - $item->females = $advanced->decryptString($item->females); - } - if ($advancedkey && !is_numeric($item->sick_leave_males) && $item->sick_leave_males === base64_encode(base64_decode($item->sick_leave_males, true))) - { - // decrypt sick_leave_males - $item->sick_leave_males = $advanced->decryptString($item->sick_leave_males); - } - if ($advancedkey && !is_numeric($item->medical_turnovers_males) && $item->medical_turnovers_males === base64_encode(base64_decode($item->medical_turnovers_males, true))) + if ($whmcskey && !is_numeric($item->medical_turnovers_males) && $item->medical_turnovers_males === base64_encode(base64_decode($item->medical_turnovers_males, true))) { // decrypt medical_turnovers_males - $item->medical_turnovers_males = $advanced->decryptString($item->medical_turnovers_males); + $item->medical_turnovers_males = $whmcs->decryptString($item->medical_turnovers_males); } - if ($advancedkey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true))) + if ($whmcskey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true))) { - // decrypt total_salary - $item->total_salary = $advanced->decryptString($item->total_salary); + // decrypt females + $item->females = $whmcs->decryptString($item->females); } - if ($advancedkey && !is_numeric($item->sick_leave_females) && $item->sick_leave_females === base64_encode(base64_decode($item->sick_leave_females, true))) + if ($whmcskey && !is_numeric($item->sick_leave_males) && $item->sick_leave_males === base64_encode(base64_decode($item->sick_leave_males, true))) + { + // decrypt sick_leave_males + $item->sick_leave_males = $whmcs->decryptString($item->sick_leave_males); + } + if ($whmcskey && !is_numeric($item->medical_turnovers_females) && $item->medical_turnovers_females === base64_encode(base64_decode($item->medical_turnovers_females, true))) + { + // decrypt medical_turnovers_females + $item->medical_turnovers_females = $whmcs->decryptString($item->medical_turnovers_females); + } + if ($whmcskey && !is_numeric($item->sick_leave_females) && $item->sick_leave_females === base64_encode(base64_decode($item->sick_leave_females, true))) { // decrypt sick_leave_females - $item->sick_leave_females = $advanced->decryptString($item->sick_leave_females); + $item->sick_leave_females = $whmcs->decryptString($item->sick_leave_females); } - if ($advancedkey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true))) + if ($whmcskey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true))) + { + // decrypt total_salary + $item->total_salary = $whmcs->decryptString($item->total_salary); + } + if ($whmcskey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true))) { // decrypt total_healthcare - $item->total_healthcare = $advanced->decryptString($item->total_healthcare); + $item->total_healthcare = $whmcs->decryptString($item->total_healthcare); } - if ($advancedkey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true))) + if ($whmcskey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true))) { // decrypt males - $item->males = $advanced->decryptString($item->males); + $item->males = $whmcs->decryptString($item->males); } // unset the values we don't want exported. unset($item->asset_id); diff --git a/admin/models/company.php b/admin/models/company.php index 5f7f8f1e..3e330dab 100644 --- a/admin/models/company.php +++ b/admin/models/company.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 101 of this MVC + @build 29th June, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage company.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -89,63 +89,63 @@ class CostbenefitprojectionModelCompany extends JModelAdmin $item->metadata = $registry->toArray(); } + // Get the whmcs encryption. + $whmcskey = CostbenefitprojectionHelper::getCryptKey('whmcs'); + // Get the encryption object. + $whmcs = new FOFEncryptAes($whmcskey); + + if (!empty($item->medical_turnovers_males) && $whmcskey && !is_numeric($item->medical_turnovers_males) && $item->medical_turnovers_males === base64_encode(base64_decode($item->medical_turnovers_males, true))) + { + // whmcs decrypt data medical_turnovers_males. + $item->medical_turnovers_males = rtrim($whmcs->decryptString($item->medical_turnovers_males), "\0"); + } + + if (!empty($item->females) && $whmcskey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true))) + { + // whmcs decrypt data females. + $item->females = rtrim($whmcs->decryptString($item->females), "\0"); + } + + if (!empty($item->sick_leave_males) && $whmcskey && !is_numeric($item->sick_leave_males) && $item->sick_leave_males === base64_encode(base64_decode($item->sick_leave_males, true))) + { + // whmcs decrypt data sick_leave_males. + $item->sick_leave_males = rtrim($whmcs->decryptString($item->sick_leave_males), "\0"); + } + + if (!empty($item->medical_turnovers_females) && $whmcskey && !is_numeric($item->medical_turnovers_females) && $item->medical_turnovers_females === base64_encode(base64_decode($item->medical_turnovers_females, true))) + { + // whmcs decrypt data medical_turnovers_females. + $item->medical_turnovers_females = rtrim($whmcs->decryptString($item->medical_turnovers_females), "\0"); + } + + if (!empty($item->sick_leave_females) && $whmcskey && !is_numeric($item->sick_leave_females) && $item->sick_leave_females === base64_encode(base64_decode($item->sick_leave_females, true))) + { + // whmcs decrypt data sick_leave_females. + $item->sick_leave_females = rtrim($whmcs->decryptString($item->sick_leave_females), "\0"); + } + + if (!empty($item->total_salary) && $whmcskey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true))) + { + // whmcs decrypt data total_salary. + $item->total_salary = rtrim($whmcs->decryptString($item->total_salary), "\0"); + } + + if (!empty($item->total_healthcare) && $whmcskey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true))) + { + // whmcs decrypt data total_healthcare. + $item->total_healthcare = rtrim($whmcs->decryptString($item->total_healthcare), "\0"); + } + + if (!empty($item->males) && $whmcskey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true))) + { + // whmcs decrypt data males. + $item->males = rtrim($whmcs->decryptString($item->males), "\0"); + } + if (!empty($item->causesrisks)) { // JSON Decode causesrisks. $item->causesrisks = json_decode($item->causesrisks); - } - - // Get the advanced encription key. - $advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced'); - // Get the encription object. - $advanced = new FOFEncryptAes($advancedkey, 256); - - if (!empty($item->medical_turnovers_females) && $advancedkey && !is_numeric($item->medical_turnovers_females) && $item->medical_turnovers_females === base64_encode(base64_decode($item->medical_turnovers_females, true))) - { - // advanced decript data medical_turnovers_females. - $item->medical_turnovers_females = rtrim($advanced->decryptString($item->medical_turnovers_females), "\0"); - } - - if (!empty($item->females) && $advancedkey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true))) - { - // advanced decript data females. - $item->females = rtrim($advanced->decryptString($item->females), "\0"); - } - - if (!empty($item->sick_leave_males) && $advancedkey && !is_numeric($item->sick_leave_males) && $item->sick_leave_males === base64_encode(base64_decode($item->sick_leave_males, true))) - { - // advanced decript data sick_leave_males. - $item->sick_leave_males = rtrim($advanced->decryptString($item->sick_leave_males), "\0"); - } - - if (!empty($item->medical_turnovers_males) && $advancedkey && !is_numeric($item->medical_turnovers_males) && $item->medical_turnovers_males === base64_encode(base64_decode($item->medical_turnovers_males, true))) - { - // advanced decript data medical_turnovers_males. - $item->medical_turnovers_males = rtrim($advanced->decryptString($item->medical_turnovers_males), "\0"); - } - - if (!empty($item->total_salary) && $advancedkey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true))) - { - // advanced decript data total_salary. - $item->total_salary = rtrim($advanced->decryptString($item->total_salary), "\0"); - } - - if (!empty($item->sick_leave_females) && $advancedkey && !is_numeric($item->sick_leave_females) && $item->sick_leave_females === base64_encode(base64_decode($item->sick_leave_females, true))) - { - // advanced decript data sick_leave_females. - $item->sick_leave_females = rtrim($advanced->decryptString($item->sick_leave_females), "\0"); - } - - if (!empty($item->total_healthcare) && $advancedkey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true))) - { - // advanced decript data total_healthcare. - $item->total_healthcare = rtrim($advanced->decryptString($item->total_healthcare), "\0"); - } - - if (!empty($item->males) && $advancedkey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true))) - { - // advanced decript data males. - $item->males = rtrim($advanced->decryptString($item->males), "\0"); } if (!empty($item->id)) @@ -370,7 +370,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin public function selectionTranslationVwdinterventions($value,$name) { // Array of type language strings - if ($name == 'type') + if ($name === 'type') { $typeArray = array( 1 => 'COM_COSTBENEFITPROJECTION_INTERVENTION_SINGLE', @@ -396,7 +396,8 @@ class CostbenefitprojectionModelCompany extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.company', 'company', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -559,6 +560,22 @@ class CostbenefitprojectionModelCompany extends JModelAdmin $form->setFieldAttribute('per', 'required', 'false'); } } + // Modify the form based on Edit Causesrisks access controls. + if ($id != 0 && (!$user->authorise('company.edit.causesrisks', 'com_costbenefitprojection.company.' . (int) $id)) + || ($id == 0 && !$user->authorise('company.edit.causesrisks', 'com_costbenefitprojection'))) + { + // Disable fields for display. + $form->setFieldAttribute('causesrisks', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('causesrisks', 'readonly', 'true'); + if (!$form->getValue('causesrisks')) + { + // Disable fields while saving. + $form->setFieldAttribute('causesrisks', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('causesrisks', 'required', 'false'); + } + } // Modify the form based on Edit Percentfemale access controls. if ($id != 0 && (!$user->authorise('company.edit.percentfemale', 'com_costbenefitprojection.company.' . (int) $id)) || ($id == 0 && !$user->authorise('company.edit.percentfemale', 'com_costbenefitprojection'))) @@ -578,22 +595,6 @@ class CostbenefitprojectionModelCompany extends JModelAdmin $form->setFieldAttribute('percentfemale', 'required', 'false'); } } - // Modify the form based on Edit Causesrisks access controls. - if ($id != 0 && (!$user->authorise('company.edit.causesrisks', 'com_costbenefitprojection.company.' . (int) $id)) - || ($id == 0 && !$user->authorise('company.edit.causesrisks', 'com_costbenefitprojection'))) - { - // Disable fields for display. - $form->setFieldAttribute('causesrisks', 'disabled', 'true'); - // Disable fields for display. - $form->setFieldAttribute('causesrisks', 'readonly', 'true'); - if (!$form->getValue('causesrisks')) - { - // Disable fields while saving. - $form->setFieldAttribute('causesrisks', 'filter', 'unset'); - // Disable fields while saving. - $form->setFieldAttribute('causesrisks', 'required', 'false'); - } - } // Modify the form based on Edit Datayear access controls. if ($id != 0 && (!$user->authorise('company.edit.datayear', 'com_costbenefitprojection.company.' . (int) $id)) || ($id == 0 && !$user->authorise('company.edit.datayear', 'com_costbenefitprojection'))) @@ -721,23 +722,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin { // Check specific edit permission then general edit permission. $user = JFactory::getUser(); - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; - if (!$user->authorise('core.options', 'com_costbenefitprojection')) - { - // make absolutely sure that this company can be edited - $companies = CostbenefitprojectionHelper::hisCompanies($user->id); - if (!CostbenefitprojectionHelper::checkArray($companies) || !in_array($recordId,$companies)) - { - return false; - } - } - // ensure lockdown - $userIs = CostbenefitprojectionHelper::userIs($user->id); - if (1 != $userIs && ! CostbenefitprojectionHelper::accessCompany($recordId)) - { - // this company is locked - return false; - } + return $user->authorise('company.edit', 'com_costbenefitprojection.company.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('company.edit', 'com_costbenefitprojection'); } @@ -885,6 +870,26 @@ class CostbenefitprojectionModelCompany extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -1001,8 +1006,6 @@ class CostbenefitprojectionModelCompany extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('company'); } @@ -1056,7 +1059,6 @@ class CostbenefitprojectionModelCompany extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -1066,17 +1068,11 @@ class CostbenefitprojectionModelCompany extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('company.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -1086,7 +1082,6 @@ class CostbenefitprojectionModelCompany extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -1097,7 +1092,11 @@ class CostbenefitprojectionModelCompany extends JModelAdmin } } - $this->table->name = $this->generateUniqe('name',$this->table->name); + // Only for strings + if (CostbenefitprojectionHelper::checkString($this->table->name) && !is_numeric($this->table->name)) + { + $this->table->name = $this->generateUniqe('name',$this->table->name); + } // insert all set values if (CostbenefitprojectionHelper::checkArray($values)) @@ -1179,8 +1178,6 @@ class CostbenefitprojectionModelCompany extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('company'); } @@ -1233,7 +1230,6 @@ class CostbenefitprojectionModelCompany extends JModelAdmin if (!$this->user->authorise('company.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -1244,7 +1240,6 @@ class CostbenefitprojectionModelCompany extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -1261,7 +1256,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -1337,57 +1332,57 @@ class CostbenefitprojectionModelCompany extends JModelAdmin $data['causesrisks'] = (string) json_encode($data['causesrisks']); } - // Get the advanced encription key. - $advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced'); - // Get the encription object - $advanced = new FOFEncryptAes($advancedkey, 256); + // Get the whmcs encryption key. + $whmcskey = CostbenefitprojectionHelper::getCryptKey('whmcs'); + // Get the encryption object + $whmcs = new FOFEncryptAes($whmcskey); - // Encript data medical_turnovers_females. - if (isset($data['medical_turnovers_females']) && $advancedkey) + // Encrypt data medical_turnovers_males. + if (isset($data['medical_turnovers_males']) && $whmcskey) { - $data['medical_turnovers_females'] = $advanced->encryptString($data['medical_turnovers_females']); + $data['medical_turnovers_males'] = $whmcs->encryptString($data['medical_turnovers_males']); } - // Encript data females. - if (isset($data['females']) && $advancedkey) + // Encrypt data females. + if (isset($data['females']) && $whmcskey) { - $data['females'] = $advanced->encryptString($data['females']); + $data['females'] = $whmcs->encryptString($data['females']); } - // Encript data sick_leave_males. - if (isset($data['sick_leave_males']) && $advancedkey) + // Encrypt data sick_leave_males. + if (isset($data['sick_leave_males']) && $whmcskey) { - $data['sick_leave_males'] = $advanced->encryptString($data['sick_leave_males']); + $data['sick_leave_males'] = $whmcs->encryptString($data['sick_leave_males']); } - // Encript data medical_turnovers_males. - if (isset($data['medical_turnovers_males']) && $advancedkey) + // Encrypt data medical_turnovers_females. + if (isset($data['medical_turnovers_females']) && $whmcskey) { - $data['medical_turnovers_males'] = $advanced->encryptString($data['medical_turnovers_males']); + $data['medical_turnovers_females'] = $whmcs->encryptString($data['medical_turnovers_females']); } - // Encript data total_salary. - if (isset($data['total_salary']) && $advancedkey) + // Encrypt data sick_leave_females. + if (isset($data['sick_leave_females']) && $whmcskey) { - $data['total_salary'] = $advanced->encryptString($data['total_salary']); + $data['sick_leave_females'] = $whmcs->encryptString($data['sick_leave_females']); } - // Encript data sick_leave_females. - if (isset($data['sick_leave_females']) && $advancedkey) + // Encrypt data total_salary. + if (isset($data['total_salary']) && $whmcskey) { - $data['sick_leave_females'] = $advanced->encryptString($data['sick_leave_females']); + $data['total_salary'] = $whmcs->encryptString($data['total_salary']); } - // Encript data total_healthcare. - if (isset($data['total_healthcare']) && $advancedkey) + // Encrypt data total_healthcare. + if (isset($data['total_healthcare']) && $whmcskey) { - $data['total_healthcare'] = $advanced->encryptString($data['total_healthcare']); + $data['total_healthcare'] = $whmcs->encryptString($data['total_healthcare']); } - // Encript data males. - if (isset($data['males']) && $advancedkey) + // Encrypt data males. + if (isset($data['males']) && $whmcskey) { - $data['males'] = $advanced->encryptString($data['males']); + $data['males'] = $whmcs->encryptString($data['males']); } // make sure new company does not get locked @@ -1406,7 +1401,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -1451,9 +1446,9 @@ class CostbenefitprojectionModelCompany extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title * - * @param string $title The title. + * @param string $title The title. * * @return array Contains the modified title and alias. * diff --git a/admin/models/companyresults.php b/admin/models/companyresults.php index 6b2cc00a..b810748d 100644 --- a/admin/models/companyresults.php +++ b/admin/models/companyresults.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 60 of this MVC + @build 14th October, 2017 + @created 13th August, 2015 @package Cost Benefit Projection @subpackage companyresults.php @author Llewellyn van der Merwe @@ -40,11 +40,11 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem * * @var strings */ - protected $user; - protected $userId; - protected $guest; - protected $groups; - protected $levels; + protected $user; + protected $userId; + protected $guest; + protected $groups; + protected $levels; protected $app; protected $input; protected $uikitComp; @@ -65,10 +65,10 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem */ protected function populateState() { - $this->app = JFactory::getApplication(); - $this->input = $this->app->input; + $this->app = JFactory::getApplication(); + $this->input = $this->app->input; // Get the item main id - $id = $this->input->getInt('id', null); + $id = $this->input->getInt('id', null); $this->setState('companyresults.id', $id); // Load the parameters. @@ -85,21 +85,21 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem public function getItem($pk = null) { $this->user = JFactory::getUser(); - // check if this user has permission to access item - if (!$this->user->authorise('companyresults.access', 'com_costbenefitprojection')) - { + // check if this user has permission to access item + if (!$this->user->authorise('companyresults.access', 'com_costbenefitprojection')) + { $app = JFactory::getApplication(); $app->enqueueMessage(JText::_('Not authorised!'), 'error'); - // redirect away if not a correct (TODO for now we go to default view) + // redirect away if not a correct to cPanel/default view $app->redirect('index.php?option=com_costbenefitprojection'); return false; - } - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->initSet = true; + } + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; $pk = (!empty($pk)) ? $pk : (int) $this->getState('companyresults.id'); @@ -109,7 +109,7 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem $companies = CostbenefitprojectionHelper::hisCompanies($this->userId); if (!CostbenefitprojectionHelper::checkArray($companies) || !in_array($pk,$companies)) { - JError::raiseWarning(500, JText::_('Access denied!')); + JError::raiseWarning(500, JText::_('COM_COSTBENEFITPROJECTION_ACCESS_DENIED')); // redirect away if not a correct (TODO for now we go to default view) $app = JFactory::getApplication(); if ($app->isAdmin()) @@ -134,10 +134,10 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem try { - // Get the advanced encription. - $advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced'); - // Get the encription object. - $advanced = new FOFEncryptAes($advancedkey, 256); + // Get the whmcs encryption. + $whmcskey = CostbenefitprojectionHelper::getCryptKey('whmcs'); + // Get the encryption object. + $whmcs = new FOFEncryptAes($whmcskey); // Get a db connection. $db = JFactory::getDbo(); @@ -176,58 +176,64 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem $app->redirect('index.php?option=com_costbenefitprojection'); return false; } - if (!empty($data->medical_turnovers_females) && $advancedkey && !is_numeric($data->medical_turnovers_females) && $data->medical_turnovers_females === base64_encode(base64_decode($data->medical_turnovers_females, true))) + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); + if (!empty($data->medical_turnovers_males) && $whmcskey && !is_numeric($data->medical_turnovers_males) && $data->medical_turnovers_males === base64_encode(base64_decode($data->medical_turnovers_males, true))) { - // Decode medical_turnovers_females - $data->medical_turnovers_females = rtrim($advanced->decryptString($data->medical_turnovers_females), "\0"); + // Decode medical_turnovers_males + $data->medical_turnovers_males = rtrim($whmcs->decryptString($data->medical_turnovers_males), "\0"); } - if (!empty($data->females) && $advancedkey && !is_numeric($data->females) && $data->females === base64_encode(base64_decode($data->females, true))) + if (!empty($data->females) && $whmcskey && !is_numeric($data->females) && $data->females === base64_encode(base64_decode($data->females, true))) { // Decode females - $data->females = rtrim($advanced->decryptString($data->females), "\0"); + $data->females = rtrim($whmcs->decryptString($data->females), "\0"); } - if (!empty($data->sick_leave_males) && $advancedkey && !is_numeric($data->sick_leave_males) && $data->sick_leave_males === base64_encode(base64_decode($data->sick_leave_males, true))) - { - // Decode sick_leave_males - $data->sick_leave_males = rtrim($advanced->decryptString($data->sick_leave_males), "\0"); - } - if (CostbenefitprojectionHelper::checkString($data->causesrisks)) + if (CostbenefitprojectionHelper::checkJson($data->causesrisks)) { // Decode causesrisks $data->causesrisks = json_decode($data->causesrisks, true); } - if (!empty($data->medical_turnovers_males) && $advancedkey && !is_numeric($data->medical_turnovers_males) && $data->medical_turnovers_males === base64_encode(base64_decode($data->medical_turnovers_males, true))) + if (!empty($data->sick_leave_males) && $whmcskey && !is_numeric($data->sick_leave_males) && $data->sick_leave_males === base64_encode(base64_decode($data->sick_leave_males, true))) { - // Decode medical_turnovers_males - $data->medical_turnovers_males = rtrim($advanced->decryptString($data->medical_turnovers_males), "\0"); + // Decode sick_leave_males + $data->sick_leave_males = rtrim($whmcs->decryptString($data->sick_leave_males), "\0"); } - if (!empty($data->total_salary) && $advancedkey && !is_numeric($data->total_salary) && $data->total_salary === base64_encode(base64_decode($data->total_salary, true))) + if (!empty($data->medical_turnovers_females) && $whmcskey && !is_numeric($data->medical_turnovers_females) && $data->medical_turnovers_females === base64_encode(base64_decode($data->medical_turnovers_females, true))) { - // Decode total_salary - $data->total_salary = rtrim($advanced->decryptString($data->total_salary), "\0"); + // Decode medical_turnovers_females + $data->medical_turnovers_females = rtrim($whmcs->decryptString($data->medical_turnovers_females), "\0"); } - if (!empty($data->sick_leave_females) && $advancedkey && !is_numeric($data->sick_leave_females) && $data->sick_leave_females === base64_encode(base64_decode($data->sick_leave_females, true))) + if (!empty($data->sick_leave_females) && $whmcskey && !is_numeric($data->sick_leave_females) && $data->sick_leave_females === base64_encode(base64_decode($data->sick_leave_females, true))) { // Decode sick_leave_females - $data->sick_leave_females = rtrim($advanced->decryptString($data->sick_leave_females), "\0"); + $data->sick_leave_females = rtrim($whmcs->decryptString($data->sick_leave_females), "\0"); } - if (!empty($data->total_healthcare) && $advancedkey && !is_numeric($data->total_healthcare) && $data->total_healthcare === base64_encode(base64_decode($data->total_healthcare, true))) + if (!empty($data->total_salary) && $whmcskey && !is_numeric($data->total_salary) && $data->total_salary === base64_encode(base64_decode($data->total_salary, true))) + { + // Decode total_salary + $data->total_salary = rtrim($whmcs->decryptString($data->total_salary), "\0"); + } + if (!empty($data->total_healthcare) && $whmcskey && !is_numeric($data->total_healthcare) && $data->total_healthcare === base64_encode(base64_decode($data->total_healthcare, true))) { // Decode total_healthcare - $data->total_healthcare = rtrim($advanced->decryptString($data->total_healthcare), "\0"); + $data->total_healthcare = rtrim($whmcs->decryptString($data->total_healthcare), "\0"); } - if (!empty($data->males) && $advancedkey && !is_numeric($data->males) && $data->males === base64_encode(base64_decode($data->males, true))) + if (!empty($data->males) && $whmcskey && !is_numeric($data->males) && $data->males === base64_encode(base64_decode($data->males, true))) { // Decode males - $data->males = rtrim($advanced->decryptString($data->males), "\0"); + $data->males = rtrim($whmcs->decryptString($data->males), "\0"); } - if (CostbenefitprojectionHelper::checkString($data->country_causesrisks)) + if (CostbenefitprojectionHelper::checkJson($data->country_causesrisks)) { // Decode country_causesrisks $data->country_causesrisks = json_decode($data->country_causesrisks, true); } - // Make sure the content prepare plugins fire on country_publicaddress. - $data->country_publicaddress = JHtml::_('content.prepare',$data->country_publicaddress); + // Make sure the content prepare plugins fire on country_publicaddress + $_country_publicaddress = new stdClass(); + $_country_publicaddress->text =& $data->country_publicaddress; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (country_publicaddress) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.companyresults.country_publicaddress', &$_country_publicaddress, &$this->params, 0)); // Checking if country_publicaddress has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($data->country_publicaddress,$this->uikitComp); // set the global causesrisks value. @@ -304,7 +310,9 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem { return false; } + // Get where b.published is 1 $query->where('b.published = 1'); + // Get where b.year is $this->a_datayear $query->where('b.year = ' . $db->quote($this->a_datayear)); $query->order('b.ordering ASC'); @@ -315,6 +323,9 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); return $db->loadObjectList(); } return false; @@ -340,6 +351,7 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem array('id','causerisk','reference','yld_scaling_factor_males','yld_scaling_factor_females','mortality_scaling_factor_males','mortality_scaling_factor_females','presenteeism_scaling_factor_males','presenteeism_scaling_factor_females','health_scaling_factor','published'))); $query->from($db->quoteName('#__costbenefitprojection_scaling_factor', 'c')); $query->where('c.company = ' . $db->quote($id)); + // Get where c.published is 1 $query->where('c.published = 1'); $query->order('c.ordering ASC'); @@ -350,13 +362,19 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); $items = $db->loadObjectList(); // Convert the parameter fields into objects. foreach ($items as $nr => &$item) { - // Make sure the content prepare plugins fire on reference. - $item->reference = JHtml::_('content.prepare',$item->reference); + // Make sure the content prepare plugins fire on reference + $_reference = new stdClass(); + $_reference->text =& $item->reference; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (reference) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.companyresults.reference', &$_reference, &$this->params, 0)); // Checking if reference has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp); } @@ -385,6 +403,7 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem array('id','name','type','coverage','duration','share','description','reference','intervention','published','created_by','modified_by','created','modified'))); $query->from($db->quoteName('#__costbenefitprojection_intervention', 'd')); $query->where('d.company = ' . $db->quote($id)); + // Get where d.published is 1 $query->where('d.published = 1'); $query->order('d.ordering ASC'); @@ -395,13 +414,19 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); $items = $db->loadObjectList(); // Convert the parameter fields into objects. foreach ($items as $nr => &$item) { - // Make sure the content prepare plugins fire on reference. - $item->reference = JHtml::_('content.prepare',$item->reference); + // Make sure the content prepare plugins fire on reference + $_reference = new stdClass(); + $_reference->text =& $item->reference; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (reference) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.companyresults.reference', &$_reference, &$this->params, 0)); // Checking if reference has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp); } @@ -432,7 +457,7 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // Check if $causesrisks is an array with values. $array = $causesrisks; - if (isset($array) && CostbenefitprojectionHelper::checkArray($array)) + if (isset($array) && CostbenefitprojectionHelper::checkArray($array, true)) { $query->where('g.id IN (' . implode(',', $array) . ')'); } @@ -448,6 +473,9 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); return $db->loadObjectList(); } return false; @@ -483,7 +511,9 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem { return false; } + // Get where bb.published is 1 $query->where('bb.published = 1'); + // Get where bb.year is $this->e_datayear $query->where('bb.year = ' . $db->quote($this->e_datayear)); $query->order('bb.ordering ASC'); @@ -494,6 +524,9 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); return $db->loadObjectList(); } return false; @@ -521,7 +554,7 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // Check if $causesrisks is an array with values. $array = $causesrisks; - if (isset($array) && CostbenefitprojectionHelper::checkArray($array)) + if (isset($array) && CostbenefitprojectionHelper::checkArray($array, true)) { $query->where('gg.id IN (' . implode(',', $array) . ')'); } @@ -537,13 +570,19 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); $items = $db->loadObjectList(); // Convert the parameter fields into objects. foreach ($items as $nr => &$item) { - // Make sure the content prepare plugins fire on description. - $item->description = JHtml::_('content.prepare',$item->description); + // Make sure the content prepare plugins fire on description + $_description = new stdClass(); + $_description->text =& $item->description; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (description) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.companyresults.description', &$_description, &$this->params, 0)); // Checking if description has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp); } @@ -572,6 +611,7 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem array('id','name','type','coverage','duration','share','description','reference','intervention','published','created_by','modified_by','created','modified'))); $query->from($db->quoteName('#__costbenefitprojection_intervention', 'dd')); $query->where('dd.country = ' . $db->quote($country)); + // Get where dd.published is 1 $query->where('dd.published = 1'); // Reset the query using our newly populated query object. @@ -581,17 +621,26 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem // check if there was data returned if ($db->getNumRows()) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); $items = $db->loadObjectList(); // Convert the parameter fields into objects. foreach ($items as $nr => &$item) { - // Make sure the content prepare plugins fire on description. - $item->description = JHtml::_('content.prepare',$item->description); + // Make sure the content prepare plugins fire on description + $_description = new stdClass(); + $_description->text =& $item->description; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (description) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.companyresults.description', &$_description, &$this->params, 0)); + // Make sure the content prepare plugins fire on reference + $_reference = new stdClass(); + $_reference->text =& $item->reference; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (reference) to context + $this->_dispatcher->trigger("onContentPrepare", array('com_costbenefitprojection.companyresults.reference', &$_reference, &$this->params, 0)); // Checking if description has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp); - // Make sure the content prepare plugins fire on reference. - $item->reference = JHtml::_('content.prepare',$item->reference); // Checking if reference has uikit components that must be loaded. $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp); } diff --git a/admin/models/costbenefitprojection.php b/admin/models/costbenefitprojection.php index c99f0457..237df016 100644 --- a/admin/models/costbenefitprojection.php +++ b/admin/models/costbenefitprojection.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage costbenefitprojection.php @@ -31,16 +31,18 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList { public function getIcons() { - // load user for access menus - $user = JFactory::getUser(); - // reset icon array + // load user for access menus + $user = JFactory::getUser(); + // reset icon array $icons = array(); - // view groups array + // view groups array $viewGroups = array( 'main' => array('png.company.add', 'png.companies', 'png.service_provider.add', 'png.service_providers', 'png.countries', 'png.causerisk.add', 'png.causesrisks', 'png.health_data_sets', 'png.scaling_factor.add', 'png.scaling_factors', 'png.intervention.add', 'png.interventions', 'png.currencies', 'png.help_documents') ); // view access array $viewAccess = array( + 'companyresults.access' => 'companyresults.access', + 'combinedresults.access' => 'combinedresults.access', 'combinedresults.dashboard_list' => 'combinedresults.dashboard_list', 'company.create' => 'company.create', 'companies.access' => 'company.access', @@ -92,93 +94,109 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList 'help_document.access' => 'help_document.access', 'help_documents.submenu' => 'help_document.submenu', 'help_documents.dashboard_list' => 'help_document.dashboard_list'); + // loop over the $views foreach($viewGroups as $group => $views) - { + { $i = 0; if (CostbenefitprojectionHelper::checkArray($views)) - { + { foreach($views as $view) { $add = false; - if (strpos($view,'.') !== false) - { - $dwd = explode('.', $view); - if (count($dwd) == 3) - { - list($type, $name, $action) = $dwd; - } - elseif (count($dwd) == 2) - { - list($type, $name) = $dwd; - $action = false; - } - if ($action) - { - $viewName = $name; - switch($action) - { - case 'add': - $url ='index.php?option=com_costbenefitprojection&view='.$name.'&layout=edit'; - $image = $name.'_'.$action.'.'.$type; - $alt = $name.' '.$action; - $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U').'_ADD'; - $add = true; - break; - default: - $url = 'index.php?option=com_categories&view=categories&extension=com_costbenefitprojection.'.$name; - $image = $name.'_'.$action.'.'.$type; - $alt = $name.' '.$action; - $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U').'_'.CostbenefitprojectionHelper::safeString($action,'U'); - break; - } - } - else - { - $viewName = $name; - $alt = $name; - $url = 'index.php?option=com_costbenefitprojection&view='.$name; - $image = $name.'.'.$type; - $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U'); - $hover = false; - } - } - else - { - $viewName = $view; - $alt = $view; - $url = 'index.php?option=com_costbenefitprojection&view='.$view; - $image = $view.'.png'; - $name = ucwords($view).'

'; - $hover = false; - } - // first make sure the view access is set - if (CostbenefitprojectionHelper::checkArray($viewAccess)) - { + // external views (links) + if (strpos($view,'||') !== false) + { + $dwd = explode('||', $view); + if (count($dwd) == 3) + { + list($type, $name, $url) = $dwd; + $viewName = $name; + $alt = $name; + $url = $url; + $image = $name.'.'.$type; + $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U'); + } + } + // internal views + elseif (strpos($view,'.') !== false) + { + $dwd = explode('.', $view); + if (count($dwd) == 3) + { + list($type, $name, $action) = $dwd; + } + elseif (count($dwd) == 2) + { + list($type, $name) = $dwd; + $action = false; + } + if ($action) + { + $viewName = $name; + switch($action) + { + case 'add': + $url = 'index.php?option=com_costbenefitprojection&view='.$name.'&layout=edit'; + $image = $name.'_'.$action.'.'.$type; + $alt = $name.' '.$action; + $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U').'_ADD'; + $add = true; + break; + default: + $url = 'index.php?option=com_categories&view=categories&extension=com_costbenefitprojection.'.$name; + $image = $name.'_'.$action.'.'.$type; + $alt = $name.' '.$action; + $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U').'_'.CostbenefitprojectionHelper::safeString($action,'U'); + break; + } + } + else + { + $viewName = $name; + $alt = $name; + $url = 'index.php?option=com_costbenefitprojection&view='.$name; + $image = $name.'.'.$type; + $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U'); + $hover = false; + } + } + else + { + $viewName = $view; + $alt = $view; + $url = 'index.php?option=com_costbenefitprojection&view='.$view; + $image = $view.'.png'; + $name = ucwords($view).'

'; + $hover = false; + } + // first make sure the view access is set + if (CostbenefitprojectionHelper::checkArray($viewAccess)) + { // setup some defaults $dashboard_add = false; $dashboard_list = false; - $accessTo = ''; - $accessAdd = ''; - // acces checking start - $accessCreate = (isset($viewAccess[$viewName.'.create'])) ? CostbenefitprojectionHelper::checkString($viewAccess[$viewName.'.create']):false; - $accessAccess = (isset($viewAccess[$viewName.'.access'])) ? CostbenefitprojectionHelper::checkString($viewAccess[$viewName.'.access']):false; + $accessTo = ''; + $accessAdd = ''; + // acces checking start + $accessCreate = (isset($viewAccess[$viewName.'.create'])) ? CostbenefitprojectionHelper::checkString($viewAccess[$viewName.'.create']):false; + $accessAccess = (isset($viewAccess[$viewName.'.access'])) ? CostbenefitprojectionHelper::checkString($viewAccess[$viewName.'.access']):false; // set main controllers $accessDashboard_add = (isset($viewAccess[$viewName.'.dashboard_add'])) ? CostbenefitprojectionHelper::checkString($viewAccess[$viewName.'.dashboard_add']):false; $accessDashboard_list = (isset($viewAccess[$viewName.'.dashboard_list'])) ? CostbenefitprojectionHelper::checkString($viewAccess[$viewName.'.dashboard_list']):false; - // check for adding access - if ($add && $accessCreate) - { - $accessAdd = $viewAccess[$viewName.'.create']; - } - elseif ($add) - { - $accessAdd = 'core.create'; - } - // check if acces to view is set - if ($accessAccess) - { - $accessTo = $viewAccess[$viewName.'.access']; - } + // check for adding access + if ($add && $accessCreate) + { + $accessAdd = $viewAccess[$viewName.'.create']; + } + elseif ($add) + { + $accessAdd = 'core.create'; + } + // check if acces to view is set + if ($accessAccess) + { + $accessTo = $viewAccess[$viewName.'.access']; + } // set main access controllers if ($accessDashboard_add) { @@ -188,65 +206,65 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList { $dashboard_list = $user->authorise($viewAccess[$viewName.'.dashboard_list'], 'com_costbenefitprojection'); } - if (CostbenefitprojectionHelper::checkString($accessAdd) && CostbenefitprojectionHelper::checkString($accessTo)) - { - // check access - if($user->authorise($accessAdd, 'com_costbenefitprojection') && $user->authorise($accessTo, 'com_costbenefitprojection') && $dashboard_add) - { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; - } - } - elseif (CostbenefitprojectionHelper::checkString($accessTo)) - { - // check access - if($user->authorise($accessTo, 'com_costbenefitprojection') && $dashboard_list) - { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; - } - } - elseif (CostbenefitprojectionHelper::checkString($accessAdd)) - { - // check access - if($user->authorise($accessAdd, 'com_costbenefitprojection') && $dashboard_add) - { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; - } - } - else - { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; - } - } - else - { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; - } - $i++; - } - } - else - { - $icons[$group][$i] = false; + if (CostbenefitprojectionHelper::checkString($accessAdd) && CostbenefitprojectionHelper::checkString($accessTo)) + { + // check access + if($user->authorise($accessAdd, 'com_costbenefitprojection') && $user->authorise($accessTo, 'com_costbenefitprojection') && $dashboard_add) + { + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; + } + } + elseif (CostbenefitprojectionHelper::checkString($accessTo)) + { + // check access + if($user->authorise($accessTo, 'com_costbenefitprojection') && $dashboard_list) + { + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; + } + } + elseif (CostbenefitprojectionHelper::checkString($accessAdd)) + { + // check access + if($user->authorise($accessAdd, 'com_costbenefitprojection') && $dashboard_add) + { + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; + } + } + else + { + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; + } + } + else + { + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; + } + $i++; + } + } + else + { + $icons[$group][$i] = false; } } return $icons; @@ -581,4 +599,152 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList } return false; } + + public function getGithub() + { + $document = JFactory::getDocument(); + $document->addScript(JURI::root() . "media/com_costbenefitprojection/js/marked.js"); + $document->addScriptDeclaration(' + var token = "'.JSession::getFormToken().'"; + var urlToGetAllOpenIssues = "https://api.github.com/repos/namibia/CBP-Joomla-3-Component/issues?state=open&page=1&per_page=5"; + var urlToGetAllClosedIssues = "https://api.github.com/repos/namibia/CBP-Joomla-3-Component/issues?state=closed&page=1&per_page=5"; + jQuery(document).ready(function () { + jQuery.getJSON(urlToGetAllOpenIssues, function (openissues) { + jQuery("#openissues").html(""); + jQuery.each(openissues, function (i, issue) { + jQuery("#openissues") + .append("

" + issue.title + "

") + .append("#" + issue.number + " '.JText::_('COM_COSTBENEFITPROJECTION_OPENED_BY').' " + issue.user.login + "") + .append(marked(issue.body)) + .append("'.JText::_('COM_COSTBENEFITPROJECTION_RESPOND_TO_THIS_ISSUE_ON_GITHUB').'...
"); + }); + }); + jQuery.getJSON(urlToGetAllClosedIssues, function (closedissues) { + jQuery("#closedissues").html(""); + jQuery.each(closedissues, function (i, issue) { + jQuery("#closedissues") + .append("

" + issue.title + "

") + .append("#" + issue.number + " '.JText::_('COM_COSTBENEFITPROJECTION_OPENED_BY').' " + issue.user.login + "") + .append(marked(issue.body)) + .append("'.JText::_('COM_COSTBENEFITPROJECTION_REVIEW_THIS_ISSUE_ON_GITHUB').'...
"); + }); + }); + }); + // to check is READ/NEW + function getIS(type,notice){ + if(type == 1){ + var getUrl = "index.php?option=com_costbenefitprojection&task=ajax.isNew&format=json"; + } else if (type == 2) { + var getUrl = "index.php?option=com_costbenefitprojection&task=ajax.isRead&format=json"; + } + if(token.length > 0 && notice.length){ + var request = "token="+token+"¬ice="+notice; + } + return jQuery.ajax({ + type: "POST", + url: getUrl, + dataType: "jsonp", + data: request, + jsonp: "callback" + }); + } + // nice little dot trick :) + jQuery(document).ready( function($) { + var x=0; + setInterval(function() { + var dots = ""; + x++; + for (var y=0; y < x%8; y++) { + dots+="."; + } + $(".loading-dots").text(dots); + } , 500); + });'); + $create = '
'; + $moreopen = ''.JText::_('COM_COSTBENEFITPROJECTION_VIEW_MORE_ISSUES_ON_GITHUB').'...'; + $moreclosed = ''.JText::_('COM_COSTBENEFITPROJECTION_VIEW_MORE_ISSUES_ON_GITHUB').'...'; + + return (object) array( + 'openissues' => $create.'
'.JText::_('COM_COSTBENEFITPROJECTION_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING').'..
'.$moreopen, + 'closedissues' => $create.'
'.JText::_('COM_COSTBENEFITPROJECTION_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING').'..
'.$moreclosed + ); + } + + public function getReadme() + { + $document = JFactory::getDocument(); + $document->addScriptDeclaration(' + var getreadme = "'. JURI::root() . 'administrator/components/com_costbenefitprojection/README.txt"; + jQuery(document).ready(function () { + jQuery.get(getreadme) + .success(function(readme) { + jQuery("#readme-md").html(marked(readme)); + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery("#readme-md").html("'.JText::_('COM_COSTBENEFITPROJECTION_PLEASE_CHECK_AGAIN_LATTER').'"); + }); + });'); + + return '
'.JText::_('COM_COSTBENEFITPROJECTION_THE_README_IS_LOADING').'..
'; + } + + public function getWiki() + { + $document = JFactory::getDocument(); + $document->addScriptDeclaration(' + var gewiki = "https://raw.githubusercontent.com/wiki/namibia/CBP-Joomla-3-Component/Home.md"; + jQuery(document).ready(function () { + jQuery.get(gewiki) + .success(function(wiki) { + jQuery("#wiki-md").html(marked(wiki)); + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery("#wiki-md").html("'.JText::_('COM_COSTBENEFITPROJECTION_PLEASE_CHECK_AGAIN_LATTER').'"); + }); + });'); + + return '
'.JText::_('COM_COSTBENEFITPROJECTION_THE_WIKI_IS_LOADING').'..
'; + } + + public function getNoticeboard() + { + $document = JFactory::getDocument(); + $document->addScriptDeclaration(' + var noticeboard = "https://www.vdm.io/costbenefitprojection-noticeboard-md"; + jQuery(document).ready(function () { + jQuery.get(noticeboard) + .success(function(board) { + if (board.length > 5) { + jQuery("#noticeboard-md").html(marked(board)); + getIS(1,board).done(function(result) { + if (result){ + jQuery("#cpanel_tabTabs a").each(function() { + if (this.href.indexOf("#vast_development_method") >= 0) { + var textVDM = jQuery(this).text(); + jQuery(this).html("1 "+textVDM); + jQuery(this).attr("id","vdm-new-notice"); + jQuery("#vdm-new-notice").click(function() { + getIS(2,board).done(function(result) { + if (result) { + jQuery(".vdm-new-notice").fadeOut(500); + } + }); + }); + } + }); + } + }); + } else { + jQuery("#noticeboard-md").html("'.JText::_('COM_COSTBENEFITPROJECTION_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'"); + } + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery("#noticeboard-md").html("'.JText::_('COM_COSTBENEFITPROJECTION_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'"); + }); + });'); + + return '
'.JText::_('COM_COSTBENEFITPROJECTION_THE_NOTICE_BOARD_IS_LOADING').'..
'; + } } diff --git a/admin/models/countries.php b/admin/models/countries.php index d7fae11d..f16037d5 100644 --- a/admin/models/countries.php +++ b/admin/models/countries.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 52 of this MVC + @build 25th October, 2017 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage countries.php @author Llewellyn van der Merwe @@ -132,7 +132,7 @@ class CostbenefitprojectionModelCountries extends JModelList } } - } + } // return items return $items; @@ -216,15 +216,15 @@ class CostbenefitprojectionModelCountries extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); - $query->where('(a.name LIKE '.$search.' OR a.user LIKE '.$search.' OR g.name LIKE '.$search.' OR a.currency LIKE '.$search.' OR h.name LIKE '.$search.' OR a.codethree LIKE '.$search.' OR a.codetwo LIKE '.$search.' OR a.working_days LIKE '.$search.' OR a.datayear LIKE '.$search.' OR a.alias LIKE '.$search.')'); + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.name LIKE '.$search.' OR a.user LIKE '.$search.' OR g.name LIKE '.$search.' OR a.currency LIKE '.$search.' OR h.name LIKE '.$search.' OR a.codethree LIKE '.$search.' OR a.codetwo LIKE '.$search.' OR a.working_days LIKE '.$search.' OR a.alias LIKE '.$search.' OR a.datayear LIKE '.$search.')'); } } // Filter by currency. if ($currency = $this->getState('filter.currency')) { - $query->where('a.currency = ' . $db->quote($db->escape($currency, true))); + $query->where('a.currency = ' . $db->quote($db->escape($currency))); } // Add the list ordering clause. diff --git a/admin/models/country.php b/admin/models/country.php index 71efda1f..066380be 100644 --- a/admin/models/country.php +++ b/admin/models/country.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 52 of this MVC + @build 25th October, 2017 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage country.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -227,7 +227,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin public function selectionTranslationVwfinterventions($value,$name) { // Array of type language strings - if ($name == 'type') + if ($name === 'type') { $typeArray = array( 1 => 'COM_COSTBENEFITPROJECTION_INTERVENTION_SINGLE', @@ -464,7 +464,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin public function selectionTranslationVwhcompanies($value,$name) { // Array of department language strings - if ($name == 'department') + if ($name === 'department') { $departmentArray = array( 1 => 'COM_COSTBENEFITPROJECTION_COMPANY_BASIC', @@ -477,7 +477,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin } } // Array of per language strings - if ($name == 'per') + if ($name === 'per') { $perArray = array( 1 => 'COM_COSTBENEFITPROJECTION_COMPANY_OPEN', @@ -503,7 +503,8 @@ class CostbenefitprojectionModelCountry extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.country', 'country', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -654,17 +655,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin { // Check specific edit permission then general edit permission. $user = JFactory::getUser(); - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; - if (!$user->authorise('core.options', 'com_costbenefitprojection')) - { - // make absolutely sure that this country can be edited - $is = CostbenefitprojectionHelper::userIs($user->id); - $countries = CostbenefitprojectionHelper::hisCountries($user->id); - if ((3 != $is) || !CostbenefitprojectionHelper::checkArray($countries) || !in_array($recordId,$countries)) - { - return false; - } - } + return $user->authorise('country.edit', 'com_costbenefitprojection.country.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('country.edit', 'com_costbenefitprojection'); } @@ -776,6 +767,26 @@ class CostbenefitprojectionModelCountry extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -892,8 +903,6 @@ class CostbenefitprojectionModelCountry extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('country'); } @@ -949,7 +958,6 @@ class CostbenefitprojectionModelCountry extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -959,17 +967,11 @@ class CostbenefitprojectionModelCountry extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('country.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -979,7 +981,6 @@ class CostbenefitprojectionModelCountry extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -989,7 +990,6 @@ class CostbenefitprojectionModelCountry extends JModelAdmin continue; } } - list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values @@ -1072,8 +1072,6 @@ class CostbenefitprojectionModelCountry extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('country'); } @@ -1128,7 +1126,6 @@ class CostbenefitprojectionModelCountry extends JModelAdmin if (!$this->user->authorise('country.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -1139,7 +1136,6 @@ class CostbenefitprojectionModelCountry extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -1156,7 +1152,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -1241,7 +1237,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin } // Alter the name for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { $origTable = clone $this->getTable(); $origTable->load($input->getInt('id')); @@ -1266,7 +1262,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin // Automatic handling of alias for empty fields if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0) { - if ($data['alias'] == null) + if ($data['alias'] == null || empty($data['alias'])) { if (JFactory::getConfig()->get('unicodeslugs') == 1) { @@ -1284,8 +1280,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin $msg = JText::_('COM_COSTBENEFITPROJECTION_COUNTRY_SAVE_WARNING'); } - list($name, $alias) = $this->_generateNewTitle($data['alias'], $data['name']); - $data['alias'] = $alias; + $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { @@ -1295,7 +1290,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -1340,26 +1335,49 @@ class CostbenefitprojectionModelCountry extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title/s & alias. * - * @param string $alias The alias. - * @param string $title The title. + * @param string $alias The alias. + * @param string/array $title The title. * - * @return array Contains the modified title and alias. + * @return array/string Contains the modified title/s and/or alias. * */ - protected function _generateNewTitle($alias, $title) + protected function _generateNewTitle($alias, $title = null) { - // Alter the title & alias + // Alter the title/s & alias $table = $this->getTable(); while ($table->load(array('alias' => $alias))) { - $title = JString::increment($title); + // Check if this is an array of titles + if (CostbenefitprojectionHelper::checkArray($title)) + { + foreach($title as $nr => &$_title) + { + $_title = JString::increment($_title); + } + } + // Make sure we have a title + elseif ($title) + { + $title = JString::increment($title); + } $alias = JString::increment($alias, 'dash'); } - - return array($title, $alias); + // Check if this is an array of titles + if (CostbenefitprojectionHelper::checkArray($title)) + { + $title[] = $alias; + return $title; + } + // Make sure we have a title + elseif ($title) + { + return array($title, $alias); + } + // We only had an alias + return $alias; } } diff --git a/admin/models/currencies.php b/admin/models/currencies.php index b10da1a2..f76bf4ba 100644 --- a/admin/models/currencies.php +++ b/admin/models/currencies.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage currencies.php @author Llewellyn van der Merwe @@ -124,7 +124,7 @@ class CostbenefitprojectionModelCurrencies extends JModelList } } - } + } // return items return $items; @@ -184,7 +184,7 @@ class CostbenefitprojectionModelCurrencies extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); + $search = $db->quote('%' . $db->escape($search) . '%'); $query->where('(a.name LIKE '.$search.' OR a.codethree LIKE '.$search.' OR a.numericcode LIKE '.$search.' OR a.alias LIKE '.$search.')'); } } diff --git a/admin/models/currency.php b/admin/models/currency.php index 7f9c2c5e..8b63c917 100644 --- a/admin/models/currency.php +++ b/admin/models/currency.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage currency.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -110,7 +110,8 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.currency', 'currency', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -373,6 +374,26 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -489,8 +510,6 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('currency'); } @@ -515,7 +534,6 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -525,17 +543,11 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('currency.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -545,7 +557,6 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -555,7 +566,6 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin continue; } } - list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values @@ -638,8 +648,6 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('currency'); } @@ -663,7 +671,6 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin if (!$this->user->authorise('currency.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -674,7 +681,6 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -691,7 +697,7 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -764,7 +770,7 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin } // Alter the name for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { $origTable = clone $this->getTable(); $origTable->load($input->getInt('id')); @@ -789,7 +795,7 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin // Automatic handling of alias for empty fields if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0) { - if ($data['alias'] == null) + if ($data['alias'] == null || empty($data['alias'])) { if (JFactory::getConfig()->get('unicodeslugs') == 1) { @@ -807,8 +813,7 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin $msg = JText::_('COM_COSTBENEFITPROJECTION_CURRENCY_SAVE_WARNING'); } - list($name, $alias) = $this->_generateNewTitle($data['alias'], $data['name']); - $data['alias'] = $alias; + $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { @@ -818,7 +823,7 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -863,26 +868,49 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title/s & alias. * - * @param string $alias The alias. - * @param string $title The title. + * @param string $alias The alias. + * @param string/array $title The title. * - * @return array Contains the modified title and alias. + * @return array/string Contains the modified title/s and/or alias. * */ - protected function _generateNewTitle($alias, $title) + protected function _generateNewTitle($alias, $title = null) { - // Alter the title & alias + // Alter the title/s & alias $table = $this->getTable(); while ($table->load(array('alias' => $alias))) { - $title = JString::increment($title); + // Check if this is an array of titles + if (CostbenefitprojectionHelper::checkArray($title)) + { + foreach($title as $nr => &$_title) + { + $_title = JString::increment($_title); + } + } + // Make sure we have a title + elseif ($title) + { + $title = JString::increment($title); + } $alias = JString::increment($alias, 'dash'); } - - return array($title, $alias); + // Check if this is an array of titles + if (CostbenefitprojectionHelper::checkArray($title)) + { + $title[] = $alias; + return $title; + } + // Make sure we have a title + elseif ($title) + { + return array($title, $alias); + } + // We only had an alias + return $alias; } } diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php new file mode 100644 index 00000000..d0385f1e --- /dev/null +++ b/admin/models/fields/adminviewfolderlist.php @@ -0,0 +1,62 @@ + + @owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + +/-------------------------------------------------------------------------------------------------------/ + Cost Benefit Projection Tool. +/------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminviewfolderlist Form Field class for the Costbenefitprojection component + */ +class JFormFieldAdminviewfolderlist extends JFormFieldList +{ + /** + * The adminviewfolderlist field type. + * + * @var string + */ + public $type = 'adminviewfolderlist'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // get custom folder files + $localfolder = JPATH_COMPONENT_ADMINISTRATOR.'/views'; + // set the default + $options = array(); + // import all needed classes + jimport('joomla.filesystem.folder'); + // now check if there are files in the folder + if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder)) + { + foreach ($folders as $folder) + { + $options[] = JHtml::_('select.option', $folder, CostbenefitprojectionHelper::safeString($folder, 'W')); + } + } + return $options; + } +} diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index 2ea2b0d4..d5984259 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage articles.php @@ -34,106 +34,7 @@ class JFormFieldArticles extends JFormFieldList * * @var string */ - public $type = 'articles'; - /** - * Override to add new button - * - * @return string The field input markup. - * - * @since 3.2 - */ - protected function getInput() - { - // see if we should add buttons - $setButton = $this->getAttribute('button'); - // get html - $html = parent::getInput(); - // if true set button - if ($setButton === 'true') - { - $button = array(); - $script = array(); - $buttonName = $this->getAttribute('name'); - // get the input from url - $jinput = JFactory::getApplication()->input; - // get the view name & id - $values = $jinput->getArray(array( - 'id' => 'int', - 'view' => 'word' - )); - // check if new item - $ref = ''; - $refJ = ''; - if (!is_null($values['id']) && strlen($values['view'])) - { - // only load referal if not new item. - $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; - $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; - } - $user = JFactory::getUser(); - // only add if user allowed to create article - if ($user->authorise('core.create', 'com_costbenefitprojection')) - { - // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' - '; - } - // only add if user allowed to edit article - if (($buttonName == 'article' || $buttonName == 'articles') && $user->authorise('core.edit', 'com_costbenefitprojection')) - { - // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; - // build script - $script[] = " - jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { - e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - function ".$buttonName."Button(value) { - if (value > 0) { - // hide the create button - jQuery('#".$buttonName."Create').hide(); - // show edit button - jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_costbenefitprojection&view=articles&task=article.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); - } else { - // show the create button - jQuery('#".$buttonName."Create').show(); - // hide edit button - jQuery('#".$buttonName."Edit').hide(); - } - }"; - } - // check if button was created for article field. - if (is_array($button) && count($button) > 0) - { - // Load the needed script. - $document = JFactory::getDocument(); - $document->addScriptDeclaration(implode(' ',$script)); - // return the button attached to input field. - return '
' .$html . implode('',$button).'
'; - } - } - return $html; - } + public $type = 'articles'; /** * Method to get a list of options for a list input. diff --git a/admin/models/fields/causesrisks.php b/admin/models/fields/causesrisks.php index f4e47166..71d20aec 100644 --- a/admin/models/fields/causesrisks.php +++ b/admin/models/fields/causesrisks.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage causesrisks.php @@ -34,106 +34,7 @@ class JFormFieldCausesrisks extends JFormFieldList * * @var string */ - public $type = 'causesrisks'; - /** - * Override to add new button - * - * @return string The field input markup. - * - * @since 3.2 - */ - protected function getInput() - { - // see if we should add buttons - $setButton = $this->getAttribute('button'); - // get html - $html = parent::getInput(); - // if true set button - if ($setButton === 'true') - { - $button = array(); - $script = array(); - $buttonName = $this->getAttribute('name'); - // get the input from url - $jinput = JFactory::getApplication()->input; - // get the view name & id - $values = $jinput->getArray(array( - 'id' => 'int', - 'view' => 'word' - )); - // check if new item - $ref = ''; - $refJ = ''; - if (!is_null($values['id']) && strlen($values['view'])) - { - // only load referal if not new item. - $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; - $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; - } - $user = JFactory::getUser(); - // only add if user allowed to create causerisk - if ($user->authorise('causerisk.create', 'com_costbenefitprojection')) - { - // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' - '; - } - // only add if user allowed to edit causerisk - if (($buttonName == 'causerisk' || $buttonName == 'causesrisks') && $user->authorise('causerisk.edit', 'com_costbenefitprojection')) - { - // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; - // build script - $script[] = " - jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { - e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - function ".$buttonName."Button(value) { - if (value > 0) { - // hide the create button - jQuery('#".$buttonName."Create').hide(); - // show edit button - jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_costbenefitprojection&view=causesrisks&task=causerisk.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); - } else { - // show the create button - jQuery('#".$buttonName."Create').show(); - // hide edit button - jQuery('#".$buttonName."Edit').hide(); - } - }"; - } - // check if button was created for causerisk field. - if (is_array($button) && count($button) > 0) - { - // Load the needed script. - $document = JFactory::getDocument(); - $document->addScriptDeclaration(implode(' ',$script)); - // return the button attached to input field. - return '
' .$html . implode('',$button).'
'; - } - } - return $html; - } + public $type = 'causesrisks'; /** * Method to get a list of options for a list input. diff --git a/admin/models/fields/causesriskscheck.php b/admin/models/fields/causesriskscheck.php index c17d169a..45832877 100644 --- a/admin/models/fields/causesriskscheck.php +++ b/admin/models/fields/causesriskscheck.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage causesriskscheck.php diff --git a/admin/models/fields/company.php b/admin/models/fields/company.php index bce2ab0c..a03f7e6a 100644 --- a/admin/models/fields/company.php +++ b/admin/models/fields/company.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage company.php @@ -34,7 +34,8 @@ class JFormFieldCompany extends JFormFieldList * * @var string */ - public $type = 'company'; + public $type = 'company'; + /** * Override to add new button * @@ -55,7 +56,8 @@ class JFormFieldCompany extends JFormFieldList $script = array(); $buttonName = $this->getAttribute('name'); // get the input from url - $jinput = JFactory::getApplication()->input; + $app = JFactory::getApplication(); + $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', @@ -72,7 +74,7 @@ class JFormFieldCompany extends JFormFieldList } $user = JFactory::getUser(); // only add if user allowed to create company - if ($user->authorise('company.create', 'com_costbenefitprojection')) + if ($user->authorise('company.create', 'com_costbenefitprojection') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button $buttonNamee = trim($buttonName); @@ -85,7 +87,7 @@ class JFormFieldCompany extends JFormFieldList '; } // only add if user allowed to edit company - if (($buttonName == 'company' || $buttonName == 'companies') && $user->authorise('company.edit', 'com_costbenefitprojection')) + if (($buttonName === 'company' || $buttonName === 'companies') && $user->authorise('company.edit', 'com_costbenefitprojection') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button $buttonNamee = trim($buttonName); @@ -174,7 +176,7 @@ class JFormFieldCompany extends JFormFieldList $userIs = CostbenefitprojectionHelper::userIs($user->id); if (3 == $userIs || $user->authorise('core.options', 'com_costbenefitprojection')) { - $options[] = JHtml::_('select.option', 0, '-- '.JText::_('A Country').' --'); + $options[] = JHtml::_('select.option', 0, '-- '.JText::_('COM_COSTBENEFITPROJECTION_A_COUNTRY').' --'); } foreach($items as $item) { diff --git a/admin/models/fields/companycheck.php b/admin/models/fields/companycheck.php index 673c78ac..270f3fae 100644 --- a/admin/models/fields/companycheck.php +++ b/admin/models/fields/companycheck.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage companycheck.php diff --git a/admin/models/fields/countries.php b/admin/models/fields/countries.php index a3d56711..3f362389 100644 --- a/admin/models/fields/countries.php +++ b/admin/models/fields/countries.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage countries.php @@ -34,106 +34,7 @@ class JFormFieldCountries extends JFormFieldList * * @var string */ - public $type = 'countries'; - /** - * Override to add new button - * - * @return string The field input markup. - * - * @since 3.2 - */ - protected function getInput() - { - // see if we should add buttons - $setButton = $this->getAttribute('button'); - // get html - $html = parent::getInput(); - // if true set button - if ($setButton === 'true') - { - $button = array(); - $script = array(); - $buttonName = $this->getAttribute('name'); - // get the input from url - $jinput = JFactory::getApplication()->input; - // get the view name & id - $values = $jinput->getArray(array( - 'id' => 'int', - 'view' => 'word' - )); - // check if new item - $ref = ''; - $refJ = ''; - if (!is_null($values['id']) && strlen($values['view'])) - { - // only load referal if not new item. - $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; - $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; - } - $user = JFactory::getUser(); - // only add if user allowed to create country - if ($user->authorise('country.create', 'com_costbenefitprojection')) - { - // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' - '; - } - // only add if user allowed to edit country - if (($buttonName == 'country' || $buttonName == 'countries') && $user->authorise('country.edit', 'com_costbenefitprojection')) - { - // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; - // build script - $script[] = " - jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { - e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - function ".$buttonName."Button(value) { - if (value > 0) { - // hide the create button - jQuery('#".$buttonName."Create').hide(); - // show edit button - jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_costbenefitprojection&view=countries&task=country.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); - } else { - // show the create button - jQuery('#".$buttonName."Create').show(); - // hide edit button - jQuery('#".$buttonName."Edit').hide(); - } - }"; - } - // check if button was created for country field. - if (is_array($button) && count($button) > 0) - { - // Load the needed script. - $document = JFactory::getDocument(); - $document->addScriptDeclaration(implode(' ',$script)); - // return the button attached to input field. - return '
' .$html . implode('',$button).'
'; - } - } - return $html; - } + public $type = 'countries'; /** * Method to get a list of options for a list input. diff --git a/admin/models/fields/countryuser.php b/admin/models/fields/countryuser.php index c27b22fe..1105384a 100644 --- a/admin/models/fields/countryuser.php +++ b/admin/models/fields/countryuser.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage countryuser.php diff --git a/admin/models/fields/currency.php b/admin/models/fields/currency.php index ecbfae0b..a8e69e7c 100644 --- a/admin/models/fields/currency.php +++ b/admin/models/fields/currency.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage currency.php @@ -34,106 +34,7 @@ class JFormFieldCurrency extends JFormFieldList * * @var string */ - public $type = 'currency'; - /** - * Override to add new button - * - * @return string The field input markup. - * - * @since 3.2 - */ - protected function getInput() - { - // see if we should add buttons - $setButton = $this->getAttribute('button'); - // get html - $html = parent::getInput(); - // if true set button - if ($setButton === 'true') - { - $button = array(); - $script = array(); - $buttonName = $this->getAttribute('name'); - // get the input from url - $jinput = JFactory::getApplication()->input; - // get the view name & id - $values = $jinput->getArray(array( - 'id' => 'int', - 'view' => 'word' - )); - // check if new item - $ref = ''; - $refJ = ''; - if (!is_null($values['id']) && strlen($values['view'])) - { - // only load referal if not new item. - $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; - $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; - } - $user = JFactory::getUser(); - // only add if user allowed to create currency - if ($user->authorise('currency.create', 'com_costbenefitprojection')) - { - // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' - '; - } - // only add if user allowed to edit currency - if (($buttonName == 'currency' || $buttonName == 'currencies') && $user->authorise('currency.edit', 'com_costbenefitprojection')) - { - // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; - // build script - $script[] = " - jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { - e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - function ".$buttonName."Button(value) { - if (value > 0) { - // hide the create button - jQuery('#".$buttonName."Create').hide(); - // show edit button - jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_costbenefitprojection&view=currencies&task=currency.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); - } else { - // show the create button - jQuery('#".$buttonName."Create').show(); - // hide edit button - jQuery('#".$buttonName."Edit').hide(); - } - }"; - } - // check if button was created for currency field. - if (is_array($button) && count($button) > 0) - { - // Load the needed script. - $document = JFactory::getDocument(); - $document->addScriptDeclaration(implode(' ',$script)); - // return the button attached to input field. - return '
' .$html . implode('',$button).'
'; - } - } - return $html; - } + public $type = 'currency'; /** * Method to get a list of options for a list input. diff --git a/admin/models/fields/datayear.php b/admin/models/fields/datayear.php index 2337e5e1..49f6f2dd 100644 --- a/admin/models/fields/datayear.php +++ b/admin/models/fields/datayear.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage datayear.php @@ -34,106 +34,7 @@ class JFormFieldDatayear extends JFormFieldList * * @var string */ - public $type = 'datayear'; - /** - * Override to add new button - * - * @return string The field input markup. - * - * @since 3.2 - */ - protected function getInput() - { - // see if we should add buttons - $setButton = $this->getAttribute('button'); - // get html - $html = parent::getInput(); - // if true set button - if ($setButton === 'true') - { - $button = array(); - $script = array(); - $buttonName = $this->getAttribute('name'); - // get the input from url - $jinput = JFactory::getApplication()->input; - // get the view name & id - $values = $jinput->getArray(array( - 'id' => 'int', - 'view' => 'word' - )); - // check if new item - $ref = ''; - $refJ = ''; - if (!is_null($values['id']) && strlen($values['view'])) - { - // only load referal if not new item. - $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; - $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; - } - $user = JFactory::getUser(); - // only add if user allowed to create health_data - if ($user->authorise('health_data.create', 'com_costbenefitprojection')) - { - // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' - '; - } - // only add if user allowed to edit health_data - if (($buttonName == 'health_data' || $buttonName == 'health_data_sets') && $user->authorise('health_data.edit', 'com_costbenefitprojection')) - { - // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; - // build script - $script[] = " - jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { - e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - function ".$buttonName."Button(value) { - if (value > 0) { - // hide the create button - jQuery('#".$buttonName."Create').hide(); - // show edit button - jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_costbenefitprojection&view=health_data_sets&task=health_data.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); - } else { - // show the create button - jQuery('#".$buttonName."Create').show(); - // hide edit button - jQuery('#".$buttonName."Edit').hide(); - } - }"; - } - // check if button was created for health_data field. - if (is_array($button) && count($button) > 0) - { - // Load the needed script. - $document = JFactory::getDocument(); - $document->addScriptDeclaration(implode(' ',$script)); - // return the button attached to input field. - return '
' .$html . implode('',$button).'
'; - } - } - return $html; - } + public $type = 'datayear'; /** * Method to get a list of options for a list input. diff --git a/admin/models/fields/interventions.php b/admin/models/fields/interventions.php index 080d9285..54ecfc18 100644 --- a/admin/models/fields/interventions.php +++ b/admin/models/fields/interventions.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage interventions.php @@ -34,106 +34,7 @@ class JFormFieldInterventions extends JFormFieldList * * @var string */ - public $type = 'interventions'; - /** - * Override to add new button - * - * @return string The field input markup. - * - * @since 3.2 - */ - protected function getInput() - { - // see if we should add buttons - $setButton = $this->getAttribute('button'); - // get html - $html = parent::getInput(); - // if true set button - if ($setButton === 'true') - { - $button = array(); - $script = array(); - $buttonName = $this->getAttribute('name'); - // get the input from url - $jinput = JFactory::getApplication()->input; - // get the view name & id - $values = $jinput->getArray(array( - 'id' => 'int', - 'view' => 'word' - )); - // check if new item - $ref = ''; - $refJ = ''; - if (!is_null($values['id']) && strlen($values['view'])) - { - // only load referal if not new item. - $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; - $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; - } - $user = JFactory::getUser(); - // only add if user allowed to create intervention - if ($user->authorise('intervention.create', 'com_costbenefitprojection')) - { - // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' - '; - } - // only add if user allowed to edit intervention - if (($buttonName == 'intervention' || $buttonName == 'interventions') && $user->authorise('intervention.edit', 'com_costbenefitprojection')) - { - // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; - // build script - $script[] = " - jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { - e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - function ".$buttonName."Button(value) { - if (value > 0) { - // hide the create button - jQuery('#".$buttonName."Create').hide(); - // show edit button - jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); - } else { - // show the create button - jQuery('#".$buttonName."Create').show(); - // hide edit button - jQuery('#".$buttonName."Edit').hide(); - } - }"; - } - // check if button was created for intervention field. - if (is_array($button) && count($button) > 0) - { - // Load the needed script. - $document = JFactory::getDocument(); - $document->addScriptDeclaration(implode(' ',$script)); - // return the button attached to input field. - return '
' .$html . implode('',$button).'
'; - } - } - return $html; - } + public $type = 'interventions'; /** * Method to get a list of options for a list input. diff --git a/admin/models/fields/memberuser.php b/admin/models/fields/memberuser.php index 4633bf6b..1bf853f4 100644 --- a/admin/models/fields/memberuser.php +++ b/admin/models/fields/memberuser.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage memberuser.php diff --git a/admin/models/fields/serviceprovider.php b/admin/models/fields/serviceprovider.php index c1b9099c..40c4862d 100644 --- a/admin/models/fields/serviceprovider.php +++ b/admin/models/fields/serviceprovider.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage serviceprovider.php @@ -34,7 +34,8 @@ class JFormFieldServiceprovider extends JFormFieldList * * @var string */ - public $type = 'serviceprovider'; + public $type = 'serviceprovider'; + /** * Override to add new button * @@ -55,7 +56,8 @@ class JFormFieldServiceprovider extends JFormFieldList $script = array(); $buttonName = $this->getAttribute('name'); // get the input from url - $jinput = JFactory::getApplication()->input; + $app = JFactory::getApplication(); + $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', @@ -72,7 +74,7 @@ class JFormFieldServiceprovider extends JFormFieldList } $user = JFactory::getUser(); // only add if user allowed to create service_provider - if ($user->authorise('service_provider.create', 'com_costbenefitprojection')) + if ($user->authorise('service_provider.create', 'com_costbenefitprojection') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button $buttonNamee = trim($buttonName); @@ -85,7 +87,7 @@ class JFormFieldServiceprovider extends JFormFieldList '; } // only add if user allowed to edit service_provider - if (($buttonName == 'service_provider' || $buttonName == 'service_providers') && $user->authorise('service_provider.edit', 'com_costbenefitprojection')) + if (($buttonName === 'service_provider' || $buttonName === 'service_providers') && $user->authorise('service_provider.edit', 'com_costbenefitprojection') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button $buttonNamee = trim($buttonName); diff --git a/admin/models/fields/serviceprovideruser.php b/admin/models/fields/serviceprovideruser.php index 8c315981..80e8a037 100644 --- a/admin/models/fields/serviceprovideruser.php +++ b/admin/models/fields/serviceprovideruser.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage serviceprovideruser.php diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php new file mode 100644 index 00000000..6a53092b --- /dev/null +++ b/admin/models/fields/siteviewfolderlist.php @@ -0,0 +1,62 @@ + + @owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + +/-------------------------------------------------------------------------------------------------------/ + Cost Benefit Projection Tool. +/------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Siteviewfolderlist Form Field class for the Costbenefitprojection component + */ +class JFormFieldSiteviewfolderlist extends JFormFieldList +{ + /** + * The siteviewfolderlist field type. + * + * @var string + */ + public $type = 'siteviewfolderlist'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // get custom folder files + $localfolder = JPATH_COMPONENT_SITE.'/views'; + // set the default + $options = array(); + // import all needed classes + jimport('joomla.filesystem.folder'); + // now check if there are files in the folder + if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder)) + { + foreach ($folders as $folder) + { + $options[] = JHtml::_('select.option', $folder, CostbenefitprojectionHelper::safeString($folder, 'W')); + } + } + return $options; + } +} diff --git a/admin/models/forms/causerisk.js b/admin/models/forms/causerisk.js index 86f15277..627b6e3a 100644 --- a/admin/models/forms/causerisk.js +++ b/admin/models/forms/causerisk.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage causerisk.js @author Llewellyn van der Merwe diff --git a/admin/models/forms/causerisk.xml b/admin/models/forms/causerisk.xml index 338f6aea..76c12ae5 100644 --- a/admin/models/forms/causerisk.xml +++ b/admin/models/forms/causerisk.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_CAUSERISK_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_CAUSERISK_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_CAUSERISK_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_CAUSERISK_CREATED_BY_DESC" /> @@ -63,7 +60,6 @@ label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" default="1" - required="false" /> @@ -75,7 +71,6 @@ description="" default="0" size="6" - required="false" /> @@ -103,7 +98,7 @@ disabled="false" required="true" filter="STRING" - message="Error! Please add name here." + message="COM_COSTBENEFITPROJECTION_CAUSERISK_NAME_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CAUSERISK_NAME_HINT" /> @@ -119,7 +114,7 @@ disabled="false" required="true" filter="CMD" - message="Error! Please add the reference number here." + message="COM_COSTBENEFITPROJECTION_CAUSERISK_REF_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CAUSERISK_REF_HINT" /> @@ -135,7 +130,7 @@ disabled="false" required="true" filter="STRING" - message="Error! Please add import name here." + message="COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME_HINT" /> @@ -149,7 +144,7 @@ class="text_area" required="true" filter="ID" - message="Error! Please add some the import ID here." + message="COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORT_ID_MESSAGE" /> @@ -238,6 +238,7 @@ function isSet(val) return false; } + jQuery(document).ready(function() { var values_a = jQuery('#jform_percentmale').val(); diff --git a/admin/models/forms/company.xml b/admin/models/forms/company.xml index 334ac677..743ac70a 100644 --- a/admin/models/forms/company.xml +++ b/admin/models/forms/company.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_COMPANY_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_COMPANY_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_COMPANY_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_COMPANY_CREATED_BY_DESC" /> @@ -63,7 +60,6 @@ label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" default="1" - required="false" /> @@ -75,7 +71,6 @@ description="" default="0" size="6" - required="false" /> @@ -103,7 +98,7 @@ disabled="false" required="true" filter="STRING" - message="Error! Please add company name here." + message="COM_COSTBENEFITPROJECTION_COMPANY_NAME_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COMPANY_NAME_HINT" /> @@ -118,7 +113,7 @@ required="true" filter="STRING" validate="email" - message="Error! Please add email address here." + message="COM_COSTBENEFITPROJECTION_COMPANY_EMAIL_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COMPANY_EMAIL_HINT" /> @@ -180,11 +175,51 @@ + + + + + + + filter="CMD" + required="false"> @@ -233,45 +269,16 @@ class="text_area" readonly="false" disabled="false" + required="false" filter="FLOAT" - message="Error! Please add percent here." + message="COM_COSTBENEFITPROJECTION_COMPANY_PERCENT_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COMPANY_PERCENT_HINT" /> - - - - + + - - - - - + + + - + - - - - + filter="CMD" + required="false"> @@ -450,13 +432,32 @@ class="text_area" readonly="false" disabled="false" + required="false" filter="FLOAT" - message="Error! Please add percent here." + message="COM_COSTBENEFITPROJECTION_COMPANY_PERCENT_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COMPANY_PERCENT_HINT" /> + + + + - - + + - - diff --git a/admin/models/forms/country.js b/admin/models/forms/country.js index e66d7927..e24aa786 100644 --- a/admin/models/forms/country.js +++ b/admin/models/forms/country.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 52 of this MVC + @build 25th October, 2017 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage country.js @author Llewellyn van der Merwe @@ -18,6 +18,7 @@ + jQuery(document).ready(function() { var values_a = jQuery('#jform_percentmale').val(); diff --git a/admin/models/forms/country.xml b/admin/models/forms/country.xml index 2718d1bb..0f3cdc26 100644 --- a/admin/models/forms/country.xml +++ b/admin/models/forms/country.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_COUNTRY_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_COUNTRY_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_COUNTRY_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_COUNTRY_CREATED_BY_DESC" /> @@ -63,7 +60,6 @@ label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" default="1" - required="false" /> @@ -75,7 +71,6 @@ description="" default="0" size="6" - required="false" /> @@ -103,7 +98,7 @@ disabled="false" required="true" filter="STRING" - message="Error! Please add name here." + message="COM_COSTBENEFITPROJECTION_COUNTRY_NAME_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COUNTRY_NAME_HINT" /> @@ -134,7 +129,7 @@ class="text_area" required="true" filter="WORD" - message="Error! Please add three-letter country code here." + message="COM_COSTBENEFITPROJECTION_COUNTRY_CODETHREE_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COUNTRY_CODETHREE_HINT" /> @@ -148,7 +143,7 @@ class="text_area" required="true" filter="WORD" - message="Error! Please add two-letter country code here." + message="COM_COSTBENEFITPROJECTION_COUNTRY_CODETWO_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COUNTRY_CODETWO_HINT" /> @@ -164,6 +159,34 @@ last="365" step="1" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + filter="CMD" + required="false"> @@ -597,13 +585,38 @@ class="text_area" readonly="false" disabled="false" + required="false" filter="FLOAT" - message="Error! Please add percent here." + message="COM_COSTBENEFITPROJECTION_COUNTRY_PERCENT_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COUNTRY_PERCENT_HINT" /> + + + + - - - - + filter="CMD" + required="false"> @@ -696,8 +686,9 @@ class="text_area" readonly="false" disabled="false" + required="false" filter="FLOAT" - message="Error! Please add number here." + message="COM_COSTBENEFITPROJECTION_COUNTRY_NUMBER_MESSAGE" hint="COM_COSTBENEFITPROJECTION_COUNTRY_NUMBER_HINT" /> @@ -707,7 +698,129 @@ label="COM_COSTBENEFITPROJECTION_COUNTRY_YEAR_LABEL" class="list_class" multiple="false" - filter="INT"> + filter="INT" + required="false"> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/admin/models/forms/currency.js b/admin/models/forms/currency.js index 623b0cba..fe95ab10 100644 --- a/admin/models/forms/currency.js +++ b/admin/models/forms/currency.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage currency.js @author Llewellyn van der Merwe diff --git a/admin/models/forms/currency.xml b/admin/models/forms/currency.xml index 197c913c..cbadaedc 100644 --- a/admin/models/forms/currency.xml +++ b/admin/models/forms/currency.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_CURRENCY_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_CURRENCY_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_CURRENCY_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_CURRENCY_CREATED_BY_DESC" /> @@ -63,7 +60,6 @@ label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" default="1" - required="false" /> @@ -75,7 +71,6 @@ description="" default="0" size="6" - required="false" /> @@ -103,7 +98,7 @@ disabled="false" required="true" filter="STRING" - message="Error! Please add name here." + message="COM_COSTBENEFITPROJECTION_CURRENCY_NAME_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CURRENCY_NAME_HINT" /> @@ -117,7 +112,7 @@ class="text_area" required="true" filter="WORD" - message="Error! Please add three-letter currency code here." + message="COM_COSTBENEFITPROJECTION_CURRENCY_CODETHREE_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CURRENCY_CODETHREE_HINT" /> @@ -131,7 +126,7 @@ class="text_area" required="true" filter="INT" - message="Error! Please add numeric code here." + message="COM_COSTBENEFITPROJECTION_CURRENCY_NUMERICCODE_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CURRENCY_NUMERICCODE_HINT" /> @@ -145,7 +140,7 @@ class="text_area" required="true" filter="STRING" - message="Error! Please add currency symbol here." + message="COM_COSTBENEFITPROJECTION_CURRENCY_SYMBOL_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CURRENCY_SYMBOL_HINT" /> @@ -157,6 +152,19 @@ filter="STRING" hint="COM_COSTBENEFITPROJECTION_CURRENCY_ALIAS_HINT" /> + + - - @@ -209,21 +205,20 @@ class="text_area" required="true" filter="INT" - message="Error! Please add currency decimal place here." + message="COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALPLACE_MESSAGE" hint="COM_COSTBENEFITPROJECTION_CURRENCY_DECIMALPLACE_HINT" /> - + diff --git a/admin/models/forms/health_data.js b/admin/models/forms/health_data.js index c87f2d7a..4f150b6a 100644 --- a/admin/models/forms/health_data.js +++ b/admin/models/forms/health_data.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage health_data.js @author Llewellyn van der Merwe @@ -18,6 +18,7 @@ + jQuery(document).ready(function() { var values_a = jQuery('#jform_maledeath').val(); diff --git a/admin/models/forms/health_data.xml b/admin/models/forms/health_data.xml index 223588ed..266396fc 100644 --- a/admin/models/forms/health_data.xml +++ b/admin/models/forms/health_data.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_HEALTH_DATA_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_HEALTH_DATA_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_CREATED_BY_DESC" /> @@ -63,7 +60,6 @@ label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" default="1" - required="false" /> @@ -75,7 +71,6 @@ description="" default="0" size="6" - required="false" /> @@ -107,7 +102,8 @@ label="COM_COSTBENEFITPROJECTION_HEALTH_DATA_YEAR_LABEL" class="list_class" multiple="false" - filter="INT"> + filter="INT" + required="true"> @@ -153,191 +149,11 @@ default="0" required="true" /> - - - - - - - - - - - - - - - - - - + filter="CMD" + required="false"> @@ -386,8 +203,195 @@ class="text_area" readonly="false" disabled="false" + required="false" filter="FLOAT" - message="Error! Please add number here." + message="COM_COSTBENEFITPROJECTION_HEALTH_DATA_NUMBER_MESSAGE" + hint="COM_COSTBENEFITPROJECTION_HEALTH_DATA_NUMBER_HINT" + /> + + + + + + + + + + + + + + + + + + + diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 28dc89cd..60cd11e0 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 13th April, 2018 + @created 13th July, 2015 @package Cost Benefit Projection @subpackage help_document.js @author Llewellyn van der Merwe @@ -17,10 +17,12 @@ /------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvwdvwl_required = false; -jform_vvvvvwevwm_required = false; -jform_vvvvvwfvwn_required = false; -jform_vvvvvwgvwo_required = false; +jform_vvvvvwbvwl_required = false; +jform_vvvvvwcvwm_required = false; +jform_vvvvvwdvwn_required = false; +jform_vvvvvwevwo_required = false; +jform_vvvvvwfvwp_required = false; +jform_vvvvvwgvwq_required = false; // Initial Script jQuery(document).ready(function() @@ -51,10 +53,27 @@ function vvvvvwb(location_vvvvvwb) if (location_vvvvvwb == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); + if (jform_vvvvvwbvwl_required) + { + updateFieldRequired('admin_view',0); + jQuery('#jform_admin_view').prop('required','required'); + jQuery('#jform_admin_view').attr('aria-required',true); + jQuery('#jform_admin_view').addClass('required'); + jform_vvvvvwbvwl_required = false; + } + } else { jQuery('#jform_admin_view').closest('.control-group').hide(); + if (!jform_vvvvvwbvwl_required) + { + updateFieldRequired('admin_view',1); + jQuery('#jform_admin_view').removeAttr('required'); + jQuery('#jform_admin_view').removeAttr('aria-required'); + jQuery('#jform_admin_view').removeClass('required'); + jform_vvvvvwbvwl_required = true; + } } } @@ -65,10 +84,27 @@ function vvvvvwc(location_vvvvvwc) if (location_vvvvvwc == 2) { jQuery('#jform_site_view').closest('.control-group').show(); + if (jform_vvvvvwcvwm_required) + { + updateFieldRequired('site_view',0); + jQuery('#jform_site_view').prop('required','required'); + jQuery('#jform_site_view').attr('aria-required',true); + jQuery('#jform_site_view').addClass('required'); + jform_vvvvvwcvwm_required = false; + } + } else { jQuery('#jform_site_view').closest('.control-group').hide(); + if (!jform_vvvvvwcvwm_required) + { + updateFieldRequired('site_view',1); + jQuery('#jform_site_view').removeAttr('required'); + jQuery('#jform_site_view').removeAttr('aria-required'); + jQuery('#jform_site_view').removeClass('required'); + jform_vvvvvwcvwm_required = true; + } } } @@ -92,26 +128,26 @@ function vvvvvwd(type_vvvvvwd) if (type) { jQuery('#jform_url').closest('.control-group').show(); - if (jform_vvvvvwdvwl_required) + if (jform_vvvvvwdvwn_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvvwdvwl_required = false; + jform_vvvvvwdvwn_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); - if (!jform_vvvvvwdvwl_required) + if (!jform_vvvvvwdvwn_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvvwdvwl_required = true; + jform_vvvvvwdvwn_required = true; } } } @@ -147,26 +183,26 @@ function vvvvvwe(type_vvvvvwe) if (type) { jQuery('#jform_article').closest('.control-group').show(); - if (jform_vvvvvwevwm_required) + if (jform_vvvvvwevwo_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvvwevwm_required = false; + jform_vvvvvwevwo_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); - if (!jform_vvvvvwevwm_required) + if (!jform_vvvvvwevwo_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvvwevwm_required = true; + jform_vvvvvwevwo_required = true; } } } @@ -202,26 +238,26 @@ function vvvvvwf(type_vvvvvwf) if (type) { jQuery('#jform_content-lbl').closest('.control-group').show(); - if (jform_vvvvvwfvwn_required) + if (jform_vvvvvwfvwp_required) { updateFieldRequired('content',0); jQuery('#jform_content').prop('required','required'); jQuery('#jform_content').attr('aria-required',true); jQuery('#jform_content').addClass('required'); - jform_vvvvvwfvwn_required = false; + jform_vvvvvwfvwp_required = false; } } else { jQuery('#jform_content-lbl').closest('.control-group').hide(); - if (!jform_vvvvvwfvwn_required) + if (!jform_vvvvvwfvwp_required) { updateFieldRequired('content',1); jQuery('#jform_content').removeAttr('required'); jQuery('#jform_content').removeAttr('aria-required'); jQuery('#jform_content').removeClass('required'); - jform_vvvvvwfvwn_required = true; + jform_vvvvvwfvwp_required = true; } } } @@ -244,26 +280,26 @@ function vvvvvwg(target_vvvvvwg) if (target_vvvvvwg == 1) { jQuery('#jform_groups').closest('.control-group').show(); - if (jform_vvvvvwgvwo_required) + if (jform_vvvvvwgvwq_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvvwgvwo_required = false; + jform_vvvvvwgvwq_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); - if (!jform_vvvvvwgvwo_required) + if (!jform_vvvvvwgvwq_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvvwgvwo_required = true; + jform_vvvvvwgvwq_required = true; } } } diff --git a/admin/models/forms/help_document.xml b/admin/models/forms/help_document.xml index 7d3948d8..7cfa8681 100644 --- a/admin/models/forms/help_document.xml +++ b/admin/models/forms/help_document.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_CREATED_BY_DESC" /> @@ -66,7 +63,6 @@ description="" default="0" size="6" - required="false" /> @@ -94,7 +90,7 @@ disabled="false" required="true" filter="STRING" - message="Error! Please add title here." + message="COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TITLE_MESSAGE" hint="COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_TITLE_HINT" /> @@ -139,40 +135,34 @@ - + - + - + - - - - + type="hidden" + name="not_required" + default="[]" + /> - - - + + + + + + + diff --git a/admin/models/forms/intervention.js b/admin/models/forms/intervention.js index 19704f0f..cca7ac28 100644 --- a/admin/models/forms/intervention.js +++ b/admin/models/forms/intervention.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 71 of this MVC + @build 12th November, 2016 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage intervention.js @author Llewellyn van der Merwe @@ -169,6 +169,7 @@ function isSet(val) return false; } + jQuery(document).ready(function() { var inter_type = jQuery("#jform_type input[type='radio']:checked").val(); diff --git a/admin/models/forms/intervention.xml b/admin/models/forms/intervention.xml index 8abf6325..ca7d7220 100644 --- a/admin/models/forms/intervention.xml +++ b/admin/models/forms/intervention.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_INTERVENTION_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_INTERVENTION_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_INTERVENTION_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_INTERVENTION_CREATED_BY_DESC" /> @@ -66,7 +63,6 @@ description="" default="0" size="6" - required="false" /> @@ -94,7 +90,7 @@ disabled="false" required="true" filter="STRING" - message="Error! Please add intervention name here." + message="COM_COSTBENEFITPROJECTION_INTERVENTION_NAME_MESSAGE" hint="COM_COSTBENEFITPROJECTION_INTERVENTION_NAME_HINT" /> @@ -157,30 +153,17 @@ last="30" step="1" /> - + - - - - - + type="hidden" + name="not_required" + default="[]" + /> @@ -208,6 +192,7 @@ maxlength="50" description="COM_COSTBENEFITPROJECTION_INTERVENTION_CPE_DESCRIPTION" class="text_area" + required="false" filter="INT" /> @@ -219,6 +204,7 @@ maxlength="50" description="COM_COSTBENEFITPROJECTION_INTERVENTION_MBR_DESCRIPTION" class="text_area" + required="false" filter="INT" /> @@ -230,22 +216,12 @@ maxlength="50" description="COM_COSTBENEFITPROJECTION_INTERVENTION_MTR_DESCRIPTION" class="text_area" + required="false" filter="INT" /> - - - + + + + + + + + diff --git a/admin/models/forms/scaling_factor.js b/admin/models/forms/scaling_factor.js index cd596272..3e298d1e 100644 --- a/admin/models/forms/scaling_factor.js +++ b/admin/models/forms/scaling_factor.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 + @version @update number 21 of this MVC @build 16th August, 2016 - @created 15th June, 2012 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage scaling_factor.js @author Llewellyn van der Merwe diff --git a/admin/models/forms/scaling_factor.xml b/admin/models/forms/scaling_factor.xml index fc838cd9..c75a688b 100644 --- a/admin/models/forms/scaling_factor.xml +++ b/admin/models/forms/scaling_factor.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CREATED_BY_DESC" /> @@ -66,7 +63,6 @@ description="" default="0" size="6" - required="false" /> @@ -115,7 +111,7 @@ disabled="false" required="true" filter="CMD" - message="Error! Please add scaling factor for males here." + message="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_MALES_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_MALES_HINT" /> @@ -132,7 +128,7 @@ disabled="false" required="true" filter="CMD" - message="Error! Please add scaling factor for females here." + message="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_FEMALES_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_YLD_SCALING_FACTOR_FEMALES_HINT" /> @@ -149,7 +145,7 @@ disabled="false" required="true" filter="CMD" - message="Error! Please add scaling factor for males here." + message="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_MALES_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_MALES_HINT" /> @@ -166,7 +162,7 @@ disabled="false" required="true" filter="CMD" - message="Error! Please add scaling factor for females here." + message="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_FEMALES_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_MORTALITY_SCALING_FACTOR_FEMALES_HINT" /> @@ -183,7 +179,7 @@ disabled="false" required="true" filter="CMD" - message="Error! Please add scaling factor for males here." + message="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_MALES_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_MALES_HINT" /> @@ -200,9 +196,26 @@ disabled="false" required="true" filter="CMD" - message="Error! Please add scaling factor for females here." + message="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_FEMALES_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SCALING_FACTOR_PRESENTEEISM_SCALING_FACTOR_FEMALES_HINT" /> + + - - diff --git a/admin/models/forms/service_provider.js b/admin/models/forms/service_provider.js index 377d6446..4fe60885 100644 --- a/admin/models/forms/service_provider.js +++ b/admin/models/forms/service_provider.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 35 of this MVC + @build 22nd March, 2016 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage service_provider.js @author Llewellyn van der Merwe diff --git a/admin/models/forms/service_provider.xml b/admin/models/forms/service_provider.xml index 9672869e..0d03a1ba 100644 --- a/admin/models/forms/service_provider.xml +++ b/admin/models/forms/service_provider.xml @@ -19,7 +19,6 @@ label="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_CREATED_DATE_LABEL" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_CREATED_DATE_DESC" size="22" - format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> @@ -28,13 +27,11 @@ name="created_by" type="user" label="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_CREATED_BY_LABEL" - description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_CREATED_BY_DESC" /> @@ -66,7 +63,6 @@ description="" default="0" size="6" - required="false" /> @@ -112,7 +108,7 @@ readonly="false" disabled="false" filter="STRING" - message="Error! Please add public name here." + message="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNAME_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNAME_HINT" /> @@ -126,7 +122,7 @@ class="text_area" filter="STRING" validate="email" - message="Error! Please public email address here." + message="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICEMAIL_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICEMAIL_HINT" /> @@ -140,7 +136,7 @@ class="text_area" filter="STRING" validated="tel" - message="Error! Please add public phone number here." + message="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNUMBER_MESSAGE" hint="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDER_PUBLICNUMBER_HINT" /> @@ -153,8 +149,6 @@ buttons="false" filter="safehtml" /> - - + + diff --git a/admin/models/health_data.php b/admin/models/health_data.php index 65934483..dce150db 100644 --- a/admin/models/health_data.php +++ b/admin/models/health_data.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage health_data.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -110,7 +110,8 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.health_data', 'health_data', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -217,6 +218,25 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin $form->setFieldAttribute('country', 'required', 'false'); } } + // Modify the form based on Edit Femaleyld access controls. + if ($id != 0 && (!$user->authorise('health_data.edit.femaleyld', 'com_costbenefitprojection.health_data.' . (int) $id)) + || ($id == 0 && !$user->authorise('health_data.edit.femaleyld', 'com_costbenefitprojection'))) + { + // Disable fields for display. + $form->setFieldAttribute('femaleyld', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('femaleyld', 'readonly', 'true'); + // Disable radio button for display. + $class = $form->getFieldAttribute('femaleyld', 'class', ''); + $form->setFieldAttribute('femaleyld', 'class', $class.' disabled no-click'); + if (!$form->getValue('femaleyld')) + { + // Disable fields while saving. + $form->setFieldAttribute('femaleyld', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('femaleyld', 'required', 'false'); + } + } // Modify the form based on Edit Femaledeath access controls. if ($id != 0 && (!$user->authorise('health_data.edit.femaledeath', 'com_costbenefitprojection.health_data.' . (int) $id)) || ($id == 0 && !$user->authorise('health_data.edit.femaledeath', 'com_costbenefitprojection'))) @@ -274,25 +294,6 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin $form->setFieldAttribute('maledeath', 'required', 'false'); } } - // Modify the form based on Edit Femaleyld access controls. - if ($id != 0 && (!$user->authorise('health_data.edit.femaleyld', 'com_costbenefitprojection.health_data.' . (int) $id)) - || ($id == 0 && !$user->authorise('health_data.edit.femaleyld', 'com_costbenefitprojection'))) - { - // Disable fields for display. - $form->setFieldAttribute('femaleyld', 'disabled', 'true'); - // Disable fields for display. - $form->setFieldAttribute('femaleyld', 'readonly', 'true'); - // Disable radio button for display. - $class = $form->getFieldAttribute('femaleyld', 'class', ''); - $form->setFieldAttribute('femaleyld', 'class', $class.' disabled no-click'); - if (!$form->getValue('femaleyld')) - { - // Disable fields while saving. - $form->setFieldAttribute('femaleyld', 'filter', 'unset'); - // Disable fields while saving. - $form->setFieldAttribute('femaleyld', 'required', 'false'); - } - } // Only load these values if no id is found if (0 == $id) { @@ -385,18 +386,7 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin { // Check specific edit permission then general edit permission. $user = JFactory::getUser(); - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; - if (!$user->authorise('core.options', 'com_costbenefitprojection')) - { - // make absolutely sure that this health data can be edited - $is = CostbenefitprojectionHelper::userIs($user->id); - $countries = CostbenefitprojectionHelper::hisCountries($user->id); - $country = CostbenefitprojectionHelper::getId('health_data',$recordId,'id','country'); - if ((3 != $is) || !CostbenefitprojectionHelper::checkArray($countries) || !in_array($country,$countries)) - { - return false; - } - } + return $user->authorise('health_data.edit', 'com_costbenefitprojection.health_data.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('health_data.edit', 'com_costbenefitprojection'); } @@ -508,6 +498,26 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -624,8 +634,6 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('health_data'); } @@ -681,7 +689,6 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -691,17 +698,11 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('health_data.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -711,7 +712,6 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -722,7 +722,11 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin } } - $this->table->causerisk = $this->generateUniqe('causerisk',$this->table->causerisk); + // Only for strings + if (CostbenefitprojectionHelper::checkString($this->table->causerisk) && !is_numeric($this->table->causerisk)) + { + $this->table->causerisk = $this->generateUniqe('causerisk',$this->table->causerisk); + } // insert all set values if (CostbenefitprojectionHelper::checkArray($values)) @@ -804,8 +808,6 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('health_data'); } @@ -860,7 +862,6 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin if (!$this->user->authorise('health_data.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -871,7 +872,6 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -888,7 +888,7 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -961,7 +961,7 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -1006,9 +1006,9 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title * - * @param string $title The title. + * @param string $title The title. * * @return array Contains the modified title and alias. * diff --git a/admin/models/health_data_sets.php b/admin/models/health_data_sets.php index 063b2be4..49114aad 100644 --- a/admin/models/health_data_sets.php +++ b/admin/models/health_data_sets.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage health_data_sets.php @author Llewellyn van der Merwe @@ -131,7 +131,7 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList $item->year = $this->selectionTranslation($item->year, 'year'); } } - + // return items return $items; @@ -145,7 +145,7 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList public function selectionTranslation($value,$name) { // Array of year language strings - if ($name == 'year') + if ($name === 'year') { $yearArray = array( 0 => 'COM_COSTBENEFITPROJECTION_HEALTH_DATA_SELECT_A_YEAR', @@ -254,7 +254,7 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); + $search = $db->quote('%' . $db->escape($search) . '%'); $query->where('(a.causerisk LIKE '.$search.' OR g.name LIKE '.$search.' OR a.year LIKE '.$search.' OR a.country LIKE '.$search.' OR h.name LIKE '.$search.')'); } } @@ -262,17 +262,17 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList // Filter by causerisk. if ($causerisk = $this->getState('filter.causerisk')) { - $query->where('a.causerisk = ' . $db->quote($db->escape($causerisk, true))); + $query->where('a.causerisk = ' . $db->quote($db->escape($causerisk))); } // Filter by Year. if ($year = $this->getState('filter.year')) { - $query->where('a.year = ' . $db->quote($db->escape($year, true))); + $query->where('a.year = ' . $db->quote($db->escape($year))); } // Filter by country. if ($country = $this->getState('filter.country')) { - $query->where('a.country = ' . $db->quote($db->escape($country, true))); + $query->where('a.country = ' . $db->quote($db->escape($country))); } // Add the list ordering clause. diff --git a/admin/models/help_document.php b/admin/models/help_document.php index b11c8dca..d7c21682 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 13th April, 2018 + @created 13th July, 2015 @package Cost Benefit Projection @subpackage help_document.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -116,7 +116,8 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -415,6 +416,26 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -531,8 +552,6 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('help_document'); } @@ -557,7 +576,6 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -567,17 +585,11 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('help_document.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -587,7 +599,6 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -597,7 +608,6 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin continue; } } - list($this->table->title, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->title); // insert all set values @@ -680,8 +690,6 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('help_document'); } @@ -705,7 +713,6 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin if (!$this->user->authorise('help_document.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -716,7 +723,6 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -733,7 +739,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -812,7 +818,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin } // Alter the title for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { $origTable = clone $this->getTable(); $origTable->load($input->getInt('id')); @@ -837,7 +843,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin // Automatic handling of alias for empty fields if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0) { - if ($data['alias'] == null) + if ($data['alias'] == null || empty($data['alias'])) { if (JFactory::getConfig()->get('unicodeslugs') == 1) { @@ -855,8 +861,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin $msg = JText::_('COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SAVE_WARNING'); } - list($title, $alias) = $this->_generateNewTitle($data['alias'], $data['title']); - $data['alias'] = $alias; + $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { @@ -866,7 +871,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -911,26 +916,49 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title/s & alias. * - * @param string $alias The alias. - * @param string $title The title. + * @param string $alias The alias. + * @param string/array $title The title. * - * @return array Contains the modified title and alias. + * @return array/string Contains the modified title/s and/or alias. * */ - protected function _generateNewTitle($alias, $title) + protected function _generateNewTitle($alias, $title = null) { - // Alter the title & alias + // Alter the title/s & alias $table = $this->getTable(); while ($table->load(array('alias' => $alias))) { - $title = JString::increment($title); + // Check if this is an array of titles + if (CostbenefitprojectionHelper::checkArray($title)) + { + foreach($title as $nr => &$_title) + { + $_title = JString::increment($_title); + } + } + // Make sure we have a title + elseif ($title) + { + $title = JString::increment($title); + } $alias = JString::increment($alias, 'dash'); } - - return array($title, $alias); + // Check if this is an array of titles + if (CostbenefitprojectionHelper::checkArray($title)) + { + $title[] = $alias; + return $title; + } + // Make sure we have a title + elseif ($title) + { + return array($title, $alias); + } + // We only had an alias + return $alias; } } diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 3978e21c..c187f2ce 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 13th April, 2018 + @created 13th July, 2015 @package Cost Benefit Projection @subpackage help_documents.php @author Llewellyn van der Merwe @@ -161,7 +161,7 @@ class CostbenefitprojectionModelHelp_documents extends JModelList $item->location = $this->selectionTranslation($item->location, 'location'); } } - + // return items return $items; @@ -175,7 +175,7 @@ class CostbenefitprojectionModelHelp_documents extends JModelList public function selectionTranslation($value,$name) { // Array of type language strings - if ($name == 'type') + if ($name === 'type') { $typeArray = array( 0 => 'COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SELECT_AN_OPTION', @@ -190,7 +190,7 @@ class CostbenefitprojectionModelHelp_documents extends JModelList } } // Array of location language strings - if ($name == 'location') + if ($name === 'location') { $locationArray = array( 1 => 'COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ADMIN', @@ -244,30 +244,30 @@ class CostbenefitprojectionModelHelp_documents extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); - $query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR a.site_view LIKE '.$search.')'); + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR g. LIKE '.$search.' OR a.site_view LIKE '.$search.' OR h. LIKE '.$search.')'); } } // Filter by Type. if ($type = $this->getState('filter.type')) { - $query->where('a.type = ' . $db->quote($db->escape($type, true))); + $query->where('a.type = ' . $db->quote($db->escape($type))); } // Filter by Location. if ($location = $this->getState('filter.location')) { - $query->where('a.location = ' . $db->quote($db->escape($location, true))); + $query->where('a.location = ' . $db->quote($db->escape($location))); } - // Filter by Admin_view. + // Filter by admin_view. if ($admin_view = $this->getState('filter.admin_view')) { - $query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true))); + $query->where('a.admin_view = ' . $db->quote($db->escape($admin_view))); } - // Filter by Site_view. + // Filter by site_view. if ($site_view = $this->getState('filter.site_view')) { - $query->where('a.site_view = ' . $db->quote($db->escape($site_view, true))); + $query->where('a.site_view = ' . $db->quote($db->escape($site_view))); } // Add the list ordering clause. diff --git a/admin/models/import.php b/admin/models/import.php index ebb91316..0b633076 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage import.php @@ -25,6 +25,11 @@ defined('_JEXEC') or die('Restricted access'); */ class CostbenefitprojectionModelImport extends JModelLegacy { + // set uploading values + protected $use_streams = false; + protected $allow_unsafe = false; + protected $safeFileOptions = array(); + /** * @var object JTable object */ @@ -66,10 +71,6 @@ class CostbenefitprojectionModelImport extends JModelLegacy // Recall the 'Import from Directory' path. $path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path')); $this->setState('import.directory', $path); - // set uploading values - $this->use_streams = false; - $this->allow_unsafe = false; - $this->safeFileOptions = array(); parent::populateState(); } @@ -82,10 +83,10 @@ class CostbenefitprojectionModelImport extends JModelLegacy public function import() { $this->setState('action', 'import'); - $app = JFactory::getApplication(); - $session = JFactory::getSession(); - $package = null; - $continue = false; + $app = JFactory::getApplication(); + $session = JFactory::getSession(); + $package = null; + $continue = false; // get import type $this->getType = $app->input->getString('gettype', NULL); // get import type @@ -140,7 +141,7 @@ class CostbenefitprojectionModelImport extends JModelLegacy // first link data to table headers if(!$continue){ - $package = json_encode($package); + $package = json_encode($package); $session->set('package', $package); $session->set('dataType', $this->dataType); $session->set('hasPackage', true); @@ -192,8 +193,8 @@ class CostbenefitprojectionModelImport extends JModelLegacy protected function _getPackageFromUpload() { // Get the uploaded file information - $app = JFactory::getApplication(); - $input = $app->input; + $app = JFactory::getApplication(); + $input = $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. $userfile = $input->files->get('import_package', null, 'raw'); @@ -220,9 +221,9 @@ class CostbenefitprojectionModelImport extends JModelLegacy } // Build the appropriate paths - $config = JFactory::getConfig(); - $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name']; - $tmp_src = $userfile['tmp_name']; + $config = JFactory::getConfig(); + $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name']; + $tmp_src = $userfile['tmp_name']; // Move uploaded file jimport('joomla.filesystem.file'); @@ -253,8 +254,8 @@ class CostbenefitprojectionModelImport extends JModelLegacy */ protected function _getPackageFromFolder() { - $app = JFactory::getApplication(); - $input = $app->input; + $app = JFactory::getApplication(); + $input = $app->input; // Get the path to the package to import $p_dir = $input->getString('import_directory'); @@ -276,21 +277,16 @@ class CostbenefitprojectionModelImport extends JModelLegacy } // check the extention - switch(strtolower(pathinfo($p_dir, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($p_dir)) + { + // set error message $app->enqueueMessage(JText::_('COM_COSTBENEFITPROJECTION_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; } $package['packagename'] = null; - $package['dir'] = $p_dir; - $package['type'] = $type; + $package['dir'] = $p_dir; + $package['type'] = $type; return $package; } @@ -303,8 +299,8 @@ class CostbenefitprojectionModelImport extends JModelLegacy */ protected function _getPackageFromUrl() { - $app = JFactory::getApplication(); - $input = $app->input; + $app = JFactory::getApplication(); + $input = $app->input; // Get the URL of the package to import $url = $input->getString('import_url'); @@ -343,38 +339,54 @@ class CostbenefitprojectionModelImport extends JModelLegacy */ protected function check($archivename) { - $app = JFactory::getApplication(); + $app = JFactory::getApplication(); // Clean the name $archivename = JPath::clean($archivename); // check the extention - switch(strtolower(pathinfo($archivename, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($archivename)) + { // Cleanup the import files $this->remove($archivename); $app->enqueueMessage(JText::_('COM_COSTBENEFITPROJECTION_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; - } + } - $config = JFactory::getConfig(); + $config = JFactory::getConfig(); // set Package Name - $check['packagename'] = $archivename; + $check['packagename'] = $archivename; // set directory - $check['dir'] = $config->get('tmp_path'). '/' .$archivename; + $check['dir'] = $config->get('tmp_path'). '/' .$archivename; // set type - $check['type'] = $this->getType; + $check['type'] = $this->getType; return $check; } + /** + * Check the extension + * + * @param string $file Name of the uploaded file + * + * @return boolean True on success + * + */ + protected function checkExtension($file) + { + // check the extention + switch(strtolower(pathinfo($file, PATHINFO_EXTENSION))) + { + case 'xls': + case 'ods': + case 'csv': + return true; + break; + } + return false; + } + /** * Clean up temporary uploaded spreadsheet * @@ -387,8 +399,8 @@ class CostbenefitprojectionModelImport extends JModelLegacy { jimport('joomla.filesystem.file'); - $config = JFactory::getConfig(); - $package = $config->get('tmp_path'). '/' .$package; + $config = JFactory::getConfig(); + $package = $config->get('tmp_path'). '/' .$package; // Is the package file a valid file? if (is_file($package)) @@ -451,11 +463,11 @@ class CostbenefitprojectionModelImport extends JModelLegacy if(CostbenefitprojectionHelper::checkArray($data['array'])) { // get user object - $user = JFactory::getUser(); + $user = JFactory::getUser(); // remove header if it has headers - $id_key = $data['target_headers']['id']; - $published_key = $data['target_headers']['published']; - $ordering_key = $data['target_headers']['ordering']; + $id_key = $data['target_headers']['id']; + $published_key = $data['target_headers']['published']; + $ordering_key = $data['target_headers']['ordering']; // get the first array set $firstSet = reset($data['array']); @@ -473,13 +485,13 @@ class CostbenefitprojectionModelImport extends JModelLegacy // Get a db connection. $db = JFactory::getDbo(); // set some defaults - $todayDate = JFactory::getDate()->toSql(); + $todayDate = JFactory::getDate()->toSql(); // get global action permissions - $canDo = CostbenefitprojectionHelper::getActions($table); - $canEdit = $canDo->get('core.edit'); - $canState = $canDo->get('core.edit.state'); - $canCreate = $canDo->get('core.create'); - $hasAlias = $this->getAliasesUsed($table); + $canDo = CostbenefitprojectionHelper::getActions($table); + $canEdit = $canDo->get('core.edit'); + $canState = $canDo->get('core.edit.state'); + $canCreate = $canDo->get('core.create'); + $hasAlias = $this->getAliasesUsed($table); // prosses the data foreach($data['array'] as $row) { @@ -501,11 +513,11 @@ class CostbenefitprojectionModelImport extends JModelLegacy if($found && $canEdit) { // update item - $id = $row[$id_key]; - $version = $db->loadResult(); + $id = $row[$id_key]; + $version = $db->loadResult(); // reset all buckets - $query = $db->getQuery(true); - $fields = array(); + $query = $db->getQuery(true); + $fields = array(); // Fields to update. foreach($row as $key => $cell) { @@ -550,8 +562,8 @@ class CostbenefitprojectionModelImport extends JModelLegacy } } // load the defaults - $fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id); - $fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate); + $fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id); + $fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate); // Conditions for which records should be updated. $conditions = array( $db->quoteName('id') . ' = ' . $id @@ -566,9 +578,9 @@ class CostbenefitprojectionModelImport extends JModelLegacy // insert item $query = $db->getQuery(true); // reset all buckets - $columns = array(); - $values = array(); - $version = false; + $columns = array(); + $values = array(); + $version = false; // Insert columns. Insert values. foreach($row as $key => $cell) { @@ -606,30 +618,30 @@ class CostbenefitprojectionModelImport extends JModelLegacy // set to insert array if(in_array($key, $data['target_headers']) && is_numeric($cell)) { - $columns[] = $target[$key]; - $values[] = $cell; + $columns[] = $target[$key]; + $values[] = $cell; } elseif(in_array($key, $data['target_headers']) && is_string($cell)) { - $columns[] = $target[$key]; - $values[] = $db->quote($cell); + $columns[] = $target[$key]; + $values[] = $db->quote($cell); } elseif(in_array($key, $data['target_headers']) && is_null($cell)) { // if import data is null then set empty - $columns[] = $target[$key]; - $values[] = "''"; + $columns[] = $target[$key]; + $values[] = "''"; } } // load the defaults - $columns[] = 'created_by'; - $values[] = $db->quote($user->id); - $columns[] = 'created'; - $values[] = $db->quote($todayDate); + $columns[] = 'created_by'; + $values[] = $db->quote($user->id); + $columns[] = 'created'; + $values[] = $db->quote($todayDate); if (!$version) { - $columns[] = 'version'; - $values[] = 1; + $columns[] = 'version'; + $values[] = 1; } // Prepare the insert query. $query diff --git a/admin/models/import_health_data_sets.php b/admin/models/import_health_data_sets.php index 2aad93e6..6062cc03 100644 --- a/admin/models/import_health_data_sets.php +++ b/admin/models/import_health_data_sets.php @@ -3,8 +3,8 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 + @version 3.4.3 + @build 5th May, 2018 @created 15th June, 2012 @package Cost Benefit Projection @subpackage import_health_data_sets.php @@ -25,6 +25,11 @@ defined('_JEXEC') or die('Restricted access'); */ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy { + // set uploading values + protected $use_streams = false; + protected $allow_unsafe = false; + protected $safeFileOptions = array(); + /** * @var object JTable object */ @@ -45,8 +50,8 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy /** * Import Settings */ - protected $getType = NULL; - protected $dataType = NULL; + protected $getType = NULL; + protected $dataType = NULL; /** * Method to auto-populate the model state. @@ -66,10 +71,6 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy // Recall the 'Import from Directory' path. $path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path')); $this->setState('import.directory', $path); - // set uploading values - $this->use_streams = false; - $this->allow_unsafe = false; - $this->safeFileOptions = array(); parent::populateState(); } @@ -190,8 +191,8 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy protected function _getPackageFromUpload() { // Get the uploaded file information - $app = JFactory::getApplication(); - $input = $app->input; + $app = JFactory::getApplication(); + $input = $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. $userfile = $input->files->get('import_package', null, 'raw'); @@ -218,9 +219,9 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy } // Build the appropriate paths - $config = JFactory::getConfig(); - $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name']; - $tmp_src = $userfile['tmp_name']; + $config = JFactory::getConfig(); + $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name']; + $tmp_src = $userfile['tmp_name']; // Move uploaded file jimport('joomla.filesystem.file'); @@ -251,8 +252,8 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy */ protected function _getPackageFromFolder() { - $app = JFactory::getApplication(); - $input = $app->input; + $app = JFactory::getApplication(); + $input = $app->input; // Get the path to the package to import $p_dir = $input->getString('import_directory'); @@ -274,21 +275,16 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy } // check the extention - switch(strtolower(pathinfo($p_dir, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($p_dir)) + { + // set error message $app->enqueueMessage(JText::_('COM_COSTBENEFITPROJECTION_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; } $package['packagename'] = null; - $package['dir'] = $p_dir; - $package['type'] = $type; + $package['dir'] = $p_dir; + $package['type'] = $type; return $package; } @@ -301,8 +297,8 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy */ protected function _getPackageFromUrl() { - $app = JFactory::getApplication(); - $input = $app->input; + $app = JFactory::getApplication(); + $input = $app->input; // Get the URL of the package to import $url = $input->getString('import_url'); @@ -341,37 +337,53 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy */ protected function check($archivename) { - $app = JFactory::getApplication(); + $app = JFactory::getApplication(); // Clean the name $archivename = JPath::clean($archivename); // check the extention - switch(strtolower(pathinfo($archivename, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($archivename)) + { // Cleanup the import files $this->remove($archivename); $app->enqueueMessage(JText::_('COM_COSTBENEFITPROJECTION_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; - } + } - $config = JFactory::getConfig(); + $config = JFactory::getConfig(); // set Package Name - $check['packagename'] = $archivename; + $check['packagename'] = $archivename; // set directory - $check['dir'] = $config->get('tmp_path'). '/' .$archivename; + $check['dir'] = $config->get('tmp_path'). '/' .$archivename; // set type - $check['type'] = $this->getType; + $check['type'] = $this->getType; return $check; } + + /** + * Check the extension + * + * @param string $file Name of the uploaded file + * + * @return boolean True on success + * + */ + protected function checkExtension($file) + { + // check the extention + switch(strtolower(pathinfo($file, PATHINFO_EXTENSION))) + { + case 'xls': + case 'ods': + case 'csv': + return true; + break; + } + return false; + } /** * Clean up temporary uploaded spreadsheet @@ -385,8 +397,8 @@ class CostbenefitprojectionModelImport_health_data_sets extends JModelLegacy { jimport('joomla.filesystem.file'); - $config = JFactory::getConfig(); - $package = $config->get('tmp_path'). '/' .$package; + $config = JFactory::getConfig(); + $package = $config->get('tmp_path'). '/' .$package; // Is the package file a valid file? if (is_file($package)) diff --git a/admin/models/intervention.php b/admin/models/intervention.php index 0659778a..351d9598 100644 --- a/admin/models/intervention.php +++ b/admin/models/intervention.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 71 of this MVC + @build 12th November, 2016 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage intervention.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -116,7 +116,8 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.intervention', 'intervention', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -267,23 +268,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin { // Check specific edit permission then general edit permission. $user = JFactory::getUser(); - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; - // get company id - $company = CostbenefitprojectionHelper::getId('intervention',$recordId,'id','company'); - if (!$user->authorise('core.options', 'com_costbenefitprojection')) - { - // make absolutely sure that this intervention can be edited - $companies = CostbenefitprojectionHelper::hisCompanies($user->id); - if (!CostbenefitprojectionHelper::checkArray($companies) || !in_array($company,$companies)) - { - return false; - } - } - // now check the access by sharing - if (!CostbenefitprojectionHelper::checkIntervetionAccess($recordId,null,$company)) - { - return false; - } + return $user->authorise('intervention.edit', 'com_costbenefitprojection.intervention.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('intervention.edit', 'com_costbenefitprojection'); } @@ -431,6 +416,26 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -547,8 +552,6 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('intervention'); } @@ -617,7 +620,6 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -627,17 +629,11 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('intervention.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -647,7 +643,6 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -658,7 +653,11 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin } } - $this->table->name = $this->generateUniqe('name',$this->table->name); + // Only for strings + if (CostbenefitprojectionHelper::checkString($this->table->name) && !is_numeric($this->table->name)) + { + $this->table->name = $this->generateUniqe('name',$this->table->name); + } // insert all set values if (CostbenefitprojectionHelper::checkArray($values)) @@ -740,8 +739,6 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('intervention'); } @@ -809,7 +806,6 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin if (!$this->user->authorise('intervention.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -820,7 +816,6 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -837,7 +832,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -916,7 +911,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -961,9 +956,9 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title * - * @param string $title The title. + * @param string $title The title. * * @return array Contains the modified title and alias. * diff --git a/admin/models/interventions.php b/admin/models/interventions.php index ba96ce09..44e918d4 100644 --- a/admin/models/interventions.php +++ b/admin/models/interventions.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 71 of this MVC + @build 12th November, 2016 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage interventions.php @author Llewellyn van der Merwe @@ -156,7 +156,7 @@ class CostbenefitprojectionModelInterventions extends JModelList $item->type = $this->selectionTranslation($item->type, 'type'); } } - + // return items return $items; @@ -170,7 +170,7 @@ class CostbenefitprojectionModelInterventions extends JModelList public function selectionTranslation($value,$name) { // Array of type language strings - if ($name == 'type') + if ($name === 'type') { $typeArray = array( 1 => 'COM_COSTBENEFITPROJECTION_INTERVENTION_SINGLE', @@ -245,7 +245,7 @@ class CostbenefitprojectionModelInterventions extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); + $search = $db->quote('%' . $db->escape($search) . '%'); $query->where('(a.name LIKE '.$search.' OR a.company LIKE '.$search.' OR g.name LIKE '.$search.' OR a.type LIKE '.$search.' OR a.coverage LIKE '.$search.' OR a.description LIKE '.$search.' OR a.duration LIKE '.$search.' OR a.reference LIKE '.$search.')'); } } @@ -253,22 +253,22 @@ class CostbenefitprojectionModelInterventions extends JModelList // Filter by company. if ($company = $this->getState('filter.company')) { - $query->where('a.company = ' . $db->quote($db->escape($company, true))); + $query->where('a.company = ' . $db->quote($db->escape($company))); } // Filter by Type. if ($type = $this->getState('filter.type')) { - $query->where('a.type = ' . $db->quote($db->escape($type, true))); + $query->where('a.type = ' . $db->quote($db->escape($type))); } // Filter by Coverage. if ($coverage = $this->getState('filter.coverage')) { - $query->where('a.coverage = ' . $db->quote($db->escape($coverage, true))); + $query->where('a.coverage = ' . $db->quote($db->escape($coverage))); } // Filter by Duration. if ($duration = $this->getState('filter.duration')) { - $query->where('a.duration = ' . $db->quote($db->escape($duration, true))); + $query->where('a.duration = ' . $db->quote($db->escape($duration))); } // Add the list ordering clause. diff --git a/admin/models/scaling_factor.php b/admin/models/scaling_factor.php index f9d0691d..2ff185de 100644 --- a/admin/models/scaling_factor.php +++ b/admin/models/scaling_factor.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 + @version @update number 21 of this MVC @build 16th August, 2016 - @created 15th June, 2012 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage scaling_factor.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -110,7 +110,8 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.scaling_factor', 'scaling_factor', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -261,17 +262,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin { // Check specific edit permission then general edit permission. $user = JFactory::getUser(); - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; - if (!$user->authorise('core.options', 'com_costbenefitprojection')) - { - // make absolutely sure that this scaling factor can be edited - $companies = CostbenefitprojectionHelper::hisCompanies($user->id); - $company = CostbenefitprojectionHelper::getId('scaling_factor',$recordId,'id','company'); - if (!CostbenefitprojectionHelper::checkArray($companies) || !in_array($company,$companies)) - { - return false; - } - } + return $user->authorise('scaling_factor.edit', 'com_costbenefitprojection.scaling_factor.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('scaling_factor.edit', 'com_costbenefitprojection'); } @@ -419,6 +410,26 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -535,8 +546,6 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('scaling_factor'); } @@ -591,7 +600,6 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -601,17 +609,11 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('scaling_factor.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -621,7 +623,6 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -632,7 +633,11 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin } } - $this->table->causerisk = $this->generateUniqe('causerisk',$this->table->causerisk); + // Only for strings + if (CostbenefitprojectionHelper::checkString($this->table->causerisk) && !is_numeric($this->table->causerisk)) + { + $this->table->causerisk = $this->generateUniqe('causerisk',$this->table->causerisk); + } // insert all set values if (CostbenefitprojectionHelper::checkArray($values)) @@ -714,8 +719,6 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('scaling_factor'); } @@ -769,7 +772,6 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin if (!$this->user->authorise('scaling_factor.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -780,7 +782,6 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -797,7 +798,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -870,7 +871,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -915,9 +916,9 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title * - * @param string $title The title. + * @param string $title The title. * * @return array Contains the modified title and alias. * diff --git a/admin/models/scaling_factors.php b/admin/models/scaling_factors.php index e96feecd..61949c64 100644 --- a/admin/models/scaling_factors.php +++ b/admin/models/scaling_factors.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 + @version @update number 21 of this MVC @build 16th August, 2016 - @created 15th June, 2012 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage scaling_factors.php @author Llewellyn van der Merwe @@ -140,7 +140,7 @@ class CostbenefitprojectionModelScaling_factors extends JModelList } } - } + } // return items return $items; @@ -210,7 +210,7 @@ class CostbenefitprojectionModelScaling_factors extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); + $search = $db->quote('%' . $db->escape($search) . '%'); $query->where('(a.causerisk LIKE '.$search.' OR g.name LIKE '.$search.' OR a.company LIKE '.$search.' OR h.name LIKE '.$search.' OR a.reference LIKE '.$search.')'); } } @@ -218,12 +218,12 @@ class CostbenefitprojectionModelScaling_factors extends JModelList // Filter by causerisk. if ($causerisk = $this->getState('filter.causerisk')) { - $query->where('a.causerisk = ' . $db->quote($db->escape($causerisk, true))); + $query->where('a.causerisk = ' . $db->quote($db->escape($causerisk))); } // Filter by company. if ($company = $this->getState('filter.company')) { - $query->where('a.company = ' . $db->quote($db->escape($company, true))); + $query->where('a.company = ' . $db->quote($db->escape($company))); } // Add the list ordering clause. diff --git a/admin/models/service_provider.php b/admin/models/service_provider.php index 81bca413..5262e6a2 100644 --- a/admin/models/service_provider.php +++ b/admin/models/service_provider.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 35 of this MVC + @build 22nd March, 2016 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage service_provider.php @author Llewellyn van der Merwe @@ -73,7 +73,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -237,7 +237,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin public function selectionTranslationVwecompanies($value,$name) { // Array of department language strings - if ($name == 'department') + if ($name === 'department') { $departmentArray = array( 1 => 'COM_COSTBENEFITPROJECTION_COMPANY_BASIC', @@ -250,7 +250,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin } } // Array of per language strings - if ($name == 'per') + if ($name === 'per') { $perArray = array( 1 => 'COM_COSTBENEFITPROJECTION_COMPANY_OPEN', @@ -276,7 +276,8 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_costbenefitprojection.service_provider', 'service_provider', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) @@ -427,16 +428,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin { // Check specific edit permission then general edit permission. $user = JFactory::getUser(); - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; - if (!$user->authorise('core.options', 'com_costbenefitprojection')) - { - // make absolutely sure that this Service Providers can be edited - $serviceproviders = CostbenefitprojectionHelper::hisServiceProviders($user->id); - if (!CostbenefitprojectionHelper::checkArray($serviceproviders) || !in_array($recordId,$serviceproviders)) - { - return false; - } - } + return $user->authorise('service_provider.edit', 'com_costbenefitprojection.service_provider.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('service_provider.edit', 'com_costbenefitprojection'); } @@ -548,6 +540,26 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin return true; } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } /** * Method to perform batch operations on an item or a set of items. @@ -664,8 +676,6 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('service_provider'); } @@ -720,7 +730,6 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin } $newIds = array(); - // Parent exists so let's proceed while (!empty($pks)) { @@ -730,17 +739,11 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin $this->table->reset(); // only allow copy if user may edit this item. - if (!$this->user->authorise('service_provider.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } // Check that the row actually exists @@ -750,7 +753,6 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -841,8 +843,6 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin $this->user = JFactory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); $this->canDo = CostbenefitprojectionHelper::getActions('service_provider'); } @@ -895,7 +895,6 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin if (!$this->user->authorise('service_provider.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; } @@ -906,7 +905,6 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin { // Fatal error $this->setError($error); - return false; } else @@ -923,7 +921,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin foreach ($values as $key => $value) { // Do special action for access. - if ('access' == $key && strlen($value) > 0) + if ('access' === $key && strlen($value) > 0) { $this->table->$key = $value; } @@ -1008,7 +1006,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin } // Alter the uniqe field for save as copy - if ($input->get('task') == 'save2copy') + if ($input->get('task') === 'save2copy') { // Automatic handling of other uniqe fields $uniqeFields = $this->getUniqeFields(); @@ -1053,9 +1051,9 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin } /** - * Method to change the title & alias. + * Method to change the title * - * @param string $title The title. + * @param string $title The title. * * @return array Contains the modified title and alias. * diff --git a/admin/models/service_providers.php b/admin/models/service_providers.php index 01617747..2b32766c 100644 --- a/admin/models/service_providers.php +++ b/admin/models/service_providers.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 35 of this MVC + @build 22nd March, 2016 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage service_providers.php @author Llewellyn van der Merwe @@ -128,7 +128,7 @@ class CostbenefitprojectionModelService_providers extends JModelList } } - } + } // return items return $items; @@ -198,7 +198,7 @@ class CostbenefitprojectionModelService_providers extends JModelList } else { - $search = $db->quote('%' . $db->escape($search, true) . '%'); + $search = $db->quote('%' . $db->escape($search) . '%'); $query->where('(a.user LIKE '.$search.' OR g.name LIKE '.$search.' OR a.country LIKE '.$search.' OR h.name LIKE '.$search.' OR a.publicname LIKE '.$search.' OR a.publicemail LIKE '.$search.' OR a.publicnumber LIKE '.$search.' OR a.publicaddress LIKE '.$search.')'); } } @@ -206,7 +206,7 @@ class CostbenefitprojectionModelService_providers extends JModelList // Filter by country. if ($country = $this->getState('filter.country')) { - $query->where('a.country = ' . $db->quote($db->escape($country, true))); + $query->where('a.country = ' . $db->quote($db->escape($country))); } // Add the list ordering clause. diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 0021c69c..eb714ef2 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1,41 +1,41 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_company` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', - `causesrisks` TEXT NOT NULL DEFAULT '', - `country` INT(11) NOT NULL DEFAULT '0', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `causesrisks` TEXT NOT NULL, + `country` INT(11) NOT NULL DEFAULT 0, `datayear` CHAR(64) NOT NULL DEFAULT '', - `department` TINYINT(1) NOT NULL DEFAULT '0', + `department` TINYINT(1) NOT NULL DEFAULT 0, `email` VARCHAR(255) NOT NULL DEFAULT '', `females` VARCHAR(255) NOT NULL DEFAULT '', `males` VARCHAR(255) NOT NULL DEFAULT '', `medical_turnovers_females` VARCHAR(255) NOT NULL DEFAULT '', `medical_turnovers_males` VARCHAR(255) NOT NULL DEFAULT '', `name` CHAR(64) NOT NULL DEFAULT '', - `not_required` INT(1) NOT NULL DEFAULT '0', - `per` TINYINT(1) NOT NULL DEFAULT '0', - `percentfemale` TEXT NOT NULL DEFAULT '', - `percentmale` TEXT NOT NULL DEFAULT '', + `not_required` INT(1) NOT NULL DEFAULT 0, + `per` TINYINT(1) NOT NULL DEFAULT 0, + `percentfemale` TEXT NOT NULL, + `percentmale` TEXT NOT NULL, `productivity_losses` VARCHAR(64) NOT NULL DEFAULT '', - `service_provider` INT(11) NOT NULL DEFAULT '0', + `service_provider` INT(11) NOT NULL DEFAULT 0, `sick_leave_females` VARCHAR(255) NOT NULL DEFAULT '', `sick_leave_males` VARCHAR(255) NOT NULL DEFAULT '', `total_healthcare` VARCHAR(255) NOT NULL DEFAULT '', `total_salary` VARCHAR(255) NOT NULL DEFAULT '', - `turnover_comment` TEXT NOT NULL DEFAULT '', - `user` INT(11) NOT NULL DEFAULT '0', - `working_days` INT(11) NOT NULL DEFAULT '0', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `turnover_comment` TEXT NOT NULL, + `user` INT(11) NOT NULL DEFAULT 0, + `working_days` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `access` int(11) DEFAULT NULL, - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -53,26 +53,26 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_company` ( ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_service_provider` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', - `country` INT(11) NOT NULL DEFAULT '0', - `publicaddress` TEXT NOT NULL DEFAULT '', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `country` INT(11) NOT NULL DEFAULT 0, + `publicaddress` TEXT NOT NULL, `publicemail` VARCHAR(255) NOT NULL DEFAULT '', `publicname` VARCHAR(255) NOT NULL DEFAULT '', `publicnumber` VARCHAR(64) NOT NULL DEFAULT '', - `testcompanies` TEXT NOT NULL DEFAULT '', - `user` INT(11) NOT NULL DEFAULT '0', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `testcompanies` TEXT NOT NULL, + `user` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -84,45 +84,45 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_service_provider` ( ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_country` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', - `causesrisks` TEXT NOT NULL DEFAULT '', + `causesrisks` TEXT NOT NULL, `codethree` CHAR(7) NOT NULL DEFAULT '', `codetwo` CHAR(7) NOT NULL DEFAULT '', `currency` CHAR(7) NOT NULL DEFAULT '', `datayear` CHAR(64) NOT NULL DEFAULT '', - `femaledeath` TEXT NOT NULL DEFAULT '', - `femaleyld` TEXT NOT NULL DEFAULT '', + `femaledeath` TEXT NOT NULL, + `femaleyld` TEXT NOT NULL, `healthcare` CHAR(7) NOT NULL DEFAULT '', - `maledeath` TEXT NOT NULL DEFAULT '', - `maleyld` TEXT NOT NULL DEFAULT '', + `maledeath` TEXT NOT NULL, + `maleyld` TEXT NOT NULL, `medical_turnovers` CHAR(7) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `percentfemale` TEXT NOT NULL DEFAULT '', - `percentmale` TEXT NOT NULL DEFAULT '', + `percentfemale` TEXT NOT NULL, + `percentmale` TEXT NOT NULL, `presenteeism` CHAR(7) NOT NULL DEFAULT '', `productivity_losses` CHAR(7) NOT NULL DEFAULT '', - `publicaddress` TEXT NOT NULL DEFAULT '', + `publicaddress` TEXT NOT NULL, `publicemail` VARCHAR(255) NOT NULL DEFAULT '', `publicname` VARCHAR(255) NOT NULL DEFAULT '', `publicnumber` VARCHAR(64) NOT NULL DEFAULT '', `sick_leave` CHAR(7) NOT NULL DEFAULT '', - `user` INT(11) NOT NULL DEFAULT '0', - `working_days` INT(11) NOT NULL DEFAULT '0', + `user` INT(11) NOT NULL DEFAULT 0, + `working_days` INT(11) NOT NULL DEFAULT 0, `worldzone` VARCHAR(255) NOT NULL DEFAULT '', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `access` int(11) DEFAULT NULL, - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -135,33 +135,33 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_country` ( KEY `idx_codethree` (`codethree`), KEY `idx_codetwo` (`codetwo`), KEY `idx_working_days` (`working_days`), - KEY `idx_datayear` (`datayear`), - KEY `idx_worldzone` (`worldzone`), + KEY `idx_publicname` (`publicname`), KEY `idx_alias` (`alias`), - KEY `idx_publicname` (`publicname`) + KEY `idx_datayear` (`datayear`), + KEY `idx_worldzone` (`worldzone`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_causerisk` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', - `description` TEXT NOT NULL DEFAULT '', - `import_id` INT(11) NOT NULL DEFAULT '0', + `description` TEXT NOT NULL, + `import_id` INT(11) NOT NULL DEFAULT 0, `importname` VARCHAR(255) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', `ref` VARCHAR(64) NOT NULL DEFAULT '', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `access` int(11) DEFAULT NULL, - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -176,27 +176,27 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_causerisk` ( ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_health_data` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', - `causerisk` INT(11) NOT NULL DEFAULT '0', - `country` INT(11) NOT NULL DEFAULT '0', - `femaledeath` TEXT NOT NULL DEFAULT '', - `femaleyld` TEXT NOT NULL DEFAULT '', - `maledeath` TEXT NOT NULL DEFAULT '', - `maleyld` TEXT NOT NULL DEFAULT '', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `causerisk` INT(11) NOT NULL DEFAULT 0, + `country` INT(11) NOT NULL DEFAULT 0, + `femaledeath` TEXT NOT NULL, + `femaleyld` TEXT NOT NULL, + `maledeath` TEXT NOT NULL, + `maleyld` TEXT NOT NULL, `year` CHAR(7) NOT NULL DEFAULT '', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `access` int(11) DEFAULT NULL, - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -209,30 +209,30 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_health_data` ( ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_scaling_factor` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', - `causerisk` INT(11) NOT NULL DEFAULT '0', - `company` INT(11) NOT NULL DEFAULT '0', - `country` INT(11) NOT NULL DEFAULT '0', - `health_scaling_factor` CHAR(7) NOT NULL DEFAULT '1', - `mortality_scaling_factor_females` CHAR(7) NOT NULL DEFAULT '1', - `mortality_scaling_factor_males` CHAR(7) NOT NULL DEFAULT '1', - `presenteeism_scaling_factor_females` CHAR(7) NOT NULL DEFAULT '1', - `presenteeism_scaling_factor_males` CHAR(7) NOT NULL DEFAULT '1', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `causerisk` INT(11) NOT NULL DEFAULT 0, + `company` INT(11) NOT NULL DEFAULT 0, + `country` INT(11) NOT NULL DEFAULT 0, + `health_scaling_factor` CHAR(7) NOT NULL DEFAULT 1, + `mortality_scaling_factor_females` CHAR(7) NOT NULL DEFAULT 1, + `mortality_scaling_factor_males` CHAR(7) NOT NULL DEFAULT 1, + `presenteeism_scaling_factor_females` CHAR(7) NOT NULL DEFAULT 1, + `presenteeism_scaling_factor_males` CHAR(7) NOT NULL DEFAULT 1, `reference` VARCHAR(255) NOT NULL DEFAULT '', - `yld_scaling_factor_females` CHAR(7) NOT NULL DEFAULT '1', - `yld_scaling_factor_males` CHAR(7) NOT NULL DEFAULT '1', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `yld_scaling_factor_females` CHAR(7) NOT NULL DEFAULT 1, + `yld_scaling_factor_males` CHAR(7) NOT NULL DEFAULT 1, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -244,31 +244,31 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_scaling_factor` ( ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_intervention` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', - `company` INT(11) NOT NULL DEFAULT '0', - `country` INT(11) NOT NULL DEFAULT '0', - `coverage` INT(11) NOT NULL DEFAULT '0', - `description` TEXT NOT NULL DEFAULT '', - `duration` INT(11) NOT NULL DEFAULT '0', - `intervention` TEXT NOT NULL DEFAULT '', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `company` INT(11) NOT NULL DEFAULT 0, + `country` INT(11) NOT NULL DEFAULT 0, + `coverage` INT(11) NOT NULL DEFAULT 0, + `description` TEXT NOT NULL, + `duration` INT(11) NOT NULL DEFAULT 0, + `intervention` TEXT NOT NULL, `interventions` VARCHAR(64) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `not_required` INT(1) NOT NULL DEFAULT '0', + `not_required` INT(1) NOT NULL DEFAULT 0, `reference` VARCHAR(255) NOT NULL DEFAULT '', - `share` TINYINT(1) NOT NULL DEFAULT '0', - `type` TINYINT(1) NOT NULL DEFAULT '0', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `share` TINYINT(1) NOT NULL DEFAULT 0, + `type` TINYINT(1) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -284,30 +284,30 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_intervention` ( ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_currency` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `codethree` CHAR(7) NOT NULL DEFAULT '', - `decimalplace` INT(7) NOT NULL DEFAULT '0', + `decimalplace` INT(7) NOT NULL DEFAULT 0, `decimalsymbol` CHAR(7) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', `negativestyle` VARCHAR(255) NOT NULL DEFAULT '', - `numericcode` INT(10) NOT NULL DEFAULT '0', + `numericcode` INT(10) NOT NULL DEFAULT 0, `positivestyle` VARCHAR(255) NOT NULL DEFAULT '', `symbol` CHAR(11) NOT NULL DEFAULT '', `thousands` CHAR(7) NOT NULL DEFAULT '', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `access` int(11) DEFAULT NULL, - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `idx_codethree` (`codethree`), KEY `idx_access` (`access`), @@ -321,31 +321,31 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_currency` ( ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_help_document` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `admin_view` CHAR(255) NOT NULL DEFAULT '', `alias` CHAR(64) NOT NULL DEFAULT '', - `article` TINYINT(1) NOT NULL DEFAULT '0', - `content` TEXT NOT NULL DEFAULT '', - `groups` TEXT NOT NULL DEFAULT '', - `location` TINYINT(1) NOT NULL DEFAULT '0', - `not_required` INT(1) NOT NULL DEFAULT '0', + `article` TINYINT(1) NOT NULL DEFAULT 0, + `content` TEXT NOT NULL, + `groups` TEXT NOT NULL, + `location` TINYINT(1) NOT NULL DEFAULT 0, + `not_required` INT(1) NOT NULL DEFAULT 0, `site_view` CHAR(255) NOT NULL DEFAULT '', - `target` TINYINT(1) NOT NULL DEFAULT '0', + `target` TINYINT(1) NOT NULL DEFAULT 0, `title` CHAR(64) NOT NULL DEFAULT '', - `type` TINYINT(1) NOT NULL DEFAULT '0', + `type` TINYINT(1) NOT NULL DEFAULT 0, `url` VARCHAR(255) NOT NULL DEFAULT '', - `params` TEXT NOT NULL DEFAULT '', - `published` tinyint(1) NOT NULL DEFAULT '1', - `created_by` int(11) NOT NULL DEFAULT '0', - `modified_by` int(11) NOT NULL DEFAULT '0', + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL, + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` int(11) NOT NULL DEFAULT '1', - `hits` int(11) NOT NULL DEFAULT '0', - `ordering` int(11) NOT NULL DEFAULT '0', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -354,17 +354,15 @@ CREATE TABLE IF NOT EXISTS `#__costbenefitprojection_help_document` ( KEY `idx_title` (`title`), KEY `idx_type` (`type`), KEY `idx_location` (`location`), + KEY `idx_article` (`article`), KEY `idx_target` (`target`), - KEY `idx_alias` (`alias`), - KEY `idx_article` (`article`) + KEY `idx_alias` (`alias`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; - - -- -- Dumping data for table `#__costbenefitprojection_country` -- @@ -8442,177 +8440,180 @@ INSERT INTO `#__costbenefitprojection_health_data` (`id`, `causerisk`, `country` --- --- Dumping data for table `#__costbenefitprojection_currency` --- +INSERT INTO `#__costbenefitprojection_currency` (`id`, `asset_id`, `alias`, `codethree`, `decimalplace`, `decimalsymbol`, `name`, `negativestyle`, `numericcode`, `positivestyle`, `symbol`, `thousands`, `params`, `published`, `created_by`, `modified_by`, `created`, `modified`, `checked_out`, `checked_out_time`, `version`, `hits`, `access`, `ordering`) VALUES +(1, 0, '', 'AED', 2, ',', 'United Arab Emirates dirham', '{sign}{number} {symbol}', 784, '{number} {symbol}', 'د.إ', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 23), +(2, 0, '', 'AFN', 2, ',', 'Afghan afghani', '{sign}{number} {symbol}', 971, '{number} {symbol}', '؋', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 24), +(3, 0, '', 'ALL', 2, ',', 'Albanian lek', '{sign}{number} {symbol}', 8, '{number} {symbol}', 'Lek', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 25), +(4, 0, '', 'AMD', 2, ',', 'Armenian dram', '{sign}{number} {symbol}', 51, '{number} {symbol}', 'դր.', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 26), +(5, 0, '', 'ANG', 2, ',', 'Netherlands Antillean gulden', '{sign}{number} {symbol}', 532, '{number} {symbol}', 'ƒ', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 27), +(6, 0, '', 'AOA', 2, ',', 'Angolan kwanza', '{sign}{number} {symbol}', 973, '{number} {symbol}', 'Kz', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 28), +(7, 0, '', 'ARS', 2, ',', 'Argentine peso', '{sign}{number} {symbol}', 32, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 29), +(8, 0, '', 'AUD', 2, '.', 'Australian dollar', '{sign}{symbol} {number}', 36, '{symbol} {number}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 5), +(9, 0, '', 'AWG', 2, ',', 'Aruban florin', '{sign}{number} {symbol}', 533, '{number} {symbol}', 'ƒ', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 30), +(10, 0, '', 'AZN', 2, ',', 'Azerbaijani manat', '{sign}{number} {symbol}', 934, '{number} {symbol}', 'ман', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 31), +(11, 0, '', 'BAM', 2, ',', 'Bosnia and Herzegovina convert', '{sign}{number} {symbol}', 977, '{number} {symbol}', 'KM', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 32), +(12, 0, '', 'BBD', 2, ',', 'Barbadian dollar', '{sign}{number} {symbol}', 52, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 33), +(13, 0, '', 'BDT', 2, ',', 'Bangladeshi taka', '{sign}{number} {symbol}', 50, '{number} {symbol}', '৳', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 34), +(14, 0, '', 'BGN', 2, ',', 'Bulgarian lev', '{sign}{number} {symbol}', 975, '{number} {symbol}', 'лв', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 35), +(15, 0, '', 'BHD', 2, ',', 'Bahraini dinar', '{sign}{number} {symbol}', 48, '{number} {symbol}', 'ب.د', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 36), +(16, 0, '', 'BIF', 0, '', 'Burundian franc', '{sign}{number} {symbol}', 108, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 37), +(17, 0, '', 'BMD', 2, ',', 'Bermudian dollar', '{sign}{number} {symbol}', 60, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 38), +(18, 0, '', 'BND', 2, ',', 'Brunei dollar', '{sign}{number} {symbol}', 96, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 39), +(19, 0, '', 'BOB', 2, ',', 'Bolivian boliviano', '{sign}{number} {symbol}', 68, '{number} {symbol}', '$b', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 40), +(20, 0, '', 'BOV', 2, ',', 'Mvdol', '{sign}{number} {symbol}', 984, '{number} {symbol}', 'BOV', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 41), +(21, 0, '', 'BRL', 2, '.', 'Brazilian real', '{symbol} {sign}{number}', 986, '{symbol} {number}', 'R$', ',', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 17), +(22, 0, '', 'BSD', 2, ',', 'Bahamian dollar', '{sign}{number} {symbol}', 44, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 42), +(23, 0, '', 'BTN', 2, ',', 'Bhutanese ngultrum', '{sign}{number} {symbol}', 64, '{number} {symbol}', 'BTN', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 43), +(24, 0, '', 'BWP', 2, ',', 'Botswana pula', '{sign}{number} {symbol}', 72, '{number} {symbol}', 'P', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 44), +(25, 0, '', 'BYR', 0, '', 'Belarusian ruble', '{sign}{number} {symbol}', 974, '{number} {symbol}', 'p.', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 45), +(26, 0, '', 'BZD', 2, ',', 'Belize dollar', '{sign}{number} {symbol}', 84, '{number} {symbol}', 'BZ$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 46), +(27, 0, '', 'CAD', 2, '.', 'Canadian dollar', '{symbol}{sign}{number}', 124, '{symbol}{number}', '$', ',', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 7), +(28, 0, '', 'CDF', 2, ',', 'Congolese franc', '{sign}{number} {symbol}', 976, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 47), +(29, 0, '', 'CHE', 2, ',', 'WIR Euro', '{sign}{number} {symbol}', 947, '{number} {symbol}', '€', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 48), +(30, 0, '', 'CHF', 2, ',', 'Swiss franc', '{sign}{number} {symbol}', 756, '{number} {symbol}', 'CHF', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 6), +(31, 0, '', 'CHW', 2, ',', 'WIR Franc', '{sign}{number} {symbol}', 948, '{number} {symbol}', 'CHW', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 49), +(32, 0, '', 'CLF', 0, ',', 'Unidad de Fomento', '{sign}{number} {symbol}', 990, '{number} {symbol}', 'CLF', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 50), +(33, 0, '', 'CLP', 2, ',', 'Chilean peso', '{sign}{number} {symbol}', 152, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 51), +(34, 0, '', 'CNY', 2, ',', 'Chinese renminbi yuan', '{sign}{number} {symbol}', 156, '{number} {symbol}', '元', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 9), +(35, 0, '', 'COP', 2, ',', 'Colombian peso', '{sign}{number} {symbol}', 170, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 52), +(36, 0, '', 'COU', 2, ',', 'Unidad de Valor Real', '{sign}{number} {symbol}', 970, '{number} {symbol}', 'COU', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 53), +(37, 0, '', 'CRC', 2, ',', 'Costa Rican colón', '{sign}{number} {symbol}', 188, '{number} {symbol}', '₡', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 54), +(38, 0, '', 'CZK', 2, ',', 'Czech koruna', '{sign}{number} {symbol}', 203, '{number} {symbol}', 'Kč', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 57), +(39, 0, '', 'CUP', 2, ',', 'Cuban peso', '{sign}{number} {symbol}', 192, '{number} {symbol}', '₱', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 55), +(40, 0, '', 'CVE', 0, '', 'Cape Verdean escudo', '{sign}{number} {symbol}', 132, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 56), +(41, 0, '', 'DJF', 0, '', 'Djiboutian franc', '{sign}{number} {symbol}', 262, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 58), +(42, 0, '', 'DKK', 2, '.', 'Danish krone', '{symbol}{sign}{number}', 208, '{symbol}{number}', 'kr', ',', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 19), +(43, 0, '', 'DOP', 2, ',', 'Dominican peso', '{sign}{number} {symbol}', 214, '{number} {symbol}', 'RD$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 59), +(44, 0, '', 'DZD', 2, ',', 'Algerian dinar', '{sign}{number} {symbol}', 12, '{number} {symbol}', 'د.ج', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 60), +(45, 0, '', 'EGP', 2, ',', 'Egyptian pound', '{sign}{number} {symbol}', 818, '{number} {symbol}', '£', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 61), +(46, 0, '', 'ERN', 2, ',', 'Eritrean nakfa', '{sign}{number} {symbol}', 232, '{number} {symbol}', 'Nfk', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 62), +(47, 0, '', 'ETB', 2, ',', 'Ethiopian birr', '{sign}{number} {symbol}', 230, '{number} {symbol}', 'ETB', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 63), +(48, 0, '', 'EUR', 2, ',', 'Euro', '{sign}{number} {symbol}', 978, '{number} {symbol}', '€', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 2), +(49, 0, '', 'FJD', 2, ',', 'Fijian dollar', '{sign}{number} {symbol}', 242, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 64), +(50, 0, '', 'FKP', 2, ',', 'Falkland pound', '{sign}{number} {symbol}', 238, '{number} {symbol}', '£', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 65), +(51, 0, '', 'GBP', 2, '.', 'British pound', '{symbol}{sign}{number}', 826, '{symbol}{number}', '£', ',', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 4), +(52, 0, '', 'GEL', 2, ',', 'Georgian lari', '{sign}{number} {symbol}', 981, '{number} {symbol}', 'ლ', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 66), +(53, 0, '', 'GHS', 2, ',', 'Ghanaian cedi', '{sign}{number} {symbol}', 936, '{number} {symbol}', '₵', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 67), +(54, 0, '', 'GIP', 2, ',', 'Gibraltar pound', '{sign}{number} {symbol}', 292, '{number} {symbol}', '£', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 68), +(55, 0, '', 'GMD', 2, ',', 'Gambian dalasi', '{sign}{number} {symbol}', 270, '{number} {symbol}', 'D', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 69), +(56, 0, '', 'GNF', 0, '', 'Guinean franc', '{sign}{number} {symbol}', 324, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 70), +(57, 0, '', 'GTQ', 2, ',', 'Guatemalan quetzal', '{sign}{number} {symbol}', 320, '{number} {symbol}', 'Q', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 71), +(58, 0, '', 'GYD', 2, ',', 'Guyanese dollar', '{sign}{number} {symbol}', 328, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 72), +(59, 0, '', 'HKD', 2, ',', 'Hong Kong dollar', '{sign}{number} {symbol}', 344, '{number} {symbol}', '元', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 13), +(60, 0, '', 'HNL', 2, ',', 'Honduran lempira', '{sign}{number} {symbol}', 340, '{number} {symbol}', 'L', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 73), +(61, 0, '', 'HRK', 2, ',', 'Croatian kuna', '{sign}{number} {symbol}', 191, '{number} {symbol}', 'kn', '.', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 74), +(62, 0, '', 'HTG', 2, ',', 'Haitian gourde', '{sign}{number} {symbol}', 332, '{number} {symbol}', 'G', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 75), +(63, 0, '', 'HUF', 2, ',', 'Hungarian forint', '{sign}{number} {symbol}', 348, '{number} {symbol}', 'Ft', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 76), +(64, 0, '', 'IDR', 0, '', 'Indonesian rupiah', '{symbol}{sign}{number}', 360, '{symbol}{number}', 'Rp', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 77), +(65, 0, '', 'ILS', 2, ',', 'Israeli new sheqel', '{sign}{number} {symbol}', 376, '{number} {symbol}', '₪', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 20), +(66, 0, '', 'INR', 2, ',', 'Indian rupee', '{sign}{number} {symbol}', 356, '{number} {symbol}', '₨', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 16), +(67, 0, '', 'IQD', 0, '', 'Iraqi dinar', '{sign}{number} {symbol}', 368, '{number} {symbol}', 'ع.د', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 78), +(68, 0, '', 'IRR', 2, ',', 'Iranian rial', '{sign}{number}{symb0l}', 364, '{number} {symbol}', '﷼', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 79), +(69, 0, '', 'ISK', 2, ',', 'Icelandic króna', '{sign}{number} {symbol}', 352, '{number} {symbol}', 'kr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 80), +(70, 0, '', 'JMD', 2, ',', 'Jamaican dollar', '{sign}{number} {symbol}', 388, '{number} {symbol}', 'J$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 81), +(71, 0, '', 'JOD', 2, ',', 'Jordanian dinar', '{sign}{number} {symbol}', 400, '{number} {symbol}', 'د.ا', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 82), +(72, 0, '', 'JPY', 2, ',', 'Japanese yen', '{sign}{number} {symbol}', 392, '{number} {symbol}', '¥', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 3), +(73, 0, '', 'KES', 2, ',', 'Kenyan shilling', '{sign}{number} {symbol}', 404, '{number} {symbol}', 'Sh', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 83), +(74, 0, '', 'KGS', 2, ',', 'Kyrgyzstani som', '{sign}{number} {symbol}', 417, '{number} {symbol}', 'лв', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 84), +(75, 0, '', 'KHR', 2, ',', 'Cambodian riel', '{sign}{number} {symbol}', 116, '{number} {symbol}', '៛', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 85), +(76, 0, '', 'KMF', 0, '', 'Comorian franc', '{sign}{number} {symbol}', 174, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 86), +(77, 0, '', 'KPW', 0, '', 'North Korean won', '{sign}{number} {symbol}', 408, '{number} {symbol}', '₩', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 87), +(78, 0, '', 'KRW', 0, '', 'South Korean won', '{sign}{number} {symbol}', 410, '{number} {symbol}', '₩', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 21), +(79, 0, '', 'KWD', 2, ',', 'Kuwaiti dinar', '{sign}{number} {symbol}', 414, '{number} {symbol}', 'د.ك', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 88), +(80, 0, '', 'KYD', 2, ',', 'Cayman Islands dollar', '{sign}{number} {symbol}', 136, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 89), +(81, 0, '', 'KZT', 2, ',', 'Kazakhstani tenge', '{sign}{number} {symbol}', 398, '{number} {symbol}', 'лв', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 90), +(82, 0, '', 'LAK', 0, '', 'Lao kip', '{sign}{number} {symbol}', 418, '{number} {symbol}', '₭', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 91), +(83, 0, '', 'LBP', 0, '', 'Lebanese pound', '{sign}{number} {symbol}', 422, '{number} {symbol}', '£', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 92), +(84, 0, '', 'LKR', 2, ',', 'Sri Lankan rupee', '{sign}{number} {symbol}', 144, '{number} {symbol}', '₨', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 93), +(85, 0, '', 'LRD', 2, ',', 'Liberian dollar', '{sign}{number} {symbol}', 430, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 94), +(86, 0, '', 'LSL', 2, ',', 'Lesotho loti', '{sign}{number} {symbol}', 426, '{number} {symbol}', 'L', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 95), +(87, 0, '', 'LTL', 2, ',', 'Lithuanian litas', '{sign}{number} {symbol}', 440, '{number} {symbol}', 'Lt', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 96), +(88, 0, '', 'LVL', 2, ',', 'Latvian lats', '{sign}{number} {symbol}', 428, '{number} {symbol}', 'Ls', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 97), +(89, 0, '', 'LYD', 3, ',', 'Libyan dinar', '{sign}{number} {symbol}', 434, '{number} {symbol}', 'ل.د', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 98), +(90, 0, '', 'MAD', 2, ',', 'Moroccan dirham', '{sign}{number} {symbol}', 504, '{number} {symbol}', 'د.م.', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 99), +(91, 0, '', 'MDL', 2, ',', 'Moldovan leu', '{sign}{number} {symbol}', 498, '{number} {symbol}', 'L', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 100), +(92, 0, '', 'MGA', 2, ',', 'Malagasy ariary', '{sign}{number} {symbol}', 969, '{number} {symbol}', 'MGA', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 101), +(93, 0, '', 'MKD', 2, ',', 'Macedonian denar', '{sign}{number} {symbol}', 807, '{number} {symbol}', 'ден', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 102), +(94, 0, '', 'MMK', 2, ',', 'Myanmar kyat', '{symbol} {sign}{number}', 104, '{number} {symbol}', 'K', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 103), +(95, 0, '', 'MNT', 2, ',', 'Mongolian tögrög', '{sign}{number} {symbol}', 496, '{number} {symbol}', '₮', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 104), +(96, 0, '', 'MOP', 1, ',', 'Macanese pataca', '{symbol}{sign}{number}', 446, '{symbol}{number}', 'P', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 105), +(97, 0, '', 'MRO', 2, ',', 'Mauritanian ouguiya', '{sign}{number} {symbol}', 478, '{number} {symbol}', 'UM', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 106), +(98, 0, '', 'MUR', 2, ',', 'Mauritian rupee', '{sign}{number} {symbol}', 480, '{number} {symbol}', '₨', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 107), +(99, 0, '', 'MVR', 2, ',', 'Maldivian rufiyaa', '{sign}{number} {symbol}', 462, '{number} {symbol}', 'ރ.', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 108), +(100, 0, '', 'MWK', 2, ',', 'Malawian kwacha', '{sign}{number} {symbol}', 454, '{number} {symbol}', 'MK', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 109), +(101, 0, '', 'MXN', 2, ',', 'Mexican peso', '{sign}{number} {symbol}', 484, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 8), +(102, 0, '', 'MXV', 2, ',', 'Mexican Unid', '{sign}{number} {symbol}', 979, '{number} {symbol}', 'MXV', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 110), +(103, 0, '', 'MYR', 2, ',', 'Malaysian ringgit', '{sign}{number} {symbol}', 458, '{number} {symbol}', 'RM', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 111), +(104, 0, '', 'MZN', 2, ',', 'Mozambican metical', '{sign}{number} {symbol}', 943, '{number} {symbol}', 'MT', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 112), +(105, 0, '', 'NAD', 2, ',', 'Namibian dollar', '{symbol} {sign}{number}', 516, '{symbol} {number}', 'N$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 113), +(106, 0, '', 'NGN', 2, ',', 'Nigerian naira', '{sign}{number} {symbol}', 566, '{number} {symbol}', '₦', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 114), +(107, 0, '', 'NIO', 2, ',', 'Nicaraguan córdoba', '{sign}{number} {symbol}', 558, '{number} {symbol}', 'C$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 115), +(108, 0, '', 'NOK', 2, ',', 'Norwegian krone', '{symbol}{sign}{number}', 578, '{symbol}{number}', 'kr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 18), +(109, 0, '', 'NPR', 2, ',', 'Nepalese rupee', '{sign}{number} {symbol}', 524, '{number} {symbol}', '₨', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 116), +(110, 0, '', 'NZD', 2, ',', 'New Zealand dollar', '{symbol}{sign}{number}', 554, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 10), +(111, 0, '', 'OMR', 3, '.', 'Omani rial', '{sign}{number} {symbol}', 512, '{number} {symbol}', '﷼', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 117), +(112, 0, '', 'PAB', 2, ',', 'Panamanian balboa', '{sign}{number} {symbol}', 590, '{number} {symbol}', 'B/.', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 118), +(113, 0, '', 'PEN', 2, ',', 'Peruvian nuevo sol', '{sign}{number} {symbol}', 604, '{number} {symbol}', 'S/.', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 119), +(114, 0, '', 'PGK', 2, ',', 'Papua New Guinean kina', '{sign}{number} {symbol}', 598, '{number} {symbol}', 'K', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 120), +(115, 0, '', 'PHP', 2, ',', 'Philippine peso', '{sign}{number} {symbol}', 608, '{number} {symbol}', '₱', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 121), +(116, 0, '', 'PKR', 2, ',', 'Pakistani rupee', '{sign}{number} {symbol}', 586, '{number} {symbol}', '₨', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 122), +(117, 0, '', 'PLN', 2, ',', 'Polish Złoty', '{sign}{number} {symbol}', 985, '{number} {symbol}', 'zł', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 123), +(118, 0, '', 'PYG', 0, '', 'Paraguayan guaraní', '{symbol} {sign}{number}', 600, '{symbol} {number}', '₲', '.', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 124), +(119, 0, '', 'QAR', 2, ',', 'Qatari riyal', '{sign}{number} {symbol}', 634, '{number} {symbol}', '﷼', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 125), +(120, 0, '', 'RON', 2, ',', 'Romanian leu', '{sign}{number} {symbol}', 946, '{number} {symbol}', 'lei', '.', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 126), +(121, 0, '', 'RWF', 2, ',', 'Rwandan franc', '{sign}{number} {symbol}', 646, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 128), +(122, 0, '', 'SAR', 2, ',', 'Saudi riyal', '{sign}{number} {symbol}', 682, '{number} {symbol}', '﷼', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 129), +(123, 0, '', 'SBD', 2, ',', 'Solomon Islands dollar', '{sign}{number} {symbol}', 90, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 130), +(124, 0, '', 'SCR', 2, ',', 'Seychellois rupee', '{sign}{number} {symbol}', 690, '{number} {symbol}', '₨', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 131), +(125, 0, '', 'SDG', 2, ',', 'Sudanese pound', '{sign}{number} {symbol}', 938, '{number} {symbol}', '£', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 132), +(126, 0, '', 'SEK', 2, ',', 'Swedish krona', '{sign}{number} {symbol}', 752, '{number} {symbol}', 'kr', '.', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 11), +(127, 0, '', 'SGD', 2, ',', 'Singapore dollar', '{sign}{number} {symbol}', 702, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 14), +(128, 0, '', 'SHP', 2, ',', 'Saint Helenian pound', '{sign}{number} {symbol}', 654, '{number} {symbol}', '£', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 133), +(129, 0, '', 'SLL', 2, ',', 'Sierra Leonean leone', '{sign}{number} {symbol}', 694, '{number} {symbol}', 'Le', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 134), +(130, 0, '', 'SOS', 2, ',', 'Somali shilling', '{sign}{number} {symbol}', 706, '{number} {symbol}', 'S', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 135), +(131, 0, '', 'SRD', 2, ',', 'Surinamese dollar', '{sign}{number} {symbol}', 968, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 136), +(132, 0, '', 'STD', 0, '', 'São Tomé and Príncipe dobra', '{sign}{number} {symbol}', 678, '{number} {symbol}', 'Db', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 137), +(133, 0, '', 'RUB', 2, ',', 'Russian ruble', '{sign}{number} {symbol}', 643, '{number} {symbol}', 'руб', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 12), +(134, 0, '', 'SVC', 2, ',', 'Salvadoran colón', '{sign}{number} {symbol}', 222, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 138), +(135, 0, '', 'SYP', 2, ',', 'Syrian pound', '{sign}{number} {symbol}', 760, '{number} {symbol}', '£', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 139), +(136, 0, '', 'SZL', 2, ',', 'Swazi lilangeni', '{sign}{number} {symbol}', 748, '{number} {symbol}', 'L', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 140), +(137, 0, '', 'THB', 2, ',', 'Thai baht', '{sign}{number} {symbol}', 764, '{number} {symbol}', '฿', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 141), +(138, 0, '', 'TJS', 2, ',', 'Tajikistani somoni', '{sign}{number} {symbol}', 972, '{number} {symbol}', 'ЅМ', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 142), +(139, 0, '', 'TND', 3, ',', 'Tunisian dinar', '{sign}{number} {symbol}', 788, '{number} {symbol}', 'د.ت', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 143), +(140, 0, '', 'TOP', 2, ',', 'Tongan paʻanga', '{sign}{number} {symbol}', 776, '{number} {symbol}', 'T$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 144), +(141, 0, '', 'TRY', 2, ',', 'Turkish new lira', '{sign}{number} {symbol}', 949, '{number} {symbol}', 'YTL', '.', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 15), +(142, 0, '', 'TTD', 2, ',', 'Trinidad and Tobago dollar', '{sign}{number} {symbol}', 780, '{number} {symbol}', 'TT$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 145), +(143, 0, '', 'TWD', 2, ',', 'New Taiwan dollar', '{sign}{number} {symbol}', 901, '{number} {symbol}', 'NT$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 146), +(144, 0, '', 'TZS', 2, ',', 'Tanzanian shilling', '{sign}{number} {symbol}', 834, '{number} {symbol}', 'Sh', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 147), +(145, 0, '', 'UAH', 2, ',', 'Ukrainian hryvnia', '{sign}{number} {symbol}', 980, '{number} {symbol}', '₴', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 148), +(146, 0, '', 'UGX', 2, ',', 'Ugandan shilling', '{sign}{number} {symbol}', 800, '{number} {symbol}', 'Sh', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 149), +(147, 0, '', 'USD', 2, '.', 'United States dollar', '{symbol}{sign}{number}', 840, '{symbol}{number}', '$', ',', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 1), +(148, 0, '', 'UYI', 2, ',', 'Uruguay Peso', '{sign}{number} {symbol}', 940, '{number} {symbol}', 'UYI', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 150), +(149, 0, '', 'UYU', 0, '', 'Uruguayan peso', '{symbol}{sign}{number}', 858, '{symbol} {number}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 151), +(150, 0, '', 'UZS', 2, ',', 'Uzbekistani som', '{sign}{number} {symbol}', 860, '{number} {symbol}', 'лв', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 152), +(151, 0, '', 'VEF', 2, ',', 'Venezuelan bolívar', '{sign}{number} {symbol}', 937, '{number} {symbol}', 'Bs', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 153), +(152, 0, '', 'VND', 0, '', 'Vietnamese Dong', '{sign}{number} {symbol}', 704, '{number} {symbol}', '₫', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 154), +(153, 0, '', 'VUV', 2, ',', 'Vanuatu vatu', '{sign}{number} {symbol}', 548, '{number} {symbol}', 'Vt', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 155), +(154, 0, '', 'WST', 2, ',', 'Samoan tala', '{sign}{number} {symbol}', 882, '{number} {symbol}', 'T', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 156), +(155, 0, '', 'XAF', 0, '', 'Central African CFA franc', '{sign}{number} {symbol}', 950, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 157), +(156, 0, '', 'XCD', 2, ',', 'East Caribbean dollar', '{sign}{number} {symbol}', 951, '{number} {symbol}', '$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 158), +(157, 0, '', 'XOF', 2, ',', 'West African CFA franc', '{sign}{number} {symbol}', 952, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 159), +(158, 0, '', 'XPF', 2, ',', 'CFP franc', '{sign}{number} {symbol}', 953, '{number} {symbol}', 'Fr', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 160), +(159, 0, '', 'YER', 2, ',', 'Yemeni rial', '{sign}{number} {symbol}', 886, '{number} {symbol}', '﷼', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 161), +(160, 0, '', 'RSD', 2, ',', 'Serbian dinar', '{sign}{number} {symbol}', 941, '{number} {symbol}', 'Дин.', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 127), +(161, 3022, 'south-african-rand', 'ZAR', 2, ',', 'South African rand', '{symbol} {sign}{number}', 710, '{symbol} {number}', 'R', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 2, 0, 5, 22), +(162, 0, '', 'ZMK', 2, ',', 'Zambian kwacha', '{sign}{number} {symbol}', 894, '{number} {symbol}', 'ZK', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 162), +(163, 0, '', 'ZWD', 2, ',', 'Zimbabwean dollar', '{sign}{number} {symbol}', 932, '{number} {symbol}', 'Z$', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 163), +(164, 0, '', 'ZZZ', 2, ',', 'Reserved', '', 0, '', 'O', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 164); + -INSERT INTO `#__costbenefitprojection_currency` (`id`, `alias`, `codethree`, `decimalplace`, `decimalsymbol`, `name`, `negativestyle`, `numericcode`, `positivestyle`, `symbol`, `thousands`, `params`, `published`, `created_by`, `modified_by`, `created`, `modified`, `checked_out`, `checked_out_time`, `version`, `hits`, `access`, `ordering`) VALUES -(1, '', 'AED', 2, ',', 'United Arab Emirates dirham', '{sign}{number} {symbol}', 784, '{number} {symbol}', 'د.إ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 23), -(2, '', 'AFN', 2, ',', 'Afghan afghani', '{sign}{number} {symbol}', 971, '{number} {symbol}', '؋', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 24), -(3, '', 'ALL', 2, ',', 'Albanian lek', '{sign}{number} {symbol}', 8, '{number} {symbol}', 'Lek', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 25), -(4, '', 'AMD', 2, ',', 'Armenian dram', '{sign}{number} {symbol}', 51, '{number} {symbol}', 'դր.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 26), -(5, '', 'ANG', 2, ',', 'Netherlands Antillean gulden', '{sign}{number} {symbol}', 532, '{number} {symbol}', 'ƒ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 27), -(6, '', 'AOA', 2, ',', 'Angolan kwanza', '{sign}{number} {symbol}', 973, '{number} {symbol}', 'Kz', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 28), -(7, '', 'ARS', 2, ',', 'Argentine peso', '{sign}{number} {symbol}', 32, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 29), -(8, '', 'AUD', 2, '.', 'Australian dollar', '{sign}{symbol} {number}', 36, '{symbol} {number}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 5), -(9, '', 'AWG', 2, ',', 'Aruban florin', '{sign}{number} {symbol}', 533, '{number} {symbol}', 'ƒ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 30), -(10, '', 'AZN', 2, ',', 'Azerbaijani manat', '{sign}{number} {symbol}', 934, '{number} {symbol}', 'ман', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 31), -(11, '', 'BAM', 2, ',', 'Bosnia and Herzegovina convert', '{sign}{number} {symbol}', 977, '{number} {symbol}', 'KM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 32), -(12, '', 'BBD', 2, ',', 'Barbadian dollar', '{sign}{number} {symbol}', 52, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 33), -(13, '', 'BDT', 2, ',', 'Bangladeshi taka', '{sign}{number} {symbol}', 50, '{number} {symbol}', '৳', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 34), -(14, '', 'BGN', 2, ',', 'Bulgarian lev', '{sign}{number} {symbol}', 975, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 35), -(15, '', 'BHD', 2, ',', 'Bahraini dinar', '{sign}{number} {symbol}', 48, '{number} {symbol}', 'ب.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 36), -(16, '', 'BIF', '', '', 'Burundian franc', '{sign}{number} {symbol}', 108, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 37), -(17, '', 'BMD', 2, ',', 'Bermudian dollar', '{sign}{number} {symbol}', 60, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 38), -(18, '', 'BND', 2, ',', 'Brunei dollar', '{sign}{number} {symbol}', 96, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 39), -(19, '', 'BOB', 2, ',', 'Bolivian boliviano', '{sign}{number} {symbol}', 68, '{number} {symbol}', '$b', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 40), -(20, '', 'BOV', 2, ',', 'Mvdol', '{sign}{number} {symbol}', 984, '{number} {symbol}', 'BOV', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 41), -(21, '', 'BRL', 2, '.', 'Brazilian real', '{symbol} {sign}{number}', 986, '{symbol} {number}', 'R$', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 17), -(22, '', 'BSD', 2, ',', 'Bahamian dollar', '{sign}{number} {symbol}', 44, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 42), -(23, '', 'BTN', 2, ',', 'Bhutanese ngultrum', '{sign}{number} {symbol}', 64, '{number} {symbol}', 'BTN', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 43), -(24, '', 'BWP', 2, ',', 'Botswana pula', '{sign}{number} {symbol}', 72, '{number} {symbol}', 'P', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 44), -(25, '', 'BYR', '', '', 'Belarusian ruble', '{sign}{number} {symbol}', 974, '{number} {symbol}', 'p.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 45), -(26, '', 'BZD', 2, ',', 'Belize dollar', '{sign}{number} {symbol}', 84, '{number} {symbol}', 'BZ$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 46), -(27, '', 'CAD', 2, '.', 'Canadian dollar', '{symbol}{sign}{number}', 124, '{symbol}{number}', '$', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 7), -(28, '', 'CDF', 2, ',', 'Congolese franc', '{sign}{number} {symbol}', 976, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 47), -(29, '', 'CHE', 2, ',', 'WIR Euro', '{sign}{number} {symbol}', 947, '{number} {symbol}', '€', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 48), -(30, '', 'CHF', 2, ',', 'Swiss franc', '{sign}{number} {symbol}', 756, '{number} {symbol}', 'CHF', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 6), -(31, '', 'CHW', 2, ',', 'WIR Franc', '{sign}{number} {symbol}', 948, '{number} {symbol}', 'CHW', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 49), -(32, '', 'CLF', '', ',', 'Unidad de Fomento', '{sign}{number} {symbol}', 990, '{number} {symbol}', 'CLF', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 50), -(33, '', 'CLP', 2, ',', 'Chilean peso', '{sign}{number} {symbol}', 152, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 51), -(34, '', 'CNY', 2, ',', 'Chinese renminbi yuan', '{sign}{number} {symbol}', 156, '{number} {symbol}', '元', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 9), -(35, '', 'COP', 2, ',', 'Colombian peso', '{sign}{number} {symbol}', 170, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 52), -(36, '', 'COU', 2, ',', 'Unidad de Valor Real', '{sign}{number} {symbol}', 970, '{number} {symbol}', 'COU', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 53), -(37, '', 'CRC', 2, ',', 'Costa Rican colón', '{sign}{number} {symbol}', 188, '{number} {symbol}', '₡', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 54), -(38, '', 'CZK', 2, ',', 'Czech koruna', '{sign}{number} {symbol}', 203, '{number} {symbol}', 'Kč', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 57), -(39, '', 'CUP', 2, ',', 'Cuban peso', '{sign}{number} {symbol}', 192, '{number} {symbol}', '₱', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 55), -(40, '', 'CVE', '', '', 'Cape Verdean escudo', '{sign}{number} {symbol}', 132, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 56), -(41, '', 'DJF', '', '', 'Djiboutian franc', '{sign}{number} {symbol}', 262, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 58), -(42, '', 'DKK', 2, '.', 'Danish krone', '{symbol}{sign}{number}', 208, '{symbol}{number}', 'kr', ',', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 19), -(43, '', 'DOP', 2, ',', 'Dominican peso', '{sign}{number} {symbol}', 214, '{number} {symbol}', 'RD$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 59), -(44, '', 'DZD', 2, ',', 'Algerian dinar', '{sign}{number} {symbol}', 12, '{number} {symbol}', 'د.ج', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 60), -(45, '', 'EGP', 2, ',', 'Egyptian pound', '{sign}{number} {symbol}', 818, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 61), -(46, '', 'ERN', 2, ',', 'Eritrean nakfa', '{sign}{number} {symbol}', 232, '{number} {symbol}', 'Nfk', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 62), -(47, '', 'ETB', 2, ',', 'Ethiopian birr', '{sign}{number} {symbol}', 230, '{number} {symbol}', 'ETB', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 63), -(48, '', 'EUR', 2, ',', 'Euro', '{sign}{number} {symbol}', 978, '{number} {symbol}', '€', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 2), -(49, '', 'FJD', 2, ',', 'Fijian dollar', '{sign}{number} {symbol}', 242, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 64), -(50, '', 'FKP', 2, ',', 'Falkland pound', '{sign}{number} {symbol}', 238, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 65), -(51, '', 'GBP', 2, '.', 'British pound', '{symbol}{sign}{number}', 826, '{symbol}{number}', '£', ',', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 4), -(52, '', 'GEL', 2, ',', 'Georgian lari', '{sign}{number} {symbol}', 981, '{number} {symbol}', 'ლ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 66), -(53, '', 'GHS', 2, ',', 'Ghanaian cedi', '{sign}{number} {symbol}', 936, '{number} {symbol}', '₵', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 67), -(54, '', 'GIP', 2, ',', 'Gibraltar pound', '{sign}{number} {symbol}', 292, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 68), -(55, '', 'GMD', 2, ',', 'Gambian dalasi', '{sign}{number} {symbol}', 270, '{number} {symbol}', 'D', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 69), -(56, '', 'GNF', '', '', 'Guinean franc', '{sign}{number} {symbol}', 324, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 70), -(57, '', 'GTQ', 2, ',', 'Guatemalan quetzal', '{sign}{number} {symbol}', 320, '{number} {symbol}', 'Q', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 71), -(58, '', 'GYD', 2, ',', 'Guyanese dollar', '{sign}{number} {symbol}', 328, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 72), -(59, '', 'HKD', 2, ',', 'Hong Kong dollar', '{sign}{number} {symbol}', 344, '{number} {symbol}', '元', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 13), -(60, '', 'HNL', 2, ',', 'Honduran lempira', '{sign}{number} {symbol}', 340, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 73), -(61, '', 'HRK', 2, ',', 'Croatian kuna', '{sign}{number} {symbol}', 191, '{number} {symbol}', 'kn', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 74), -(62, '', 'HTG', 2, ',', 'Haitian gourde', '{sign}{number} {symbol}', 332, '{number} {symbol}', 'G', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 75), -(63, '', 'HUF', 2, ',', 'Hungarian forint', '{sign}{number} {symbol}', 348, '{number} {symbol}', 'Ft', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 76), -(64, '', 'IDR', '', '', 'Indonesian rupiah', '{symbol}{sign}{number}', 360, '{symbol}{number}', 'Rp', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 77), -(65, '', 'ILS', 2, ',', 'Israeli new sheqel', '{sign}{number} {symbol}', 376, '{number} {symbol}', '₪', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 20), -(66, '', 'INR', 2, ',', 'Indian rupee', '{sign}{number} {symbol}', 356, '{number} {symbol}', '₨', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 16), -(67, '', 'IQD', '', '', 'Iraqi dinar', '{sign}{number} {symbol}', 368, '{number} {symbol}', 'ع.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 78), -(68, '', 'IRR', 2, ',', 'Iranian rial', '{sign}{number}{symb0l}', 364, '{number} {symbol}', '﷼', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 79), -(69, '', 'ISK', 2, ',', 'Icelandic króna', '{sign}{number} {symbol}', 352, '{number} {symbol}', 'kr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 80), -(70, '', 'JMD', 2, ',', 'Jamaican dollar', '{sign}{number} {symbol}', 388, '{number} {symbol}', 'J$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 81), -(71, '', 'JOD', 2, ',', 'Jordanian dinar', '{sign}{number} {symbol}', 400, '{number} {symbol}', 'د.ا', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 82), -(72, '', 'JPY', 2, ',', 'Japanese yen', '{sign}{number} {symbol}', 392, '{number} {symbol}', '¥', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 3), -(73, '', 'KES', 2, ',', 'Kenyan shilling', '{sign}{number} {symbol}', 404, '{number} {symbol}', 'Sh', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 83), -(74, '', 'KGS', 2, ',', 'Kyrgyzstani som', '{sign}{number} {symbol}', 417, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 84), -(75, '', 'KHR', 2, ',', 'Cambodian riel', '{sign}{number} {symbol}', 116, '{number} {symbol}', '៛', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 85), -(76, '', 'KMF', '', '', 'Comorian franc', '{sign}{number} {symbol}', 174, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 86), -(77, '', 'KPW', '', '', 'North Korean won', '{sign}{number} {symbol}', 408, '{number} {symbol}', '₩', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 87), -(78, '', 'KRW', '', '', 'South Korean won', '{sign}{number} {symbol}', 410, '{number} {symbol}', '₩', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 21), -(79, '', 'KWD', 2, ',', 'Kuwaiti dinar', '{sign}{number} {symbol}', 414, '{number} {symbol}', 'د.ك', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 88), -(80, '', 'KYD', 2, ',', 'Cayman Islands dollar', '{sign}{number} {symbol}', 136, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 89), -(81, '', 'KZT', 2, ',', 'Kazakhstani tenge', '{sign}{number} {symbol}', 398, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 90), -(82, '', 'LAK', '', '', 'Lao kip', '{sign}{number} {symbol}', 418, '{number} {symbol}', '₭', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 91), -(83, '', 'LBP', '', '', 'Lebanese pound', '{sign}{number} {symbol}', 422, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 92), -(84, '', 'LKR', 2, ',', 'Sri Lankan rupee', '{sign}{number} {symbol}', 144, '{number} {symbol}', '₨', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 93), -(85, '', 'LRD', 2, ',', 'Liberian dollar', '{sign}{number} {symbol}', 430, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 94), -(86, '', 'LSL', 2, ',', 'Lesotho loti', '{sign}{number} {symbol}', 426, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 95), -(87, '', 'LTL', 2, ',', 'Lithuanian litas', '{sign}{number} {symbol}', 440, '{number} {symbol}', 'Lt', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 96), -(88, '', 'LVL', 2, ',', 'Latvian lats', '{sign}{number} {symbol}', 428, '{number} {symbol}', 'Ls', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 97), -(89, '', 'LYD', 3, ',', 'Libyan dinar', '{sign}{number} {symbol}', 434, '{number} {symbol}', 'ل.د', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 98), -(90, '', 'MAD', 2, ',', 'Moroccan dirham', '{sign}{number} {symbol}', 504, '{number} {symbol}', 'د.م.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 99), -(91, '', 'MDL', 2, ',', 'Moldovan leu', '{sign}{number} {symbol}', 498, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 100), -(92, '', 'MGA', 2, ',', 'Malagasy ariary', '{sign}{number} {symbol}', 969, '{number} {symbol}', 'MGA', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 101), -(93, '', 'MKD', 2, ',', 'Macedonian denar', '{sign}{number} {symbol}', 807, '{number} {symbol}', 'ден', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 102), -(94, '', 'MMK', 2, ',', 'Myanmar kyat', '{symbol} {sign}{number}', 104, '{number} {symbol}', 'K', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 103), -(95, '', 'MNT', 2, ',', 'Mongolian tögrög', '{sign}{number} {symbol}', 496, '{number} {symbol}', '₮', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 104), -(96, '', 'MOP', 1, ',', 'Macanese pataca', '{symbol}{sign}{number}', 446, '{symbol}{number}', 'P', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 105), -(97, '', 'MRO', 2, ',', 'Mauritanian ouguiya', '{sign}{number} {symbol}', 478, '{number} {symbol}', 'UM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 106), -(98, '', 'MUR', 2, ',', 'Mauritian rupee', '{sign}{number} {symbol}', 480, '{number} {symbol}', '₨', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 107), -(99, '', 'MVR', 2, ',', 'Maldivian rufiyaa', '{sign}{number} {symbol}', 462, '{number} {symbol}', 'ރ.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 108), -(100, '', 'MWK', 2, ',', 'Malawian kwacha', '{sign}{number} {symbol}', 454, '{number} {symbol}', 'MK', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 109), -(101, '', 'MXN', 2, ',', 'Mexican peso', '{sign}{number} {symbol}', 484, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 8), -(102, '', 'MXV', 2, ',', 'Mexican Unid', '{sign}{number} {symbol}', 979, '{number} {symbol}', 'MXV', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 110), -(103, '', 'MYR', 2, ',', 'Malaysian ringgit', '{sign}{number} {symbol}', 458, '{number} {symbol}', 'RM', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 111), -(104, '', 'MZN', 2, ',', 'Mozambican metical', '{sign}{number} {symbol}', 943, '{number} {symbol}', 'MT', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 112), -(105, '', 'NAD', 2, ',', 'Namibian dollar', '{symbol} {sign}{number}', 516, '{symbol} {number}', 'N$', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 113), -(106, '', 'NGN', 2, ',', 'Nigerian naira', '{sign}{number} {symbol}', 566, '{number} {symbol}', '₦', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 114), -(107, '', 'NIO', 2, ',', 'Nicaraguan córdoba', '{sign}{number} {symbol}', 558, '{number} {symbol}', 'C$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 115), -(108, '', 'NOK', 2, ',', 'Norwegian krone', '{symbol}{sign}{number}', 578, '{symbol}{number}', 'kr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 18), -(109, '', 'NPR', 2, ',', 'Nepalese rupee', '{sign}{number} {symbol}', 524, '{number} {symbol}', '₨', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 116), -(110, '', 'NZD', 2, ',', 'New Zealand dollar', '{symbol}{sign}{number}', 554, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 10), -(111, '', 'OMR', 3, '.', 'Omani rial', '{sign}{number} {symbol}', 512, '{number} {symbol}', '﷼', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 117), -(112, '', 'PAB', 2, ',', 'Panamanian balboa', '{sign}{number} {symbol}', 590, '{number} {symbol}', 'B/.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 118), -(113, '', 'PEN', 2, ',', 'Peruvian nuevo sol', '{sign}{number} {symbol}', 604, '{number} {symbol}', 'S/.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 119), -(114, '', 'PGK', 2, ',', 'Papua New Guinean kina', '{sign}{number} {symbol}', 598, '{number} {symbol}', 'K', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 120), -(115, '', 'PHP', 2, ',', 'Philippine peso', '{sign}{number} {symbol}', 608, '{number} {symbol}', '₱', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 121), -(116, '', 'PKR', 2, ',', 'Pakistani rupee', '{sign}{number} {symbol}', 586, '{number} {symbol}', '₨', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 122), -(117, '', 'PLN', 2, ',', 'Polish Złoty', '{sign}{number} {symbol}', 985, '{number} {symbol}', 'zł', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 123), -(118, '', 'PYG', '', '', 'Paraguayan guaraní', '{symbol} {sign}{number}', 600, '{symbol} {number}', '₲', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 124), -(119, '', 'QAR', 2, ',', 'Qatari riyal', '{sign}{number} {symbol}', 634, '{number} {symbol}', '﷼', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 125), -(120, '', 'RON', 2, ',', 'Romanian leu', '{sign}{number} {symbol}', 946, '{number} {symbol}', 'lei', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 126), -(121, '', 'RWF', 2, ',', 'Rwandan franc', '{sign}{number} {symbol}', 646, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 128), -(122, '', 'SAR', 2, ',', 'Saudi riyal', '{sign}{number} {symbol}', 682, '{number} {symbol}', '﷼', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 129), -(123, '', 'SBD', 2, ',', 'Solomon Islands dollar', '{sign}{number} {symbol}', 90, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 130), -(124, '', 'SCR', 2, ',', 'Seychellois rupee', '{sign}{number} {symbol}', 690, '{number} {symbol}', '₨', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 131), -(125, '', 'SDG', 2, ',', 'Sudanese pound', '{sign}{number} {symbol}', 938, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 132), -(126, '', 'SEK', 2, ',', 'Swedish krona', '{sign}{number} {symbol}', 752, '{number} {symbol}', 'kr', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 11), -(127, '', 'SGD', 2, ',', 'Singapore dollar', '{sign}{number} {symbol}', 702, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 14), -(128, '', 'SHP', 2, ',', 'Saint Helenian pound', '{sign}{number} {symbol}', 654, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 133), -(129, '', 'SLL', 2, ',', 'Sierra Leonean leone', '{sign}{number} {symbol}', 694, '{number} {symbol}', 'Le', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 134), -(130, '', 'SOS', 2, ',', 'Somali shilling', '{sign}{number} {symbol}', 706, '{number} {symbol}', 'S', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 135), -(131, '', 'SRD', 2, ',', 'Surinamese dollar', '{sign}{number} {symbol}', 968, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 136), -(132, '', 'STD', '', '', 'São Tomé and Príncipe dobra', '{sign}{number} {symbol}', 678, '{number} {symbol}', 'Db', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 137), -(133, '', 'RUB', 2, ',', 'Russian ruble', '{sign}{number} {symbol}', 643, '{number} {symbol}', 'руб', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 12), -(134, '', 'SVC', 2, ',', 'Salvadoran colón', '{sign}{number} {symbol}', 222, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 138), -(135, '', 'SYP', 2, ',', 'Syrian pound', '{sign}{number} {symbol}', 760, '{number} {symbol}', '£', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 139), -(136, '', 'SZL', 2, ',', 'Swazi lilangeni', '{sign}{number} {symbol}', 748, '{number} {symbol}', 'L', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 140), -(137, '', 'THB', 2, ',', 'Thai baht', '{sign}{number} {symbol}', 764, '{number} {symbol}', '฿', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 141), -(138, '', 'TJS', 2, ',', 'Tajikistani somoni', '{sign}{number} {symbol}', 972, '{number} {symbol}', 'ЅМ', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 142), -(139, '', 'TND', 3, ',', 'Tunisian dinar', '{sign}{number} {symbol}', 788, '{number} {symbol}', 'د.ت', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 143), -(140, '', 'TOP', 2, ',', 'Tongan paʻanga', '{sign}{number} {symbol}', 776, '{number} {symbol}', 'T$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 144), -(141, '', 'TRY', 2, ',', 'Turkish new lira', '{sign}{number} {symbol}', 949, '{number} {symbol}', 'YTL', '.', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 15), -(142, '', 'TTD', 2, ',', 'Trinidad and Tobago dollar', '{sign}{number} {symbol}', 780, '{number} {symbol}', 'TT$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 145), -(143, '', 'TWD', 2, ',', 'New Taiwan dollar', '{sign}{number} {symbol}', 901, '{number} {symbol}', 'NT$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 146), -(144, '', 'TZS', 2, ',', 'Tanzanian shilling', '{sign}{number} {symbol}', 834, '{number} {symbol}', 'Sh', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 147), -(145, '', 'UAH', 2, ',', 'Ukrainian hryvnia', '{sign}{number} {symbol}', 980, '{number} {symbol}', '₴', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 148), -(146, '', 'UGX', 2, ',', 'Ugandan shilling', '{sign}{number} {symbol}', 800, '{number} {symbol}', 'Sh', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 149), -(147, '', 'USD', 2, '.', 'United States dollar', '{symbol}{sign}{number}', 840, '{symbol}{number}', '$', ',', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 1), -(148, '', 'UYI', 2, ',', 'Uruguay Peso', '{sign}{number} {symbol}', 940, '{number} {symbol}', 'UYI', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 150), -(149, '', 'UYU', '', '', 'Uruguayan peso', '{symbol}{sign}{number}', 858, '{symbol} {number}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 151), -(150, '', 'UZS', 2, ',', 'Uzbekistani som', '{sign}{number} {symbol}', 860, '{number} {symbol}', 'лв', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 152), -(151, '', 'VEF', 2, ',', 'Venezuelan bolívar', '{sign}{number} {symbol}', 937, '{number} {symbol}', 'Bs', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 153), -(152, '', 'VND', '', '', 'Vietnamese Dong', '{sign}{number} {symbol}', 704, '{number} {symbol}', '₫', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 154), -(153, '', 'VUV', 2, ',', 'Vanuatu vatu', '{sign}{number} {symbol}', 548, '{number} {symbol}', 'Vt', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 155), -(154, '', 'WST', 2, ',', 'Samoan tala', '{sign}{number} {symbol}', 882, '{number} {symbol}', 'T', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 156), -(155, '', 'XAF', '', '', 'Central African CFA franc', '{sign}{number} {symbol}', 950, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 157), -(156, '', 'XCD', 2, ',', 'East Caribbean dollar', '{sign}{number} {symbol}', 951, '{number} {symbol}', '$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 158), -(157, '', 'XOF', 2, ',', 'West African CFA franc', '{sign}{number} {symbol}', 952, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 159), -(158, '', 'XPF', 2, ',', 'CFP franc', '{sign}{number} {symbol}', 953, '{number} {symbol}', 'Fr', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 160), -(159, '', 'YER', 2, ',', 'Yemeni rial', '{sign}{number} {symbol}', 886, '{number} {symbol}', '﷼', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 161), -(160, '', 'RSD', 2, ',', 'Serbian dinar', '{sign}{number} {symbol}', 941, '{number} {symbol}', 'Дин.', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 127), -(161, 'south-african-rand', 'ZAR', 2, ',', 'South African rand', '{symbol} {sign}{number}', 710, '{symbol} {number}', 'R', '', '', 1, '', 845, '0000-00-00 00:00:00', '2015-08-30 22:07:36', '', '0000-00-00 00:00:00', 2, '', 5, 22), -(162, '', 'ZMK', 2, ',', 'Zambian kwacha', '{sign}{number} {symbol}', 894, '{number} {symbol}', 'ZK', '', '', 1, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 162), -(163, '', 'ZWD', 2, ',', 'Zimbabwean dollar', '{sign}{number} {symbol}', 932, '{number} {symbol}', 'Z$', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 163), -(164, '', 'ZZZ', 2, ',', 'Reserved', '', '', '', 'O', '', '', 2, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 1, '', '', 164); -- --- Always insure this column is large enough for all the access control values. +-- Always insure this column rules is large enough for all the access control values. -- ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.'; + +-- +-- Always insure this column name is large enough for long component and view names. +-- +ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.'; diff --git a/admin/sql/updates/mysql/3.4.2.sql b/admin/sql/updates/mysql/3.4.2.sql new file mode 100644 index 00000000..d3f5a12f --- /dev/null +++ b/admin/sql/updates/mysql/3.4.2.sql @@ -0,0 +1 @@ + diff --git a/admin/tables/causerisk.php b/admin/tables/causerisk.php index 0b514af7..5e5092ba 100644 --- a/admin/tables/causerisk.php +++ b/admin/tables/causerisk.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage causerisk.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableCauserisk extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,29 @@ class CostbenefitprojectionTableCauserisk extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->name; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + } + + return $this->alias; } } diff --git a/admin/tables/company.php b/admin/tables/company.php index 26c42d7d..e1a3f136 100644 --- a/admin/tables/company.php +++ b/admin/tables/company.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 101 of this MVC + @build 29th June, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage company.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableCompany extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,16 @@ class CostbenefitprojectionTableCompany extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * This view does not actually have an alias + * + * @return bool + */ + public function generateAlias() + { + return false; } } diff --git a/admin/tables/country.php b/admin/tables/country.php index 81b5ab5d..f8e23273 100644 --- a/admin/tables/country.php +++ b/admin/tables/country.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 52 of this MVC + @build 25th October, 2017 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage country.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableCountry extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,29 @@ class CostbenefitprojectionTableCountry extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->name; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + } + + return $this->alias; } } diff --git a/admin/tables/currency.php b/admin/tables/currency.php index 2b6002d8..487d5c39 100644 --- a/admin/tables/currency.php +++ b/admin/tables/currency.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage currency.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableCurrency extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,29 @@ class CostbenefitprojectionTableCurrency extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->name; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + } + + return $this->alias; } } diff --git a/admin/tables/health_data.php b/admin/tables/health_data.php index 631afe88..8213bf83 100644 --- a/admin/tables/health_data.php +++ b/admin/tables/health_data.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage health_data.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableHealth_data extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,16 @@ class CostbenefitprojectionTableHealth_data extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * This view does not actually have an alias + * + * @return bool + */ + public function generateAlias() + { + return false; } } diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php index 782e440d..05f6d5c1 100644 --- a/admin/tables/help_document.php +++ b/admin/tables/help_document.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 13th April, 2018 + @created 13th July, 2015 @package Cost Benefit Projection @subpackage help_document.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableHelp_document extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,29 @@ class CostbenefitprojectionTableHelp_document extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->title; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + } + + return $this->alias; } } diff --git a/admin/tables/intervention.php b/admin/tables/intervention.php index b0e8d1e4..85576724 100644 --- a/admin/tables/intervention.php +++ b/admin/tables/intervention.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 71 of this MVC + @build 12th November, 2016 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage intervention.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableIntervention extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,16 @@ class CostbenefitprojectionTableIntervention extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * This view does not actually have an alias + * + * @return bool + */ + public function generateAlias() + { + return false; } } diff --git a/admin/tables/scaling_factor.php b/admin/tables/scaling_factor.php index b19ee1dc..ce94d8c3 100644 --- a/admin/tables/scaling_factor.php +++ b/admin/tables/scaling_factor.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 + @version @update number 21 of this MVC @build 16th August, 2016 - @created 15th June, 2012 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage scaling_factor.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableScaling_factor extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,16 @@ class CostbenefitprojectionTableScaling_factor extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * This view does not actually have an alias + * + * @return bool + */ + public function generateAlias() + { + return false; } } diff --git a/admin/tables/service_provider.php b/admin/tables/service_provider.php index 155000c0..12365e92 100644 --- a/admin/tables/service_provider.php +++ b/admin/tables/service_provider.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 35 of this MVC + @build 22nd March, 2016 + @created 25th July, 2015 @package Cost Benefit Projection @subpackage service_provider.php @author Llewellyn van der Merwe @@ -259,7 +259,7 @@ class CostbenefitprojectionTableService_provider extends JTable } } // check if there are any view values remaining - if (count($_result)) + if (count( (array) $_result)) { $_result = json_encode($_result); $_result = array($_result); @@ -317,29 +317,16 @@ class CostbenefitprojectionTableService_provider extends JTable $asset->loadByName('com_costbenefitprojection'); return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); - } - - return $this->alias; + } + + /** + * This view does not actually have an alias + * + * @return bool + */ + public function generateAlias() + { + return false; } } diff --git a/admin/views/causerisk/submitbutton.js b/admin/views/causerisk/submitbutton.js index 1f9d8d07..803dcd4a 100644 --- a/admin/views/causerisk/submitbutton.js +++ b/admin/views/causerisk/submitbutton.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage submitbutton.js @author Llewellyn van der Merwe diff --git a/admin/views/causerisk/tmpl/edit.php b/admin/views/causerisk/tmpl/edit.php index 845fa78b..97a5b95b 100644 --- a/admin/views/causerisk/tmpl/edit.php +++ b/admin/views/causerisk/tmpl/edit.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage edit.php @author Llewellyn van der Merwe @@ -30,7 +30,8 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
-
+ +
'details')); ?> @@ -88,6 +89,7 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
+
diff --git a/admin/views/causerisk/view.html.php b/admin/views/causerisk/view.html.php index 612031d4..bbde308f 100644 --- a/admin/views/causerisk/view.html.php +++ b/admin/views/causerisk/view.html.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage view.html.php @author Llewellyn van der Merwe @@ -34,38 +34,37 @@ class CostbenefitprojectionViewCauserisk extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables - $this->form = $this->get('Form'); - $this->item = $this->get('Item'); - $this->script = $this->get('Script'); - $this->state = $this->get('State'); - // get action permissions - $this->canDo = CostbenefitprojectionHelper::getActions('causerisk',$this->item); + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = CostbenefitprojectionHelper::getActions('causerisk',$this->item); // get input $jinput = JFactory::getApplication()->input; - $this->ref = $jinput->get('ref', 0, 'word'); - $this->refid = $jinput->get('refid', 0, 'int'); - $this->referral = ''; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $this->referral = ''; if ($this->refid) - { - // return to the item that refered to this item - $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; - } - elseif($this->ref) - { - // return to the list view that refered to this item - $this->referral = '&ref='.(string)$this->ref; - } + { + // return to the item that refered to this item + $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that refered to this item + $this->referral = '&ref='.(string)$this->ref; + } // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); @@ -158,7 +157,7 @@ class CostbenefitprojectionViewCauserisk extends JViewLegacy } } - /** + /** * Escapes a value for output in a view script. * * @param mixed $var The output to escape. @@ -172,7 +171,7 @@ class CostbenefitprojectionViewCauserisk extends JViewLegacy // use the helper htmlEscape method instead and shorten the string return CostbenefitprojectionHelper::htmlEscape($var, $this->_charset, true, 30); } - // use the helper htmlEscape method instead. + // use the helper htmlEscape method instead. return CostbenefitprojectionHelper::htmlEscape($var, $this->_charset); } @@ -184,11 +183,14 @@ class CostbenefitprojectionViewCauserisk extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COSTBENEFITPROJECTION_CAUSERISK_NEW' : 'COM_COSTBENEFITPROJECTION_CAUSERISK_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_costbenefitprojection/assets/css/causerisk.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_costbenefitprojection/views/causerisk/submitbutton.js"); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_($isNew ? 'COM_COSTBENEFITPROJECTION_CAUSERISK_NEW' : 'COM_COSTBENEFITPROJECTION_CAUSERISK_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_costbenefitprojection/assets/css/causerisk.css", (CostbenefitprojectionHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addScript(JURI::root() . $this->script, (CostbenefitprojectionHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_costbenefitprojection/views/causerisk/submitbutton.js", (CostbenefitprojectionHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/causesrisks/tmpl/default.php b/admin/views/causesrisks/tmpl/default.php index 87c1db0b..69fcd693 100644 --- a/admin/views/causesrisks/tmpl/default.php +++ b/admin/views/causesrisks/tmpl/default.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage default.php @author Llewellyn van der Merwe diff --git a/admin/views/causesrisks/tmpl/default_batch_body.php b/admin/views/causesrisks/tmpl/default_batch_body.php index f64c8132..aca1d830 100644 --- a/admin/views/causesrisks/tmpl/default_batch_body.php +++ b/admin/views/causesrisks/tmpl/default_batch_body.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage default_batch_body.php @author Llewellyn van der Merwe diff --git a/admin/views/causesrisks/tmpl/default_batch_footer.php b/admin/views/causesrisks/tmpl/default_batch_footer.php index 786ff208..1f273ab4 100644 --- a/admin/views/causesrisks/tmpl/default_batch_footer.php +++ b/admin/views/causesrisks/tmpl/default_batch_footer.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage default_batch_footer.php @author Llewellyn van der Merwe diff --git a/admin/views/causesrisks/tmpl/default_body.php b/admin/views/causesrisks/tmpl/default_body.php index 697ff2d8..a3051505 100644 --- a/admin/views/causesrisks/tmpl/default_body.php +++ b/admin/views/causesrisks/tmpl/default_body.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage default_body.php @author Llewellyn van der Merwe diff --git a/admin/views/causesrisks/tmpl/default_foot.php b/admin/views/causesrisks/tmpl/default_foot.php index e9d9762f..3393305c 100644 --- a/admin/views/causesrisks/tmpl/default_foot.php +++ b/admin/views/causesrisks/tmpl/default_foot.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage default_foot.php @author Llewellyn van der Merwe diff --git a/admin/views/causesrisks/tmpl/default_head.php b/admin/views/causesrisks/tmpl/default_head.php index 6c1715fc..4b78939e 100644 --- a/admin/views/causesrisks/tmpl/default_head.php +++ b/admin/views/causesrisks/tmpl/default_head.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage default_head.php @author Llewellyn van der Merwe diff --git a/admin/views/causesrisks/tmpl/default_toolbar.php b/admin/views/causesrisks/tmpl/default_toolbar.php index 87825a86..28e060d3 100644 --- a/admin/views/causesrisks/tmpl/default_toolbar.php +++ b/admin/views/causesrisks/tmpl/default_toolbar.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage default_toolbar.php @author Llewellyn van der Merwe diff --git a/admin/views/causesrisks/view.html.php b/admin/views/causesrisks/view.html.php index f22c0e6a..9230a5ff 100644 --- a/admin/views/causesrisks/view.html.php +++ b/admin/views/causesrisks/view.html.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 20 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage view.html.php @author Llewellyn van der Merwe @@ -40,39 +40,38 @@ class CostbenefitprojectionViewCausesrisks extends JViewLegacy CostbenefitprojectionHelper::addSubmenu('causesrisks'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->user = JFactory::getUser(); - $this->listOrder = $this->escape($this->state->get('list.ordering')); - $this->listDirn = $this->escape($this->state->get('list.direction')); - $this->saveOrder = $this->listOrder == 'ordering'; - // get global action permissions - $this->canDo = CostbenefitprojectionHelper::getActions('causerisk'); - $this->canEdit = $this->canDo->get('causerisk.edit'); - $this->canState = $this->canDo->get('causerisk.edit.state'); - $this->canCreate = $this->canDo->get('causerisk.create'); - $this->canDelete = $this->canDo->get('causerisk.delete'); - $this->canBatch = $this->canDo->get('core.batch'); + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->user = JFactory::getUser(); + $this->listOrder = $this->escape($this->state->get('list.ordering')); + $this->listDirn = $this->escape($this->state->get('list.direction')); + $this->saveOrder = $this->listOrder == 'ordering'; + // get global action permissions + $this->canDo = CostbenefitprojectionHelper::getActions('causerisk'); + $this->canEdit = $this->canDo->get('causerisk.edit'); + $this->canState = $this->canDo->get('causerisk.edit.state'); + $this->canCreate = $this->canDo->get('causerisk.create'); + $this->canDelete = $this->canDo->get('causerisk.delete'); + $this->canBatch = $this->canDo->get('core.batch'); // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') { $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); - // load the batch html - if ($this->canCreate && $this->canEdit && $this->canState) - { - $this->batchDisplay = JHtmlBatch_::render(); - } + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); } // Display the template @@ -89,96 +88,96 @@ class CostbenefitprojectionViewCausesrisks extends JViewLegacy { JToolBarHelper::title(JText::_('COM_COSTBENEFITPROJECTION_CAUSESRISKS'), 'flash'); JHtmlSidebar::setAction('index.php?option=com_costbenefitprojection&view=causesrisks'); - JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); if ($this->canCreate) - { + { JToolBarHelper::addNew('causerisk.add'); } - // Only load if there are items - if (CostbenefitprojectionHelper::checkArray($this->items)) + // Only load if there are items + if (CostbenefitprojectionHelper::checkArray($this->items)) { - if ($this->canEdit) - { - JToolBarHelper::editList('causerisk.edit'); - } + if ($this->canEdit) + { + JToolBarHelper::editList('causerisk.edit'); + } - if ($this->canState) - { - JToolBarHelper::publishList('causesrisks.publish'); - JToolBarHelper::unpublishList('causesrisks.unpublish'); - JToolBarHelper::archiveList('causesrisks.archive'); + if ($this->canState) + { + JToolBarHelper::publishList('causesrisks.publish'); + JToolBarHelper::unpublishList('causesrisks.unpublish'); + JToolBarHelper::archiveList('causesrisks.archive'); - if ($this->canDo->get('core.admin')) - { - JToolBarHelper::checkin('causesrisks.checkin'); - } - } + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('causesrisks.checkin'); + } + } - // Add a batch button - if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) - { - // Get the toolbar object instance - $bar = JToolBar::getInstance('toolbar'); - // set the batch button name - $title = JText::_('JTOOLBAR_BATCH'); - // Instantiate a new JLayoutFile instance and render the batch button - $layout = new JLayoutFile('joomla.toolbar.batch'); - // add the button to the page - $dhtml = $layout->render(array('title' => $title)); - $bar->appendButton('Custom', $dhtml, 'batch'); - } + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } - if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) - { - JToolbarHelper::deleteList('', 'causesrisks.delete', 'JTOOLBAR_EMPTY_TRASH'); - } - elseif ($this->canState && $this->canDelete) - { - JToolbarHelper::trash('causesrisks.trash'); - } + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'causesrisks.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('causesrisks.trash'); + } if ($this->canDo->get('core.export') && $this->canDo->get('causerisk.export')) { JToolBarHelper::custom('causesrisks.exportData', 'download', '', 'COM_COSTBENEFITPROJECTION_EXPORT_DATA', true); } - } + } if ($this->canDo->get('core.import') && $this->canDo->get('causerisk.import')) { JToolBarHelper::custom('causesrisks.importData', 'upload', '', 'COM_COSTBENEFITPROJECTION_IMPORT_DATA', false); } - // set help url for this view if found - $help_url = CostbenefitprojectionHelper::getHelpUrl('causesrisks'); - if (CostbenefitprojectionHelper::checkString($help_url)) - { - JToolbarHelper::help('COM_COSTBENEFITPROJECTION_HELP_MANAGER', false, $help_url); - } + // set help url for this view if found + $help_url = CostbenefitprojectionHelper::getHelpUrl('causesrisks'); + if (CostbenefitprojectionHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COSTBENEFITPROJECTION_HELP_MANAGER', false, $help_url); + } - // add the options comp button - if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) - { - JToolBarHelper::preferences('com_costbenefitprojection'); - } + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_costbenefitprojection'); + } - if ($this->canState) - { + if ($this->canState) + { JHtmlSidebar::addFilter( JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_COSTBENEFITPROJECTION_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } + // only load if batch allowed + if ($this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COSTBENEFITPROJECTION_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } } JHtmlSidebar::addFilter( @@ -190,11 +189,11 @@ class CostbenefitprojectionViewCausesrisks extends JViewLegacy if ($this->canBatch && $this->canCreate && $this->canEdit) { JHtmlBatch_::addListSelection( - JText::_('COM_COSTBENEFITPROJECTION_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + JText::_('COM_COSTBENEFITPROJECTION_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') ); - } + } } /** @@ -204,12 +203,15 @@ class CostbenefitprojectionViewCausesrisks extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COSTBENEFITPROJECTION_CAUSESRISKS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_costbenefitprojection/assets/css/causesrisks.css"); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COSTBENEFITPROJECTION_CAUSESRISKS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_costbenefitprojection/assets/css/causesrisks.css", (CostbenefitprojectionHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); } - /** + /** * Escapes a value for output in a view script. * * @param mixed $var The output to escape. @@ -220,10 +222,10 @@ class CostbenefitprojectionViewCausesrisks extends JViewLegacy { if(strlen($var) > 50) { - // use the helper htmlEscape method instead and shorten the string + // use the helper htmlEscape method instead and shorten the string return CostbenefitprojectionHelper::htmlEscape($var, $this->_charset, true); } - // use the helper htmlEscape method instead. + // use the helper htmlEscape method instead. return CostbenefitprojectionHelper::htmlEscape($var, $this->_charset); } @@ -241,5 +243,5 @@ class CostbenefitprojectionViewCausesrisks extends JViewLegacy 'a.ref' => JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_REF_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } + } } diff --git a/admin/views/combinedresults/tmpl/default.php b/admin/views/combinedresults/tmpl/default.php index 6e3d7d63..7ec6dccc 100644 --- a/admin/views/combinedresults/tmpl/default.php +++ b/admin/views/combinedresults/tmpl/default.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 22 of this MVC + @build 14th October, 2017 + @created 3rd October, 2015 @package Cost Benefit Projection @subpackage default.php @author Llewellyn van der Merwe @@ -29,7 +29,7 @@ JHtml::_('behavior.keepalive'); canDo->get('combinedresults.access')): ?> +
diff --git a/admin/views/currency/view.html.php b/admin/views/currency/view.html.php index 6240d0a6..96350ce9 100644 --- a/admin/views/currency/view.html.php +++ b/admin/views/currency/view.html.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 19 of this MVC + @build 25th October, 2017 + @created 8th July, 2015 @package Cost Benefit Projection @subpackage view.html.php @author Llewellyn van der Merwe @@ -34,38 +34,37 @@ class CostbenefitprojectionViewCurrency extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables - $this->form = $this->get('Form'); - $this->item = $this->get('Item'); - $this->script = $this->get('Script'); - $this->state = $this->get('State'); - // get action permissions - $this->canDo = CostbenefitprojectionHelper::getActions('currency',$this->item); + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = CostbenefitprojectionHelper::getActions('currency',$this->item); // get input $jinput = JFactory::getApplication()->input; - $this->ref = $jinput->get('ref', 0, 'word'); - $this->refid = $jinput->get('refid', 0, 'int'); - $this->referral = ''; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $this->referral = ''; if ($this->refid) - { - // return to the item that refered to this item - $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; - } - elseif($this->ref) - { - // return to the list view that refered to this item - $this->referral = '&ref='.(string)$this->ref; - } + { + // return to the item that refered to this item + $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that refered to this item + $this->referral = '&ref='.(string)$this->ref; + } // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); @@ -158,7 +157,7 @@ class CostbenefitprojectionViewCurrency extends JViewLegacy } } - /** + /** * Escapes a value for output in a view script. * * @param mixed $var The output to escape. @@ -172,7 +171,7 @@ class CostbenefitprojectionViewCurrency extends JViewLegacy // use the helper htmlEscape method instead and shorten the string return CostbenefitprojectionHelper::htmlEscape($var, $this->_charset, true, 30); } - // use the helper htmlEscape method instead. + // use the helper htmlEscape method instead. return CostbenefitprojectionHelper::htmlEscape($var, $this->_charset); } @@ -184,11 +183,14 @@ class CostbenefitprojectionViewCurrency extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COSTBENEFITPROJECTION_CURRENCY_NEW' : 'COM_COSTBENEFITPROJECTION_CURRENCY_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_costbenefitprojection/assets/css/currency.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_costbenefitprojection/views/currency/submitbutton.js"); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_($isNew ? 'COM_COSTBENEFITPROJECTION_CURRENCY_NEW' : 'COM_COSTBENEFITPROJECTION_CURRENCY_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_costbenefitprojection/assets/css/currency.css", (CostbenefitprojectionHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addScript(JURI::root() . $this->script, (CostbenefitprojectionHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_costbenefitprojection/views/currency/submitbutton.js", (CostbenefitprojectionHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/health_data/submitbutton.js b/admin/views/health_data/submitbutton.js index 37155d5d..65bb0d6a 100644 --- a/admin/views/health_data/submitbutton.js +++ b/admin/views/health_data/submitbutton.js @@ -2,9 +2,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage submitbutton.js @author Llewellyn van der Merwe diff --git a/admin/views/health_data/tmpl/edit.php b/admin/views/health_data/tmpl/edit.php index 5bfc60de..2b42e584 100644 --- a/admin/views/health_data/tmpl/edit.php +++ b/admin/views/health_data/tmpl/edit.php @@ -3,9 +3,9 @@ Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb /-------------------------------------------------------------------------------------------------------/ - @version 3.4.2 - @build 16th August, 2016 - @created 15th June, 2012 + @version @update number 109 of this MVC + @build 23rd May, 2016 + @created 15th July, 2015 @package Cost Benefit Projection @subpackage edit.php @author Llewellyn van der Merwe @@ -30,7 +30,9 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
-
+ +
+
'details')); ?> @@ -83,6 +85,7 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
+
@@ -92,6 +95,7 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');