Cost Benefit Projection (v.3.2.0)
+ Cost Benefit Projection (v.3.3.0)
[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.
diff --git a/script.php b/script.php
index 9aa35b52..7558dfa5 100644
--- a/script.php
+++ b/script.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage script.php
@@ -47,794 +47,794 @@ class com_costbenefitprojectionInstallerScript
*/
function uninstall($parent)
{
- // [4513] Get Application object
+ // Get Application object
$app = JFactory::getApplication();
- // [4515] Get The Database object
+ // Get The Database object
$db = JFactory::getDbo();
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Company alias is found
+ // Where Company alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.company') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$company_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($company_found)
{
- // [4538] Since there are load the needed company type ids
+ // Since there are load the needed company type ids
$company_ids = $db->loadColumn();
- // [4542] Remove Company from the content type table
+ // Remove Company from the content type table
$company_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.company') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($company_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Company items
+ // Execute the query to remove Company items
$company_done = $db->execute();
if ($company_done);
{
- // [4553] If succesfully remove Company add queued success message.
+ // If succesfully remove Company add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.company) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Company items from the contentitem tag map table
+ // Remove Company items from the contentitem tag map table
$company_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.company') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($company_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Company items
+ // Execute the query to remove Company items
$company_done = $db->execute();
if ($company_done);
{
- // [4570] If succesfully remove Company add queued success message.
+ // If succesfully remove Company add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.company) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Company items from the ucm content table
+ // Remove Company items from the ucm content table
$company_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.company') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($company_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Company items
+ // Execute the query to remove Company items
$company_done = $db->execute();
if ($company_done);
{
- // [4587] If succesfully remove Company add queued success message.
+ // If succesfully remove Company add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.company) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Company items are cleared from DB
+ // Make sure that all the Company items are cleared from DB
foreach ($company_ids as $company_id)
{
- // [4598] Remove Company items from the ucm base table
+ // Remove Company items from the ucm base table
$company_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $company_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($company_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Company items
+ // Execute the query to remove Company items
$db->execute();
- // [4609] Remove Company items from the ucm history table
+ // Remove Company items from the ucm history table
$company_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $company_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($company_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Company items
+ // Execute the query to remove Company items
$db->execute();
}
}
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Service_provider alias is found
+ // Where Service_provider alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.service_provider') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$service_provider_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($service_provider_found)
{
- // [4538] Since there are load the needed service_provider type ids
+ // Since there are load the needed service_provider type ids
$service_provider_ids = $db->loadColumn();
- // [4542] Remove Service_provider from the content type table
+ // Remove Service_provider from the content type table
$service_provider_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.service_provider') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($service_provider_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Service_provider items
+ // Execute the query to remove Service_provider items
$service_provider_done = $db->execute();
if ($service_provider_done);
{
- // [4553] If succesfully remove Service_provider add queued success message.
+ // If succesfully remove Service_provider add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.service_provider) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Service_provider items from the contentitem tag map table
+ // Remove Service_provider items from the contentitem tag map table
$service_provider_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.service_provider') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($service_provider_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Service_provider items
+ // Execute the query to remove Service_provider items
$service_provider_done = $db->execute();
if ($service_provider_done);
{
- // [4570] If succesfully remove Service_provider add queued success message.
+ // If succesfully remove Service_provider add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.service_provider) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Service_provider items from the ucm content table
+ // Remove Service_provider items from the ucm content table
$service_provider_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.service_provider') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($service_provider_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Service_provider items
+ // Execute the query to remove Service_provider items
$service_provider_done = $db->execute();
if ($service_provider_done);
{
- // [4587] If succesfully remove Service_provider add queued success message.
+ // If succesfully remove Service_provider add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.service_provider) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Service_provider items are cleared from DB
+ // Make sure that all the Service_provider items are cleared from DB
foreach ($service_provider_ids as $service_provider_id)
{
- // [4598] Remove Service_provider items from the ucm base table
+ // Remove Service_provider items from the ucm base table
$service_provider_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $service_provider_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($service_provider_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Service_provider items
+ // Execute the query to remove Service_provider items
$db->execute();
- // [4609] Remove Service_provider items from the ucm history table
+ // Remove Service_provider items from the ucm history table
$service_provider_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $service_provider_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($service_provider_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Service_provider items
+ // Execute the query to remove Service_provider items
$db->execute();
}
}
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Country alias is found
+ // Where Country alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.country') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$country_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($country_found)
{
- // [4538] Since there are load the needed country type ids
+ // Since there are load the needed country type ids
$country_ids = $db->loadColumn();
- // [4542] Remove Country from the content type table
+ // Remove Country from the content type table
$country_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.country') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($country_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Country items
+ // Execute the query to remove Country items
$country_done = $db->execute();
if ($country_done);
{
- // [4553] If succesfully remove Country add queued success message.
+ // If succesfully remove Country add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.country) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Country items from the contentitem tag map table
+ // Remove Country items from the contentitem tag map table
$country_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.country') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($country_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Country items
+ // Execute the query to remove Country items
$country_done = $db->execute();
if ($country_done);
{
- // [4570] If succesfully remove Country add queued success message.
+ // If succesfully remove Country add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.country) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Country items from the ucm content table
+ // Remove Country items from the ucm content table
$country_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.country') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($country_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Country items
+ // Execute the query to remove Country items
$country_done = $db->execute();
if ($country_done);
{
- // [4587] If succesfully remove Country add queued success message.
+ // If succesfully remove Country add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.country) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Country items are cleared from DB
+ // Make sure that all the Country items are cleared from DB
foreach ($country_ids as $country_id)
{
- // [4598] Remove Country items from the ucm base table
+ // Remove Country items from the ucm base table
$country_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $country_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($country_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Country items
+ // Execute the query to remove Country items
$db->execute();
- // [4609] Remove Country items from the ucm history table
+ // Remove Country items from the ucm history table
$country_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $country_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($country_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Country items
+ // Execute the query to remove Country items
$db->execute();
}
}
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Causerisk alias is found
+ // Where Causerisk alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.causerisk') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$causerisk_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($causerisk_found)
{
- // [4538] Since there are load the needed causerisk type ids
+ // Since there are load the needed causerisk type ids
$causerisk_ids = $db->loadColumn();
- // [4542] Remove Causerisk from the content type table
+ // Remove Causerisk from the content type table
$causerisk_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.causerisk') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($causerisk_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Causerisk items
+ // Execute the query to remove Causerisk items
$causerisk_done = $db->execute();
if ($causerisk_done);
{
- // [4553] If succesfully remove Causerisk add queued success message.
+ // If succesfully remove Causerisk add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.causerisk) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Causerisk items from the contentitem tag map table
+ // Remove Causerisk items from the contentitem tag map table
$causerisk_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.causerisk') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($causerisk_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Causerisk items
+ // Execute the query to remove Causerisk items
$causerisk_done = $db->execute();
if ($causerisk_done);
{
- // [4570] If succesfully remove Causerisk add queued success message.
+ // If succesfully remove Causerisk add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.causerisk) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Causerisk items from the ucm content table
+ // Remove Causerisk items from the ucm content table
$causerisk_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.causerisk') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($causerisk_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Causerisk items
+ // Execute the query to remove Causerisk items
$causerisk_done = $db->execute();
if ($causerisk_done);
{
- // [4587] If succesfully remove Causerisk add queued success message.
+ // If succesfully remove Causerisk add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.causerisk) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Causerisk items are cleared from DB
+ // Make sure that all the Causerisk items are cleared from DB
foreach ($causerisk_ids as $causerisk_id)
{
- // [4598] Remove Causerisk items from the ucm base table
+ // Remove Causerisk items from the ucm base table
$causerisk_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $causerisk_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($causerisk_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Causerisk items
+ // Execute the query to remove Causerisk items
$db->execute();
- // [4609] Remove Causerisk items from the ucm history table
+ // Remove Causerisk items from the ucm history table
$causerisk_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $causerisk_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($causerisk_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Causerisk items
+ // Execute the query to remove Causerisk items
$db->execute();
}
}
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Health_data alias is found
+ // Where Health_data alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.health_data') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$health_data_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($health_data_found)
{
- // [4538] Since there are load the needed health_data type ids
+ // Since there are load the needed health_data type ids
$health_data_ids = $db->loadColumn();
- // [4542] Remove Health_data from the content type table
+ // Remove Health_data from the content type table
$health_data_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.health_data') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($health_data_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Health_data items
+ // Execute the query to remove Health_data items
$health_data_done = $db->execute();
if ($health_data_done);
{
- // [4553] If succesfully remove Health_data add queued success message.
+ // If succesfully remove Health_data add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.health_data) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Health_data items from the contentitem tag map table
+ // Remove Health_data items from the contentitem tag map table
$health_data_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.health_data') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($health_data_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Health_data items
+ // Execute the query to remove Health_data items
$health_data_done = $db->execute();
if ($health_data_done);
{
- // [4570] If succesfully remove Health_data add queued success message.
+ // If succesfully remove Health_data add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.health_data) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Health_data items from the ucm content table
+ // Remove Health_data items from the ucm content table
$health_data_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.health_data') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($health_data_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Health_data items
+ // Execute the query to remove Health_data items
$health_data_done = $db->execute();
if ($health_data_done);
{
- // [4587] If succesfully remove Health_data add queued success message.
+ // If succesfully remove Health_data add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.health_data) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Health_data items are cleared from DB
+ // Make sure that all the Health_data items are cleared from DB
foreach ($health_data_ids as $health_data_id)
{
- // [4598] Remove Health_data items from the ucm base table
+ // Remove Health_data items from the ucm base table
$health_data_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $health_data_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($health_data_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Health_data items
+ // Execute the query to remove Health_data items
$db->execute();
- // [4609] Remove Health_data items from the ucm history table
+ // Remove Health_data items from the ucm history table
$health_data_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $health_data_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($health_data_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Health_data items
+ // Execute the query to remove Health_data items
$db->execute();
}
}
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Scaling_factor alias is found
+ // Where Scaling_factor alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.scaling_factor') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$scaling_factor_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($scaling_factor_found)
{
- // [4538] Since there are load the needed scaling_factor type ids
+ // Since there are load the needed scaling_factor type ids
$scaling_factor_ids = $db->loadColumn();
- // [4542] Remove Scaling_factor from the content type table
+ // Remove Scaling_factor from the content type table
$scaling_factor_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.scaling_factor') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($scaling_factor_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Scaling_factor items
+ // Execute the query to remove Scaling_factor items
$scaling_factor_done = $db->execute();
if ($scaling_factor_done);
{
- // [4553] If succesfully remove Scaling_factor add queued success message.
+ // If succesfully remove Scaling_factor add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.scaling_factor) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Scaling_factor items from the contentitem tag map table
+ // Remove Scaling_factor items from the contentitem tag map table
$scaling_factor_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.scaling_factor') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($scaling_factor_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Scaling_factor items
+ // Execute the query to remove Scaling_factor items
$scaling_factor_done = $db->execute();
if ($scaling_factor_done);
{
- // [4570] If succesfully remove Scaling_factor add queued success message.
+ // If succesfully remove Scaling_factor add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.scaling_factor) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Scaling_factor items from the ucm content table
+ // Remove Scaling_factor items from the ucm content table
$scaling_factor_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.scaling_factor') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($scaling_factor_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Scaling_factor items
+ // Execute the query to remove Scaling_factor items
$scaling_factor_done = $db->execute();
if ($scaling_factor_done);
{
- // [4587] If succesfully remove Scaling_factor add queued success message.
+ // If succesfully remove Scaling_factor add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.scaling_factor) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Scaling_factor items are cleared from DB
+ // Make sure that all the Scaling_factor items are cleared from DB
foreach ($scaling_factor_ids as $scaling_factor_id)
{
- // [4598] Remove Scaling_factor items from the ucm base table
+ // Remove Scaling_factor items from the ucm base table
$scaling_factor_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $scaling_factor_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($scaling_factor_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Scaling_factor items
+ // Execute the query to remove Scaling_factor items
$db->execute();
- // [4609] Remove Scaling_factor items from the ucm history table
+ // Remove Scaling_factor items from the ucm history table
$scaling_factor_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $scaling_factor_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($scaling_factor_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Scaling_factor items
+ // Execute the query to remove Scaling_factor items
$db->execute();
}
}
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Intervention alias is found
+ // Where Intervention alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.intervention') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$intervention_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($intervention_found)
{
- // [4538] Since there are load the needed intervention type ids
+ // Since there are load the needed intervention type ids
$intervention_ids = $db->loadColumn();
- // [4542] Remove Intervention from the content type table
+ // Remove Intervention from the content type table
$intervention_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.intervention') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($intervention_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Intervention items
+ // Execute the query to remove Intervention items
$intervention_done = $db->execute();
if ($intervention_done);
{
- // [4553] If succesfully remove Intervention add queued success message.
+ // If succesfully remove Intervention add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.intervention) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Intervention items from the contentitem tag map table
+ // Remove Intervention items from the contentitem tag map table
$intervention_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.intervention') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($intervention_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Intervention items
+ // Execute the query to remove Intervention items
$intervention_done = $db->execute();
if ($intervention_done);
{
- // [4570] If succesfully remove Intervention add queued success message.
+ // If succesfully remove Intervention add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.intervention) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Intervention items from the ucm content table
+ // Remove Intervention items from the ucm content table
$intervention_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.intervention') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($intervention_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Intervention items
+ // Execute the query to remove Intervention items
$intervention_done = $db->execute();
if ($intervention_done);
{
- // [4587] If succesfully remove Intervention add queued success message.
+ // If succesfully remove Intervention add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.intervention) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Intervention items are cleared from DB
+ // Make sure that all the Intervention items are cleared from DB
foreach ($intervention_ids as $intervention_id)
{
- // [4598] Remove Intervention items from the ucm base table
+ // Remove Intervention items from the ucm base table
$intervention_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $intervention_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($intervention_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Intervention items
+ // Execute the query to remove Intervention items
$db->execute();
- // [4609] Remove Intervention items from the ucm history table
+ // Remove Intervention items from the ucm history table
$intervention_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $intervention_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($intervention_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Intervention items
+ // Execute the query to remove Intervention items
$db->execute();
}
}
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Currency alias is found
+ // Where Currency alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.currency') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$currency_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($currency_found)
{
- // [4538] Since there are load the needed currency type ids
+ // Since there are load the needed currency type ids
$currency_ids = $db->loadColumn();
- // [4542] Remove Currency from the content type table
+ // Remove Currency from the content type table
$currency_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.currency') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($currency_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Currency items
+ // Execute the query to remove Currency items
$currency_done = $db->execute();
if ($currency_done);
{
- // [4553] If succesfully remove Currency add queued success message.
+ // If succesfully remove Currency add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.currency) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Currency items from the contentitem tag map table
+ // Remove Currency items from the contentitem tag map table
$currency_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.currency') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($currency_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Currency items
+ // Execute the query to remove Currency items
$currency_done = $db->execute();
if ($currency_done);
{
- // [4570] If succesfully remove Currency add queued success message.
+ // If succesfully remove Currency add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.currency) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Currency items from the ucm content table
+ // Remove Currency items from the ucm content table
$currency_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.currency') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($currency_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Currency items
+ // Execute the query to remove Currency items
$currency_done = $db->execute();
if ($currency_done);
{
- // [4587] If succesfully remove Currency add queued success message.
+ // If succesfully remove Currency add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.currency) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Currency items are cleared from DB
+ // Make sure that all the Currency items are cleared from DB
foreach ($currency_ids as $currency_id)
{
- // [4598] Remove Currency items from the ucm base table
+ // Remove Currency items from the ucm base table
$currency_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $currency_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($currency_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Currency items
+ // Execute the query to remove Currency items
$db->execute();
- // [4609] Remove Currency items from the ucm history table
+ // Remove Currency items from the ucm history table
$currency_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $currency_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($currency_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Currency items
+ // Execute the query to remove Currency items
$db->execute();
}
}
- // [4524] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [4526] Select id from content type table
+ // Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
- // [4529] Where Help_document alias is found
+ // Where Help_document alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.help_document') );
$db->setQuery($query);
- // [4532] Execute query to see if alias is found
+ // Execute query to see if alias is found
$db->execute();
$help_document_found = $db->getNumRows();
- // [4535] Now check if there were any rows
+ // Now check if there were any rows
if ($help_document_found)
{
- // [4538] Since there are load the needed help_document type ids
+ // Since there are load the needed help_document type ids
$help_document_ids = $db->loadColumn();
- // [4542] Remove Help_document from the content type table
+ // Remove Help_document from the content type table
$help_document_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.help_document') );
- // [4544] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($help_document_condition);
$db->setQuery($query);
- // [4549] Execute the query to remove Help_document items
+ // Execute the query to remove Help_document items
$help_document_done = $db->execute();
if ($help_document_done);
{
- // [4553] If succesfully remove Help_document add queued success message.
+ // If succesfully remove Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.help_document) type alias was removed from the #__content_type table'));
}
- // [4559] Remove Help_document items from the contentitem tag map table
+ // Remove Help_document items from the contentitem tag map table
$help_document_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_costbenefitprojection.help_document') );
- // [4561] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($help_document_condition);
$db->setQuery($query);
- // [4566] Execute the query to remove Help_document items
+ // Execute the query to remove Help_document items
$help_document_done = $db->execute();
if ($help_document_done);
{
- // [4570] If succesfully remove Help_document add queued success message.
+ // If succesfully remove Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.help_document) type alias was removed from the #__contentitem_tag_map table'));
}
- // [4576] Remove Help_document items from the ucm content table
+ // Remove Help_document items from the ucm content table
$help_document_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_costbenefitprojection.help_document') );
- // [4578] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($help_document_condition);
$db->setQuery($query);
- // [4583] Execute the query to remove Help_document items
+ // Execute the query to remove Help_document items
$help_document_done = $db->execute();
if ($help_document_done);
{
- // [4587] If succesfully remove Help_document add queued success message.
+ // If succesfully remove Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_costbenefitprojection.help_document) type alias was removed from the #__ucm_content table'));
}
- // [4593] Make sure that all the Help_document items are cleared from DB
+ // Make sure that all the Help_document items are cleared from DB
foreach ($help_document_ids as $help_document_id)
{
- // [4598] Remove Help_document items from the ucm base table
+ // Remove Help_document items from the ucm base table
$help_document_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $help_document_id);
- // [4600] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($help_document_condition);
$db->setQuery($query);
- // [4605] Execute the query to remove Help_document items
+ // Execute the query to remove Help_document items
$db->execute();
- // [4609] Remove Help_document items from the ucm history table
+ // Remove Help_document items from the ucm history table
$help_document_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $help_document_id);
- // [4611] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($help_document_condition);
$db->setQuery($query);
- // [4616] Execute the query to remove Help_document items
+ // Execute the query to remove Help_document items
$db->execute();
}
}
- // [4624] If All related items was removed queued success message.
+ // If All related items was removed queued success message.
$app->enqueueMessage(JText::_('All related items was removed from the #__ucm_base table'));
$app->enqueueMessage(JText::_('All related items was removed from the #__ucm_history table'));
- // [4629] Remove costbenefitprojection assets from the assets table
+ // Remove costbenefitprojection assets from the assets table
$costbenefitprojection_condition = array( $db->quoteName('name') . ' LIKE ' . $db->quote('com_costbenefitprojection%') );
- // [4631] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__assets'));
$query->where($costbenefitprojection_condition);
@@ -842,7 +842,7 @@ class com_costbenefitprojectionInstallerScript
$help_document_done = $db->execute();
if ($help_document_done);
{
- // [4639] If succesfully remove costbenefitprojection add queued success message.
+ // If succesfully remove costbenefitprojection add queued success message.
$app->enqueueMessage(JText::_('All related items was removed from the #__assets table'));
}
@@ -896,11 +896,11 @@ class com_costbenefitprojectionInstallerScript
if ($type == 'install')
{
- // [4685] Get The Database object
+ // Get The Database object
$db = JFactory::getDbo();
- // [4692] Create the company content type object.
+ // Create the company content type object.
$company = new stdClass();
$company->type_title = 'Costbenefitprojection Company';
$company->type_alias = 'com_costbenefitprojection.company';
@@ -909,10 +909,10 @@ class com_costbenefitprojectionInstallerScript
$company->router = 'CostbenefitprojectionHelperRoute::getCompanyRoute';
$company->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/company.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","user","department","country","serviceprovider","per","working_days","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "user","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__costbenefitprojection_country","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "serviceprovider","targetTable": "#__costbenefitprojection_service_provider","targetColumn": "id","displayColumn": "user"},{"sourceColumn": "causesrisks","targetTable": "#__costbenefitprojection_causerisk","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "datayear","targetTable": "#__costbenefitprojection_health_data","targetColumn": "year","displayColumn": "country"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$companyInserted = $db->insertObject('#__content_types', $company);
- // [4692] Create the service_provider content type object.
+ // Create the service_provider content type object.
$service_provider = new stdClass();
$service_provider->type_title = 'Costbenefitprojection Service_provider';
$service_provider->type_alias = 'com_costbenefitprojection.service_provider';
@@ -921,10 +921,10 @@ class com_costbenefitprojectionInstallerScript
$service_provider->router = 'CostbenefitprojectionHelperRoute::getService_providerRoute';
$service_provider->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/service_provider.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","user","country"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "user","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__costbenefitprojection_country","targetColumn": "id","displayColumn": "name"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$service_providerInserted = $db->insertObject('#__content_types', $service_provider);
- // [4692] Create the country content type object.
+ // Create the country content type object.
$country = new stdClass();
$country->type_title = 'Costbenefitprojection Country';
$country->type_alias = 'com_costbenefitprojection.country';
@@ -933,10 +933,10 @@ class com_costbenefitprojectionInstallerScript
$country->router = 'CostbenefitprojectionHelperRoute::getCountryRoute';
$country->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/country.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","user","working_days"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "user","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "currency","targetTable": "#__costbenefitprojection_currency","targetColumn": "codethree","displayColumn": "name"},{"sourceColumn": "datayear","targetTable": "#__costbenefitprojection_health_data","targetColumn": "year","displayColumn": "country"},{"sourceColumn": "causesrisks","targetTable": "#__costbenefitprojection_causerisk","targetColumn": "id","displayColumn": "name"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$countryInserted = $db->insertObject('#__content_types', $country);
- // [4692] Create the causerisk content type object.
+ // Create the causerisk content type object.
$causerisk = new stdClass();
$causerisk->type_title = 'Costbenefitprojection Causerisk';
$causerisk->type_alias = 'com_costbenefitprojection.causerisk';
@@ -945,10 +945,10 @@ class com_costbenefitprojectionInstallerScript
$causerisk->router = 'CostbenefitprojectionHelperRoute::getCauseriskRoute';
$causerisk->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/causerisk.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$causeriskInserted = $db->insertObject('#__content_types', $causerisk);
- // [4692] Create the health_data content type object.
+ // Create the health_data content type object.
$health_data = new stdClass();
$health_data->type_title = 'Costbenefitprojection Health_data';
$health_data->type_alias = 'com_costbenefitprojection.health_data';
@@ -957,34 +957,34 @@ class com_costbenefitprojectionInstallerScript
$health_data->router = 'CostbenefitprojectionHelperRoute::getHealth_dataRoute';
$health_data->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/health_data.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","causerisk","country"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "causerisk","targetTable": "#__costbenefitprojection_causerisk","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__costbenefitprojection_country","targetColumn": "id","displayColumn": "name"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$health_dataInserted = $db->insertObject('#__content_types', $health_data);
- // [4692] Create the scaling_factor content type object.
+ // Create the scaling_factor content type object.
$scaling_factor = new stdClass();
$scaling_factor->type_title = 'Costbenefitprojection Scaling_factor';
$scaling_factor->type_alias = 'com_costbenefitprojection.scaling_factor';
$scaling_factor->table = '{"special": {"dbtable": "#__costbenefitprojection_scaling_factor","key": "id","type": "Scaling_factor","prefix": "costbenefitprojectionTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
- $scaling_factor->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "causerisk","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"causerisk":"causerisk","company":"company","reference":"reference","yld_scaling_factor_males":"yld_scaling_factor_males","yld_scaling_factor_females":"yld_scaling_factor_females","mortality_scaling_factor_males":"mortality_scaling_factor_males","mortality_scaling_factor_females":"mortality_scaling_factor_females","presenteeism_scaling_factor_males":"presenteeism_scaling_factor_males","presenteeism_scaling_factor_females":"presenteeism_scaling_factor_females","health_scaling_factor":"health_scaling_factor"}}';
+ $scaling_factor->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "causerisk","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"causerisk":"causerisk","company":"company","yld_scaling_factor_males":"yld_scaling_factor_males","yld_scaling_factor_females":"yld_scaling_factor_females","mortality_scaling_factor_males":"mortality_scaling_factor_males","mortality_scaling_factor_females":"mortality_scaling_factor_females","presenteeism_scaling_factor_males":"presenteeism_scaling_factor_males","presenteeism_scaling_factor_females":"presenteeism_scaling_factor_females","reference":"reference","country":"country","health_scaling_factor":"health_scaling_factor"}}';
$scaling_factor->router = 'CostbenefitprojectionHelperRoute::getScaling_factorRoute';
- $scaling_factor->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/scaling_factor.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","causerisk","company"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "causerisk","targetTable": "#__costbenefitprojection_causerisk","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "company","targetTable": "#__costbenefitprojection_company","targetColumn": "id","displayColumn": "name"}]}';
+ $scaling_factor->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/scaling_factor.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","causerisk","company","country"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "causerisk","targetTable": "#__costbenefitprojection_causerisk","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "company","targetTable": "#__costbenefitprojection_company","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__costbenefitprojection_country","targetColumn": "id","displayColumn": "name"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$scaling_factorInserted = $db->insertObject('#__content_types', $scaling_factor);
- // [4692] Create the intervention content type object.
+ // Create the intervention content type object.
$intervention = new stdClass();
$intervention->type_title = 'Costbenefitprojection Intervention';
$intervention->type_alias = 'com_costbenefitprojection.intervention';
$intervention->table = '{"special": {"dbtable": "#__costbenefitprojection_intervention","key": "id","type": "Intervention","prefix": "costbenefitprojectionTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
- $intervention->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","company":"company","type":"type","coverage":"coverage","duration":"duration","description":"description","reference":"reference","interventions":"interventions","share":"share","not_required":"not_required"}}';
+ $intervention->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","company":"company","type":"type","coverage":"coverage","duration":"duration","description":"description","country":"country","share":"share","interventions":"interventions","reference":"reference","not_required":"not_required"}}';
$intervention->router = 'CostbenefitprojectionHelperRoute::getInterventionRoute';
- $intervention->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/intervention.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","company","type","coverage","duration","share","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "company","targetTable": "#__costbenefitprojection_company","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "interventions","targetTable": "#__costbenefitprojection_intervention","targetColumn": "id","displayColumn": "name"}]}';
+ $intervention->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/intervention.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","company","type","coverage","duration","country","share","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "company","targetTable": "#__costbenefitprojection_company","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__costbenefitprojection_country","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "interventions","targetTable": "#__costbenefitprojection_intervention","targetColumn": "id","displayColumn": "name"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$interventionInserted = $db->insertObject('#__content_types', $intervention);
- // [4692] Create the currency content type object.
+ // Create the currency content type object.
$currency = new stdClass();
$currency->type_title = 'Costbenefitprojection Currency';
$currency->type_alias = 'com_costbenefitprojection.currency';
@@ -993,10 +993,10 @@ class com_costbenefitprojectionInstallerScript
$currency->router = 'CostbenefitprojectionHelperRoute::getCurrencyRoute';
$currency->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/currency.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","numericcode","decimalplace"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$currencyInserted = $db->insertObject('#__content_types', $currency);
- // [4692] Create the help_document content type object.
+ // Create the help_document content type object.
$help_document = new stdClass();
$help_document->type_title = 'Costbenefitprojection Help_document';
$help_document->type_alias = 'com_costbenefitprojection.help_document';
@@ -1005,19 +1005,19 @@ class com_costbenefitprojectionInstallerScript
$help_document->router = 'CostbenefitprojectionHelperRoute::getHelp_documentRoute';
$help_document->content_history_options = '{"formFile": "administrator/components/com_costbenefitprojection/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","target","article","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}';
- // [4698] Insert the object into the content types table.
+ // Insert the object into the content types table.
$help_documentInserted = $db->insertObject('#__content_types', $help_document);
- // [4710] Install the global extenstion params.
+ // Install the global extenstion params.
$query = $db->getQuery(true);
- // [4718] Field to update.
+ // Field to update.
$fields = array(
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@vdm.io","check_in":"-1 day","save_history":"1","history_limit":"10","titleContributor1":"Health Economist","nameContributor1":"Patrick Hanlon, M.Sc. PH","emailContributor1":"Patrick.Hanlon@unibas.ch","linkContributor1":"http://www.swisstph.ch/about-us/staff/detailview.html?tx_x4epersdb_pi1[showUid]=2267&cHash=1b1c5db0808e04d3f1afe0f3a3f67998","useContributor1":"2","showContributor1":"3","titleContributor2":"Development Advisor","nameContributor2":"Matthew Black","emailContributor2":"matthew.black@giz.de","linkContributor2":"http://www.giz.de","useContributor2":"2","showContributor2":"3","titleContributor3":"Associate Expert","nameContributor3":"Dr. Pascal Geldsetzer","emailContributor3":"pascal.geldsetzer@giz.de","linkContributor3":"http://www.giz.de","useContributor3":"2","showContributor3":"1","memberuser":["2"],"serviceprovideruser":["2"],"countryuser":["2"],"uikit_load":"1","uikit_min":"","uikit_style":"","admin_chartbackground":"#F7F7FA","admin_mainwidth":"1000","admin_chartareatop":"20","admin_chartarealeft":"20","admin_chartareawidth":"170","admin_legendtextstylefontcolor":"10","admin_legendtextstylefontsize":"20","admin_vaxistextstylefontcolor":"#63B1F2","admin_haxistextstylefontcolor":"#63B1F2","admin_haxistitletextstylefontcolor":"#63B1F2","site_chartbackground":"#F7F7FA","site_mainwidth":"1000","site_chartareatop":"20","site_chartarealeft":"20","site_chartareawidth":"170","site_legendtextstylefontcolor":"10","site_legendtextstylefontsize":"20","site_vaxistextstylefontcolor":"#63B1F2","site_haxistextstylefontcolor":"#63B1F2","site_haxistitletextstylefontcolor":"#63B1F2"}'),
);
- // [4722] Condition.
+ // Condition.
$conditions = array(
$db->quoteName('element') . ' = ' . $db->quote('com_costbenefitprojection')
);
@@ -1035,7 +1035,7 @@ class com_costbenefitprojectionInstallerScript
echo '
-
Upgrade to Version 3.2.0 Was Successful! Let us know if anything is not working as expected.
';
+ Upgrade to Version 3.3.0 Was Successful! Let us know if anything is not working as expected.
';
}
}
}
diff --git a/site/assets/css/combinedresults.css b/site/assets/css/combinedresults.css
index 0f2006cb..fa834427 100644
--- a/site/assets/css/combinedresults.css
+++ b/site/assets/css/combinedresults.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage combinedresults.css
diff --git a/site/assets/css/company.css b/site/assets/css/company.css
index 58806eab..b3286274 100644
--- a/site/assets/css/company.css
+++ b/site/assets/css/company.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.css
diff --git a/site/assets/css/companyresults.css b/site/assets/css/companyresults.css
index fb2ca2bf..5432dab9 100644
--- a/site/assets/css/companyresults.css
+++ b/site/assets/css/companyresults.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companyresults.css
diff --git a/site/assets/css/cpanel.css b/site/assets/css/cpanel.css
index 44ae3fcf..c219ced3 100644
--- a/site/assets/css/cpanel.css
+++ b/site/assets/css/cpanel.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage cpanel.css
diff --git a/site/assets/css/createaccount.css b/site/assets/css/createaccount.css
index 103b6cdb..8cff9613 100644
--- a/site/assets/css/createaccount.css
+++ b/site/assets/css/createaccount.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage createaccount.css
diff --git a/site/assets/css/intervention.css b/site/assets/css/intervention.css
index aa9e8548..4e02dc7a 100644
--- a/site/assets/css/intervention.css
+++ b/site/assets/css/intervention.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage intervention.css
diff --git a/site/assets/css/publicresults.css b/site/assets/css/publicresults.css
index 74fff957..f925f680 100644
--- a/site/assets/css/publicresults.css
+++ b/site/assets/css/publicresults.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publicresults.css
diff --git a/site/assets/css/scaling_factor.css b/site/assets/css/scaling_factor.css
index 4b3f74e3..ba1cf19b 100644
--- a/site/assets/css/scaling_factor.css
+++ b/site/assets/css/scaling_factor.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factor.css
diff --git a/site/assets/css/site.css b/site/assets/css/site.css
index ef4fe76e..f33fdf03 100644
--- a/site/assets/css/site.css
+++ b/site/assets/css/site.css
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage site.css
diff --git a/site/controller.php b/site/controller.php
index ade76388..328023d4 100644
--- a/site/controller.php
+++ b/site/controller.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage controller.php
diff --git a/site/controllers/ajax.json.php b/site/controllers/ajax.json.php
index e2e5dfdd..8381164b 100644
--- a/site/controllers/ajax.json.php
+++ b/site/controllers/ajax.json.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage ajax.json.php
diff --git a/site/controllers/company.php b/site/controllers/company.php
index 93f8764b..430aff2b 100644
--- a/site/controllers/company.php
+++ b/site/controllers/company.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.php
@@ -54,13 +54,13 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
*/
protected function allowAdd($data = array())
{
- // [9618] Access check.
+ // Access check.
$access = JFactory::getUser()->authorise('company.access', 'com_costbenefitprojection');
if (!$access)
{
return false;
}
- // [9629] In the absense of better information, revert to the component permissions.
+ // In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('company.create', $this->option);
}
@@ -76,9 +76,9 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9772] get user object.
+ // get user object.
$user = JFactory::getUser();
- // [9774] get record id.
+ // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
{
@@ -97,7 +97,7 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
return false;
}
- // [9781] Access check.
+ // Access check.
$access = ($user->authorise('company.access', 'com_costbenefitprojection.company.' . (int) $recordId) && $user->authorise('company.access', 'com_costbenefitprojection'));
if (!$access)
{
@@ -106,17 +106,17 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
if ($recordId)
{
- // [9790] The record has been set. Check the record permissions.
+ // 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 ($user->authorise('company.edit.own', 'com_costbenefitprojection.company.' . $recordId))
{
- // [9812] Now test the owner is the user.
+ // Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
- // [9816] Need to do a lookup from the model.
+ // Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@@ -126,7 +126,7 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
$ownerId = $record->created_by;
}
- // [9824] If the owner matches 'me' then allow.
+ // If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('company.edit.own', 'com_costbenefitprojection'))
@@ -138,7 +138,7 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
return false;
}
}
- // [9846] Since there is no permission, revert to the component permissions.
+ // Since there is no permission, revert to the component permissions.
return $user->authorise('company.edit', $this->option);
}
diff --git a/site/controllers/help.php b/site/controllers/help.php
index cdcaa78c..4904a3b0 100644
--- a/site/controllers/help.php
+++ b/site/controllers/help.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help.php
diff --git a/site/controllers/intervention.php b/site/controllers/intervention.php
index c7e3fd2d..ba16e8b6 100644
--- a/site/controllers/intervention.php
+++ b/site/controllers/intervention.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage intervention.php
@@ -54,13 +54,13 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
*/
protected function allowAdd($data = array())
{
- // [9618] Access check.
+ // Access check.
$access = JFactory::getUser()->authorise('intervention.access', 'com_costbenefitprojection');
if (!$access)
{
return false;
}
- // [9629] In the absense of better information, revert to the component permissions.
+ // In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('intervention.create', $this->option);
}
@@ -76,9 +76,9 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9772] get user object.
+ // get user object.
$user = JFactory::getUser();
- // [9774] get record id.
+ // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// get company id
$company = CostbenefitprojectionHelper::getId('intervention',$recordId,'id','company');
@@ -97,7 +97,7 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
return false;
}
- // [9781] Access check.
+ // Access check.
$access = ($user->authorise('intervention.access', 'com_costbenefitprojection.intervention.' . (int) $recordId) && $user->authorise('intervention.access', 'com_costbenefitprojection'));
if (!$access)
{
@@ -106,17 +106,17 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
if ($recordId)
{
- // [9790] The record has been set. Check the record permissions.
+ // 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 ($user->authorise('intervention.edit.own', 'com_costbenefitprojection.intervention.' . $recordId))
{
- // [9812] Now test the owner is the user.
+ // Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
- // [9816] Need to do a lookup from the model.
+ // Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@@ -126,7 +126,7 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
$ownerId = $record->created_by;
}
- // [9824] If the owner matches 'me' then allow.
+ // If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('intervention.edit.own', 'com_costbenefitprojection'))
@@ -138,7 +138,7 @@ class CostbenefitprojectionControllerIntervention extends JControllerForm
return false;
}
}
- // [9846] Since there is no permission, revert to the component permissions.
+ // Since there is no permission, revert to the component permissions.
return $user->authorise('intervention.edit', $this->option);
}
diff --git a/site/controllers/scaling_factor.php b/site/controllers/scaling_factor.php
index be1e86d8..7bb346f3 100644
--- a/site/controllers/scaling_factor.php
+++ b/site/controllers/scaling_factor.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factor.php
@@ -54,13 +54,13 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
*/
protected function allowAdd($data = array())
{
- // [9618] Access check.
+ // Access check.
$access = JFactory::getUser()->authorise('scaling_factor.access', 'com_costbenefitprojection');
if (!$access)
{
return false;
}
- // [9629] In the absense of better information, revert to the component permissions.
+ // In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('scaling_factor.create', $this->option);
}
@@ -76,9 +76,9 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9772] get user object.
+ // get user object.
$user = JFactory::getUser();
- // [9774] get record id.
+ // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
{
@@ -91,7 +91,7 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
}
}
- // [9781] Access check.
+ // Access check.
$access = ($user->authorise('scaling_factor.access', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId) && $user->authorise('scaling_factor.access', 'com_costbenefitprojection'));
if (!$access)
{
@@ -100,17 +100,17 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
if ($recordId)
{
- // [9790] The record has been set. Check the record permissions.
+ // 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 ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection.scaling_factor.' . $recordId))
{
- // [9812] Now test the owner is the user.
+ // Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
- // [9816] Need to do a lookup from the model.
+ // Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@@ -120,7 +120,7 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
$ownerId = $record->created_by;
}
- // [9824] If the owner matches 'me' then allow.
+ // If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection'))
@@ -132,7 +132,7 @@ class CostbenefitprojectionControllerScaling_factor extends JControllerForm
return false;
}
}
- // [9846] Since there is no permission, revert to the component permissions.
+ // Since there is no permission, revert to the component permissions.
return $user->authorise('scaling_factor.edit', $this->option);
}
diff --git a/site/costbenefitprojection.php b/site/costbenefitprojection.php
index 98e686ce..57d4c988 100644
--- a/site/costbenefitprojection.php
+++ b/site/costbenefitprojection.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage costbenefitprojection.php
diff --git a/site/helpers/costbenefitprojection.php b/site/helpers/costbenefitprojection.php
index d7a85ae5..2c55e9ca 100644
--- a/site/helpers/costbenefitprojection.php
+++ b/site/helpers/costbenefitprojection.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage costbenefitprojection.php
@@ -711,23 +711,23 @@ abstract class CostbenefitprojectionHelper
$targetgroups = json_decode($help->groups, true);
if (!array_intersect($targetgroups, $groups))
{
- // [1497] if user not in those target groups then remove the item
+ // if user not in those target groups then remove the item
unset($helps[$nr]);
continue;
}
}
- // [1502] set the return type
+ // set the return type
switch ($help->type)
{
- // [1505] set joomla article
+ // set joomla article
case 1:
return self::loadArticleLink($help->article);
break;
- // [1509] set help text
+ // set help text
case 2:
return self::loadHelpTextLink($help->id);
break;
- // [1513] set Link
+ // set Link
case 3:
return $help->url;
break;
@@ -977,7 +977,7 @@ abstract class CostbenefitprojectionHelper
{
if (strpos($content,'class="uk-') !== false)
{
- // [2741] reset
+ // reset
$temp = array();
foreach (self::$uk_components as $looking => $add)
{
@@ -986,15 +986,15 @@ abstract class CostbenefitprojectionHelper
$temp[] = $looking;
}
}
- // [2750] make sure uikit is loaded to config
+ // make sure uikit is loaded to config
if (strpos($content,'class="uk-') !== false)
{
self::$uikit = true;
}
- // [2755] sorter
+ // sorter
if (self::checkArray($temp))
{
- // [2758] merger
+ // merger
if (self::checkArray($classes))
{
$newTemp = array_merge($temp,$classes);
@@ -1015,33 +1015,33 @@ abstract class CostbenefitprojectionHelper
*/
public static function createUser($new)
{
- // [1731] load the user component language files if there is an error.
+ // load the user component language files if there is an error.
$lang = JFactory::getLanguage();
$extension = 'com_users';
$base_dir = JPATH_SITE;
$language_tag = 'en-GB';
$reload = true;
$lang->load($extension, $base_dir, $language_tag, $reload);
- // [1738] load the user regestration model
+ // load the user regestration model
$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');
- // [1740] make sure no activation is needed
+ // make sure no activation is needed
$useractivation = self::setParams('com_users','useractivation',0);
- // [1742] make sure password is send
+ // make sure password is send
$sendpassword = self::setParams('com_users','sendpassword',1);
- // [1744] Check if password was set
+ // Check if password was set
if (isset($new['password']) && isset($new['password2']) && self::checkString($new['password']) && self::checkString($new['password2']))
{
- // [1747] Use the users passwords
+ // Use the users passwords
$password = $new['password'];
$password2 = $new['password2'];
}
else
{
- // [1753] Set random password
+ // Set random password
$password = self::randomkey(8);
$password2 = $password;
}
- // [1757] set username
+ // set username
if (isset($new['username']) && self::checkString($new['username']))
{
$new['username'] = self::safeString($new['username']);
@@ -1050,7 +1050,7 @@ abstract class CostbenefitprojectionHelper
{
$new['username'] = self::safeString($new['name']);
}
- // [1766] linup new user data
+ // linup new user data
$data = array(
'username' => $new['username'],
'name' => $new['name'],
@@ -1058,13 +1058,13 @@ abstract class CostbenefitprojectionHelper
'password1' => $password, // First password field
'password2' => $password2, // Confirm password field
'block' => 0 );
- // [1774] register the new user
+ // register the new user
$userId = $model->register($data);
- // [1776] set activation back to default
+ // set activation back to default
self::setParams('com_users','useractivation',$useractivation);
- // [1778] set send password back to default
+ // set send password back to default
self::setParams('com_users','sendpassword',$sendpassword);
- // [1780] if user is created
+ // if user is created
if ($userId > 0)
{
return $userId;
@@ -1074,21 +1074,21 @@ abstract class CostbenefitprojectionHelper
protected static function setParams($component,$target,$value)
{
- // [1790] Get the params and set the new values
+ // Get the params and set the new values
$params = JComponentHelper::getParams($component);
$was = $params->get($target, null);
if ($was != $value)
{
$params->set($target, $value);
- // [1796] Get a new database query instance
+ // Get a new database query instance
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [1799] Build the query
+ // Build the query
$query->update('#__extensions AS a');
$query->set('a.params = ' . $db->quote((string)$params));
$query->where('a.element = ' . $db->quote((string)$component));
- // [1804] Execute the query
+ // Execute the query
$db->setQuery($query);
$db->query();
}
@@ -1646,12 +1646,12 @@ abstract class CostbenefitprojectionHelper
{
if ('advanced' == $type)
{
- // [1304] Get the global params
+ // Get the global params
$params = JComponentHelper::getParams('com_costbenefitprojection', true);
$advanced_key = $params->get('advanced_key', null);
if ($advanced_key)
{
- // [1309] load the file
+ // load the file
JLoader::import( 'vdm', JPATH_COMPONENT_ADMINISTRATOR);
$the = new VDM($advanced_key);
diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php
index b9f00cd2..0e74414c 100644
--- a/site/helpers/headercheck.php
+++ b/site/helpers/headercheck.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage headercheck.php
diff --git a/site/helpers/route.php b/site/helpers/route.php
index 72717065..6c1eed35 100644
--- a/site/helpers/route.php
+++ b/site/helpers/route.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage route.php
@@ -38,18 +38,18 @@ abstract class CostbenefitprojectionHelperRoute
{
if ($id > 0)
{
- // [4872] Initialize the needel array.
+ // Initialize the needel array.
$needles = array(
'cpanel' => array((int) $id)
);
- // [4876] Create the link
+ // Create the link
$link = 'index.php?option=com_costbenefitprojection&view=cpanel&id='. $id;
}
else
{
- // [4881] Initialize the needel array.
+ // Initialize the needel array.
$needles = array();
- // [4883]Create the link but don't add the id.
+ //Create the link but don't add the id.
$link = 'index.php?option=com_costbenefitprojection&view=cpanel';
}
if ($catid > 1)
@@ -79,18 +79,18 @@ abstract class CostbenefitprojectionHelperRoute
{
if ($id > 0)
{
- // [4872] Initialize the needel array.
+ // Initialize the needel array.
$needles = array(
'publicresults' => array((int) $id)
);
- // [4876] Create the link
+ // Create the link
$link = 'index.php?option=com_costbenefitprojection&view=publicresults&id='. $id;
}
else
{
- // [4881] Initialize the needel array.
+ // Initialize the needel array.
$needles = array();
- // [4883]Create the link but don't add the id.
+ //Create the link but don't add the id.
$link = 'index.php?option=com_costbenefitprojection&view=publicresults';
}
if ($catid > 1)
@@ -120,18 +120,18 @@ abstract class CostbenefitprojectionHelperRoute
{
if ($id > 0)
{
- // [4872] Initialize the needel array.
+ // Initialize the needel array.
$needles = array(
'createaccount' => array((int) $id)
);
- // [4876] Create the link
+ // Create the link
$link = 'index.php?option=com_costbenefitprojection&view=createaccount&id='. $id;
}
else
{
- // [4881] Initialize the needel array.
+ // Initialize the needel array.
$needles = array();
- // [4883]Create the link but don't add the id.
+ //Create the link but don't add the id.
$link = 'index.php?option=com_costbenefitprojection&view=createaccount';
}
if ($catid > 1)
@@ -161,18 +161,18 @@ abstract class CostbenefitprojectionHelperRoute
{
if ($id > 0)
{
- // [4872] Initialize the needel array.
+ // Initialize the needel array.
$needles = array(
'companyresults' => array((int) $id)
);
- // [4876] Create the link
+ // Create the link
$link = 'index.php?option=com_costbenefitprojection&view=companyresults&id='. $id;
}
else
{
- // [4881] Initialize the needel array.
+ // Initialize the needel array.
$needles = array();
- // [4883]Create the link but don't add the id.
+ //Create the link but don't add the id.
$link = 'index.php?option=com_costbenefitprojection&view=companyresults';
}
if ($catid > 1)
@@ -202,18 +202,18 @@ abstract class CostbenefitprojectionHelperRoute
{
if ($id > 0)
{
- // [4872] Initialize the needel array.
+ // Initialize the needel array.
$needles = array(
'combinedresults' => array((int) $id)
);
- // [4876] Create the link
+ // Create the link
$link = 'index.php?option=com_costbenefitprojection&view=combinedresults&id='. $id;
}
else
{
- // [4881] Initialize the needel array.
+ // Initialize the needel array.
$needles = array();
- // [4883]Create the link but don't add the id.
+ //Create the link but don't add the id.
$link = 'index.php?option=com_costbenefitprojection&view=combinedresults';
}
if ($catid > 1)
diff --git a/site/language/en-GB/en-GB.com_costbenefitprojection.ini b/site/language/en-GB/en-GB.com_costbenefitprojection.ini
index 6d06e18e..a26c390a 100644
--- a/site/language/en-GB/en-GB.com_costbenefitprojection.ini
+++ b/site/language/en-GB/en-GB.com_costbenefitprojection.ini
@@ -35,6 +35,7 @@ COM_COSTBENEFITPROJECTION_CAUSERISK_DETAILS="Details"
COM_COSTBENEFITPROJECTION_CAUSERISK_EDIT="Editing the Cause/Risk"
COM_COSTBENEFITPROJECTION_CAUSERISK_ERROR_UNIQUE_ALIAS="Another Cause/Risk has the same alias."
COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR="Cause/Risk Factor"
+COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR_NAME="Cause/Risk Factor Name"
COM_COSTBENEFITPROJECTION_CAUSERISK_ID="Id"
COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME="Importname"
COM_COSTBENEFITPROJECTION_CAUSERISK_IMPORTNAME_DESCRIPTION="Enter Import Name Here"
@@ -528,6 +529,7 @@ COM_COSTBENEFITPROJECTION_COUNTRY_HEALTHCARE_HINT="10"
COM_COSTBENEFITPROJECTION_COUNTRY_HEALTHCARE_LABEL="Default Healthcare Costs"
COM_COSTBENEFITPROJECTION_COUNTRY_HEALTH_DATA_TOTALS="Health Data Totals"
COM_COSTBENEFITPROJECTION_COUNTRY_ID="Id"
+COM_COSTBENEFITPROJECTION_COUNTRY_INTERVENTIONS="Interventions"
COM_COSTBENEFITPROJECTION_COUNTRY_LIST="Country List"
COM_COSTBENEFITPROJECTION_COUNTRY_MALEDEATH="Maledeath"
COM_COSTBENEFITPROJECTION_COUNTRY_MALEDEATH_DESCRIPTION="Here you can add males total death data."
@@ -1103,6 +1105,9 @@ COM_COSTBENEFITPROJECTION_INTERVENTION_CLUSTER="Cluster"
COM_COSTBENEFITPROJECTION_INTERVENTION_COMPANY="Company"
COM_COSTBENEFITPROJECTION_INTERVENTION_COMPANY_LABEL="Company"
COM_COSTBENEFITPROJECTION_INTERVENTION_COST_BENEFIT="Intervention Cost Benefit"
+COM_COSTBENEFITPROJECTION_INTERVENTION_COUNTRY="Country"
+COM_COSTBENEFITPROJECTION_INTERVENTION_COUNTRY_DESCRIPTION="List of available countries"
+COM_COSTBENEFITPROJECTION_INTERVENTION_COUNTRY_LABEL="Country"
COM_COSTBENEFITPROJECTION_INTERVENTION_COVERAGE="Coverage"
COM_COSTBENEFITPROJECTION_INTERVENTION_COVERAGE_DESCRIPTION="Proportion of employees covered"
COM_COSTBENEFITPROJECTION_INTERVENTION_COVERAGE_LABEL="Coverage"
@@ -1187,10 +1192,12 @@ COM_COSTBENEFITPROJECTION_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denie
COM_COSTBENEFITPROJECTION_NO_ACCESS_GRANTED="No Access Granted!"
COM_COSTBENEFITPROJECTION_NO_AGE_GROUPS_HAS_BEEN_SET="No Age Groups Has Been Set!"
COM_COSTBENEFITPROJECTION_NO_CAUSERISK_SELECTED="No Cause/Risk Selected"
+COM_COSTBENEFITPROJECTION_NO_CAUSERISK_WERE_SET_BY_THE_COUNTRY="No Cause/Risk were set by the Country!"
COM_COSTBENEFITPROJECTION_NO_DISEASERISK_SELECTED="No Disease/Risk Selected"
COM_COSTBENEFITPROJECTION_NO_INTERVENTIONS_SELECTED_PLEASE_SELECT_AN_INTERVENTIONS="No Interventions Selected, Please Select an Interventions."
COM_COSTBENEFITPROJECTION_NO_INTERVENTIONS_SET="No interventions set."
COM_COSTBENEFITPROJECTION_NO_INTERVENTION_SELECTED="No Intervention Selected"
+COM_COSTBENEFITPROJECTION_NO_INTERVENTION_SET_BY_THE_COUNTRY="No Intervention Set by the Country"
COM_COSTBENEFITPROJECTION_NO_SCALING_FACTORS_AVAILABLE_PLEASE_SELECT_A_CAUSERISK_TO_ACTIVATE="No Scaling Factors Available. Please Select a Cause/Risk to Activate."
COM_COSTBENEFITPROJECTION_NUMBER="Number"
COM_COSTBENEFITPROJECTION_NUMBERS="Numbers"
@@ -1201,6 +1208,7 @@ COM_COSTBENEFITPROJECTION_PA_SERVICE_PROVIDER_OR_COUNTRY_ADMINISTRATOR_MUST_SETU
COM_COSTBENEFITPROJECTION_PERCENT="Percent"
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_PUBLISH_A_MODULE_TO_SPAN_CLASS_UKTEXTBOLD_PUBLICCOSTNOTE_SPAN_POSITION_OF_THIS_PAGE_WITH_YOUR_PUBLIC_NOTICE_TEXT="Please publish a module to [ publicCostNote ] position of this page with your public notice text!"
COM_COSTBENEFITPROJECTION_PLEASE_WAIT="please wait"
COM_COSTBENEFITPROJECTION_PRESENTEEISM_FEMALES="Presenteeism Females"
COM_COSTBENEFITPROJECTION_PRESENTEEISM_MALES="Presenteeism Males"
@@ -1269,6 +1277,9 @@ COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CAUSERISK="Causerisk"
COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CAUSERISK_LABEL="Cause/Risk"
COM_COSTBENEFITPROJECTION_SCALING_FACTOR_COMPANY="Company"
COM_COSTBENEFITPROJECTION_SCALING_FACTOR_COMPANY_LABEL="Company"
+COM_COSTBENEFITPROJECTION_SCALING_FACTOR_COUNTRY="Country"
+COM_COSTBENEFITPROJECTION_SCALING_FACTOR_COUNTRY_DESCRIPTION="List of available countries"
+COM_COSTBENEFITPROJECTION_SCALING_FACTOR_COUNTRY_LABEL="Country"
COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CREATED_BY_DESC="The user that created the Scaling Factor."
COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CREATED_BY_LABEL="Created by"
COM_COSTBENEFITPROJECTION_SCALING_FACTOR_CREATED_DATE_DESC="The date Scaling Factor was created."
diff --git a/site/layouts/appnotice.php b/site/layouts/appnotice.php
index d74509f7..d73f483a 100644
--- a/site/layouts/appnotice.php
+++ b/site/layouts/appnotice.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage appnotice.php
diff --git a/site/layouts/company/age_groups_percentages_fullwidth.php b/site/layouts/company/age_groups_percentages_fullwidth.php
index 24b9c59f..8743fb8b 100644
--- a/site/layouts/company/age_groups_percentages_fullwidth.php
+++ b/site/layouts/company/age_groups_percentages_fullwidth.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage age_groups_percentages_fullwidth.php
diff --git a/site/layouts/company/age_groups_percentages_left.php b/site/layouts/company/age_groups_percentages_left.php
index 9493a493..063d4821 100644
--- a/site/layouts/company/age_groups_percentages_left.php
+++ b/site/layouts/company/age_groups_percentages_left.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage age_groups_percentages_left.php
diff --git a/site/layouts/company/age_groups_percentages_right.php b/site/layouts/company/age_groups_percentages_right.php
index 1444d330..bf03cbb7 100644
--- a/site/layouts/company/age_groups_percentages_right.php
+++ b/site/layouts/company/age_groups_percentages_right.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage age_groups_percentages_right.php
diff --git a/site/layouts/company/causerisk_selection_fullwidth.php b/site/layouts/company/causerisk_selection_fullwidth.php
index e971d1e7..feb09a33 100644
--- a/site/layouts/company/causerisk_selection_fullwidth.php
+++ b/site/layouts/company/causerisk_selection_fullwidth.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causerisk_selection_fullwidth.php
diff --git a/site/layouts/company/details_above.php b/site/layouts/company/details_above.php
index 4a0ad71e..71e5cce1 100644
--- a/site/layouts/company/details_above.php
+++ b/site/layouts/company/details_above.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/site/layouts/company/details_left.php b/site/layouts/company/details_left.php
index 1031f10c..1c6d54bd 100644
--- a/site/layouts/company/details_left.php
+++ b/site/layouts/company/details_left.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/site/layouts/company/details_right.php b/site/layouts/company/details_right.php
index 90bf922d..7b9abb3d 100644
--- a/site/layouts/company/details_right.php
+++ b/site/layouts/company/details_right.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/site/layouts/company/details_under.php b/site/layouts/company/details_under.php
index c9c35fd8..d809c397 100644
--- a/site/layouts/company/details_under.php
+++ b/site/layouts/company/details_under.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_under.php
diff --git a/site/layouts/company/interventions_fullwidth.php b/site/layouts/company/interventions_fullwidth.php
index 1aa89ac0..097a5e85 100644
--- a/site/layouts/company/interventions_fullwidth.php
+++ b/site/layouts/company/interventions_fullwidth.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage interventions_fullwidth.php
@@ -22,7 +22,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
-$items = $displayData->cfeinterventions;
+$items = $displayData->zqbinterventions;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit";
diff --git a/site/layouts/company/publishing.php b/site/layouts/company/publishing.php
index d728c382..01b95e3e 100644
--- a/site/layouts/company/publishing.php
+++ b/site/layouts/company/publishing.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
diff --git a/site/layouts/company/publlshing.php b/site/layouts/company/publlshing.php
index f9b98eb3..99d813f1 100644
--- a/site/layouts/company/publlshing.php
+++ b/site/layouts/company/publlshing.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/site/layouts/company/scaling_factors_fullwidth.php b/site/layouts/company/scaling_factors_fullwidth.php
index 19dae087..d150425a 100644
--- a/site/layouts/company/scaling_factors_fullwidth.php
+++ b/site/layouts/company/scaling_factors_fullwidth.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factors_fullwidth.php
@@ -22,7 +22,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
-$items = $displayData->vgascaling_factors;
+$items = $displayData->xpxscaling_factors;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=scaling_factor.edit";
@@ -40,9 +40,6 @@ $edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=sc
-
- |
-
|
@@ -51,7 +48,7 @@ $edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=sc
|
|
-
+ |
|
@@ -89,9 +86,6 @@ $edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=sc
|
escape($item->company_name); ?>
|
-
- escape($item->reference); ?>
- |
escape($item->yld_scaling_factor_males); ?>
|
@@ -143,7 +137,7 @@ $edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=sc
-
+ |
|
diff --git a/site/layouts/companydetails.php b/site/layouts/companydetails.php
index 09a7c62c..e4b9dcb1 100644
--- a/site/layouts/companydetails.php
+++ b/site/layouts/companydetails.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companydetails.php
diff --git a/site/layouts/intervention/details_above.php b/site/layouts/intervention/details_above.php
index 4a73471c..90ce9771 100644
--- a/site/layouts/intervention/details_above.php
+++ b/site/layouts/intervention/details_above.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
@@ -26,6 +26,7 @@ $form = $displayData->getForm();
$fields = array(
'name',
'company',
+ 'country',
'type'
);
diff --git a/site/layouts/intervention/details_fullwidth.php b/site/layouts/intervention/details_fullwidth.php
index 30b53d0c..5c354810 100644
--- a/site/layouts/intervention/details_fullwidth.php
+++ b/site/layouts/intervention/details_fullwidth.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_fullwidth.php
diff --git a/site/layouts/intervention/details_under.php b/site/layouts/intervention/details_under.php
index c9c35fd8..d809c397 100644
--- a/site/layouts/intervention/details_under.php
+++ b/site/layouts/intervention/details_under.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_under.php
diff --git a/site/layouts/intervention/publishing.php b/site/layouts/intervention/publishing.php
index d728c382..01b95e3e 100644
--- a/site/layouts/intervention/publishing.php
+++ b/site/layouts/intervention/publishing.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
diff --git a/site/layouts/intervention/publlshing.php b/site/layouts/intervention/publlshing.php
index a92c1591..af222abf 100644
--- a/site/layouts/intervention/publlshing.php
+++ b/site/layouts/intervention/publlshing.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/site/layouts/intervention/settings_fullwidth.php b/site/layouts/intervention/settings_fullwidth.php
index 1db3474f..cb6fed6e 100644
--- a/site/layouts/intervention/settings_fullwidth.php
+++ b/site/layouts/intervention/settings_fullwidth.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage settings_fullwidth.php
diff --git a/site/layouts/intervention/settings_left.php b/site/layouts/intervention/settings_left.php
index 5f703f40..4df0f230 100644
--- a/site/layouts/intervention/settings_left.php
+++ b/site/layouts/intervention/settings_left.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage settings_left.php
diff --git a/site/layouts/scaling_factor/details_above.php b/site/layouts/scaling_factor/details_above.php
index 3c67e4c0..cde730b4 100644
--- a/site/layouts/scaling_factor/details_above.php
+++ b/site/layouts/scaling_factor/details_above.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
@@ -24,7 +24,8 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
- 'company'
+ 'company',
+ 'country'
);
?>
diff --git a/site/layouts/scaling_factor/details_left.php b/site/layouts/scaling_factor/details_left.php
index 9444e7a6..b3405d12 100644
--- a/site/layouts/scaling_factor/details_left.php
+++ b/site/layouts/scaling_factor/details_left.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/site/layouts/scaling_factor/details_right.php b/site/layouts/scaling_factor/details_right.php
index 850918aa..32950693 100644
--- a/site/layouts/scaling_factor/details_right.php
+++ b/site/layouts/scaling_factor/details_right.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/site/layouts/scaling_factor/publishing.php b/site/layouts/scaling_factor/publishing.php
index d728c382..01b95e3e 100644
--- a/site/layouts/scaling_factor/publishing.php
+++ b/site/layouts/scaling_factor/publishing.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
diff --git a/site/layouts/scaling_factor/publlshing.php b/site/layouts/scaling_factor/publlshing.php
index a92c1591..af222abf 100644
--- a/site/layouts/scaling_factor/publlshing.php
+++ b/site/layouts/scaling_factor/publlshing.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/site/models/ajax.php b/site/models/ajax.php
index 397c5ba4..4bbd6591 100644
--- a/site/models/ajax.php
+++ b/site/models/ajax.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage ajax.php
@@ -37,13 +37,13 @@ class CostbenefitprojectionModelAjax extends JModelList
}
- // [9215] Used in company
+ // Used in company
public function getCalculatedResult($id,$data)
{
return CostbenefitprojectionHelper::calculate($id,$data);
}
- // [9215] Used in intervention
+ // Used in intervention
public function getInterventionBuildTable($idName,$oject,$cluster)
{
if (CostbenefitprojectionHelper::isJson($oject) && CostbenefitprojectionHelper::checkString($idName))
diff --git a/site/models/combinedresults.php b/site/models/combinedresults.php
index 39f2cb90..8d85e220 100644
--- a/site/models/combinedresults.php
+++ b/site/models/combinedresults.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage combinedresults.php
@@ -90,32 +90,32 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
JFactory::getApplication()->redirect('index.php?option=com_costbenefitprojection&view=cpanel');
}
}
- // [3048] Make sure all records load, since no pagination allowed.
+ // Make sure all records load, since no pagination allowed.
$this->setState('list.limit', 0);
- // [3050] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [3053] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [1916] Get from #__costbenefitprojection_company as a
+ // Get from #__costbenefitprojection_company as a
$query->select($db->quoteName(
array('a.id','a.name','a.user','a.department','a.per','a.country','a.serviceprovider','a.datayear','a.working_days','a.total_salary','a.total_healthcare','a.productivity_losses','a.males','a.females','a.medical_turnovers_males','a.medical_turnovers_females','a.sick_leave_males','a.sick_leave_females','a.percentmale','a.percentfemale','a.causesrisks','a.published','a.access'),
array('id','name','user','department','per','country','serviceprovider','datayear','working_days','total_salary','total_healthcare','productivity_losses','males','females','medical_turnovers_males','medical_turnovers_females','sick_leave_males','sick_leave_females','percentmale','percentfemale','causesrisks','published','access')));
$query->from($db->quoteName('#__costbenefitprojection_company', 'a'));
- // [1916] Get from #__costbenefitprojection_country as e
+ // Get from #__costbenefitprojection_country as e
$query->select($db->quoteName(
array('e.id','e.name','e.alias','e.user','e.currency','e.datayear','e.worldzone','e.codethree','e.codetwo','e.working_days','e.presenteeism','e.medical_turnovers','e.sick_leave','e.healthcare','e.productivity_losses','e.publicname','e.publicemail','e.publicnumber','e.publicaddress','e.percentmale','e.percentfemale','e.causesrisks','e.maledeath','e.femaledeath','e.maleyld','e.femaleyld','e.access'),
array('country_id','country_name','country_alias','country_user','country_currency','country_datayear','country_worldzone','country_codethree','country_codetwo','country_working_days','country_presenteeism','country_medical_turnovers','country_sick_leave','country_healthcare','country_productivity_losses','country_publicname','country_publicemail','country_publicnumber','country_publicaddress','country_percentmale','country_percentfemale','country_causesrisks','country_maledeath','country_femaledeath','country_maleyld','country_femaleyld','country_access')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_country', 'e')) . ' ON (' . $db->quoteName('a.country') . ' = ' . $db->quoteName('e.id') . ')');
- // [1916] Get from #__costbenefitprojection_currency as f
+ // Get from #__costbenefitprojection_currency as f
$query->select($db->quoteName(
array('f.id','f.name','f.alias','f.codethree','f.numericcode','f.symbol','f.thousands','f.decimalplace','f.decimalsymbol','f.positivestyle','f.negativestyle','f.published','f.access','f.ordering'),
array('currency_id','currency_name','currency_alias','currency_codethree','currency_numericcode','currency_symbol','currency_thousands','currency_decimalplace','currency_decimalsymbol','currency_positivestyle','currency_negativestyle','currency_published','currency_access','currency_ordering')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_currency', 'f')) . ' ON (' . $db->quoteName('e.currency') . ' = ' . $db->quoteName('f.codethree') . ')');
- // [2248] Check if $ids is an array with values.
+ // Check if $ids is an array with values.
$array = $ids;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -126,7 +126,7 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
return false;
}
- // [3066] return the query object
+ // return the query object
return $query;
}
@@ -152,90 +152,92 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_costbenefitprojection', true);
- // [3155] Get the advanced encription.
+ // Get the advanced encription.
$advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced');
- // [3157] Get the encription object.
+ // Get the encription object.
$advanced = new FOFEncryptAes($advancedkey, 256);
- // [3081] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [3084] Always create a slug for sef URL's
+ // Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
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)))
{
- // [2118] Decode medical_turnovers_males
+ // Decode medical_turnovers_males
$item->medical_turnovers_males = rtrim($advanced->decryptString($item->medical_turnovers_males), "\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)))
{
- // [2118] Decode sick_leave_males
+ // Decode sick_leave_males
$item->sick_leave_males = rtrim($advanced->decryptString($item->sick_leave_males), "\0");
}
if (!empty($item->males) && $advancedkey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true)))
{
- // [2118] Decode males
+ // Decode males
$item->males = rtrim($advanced->decryptString($item->males), "\0");
}
if (CostbenefitprojectionHelper::checkString($item->causesrisks))
{
- // [2118] Decode causesrisks
+ // Decode causesrisks
$item->causesrisks = json_decode($item->causesrisks, true);
}
if (!empty($item->females) && $advancedkey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true)))
{
- // [2118] Decode females
+ // Decode females
$item->females = rtrim($advanced->decryptString($item->females), "\0");
}
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)))
{
- // [2118] Decode medical_turnovers_females
+ // Decode medical_turnovers_females
$item->medical_turnovers_females = rtrim($advanced->decryptString($item->medical_turnovers_females), "\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)))
{
- // [2118] Decode sick_leave_females
+ // Decode sick_leave_females
$item->sick_leave_females = rtrim($advanced->decryptString($item->sick_leave_females), "\0");
}
if (!empty($item->total_salary) && $advancedkey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true)))
{
- // [2118] Decode total_salary
+ // Decode total_salary
$item->total_salary = rtrim($advanced->decryptString($item->total_salary), "\0");
}
if (!empty($item->total_healthcare) && $advancedkey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true)))
{
- // [2118] Decode total_healthcare
+ // Decode total_healthcare
$item->total_healthcare = rtrim($advanced->decryptString($item->total_healthcare), "\0");
}
if (CostbenefitprojectionHelper::checkString($item->country_causesrisks))
{
- // [2118] Decode country_causesrisks
+ // Decode country_causesrisks
$item->country_causesrisks = json_decode($item->country_causesrisks, true);
}
- // [2133] Make sure the content prepare plugins fire on country_publicaddress.
+ // Make sure the content prepare plugins fire on country_publicaddress.
$item->country_publicaddress = JHtml::_('content.prepare',$item->country_publicaddress);
- // [2135] Checking if country_publicaddress has uikit components that must be loaded.
+ // Checking if country_publicaddress has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->country_publicaddress,$this->uikitComp);
- // [2438] set the global causesrisks value.
+ // set the global causesrisks value.
$this->a_causesrisks = $item->causesrisks;
- // [2438] set the global datayear value.
+ // set the global datayear value.
$this->a_datayear = $item->datayear;
- // [2438] set the global datayear value.
+ // set the global datayear value.
$this->e_datayear = $item->country_datayear;
- // [2438] set the global causesrisks value.
+ // set the global causesrisks value.
$this->e_causesrisks = $item->country_causesrisks;
- // [2166] set countryCountryHealth_dataB to the $item object.
+ // set countryCountryHealth_dataB to the $item object.
$item->countryCountryHealth_dataB = $this->getCountryCountryHealth_dataBcbb_B($item->country);
- // [2166] set idCompanyScaling_factorC to the $item object.
+ // set idCompanyScaling_factorC to the $item object.
$item->idCompanyScaling_factorC = $this->getIdCompanyScaling_factorBcbb_C($item->id);
- // [2166] set idCompanyInterventionD to the $item object.
+ // set idCompanyInterventionD to the $item object.
$item->idCompanyInterventionD = $this->getIdCompanyInterventionBcbb_D($item->id);
- // [2166] set causesrisksIdCauseriskG to the $item object.
+ // set causesrisksIdCauseriskG to the $item object.
$item->causesrisksIdCauseriskG = $this->getCausesrisksIdCauseriskBcbb_G($item->causesrisks);
- // [2166] set countryCountryHealth_dataBB to the $item object.
+ // set countryCountryHealth_dataBB to the $item object.
$item->countryCountryHealth_dataBB = $this->getCountryCountryHealth_dataBcbb_BB($item->country);
- // [2166] set causesrisksIdCauseriskGG to the $item object.
+ // 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
@@ -250,19 +252,19 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
*/
public function getCountryCountryHealth_dataBcbb_B($country)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_health_data as b
+ // Get from #__costbenefitprojection_health_data as b
$query->select($db->quoteName(
array('b.id','b.causerisk','b.year','b.maledeath','b.maleyld','b.femaledeath','b.femaleyld','b.published'),
array('id','causerisk','year','maledeath','maleyld','femaledeath','femaleyld','published')));
$query->from($db->quoteName('#__costbenefitprojection_health_data', 'b'));
$query->where('b.country = ' . $db->quote($country));
- // [2248] Check if $this->a_causesrisks is an array with values.
+ // Check if $this->a_causesrisks is an array with values.
$array = $this->a_causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -276,11 +278,11 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
$query->where('b.year = ' . $db->quote($this->a_datayear));
$query->order('b.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@@ -296,13 +298,13 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
*/
public function getIdCompanyScaling_factorBcbb_C($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_scaling_factor as c
+ // Get from #__costbenefitprojection_scaling_factor as c
$query->select($db->quoteName(
array('c.id','c.causerisk','c.reference','c.yld_scaling_factor_males','c.yld_scaling_factor_females','c.mortality_scaling_factor_males','c.mortality_scaling_factor_females','c.presenteeism_scaling_factor_males','c.presenteeism_scaling_factor_females','c.health_scaling_factor','c.published'),
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')));
@@ -311,21 +313,21 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
$query->where('c.published = 1');
$query->order('c.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on reference.
+ // Make sure the content prepare plugins fire on reference.
$item->reference = JHtml::_('content.prepare',$item->reference);
- // [2135] Checking if reference has uikit components that must be loaded.
+ // Checking if reference has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp);
}
return $items;
@@ -341,40 +343,36 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
*/
public function getIdCompanyInterventionBcbb_D($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_intervention as d
+ // Get from #__costbenefitprojection_intervention as d
$query->select($db->quoteName(
- array('d.id','d.name','d.type','d.coverage','d.duration','d.share','d.description','d.reference','d.intervention','d.published','d.created_by','d.modified_by','d.created','d.modified'),
- array('id','name','type','coverage','duration','share','description','reference','intervention','published','created_by','modified_by','created','modified')));
+ array('d.id','d.name','d.type','d.coverage','d.duration','d.share','d.description','d.reference','d.interventions','d.intervention','d.published','d.created_by','d.modified_by','d.created','d.modified'),
+ 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));
$query->where('d.published = 1');
$query->order('d.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on description.
- $item->description = JHtml::_('content.prepare',$item->description);
- // [2135] Checking if description has uikit components that must be loaded.
- $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp);
- // [2133] Make sure the content prepare plugins fire on reference.
+ // Make sure the content prepare plugins fire on reference.
$item->reference = JHtml::_('content.prepare',$item->reference);
- // [2135] Checking if reference has uikit components that must be loaded.
+ // Checking if reference has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp);
}
return $items;
@@ -390,19 +388,19 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
*/
public function getCausesrisksIdCauseriskBcbb_G($causesrisks)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_causerisk as g
+ // Get from #__costbenefitprojection_causerisk as g
$query->select($db->quoteName(
array('g.id','g.name','g.ref','g.alias','g.description'),
array('id','name','ref','alias','description')));
$query->from($db->quoteName('#__costbenefitprojection_causerisk', 'g'));
- // [2856] Check if $causesrisks is an array with values.
+ // Check if $causesrisks is an array with values.
$array = $causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -413,24 +411,14 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
return false;
}
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
- $items = $db->loadObjectList();
-
- // [2960] Convert the parameter fields into objects.
- foreach ($items as $nr => &$item)
- {
- // [2133] Make sure the content prepare plugins fire on description.
- $item->description = JHtml::_('content.prepare',$item->description);
- // [2135] Checking if description has uikit components that must be loaded.
- $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp);
- }
- return $items;
+ return $db->loadObjectList();
}
return false;
}
@@ -443,19 +431,19 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
*/
public function getCountryCountryHealth_dataBcbb_BB($country)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_health_data as bb
+ // Get from #__costbenefitprojection_health_data as bb
$query->select($db->quoteName(
array('bb.id','bb.asset_id','bb.causerisk','bb.year','bb.country','bb.maledeath','bb.maleyld','bb.femaledeath','bb.femaleyld','bb.published','bb.created_by','bb.modified_by','bb.created','bb.modified','bb.version','bb.hits','bb.ordering'),
array('id','asset_id','causerisk','year','country','maledeath','maleyld','femaledeath','femaleyld','published','created_by','modified_by','created','modified','version','hits','ordering')));
$query->from($db->quoteName('#__costbenefitprojection_health_data', 'bb'));
$query->where('bb.country = ' . $db->quote($country));
- // [2248] Check if $this->e_causesrisks is an array with values.
+ // Check if $this->e_causesrisks is an array with values.
$array = $this->e_causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -469,11 +457,11 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
$query->where('bb.year = ' . $db->quote($this->e_datayear));
$query->order('bb.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@@ -489,19 +477,19 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
*/
public function getCausesrisksIdCauseriskBcbb_GG($causesrisks)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_causerisk as gg
+ // Get from #__costbenefitprojection_causerisk as gg
$query->select($db->quoteName(
array('gg.id','gg.name','gg.ref','gg.alias','gg.description'),
array('id','name','ref','alias','description')));
$query->from($db->quoteName('#__costbenefitprojection_causerisk', 'gg'));
- // [2856] Check if $causesrisks is an array with values.
+ // Check if $causesrisks is an array with values.
$array = $causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -512,21 +500,21 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
return false;
}
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on description.
+ // Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
- // [2135] Checking if description has uikit components that must be loaded.
+ // Checking if description has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp);
}
return $items;
@@ -534,6 +522,60 @@ class CostbenefitprojectionModelCombinedresults extends JModelList
return false;
}
+ /**
+ * Method to get an array of Intervention Objects.
+ *
+ * @return mixed An array of Intervention Objects on success, false on failure.
+ *
+ */
+ public function getCountryCountryInterventionBcbb_DD($country)
+ {
+ // Get a db connection.
+ $db = JFactory::getDbo();
+
+ // Create a new query object.
+ $query = $db->getQuery(true);
+
+ // Get from #__costbenefitprojection_intervention as dd
+ $query->select($db->quoteName(
+ array('dd.id','dd.name','dd.type','dd.coverage','dd.duration','dd.share','dd.description','dd.reference','dd.interventions','dd.intervention','dd.published','dd.created_by','dd.modified_by','dd.created','dd.modified'),
+ 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));
+ $query->where('dd.published = 1');
+ $query->order('dd.ordering ASC');
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+ $db->execute();
+
+ // check if there was data returned
+ if ($db->getNumRows())
+ {
+ $items = $db->loadObjectList();
+
+ // Convert the parameter fields into objects.
+ foreach ($items as $nr => &$item)
+ {
+ if (CostbenefitprojectionHelper::checkString($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);
+ // 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);
+ }
+ return $items;
+ }
+ return false;
+ }
+
/**
* Get the uikit needed components
diff --git a/site/models/company.php b/site/models/company.php
index 08c72519..b2940c62 100644
--- a/site/models/company.php
+++ b/site/models/company.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.php
@@ -91,60 +91,60 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
if (!empty($item->causesrisks))
{
- // [4270] JSON Decode causesrisks.
+ // JSON Decode causesrisks.
$item->causesrisks = json_decode($item->causesrisks);
}
- // [4312] Get the advanced encription key.
+ // Get the advanced encription key.
$advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced');
- // [4314] Get the encription object.
+ // Get the encription object.
$advanced = new FOFEncryptAes($advancedkey, 256);
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)))
{
- // [4320] advanced decript data medical_turnovers_males.
+ // advanced decript data medical_turnovers_males.
$item->medical_turnovers_males = rtrim($advanced->decryptString($item->medical_turnovers_males), "\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)))
{
- // [4320] advanced decript data sick_leave_males.
+ // advanced decript data sick_leave_males.
$item->sick_leave_males = rtrim($advanced->decryptString($item->sick_leave_males), "\0");
}
if (!empty($item->males) && $advancedkey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true)))
{
- // [4320] advanced decript data males.
+ // advanced decript data males.
$item->males = rtrim($advanced->decryptString($item->males), "\0");
}
if (!empty($item->females) && $advancedkey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true)))
{
- // [4320] advanced decript data females.
+ // advanced decript data females.
$item->females = rtrim($advanced->decryptString($item->females), "\0");
}
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)))
{
- // [4320] advanced decript data medical_turnovers_females.
+ // advanced decript data medical_turnovers_females.
$item->medical_turnovers_females = rtrim($advanced->decryptString($item->medical_turnovers_females), "\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)))
{
- // [4320] advanced decript data sick_leave_females.
+ // advanced decript data sick_leave_females.
$item->sick_leave_females = rtrim($advanced->decryptString($item->sick_leave_females), "\0");
}
if (!empty($item->total_salary) && $advancedkey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true)))
{
- // [4320] advanced decript data total_salary.
+ // advanced decript data total_salary.
$item->total_salary = rtrim($advanced->decryptString($item->total_salary), "\0");
}
if (!empty($item->total_healthcare) && $advancedkey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true)))
{
- // [4320] advanced decript data total_healthcare.
+ // advanced decript data total_healthcare.
$item->total_healthcare = rtrim($advanced->decryptString($item->total_healthcare), "\0");
}
@@ -154,8 +154,8 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_costbenefitprojection.company');
}
}
- $this->companyakyj = $item->id;
- $this->companyvkhc = $item->id;
+ $this->companygfcf = $item->id;
+ $this->companydzoi = $item->id;
return $item;
}
@@ -165,18 +165,18 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getVgascaling_factors()
+ public function getXpxscaling_factors()
{
- // [7244] Get the user object.
+ // Get the user object.
$user = JFactory::getUser();
- // [7246] Create a new query object.
+ // Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7249] Select some fields
+ // Select some fields
$query->select('a.*');
- // [7256] From the costbenefitprojection_scaling_factor table
+ // From the costbenefitprojection_scaling_factor table
$query->from($db->quoteName('#__costbenefitprojection_scaling_factor', 'a'));
// Filter by companies (admin sees all)
@@ -196,43 +196,43 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
}
- // [7849] From the costbenefitprojection_causerisk table.
+ // From the costbenefitprojection_causerisk table.
$query->select($db->quoteName('g.name','causerisk_name'));
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_causerisk', 'g') . ' ON (' . $db->quoteName('a.causerisk') . ' = ' . $db->quoteName('g.id') . ')');
- // [7849] From the costbenefitprojection_company table.
+ // From the costbenefitprojection_company table.
$query->select($db->quoteName('h.name','company_name'));
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_company', 'h') . ' ON (' . $db->quoteName('a.company') . ' = ' . $db->quoteName('h.id') . ')');
- // [7272] Filter by companyakyj global.
- $companyakyj = $this->companyakyj;
- if (is_numeric($companyakyj ))
+ // Filter by companygfcf global.
+ $companygfcf = $this->companygfcf;
+ if (is_numeric($companygfcf ))
{
- $query->where('a.company = ' . (int) $companyakyj );
+ $query->where('a.company = ' . (int) $companygfcf );
}
- elseif (is_string($companyakyj))
+ elseif (is_string($companygfcf))
{
- $query->where('a.company = ' . $db->quote($companyakyj));
+ $query->where('a.company = ' . $db->quote($companygfcf));
}
else
{
$query->where('a.company = -5');
}
- // [7304] Order the results by ordering
+ // Order the results by ordering
$query->order('a.ordering ASC');
- // [7306] Load the items
+ // Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10914] set values to display correctly.
+ // set values to display correctly.
if (CostbenefitprojectionHelper::checkArray($items))
{
- // [10917] get user object.
+ // get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -255,18 +255,18 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getCfeinterventions()
+ public function getZqbinterventions()
{
- // [7244] Get the user object.
+ // Get the user object.
$user = JFactory::getUser();
- // [7246] Create a new query object.
+ // Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7249] Select some fields
+ // Select some fields
$query->select('a.*');
- // [7256] From the costbenefitprojection_intervention table
+ // From the costbenefitprojection_intervention table
$query->from($db->quoteName('#__costbenefitprojection_intervention', 'a'));
// Filter the companies (admin sees all)
@@ -286,39 +286,39 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
}
- // [7849] From the costbenefitprojection_company table.
+ // From the costbenefitprojection_company table.
$query->select($db->quoteName('g.name','company_name'));
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_company', 'g') . ' ON (' . $db->quoteName('a.company') . ' = ' . $db->quoteName('g.id') . ')');
- // [7272] Filter by companyvkhc global.
- $companyvkhc = $this->companyvkhc;
- if (is_numeric($companyvkhc ))
+ // Filter by companydzoi global.
+ $companydzoi = $this->companydzoi;
+ if (is_numeric($companydzoi ))
{
- $query->where('a.company = ' . (int) $companyvkhc );
+ $query->where('a.company = ' . (int) $companydzoi );
}
- elseif (is_string($companyvkhc))
+ elseif (is_string($companydzoi))
{
- $query->where('a.company = ' . $db->quote($companyvkhc));
+ $query->where('a.company = ' . $db->quote($companydzoi));
}
else
{
$query->where('a.company = -5');
}
- // [7304] Order the results by ordering
+ // Order the results by ordering
$query->order('a.ordering ASC');
- // [7306] Load the items
+ // Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10914] set values to display correctly.
+ // set values to display correctly.
if (CostbenefitprojectionHelper::checkArray($items))
{
- // [10917] get user object.
+ // get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -345,13 +345,13 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
}
- // [11180] set selection value to a translatable value
+ // set selection value to a translatable value
if (CostbenefitprojectionHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
- // [11187] convert type
- $item->type = $this->selectionTranslationCfeinterventions($item->type, 'type');
+ // convert type
+ $item->type = $this->selectionTranslationZqbinterventions($item->type, 'type');
}
}
@@ -365,16 +365,16 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
*
* @return translatable string
*/
- public function selectionTranslationCfeinterventions($value,$name)
+ public function selectionTranslationZqbinterventions($value,$name)
{
- // [11213] Array of type language strings
+ // Array of type language strings
if ($name == 'type')
{
$typeArray = array(
1 => 'COM_COSTBENEFITPROJECTION_INTERVENTION_SINGLE',
2 => 'COM_COSTBENEFITPROJECTION_INTERVENTION_CLUSTER'
);
- // [11244] Now check if value is found in this array
+ // Now check if value is found in this array
if (isset($typeArray[$value]) && CostbenefitprojectionHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
@@ -394,7 +394,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
- { // [9865] Get the form.
+ { // Get the form.
$form = $this->loadForm('com_costbenefitprojection.company', 'company', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@@ -404,12 +404,12 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$jinput = JFactory::getApplication()->input;
- // [9950] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
- // [9955] The back end uses id so we use that the rest of the time and set it to 0 by default.
+ // The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@@ -417,207 +417,207 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$user = JFactory::getUser();
- // [9961] Check for existing item.
- // [9962] Modify the form based on Edit State access controls.
+ // Check for existing item.
+ // Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('company.edit.state', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.state', 'com_costbenefitprojection')))
{
- // [9975] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
- // [9978] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
- // [9983] Modify the form based on Edit Creaded By access controls.
+ // Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('company.edit.created_by', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.created_by', 'com_costbenefitprojection')))
{
- // [9995] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
- // [9997] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
- // [9999] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
- // [10002] Modify the form based on Edit Creaded Date access controls.
+ // Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('company.edit.created', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.created', 'com_costbenefitprojection')))
{
- // [10014] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
- // [10016] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
- // [10024] Modify the form based on Edit Email access controls.
+ // Modify the form based on Edit Email access controls.
if ($id != 0 && (!$user->authorise('company.edit.email', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.email', 'com_costbenefitprojection')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('email', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('email', 'readonly', 'true');
if (!$form->getValue('email'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('email', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('email', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit User access controls.
+ // Modify the form based on Edit User access controls.
if ($id != 0 && (!$user->authorise('company.edit.user', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.user', 'com_costbenefitprojection')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('user', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('user', 'readonly', 'true');
if (!$form->getValue('user'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('user', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('user', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit Department access controls.
+ // Modify the form based on Edit Department access controls.
if ($id != 0 && (!$user->authorise('company.edit.department', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.department', 'com_costbenefitprojection')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('department', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('department', 'readonly', 'true');
- // [10034] Disable radio button for display.
+ // Disable radio button for display.
$class = $form->getFieldAttribute('department', 'class', '');
$form->setFieldAttribute('department', 'class', $class.' disabled no-click');
if (!$form->getValue('department'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('department', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('department', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit Country access controls.
+ // Modify the form based on Edit Country access controls.
if ($id != 0 && (!$user->authorise('company.edit.country', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.country', 'com_costbenefitprojection')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('country', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('country', 'readonly', 'true');
if (!$form->getValue('country'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('country', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('country', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit Serviceprovider access controls.
+ // Modify the form based on Edit Serviceprovider access controls.
if ($id != 0 && (!$user->authorise('company.edit.serviceprovider', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.serviceprovider', 'com_costbenefitprojection')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('serviceprovider', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('serviceprovider', 'readonly', 'true');
if (!$form->getValue('serviceprovider'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('serviceprovider', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('serviceprovider', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit Per access controls.
+ // Modify the form based on Edit Per access controls.
if ($id != 0 && (!$user->authorise('company.edit.per', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.per', 'com_costbenefitprojection')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('per', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('per', 'readonly', 'true');
- // [10034] Disable radio button for display.
+ // Disable radio button for display.
$class = $form->getFieldAttribute('per', 'class', '');
$form->setFieldAttribute('per', 'class', $class.' disabled no-click');
if (!$form->getValue('per'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('per', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('per', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit Causesrisks access controls.
+ // 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')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('causesrisks', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('causesrisks', 'readonly', 'true');
if (!$form->getValue('causesrisks'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('causesrisks', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('causesrisks', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit Percentfemale access controls.
+ // 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')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('percentfemale', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('percentfemale', 'readonly', 'true');
- // [10034] Disable radio button for display.
+ // Disable radio button for display.
$class = $form->getFieldAttribute('percentfemale', 'class', '');
$form->setFieldAttribute('percentfemale', 'class', $class.' disabled no-click');
if (!$form->getValue('percentfemale'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('percentfemale', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('percentfemale', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit Datayear access controls.
+ // 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')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('datayear', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('datayear', 'readonly', 'true');
if (!$form->getValue('datayear'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('datayear', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('datayear', 'required', 'false');
}
}
- // [10024] Modify the form based on Edit Percentmale access controls.
+ // Modify the form based on Edit Percentmale access controls.
if ($id != 0 && (!$user->authorise('company.edit.percentmale', 'com_costbenefitprojection.company.' . (int) $id))
|| ($id == 0 && !$user->authorise('company.edit.percentmale', 'com_costbenefitprojection')))
{
- // [10028] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('percentmale', 'disabled', 'true');
- // [10030] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('percentmale', 'readonly', 'true');
- // [10034] Disable radio button for display.
+ // Disable radio button for display.
$class = $form->getFieldAttribute('percentmale', 'class', '');
$form->setFieldAttribute('percentmale', 'class', $class.' disabled no-click');
if (!$form->getValue('percentmale'))
{
- // [10040] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('percentmale', 'filter', 'unset');
- // [10042] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('percentmale', 'required', 'false');
}
}
@@ -654,7 +654,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
$user = JFactory::getUser();
- // [10166] The record has been set. Check the record permissions.
+ // The record has been set. Check the record permissions.
return $user->authorise('company.delete', 'com_costbenefitprojection.company.' . (int) $record->id);
}
return false;
@@ -676,14 +676,14 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
if ($recordId)
{
- // [10253] The record has been set. Check the record permissions.
+ // The record has been set. Check the record permissions.
$permission = $user->authorise('company.edit.state', 'com_costbenefitprojection.company.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
- // [10270] In the absense of better information, revert to the component permissions.
+ // In the absense of better information, revert to the component permissions.
return $user->authorise('company.edit.state', 'com_costbenefitprojection');
}
@@ -698,7 +698,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [10078] Check specific edit permission then general edit permission.
+ // 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'))
@@ -813,20 +813,20 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
- // [9069] check if the not_required field is set
+ // check if the not_required field is set
if (CostbenefitprojectionHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
- // [9074] now change the required field attributes value
+ // now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
- // [9077] make sure there is a string value
+ // make sure there is a string value
if (CostbenefitprojectionHelper::checkString($requiredField))
{
- // [9080] change to false
+ // change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
- // [9082] also clear the data set
+ // also clear the data set
$data[$requiredField] = '';
}
}
@@ -957,7 +957,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [5226] Set some needed variables.
+ // Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -1000,12 +1000,12 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
}
- // [5246] get list of uniqe fields
+ // get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
- // [5248] remove move_copy from array
+ // remove move_copy from array
unset($values['move_copy']);
- // [5251] make sure published is set
+ // make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@@ -1017,21 +1017,21 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$newIds = array();
- // [5288] Parent exists so let's proceed
+ // Parent exists so let's proceed
while (!empty($pks))
{
- // [5291] Pop the first ID off the stack
+ // Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
- // [5296] only allow copy if user may edit this item.
+ // only allow copy if user may edit this item.
if (!$this->user->authorise('company.edit', $contexts[$pk]))
{
- // [5306] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@@ -1039,19 +1039,19 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
- // [5311] Check that the row actually exists
+ // Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5316] Fatal error
+ // Fatal error
$this->setError($error);
return false;
}
else
{
- // [5323] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@@ -1059,7 +1059,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$this->table->name = $this->generateUniqe('name',$this->table->name);
- // [5359] insert all set values
+ // insert all set values
if (CostbenefitprojectionHelper::checkArray($values))
{
foreach ($values as $key => $value)
@@ -1071,7 +1071,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
}
- // [5371] update all uniqe fields
+ // update all uniqe fields
if (CostbenefitprojectionHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@@ -1080,13 +1080,13 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
}
- // [5380] Reset the ID because we are making a copy
+ // Reset the ID because we are making a copy
$this->table->id = 0;
- // [5383] TODO: Deal with ordering?
- // [5384] $this->table->ordering = 1;
+ // TODO: Deal with ordering?
+ // $this->table->ordering = 1;
- // [5386] Check the row.
+ // Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -1099,7 +1099,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5399] Store the row.
+ // Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -1107,14 +1107,14 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
return false;
}
- // [5407] Get the new item ID
+ // Get the new item ID
$newId = $this->table->get('id');
- // [5410] Add the new ID to the array
+ // Add the new ID to the array
$newIds[$pk] = $newId;
}
- // [5414] Clean the cache
+ // Clean the cache
$this->cleanCache();
return $newIds;
@@ -1135,7 +1135,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [5028] Set some needed variables.
+ // Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -1179,15 +1179,15 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
}
- // [5050] make sure published only updates if user has the permission.
+ // make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('company.edit.state'))
{
unset($values['published']);
}
- // [5063] remove move_copy from array
+ // remove move_copy from array
unset($values['move_copy']);
- // [5084] Parent exists so we proceed
+ // Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('company.edit', $contexts[$pk]))
@@ -1197,30 +1197,30 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
return false;
}
- // [5101] Check that the row actually exists
+ // Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5106] Fatal error
+ // Fatal error
$this->setError($error);
return false;
}
else
{
- // [5113] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
- // [5119] insert all set values.
+ // insert all set values.
if (CostbenefitprojectionHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
- // [5124] Do special action for access.
+ // Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@@ -1233,7 +1233,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
- // [5136] Check the row.
+ // Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -1246,7 +1246,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5149] Store the row.
+ // Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -1255,7 +1255,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
}
}
- // [5158] Clean the cache
+ // Clean the cache
$this->cleanCache();
return true;
@@ -1285,60 +1285,60 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
- // [4380] Set the causesrisks string to JSON string.
+ // Set the causesrisks string to JSON string.
if (isset($data['causesrisks']))
{
$data['causesrisks'] = (string) json_encode($data['causesrisks']);
}
- // [4420] Get the advanced encription key.
+ // Get the advanced encription key.
$advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced');
- // [4422] Get the encription object
+ // Get the encription object
$advanced = new FOFEncryptAes($advancedkey, 256);
- // [4426] Encript data medical_turnovers_males.
+ // Encript data medical_turnovers_males.
if (isset($data['medical_turnovers_males']) && $advancedkey)
{
$data['medical_turnovers_males'] = $advanced->encryptString($data['medical_turnovers_males']);
}
- // [4426] Encript data sick_leave_males.
+ // Encript data sick_leave_males.
if (isset($data['sick_leave_males']) && $advancedkey)
{
$data['sick_leave_males'] = $advanced->encryptString($data['sick_leave_males']);
}
- // [4426] Encript data males.
+ // Encript data males.
if (isset($data['males']) && $advancedkey)
{
$data['males'] = $advanced->encryptString($data['males']);
}
- // [4426] Encript data females.
+ // Encript data females.
if (isset($data['females']) && $advancedkey)
{
$data['females'] = $advanced->encryptString($data['females']);
}
- // [4426] Encript data medical_turnovers_females.
+ // Encript data medical_turnovers_females.
if (isset($data['medical_turnovers_females']) && $advancedkey)
{
$data['medical_turnovers_females'] = $advanced->encryptString($data['medical_turnovers_females']);
}
- // [4426] Encript data sick_leave_females.
+ // Encript data sick_leave_females.
if (isset($data['sick_leave_females']) && $advancedkey)
{
$data['sick_leave_females'] = $advanced->encryptString($data['sick_leave_females']);
}
- // [4426] Encript data total_salary.
+ // Encript data total_salary.
if (isset($data['total_salary']) && $advancedkey)
{
$data['total_salary'] = $advanced->encryptString($data['total_salary']);
}
- // [4426] Encript data total_healthcare.
+ // Encript data total_healthcare.
if (isset($data['total_healthcare']) && $advancedkey)
{
$data['total_healthcare'] = $advanced->encryptString($data['total_healthcare']);
@@ -1359,10 +1359,10 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
$data['params'] = (string) $params;
}
- // [5506] Alter the uniqe field for save as copy
+ // Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
- // [5509] Automatic handling of other uniqe fields
+ // Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (CostbenefitprojectionHelper::checkArray($uniqeFields))
{
@@ -1415,7 +1415,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
protected function _generateNewTitle($title)
{
- // [5564] Alter the title
+ // Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))
diff --git a/site/models/companyresults.php b/site/models/companyresults.php
index 8e95dca5..cb5304d1 100644
--- a/site/models/companyresults.php
+++ b/site/models/companyresults.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companyresults.php
@@ -135,123 +135,125 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
try
{
- // [2560] Get the advanced encription.
+ // Get the advanced encription.
$advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced');
- // [2562] Get the encription object.
+ // Get the encription object.
$advanced = new FOFEncryptAes($advancedkey, 256);
- // [2466] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2468] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [1916] Get from #__costbenefitprojection_company as a
+ // Get from #__costbenefitprojection_company as a
$query->select($db->quoteName(
array('a.id','a.name','a.user','a.department','a.per','a.country','a.serviceprovider','a.datayear','a.working_days','a.total_salary','a.total_healthcare','a.productivity_losses','a.males','a.females','a.medical_turnovers_males','a.medical_turnovers_females','a.sick_leave_males','a.sick_leave_females','a.percentmale','a.percentfemale','a.causesrisks','a.published','a.access'),
array('id','name','user','department','per','country','serviceprovider','datayear','working_days','total_salary','total_healthcare','productivity_losses','males','females','medical_turnovers_males','medical_turnovers_females','sick_leave_males','sick_leave_females','percentmale','percentfemale','causesrisks','published','access')));
$query->from($db->quoteName('#__costbenefitprojection_company', 'a'));
- // [1916] Get from #__costbenefitprojection_country as e
+ // Get from #__costbenefitprojection_country as e
$query->select($db->quoteName(
array('e.id','e.name','e.alias','e.user','e.currency','e.datayear','e.worldzone','e.codethree','e.codetwo','e.working_days','e.presenteeism','e.medical_turnovers','e.sick_leave','e.healthcare','e.productivity_losses','e.publicname','e.publicemail','e.publicnumber','e.publicaddress','e.percentmale','e.percentfemale','e.causesrisks','e.maledeath','e.femaledeath','e.maleyld','e.femaleyld','e.access'),
array('country_id','country_name','country_alias','country_user','country_currency','country_datayear','country_worldzone','country_codethree','country_codetwo','country_working_days','country_presenteeism','country_medical_turnovers','country_sick_leave','country_healthcare','country_productivity_losses','country_publicname','country_publicemail','country_publicnumber','country_publicaddress','country_percentmale','country_percentfemale','country_causesrisks','country_maledeath','country_femaledeath','country_maleyld','country_femaleyld','country_access')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_country', 'e')) . ' ON (' . $db->quoteName('a.country') . ' = ' . $db->quoteName('e.id') . ')');
- // [1916] Get from #__costbenefitprojection_currency as f
+ // Get from #__costbenefitprojection_currency as f
$query->select($db->quoteName(
array('f.id','f.name','f.alias','f.codethree','f.numericcode','f.symbol','f.thousands','f.decimalplace','f.decimalsymbol','f.positivestyle','f.negativestyle','f.published','f.access','f.ordering'),
array('currency_id','currency_name','currency_alias','currency_codethree','currency_numericcode','currency_symbol','currency_thousands','currency_decimalplace','currency_decimalsymbol','currency_positivestyle','currency_negativestyle','currency_published','currency_access','currency_ordering')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_currency', 'f')) . ' ON (' . $db->quoteName('e.currency') . ' = ' . $db->quoteName('f.codethree') . ')');
$query->where('a.id = ' . (int) $pk);
- // [2479] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
- // [2481] Load the results as a stdClass object.
+ // Load the results as a stdClass object.
$data = $db->loadObject();
if (empty($data))
{
- // [2492] If no data is found redirect to default page and show warning.
+ // If no data is found redirect to default page and show warning.
JError::raiseWarning(500, JText::_('COM_COSTBENEFITPROJECTION_NOT_FOUND_OR_ACCESS_DENIED'));
JFactory::getApplication()->redirect('index.php?option=com_costbenefitprojection&view=cpanel');
return false;
}
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)))
{
- // [2118] Decode medical_turnovers_males
+ // Decode medical_turnovers_males
$data->medical_turnovers_males = rtrim($advanced->decryptString($data->medical_turnovers_males), "\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)))
{
- // [2118] Decode sick_leave_males
+ // Decode sick_leave_males
$data->sick_leave_males = rtrim($advanced->decryptString($data->sick_leave_males), "\0");
}
if (!empty($data->males) && $advancedkey && !is_numeric($data->males) && $data->males === base64_encode(base64_decode($data->males, true)))
{
- // [2118] Decode males
+ // Decode males
$data->males = rtrim($advanced->decryptString($data->males), "\0");
}
if (CostbenefitprojectionHelper::checkString($data->causesrisks))
{
- // [2118] Decode causesrisks
+ // Decode causesrisks
$data->causesrisks = json_decode($data->causesrisks, true);
}
if (!empty($data->females) && $advancedkey && !is_numeric($data->females) && $data->females === base64_encode(base64_decode($data->females, true)))
{
- // [2118] Decode females
+ // Decode females
$data->females = rtrim($advanced->decryptString($data->females), "\0");
}
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)))
{
- // [2118] Decode medical_turnovers_females
+ // Decode medical_turnovers_females
$data->medical_turnovers_females = rtrim($advanced->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)))
{
- // [2118] Decode sick_leave_females
+ // Decode sick_leave_females
$data->sick_leave_females = rtrim($advanced->decryptString($data->sick_leave_females), "\0");
}
if (!empty($data->total_salary) && $advancedkey && !is_numeric($data->total_salary) && $data->total_salary === base64_encode(base64_decode($data->total_salary, true)))
{
- // [2118] Decode total_salary
+ // Decode total_salary
$data->total_salary = rtrim($advanced->decryptString($data->total_salary), "\0");
}
if (!empty($data->total_healthcare) && $advancedkey && !is_numeric($data->total_healthcare) && $data->total_healthcare === base64_encode(base64_decode($data->total_healthcare, true)))
{
- // [2118] Decode total_healthcare
+ // Decode total_healthcare
$data->total_healthcare = rtrim($advanced->decryptString($data->total_healthcare), "\0");
}
if (CostbenefitprojectionHelper::checkString($data->country_causesrisks))
{
- // [2118] Decode country_causesrisks
+ // Decode country_causesrisks
$data->country_causesrisks = json_decode($data->country_causesrisks, true);
}
- // [2133] Make sure the content prepare plugins fire on country_publicaddress.
+ // Make sure the content prepare plugins fire on country_publicaddress.
$data->country_publicaddress = JHtml::_('content.prepare',$data->country_publicaddress);
- // [2135] Checking if country_publicaddress has uikit components that must be loaded.
+ // Checking if country_publicaddress has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($data->country_publicaddress,$this->uikitComp);
- // [2438] set the global causesrisks value.
+ // set the global causesrisks value.
$this->a_causesrisks = $data->causesrisks;
- // [2438] set the global datayear value.
+ // set the global datayear value.
$this->a_datayear = $data->datayear;
- // [2438] set the global datayear value.
+ // set the global datayear value.
$this->e_datayear = $data->country_datayear;
- // [2438] set the global causesrisks value.
+ // set the global causesrisks value.
$this->e_causesrisks = $data->country_causesrisks;
- // [2166] set countryCountryHealth_dataB to the $data object.
+ // set countryCountryHealth_dataB to the $data object.
$data->countryCountryHealth_dataB = $this->getCountryCountryHealth_dataEbbe_B($data->country);
- // [2166] set idCompanyScaling_factorC to the $data object.
+ // set idCompanyScaling_factorC to the $data object.
$data->idCompanyScaling_factorC = $this->getIdCompanyScaling_factorEbbe_C($data->id);
- // [2166] set idCompanyInterventionD to the $data object.
+ // set idCompanyInterventionD to the $data object.
$data->idCompanyInterventionD = $this->getIdCompanyInterventionEbbe_D($data->id);
- // [2166] set causesrisksIdCauseriskG to the $data object.
+ // set causesrisksIdCauseriskG to the $data object.
$data->causesrisksIdCauseriskG = $this->getCausesrisksIdCauseriskEbbe_G($data->causesrisks);
- // [2166] set countryCountryHealth_dataBB to the $data object.
+ // set countryCountryHealth_dataBB to the $data object.
$data->countryCountryHealth_dataBB = $this->getCountryCountryHealth_dataEbbe_BB($data->country);
- // [2166] set causesrisksIdCauseriskGG to the $data object.
+ // set causesrisksIdCauseriskGG to the $data object.
$data->causesrisksIdCauseriskGG = $this->getCausesrisksIdCauseriskEbbe_GG($data->country_causesrisks);
+ // set countryCountryInterventionDD to the $data object.
+ $data->countryCountryInterventionDD = $this->getCountryCountryInterventionEbbe_DD($data->country);
- // [2586] set data object to item.
+ // set data object to item.
$this->_item[$pk] = $data;
}
catch (Exception $e)
@@ -280,19 +282,19 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
*/
public function getCountryCountryHealth_dataEbbe_B($country)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_health_data as b
+ // Get from #__costbenefitprojection_health_data as b
$query->select($db->quoteName(
array('b.id','b.causerisk','b.year','b.maledeath','b.maleyld','b.femaledeath','b.femaleyld','b.published'),
array('id','causerisk','year','maledeath','maleyld','femaledeath','femaleyld','published')));
$query->from($db->quoteName('#__costbenefitprojection_health_data', 'b'));
$query->where('b.country = ' . $db->quote($country));
- // [2248] Check if $this->a_causesrisks is an array with values.
+ // Check if $this->a_causesrisks is an array with values.
$array = $this->a_causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -306,11 +308,11 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
$query->where('b.year = ' . $db->quote($this->a_datayear));
$query->order('b.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@@ -326,13 +328,13 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
*/
public function getIdCompanyScaling_factorEbbe_C($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_scaling_factor as c
+ // Get from #__costbenefitprojection_scaling_factor as c
$query->select($db->quoteName(
array('c.id','c.causerisk','c.reference','c.yld_scaling_factor_males','c.yld_scaling_factor_females','c.mortality_scaling_factor_males','c.mortality_scaling_factor_females','c.presenteeism_scaling_factor_males','c.presenteeism_scaling_factor_females','c.health_scaling_factor','c.published'),
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')));
@@ -341,21 +343,21 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
$query->where('c.published = 1');
$query->order('c.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on reference.
+ // Make sure the content prepare plugins fire on reference.
$item->reference = JHtml::_('content.prepare',$item->reference);
- // [2135] Checking if reference has uikit components that must be loaded.
+ // Checking if reference has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp);
}
return $items;
@@ -371,13 +373,13 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
*/
public function getIdCompanyInterventionEbbe_D($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_intervention as d
+ // Get from #__costbenefitprojection_intervention as d
$query->select($db->quoteName(
array('d.id','d.name','d.type','d.coverage','d.duration','d.share','d.description','d.reference','d.intervention','d.published','d.created_by','d.modified_by','d.created','d.modified'),
array('id','name','type','coverage','duration','share','description','reference','intervention','published','created_by','modified_by','created','modified')));
@@ -386,25 +388,21 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
$query->where('d.published = 1');
$query->order('d.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on description.
- $item->description = JHtml::_('content.prepare',$item->description);
- // [2135] Checking if description has uikit components that must be loaded.
- $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp);
- // [2133] Make sure the content prepare plugins fire on reference.
+ // Make sure the content prepare plugins fire on reference.
$item->reference = JHtml::_('content.prepare',$item->reference);
- // [2135] Checking if reference has uikit components that must be loaded.
+ // Checking if reference has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp);
}
return $items;
@@ -420,19 +418,19 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
*/
public function getCausesrisksIdCauseriskEbbe_G($causesrisks)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_causerisk as g
+ // Get from #__costbenefitprojection_causerisk as g
$query->select($db->quoteName(
array('g.id','g.name','g.ref','g.alias','g.description'),
array('id','name','ref','alias','description')));
$query->from($db->quoteName('#__costbenefitprojection_causerisk', 'g'));
- // [2856] Check if $causesrisks is an array with values.
+ // Check if $causesrisks is an array with values.
$array = $causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -443,24 +441,14 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
return false;
}
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
- $items = $db->loadObjectList();
-
- // [2960] Convert the parameter fields into objects.
- foreach ($items as $nr => &$item)
- {
- // [2133] Make sure the content prepare plugins fire on description.
- $item->description = JHtml::_('content.prepare',$item->description);
- // [2135] Checking if description has uikit components that must be loaded.
- $this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp);
- }
- return $items;
+ return $db->loadObjectList();
}
return false;
}
@@ -473,19 +461,19 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
*/
public function getCountryCountryHealth_dataEbbe_BB($country)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_health_data as bb
+ // Get from #__costbenefitprojection_health_data as bb
$query->select($db->quoteName(
array('bb.id','bb.asset_id','bb.causerisk','bb.year','bb.country','bb.maledeath','bb.maleyld','bb.femaledeath','bb.femaleyld','bb.published','bb.created_by','bb.modified_by','bb.created','bb.modified','bb.version','bb.hits','bb.ordering'),
array('id','asset_id','causerisk','year','country','maledeath','maleyld','femaledeath','femaleyld','published','created_by','modified_by','created','modified','version','hits','ordering')));
$query->from($db->quoteName('#__costbenefitprojection_health_data', 'bb'));
$query->where('bb.country = ' . $db->quote($country));
- // [2248] Check if $this->e_causesrisks is an array with values.
+ // Check if $this->e_causesrisks is an array with values.
$array = $this->e_causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -499,11 +487,11 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
$query->where('bb.year = ' . $db->quote($this->e_datayear));
$query->order('bb.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@@ -519,19 +507,19 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
*/
public function getCausesrisksIdCauseriskEbbe_GG($causesrisks)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_causerisk as gg
+ // Get from #__costbenefitprojection_causerisk as gg
$query->select($db->quoteName(
array('gg.id','gg.name','gg.ref','gg.alias','gg.description'),
array('id','name','ref','alias','description')));
$query->from($db->quoteName('#__costbenefitprojection_causerisk', 'gg'));
- // [2856] Check if $causesrisks is an array with values.
+ // Check if $causesrisks is an array with values.
$array = $causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -542,21 +530,21 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
return false;
}
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on description.
+ // Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
- // [2135] Checking if description has uikit components that must be loaded.
+ // Checking if description has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp);
}
return $items;
@@ -564,6 +552,54 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
return false;
}
+ /**
+ * Method to get an array of Intervention Objects.
+ *
+ * @return mixed An array of Intervention Objects on success, false on failure.
+ *
+ */
+ public function getCountryCountryInterventionEbbe_DD($country)
+ {
+ // Get a db connection.
+ $db = JFactory::getDbo();
+
+ // Create a new query object.
+ $query = $db->getQuery(true);
+
+ // Get from #__costbenefitprojection_intervention as dd
+ $query->select($db->quoteName(
+ array('dd.id','dd.name','dd.type','dd.coverage','dd.duration','dd.share','dd.description','dd.reference','dd.intervention','dd.published','dd.created_by','dd.modified_by','dd.created','dd.modified'),
+ 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));
+ $query->where('dd.published = 1');
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+ $db->execute();
+
+ // check if there was data returned
+ if ($db->getNumRows())
+ {
+ $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);
+ // 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);
+ }
+ return $items;
+ }
+ return false;
+ }
+
/**
* Get the uikit needed components
diff --git a/site/models/cpanel.php b/site/models/cpanel.php
index 700fabe0..ce7464e9 100644
--- a/site/models/cpanel.php
+++ b/site/models/cpanel.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage cpanel.php
@@ -59,39 +59,39 @@ class CostbenefitprojectionModelCpanel extends JModelList
$this->app = JFactory::getApplication();
$this->input = $this->app->input;
$this->initSet = true;
- // [3048] Make sure all records load, since no pagination allowed.
+ // Make sure all records load, since no pagination allowed.
$this->setState('list.limit', 0);
- // [3050] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [3053] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [1916] Get from #__costbenefitprojection_company as a
+ // Get from #__costbenefitprojection_company as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.user','a.department','a.per','a.email','a.country','a.serviceprovider','a.datayear','a.working_days','a.total_salary','a.total_healthcare','a.productivity_losses','a.males','a.females','a.medical_turnovers_males','a.medical_turnovers_females','a.sick_leave_males','a.sick_leave_females','a.percentmale','a.percentfemale','a.causesrisks','a.not_required','a.published','a.checked_out','a.checked_out_time','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering'),
array('id','asset_id','name','user','department','per','email','country','serviceprovider','datayear','working_days','total_salary','total_healthcare','productivity_losses','males','females','medical_turnovers_males','medical_turnovers_females','sick_leave_males','sick_leave_females','percentmale','percentfemale','causesrisks','not_required','published','checked_out','checked_out_time','created_by','modified_by','created','modified','version','hits','ordering')));
$query->from($db->quoteName('#__costbenefitprojection_company', 'a'));
- // [1916] Get from #__costbenefitprojection_country as b
+ // Get from #__costbenefitprojection_country as b
$query->select($db->quoteName(
array('b.name','b.user','b.publicname','b.publicemail','b.publicnumber','b.publicaddress'),
array('country_name','country_user','country_publicname','country_publicemail','country_publicnumber','country_publicaddress')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_country', 'b')) . ' ON (' . $db->quoteName('a.country') . ' = ' . $db->quoteName('b.id') . ')');
- // [1916] Get from #__costbenefitprojection_service_provider as c
+ // Get from #__costbenefitprojection_service_provider as c
$query->select($db->quoteName(
array('c.user','c.publicname','c.publicemail','c.publicnumber','c.publicaddress'),
array('service_provider_user','service_provider_publicname','service_provider_publicemail','service_provider_publicnumber','service_provider_publicaddress')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_service_provider', 'c')) . ' ON (' . $db->quoteName('a.serviceprovider') . ' = ' . $db->quoteName('c.id') . ')');
- // [1916] Get from #__costbenefitprojection_currency as g
+ // Get from #__costbenefitprojection_currency as g
$query->select($db->quoteName(
array('g.id','g.name','g.codethree','g.numericcode','g.symbol','g.thousands','g.decimalplace','g.decimalsymbol','g.positivestyle','g.negativestyle'),
array('currency_id','currency_name','currency_codethree','currency_numericcode','currency_symbol','currency_thousands','currency_decimalplace','currency_decimalsymbol','currency_positivestyle','currency_negativestyle')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_currency', 'g')) . ' ON (' . $db->quoteName('b.currency') . ' = ' . $db->quoteName('g.codethree') . ')');
- // [1916] Get from #__users as d
+ // Get from #__users as d
$query->select($db->quoteName(
array('d.name'),
array('service_provider_name')));
@@ -99,7 +99,7 @@ class CostbenefitprojectionModelCpanel extends JModelList
$query->where('a.user = ' . (int) $this->userId);
$query->order('a.ordering ASC');
- // [3066] return the query object
+ // return the query object
return $query;
}
@@ -125,72 +125,72 @@ class CostbenefitprojectionModelCpanel extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_costbenefitprojection', true);
- // [3155] Get the advanced encription.
+ // Get the advanced encription.
$advancedkey = CostbenefitprojectionHelper::getCryptKey('advanced');
- // [3157] Get the encription object.
+ // Get the encription object.
$advanced = new FOFEncryptAes($advancedkey, 256);
- // [3081] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [3084] Always create a slug for sef URL's
+ // Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
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)))
{
- // [2118] Decode medical_turnovers_males
+ // Decode medical_turnovers_males
$item->medical_turnovers_males = rtrim($advanced->decryptString($item->medical_turnovers_males), "\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)))
{
- // [2118] Decode sick_leave_males
+ // Decode sick_leave_males
$item->sick_leave_males = rtrim($advanced->decryptString($item->sick_leave_males), "\0");
}
if (!empty($item->males) && $advancedkey && !is_numeric($item->males) && $item->males === base64_encode(base64_decode($item->males, true)))
{
- // [2118] Decode males
+ // Decode males
$item->males = rtrim($advanced->decryptString($item->males), "\0");
}
if (CostbenefitprojectionHelper::checkString($item->causesrisks))
{
- // [2118] Decode causesrisks
+ // Decode causesrisks
$item->causesrisks = json_decode($item->causesrisks, true);
}
if (!empty($item->females) && $advancedkey && !is_numeric($item->females) && $item->females === base64_encode(base64_decode($item->females, true)))
{
- // [2118] Decode females
+ // Decode females
$item->females = rtrim($advanced->decryptString($item->females), "\0");
}
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)))
{
- // [2118] Decode medical_turnovers_females
+ // Decode medical_turnovers_females
$item->medical_turnovers_females = rtrim($advanced->decryptString($item->medical_turnovers_females), "\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)))
{
- // [2118] Decode sick_leave_females
+ // Decode sick_leave_females
$item->sick_leave_females = rtrim($advanced->decryptString($item->sick_leave_females), "\0");
}
if (!empty($item->total_salary) && $advancedkey && !is_numeric($item->total_salary) && $item->total_salary === base64_encode(base64_decode($item->total_salary, true)))
{
- // [2118] Decode total_salary
+ // Decode total_salary
$item->total_salary = rtrim($advanced->decryptString($item->total_salary), "\0");
}
if (!empty($item->total_healthcare) && $advancedkey && !is_numeric($item->total_healthcare) && $item->total_healthcare === base64_encode(base64_decode($item->total_healthcare, true)))
{
- // [2118] Decode total_healthcare
+ // Decode total_healthcare
$item->total_healthcare = rtrim($advanced->decryptString($item->total_healthcare), "\0");
}
- // [2133] Make sure the content prepare plugins fire on country_publicaddress.
+ // Make sure the content prepare plugins fire on country_publicaddress.
$item->country_publicaddress = JHtml::_('content.prepare',$item->country_publicaddress);
- // [2135] Checking if country_publicaddress has uikit components that must be loaded.
+ // Checking if country_publicaddress has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->country_publicaddress,$this->uikitComp);
- // [2133] Make sure the content prepare plugins fire on service_provider_publicaddress.
+ // Make sure the content prepare plugins fire on service_provider_publicaddress.
$item->service_provider_publicaddress = JHtml::_('content.prepare',$item->service_provider_publicaddress);
- // [2135] Checking if service_provider_publicaddress has uikit components that must be loaded.
+ // Checking if service_provider_publicaddress has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->service_provider_publicaddress,$this->uikitComp);
- // [2166] set idCompanyScaling_factorD to the $item object.
+ // set idCompanyScaling_factorD to the $item object.
$item->idCompanyScaling_factorD = $this->getIdCompanyScaling_factorBdef_D($item->id);
- // [2166] set idCompanyInterventionE to the $item object.
+ // set idCompanyInterventionE to the $item object.
$item->idCompanyInterventionE = $this->getIdCompanyInterventionBdef_E($item->id);
}
@@ -206,41 +206,41 @@ class CostbenefitprojectionModelCpanel extends JModelList
*/
public function getIdCompanyScaling_factorBdef_D($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_scaling_factor as d
+ // Get from #__costbenefitprojection_scaling_factor as d
$query->select($db->quoteName(
array('d.id','d.asset_id','d.company','d.causerisk','d.reference','d.yld_scaling_factor_males','d.yld_scaling_factor_females','d.mortality_scaling_factor_males','d.mortality_scaling_factor_females','d.presenteeism_scaling_factor_males','d.presenteeism_scaling_factor_females','d.published','d.checked_out','d.checked_out_time','d.created_by','d.modified_by','d.created','d.modified','d.version','d.hits','d.ordering'),
array('id','asset_id','company','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','published','checked_out','checked_out_time','created_by','modified_by','created','modified','version','hits','ordering')));
$query->from($db->quoteName('#__costbenefitprojection_scaling_factor', 'd'));
$query->where('d.company = ' . $db->quote($id));
- // [1916] Get from #__costbenefitprojection_causerisk as f
+ // Get from #__costbenefitprojection_causerisk as f
$query->select($db->quoteName(
array('f.name'),
array('causerisk_name')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_causerisk', 'f')) . ' ON (' . $db->quoteName('d.causerisk') . ' = ' . $db->quoteName('f.id') . ')');
$query->order('d.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on reference.
+ // Make sure the content prepare plugins fire on reference.
$item->reference = JHtml::_('content.prepare',$item->reference);
- // [2135] Checking if reference has uikit components that must be loaded.
+ // Checking if reference has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp);
}
return $items;
@@ -256,13 +256,13 @@ class CostbenefitprojectionModelCpanel extends JModelList
*/
public function getIdCompanyInterventionBdef_E($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_intervention as e
+ // Get from #__costbenefitprojection_intervention as e
$query->select($db->quoteName(
array('e.id','e.name','e.type','e.coverage','e.duration','e.share','e.description','e.reference','e.interventions','e.intervention','e.not_required','e.published','e.checked_out','e.checked_out_time','e.created_by','e.modified_by','e.created','e.modified','e.version','e.hits','e.ordering'),
array('id','name','type','coverage','duration','share','description','reference','interventions','intervention','not_required','published','checked_out','checked_out_time','created_by','modified_by','created','modified','version','hits','ordering')));
@@ -270,30 +270,30 @@ class CostbenefitprojectionModelCpanel extends JModelList
$query->where('e.company = ' . $db->quote($id));
$query->order('e.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
if (CostbenefitprojectionHelper::checkString($item->interventions))
{
- // [2118] Decode interventions
+ // Decode interventions
$item->interventions = json_decode($item->interventions, true);
}
- // [2133] Make sure the content prepare plugins fire on description.
+ // Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
- // [2135] Checking if description has uikit components that must be loaded.
+ // Checking if description has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp);
- // [2133] Make sure the content prepare plugins fire on reference.
+ // Make sure the content prepare plugins fire on reference.
$item->reference = JHtml::_('content.prepare',$item->reference);
- // [2135] Checking if reference has uikit components that must be loaded.
+ // Checking if reference has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->reference,$this->uikitComp);
}
return $items;
diff --git a/site/models/createaccount.php b/site/models/createaccount.php
index a6bd75c5..8b566d85 100644
--- a/site/models/createaccount.php
+++ b/site/models/createaccount.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage createaccount.php
@@ -59,15 +59,15 @@ class CostbenefitprojectionModelCreateaccount extends JModelList
$this->app = JFactory::getApplication();
$this->input = $this->app->input;
$this->initSet = true;
- // [3048] Make sure all records load, since no pagination allowed.
+ // Make sure all records load, since no pagination allowed.
$this->setState('list.limit', 0);
- // [3050] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [3053] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [1916] Get from #__costbenefitprojection_country as a
+ // Get from #__costbenefitprojection_country as a
$query->select($db->quoteName(
array('a.id','a.user','a.name','a.publicname','a.publicemail','a.publicnumber','a.publicaddress'),
array('id','user','name','publicname','publicemail','publicnumber','publicaddress')));
@@ -82,7 +82,7 @@ class CostbenefitprojectionModelCreateaccount extends JModelList
$query->where('a.published = 1');
$query->order('a.name ASC');
- // [3066] return the query object
+ // return the query object
return $query;
}
@@ -108,16 +108,16 @@ class CostbenefitprojectionModelCreateaccount extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_costbenefitprojection', true);
- // [3081] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [3084] Always create a slug for sef URL's
+ // Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
- // [2133] Make sure the content prepare plugins fire on publicaddress.
+ // Make sure the content prepare plugins fire on publicaddress.
$item->publicaddress = JHtml::_('content.prepare',$item->publicaddress);
- // [2135] Checking if publicaddress has uikit components that must be loaded.
+ // Checking if publicaddress has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->publicaddress,$this->uikitComp);
- // [2166] set idCountryService_providerB to the $item object.
+ // set idCountryService_providerB to the $item object.
$item->idCountryService_providerB = $this->getIdCountryService_providerCace_B($item->id);
}
@@ -133,13 +133,13 @@ class CostbenefitprojectionModelCreateaccount extends JModelList
*/
public function getIdCountryService_providerCace_B($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_service_provider as b
+ // Get from #__costbenefitprojection_service_provider as b
$query->select($db->quoteName(
array('b.id','b.user','b.publicname','b.publicemail','b.publicnumber','b.publicaddress'),
array('id','user','publicname','publicemail','publicnumber','publicaddress')));
@@ -148,21 +148,21 @@ class CostbenefitprojectionModelCreateaccount extends JModelList
$query->where('b.published = 1');
$query->order('b.publicname ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on publicaddress.
+ // Make sure the content prepare plugins fire on publicaddress.
$item->publicaddress = JHtml::_('content.prepare',$item->publicaddress);
- // [2135] Checking if publicaddress has uikit components that must be loaded.
+ // Checking if publicaddress has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->publicaddress,$this->uikitComp);
}
return $items;
diff --git a/site/models/forms/company.js b/site/models/forms/company.js
index 971367a0..05720af2 100644
--- a/site/models/forms/company.js
+++ b/site/models/forms/company.js
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.js
@@ -17,178 +17,178 @@
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_SnIDlNnAec_required = false;
-jform_SnIDlNnCnE_required = false;
-jform_SnIDlNnoqB_required = false;
-jform_SnIDlNnJBM_required = false;
-jform_SnIDlNnWPY_required = false;
-jform_SnIDlNnqpv_required = false;
-jform_SnIDlNnBGi_required = false;
+jform_rVlgHfNvak_required = false;
+jform_rVlgHfNCAd_required = false;
+jform_rVlgHfNZmt_required = false;
+jform_rVlgHfNraQ_required = false;
+jform_rVlgHfNByX_required = false;
+jform_rVlgHfNMir_required = false;
+jform_rVlgHfNlaW_required = false;
// Initial Script
jQuery(document).ready(function()
{
- var department_SnIDlNn = jQuery("#jform_department input[type='radio']:checked").val();
- SnIDlNn(department_SnIDlNn);
+ var department_rVlgHfN = jQuery("#jform_department input[type='radio']:checked").val();
+ rVlgHfN(department_rVlgHfN);
- var department_WskNCQq = jQuery("#jform_department input[type='radio']:checked").val();
- WskNCQq(department_WskNCQq);
+ var department_otRDwfE = jQuery("#jform_department input[type='radio']:checked").val();
+ otRDwfE(department_otRDwfE);
});
-// the SnIDlNn function
-function SnIDlNn(department_SnIDlNn)
+// the rVlgHfN function
+function rVlgHfN(department_rVlgHfN)
{
- // [8307] set the function logic
- if (department_SnIDlNn == 2)
+ // set the function logic
+ if (department_rVlgHfN == 2)
{
jQuery('#jform_causesrisks').closest('.control-group').show();
- if (jform_SnIDlNnAec_required)
+ if (jform_rVlgHfNvak_required)
{
updateFieldRequired('causesrisks',0);
jQuery('#jform_causesrisks').prop('required','required');
jQuery('#jform_causesrisks').attr('aria-required',true);
jQuery('#jform_causesrisks').addClass('required');
- jform_SnIDlNnAec_required = false;
+ jform_rVlgHfNvak_required = false;
}
jQuery('#jform_percentfemale').closest('.control-group').show();
jQuery('#jform_percentmale').closest('.control-group').show();
jQuery('#jform_productivity_losses').closest('.control-group').show();
- if (jform_SnIDlNnCnE_required)
+ if (jform_rVlgHfNCAd_required)
{
updateFieldRequired('productivity_losses',0);
jQuery('#jform_productivity_losses').prop('required','required');
jQuery('#jform_productivity_losses').attr('aria-required',true);
jQuery('#jform_productivity_losses').addClass('required');
- jform_SnIDlNnCnE_required = false;
+ jform_rVlgHfNCAd_required = false;
}
jQuery('#jform_medical_turnovers_females').closest('.control-group').show();
- if (jform_SnIDlNnoqB_required)
+ if (jform_rVlgHfNZmt_required)
{
updateFieldRequired('medical_turnovers_females',0);
jQuery('#jform_medical_turnovers_females').prop('required','required');
jQuery('#jform_medical_turnovers_females').attr('aria-required',true);
jQuery('#jform_medical_turnovers_females').addClass('required');
- jform_SnIDlNnoqB_required = false;
+ jform_rVlgHfNZmt_required = false;
}
jQuery('#jform_medical_turnovers_males').closest('.control-group').show();
- if (jform_SnIDlNnJBM_required)
+ if (jform_rVlgHfNraQ_required)
{
updateFieldRequired('medical_turnovers_males',0);
jQuery('#jform_medical_turnovers_males').prop('required','required');
jQuery('#jform_medical_turnovers_males').attr('aria-required',true);
jQuery('#jform_medical_turnovers_males').addClass('required');
- jform_SnIDlNnJBM_required = false;
+ jform_rVlgHfNraQ_required = false;
}
jQuery('#jform_sick_leave_females').closest('.control-group').show();
- if (jform_SnIDlNnWPY_required)
+ if (jform_rVlgHfNByX_required)
{
updateFieldRequired('sick_leave_females',0);
jQuery('#jform_sick_leave_females').prop('required','required');
jQuery('#jform_sick_leave_females').attr('aria-required',true);
jQuery('#jform_sick_leave_females').addClass('required');
- jform_SnIDlNnWPY_required = false;
+ jform_rVlgHfNByX_required = false;
}
jQuery('#jform_sick_leave_males').closest('.control-group').show();
- if (jform_SnIDlNnqpv_required)
+ if (jform_rVlgHfNMir_required)
{
updateFieldRequired('sick_leave_males',0);
jQuery('#jform_sick_leave_males').prop('required','required');
jQuery('#jform_sick_leave_males').attr('aria-required',true);
jQuery('#jform_sick_leave_males').addClass('required');
- jform_SnIDlNnqpv_required = false;
+ jform_rVlgHfNMir_required = false;
}
jQuery('#jform_total_healthcare').closest('.control-group').show();
- if (jform_SnIDlNnBGi_required)
+ if (jform_rVlgHfNlaW_required)
{
updateFieldRequired('total_healthcare',0);
jQuery('#jform_total_healthcare').prop('required','required');
jQuery('#jform_total_healthcare').attr('aria-required',true);
jQuery('#jform_total_healthcare').addClass('required');
- jform_SnIDlNnBGi_required = false;
+ jform_rVlgHfNlaW_required = false;
}
}
else
{
jQuery('#jform_causesrisks').closest('.control-group').hide();
- if (!jform_SnIDlNnAec_required)
+ if (!jform_rVlgHfNvak_required)
{
updateFieldRequired('causesrisks',1);
jQuery('#jform_causesrisks').removeAttr('required');
jQuery('#jform_causesrisks').removeAttr('aria-required');
jQuery('#jform_causesrisks').removeClass('required');
- jform_SnIDlNnAec_required = true;
+ jform_rVlgHfNvak_required = true;
}
jQuery('#jform_percentfemale').closest('.control-group').hide();
jQuery('#jform_percentmale').closest('.control-group').hide();
jQuery('#jform_productivity_losses').closest('.control-group').hide();
- if (!jform_SnIDlNnCnE_required)
+ if (!jform_rVlgHfNCAd_required)
{
updateFieldRequired('productivity_losses',1);
jQuery('#jform_productivity_losses').removeAttr('required');
jQuery('#jform_productivity_losses').removeAttr('aria-required');
jQuery('#jform_productivity_losses').removeClass('required');
- jform_SnIDlNnCnE_required = true;
+ jform_rVlgHfNCAd_required = true;
}
jQuery('#jform_medical_turnovers_females').closest('.control-group').hide();
- if (!jform_SnIDlNnoqB_required)
+ if (!jform_rVlgHfNZmt_required)
{
updateFieldRequired('medical_turnovers_females',1);
jQuery('#jform_medical_turnovers_females').removeAttr('required');
jQuery('#jform_medical_turnovers_females').removeAttr('aria-required');
jQuery('#jform_medical_turnovers_females').removeClass('required');
- jform_SnIDlNnoqB_required = true;
+ jform_rVlgHfNZmt_required = true;
}
jQuery('#jform_medical_turnovers_males').closest('.control-group').hide();
- if (!jform_SnIDlNnJBM_required)
+ if (!jform_rVlgHfNraQ_required)
{
updateFieldRequired('medical_turnovers_males',1);
jQuery('#jform_medical_turnovers_males').removeAttr('required');
jQuery('#jform_medical_turnovers_males').removeAttr('aria-required');
jQuery('#jform_medical_turnovers_males').removeClass('required');
- jform_SnIDlNnJBM_required = true;
+ jform_rVlgHfNraQ_required = true;
}
jQuery('#jform_sick_leave_females').closest('.control-group').hide();
- if (!jform_SnIDlNnWPY_required)
+ if (!jform_rVlgHfNByX_required)
{
updateFieldRequired('sick_leave_females',1);
jQuery('#jform_sick_leave_females').removeAttr('required');
jQuery('#jform_sick_leave_females').removeAttr('aria-required');
jQuery('#jform_sick_leave_females').removeClass('required');
- jform_SnIDlNnWPY_required = true;
+ jform_rVlgHfNByX_required = true;
}
jQuery('#jform_sick_leave_males').closest('.control-group').hide();
- if (!jform_SnIDlNnqpv_required)
+ if (!jform_rVlgHfNMir_required)
{
updateFieldRequired('sick_leave_males',1);
jQuery('#jform_sick_leave_males').removeAttr('required');
jQuery('#jform_sick_leave_males').removeAttr('aria-required');
jQuery('#jform_sick_leave_males').removeClass('required');
- jform_SnIDlNnqpv_required = true;
+ jform_rVlgHfNMir_required = true;
}
jQuery('#jform_total_healthcare').closest('.control-group').hide();
- if (!jform_SnIDlNnBGi_required)
+ if (!jform_rVlgHfNlaW_required)
{
updateFieldRequired('total_healthcare',1);
jQuery('#jform_total_healthcare').removeAttr('required');
jQuery('#jform_total_healthcare').removeAttr('aria-required');
jQuery('#jform_total_healthcare').removeClass('required');
- jform_SnIDlNnBGi_required = true;
+ jform_rVlgHfNlaW_required = true;
}
}
}
-// the WskNCQq function
-function WskNCQq(department_WskNCQq)
+// the otRDwfE function
+function otRDwfE(department_otRDwfE)
{
- // [8307] set the function logic
- if (department_WskNCQq == 1)
+ // set the function logic
+ if (department_otRDwfE == 1)
{
jQuery('.age_groups_note').closest('.control-group').show();
jQuery('.cause_risk_selection_note').closest('.control-group').show();
diff --git a/site/models/forms/company.xml b/site/models/forms/company.xml
index eb5eaeec..24b6b4a4 100644
--- a/site/models/forms/company.xml
+++ b/site/models/forms/company.xml
@@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_costbenefitprojection/models/fields"
>
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -42,18 +42,18 @@
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -42,18 +42,18 @@
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
-
+
-
+
-
+
interventions))
{
- // [4270] JSON Decode interventions.
+ // JSON Decode interventions.
$item->interventions = json_decode($item->interventions);
}
@@ -116,7 +116,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
- { // [9865] Get the form.
+ { // Get the form.
$form = $this->loadForm('com_costbenefitprojection.intervention', 'intervention', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@@ -126,12 +126,12 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
$jinput = JFactory::getApplication()->input;
- // [9950] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
- // [9955] The back end uses id so we use that the rest of the time and set it to 0 by default.
+ // The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@@ -139,34 +139,34 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
$user = JFactory::getUser();
- // [9961] Check for existing item.
- // [9962] Modify the form based on Edit State access controls.
+ // Check for existing item.
+ // Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('intervention.edit.state', 'com_costbenefitprojection.intervention.' . (int) $id))
|| ($id == 0 && !$user->authorise('intervention.edit.state', 'com_costbenefitprojection')))
{
- // [9975] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
- // [9978] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
- // [9983] Modify the form based on Edit Creaded By access controls.
+ // Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_costbenefitprojection'))
{
- // [9995] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
- // [9997] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
- // [9999] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
- // [10002] Modify the form based on Edit Creaded Date access controls.
+ // Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_costbenefitprojection'))
{
- // [10014] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
- // [10016] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@@ -202,7 +202,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
}
$user = JFactory::getUser();
- // [10166] The record has been set. Check the record permissions.
+ // The record has been set. Check the record permissions.
return $user->authorise('intervention.delete', 'com_costbenefitprojection.intervention.' . (int) $record->id);
}
return false;
@@ -224,14 +224,14 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
if ($recordId)
{
- // [10253] The record has been set. Check the record permissions.
+ // The record has been set. Check the record permissions.
$permission = $user->authorise('intervention.edit.state', 'com_costbenefitprojection.intervention.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
- // [10270] In the absense of better information, revert to the component permissions.
+ // In the absense of better information, revert to the component permissions.
return $user->authorise('intervention.edit.state', 'com_costbenefitprojection');
}
@@ -246,7 +246,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [10078] Check specific edit permission then general edit permission.
+ // Check specific edit permission then general edit permission.
$user = JFactory::getUser();
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// get company id
@@ -361,20 +361,20 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
- // [9069] check if the not_required field is set
+ // check if the not_required field is set
if (CostbenefitprojectionHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
- // [9074] now change the required field attributes value
+ // now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
- // [9077] make sure there is a string value
+ // make sure there is a string value
if (CostbenefitprojectionHelper::checkString($requiredField))
{
- // [9080] change to false
+ // change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
- // [9082] also clear the data set
+ // also clear the data set
$data[$requiredField] = '';
}
}
@@ -505,7 +505,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [5226] Set some needed variables.
+ // Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -563,12 +563,12 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
}
}
- // [5246] get list of uniqe fields
+ // get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
- // [5248] remove move_copy from array
+ // remove move_copy from array
unset($values['move_copy']);
- // [5251] make sure published is set
+ // make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@@ -580,21 +580,21 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
$newIds = array();
- // [5288] Parent exists so let's proceed
+ // Parent exists so let's proceed
while (!empty($pks))
{
- // [5291] Pop the first ID off the stack
+ // Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
- // [5296] only allow copy if user may edit this item.
+ // only allow copy if user may edit this item.
if (!$this->user->authorise('intervention.edit', $contexts[$pk]))
{
- // [5306] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@@ -602,19 +602,19 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
}
- // [5311] Check that the row actually exists
+ // Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5316] Fatal error
+ // Fatal error
$this->setError($error);
return false;
}
else
{
- // [5323] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@@ -622,7 +622,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
$this->table->name = $this->generateUniqe('name',$this->table->name);
- // [5359] insert all set values
+ // insert all set values
if (CostbenefitprojectionHelper::checkArray($values))
{
foreach ($values as $key => $value)
@@ -634,7 +634,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
}
}
- // [5371] update all uniqe fields
+ // update all uniqe fields
if (CostbenefitprojectionHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@@ -643,13 +643,13 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
}
}
- // [5380] Reset the ID because we are making a copy
+ // Reset the ID because we are making a copy
$this->table->id = 0;
- // [5383] TODO: Deal with ordering?
- // [5384] $this->table->ordering = 1;
+ // TODO: Deal with ordering?
+ // $this->table->ordering = 1;
- // [5386] Check the row.
+ // Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -662,7 +662,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5399] Store the row.
+ // Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -670,14 +670,14 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
return false;
}
- // [5407] Get the new item ID
+ // Get the new item ID
$newId = $this->table->get('id');
- // [5410] Add the new ID to the array
+ // Add the new ID to the array
$newIds[$pk] = $newId;
}
- // [5414] Clean the cache
+ // Clean the cache
$this->cleanCache();
return $newIds;
@@ -698,7 +698,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [5028] Set some needed variables.
+ // Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -757,15 +757,15 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
}
}
- // [5050] make sure published only updates if user has the permission.
+ // make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('intervention.edit.state'))
{
unset($values['published']);
}
- // [5063] remove move_copy from array
+ // remove move_copy from array
unset($values['move_copy']);
- // [5084] Parent exists so we proceed
+ // Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('intervention.edit', $contexts[$pk]))
@@ -775,30 +775,30 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
return false;
}
- // [5101] Check that the row actually exists
+ // Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5106] Fatal error
+ // Fatal error
$this->setError($error);
return false;
}
else
{
- // [5113] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
- // [5119] insert all set values.
+ // insert all set values.
if (CostbenefitprojectionHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
- // [5124] Do special action for access.
+ // Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@@ -811,7 +811,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
}
- // [5136] Check the row.
+ // Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -824,7 +824,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5149] Store the row.
+ // Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -833,7 +833,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
}
}
- // [5158] Clean the cache
+ // Clean the cache
$this->cleanCache();
return true;
@@ -863,7 +863,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
- // [4380] Set the interventions string to JSON string.
+ // Set the interventions string to JSON string.
if (isset($data['interventions']))
{
$data['interventions'] = (string) json_encode($data['interventions']);
@@ -877,10 +877,10 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
$data['params'] = (string) $params;
}
- // [5506] Alter the uniqe field for save as copy
+ // Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
- // [5509] Automatic handling of other uniqe fields
+ // Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (CostbenefitprojectionHelper::checkArray($uniqeFields))
{
@@ -933,7 +933,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
protected function _generateNewTitle($title)
{
- // [5564] Alter the title
+ // Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))
diff --git a/site/models/publicresults.php b/site/models/publicresults.php
index 7f5b792d..0fc26849 100644
--- a/site/models/publicresults.php
+++ b/site/models/publicresults.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publicresults.php
@@ -121,70 +121,72 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
{
try
{
- // [2466] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2468] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [1916] Get from #__costbenefitprojection_country as a
+ // Get from #__costbenefitprojection_country as a
$query->select($db->quoteName(
array('a.id','a.currency','a.datayear','a.percentmale','a.percentfemale','a.causesrisks','a.published'),
array('country','currency','datayear','percentmale','percentfemale','causesrisks','published')));
$query->from($db->quoteName('#__costbenefitprojection_country', 'a'));
- // [1916] Get from #__costbenefitprojection_country as e
+ // Get from #__costbenefitprojection_country as e
$query->select($db->quoteName(
array('e.id','e.name','e.alias','e.user','e.currency','e.datayear','e.worldzone','e.codethree','e.codetwo','e.working_days','e.presenteeism','e.medical_turnovers','e.sick_leave','e.healthcare','e.productivity_losses','e.publicname','e.publicemail','e.publicnumber','e.publicaddress','e.percentmale','e.percentfemale','e.causesrisks','e.maledeath','e.femaledeath','e.maleyld','e.femaleyld','e.access'),
array('country_id','country_name','country_alias','country_user','country_currency','country_datayear','country_worldzone','country_codethree','country_codetwo','country_working_days','country_presenteeism','country_medical_turnovers','country_sick_leave','country_healthcare','country_productivity_losses','country_publicname','country_publicemail','country_publicnumber','country_publicaddress','country_percentmale','country_percentfemale','country_causesrisks','country_maledeath','country_femaledeath','country_maleyld','country_femaleyld','country_access')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_country', 'e')) . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('e.id') . ')');
- // [1916] Get from #__costbenefitprojection_currency as f
+ // Get from #__costbenefitprojection_currency as f
$query->select($db->quoteName(
array('f.id','f.name','f.alias','f.codethree','f.numericcode','f.symbol','f.thousands','f.decimalplace','f.decimalsymbol','f.positivestyle','f.negativestyle','f.published','f.access','f.ordering'),
array('currency_id','currency_name','currency_alias','currency_codethree','currency_numericcode','currency_symbol','currency_thousands','currency_decimalplace','currency_decimalsymbol','currency_positivestyle','currency_negativestyle','currency_published','currency_access','currency_ordering')));
$query->join('LEFT', ($db->quoteName('#__costbenefitprojection_currency', 'f')) . ' ON (' . $db->quoteName('e.currency') . ' = ' . $db->quoteName('f.codethree') . ')');
$query->where('a.id = ' . (int) $pk);
- // [2479] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
- // [2481] Load the results as a stdClass object.
+ // Load the results as a stdClass object.
$data = $db->loadObject();
if (empty($data))
{
- // [2492] If no data is found redirect to default page and show warning.
+ // If no data is found redirect to default page and show warning.
JError::raiseWarning(500, JText::_('COM_COSTBENEFITPROJECTION_NOT_FOUND_OR_ACCESS_DENIED'));
JFactory::getApplication()->redirect('index.php?option=com_costbenefitprojection&view=cpanel');
return false;
}
if (CostbenefitprojectionHelper::checkString($data->country_causesrisks))
{
- // [2118] Decode country_causesrisks
+ // Decode country_causesrisks
$data->country_causesrisks = json_decode($data->country_causesrisks, true);
}
- // [2133] Make sure the content prepare plugins fire on country_publicaddress.
+ // Make sure the content prepare plugins fire on country_publicaddress.
$data->country_publicaddress = JHtml::_('content.prepare',$data->country_publicaddress);
- // [2135] Checking if country_publicaddress has uikit components that must be loaded.
+ // Checking if country_publicaddress has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($data->country_publicaddress,$this->uikitComp);
- // [2438] set the global causesrisks value.
+ // set the global causesrisks value.
$this->a_causesrisks = $data->causesrisks;
- // [2438] set the global datayear value.
+ // set the global datayear value.
$this->a_datayear = $data->datayear;
- // [2438] set the global datayear value.
+ // set the global datayear value.
$this->e_datayear = $data->country_datayear;
- // [2438] set the global causesrisks value.
+ // set the global causesrisks value.
$this->e_causesrisks = $data->country_causesrisks;
- // [2166] set idCountryHealth_dataB to the $data object.
+ // set idCountryHealth_dataB to the $data object.
$data->idCountryHealth_dataB = $this->getIdCountryHealth_dataDadd_B($data->country);
- // [2166] set causesrisksIdCauseriskG to the $data object.
+ // set causesrisksIdCauseriskG to the $data object.
$data->causesrisksIdCauseriskG = $this->getCausesrisksIdCauseriskDadd_G($data->causesrisks);
- // [2166] set idCountryHealth_dataBB to the $data object.
+ // set idCountryHealth_dataBB to the $data object.
$data->idCountryHealth_dataBB = $this->getIdCountryHealth_dataDadd_BB($data->country);
- // [2166] set causesrisksIdCauseriskGG to the $data object.
+ // set causesrisksIdCauseriskGG to the $data object.
$data->causesrisksIdCauseriskGG = $this->getCausesrisksIdCauseriskDadd_GG($data->country_causesrisks);
+ // set idCountryInterventionDD to the $data object.
+ $data->idCountryInterventionDD = $this->getIdCountryInterventionDadd_DD($data->country);
- // [2586] set data object to item.
+ // set data object to item.
$this->_item[$pk] = $data;
}
catch (Exception $e)
@@ -226,19 +228,19 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
*/
public function getIdCountryHealth_dataDadd_B($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_health_data as b
+ // Get from #__costbenefitprojection_health_data as b
$query->select($db->quoteName(
array('b.id','b.causerisk','b.year','b.maledeath','b.maleyld','b.femaledeath','b.femaleyld','b.published'),
array('id','causerisk','year','maledeath','maleyld','femaledeath','femaleyld','published')));
$query->from($db->quoteName('#__costbenefitprojection_health_data', 'b'));
$query->where('b.country = ' . $db->quote($id));
- // [2248] Check if $this->a_causesrisks is an array with values.
+ // Check if $this->a_causesrisks is an array with values.
$array = $this->a_causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -252,11 +254,11 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
$query->where('b.year = ' . $db->quote($this->a_datayear));
$query->order('b.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@@ -272,19 +274,19 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
*/
public function getCausesrisksIdCauseriskDadd_G($causesrisks)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_causerisk as g
+ // Get from #__costbenefitprojection_causerisk as g
$query->select($db->quoteName(
array('g.id','g.name','g.ref','g.alias','g.description'),
array('id','name','ref','alias','description')));
$query->from($db->quoteName('#__costbenefitprojection_causerisk', 'g'));
- // [2856] Check if $causesrisks is an array with values.
+ // Check if $causesrisks is an array with values.
$array = $causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -295,11 +297,11 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
return false;
}
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@@ -315,19 +317,19 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
*/
public function getIdCountryHealth_dataDadd_BB($id)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_health_data as bb
+ // Get from #__costbenefitprojection_health_data as bb
$query->select($db->quoteName(
array('bb.id','bb.asset_id','bb.causerisk','bb.year','bb.country','bb.maledeath','bb.maleyld','bb.femaledeath','bb.femaleyld','bb.published','bb.created_by','bb.modified_by','bb.created','bb.modified','bb.version','bb.hits','bb.ordering'),
array('id','asset_id','causerisk','year','country','maledeath','maleyld','femaledeath','femaleyld','published','created_by','modified_by','created','modified','version','hits','ordering')));
$query->from($db->quoteName('#__costbenefitprojection_health_data', 'bb'));
$query->where('bb.country = ' . $db->quote($id));
- // [2248] Check if $this->e_causesrisks is an array with values.
+ // Check if $this->e_causesrisks is an array with values.
$array = $this->e_causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -341,11 +343,11 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
$query->where('bb.year = ' . $db->quote($this->e_datayear));
$query->order('bb.ordering ASC');
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@@ -361,19 +363,19 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
*/
public function getCausesrisksIdCauseriskDadd_GG($causesrisks)
{
- // [2846] Get a db connection.
+ // Get a db connection.
$db = JFactory::getDbo();
- // [2848] Create a new query object.
+ // Create a new query object.
$query = $db->getQuery(true);
- // [2850] Get from #__costbenefitprojection_causerisk as gg
+ // Get from #__costbenefitprojection_causerisk as gg
$query->select($db->quoteName(
array('gg.id','gg.name','gg.ref','gg.alias','gg.description'),
array('id','name','ref','alias','description')));
$query->from($db->quoteName('#__costbenefitprojection_causerisk', 'gg'));
- // [2856] Check if $causesrisks is an array with values.
+ // Check if $causesrisks is an array with values.
$array = $causesrisks;
if (isset($array) && CostbenefitprojectionHelper::checkArray($array))
{
@@ -384,21 +386,21 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
return false;
}
- // [2904] Reset the query using our newly populated query object.
+ // Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
- // [2907] check if there was data returned
+ // check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [2960] Convert the parameter fields into objects.
+ // Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
- // [2133] Make sure the content prepare plugins fire on description.
+ // Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
- // [2135] Checking if description has uikit components that must be loaded.
+ // Checking if description has uikit components that must be loaded.
$this->uikitComp = CostbenefitprojectionHelper::getUikitComp($item->description,$this->uikitComp);
}
return $items;
@@ -406,6 +408,114 @@ class CostbenefitprojectionModelPublicresults extends JModelItem
return false;
}
+ /**
+ * Method to get an array of Intervention Objects.
+ *
+ * @return mixed An array of Intervention Objects on success, false on failure.
+ *
+ */
+ public function getIdCountryInterventionDadd_DD($id)
+ {
+ // Get a db connection.
+ $db = JFactory::getDbo();
+
+ // Create a new query object.
+ $query = $db->getQuery(true);
+
+ // Get from #__costbenefitprojection_intervention as dd
+ $query->select($db->quoteName(
+ array('dd.id','dd.name','dd.type','dd.coverage','dd.duration','dd.share','dd.description','dd.reference','dd.interventions','dd.intervention','dd.published','dd.created_by','dd.modified_by','dd.created','dd.modified'),
+ 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($id));
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+ $db->execute();
+
+ // check if there was data returned
+ if ($db->getNumRows())
+ {
+ $items = $db->loadObjectList();
+
+ // Convert the parameter fields into objects.
+ foreach ($items as $nr => &$item)
+ {
+ if (CostbenefitprojectionHelper::checkString($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);
+ // 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);
+ }
+ return $items;
+ }
+ return false;
+ }
+
+
+ /**
+ * Custom Method
+ *
+ * @return mixed An array of objects on success, false on failure.
+ *
+ */
+ public function getCountries()
+ {
+
+ if (!isset($this->initSet) || !$this->initSet)
+ {
+ $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->initSet = true;
+ }
+
+ // Get the global params
+ $globalParams = JComponentHelper::getParams('com_costbenefitprojection', true);
+ // Get a db connection.
+ $db = JFactory::getDbo();
+
+ // Create a new query object.
+ $query = $db->getQuery(true);
+
+ // Get from #__costbenefitprojection_country as a
+ $query->select($db->quoteName(
+ array('a.id','a.name','a.published'),
+ array('id','name','published')));
+ $query->from($db->quoteName('#__costbenefitprojection_country', 'a'));
+ $query->where('a.published = 1');
+ $query->where('a.datayear > 2000');
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+ $items = $db->loadObjectList();
+
+ if (empty($items))
+ {
+ return false;
+ }
+
+ // Convert the parameter fields into objects.
+ foreach ($items as $nr => &$item)
+ {
+ // Always create a slug for sef URL's
+ $item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
+ }
+ // return items
+ return $items;
+ }
+
/**
* Get the uikit needed components
diff --git a/site/models/scaling_factor.php b/site/models/scaling_factor.php
index 0be8ccd8..52e8098d 100644
--- a/site/models/scaling_factor.php
+++ b/site/models/scaling_factor.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factor.php
@@ -110,7 +110,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
- { // [9865] Get the form.
+ { // Get the form.
$form = $this->loadForm('com_costbenefitprojection.scaling_factor', 'scaling_factor', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@@ -120,12 +120,12 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
$jinput = JFactory::getApplication()->input;
- // [9950] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
- // [9955] The back end uses id so we use that the rest of the time and set it to 0 by default.
+ // The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@@ -133,34 +133,34 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
$user = JFactory::getUser();
- // [9961] Check for existing item.
- // [9962] Modify the form based on Edit State access controls.
+ // Check for existing item.
+ // Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('scaling_factor.edit.state', 'com_costbenefitprojection.scaling_factor.' . (int) $id))
|| ($id == 0 && !$user->authorise('scaling_factor.edit.state', 'com_costbenefitprojection')))
{
- // [9975] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
- // [9978] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
- // [9983] Modify the form based on Edit Creaded By access controls.
+ // Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_costbenefitprojection'))
{
- // [9995] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
- // [9997] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
- // [9999] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
- // [10002] Modify the form based on Edit Creaded Date access controls.
+ // Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_costbenefitprojection'))
{
- // [10014] Disable fields for display.
+ // Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
- // [10016] Disable fields while saving.
+ // Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@@ -196,7 +196,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
$user = JFactory::getUser();
- // [10166] The record has been set. Check the record permissions.
+ // The record has been set. Check the record permissions.
return $user->authorise('scaling_factor.delete', 'com_costbenefitprojection.scaling_factor.' . (int) $record->id);
}
return false;
@@ -218,14 +218,14 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
if ($recordId)
{
- // [10253] The record has been set. Check the record permissions.
+ // The record has been set. Check the record permissions.
$permission = $user->authorise('scaling_factor.edit.state', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
- // [10270] In the absense of better information, revert to the component permissions.
+ // In the absense of better information, revert to the component permissions.
return $user->authorise('scaling_factor.edit.state', 'com_costbenefitprojection');
}
@@ -240,7 +240,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [10078] Check specific edit permission then general edit permission.
+ // 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'))
@@ -332,6 +332,42 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
return $data;
+ }
+
+ /**
+ * Method to validate the form data.
+ *
+ * @param JForm $form The form to validate against.
+ * @param array $data The data to validate.
+ * @param string $group The name of the field group to validate.
+ *
+ * @return mixed Array of filtered data if valid, false otherwise.
+ *
+ * @see JFormRule
+ * @see JFilterInput
+ * @since 12.2
+ */
+ public function validate($form, $data, $group = null)
+ {
+ // check if the not_required field is set
+ if (CostbenefitprojectionHelper::checkString($data['not_required']))
+ {
+ $requiredFields = (array) explode(',',(string) $data['not_required']);
+ $requiredFields = array_unique($requiredFields);
+ // now change the required field attributes value
+ foreach ($requiredFields as $requiredField)
+ {
+ // make sure there is a string value
+ if (CostbenefitprojectionHelper::checkString($requiredField))
+ {
+ // change to false
+ $form->setFieldAttribute($requiredField, 'required', 'false');
+ // also clear the data set
+ $data[$requiredField] = '';
+ }
+ }
+ }
+ return parent::validate($form, $data, $group);
}
/**
@@ -457,7 +493,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [5226] Set some needed variables.
+ // Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -501,12 +537,12 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
}
- // [5246] get list of uniqe fields
+ // get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
- // [5248] remove move_copy from array
+ // remove move_copy from array
unset($values['move_copy']);
- // [5251] make sure published is set
+ // make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@@ -518,21 +554,21 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
$newIds = array();
- // [5288] Parent exists so let's proceed
+ // Parent exists so let's proceed
while (!empty($pks))
{
- // [5291] Pop the first ID off the stack
+ // Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
- // [5296] only allow copy if user may edit this item.
+ // only allow copy if user may edit this item.
if (!$this->user->authorise('scaling_factor.edit', $contexts[$pk]))
{
- // [5306] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@@ -540,19 +576,19 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
- // [5311] Check that the row actually exists
+ // Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5316] Fatal error
+ // Fatal error
$this->setError($error);
return false;
}
else
{
- // [5323] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@@ -560,7 +596,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
$this->table->causerisk = $this->generateUniqe('causerisk',$this->table->causerisk);
- // [5359] insert all set values
+ // insert all set values
if (CostbenefitprojectionHelper::checkArray($values))
{
foreach ($values as $key => $value)
@@ -572,7 +608,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
}
- // [5371] update all uniqe fields
+ // update all uniqe fields
if (CostbenefitprojectionHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@@ -581,13 +617,13 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
}
- // [5380] Reset the ID because we are making a copy
+ // Reset the ID because we are making a copy
$this->table->id = 0;
- // [5383] TODO: Deal with ordering?
- // [5384] $this->table->ordering = 1;
+ // TODO: Deal with ordering?
+ // $this->table->ordering = 1;
- // [5386] Check the row.
+ // Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -600,7 +636,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5399] Store the row.
+ // Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -608,14 +644,14 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
return false;
}
- // [5407] Get the new item ID
+ // Get the new item ID
$newId = $this->table->get('id');
- // [5410] Add the new ID to the array
+ // Add the new ID to the array
$newIds[$pk] = $newId;
}
- // [5414] Clean the cache
+ // Clean the cache
$this->cleanCache();
return $newIds;
@@ -636,7 +672,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [5028] Set some needed variables.
+ // Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -681,15 +717,15 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
}
- // [5050] make sure published only updates if user has the permission.
+ // make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('scaling_factor.edit.state'))
{
unset($values['published']);
}
- // [5063] remove move_copy from array
+ // remove move_copy from array
unset($values['move_copy']);
- // [5084] Parent exists so we proceed
+ // Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('scaling_factor.edit', $contexts[$pk]))
@@ -699,30 +735,30 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
return false;
}
- // [5101] Check that the row actually exists
+ // Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5106] Fatal error
+ // Fatal error
$this->setError($error);
return false;
}
else
{
- // [5113] Not fatal error
+ // Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
- // [5119] insert all set values.
+ // insert all set values.
if (CostbenefitprojectionHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
- // [5124] Do special action for access.
+ // Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@@ -735,7 +771,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
- // [5136] Check the row.
+ // Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -748,7 +784,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5149] Store the row.
+ // Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -757,7 +793,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
}
}
- // [5158] Clean the cache
+ // Clean the cache
$this->cleanCache();
return true;
@@ -795,10 +831,10 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
$data['params'] = (string) $params;
}
- // [5506] Alter the uniqe field for save as copy
+ // Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
- // [5509] Automatic handling of other uniqe fields
+ // Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (CostbenefitprojectionHelper::checkArray($uniqeFields))
{
@@ -851,7 +887,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
protected function _generateNewTitle($title)
{
- // [5564] Alter the title
+ // Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))
diff --git a/site/router.php b/site/router.php
index 4944d158..5a6b1550 100644
--- a/site/router.php
+++ b/site/router.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage router.php
diff --git a/site/views/combinedresults/tmpl/default.php b/site/views/combinedresults/tmpl/default.php
index 372534c1..8de69129 100644
--- a/site/views/combinedresults/tmpl/default.php
+++ b/site/views/combinedresults/tmpl/default.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default.php
diff --git a/site/views/combinedresults/tmpl/default_chart_cost.php b/site/views/combinedresults/tmpl/default_chart_cost.php
index b4a926d3..2eaba16c 100644
--- a/site/views/combinedresults/tmpl/default_chart_cost.php
+++ b/site/views/combinedresults/tmpl/default_chart_cost.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_chart_cost.php
diff --git a/site/views/combinedresults/tmpl/default_chart_cost_percent.php b/site/views/combinedresults/tmpl/default_chart_cost_percent.php
index f424014e..c3b52e3e 100644
--- a/site/views/combinedresults/tmpl/default_chart_cost_percent.php
+++ b/site/views/combinedresults/tmpl/default_chart_cost_percent.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_chart_cost_percent.php
diff --git a/site/views/combinedresults/tmpl/default_chart_intervention_cost_benefit.php b/site/views/combinedresults/tmpl/default_chart_intervention_cost_benefit.php
index 676edf16..dee2b6e5 100644
--- a/site/views/combinedresults/tmpl/default_chart_intervention_cost_benefit.php
+++ b/site/views/combinedresults/tmpl/default_chart_intervention_cost_benefit.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_chart_intervention_cost_benefit.php
diff --git a/site/views/combinedresults/tmpl/default_chart_intervention_cost_benefit_save.php b/site/views/combinedresults/tmpl/default_chart_intervention_cost_benefit_save.php
index 391c7917..e21d477e 100644
--- a/site/views/combinedresults/tmpl/default_chart_intervention_cost_benefit_save.php
+++ b/site/views/combinedresults/tmpl/default_chart_intervention_cost_benefit_save.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_chart_intervention_cost_benefit_save.php
diff --git a/site/views/combinedresults/tmpl/default_chart_work_days_lost.php b/site/views/combinedresults/tmpl/default_chart_work_days_lost.php
index 0b5e7cda..27063347 100644
--- a/site/views/combinedresults/tmpl/default_chart_work_days_lost.php
+++ b/site/views/combinedresults/tmpl/default_chart_work_days_lost.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_chart_work_days_lost.php
diff --git a/site/views/combinedresults/tmpl/default_chart_work_days_lost_percent.php b/site/views/combinedresults/tmpl/default_chart_work_days_lost_percent.php
index bb4cf3f0..cc91ff91 100644
--- a/site/views/combinedresults/tmpl/default_chart_work_days_lost_percent.php
+++ b/site/views/combinedresults/tmpl/default_chart_work_days_lost_percent.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_chart_work_days_lost_percent.php
diff --git a/site/views/combinedresults/tmpl/default_table_calculated_cost_in_detail.php b/site/views/combinedresults/tmpl/default_table_calculated_cost_in_detail.php
index 063bedb6..75afb9b1 100644
--- a/site/views/combinedresults/tmpl/default_table_calculated_cost_in_detail.php
+++ b/site/views/combinedresults/tmpl/default_table_calculated_cost_in_detail.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_table_calculated_cost_in_detail.php
diff --git a/site/views/combinedresults/tmpl/default_table_cost_summary.php b/site/views/combinedresults/tmpl/default_table_cost_summary.php
index 65fd76e2..e8d0f32d 100644
--- a/site/views/combinedresults/tmpl/default_table_cost_summary.php
+++ b/site/views/combinedresults/tmpl/default_table_cost_summary.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_table_cost_summary.php
diff --git a/site/views/combinedresults/tmpl/default_table_intervention_net_benefit.php b/site/views/combinedresults/tmpl/default_table_intervention_net_benefit.php
index 40656a9a..c263e151 100644
--- a/site/views/combinedresults/tmpl/default_table_intervention_net_benefit.php
+++ b/site/views/combinedresults/tmpl/default_table_intervention_net_benefit.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_table_intervention_net_benefit.php
diff --git a/site/views/combinedresults/tmpl/default_table_work_days_lost_summary.php b/site/views/combinedresults/tmpl/default_table_work_days_lost_summary.php
index b2502192..11576b5c 100644
--- a/site/views/combinedresults/tmpl/default_table_work_days_lost_summary.php
+++ b/site/views/combinedresults/tmpl/default_table_work_days_lost_summary.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage default_table_work_days_lost_summary.php
diff --git a/site/views/combinedresults/view.html.php b/site/views/combinedresults/view.html.php
index 977bbb2d..56fbb869 100644
--- a/site/views/combinedresults/view.html.php
+++ b/site/views/combinedresults/view.html.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage view.html.php
@@ -37,10 +37,10 @@ class CostbenefitprojectionViewCombinedresults extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
- // [3179] Initialise variables.
+ // Initialise variables.
$this->items = $this->get('Items');
- // [3208] Check for errors.
+ // Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@@ -66,10 +66,10 @@ class CostbenefitprojectionViewCombinedresults extends JViewLegacy
$this->item->currency_name = '';
}
- // [3225] Set the toolbar
+ // Set the toolbar
$this->addToolBar();
- // [3227] set the document
+ // set the document
$this->_prepareDocument();
parent::display($tpl);
@@ -81,80 +81,80 @@ class CostbenefitprojectionViewCombinedresults extends JViewLegacy
protected function _prepareDocument()
{
- // [3585] always make sure jquery is loaded.
+ // always make sure jquery is loaded.
JHtml::_('jquery.framework');
- // [3587] Load the header checker class.
+ // Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
- // [3589] Initialize the header checker.
+ // Initialize the header checker.
$HeaderCheck = new HeaderCheck;
- // [3594] Load uikit options.
+ // Load uikit options.
$uikit = $this->params->get('uikit_load');
- // [3596] Set script size.
+ // Set script size.
$size = $this->params->get('uikit_min');
- // [3598] Set css style.
+ // Set css style.
$style = $this->params->get('uikit_style');
- // [3601] The uikit css.
+ // The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_costbenefitprojection/uikit/css/uikit'.$style.$size.'.css');
}
- // [3606] The uikit js.
+ // The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_costbenefitprojection/uikit/js/uikit'.$size.'.js');
}
- // [3671] Load the needed uikit components in this view.
+ // Load the needed uikit components in this view.
$uikitComp = $this->get('UikitComp');
if ($uikit != 2 && isset($uikitComp) && CostbenefitprojectionHelper::checkArray($uikitComp))
{
- // [3675] load just in case.
+ // load just in case.
jimport('joomla.filesystem.file');
- // [3677] loading...
+ // loading...
foreach ($uikitComp as $class)
{
foreach (CostbenefitprojectionHelper::$uk_components[$class] as $name)
{
- // [3682] check if the CSS file exists.
+ // check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_costbenefitprojection/uikit/css/components/'.$name.$style.$size.'.css'))
{
- // [3685] load the css.
+ // load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_costbenefitprojection/uikit/css/components/'.$name.$style.$size.'.css');
}
- // [3688] check if the JavaScript file exists.
+ // check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_costbenefitprojection/uikit/js/components/'.$name.$size.'.js'))
{
- // [3691] load the js.
+ // load the js.
$this->document->addScript(JURI::root(true) .'/media/com_costbenefitprojection/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
- // [3567] add the google chart builder class.
+ // add the google chart builder class.
require_once JPATH_COMPONENT_ADMINISTRATOR.'/helpers/chartbuilder.php';
- // [3569] load the google chart js.
+ // load the google chart js.
$this->document->addScript(JURI::root(true) .'/media/com_costbenefitprojection/js/google.jsapi.js');
$this->document->addScript('https://canvg.googlecode.com/svn/trunk/rgbcolor.js');
$this->document->addScript('https://canvg.googlecode.com/svn/trunk/canvg.js');
- // [6813] Add the CSS for Footable.
+ // Add the CSS for Footable.
$this->document->addStyleSheet(JURI::root() .'media/com_costbenefitprojection/footable/css/footable.core.min.css');
- // [6815] Use the Metro Style
+ // Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_costbenefitprojection/footable/css/footable.metro.min.css');
}
- // [6820] Use the Legacy Style.
+ // Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_costbenefitprojection/footable/css/footable.standalone.min.css');
}
- // [6825] Add the JavaScript for Footable
+ // Add the JavaScript for Footable
$this->document->addScript(JURI::root() .'media/com_costbenefitprojection/footable/js/footable.js');
$this->document->addScript(JURI::root() .'media/com_costbenefitprojection/footable/js/footable.sort.js');
$this->document->addScript(JURI::root() .'media/com_costbenefitprojection/footable/js/footable.filter.js');
diff --git a/site/views/company/submitbutton.js b/site/views/company/submitbutton.js
index 067a7221..5aebb47b 100644
--- a/site/views/company/submitbutton.js
+++ b/site/views/company/submitbutton.js
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage submitbutton.js
diff --git a/site/views/company/tmpl/edit.php b/site/views/company/tmpl/edit.php
index dad923d6..cfe8614c 100644
--- a/site/views/company/tmpl/edit.php
+++ b/site/views/company/tmpl/edit.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage edit.php
@@ -137,33 +137,33 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
diff --git a/site/views/publicresults/tmpl/default_chart_cost.php b/site/views/publicresults/tmpl/default_chart_cost.php
deleted file mode 100644
index b4a926d3..00000000
--- a/site/views/publicresults/tmpl/default_chart_cost.php
+++ /dev/null
@@ -1,79 +0,0 @@
-
- @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');
-
-// load chart builder
-$chart = new Chartbuilder('BarChart');
-// set scaled array
-$scaled = array('unscaled','scaled');
-// check if items are set
-if(isset($this->results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)){
- foreach ($scaled as $scale){
- $i =0;
- $rowArray = array();
- foreach ($this->results->items as $key => &$item){
- $rowArray[] = array('c' => array(
- array('v' => $item->details->name),
- array('v' => $item->{'subtotal_cost_morbidity_'.$scale}, 'f' => $item->{'subtotal_costmoney_morbidity_'.$scale}),
- array('v' => $item->{'subtotal_cost_presenteeism_'.$scale}, 'f' => $item->{'subtotal_costmoney_presenteeism_'.$scale}),
- array('v' => $item->{'subtotal_cost_mortality_'.$scale}, 'f' => $item->{'subtotal_costmoney_mortality_'.$scale}),
- array('v' => $item->{'subtotal_cost_'.$scale}, 'f' => $item->{'subtotal_costmoney_'.$scale})
- ));
- $i++;
- }
-
- usort($rowArray, function($b, $a) {
- return $a['c'][4]['v'] - $b['c'][4]['v'];
- });
-
- $data = array(
- 'cols' => array(
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR'), 'type' => 'string'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_MORBIDITY'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_PRESENTEEISM_MORBIDITY'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_MORTALITY'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_TOTAL_COST'), 'type' => 'number')
- ),
- 'rows' => $rowArray
- );
-
- $height = ($i * 110)+10;
- $title = JText::sprintf('COM_COSTBENEFITPROJECTION_COST_IN_S', $this->item->currency_name);
- $chart->load(json_encode($data));
- $options = array( 'backgroundColor' => $this->Chart['backgroundColor'], 'width' => $this->Chart['width'], 'height' => $height, 'chartArea' => $this->Chart['chartArea'], 'legend' => $this->Chart['legend'], 'vAxis' => $this->Chart['vAxis'], 'hAxis' => array('textStyle' => $this->Chart['hAxis']['textStyle'], 'title' => $title, 'titleTextStyle' => $this->Chart['hAxis']['titleTextStyle']));
- echo $chart->draw('c_'.$scale, $options);
- }
-}
-
-?>
-
-
-
-
- results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)) : ?>
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/tmpl/default_chart_cost_percent.php b/site/views/publicresults/tmpl/default_chart_cost_percent.php
deleted file mode 100644
index f424014e..00000000
--- a/site/views/publicresults/tmpl/default_chart_cost_percent.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- @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');
-
-// load chart builder
-$chart = new Chartbuilder('BarChart');
-// set scaled array
-$scaled = array('unscaled','scaled');
-// check if items are set
-if(isset($this->results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)){
- foreach ($scaled as $scale){
- $i =0;
- $rowArray = array();
- foreach ($this->results->items as $key => &$item){
- $rowArray[] = array('c' => array(
- array('v' => $item->details->name),
- array('v' => round(($item->{'subtotal_cost_'.$scale} / $this->results->totals->{'total_cost_'.$scale})*100), 'f' => (float)round(($item->{'subtotal_cost_'.$scale} / $this->results->totals->{'total_cost_'.$scale})*100,3).'%')
- ));
- $i++;
- }
-
- usort($rowArray, function($b, $a) {
- return $a['c'][1]['v'] - $b['c'][1]['v'];
- });
-
- $data = array(
- 'cols' => array(
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR'), 'type' => 'string'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_PERCENT_OF_TOTAL_COST'), 'type' => 'number')
- ),
- 'rows' => $rowArray
- );
-
- $height = ($i * 70)+100;
- $chart->load(json_encode($data));
- $options = array( 'backgroundColor' => $this->Chart['backgroundColor'], 'width' => $this->Chart['width'], 'height' => $height, 'chartArea' => $this->Chart['chartArea'], 'legend' => $this->Chart['legend'], 'vAxis' => $this->Chart['vAxis'], 'hAxis' => array('textStyle' => $this->Chart['hAxis']['textStyle'], 'title' => JText::_('COM_COSTBENEFITPROJECTION__OF_ALL_HEALTHCARE_COSTS_CAUSED_BY_THE_CAUSERISK_FACTOR'), 'titleTextStyle' => $this->Chart['hAxis']['titleTextStyle']));
-
- echo $chart->draw('cp_'.$scale, $options);
- }
-}
-
-?>
-
-
-
- results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)) : ?>
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/tmpl/default_chart_cost_public.php b/site/views/publicresults/tmpl/default_chart_cost_public.php
new file mode 100644
index 00000000..1a553f7a
--- /dev/null
+++ b/site/views/publicresults/tmpl/default_chart_cost_public.php
@@ -0,0 +1,93 @@
+
+ @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');
+
+// load chart builder
+$chart = new Chartbuilder('BarChart');
+// check if items are set
+if(isset($this->results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)){
+ $i =0;
+ $rowArray = array();
+ foreach ($this->results->items as $key => &$item){
+ $rowArray[] = array('c' => array(
+ array('v' => $item->details->name),
+ array('v' => $item->{'subtotal_cost_unscaled'}, 'f' => $item->{'subtotal_costmoney_unscaled'})
+ ));
+ $i++;
+ }
+
+ usort($rowArray, function($b, $a) {
+ return $a['c'][1]['v'] - $b['c'][1]['v'];
+ });
+
+ $data = array(
+ 'cols' => array(
+ array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR_NAME'), 'type' => 'string'),
+ array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_TOTAL_COST'), 'type' => 'number')
+ ),
+ 'rows' => $rowArray
+ );
+
+ $height = ($i * 55)+10;
+ $title = JText::sprintf('COM_COSTBENEFITPROJECTION_COST_IN_S', $this->item->currency_name);
+ $chart->load(json_encode($data));
+ $options = array( 'backgroundColor' => $this->Chart['backgroundColor'], 'width' => $this->Chart['width'], 'height' => $height, 'chartArea' => $this->Chart['chartArea'], 'legend' => $this->Chart['legend'], 'vAxis' => $this->Chart['vAxis'], 'hAxis' => array('textStyle' => $this->Chart['hAxis']['textStyle'], 'title' => $title, 'titleTextStyle' => $this->Chart['hAxis']['titleTextStyle']));
+ echo $chart->draw('c_public', $options);
+}
+
+?>
+
+
+
+ results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)) : ?>
+
+
+
+
+ getModules('publicCostVideo')): ?>
+
+
+
+ getModules('publicCostNote')): ?>
+ getModules('publicCostNote'); ?>
+
+
+
+
+
+
+ getModules('publicCostVideo')): ?>
+
+
+
+
+ getModules('publicCostVideo'); ?>
+
+
+
+
+
+
+
+
+
diff --git a/site/views/publicresults/tmpl/default_chart_intervention_cost_benefit.php b/site/views/publicresults/tmpl/default_chart_intervention_cost_benefit_public.php
similarity index 54%
rename from site/views/publicresults/tmpl/default_chart_intervention_cost_benefit.php
rename to site/views/publicresults/tmpl/default_chart_intervention_cost_benefit_public.php
index 676edf16..d099d51f 100644
--- a/site/views/publicresults/tmpl/default_chart_intervention_cost_benefit.php
+++ b/site/views/publicresults/tmpl/default_chart_intervention_cost_benefit_public.php
@@ -3,11 +3,11 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
- @subpackage default_chart_intervention_cost_benefit.php
+ @subpackage default_chart_intervention_cost_benefit_public.php
@author Llewellyn van der Merwe
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
@copyright Copyright (C) 2015. All Rights Reserved
@@ -23,30 +23,27 @@ defined('_JEXEC') or die('Restricted access');
// load chart builder
$chart = new Chartbuilder('BarChart');
-$scaled = array('unscaled','scaled');
-
if(isset($this->results->interventions) && CostbenefitprojectionHelper::checkArray($this->results->interventions)){
$intervention_number = 0;
foreach ($this->results->interventions as $intervention){
if (isset($intervention->items))
{
- foreach ($scaled as $scale){
$i =0;
$rowArray = array();
if(is_array($intervention->items) || is_object($intervention->items)){
foreach ($intervention->items as $key => &$item){
$rowArray[] = array('c' => array(
array('v' => $item->name),
- array('v' => round($item->{'cost_of_problem_'.$scale}), 'f' => $item->{'costmoney_of_problem_'.$scale}),
+ array('v' => round($item->cost_of_problem_unscaled), 'f' => $item->costmoney_of_problem_unscaled),
array('v' => $item->annual_cost, 'f' => $item->annual_costmoney),
- array('v' => $item->{'annual_benefit_'.$scale}, 'f' => $item->{'annualmoney_benefit_'.$scale}),
- array('v' => $item->{'net_benefit_'.$scale}, 'f' => $item->{'netmoney_benefit_'.$scale})
+ array('v' => $item->annual_benefit_unscaled, 'f' => $item->annualmoney_benefit_unscaled),
+ array('v' => $item->net_benefit_unscaled, 'f' => $item->netmoney_benefit_unscaled)
));
$i++;
}
}
usort($rowArray, function($b, $a) {
- return $a['c'][4]['v'] - $b['c'][4]['v'];
+ return $a['c'][3]['v'] - $b['c'][3]['v'];
});
$data = array(
@@ -74,9 +71,12 @@ if(isset($this->results->interventions) && CostbenefitprojectionHelper::checkArr
$options = array( 'title' => $main_title, 'colors' => array('#cc0000', '#ff9933', '#0070c0', '#70ad47'), 'backgroundColor' => $this->Chart['backgroundColor'], 'width' => $this->Chart['width'], 'height' => $height, 'chartArea' => $this->Chart['chartArea'], 'legend' => $this->Chart['legend'], 'vAxis' => $this->Chart['vAxis'], 'hAxis' => array('textStyle' => $this->Chart['hAxis']['textStyle'], 'title' => $title, 'titleTextStyle' => $this->Chart['hAxis']['titleTextStyle']));
- echo $chart->draw('icb_'.$intervention_number.'_'.$scale, $options);
+ echo $chart->draw('public_int_'.$intervention_number.'_unscaled', $options);
$intervention_number++;
- }
+ }
+ else
+ {
+ $no_intervention[] = $intervention->name;
}
}
}
@@ -86,17 +86,61 @@ if(isset($this->results->interventions) && CostbenefitprojectionHelper::checkArr
results->interventions) && CostbenefitprojectionHelper::checkArray($this->results->interventions)) : ?>
-
- results->interventions as $intervention): ?>
- items)): ?>
-
-
-
+
+
+
Select Workplace Health and Wellness Interventions and see the projected annual benefit on the workplace.
+
+
+
+
+
+
Intervention Options
+
+ results->interventions as $intervention) :?>
+ items)) : ?>
+
+ - name; ?>
+
+ - name; ?>
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
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.
+
+
+
-
+
diff --git a/site/views/publicresults/tmpl/default_chart_intervention_cost_benefit_save.php b/site/views/publicresults/tmpl/default_chart_intervention_cost_benefit_save.php
deleted file mode 100644
index 391c7917..00000000
--- a/site/views/publicresults/tmpl/default_chart_intervention_cost_benefit_save.php
+++ /dev/null
@@ -1,125 +0,0 @@
-
- @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');
-
-// load chart builder
-$chart = new Chartbuilder('BarChart');
-
-$scaled = array('unscaled','scaled');
-
-if(isset($this->results->interventions) && CostbenefitprojectionHelper::checkArray($this->results->interventions)){
- $intervention_number = 0;
- foreach ($this->results->interventions as $intervention){
- if (isset($intervention->items) && $intervention->nr_found)
- {
- foreach ($scaled as $scale){
- $i =0;
- $rowArray = array();
- if(is_array($intervention->items) || is_object($intervention->items)){
- foreach ($intervention->items as $key => &$item){
- $rowArray[] = array('c' => array(
- array('v' => $item->name),
- array('v' => round($item->{'cost_of_problem_'.$scale}), 'f' => $item->{'costmoney_of_problem_'.$scale}),
- array('v' => $item->annual_cost, 'f' => $item->annual_costmoney),
- array('v' => $item->{'annual_benefit_'.$scale}, 'f' => $item->{'annualmoney_benefit_'.$scale}),
- array('v' => $item->{'net_benefit_'.$scale}, 'f' => $item->{'netmoney_benefit_'.$scale})
- ));
- $i++;
- }
- }
- usort($rowArray, function($b, $a) {
- return $a['c'][4]['v'] - $b['c'][4]['v'];
- });
-
- $data = array(
- 'cols' => array(
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR'), 'type' => 'string'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_COST_OF_PROBLEM'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_ANNUAL_COST_OF_INTERVENTION'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_ANNUAL_BENEFIT'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_NET_BENEFIT'), 'type' => 'number')
- ),
- 'rows' => $rowArray
- );
-
- $height = ($i * 80)+100;
- $chart->load(json_encode($data));
- $options = array();
- $main_title = JText::sprintf("COM_COSTBENEFITPROJECTION_INTERVENTIONS_NAME_S", $intervention->name);
- $title = '';
- if($intervention->duration > 1){
- $title .= JText::sprintf('COM_COSTBENEFITPROJECTION_DURATION_S_YEARS', $intervention->duration);
- } else {
- $title .= JText::sprintf('COM_COSTBENEFITPROJECTION_DURATION_S_YEAR', $intervention->duration);
- }
- $title .= ' | ' . JText::sprintf('COM_COSTBENEFITPROJECTION_COVERAGE_S', round($intervention->coverage)). '%';
-
- $options = array( 'title' => $main_title, 'colors' => array('#cc0000', '#ff9933', '#0070c0', '#70ad47'), 'backgroundColor' => $this->Chart['backgroundColor'], 'width' => $this->Chart['width'], 'height' => $height, 'chartArea' => $this->Chart['chartArea'], 'legend' => $this->Chart['legend'], 'vAxis' => $this->Chart['vAxis'], 'hAxis' => array('textStyle' => $this->Chart['hAxis']['textStyle'], 'title' => $title, 'titleTextStyle' => $this->Chart['hAxis']['titleTextStyle']));
-
- echo $chart->draw('save_'.$intervention_number.'_'.$scale, $options);
- $intervention_number++;
- }
- }
- else
- {
- $no_intervention[] = $intervention->name;
- }
- }
-}
-
-?>
-results->interventions) && CostbenefitprojectionHelper::checkArray($this->results->interventions)): ?>
-
-
-
-
The intervention 1){ echo 's';}
- $a = 0;
- foreach($no_intervention as $name){
- if($a){
- echo ', '.$name.'';
- } else {
- echo ' named '.$name.'';
- }
- $a++;
- }
-
- ?> has no effect on your selected causes/risks
-
-
-
-results->interventions) && CostbenefitprojectionHelper::checkArray($this->results->interventions)) : ?>
-
- results->interventions as $intervention): ?>
- items)): ?>
-
-
-
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/tmpl/default_chart_work_days_lost.php b/site/views/publicresults/tmpl/default_chart_work_days_lost.php
deleted file mode 100644
index 0b5e7cda..00000000
--- a/site/views/publicresults/tmpl/default_chart_work_days_lost.php
+++ /dev/null
@@ -1,78 +0,0 @@
-
- @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');
-
-// load chart builder
-$chart = new Chartbuilder('BarChart');
-// set scaled array
-$scaled = array('unscaled','scaled');
-// check if items are set
-if(isset($this->results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)){
- foreach ($scaled as $scale){
- $i =0;
- $rowArray = array();
- foreach ($this->results->items as $key => &$item){
- $rowArray[$i] = array('c' => array(
- array('v' => $item->details->name),
- array('v' => (float)round($item->{'subtotal_morbidity_'.$scale}, 2)),
- array('v' => (float)round($item->{'subtotal_presenteeism_'.$scale}, 2)),
- array('v' => (float)round($item->{'subtotal_days_lost_mortality_'.$scale}, 2)),
- array('v' => (float)round($item->{'subtotal_days_lost_'.$scale}, 2))
- ));
- $i++;
- }
-
- usort($rowArray, function($b, $a) {
- return $a['c'][4]['v'] - $b['c'][4]['v'];
- });
-
- $data = array(
- 'cols' => array(
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR'), 'type' => 'string'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_MORBIDITY'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_PRESENTEEISM_MORBIDITY'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_MORTALITY'), 'type' => 'number'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_TOTAL_DAYS_LOST'), 'type' => 'number')
- ),
- 'rows' => $rowArray
- );
-
- $height = ($i * 110)+50;
- $chart->load(json_encode($data));
- $options = array( 'backgroundColor' => $this->Chart['backgroundColor'], 'width' => $this->Chart['width'], 'height' => $height, 'chartArea' => $this->Chart['chartArea'], 'legend' => $this->Chart['legend'], 'vAxis' => $this->Chart['vAxis'], 'hAxis' => array('textStyle' => $this->Chart['hAxis']['textStyle'], 'title' => JText::_('COM_COSTBENEFITPROJECTION_NUMBER_OF_WORK_DAYS_LOST'), 'titleTextStyle' => $this->Chart['hAxis']['titleTextStyle']));
-
- echo $chart->draw('wdl_'.$scale, $options);
- }
-}
-
-?>
-
-
-
- results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)) : ?>
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/tmpl/default_chart_work_days_lost_percent.php b/site/views/publicresults/tmpl/default_chart_work_days_lost_percent.php
deleted file mode 100644
index bb4cf3f0..00000000
--- a/site/views/publicresults/tmpl/default_chart_work_days_lost_percent.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- @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');
-
-// load chart builder
-$chart = new Chartbuilder('BarChart');
-// set scaled array
-$scaled = array('unscaled','scaled');
-// check if items are set
-if(isset($this->results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)){
- foreach ($scaled as $scale){
- $i =0;
- $rowArray = array();
- foreach ($this->results->items as $key => &$item){
- $rowArray[$i] = array('c' => array(
- array('v' => $item->details->name),
- array('v' => round(($item->{'subtotal_days_lost_'.$scale} / $this->results->totals->{'total_days_lost_'.$scale})*100), 'f' => (float)round(($item->{'subtotal_days_lost_'.$scale} / $this->results->totals->{'total_days_lost_'.$scale})*100,3).'%')
- ));
- $i++;
- }
-
- usort($rowArray, function($b, $a) {
- return $a['c'][1]['v'] - $b['c'][1]['v'];
- });
-
- $data = array(
- 'cols' => array(
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR'), 'type' => 'string'),
- array('id' => '', 'label' => JText::_('COM_COSTBENEFITPROJECTION_PERCENT_OF_TOTAL_DAYS_LOST'), 'type' => 'number')
- ),
- 'rows' => $rowArray
- );
-
- $height = ($i * 70)+30;
- $chart->load(json_encode($data));
- $options = array( 'backgroundColor' => $this->Chart['backgroundColor'], 'width' => $this->Chart['width'], 'height' => $height, 'chartArea' => $this->Chart['chartArea'], 'legend' => $this->Chart['legend'], 'vAxis' => $this->Chart['vAxis'], 'hAxis' => array('textStyle' => $this->Chart['hAxis']['textStyle'], 'title' => JText::_('COM_COSTBENEFITPROJECTION__OF_WORK_DAYS_LOST_DUE_TO_THE_CAUSERISK_FACTOR'), 'titleTextStyle' => $this->Chart['hAxis']['titleTextStyle']));
-
- echo $chart->draw('wdlp_'.$scale, $options);
- }
-}
-
-?>
-
-
-
- results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)) : ?>
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/tmpl/default_contact_form_public.php b/site/views/publicresults/tmpl/default_contact_form_public.php
new file mode 100644
index 00000000..c2b9bfa6
--- /dev/null
+++ b/site/views/publicresults/tmpl/default_contact_form_public.php
@@ -0,0 +1,110 @@
+
+ @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');
+
+?>
+
+
+
+
Enter your details here for access to the full tool and technical support in establishing your Cost-Benefit Profile for a healthier workplace.
+
+
+
+
+
+
+
Please note that the tool itself is FREE TO USE
+
Benefits of Registering:
+
+ - Access to Technical Support in using model and creating/running/monitoring workplace wellness programmes
+ - Use of full tool functions including:
+
+ - 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 Modelling
+ - Results displayed by gender
+
+
+ - Network with other companies and wellness professionals
+
+ item->country_publicname)): ?>
+
+
+
Contact item->country_publicname; ?>
+
+
+
+
+
+
+ item->country_publicemail): ?>
+ -
+ item->country_publicemail; ?>
+
+
+ item->country_publicnumber)): ?>
+ - item->country_publicnumber; ?>
+
+ item->country_publicaddress): ?>
+ - item->country_publicaddress; ?>
+
+
+
+
+
+
+
+
+
+ getModules('publicForm')) echo $this->getModules('publicForm'); ?>
+
+
+
+
diff --git a/site/views/publicresults/tmpl/default_table_calculated_cost_in_detail.php b/site/views/publicresults/tmpl/default_table_calculated_cost_in_detail.php
deleted file mode 100644
index 063bedb6..00000000
--- a/site/views/publicresults/tmpl/default_table_calculated_cost_in_detail.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- @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');
-
-$scaled = array('unscaled','scaled');
-
-?>
-
-
-
-
-results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)) : ?>
-
-
-
-
- |
- |
- |
- |
-
-
-
- results->items as $i => &$item): ?>
-
- details->name; ?> |
- ' >{'male_costmoney_'.$scale}; ?> |
- ' >{'female_costmoney_'.$scale}; ?> |
- ' >{'subtotal_costmoney_'.$scale}; ?> |
-
-
-
-
-
- |
- results->totals->{'males_costmoney_'.$scale}; ?> |
- results->totals->{'females_costmoney_'.$scale}; ?> |
- results->totals->{'total_costmoney_'.$scale}; ?> |
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/tmpl/default_table_cost_summary.php b/site/views/publicresults/tmpl/default_table_cost_summary.php
deleted file mode 100644
index 65fd76e2..00000000
--- a/site/views/publicresults/tmpl/default_table_cost_summary.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- @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');
-
-$scaled = array('unscaled','scaled');
-
-?>
-
-
-
-results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)) : ?>
-
-
-
-
- |
- |
- |
- |
- |
- |
-
-
-
- results->items as $i => &$item): ?>
-
- details->name; ?> |
- ' >{'subtotal_costmoney_morbidity_'.$scale}; ?> |
- ' >{'subtotal_costmoney_presenteeism_'.$scale}; ?> |
- ' >{'subtotal_costmoney_mortality_'.$scale}; ?> |
- ' >{'subtotal_costmoney_'.$scale}; ?> |
- results->totals->{'total_cost_'.$scale})*100; ?>' >{'subtotal_cost_'.$scale} / $this->results->totals->{'total_cost_'.$scale})*100,3).'%'; ?> |
-
-
-
-
-
- |
-
- results->totals->{'total_costmoney_morbidity_'.$scale}; ?> |
- results->totals->{'total_costmoney_presenteeism_'.$scale}; ?> |
- results->totals->{'total_costmoney_mortality_'.$scale}; ?> |
- results->totals->{'total_costmoney_'.$scale}; ?> |
- results->totals->{'total_cost_'.$scale} / $this->results->totals->{'total_cost_'.$scale})*100,3).'%'; ?> |
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/tmpl/default_table_intervention_net_benefit.php b/site/views/publicresults/tmpl/default_table_intervention_net_benefit.php
deleted file mode 100644
index 40656a9a..00000000
--- a/site/views/publicresults/tmpl/default_table_intervention_net_benefit.php
+++ /dev/null
@@ -1,99 +0,0 @@
-
- @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');
-
-$scaled = array('unscaled','scaled');
-
-?>
-
-
-results->interventions) && CostbenefitprojectionHelper::checkArray($this->results->interventions)): ?>
- results->interventions as $intervention) :?>
- items)): ?>
- name); ?> |
- duration > 1){
- echo JText::sprintf("COM_COSTBENEFITPROJECTION_DURATION_S_YEARS", $intervention->duration);
- } else {
- echo JText::sprintf('COM_COSTBENEFITPROJECTION_DURATION_S_YEAR', $intervention->duration);
- }
- ?> |
- coverage)); ?>%
-
-
-
-
-
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
-
-
-
- items) && is_object($intervention->items) || is_array($intervention->items)):?>
- items as $key => &$item): ?>
-
- name; ?> |
- ' >{'contribution_to_cost_'.$scale}, 3); ?>% |
- annual_costmoney_per_employee; ?> |
- mbr; ?>% |
- mtr; ?>% |
- ' >{'costmoney_of_problem_'.$scale}; ?> |
- annual_costmoney; ?> |
- ' >{'annualmoney_benefit_'.$scale}; ?> |
- ' >1:{'benefit_ratio_'.$scale},3); ?> |
- ' >{'netmoney_benefit_'.$scale}; ?> |
-
-
-
-
-
-
- |
- totals->{'contribution_to_cost_'.$scale}; ?>% |
- totals->annual_costmoney_per_employee; ?> |
- |
- |
- totals->{'costmoney_of_problem_'.$scale}; ?> |
- totals->annual_costmoney; ?> |
- totals->{'annualmoney_benefit_'.$scale}; ?> |
- |
- totals->{'netmoney_benefit_'.$scale}; ?> |
-
-
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/tmpl/default_table_work_days_lost_summary.php b/site/views/publicresults/tmpl/default_table_work_days_lost_summary.php
deleted file mode 100644
index b2502192..00000000
--- a/site/views/publicresults/tmpl/default_table_work_days_lost_summary.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
- @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');
-
-$scaled = array('unscaled','scaled');
-
-?>
-
-
-
-
-results->items) && CostbenefitprojectionHelper::checkObject($this->results->items)) : ?>
-
-
-
-
- |
- |
- |
- |
- |
- |
- |
- |
-
-
-
- results->items as $i => &$item): ?>
-
- details->name; ?> |
- ' >{'subtotal_morbidity_'.$scale},3); ?> |
- ' >{'subtotal_presenteeism_'.$scale},3); ?> |
- ' >{'subtotal_days_lost_mortality_'.$scale},3); ?> |
- ' >{'male_days_lost_'.$scale},3); ?> |
- ' >{'female_days_lost_'.$scale},3); ?> |
- ' >{'subtotal_days_lost_'.$scale},3); ?> |
- results->totals->{'total_days_lost_'.$scale})*100; ?>' >{'subtotal_days_lost_'.$scale} / $this->results->totals->{'total_days_lost_'.$scale})*100,3).'%'; ?> |
-
-
-
-
-
- |
-
- results->totals->{'total_morbidity_'.$scale},3); ?> |
- results->totals->{'total_presenteeism_'.$scale},3); ?> |
- results->totals->{'total_days_lost_mortality_'.$scale},3); ?> |
- results->totals->{'males_days_lost_'.$scale},3); ?> |
- results->totals->{'females_days_lost_'.$scale},3); ?> |
- results->totals->{'total_days_lost_'.$scale},3); ?> |
- results->totals->{'total_days_lost_'.$scale} / $this->results->totals->{'total_days_lost_'.$scale})*100,3).'%'; ?> |
-
-
-
-
-
-
-
-
diff --git a/site/views/publicresults/view.html.php b/site/views/publicresults/view.html.php
index 9216c0f5..c3cbb6cc 100644
--- a/site/views/publicresults/view.html.php
+++ b/site/views/publicresults/view.html.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage view.html.php
@@ -21,7 +21,8 @@
defined('_JEXEC') or die('Restricted access');
// import Joomla view library
-jimport('joomla.application.component.view');
+jimport('joomla.application.component.view');
+jimport('joomla.application.module.helper');
/**
* Costbenefitprojection View class for the Publicresults
@@ -37,10 +38,11 @@ class CostbenefitprojectionViewPublicresults extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
- // [3173] Initialise variables.
+ // Initialise variables.
$this->item = $this->get('Item');
+ $this->countries = $this->get('Countries');
- // [3208] Check for errors.
+ // Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@@ -59,10 +61,10 @@ class CostbenefitprojectionViewPublicresults extends JViewLegacy
$this->results = false;
}
- // [3225] Set the toolbar
+ // Set the toolbar
$this->addToolBar();
- // [3227] set the document
+ // set the document
$this->_prepareDocument();
parent::display($tpl);
@@ -74,84 +76,86 @@ class CostbenefitprojectionViewPublicresults extends JViewLegacy
protected function _prepareDocument()
{
- // [3585] always make sure jquery is loaded.
+ // always make sure jquery is loaded.
JHtml::_('jquery.framework');
- // [3587] Load the header checker class.
+ // Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
- // [3589] Initialize the header checker.
+ // Initialize the header checker.
$HeaderCheck = new HeaderCheck;
- // [3594] Load uikit options.
+ // Load uikit options.
$uikit = $this->params->get('uikit_load');
- // [3596] Set script size.
+ // Set script size.
$size = $this->params->get('uikit_min');
- // [3598] Set css style.
+ // Set css style.
$style = $this->params->get('uikit_style');
- // [3601] The uikit css.
+ // The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_costbenefitprojection/uikit/css/uikit'.$style.$size.'.css');
}
- // [3606] The uikit js.
+ // The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_costbenefitprojection/uikit/js/uikit'.$size.'.js');
}
- // [3671] Load the needed uikit components in this view.
- $uikitComp = $this->get('UikitComp');
+ // Load the script to find all uikit components needed.
+ if ($uikit != 2)
+ {
+ // Set the default uikit components in this view.
+ $uikitComp = array();
+ $uikitComp[] = 'data-uk-grid';
+
+ // Get field uikit components needed in this view.
+ $uikitFieldComp = $this->get('UikitComp');
+ if (isset($uikitFieldComp) && CostbenefitprojectionHelper::checkArray($uikitFieldComp))
+ {
+ if (isset($uikitComp) && CostbenefitprojectionHelper::checkArray($uikitComp))
+ {
+ $uikitComp = array_merge($uikitComp, $uikitFieldComp);
+ $uikitComp = array_unique($uikitComp);
+ }
+ else
+ {
+ $uikitComp = $uikitFieldComp;
+ }
+ }
+ }
+
+ // Load the needed uikit components in this view.
if ($uikit != 2 && isset($uikitComp) && CostbenefitprojectionHelper::checkArray($uikitComp))
{
- // [3675] load just in case.
+ // load just in case.
jimport('joomla.filesystem.file');
- // [3677] loading...
+ // loading...
foreach ($uikitComp as $class)
{
foreach (CostbenefitprojectionHelper::$uk_components[$class] as $name)
{
- // [3682] check if the CSS file exists.
+ // check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_costbenefitprojection/uikit/css/components/'.$name.$style.$size.'.css'))
{
- // [3685] load the css.
+ // load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_costbenefitprojection/uikit/css/components/'.$name.$style.$size.'.css');
}
- // [3688] check if the JavaScript file exists.
+ // check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_costbenefitprojection/uikit/js/components/'.$name.$size.'.js'))
{
- // [3691] load the js.
+ // load the js.
$this->document->addScript(JURI::root(true) .'/media/com_costbenefitprojection/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
- // [3567] add the google chart builder class.
+ // add the google chart builder class.
require_once JPATH_COMPONENT_ADMINISTRATOR.'/helpers/chartbuilder.php';
- // [3569] load the google chart js.
+ // load the google chart js.
$this->document->addScript(JURI::root(true) .'/media/com_costbenefitprojection/js/google.jsapi.js');
$this->document->addScript('https://canvg.googlecode.com/svn/trunk/rgbcolor.js');
- $this->document->addScript('https://canvg.googlecode.com/svn/trunk/canvg.js');
-
- // [6813] Add the CSS for Footable.
- $this->document->addStyleSheet(JURI::root() .'media/com_costbenefitprojection/footable/css/footable.core.min.css');
-
- // [6815] Use the Metro Style
- if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
- {
- $this->document->addStyleSheet(JURI::root() .'media/com_costbenefitprojection/footable/css/footable.metro.min.css');
- }
- // [6820] Use the Legacy Style.
- elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
- {
- $this->document->addStyleSheet(JURI::root() .'media/com_costbenefitprojection/footable/css/footable.standalone.min.css');
- }
-
- // [6825] Add the JavaScript for Footable
- $this->document->addScript(JURI::root() .'media/com_costbenefitprojection/footable/js/footable.js');
- $this->document->addScript(JURI::root() .'media/com_costbenefitprojection/footable/js/footable.sort.js');
- $this->document->addScript(JURI::root() .'media/com_costbenefitprojection/footable/js/footable.filter.js');
- $this->document->addScript(JURI::root() .'media/com_costbenefitprojection/footable/js/footable.paginate.js');
+ $this->document->addScript('https://canvg.googlecode.com/svn/trunk/canvg.js');
// add custom css
$this->document->addStyleSheet(JURI::root(true) ."/administrator/components/com_costbenefitprojection/assets/css/dashboard.css");
// add custom js
@@ -196,6 +200,66 @@ class CostbenefitprojectionViewPublicresults extends JViewLegacy
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();
+ }
+
+ /**
+ * Get the modules published in a position
+ */
+ public function getModules($position, $seperator = '', $class = '')
+ {
+ // set default
+ $found = false;
+ // check if we aleady have these modules loaded
+ if (isset($this->setModules[$position]))
+ {
+ $found = true;
+ }
+ else
+ {
+ // this is where you want to load your module position
+ $modules = JModuleHelper::getModules($position);
+ if ($modules)
+ {
+ // set the place holder
+ $this->setModules[$position] = array();
+ foreach($modules as $module)
+ {
+ $this->setModules[$position][] = JModuleHelper::renderModule($module);
+ }
+ $found = true;
+ }
+ }
+ // check if modules were found
+ if ($found && isset($this->setModules[$position]) && CostbenefitprojectionHelper::checkArray($this->setModules[$position]))
+ {
+ // set class
+ if (CostbenefitprojectionHelper::checkString($class))
+ {
+ $class = ' class="'.$class.'" ';
+ }
+ // set seperating return values
+ switch($seperator)
+ {
+ case 'none':
+ return implode('', $this->setModules[$position]);
+ break;
+ case 'div':
+ return ''.implode('
', $this->setModules[$position]).'
';
+ break;
+ case 'list':
+ return '- '.implode('
- ', $this->setModules[$position]).'
';
+ break;
+ case 'array':
+ case 'Array':
+ return $this->setModules[$position];
+ break;
+ default:
+ return implode('
', $this->setModules[$position]);
+ break;
+
+ }
+ }
+ return false;
}
/**
diff --git a/site/views/scaling_factor/submitbutton.js b/site/views/scaling_factor/submitbutton.js
index 95f91bf5..5d11f135 100644
--- a/site/views/scaling_factor/submitbutton.js
+++ b/site/views/scaling_factor/submitbutton.js
@@ -2,8 +2,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage submitbutton.js
diff --git a/site/views/scaling_factor/tmpl/edit.php b/site/views/scaling_factor/tmpl/edit.php
index c8428b33..2bb45484 100644
--- a/site/views/scaling_factor/tmpl/edit.php
+++ b/site/views/scaling_factor/tmpl/edit.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage edit.php
@@ -84,4 +84,23 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
-
+
+
+
diff --git a/site/views/scaling_factor/view.html.php b/site/views/scaling_factor/view.html.php
index 4f208ddd..c49d3358 100644
--- a/site/views/scaling_factor/view.html.php
+++ b/site/views/scaling_factor/view.html.php
@@ -3,8 +3,8 @@
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
/-------------------------------------------------------------------------------------------------------/
- @version 3.2.0
- @build 12th January, 2016
+ @version 3.3.0
+ @build 14th January, 2016
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage view.html.php
@@ -88,27 +88,27 @@ class CostbenefitprojectionViewScaling_factor extends JViewLegacy
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_COSTBENEFITPROJECTION_SCALING_FACTOR_NEW' : 'COM_COSTBENEFITPROJECTION_SCALING_FACTOR_EDIT'), 'pencil-2 article-add');
- // [10572] Built the actions for new and existing records.
+ // Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('scaling_factor.create') && $isNew)
{
- // [10584] We can create the record.
+ // We can create the record.
JToolBarHelper::save('scaling_factor.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('scaling_factor.edit'))
{
- // [10596] We can save the record.
+ // We can save the record.
JToolBarHelper::save('scaling_factor.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
- // [10601] Do not creat but cancel.
+ // Do not creat but cancel.
JToolBarHelper::cancel('scaling_factor.cancel', 'JTOOLBAR_CANCEL');
}
else
{
- // [10606] We can close it.
+ // We can close it.
JToolBarHelper::cancel('scaling_factor.cancel', 'JTOOLBAR_CLOSE');
}
}
@@ -116,7 +116,7 @@ class CostbenefitprojectionViewScaling_factor extends JViewLegacy
{
if ($isNew)
{
- // [10614] For new records, check the create permission.
+ // For new records, check the create permission.
if ($this->canDo->get('scaling_factor.create'))
{
JToolBarHelper::apply('scaling_factor.apply', 'JTOOLBAR_APPLY');
@@ -129,11 +129,11 @@ class CostbenefitprojectionViewScaling_factor extends JViewLegacy
{
if ($this->canDo->get('scaling_factor.edit'))
{
- // [10641] We can save the new record
+ // We can save the new record
JToolBarHelper::apply('scaling_factor.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('scaling_factor.save', 'JTOOLBAR_SAVE');
- // [10644] We can save this record, but check the create permission to see
- // [10645] if we can return to make a new one.
+ // We can save this record, but check the create permission to see
+ // if we can return to make a new one.
if ($this->canDo->get('scaling_factor.create'))
{
JToolBarHelper::custom('scaling_factor.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
@@ -152,7 +152,7 @@ class CostbenefitprojectionViewScaling_factor extends JViewLegacy
}
}
JToolbarHelper::divider();
- // [10681] set help url for this view if found
+ // set help url for this view if found
$help_url = CostbenefitprojectionHelper::getHelpUrl('scaling_factor');
if (CostbenefitprojectionHelper::checkString($help_url))
{