diff --git a/admin/images/icon_phoenix.png b/admin/images/icon_phoenix.png new file mode 100644 index 000000000..4ab97a816 Binary files /dev/null and b/admin/images/icon_phoenix.png differ diff --git a/admin/includes/boxes/catalog.php b/admin/includes/boxes/catalog.php index fec795585..8ff5f5cbc 100755 --- a/admin/includes/boxes/catalog.php +++ b/admin/includes/boxes/catalog.php @@ -12,37 +12,7 @@ $cl_box_groups[] = array( 'heading' => BOX_HEADING_CATALOG, - 'apps' => array( - array( - 'code' => 'categories.php', - 'title' => BOX_CATALOG_CATEGORIES_PRODUCTS, - 'link' => tep_href_link('categories.php') - ), - array( - 'code' => 'products_attributes.php', - 'title' => BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES, - 'link' => tep_href_link('products_attributes.php') - ), - array( - 'code' => 'manufacturers.php', - 'title' => BOX_CATALOG_MANUFACTURERS, - 'link' => tep_href_link('manufacturers.php') - ), - array( - 'code' => 'reviews.php', - 'title' => BOX_CATALOG_REVIEWS, - 'link' => tep_href_link('reviews.php') - ), - array( - 'code' => 'specials.php', - 'title' => BOX_CATALOG_SPECIALS, - 'link' => tep_href_link('specials.php') - ), - array( - 'code' => 'products_expected.php', - 'title' => BOX_CATALOG_PRODUCTS_EXPECTED, - 'link' => tep_href_link('products_expected.php') - ) + 'apps' => array( ) ); ?> diff --git a/admin/includes/boxes/catalog_categories.php b/admin/includes/boxes/catalog_categories.php new file mode 100644 index 000000000..13c616a7b --- /dev/null +++ b/admin/includes/boxes/catalog_categories.php @@ -0,0 +1,21 @@ + 'categories.php', + 'title' => MODULES_ADMIN_MENU_CATALOG_PRODUCTS, + 'link' => tep_href_link('categories.php')); + + break; + } + } diff --git a/admin/includes/boxes/catalog_manufacturers.php b/admin/includes/boxes/catalog_manufacturers.php new file mode 100644 index 000000000..105e25d7b --- /dev/null +++ b/admin/includes/boxes/catalog_manufacturers.php @@ -0,0 +1,22 @@ + 'manufacturers.php', + 'title' => MODULES_ADMIN_MENU_CATALOG_MANUFACTURERS, + 'link' => tep_href_link('manufacturers.php')); + + break; + } + } + diff --git a/admin/includes/boxes/catalog_products_attributes.php b/admin/includes/boxes/catalog_products_attributes.php new file mode 100644 index 000000000..310957a51 --- /dev/null +++ b/admin/includes/boxes/catalog_products_attributes.php @@ -0,0 +1,22 @@ + 'products_attributes.php', + 'title' => MODULES_ADMIN_MENU_CATALOG_PRODUCTS_ATTRIBUTES, + 'link' => tep_href_link('products_attributes.php')); + + break; + } + } + diff --git a/admin/includes/boxes/catalog_products_expected.php b/admin/includes/boxes/catalog_products_expected.php new file mode 100644 index 000000000..3e499ea2f --- /dev/null +++ b/admin/includes/boxes/catalog_products_expected.php @@ -0,0 +1,22 @@ + 'products_expected.php', + 'title' => MODULES_ADMIN_MENU_CATALOG_PRODUCTS_EXPECTED, + 'link' => tep_href_link('products_expected.php')); + + break; + } + } + diff --git a/admin/includes/boxes/catalog_reviews.php b/admin/includes/boxes/catalog_reviews.php new file mode 100644 index 000000000..007bc16d6 --- /dev/null +++ b/admin/includes/boxes/catalog_reviews.php @@ -0,0 +1,22 @@ + 'reviews.php', + 'title' => MODULES_ADMIN_MENU_CATALOG_REVIEWS, + 'link' => tep_href_link('reviews.php')); + + break; + } + } + \ No newline at end of file diff --git a/admin/includes/boxes/catalog_specials.php b/admin/includes/boxes/catalog_specials.php new file mode 100644 index 000000000..9a331c7d1 --- /dev/null +++ b/admin/includes/boxes/catalog_specials.php @@ -0,0 +1,21 @@ + 'specials.php', + 'title' => MODULES_ADMIN_MENU_CATALOG_SPECIALS, + 'link' => tep_href_link('specials.php')); + + break; + } + } diff --git a/admin/includes/boxes/configuration.php b/admin/includes/boxes/configuration.php index 3d8585bfc..d5575ef13 100755 --- a/admin/includes/boxes/configuration.php +++ b/admin/includes/boxes/configuration.php @@ -13,16 +13,6 @@ $cl_box_groups[] = array( 'heading' => BOX_HEADING_CONFIGURATION, 'apps' => array( - array( - 'code' => 'administrators.php', - 'title' => BOX_CONFIGURATION_ADMINISTRATORS, - 'link' => tep_href_link('administrators.php') - ), - array( - 'code' => 'store_logo.php', - 'title' => BOX_CONFIGURATION_STORE_LOGO, - 'link' => tep_href_link('store_logo.php') - ) ) ); diff --git a/admin/includes/boxes/configuration_administrators.php b/admin/includes/boxes/configuration_administrators.php new file mode 100644 index 000000000..01498ee13 --- /dev/null +++ b/admin/includes/boxes/configuration_administrators.php @@ -0,0 +1,21 @@ + 'administrators.php', + 'title' => MODULES_ADMIN_MENU_CONFIGURATION_ADMINISTRATORS, + 'link' => tep_href_link('administrators.php')); + + break; + } + } diff --git a/admin/includes/boxes/configuration_store_logo.php b/admin/includes/boxes/configuration_store_logo.php new file mode 100644 index 000000000..c1ee46c79 --- /dev/null +++ b/admin/includes/boxes/configuration_store_logo.php @@ -0,0 +1,21 @@ + 'store_logo.php', + 'title' => MODULES_ADMIN_MENU_CONFIGURATION_STORE_LOGO, + 'link' => tep_href_link('store_logo.php')); + + break; + } + } diff --git a/admin/includes/boxes/customers.php b/admin/includes/boxes/customers.php index 11b3c7d02..b961e3f67 100755 --- a/admin/includes/boxes/customers.php +++ b/admin/includes/boxes/customers.php @@ -14,9 +14,6 @@ 'heading' => BOX_HEADING_CUSTOMERS, 'apps' => array( array( - 'code' => 'customers.php', - 'title' => BOX_CUSTOMERS_CUSTOMERS, - 'link' => tep_href_link('customers.php') ) ) ); diff --git a/admin/includes/boxes/customers_customers.php b/admin/includes/boxes/customers_customers.php new file mode 100644 index 000000000..0227e47b4 --- /dev/null +++ b/admin/includes/boxes/customers_customers.php @@ -0,0 +1,21 @@ + 'customers.php', + 'title' => MODULES_ADMIN_MENU_CUSTOMERS_CUSTOMERS, + 'link' => tep_href_link('customers.php')); + + break; + } + } diff --git a/admin/includes/boxes/localization.php b/admin/includes/boxes/localization.php index 4e9d353c5..0caa95448 100755 --- a/admin/includes/boxes/localization.php +++ b/admin/includes/boxes/localization.php @@ -13,21 +13,6 @@ $cl_box_groups[] = array( 'heading' => BOX_HEADING_LOCALIZATION, 'apps' => array( - array( - 'code' => 'currencies.php', - 'title' => BOX_LOCALIZATION_CURRENCIES, - 'link' => tep_href_link('currencies.php') - ), - array( - 'code' => 'languages.php', - 'title' => BOX_LOCALIZATION_LANGUAGES, - 'link' => tep_href_link('languages.php') - ), - array( - 'code' => 'orders_status.php', - 'title' => BOX_LOCALIZATION_ORDERS_STATUS, - 'link' => tep_href_link('orders_status.php') - ) ) ); ?> diff --git a/admin/includes/boxes/localization_currencies.php b/admin/includes/boxes/localization_currencies.php new file mode 100644 index 000000000..5c1e27b33 --- /dev/null +++ b/admin/includes/boxes/localization_currencies.php @@ -0,0 +1,21 @@ + 'currencies.php', + 'title' => MODULES_ADMIN_MENU_LOCALIZATION_CURRENCIES, + 'link' => tep_href_link('currencies.php')); + + break; + } + } diff --git a/admin/includes/boxes/localization_languages.php b/admin/includes/boxes/localization_languages.php new file mode 100644 index 000000000..a0cdbe255 --- /dev/null +++ b/admin/includes/boxes/localization_languages.php @@ -0,0 +1,21 @@ + 'languages.php', + 'title' => MODULES_ADMIN_MENU_LOCALIZATION_LANGUAGES, + 'link' => tep_href_link('languages.php')); + + break; + } + } diff --git a/admin/includes/boxes/localization_orders_status.php b/admin/includes/boxes/localization_orders_status.php new file mode 100644 index 000000000..cdd025c3d --- /dev/null +++ b/admin/includes/boxes/localization_orders_status.php @@ -0,0 +1,21 @@ + 'orders_status.php', + 'title' => MODULES_ADMIN_MENU_LOCALIZATION_ORDERS_STATUS, + 'link' => tep_href_link('orders_status.php')); + + break; + } + } diff --git a/admin/includes/boxes/orders.php b/admin/includes/boxes/orders.php index afa7edc33..010d8adad 100755 --- a/admin/includes/boxes/orders.php +++ b/admin/includes/boxes/orders.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2014 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -13,11 +13,6 @@ $cl_box_groups[] = array( 'heading' => BOX_HEADING_ORDERS, 'apps' => array( - array( - 'code' => 'orders.php', - 'title' => BOX_ORDERS_ORDERS, - 'link' => tep_href_link('orders.php') - ) ) ); ?> diff --git a/admin/includes/boxes/orders_orders.php b/admin/includes/boxes/orders_orders.php new file mode 100644 index 000000000..b8cc96b22 --- /dev/null +++ b/admin/includes/boxes/orders_orders.php @@ -0,0 +1,21 @@ + 'orders.php', + 'title' => MODULES_ADMIN_MENU_ORDERS_ORDERS, + 'link' => tep_href_link('orders.php')); + + break; + } + } diff --git a/admin/includes/boxes/reports.php b/admin/includes/boxes/reports.php index b02afff7f..0de382871 100755 --- a/admin/includes/boxes/reports.php +++ b/admin/includes/boxes/reports.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -13,21 +13,6 @@ $cl_box_groups[] = array( 'heading' => BOX_HEADING_REPORTS, 'apps' => array( - array( - 'code' => 'stats_products_viewed.php', - 'title' => BOX_REPORTS_PRODUCTS_VIEWED, - 'link' => tep_href_link('stats_products_viewed.php') - ), - array( - 'code' => 'stats_products_purchased.php', - 'title' => BOX_REPORTS_PRODUCTS_PURCHASED, - 'link' => tep_href_link('stats_products_purchased.php') - ), - array( - 'code' => 'stats_customers.php', - 'title' => BOX_REPORTS_ORDERS_TOTAL, - 'link' => tep_href_link('stats_customers.php') - ) ) ); ?> diff --git a/admin/includes/boxes/reports_stats_customers.php b/admin/includes/boxes/reports_stats_customers.php new file mode 100644 index 000000000..7ff7a13d9 --- /dev/null +++ b/admin/includes/boxes/reports_stats_customers.php @@ -0,0 +1,21 @@ + 'stats_customers.php', + 'title' => MODULES_ADMIN_MENU_REPORTS_ORDERS_TOTAL, + 'link' => tep_href_link('stats_customers.php')); + + break; + } + } diff --git a/admin/includes/boxes/reports_stats_products_purchased.php b/admin/includes/boxes/reports_stats_products_purchased.php new file mode 100644 index 000000000..7d27a6472 --- /dev/null +++ b/admin/includes/boxes/reports_stats_products_purchased.php @@ -0,0 +1,21 @@ + 'stats_products_purchased.php', + 'title' => MODULES_ADMIN_MENU_REPORTS_PRODUCTS_PURCHASED, + 'link' => tep_href_link('stats_products_purchased.php')); + + break; + } + } diff --git a/admin/includes/boxes/reports_stats_products_viewed.php b/admin/includes/boxes/reports_stats_products_viewed.php new file mode 100644 index 000000000..d148419b5 --- /dev/null +++ b/admin/includes/boxes/reports_stats_products_viewed.php @@ -0,0 +1,21 @@ + 'stats_products_viewed.php', + 'title' => MODULES_ADMIN_MENU_REPORTS_PRODUCTS_VIEWED, + 'link' => tep_href_link('stats_products_viewed.php')); + + break; + } + } diff --git a/admin/includes/boxes/taxes.php b/admin/includes/boxes/taxes.php index 7877f268a..103d786d0 100755 --- a/admin/includes/boxes/taxes.php +++ b/admin/includes/boxes/taxes.php @@ -13,31 +13,6 @@ $cl_box_groups[] = array( 'heading' => BOX_HEADING_LOCATION_AND_TAXES, 'apps' => array( - array( - 'code' => 'countries.php', - 'title' => BOX_TAXES_COUNTRIES, - 'link' => tep_href_link('countries.php') - ), - array( - 'code' => 'zones.php', - 'title' => BOX_TAXES_ZONES, - 'link' => tep_href_link('zones.php') - ), - array( - 'code' => 'geo_zones.php', - 'title' => BOX_TAXES_GEO_ZONES, - 'link' => tep_href_link('geo_zones.php') - ), - array( - 'code' => 'tax_classes.php', - 'title' => BOX_TAXES_TAX_CLASSES, - 'link' => tep_href_link('tax_classes.php') - ), - array( - 'code' => 'tax_rates.php', - 'title' => BOX_TAXES_TAX_RATES, - 'link' => tep_href_link('tax_rates.php') - ) ) ); ?> diff --git a/admin/includes/boxes/taxes_countries.php b/admin/includes/boxes/taxes_countries.php new file mode 100644 index 000000000..fc80724a0 --- /dev/null +++ b/admin/includes/boxes/taxes_countries.php @@ -0,0 +1,21 @@ + 'countries.php', + 'title' => MODULES_ADMIN_MENU_TAXES_COUNTRIES, + 'link' => tep_href_link('countries.php')); + + break; + } + } diff --git a/admin/includes/boxes/taxes_geo_zones.php b/admin/includes/boxes/taxes_geo_zones.php new file mode 100644 index 000000000..7eaa82e2e --- /dev/null +++ b/admin/includes/boxes/taxes_geo_zones.php @@ -0,0 +1,21 @@ + 'geo_zones.php', + 'title' => MODULES_ADMIN_MENU_ZONES, + 'link' => tep_href_link('geo_zones.php')); + + break; + } + } diff --git a/admin/includes/boxes/taxes_tax_classes.php b/admin/includes/boxes/taxes_tax_classes.php new file mode 100644 index 000000000..04ec2804c --- /dev/null +++ b/admin/includes/boxes/taxes_tax_classes.php @@ -0,0 +1,21 @@ + 'tax_classes.php', + 'title' => MODULES_ADMIN_MENU_TAXES_TAX_CLASSES, + 'link' => tep_href_link('tax_classes.php')); + + break; + } + } diff --git a/admin/includes/boxes/taxes_tax_rates.php b/admin/includes/boxes/taxes_tax_rates.php new file mode 100644 index 000000000..3d9685518 --- /dev/null +++ b/admin/includes/boxes/taxes_tax_rates.php @@ -0,0 +1,21 @@ + 'tax_rates.php', + 'title' => MOULES_ADMIN_MENU_TAXES_TAX_RATES, + 'link' => tep_href_link('tax_rates.php')); + + break; + } + } diff --git a/admin/includes/boxes/taxes_zones.php b/admin/includes/boxes/taxes_zones.php new file mode 100644 index 000000000..546640d30 --- /dev/null +++ b/admin/includes/boxes/taxes_zones.php @@ -0,0 +1,21 @@ + 'zones.php', + 'title' => MODULES_ADMIN_MENU_TAXES_ZONES, + 'link' => tep_href_link('zones.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools.php b/admin/includes/boxes/tools.php index f44e43655..284c9dc8e 100755 --- a/admin/includes/boxes/tools.php +++ b/admin/includes/boxes/tools.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -13,51 +13,6 @@ $cl_box_groups[] = array( 'heading' => BOX_HEADING_TOOLS, 'apps' => array( - array( - 'code' => 'action_recorder.php', - 'title' => BOX_TOOLS_ACTION_RECORDER, - 'link' => tep_href_link('action_recorder.php') - ), - array( - 'code' => 'backup.php', - 'title' => BOX_TOOLS_BACKUP, - 'link' => tep_href_link('backup.php') - ), - array( - 'code' => 'define_language.php', - 'title' => BOX_TOOLS_DEFINE_LANGUAGE, - 'link' => tep_href_link('define_language.php') - ), - array( - 'code' => 'mail.php', - 'title' => BOX_TOOLS_MAIL, - 'link' => tep_href_link('mail.php') - ), - array( - 'code' => 'newsletters.php', - 'title' => BOX_TOOLS_NEWSLETTER_MANAGER, - 'link' => tep_href_link('newsletters.php') - ), - array( - 'code' => 'sec_dir_permissions.php', - 'title' => BOX_TOOLS_SEC_DIR_PERMISSIONS, - 'link' => tep_href_link('sec_dir_permissions.php') - ), - array( - 'code' => 'server_info.php', - 'title' => BOX_TOOLS_SERVER_INFO, - 'link' => tep_href_link('server_info.php') - ), - array( - 'code' => 'version_check.php', - 'title' => BOX_TOOLS_VERSION_CHECK, - 'link' => tep_href_link('version_check.php') - ), - array( - 'code' => 'whos_online.php', - 'title' => BOX_TOOLS_WHOS_ONLINE, - 'link' => tep_href_link('whos_online.php') - ) ) ); ?> diff --git a/admin/includes/boxes/tools_action_recorder.php b/admin/includes/boxes/tools_action_recorder.php new file mode 100644 index 000000000..264cdc645 --- /dev/null +++ b/admin/includes/boxes/tools_action_recorder.php @@ -0,0 +1,21 @@ + 'action_recorder.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_ACTION_RECORDER, + 'link' => tep_href_link('action_recorder.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools_backup.php b/admin/includes/boxes/tools_backup.php new file mode 100644 index 000000000..3db4a23d6 --- /dev/null +++ b/admin/includes/boxes/tools_backup.php @@ -0,0 +1,21 @@ + 'backup.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_BACKUP, + 'link' => tep_href_link('backup.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools_database_tables.php b/admin/includes/boxes/tools_database_tables.php index 581075e8f..a7f3f554e 100755 --- a/admin/includes/boxes/tools_database_tables.php +++ b/admin/includes/boxes/tools_database_tables.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2013 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -19,4 +19,3 @@ break; } } -?> diff --git a/admin/includes/boxes/tools_define_language.php b/admin/includes/boxes/tools_define_language.php new file mode 100644 index 000000000..261e76d5d --- /dev/null +++ b/admin/includes/boxes/tools_define_language.php @@ -0,0 +1,21 @@ + 'define_language.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_DEFINE_LANGUAGE, + 'link' => tep_href_link('define_language.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools_mail.php b/admin/includes/boxes/tools_mail.php new file mode 100644 index 000000000..dc8ef5ac0 --- /dev/null +++ b/admin/includes/boxes/tools_mail.php @@ -0,0 +1,21 @@ + 'mail.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_MAIL, + 'link' => tep_href_link('mail.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools_newsletters.php b/admin/includes/boxes/tools_newsletters.php new file mode 100644 index 000000000..8d92a8f68 --- /dev/null +++ b/admin/includes/boxes/tools_newsletters.php @@ -0,0 +1,21 @@ + 'newsletters.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_NEWSLETTER_MANAGER, + 'link' => tep_href_link('newsletters.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools_sec_dir_permissions.php b/admin/includes/boxes/tools_sec_dir_permissions.php new file mode 100644 index 000000000..abecbf302 --- /dev/null +++ b/admin/includes/boxes/tools_sec_dir_permissions.php @@ -0,0 +1,21 @@ + 'sec_dir_permissions.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_SEC_DIR_PERMISSIONS, + 'link' => tep_href_link('sec_dir_permissions.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools_security_checks.php b/admin/includes/boxes/tools_security_checks.php index 07701d55c..fee936774 100755 --- a/admin/includes/boxes/tools_security_checks.php +++ b/admin/includes/boxes/tools_security_checks.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2013 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ diff --git a/admin/includes/boxes/tools_server_info.php b/admin/includes/boxes/tools_server_info.php new file mode 100644 index 000000000..7b685d360 --- /dev/null +++ b/admin/includes/boxes/tools_server_info.php @@ -0,0 +1,21 @@ + 'server_info.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_SERVER_INFO, + 'link' => tep_href_link('server_info.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools_version_check.php b/admin/includes/boxes/tools_version_check.php new file mode 100644 index 000000000..c353fcc4d --- /dev/null +++ b/admin/includes/boxes/tools_version_check.php @@ -0,0 +1,21 @@ + 'version_check.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_VERSION_CHECK, + 'link' => tep_href_link('version_check.php')); + + break; + } + } diff --git a/admin/includes/boxes/tools_whos_online.php b/admin/includes/boxes/tools_whos_online.php new file mode 100644 index 000000000..d53aad129 --- /dev/null +++ b/admin/includes/boxes/tools_whos_online.php @@ -0,0 +1,21 @@ + 'whos_online.php', + 'title' => MODULES_ADMIN_MENU_TOOLS_WHOS_ONLINE, + 'link' => tep_href_link('whos_online.php')); + + break; + } + } diff --git a/admin/includes/classes/rss.php b/admin/includes/classes/rss.php deleted file mode 100755 index 09f53dab6..000000000 --- a/admin/includes/classes/rss.php +++ /dev/null @@ -1,233 +0,0 @@ -cache_dir != '') { - $cache_file = $this->cache_dir . '/rss_' . md5($rss_url) . '.cache'; - $timedif = @(time() - filemtime($cache_file)); - if ($timedif < $this->cache_time) { - // cached file is fresh enough, return cached array - $result = unserialize(join('', file($cache_file))); - // set 'cached' to 1 only if cached file is correct - if ($result) $result['cached'] = 1; - } else { - // cached file is too old, create new - $result = $this->Parse($rss_url); - $serialized = serialize($result); - if ($f = @fopen($cache_file, 'w')) { - fwrite ($f, $serialized, strlen($serialized)); - fclose($f); - } - if ($result) $result['cached'] = 0; - } - } - // If CACHE DISABLED >> load and parse the file directly - else { - $result = $this->Parse($rss_url); - if ($result) $result['cached'] = 0; - } - // return result - return $result; - } - - // ------------------------------------------------------------------- - // Modification of preg_match(); return trimed field with index 1 - // from 'classic' preg_match() array output - // ------------------------------------------------------------------- - function my_preg_match ($pattern, $subject) { - // start regullar expression - preg_match($pattern, $subject, $out); - // if there is some result... process it and return it - if(isset($out[1])) { - // Process CDATA (if present) - if ($this->CDATA == 'content') { // Get CDATA content (without CDATA tag) - $out[1] = strtr($out[1], array(''', ']]>'=>'')); - } elseif ($this->CDATA == 'strip') { // Strip CDATA - $out[1] = strtr($out[1], array(''', ']]>'=>'')); - } - - // If code page is set convert character encoding to required - if ($this->cp != '') - //$out[1] = $this->MyConvertEncoding($this->rsscp, $this->cp, $out[1]); - $out[1] = iconv($this->rsscp, $this->cp.'//TRANSLIT', $out[1]); - // Return result - return trim($out[1]); - } else { - // if there is NO result, return empty string - return ''; - } - } - - // ------------------------------------------------------------------- - // Replace HTML entities &something; by real characters - // ------------------------------------------------------------------- - function unhtmlentities ($string) { - // Get HTML entities table - $trans_tbl = get_html_translation_table (HTML_ENTITIES, ENT_QUOTES); - // Flip keys<==>values - $trans_tbl = array_flip ($trans_tbl); - // Add support for ' entity (missing in HTML_ENTITIES) - $trans_tbl += array(''' => "'"); - // Replace entities by values - return strtr ($string, $trans_tbl); - } - - // ------------------------------------------------------------------- - // Parse() is private method used by Get() to load and parse RSS file. - // Don't use Parse() in your scripts - use Get($rss_file) instead. - // ------------------------------------------------------------------- - function Parse ($rss_url) { - $rss_content = ''; - - // Open and load RSS file - if (function_exists('curl_init')) { - $curl = curl_init($rss_url); - curl_setopt($curl, CURLOPT_HEADER, 0); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1); - - $rss_content = curl_exec($curl); - - curl_close($curl); - } else { - if ($f = @fopen($rss_url, 'r')) { - while (!feof($f)) { - $rss_content .= fgets($f, 4096); - } - fclose($f); - } - } - - if (!empty($rss_content)) { - // Parse document encoding - $result['encoding'] = $this->my_preg_match("'encoding=[\'\"](.*?)[\'\"]'si", $rss_content); - // if document codepage is specified, use it - if ($result['encoding'] != '') - { $this->rsscp = $result['encoding']; } // This is used in my_preg_match() - // otherwise use the default codepage - else - { $this->rsscp = $this->default_cp; } // This is used in my_preg_match() - - // Parse CHANNEL info - preg_match("'(.*?)'si", $rss_content, $out_channel); - foreach($this->channeltags as $channeltag) - { - $temp = $this->my_preg_match("'<$channeltag.*?>(.*?)'si", $out_channel[1]); - if ($temp != '') $result[$channeltag] = $temp; // Set only if not empty - } - // If date_format is specified and lastBuildDate is valid - if ($this->date_format != '' && ($timestamp = strtotime($result['lastBuildDate'])) !==-1) { - // convert lastBuildDate to specified date format - $result['lastBuildDate'] = date($this->date_format, $timestamp); - } - - // Parse TEXTINPUT info - preg_match("']*[^/])>(.*?)'si", $rss_content, $out_textinfo); - // This a little strange regexp means: - // Look for tag with or without any attributes, but skip truncated version (it's not beggining tag) - if (isset($out_textinfo[2])) { - foreach($this->textinputtags as $textinputtag) { - $temp = $this->my_preg_match("'<$textinputtag.*?>(.*?)'si", $out_textinfo[2]); - if ($temp != '') $result['textinput_'.$textinputtag] = $temp; // Set only if not empty - } - } - // Parse IMAGE info - preg_match("'(.*?)'si", $rss_content, $out_imageinfo); - if (isset($out_imageinfo[1])) { - foreach($this->imagetags as $imagetag) { - $temp = $this->my_preg_match("'<$imagetag.*?>(.*?)'si", $out_imageinfo[1]); - if ($temp != '') $result['image_'.$imagetag] = $temp; // Set only if not empty - } - } - // Parse ITEMS - preg_match_all("'(.*?)'si", $rss_content, $items); - $rss_items = $items[2]; - $i = 0; - $result['items'] = array(); // create array even if there are no items - foreach($rss_items as $rss_item) { - // If number of items is lower then limit: Parse one item - if ($i < $this->items_limit || $this->items_limit == 0) { - foreach($this->itemtags as $itemtag) { - $temp = $this->my_preg_match("'<$itemtag.*?>(.*?)'si", $rss_item); - if ($temp != '') $result['items'][$i][$itemtag] = $temp; // Set only if not empty - } - // Strip HTML tags and other bullshit from DESCRIPTION - if ($this->stripHTML && $result['items'][$i]['description']) - $result['items'][$i]['description'] = strip_tags($this->unhtmlentities(strip_tags($result['items'][$i]['description']))); - // Strip HTML tags and other bullshit from TITLE - if ($this->stripHTML && $result['items'][$i]['title']) - $result['items'][$i]['title'] = strip_tags($this->unhtmlentities(strip_tags($result['items'][$i]['title']))); - // If date_format is specified and pubDate is valid - if ($this->date_format != '' && ($timestamp = strtotime($result['items'][$i]['pubDate'])) !==-1) { - // convert pubDate to specified date format - $result['items'][$i]['pubDate'] = date($this->date_format, $timestamp); - } - // Item counter - $i++; - } - } - - $result['items_count'] = $i; - return $result; - } - else // Error in opening return False - { - return False; - } - } -} - -?> \ No newline at end of file diff --git a/admin/includes/column_left.php b/admin/includes/column_left.php index e89f754b4..f4c022cae 100755 --- a/admin/includes/column_left.php +++ b/admin/includes/column_left.php @@ -52,45 +52,46 @@ function tep_sort_admin_boxes_links($a, $b) { } ?> -
+
+
-' . $groups['heading'] . '' . - '
'; - } -?> - -
- - + }); + +
-
- - - - -
OSCOM CE Phoenix Copyright © 2000- OSCOM CE Phoenix (Copyright and Trademark Policy)
+
+ + diff --git a/admin/includes/functions/html_output.php b/admin/includes/functions/html_output.php index d35cd1a6d..96a97a6c4 100755 --- a/admin/includes/functions/html_output.php +++ b/admin/includes/functions/html_output.php @@ -490,4 +490,14 @@ function tep_draw_bootstrap_button($title = null, $icon = null, $link = null, $p } return $button; - } \ No newline at end of file + } + + // review stars + function tep_draw_stars($rating = 0) { + $star_rating = round($rating, 0, PHP_ROUND_HALF_UP); + $stars = str_repeat('', $star_rating); + $stars .= str_repeat('', 5-$star_rating); + + return '' . $stars . ''; + } + \ No newline at end of file diff --git a/admin/includes/header.php b/admin/includes/header.php index 734e4b178..6b75c9dc3 100755 --- a/admin/includes/header.php +++ b/admin/includes/header.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2014 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -15,12 +15,22 @@ } ?> - - - - - - - - -
' . tep_image('images/oscommerce.png', 'OSCOM CE Phoenix v' . tep_get_version()) . ''; ?>
  ' . HEADER_TITLE_ADMINISTRATION . '  |  ' . HEADER_TITLE_ONLINE_CATALOG . '  |  ' . HEADER_TITLE_SUPPORT_SITE . ''; ?>Logoff)' : ''); ?>  
\ No newline at end of file + +
+ ' . tep_image('images/oscommerce.png', 'OSCOM CE Phoenix v' . tep_get_version()) . ''; ?> +
+ + + +

+ diff --git a/admin/includes/languages/english.php b/admin/includes/languages/english.php index da7d811a2..74b7ebd54 100755 --- a/admin/includes/languages/english.php +++ b/admin/includes/languages/english.php @@ -48,9 +48,11 @@ function tep_date_raw($date, $reverse = false) { // header text in includes/header.php define('HEADER_TITLE_TOP', 'Administration'); -define('HEADER_TITLE_SUPPORT_SITE', 'Support Site'); -define('HEADER_TITLE_ONLINE_CATALOG', 'Online Catalog'); -define('HEADER_TITLE_ADMINISTRATION', 'Administration'); +define('HEADER_TITLE_SUPPORT_SITE', 'Support Site'); +define('HEADER_TITLE_ONLINE_CATALOG', 'Shop'); +define('HEADER_TITLE_ADMINISTRATION', 'Admin'); +define('HEADER_TITLE_PHOENIX_CLUB', 'Phoenix Club'); +define('HEADER_TITLE_LOGOFF', ' %s, securely logoff'); // text for gender define('MALE', 'Male'); @@ -63,60 +65,30 @@ function tep_date_raw($date, $reverse = false) { define('BOX_HEADING_CONFIGURATION', 'Configuration'); define('BOX_CONFIGURATION_MYSTORE', 'My Store'); define('BOX_CONFIGURATION_LOGGING', 'Logging'); -define('BOX_CONFIGURATION_ADMINISTRATORS', 'Administrators'); -define('BOX_CONFIGURATION_STORE_LOGO', 'Store Logo'); // modules box text in includes/boxes/modules.php define('BOX_HEADING_MODULES', 'Modules'); // categories box text in includes/boxes/catalog.php define('BOX_HEADING_CATALOG', 'Catalog'); -define('BOX_CATALOG_CATEGORIES_PRODUCTS', 'Categories/Products'); -define('BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES', 'Products Attributes'); -define('BOX_CATALOG_MANUFACTURERS', 'Manufacturers'); -define('BOX_CATALOG_REVIEWS', 'Reviews'); -define('BOX_CATALOG_SPECIALS', 'Specials'); -define('BOX_CATALOG_PRODUCTS_EXPECTED', 'Products Expected'); // customers box text in includes/boxes/customers.php define('BOX_HEADING_CUSTOMERS', 'Customers'); -define('BOX_CUSTOMERS_CUSTOMERS', 'Customers'); // orders box text in includes/boxes/orders.php define('BOX_HEADING_ORDERS', 'Orders'); -define('BOX_ORDERS_ORDERS', 'Orders'); // taxes box text in includes/boxes/taxes.php define('BOX_HEADING_LOCATION_AND_TAXES', 'Locations / Taxes'); -define('BOX_TAXES_COUNTRIES', 'Countries'); -define('BOX_TAXES_ZONES', 'Zones'); -define('BOX_TAXES_GEO_ZONES', 'Tax Zones'); -define('BOX_TAXES_TAX_CLASSES', 'Tax Classes'); -define('BOX_TAXES_TAX_RATES', 'Tax Rates'); // reports box text in includes/boxes/reports.php define('BOX_HEADING_REPORTS', 'Reports'); -define('BOX_REPORTS_PRODUCTS_VIEWED', 'Products Viewed'); -define('BOX_REPORTS_PRODUCTS_PURCHASED', 'Products Purchased'); -define('BOX_REPORTS_ORDERS_TOTAL', 'Customer Orders-Total'); // tools text in includes/boxes/tools.php define('BOX_HEADING_TOOLS', 'Tools'); -define('BOX_TOOLS_ACTION_RECORDER', 'Action Recorder'); -define('BOX_TOOLS_BACKUP', 'Database Backup'); -define('BOX_TOOLS_DEFINE_LANGUAGE', 'Define Languages'); -define('BOX_TOOLS_MAIL', 'Send Email'); -define('BOX_TOOLS_NEWSLETTER_MANAGER', 'Newsletter Manager'); -define('BOX_TOOLS_SEC_DIR_PERMISSIONS', 'Security Directory Permissions'); -define('BOX_TOOLS_SERVER_INFO', 'Server Info'); -define('BOX_TOOLS_VERSION_CHECK', 'Version Checker'); -define('BOX_TOOLS_WHOS_ONLINE', 'Who\'s Online'); // localizaion box text in includes/boxes/localization.php define('BOX_HEADING_LOCALIZATION', 'Localization'); -define('BOX_LOCALIZATION_CURRENCIES', 'Currencies'); -define('BOX_LOCALIZATION_LANGUAGES', 'Languages'); -define('BOX_LOCALIZATION_ORDERS_STATUS', 'Orders Status'); // javascript messages define('JS_ERROR', 'Errors have occured during the process of your form!\nPlease make the following corrections:\n\n'); diff --git a/admin/includes/languages/english/modules/cfg_modules/cfgm_social_bookmarks.php b/admin/includes/languages/english/modules/boxes/catalog_categories.php old mode 100755 new mode 100644 similarity index 57% rename from admin/includes/languages/english/modules/cfg_modules/cfgm_social_bookmarks.php rename to admin/includes/languages/english/modules/boxes/catalog_categories.php index f8f5190da..75d9fe353 --- a/admin/includes/languages/english/modules/cfg_modules/cfgm_social_bookmarks.php +++ b/admin/includes/languages/english/modules/boxes/catalog_categories.php @@ -5,10 +5,9 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ -define('MODULE_CFG_MODULE_SOCIAL_BOOKMARKS_TITLE', 'Social Bookmarks'); -?> + define('MODULES_ADMIN_MENU_CATALOG_PRODUCTS', 'Categories/Products'); diff --git a/admin/includes/languages/english/modules/boxes/catalog_manufacturers.php b/admin/includes/languages/english/modules/boxes/catalog_manufacturers.php new file mode 100644 index 000000000..08c2abecf --- /dev/null +++ b/admin/includes/languages/english/modules/boxes/catalog_manufacturers.php @@ -0,0 +1,13 @@ + + diff --git a/admin/includes/languages/english/modules/boxes/tools_define_language.php b/admin/includes/languages/english/modules/boxes/tools_define_language.php new file mode 100644 index 000000000..53a5d3ea3 --- /dev/null +++ b/admin/includes/languages/english/modules/boxes/tools_define_language.php @@ -0,0 +1,13 @@ + diff --git a/admin/includes/languages/english/modules/dashboard/d_phoenix_addons.php b/admin/includes/languages/english/modules/dashboard/d_phoenix_addons.php new file mode 100644 index 000000000..b8e8b6769 --- /dev/null +++ b/admin/includes/languages/english/modules/dashboard/d_phoenix_addons.php @@ -0,0 +1,20 @@ + diff --git a/admin/includes/languages/english/modules/dashboard/d_total_revenue.php b/admin/includes/languages/english/modules/dashboard/d_total_revenue.php index c030c8186..b5cd0de8a 100755 --- a/admin/includes/languages/english/modules/dashboard/d_total_revenue.php +++ b/admin/includes/languages/english/modules/dashboard/d_total_revenue.php @@ -5,12 +5,12 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ -define('MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_TITLE', 'Total Revenue Chart (last 30 days)'); -define('MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_DESCRIPTION', 'Show the total revenue chart of the last 30 days'); +define('MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_TITLE', 'Total Revenue Chart'); +define('MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_DESCRIPTION', 'Show the total revenue chart of the last X days'); + define('MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_CHART_LINK', 'Total Revenue'); -?> diff --git a/admin/includes/languages/english/modules/dashboard/d_version_check.php b/admin/includes/languages/english/modules/dashboard/d_version_check.php index 5969f839a..76d9e4b7f 100755 --- a/admin/includes/languages/english/modules/dashboard/d_version_check.php +++ b/admin/includes/languages/english/modules/dashboard/d_version_check.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -15,4 +15,5 @@ define('MODULE_ADMIN_DASHBOARD_VERSION_CHECK_DATE', 'Last Checked On'); define('MODULE_ADMIN_DASHBOARD_VERSION_CHECK_CHECK_NOW', 'Check Now'); define('MODULE_ADMIN_DASHBOARD_VERSION_CHECK_NEVER', 'Never'); -define('MODULE_ADMIN_DASHBOARD_VERSION_CHECK_UPDATE_AVAILABLE', 'An update for OSCOM CE Phoenix is available!'); + +define('MODULE_ADMIN_DASHBOARD_VERSION_CHECK_UPDATE_AVAILABLE', ' An update for OSCOM CE Phoenix is available!'); diff --git a/admin/includes/modules/cfg_modules/cfgm_social_bookmarks.php b/admin/includes/modules/cfg_modules/cfgm_social_bookmarks.php deleted file mode 100755 index 7a12fb773..000000000 --- a/admin/includes/modules/cfg_modules/cfgm_social_bookmarks.php +++ /dev/null @@ -1,26 +0,0 @@ -directory = DIR_FS_CATALOG_MODULES . 'social_bookmarks/'; - $this->title = MODULE_CFG_MODULE_SOCIAL_BOOKMARKS_TITLE; - } - } -?> diff --git a/admin/includes/modules/dashboard/d_admin_logins.php b/admin/includes/modules/dashboard/d_admin_logins.php index a068c7333..8122f7144 100755 --- a/admin/includes/modules/dashboard/d_admin_logins.php +++ b/admin/includes/modules/dashboard/d_admin_logins.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -16,6 +16,7 @@ class d_admin_logins { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_TITLE; @@ -24,26 +25,32 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_CONTENT_WIDTH; } } function getOutput() { - $output = '' . - ' ' . - ' ' . - ' ' . - ' ' . - ' '; - - $logins_query = tep_db_query("select id, user_name, success, date_added from " . TABLE_ACTION_RECORDER . " where module = 'ar_admin_login' order by date_added desc limit 6"); - while ($logins = tep_db_fetch_array($logins_query)) { - $output .= ' ' . - ' ' . - ' ' . - ' ' . - ' '; - } + + $output = null; + + $output .= '
 ' . MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_TITLE . '' . MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_DATE . '
' . tep_image('images/icons/' . (($logins['success'] == '1') ? 'tick.gif' : 'cross.gif')) . '' . tep_output_string_protected($logins['user_name']) . '' . tep_date_short($logins['date_added']) . '
'; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + $logins_query = tep_db_query("select id, user_name, success, date_added from action_recorder where module = 'ar_admin_login' order by date_added desc limit " . (int)MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_DISPLAY); + while ($logins = tep_db_fetch_array($logins_query)) { + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + } + $output .= ''; $output .= '
' . MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_TITLE . ''. MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_DATE . '
' . (($logins['success'] == '1') ? '' : '') . ' ' . tep_output_string_protected($logins['user_name']) . '' . tep_date_short($logins['date_added']) . '
'; return $output; @@ -58,16 +65,18 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Administrator Logins Module', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_STATUS', 'True', 'Do you want to show the latest administrator logins on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Administrator Logins Module', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_STATUS', 'True', 'Do you want to show the latest administrator logins on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Logins to display', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_DISPLAY', '5', 'This number of Logins will display, ordered by latest access.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '3', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_SORT_ORDER', '1000', 'Sort order of display. Lowest is displayed first.', '6', '4', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_STATUS', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_STATUS', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_DISPLAY', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_SORT_ORDER'); } } -?> + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_customers.php b/admin/includes/modules/dashboard/d_customers.php index 5023df8b0..2e1e98f6d 100755 --- a/admin/includes/modules/dashboard/d_customers.php +++ b/admin/includes/modules/dashboard/d_customers.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -16,6 +16,7 @@ class d_customers { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_CUSTOMERS_TITLE; @@ -24,24 +25,31 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_CUSTOMERS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_CUSTOMERS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_CUSTOMERS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_CUSTOMERS_CONTENT_WIDTH; } } function getOutput() { - $output = '' . - ' ' . - ' ' . - ' ' . - ' '; + $output = null; $count = 0; + + $output .= '
' . MODULE_ADMIN_DASHBOARD_CUSTOMERS_TITLE . '' . MODULE_ADMIN_DASHBOARD_CUSTOMERS_DATE . '
'; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; - $customers_query = tep_db_query("select c.customers_id, c.customers_lastname, c.customers_firstname, ci.customers_info_date_account_created from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = ci.customers_info_id order by ci.customers_info_date_account_created desc limit 6"); - while ($customers = tep_db_fetch_array($customers_query)) { - $output .= ' ' . - ' ' . - ' ' . - ' '; - } + $customers_query = tep_db_query("select c.customers_id, c.customers_lastname, c.customers_firstname, ci.customers_info_date_account_created from customers c, customers_info ci where c.customers_id = ci.customers_info_id order by ci.customers_info_date_account_created desc limit " . (int)MODULE_ADMIN_DASHBOARD_CUSTOMERS_DISPLAY); + while ($customers = tep_db_fetch_array($customers_query)) { + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + } + $output .= ''; $output .= '
' . MODULE_ADMIN_DASHBOARD_CUSTOMERS_TITLE . ''. MODULE_ADMIN_DASHBOARD_CUSTOMERS_DATE . '
' . tep_output_string_protected($customers['customers_firstname'] . ' ' . $customers['customers_lastname']) . '' . tep_date_short($customers['customers_info_date_account_created']) . '
' . tep_output_string_protected($customers['customers_firstname'] . ' ' . $customers['customers_lastname']) . '' . tep_date_short($customers['customers_info_date_account_created']) . '
'; return $output; @@ -56,16 +64,18 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Customers Module', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_STATUS', 'True', 'Do you want to show the newest customers on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Customers Module', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_STATUS', 'True', 'Do you want to show the newest customers on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Customers to display', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_DISPLAY', '5', 'This number of Customers will display, ordered by most recent sign up.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '3', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_SORT_ORDER', '400', 'Sort order of display. Lowest is displayed first.', '6', '4', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_CUSTOMERS_STATUS', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_CUSTOMERS_STATUS', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_DISPLAY', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_CUSTOMERS_SORT_ORDER'); } } -?> + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_latest_addons.php b/admin/includes/modules/dashboard/d_latest_addons.php index 1a2b6aa39..03ed03bc0 100755 --- a/admin/includes/modules/dashboard/d_latest_addons.php +++ b/admin/includes/modules/dashboard/d_latest_addons.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2014 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -16,6 +16,7 @@ class d_latest_addons { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_TITLE; @@ -24,43 +25,41 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_CONTENT_WIDTH; } } function getOutput() { - if (!class_exists('lastRSS')) { - include('includes/classes/rss.php'); - } - - $rss = new lastRSS; - $rss->items_limit = 5; - $rss->cache_dir = DIR_FS_CACHE; - $rss->cache_time = 86400; - $feed = $rss->get('http://feeds.feedburner.com/osCommerce_Contributions'); - - $output = '' . - ' ' . - ' ' . - ' ' . - ' '; - - if (is_array($feed) && !empty($feed)) { - foreach ($feed['items'] as $item) { - $output .= ' ' . - ' ' . - ' ' . - ' '; + $feed = simplexml_load_file('http://feeds.feedburner.com/osCommerce_Contributions'); + + $output = null; $count = 0; + + $output .= '
' . MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_TITLE . '' . MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_DATE . '
' . $item['title'] . '' . date("F j, Y", strtotime($item['pubDate'])) . '
'; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + foreach ($feed->channel->item as $item) { + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + $count++; if ($count == (int)MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_DISPLAY) break; } - } else { - $output .= ' ' . - ' ' . - ' '; - } - $output .= ' ' . - ' ' . - ' ' . - '
' . MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_TITLE . ''. MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_DATE . '
' . $item->title . '' . date("F j, Y", strtotime($item->pubDate)) . '
' . MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_FEED_ERROR . '
' . tep_image('images/icon_oscommerce.png', MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_ICON_SITE) . ' ' . tep_image('images/icon_rss.png', MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_ICON_RSS) . '
'; + $output .= ''; + $output .= ''; + + $output .= ''; return $output; } @@ -74,16 +73,18 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Latest Add-Ons Module', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_STATUS', 'True', 'Do you want to show the latest osCommerce Add-Ons on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Latest Add-Ons Module', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_STATUS', 'True', 'Do you want to show the latest osCommerce Add-Ons on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Addons to display', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_DISPLAY', '5', 'This number of Addons will display, ordered by latest published.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '3', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_SORT_ORDER', '1200', 'Sort order of display. Lowest is displayed first.', '6', '4', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_STATUS', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_STATUS', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_DISPLAY', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_SORT_ORDER'); } } -?> + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_latest_news.php b/admin/includes/modules/dashboard/d_latest_news.php index e574be205..910a7541f 100755 --- a/admin/includes/modules/dashboard/d_latest_news.php +++ b/admin/includes/modules/dashboard/d_latest_news.php @@ -16,6 +16,7 @@ class d_latest_news { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_LATEST_NEWS_TITLE; @@ -24,43 +25,44 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_LATEST_NEWS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_LATEST_NEWS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_LATEST_NEWS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_LATEST_NEWS_CONTENT_WIDTH; } } function getOutput() { - if (!class_exists('lastRSS')) { - include('includes/classes/rss.php'); - } - - $rss = new lastRSS; - $rss->items_limit = 5; - $rss->cache_dir = DIR_FS_CACHE; - $rss->cache_time = 86400; - $feed = $rss->get('http://feeds.feedburner.com/osCommerceNewsAndBlogs'); - - $output = '' . - ' ' . - ' ' . - ' ' . - ' '; - - if (is_array($feed) && !empty($feed)) { - foreach ($feed['items'] as $item) { - $output .= ' ' . - ' ' . - ' ' . - ' '; - } - } else { - $output .= ' ' . - ' ' . - ' '; - } - - $output .= ' ' . - ' ' . - ' ' . - '
' . MODULE_ADMIN_DASHBOARD_LATEST_NEWS_TITLE . '' . MODULE_ADMIN_DASHBOARD_LATEST_NEWS_DATE . '
' . $item['title'] . '' . date("F j, Y", strtotime($item['pubDate'])) . '
' . MODULE_ADMIN_DASHBOARD_LATEST_NEWS_FEED_ERROR . '
' . tep_image('images/icon_oscommerce.png', MODULE_ADMIN_DASHBOARD_LATEST_NEWS_ICON_NEWS) . ' ' . tep_image('images/icon_newsletter.png', MODULE_ADMIN_DASHBOARD_LATEST_NEWS_ICON_NEWSLETTER) . ' ' . tep_image('images/icon_google_plus.png', MODULE_ADMIN_DASHBOARD_LATEST_NEWS_ICON_GOOGLE_PLUS) . ' ' . tep_image('images/icon_facebook.png', MODULE_ADMIN_DASHBOARD_LATEST_NEWS_ICON_FACEBOOK) . ' ' . tep_image('images/icon_twitter.png', MODULE_ADMIN_DASHBOARD_LATEST_NEWS_ICON_TWITTER) . ' ' . tep_image('images/icon_rss.png', MODULE_ADMIN_DASHBOARD_LATEST_NEWS_ICON_RSS) . '
'; + $feed = simplexml_load_file('http://feeds.feedburner.com/osCommerceNewsAndBlogs'); + + $output = null; $count = 0; + + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + foreach ($feed->channel->item as $item) { + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + $count++; if ($count == (int)MODULE_ADMIN_DASHBOARD_LATEST_NEWS_DISPLAY) break; + } + + $output .= ''; + $output .= '
' . MODULE_ADMIN_DASHBOARD_LATEST_NEWS_TITLE . ''. MODULE_ADMIN_DASHBOARD_LATEST_NEWS_DATE . '
' . $item->title . '' . date("F j, Y", strtotime($item->pubDate)) . '
'; + + $output .= ''; return $output; } @@ -74,16 +76,18 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Latest News Module', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_STATUS', 'True', 'Do you want to show the latest osCommerce News on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Latest News Module', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_STATUS', 'True', 'Do you want to show the latest osCommerce News on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Items to display', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_DISPLAY', '5', 'This number of items will display, ordered by latest published.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '3', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_SORT_ORDER', '700', 'Sort order of display. Lowest is displayed first.', '6', '4', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_LATEST_NEWS_STATUS', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_LATEST_NEWS_STATUS', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_DISPLAY', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_LATEST_NEWS_SORT_ORDER'); } } -?> + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_orders.php b/admin/includes/modules/dashboard/d_orders.php index 27df1e3de..839c7fda9 100755 --- a/admin/includes/modules/dashboard/d_orders.php +++ b/admin/includes/modules/dashboard/d_orders.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -16,6 +16,7 @@ class d_orders { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_ORDERS_TITLE; @@ -24,31 +25,40 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_ORDERS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_ORDERS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_ORDERS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_ORDERS_CONTENT_WIDTH; } } function getOutput() { global $languages_id; - - $output = '' . - ' ' . - ' ' . - ' ' . - ' ' . - ' ' . - ' '; - - $orders_query = tep_db_query("select o.orders_id, o.customers_name, greatest(o.date_purchased, ifnull(o.last_modified, 0)) as date_last_modified, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by date_last_modified desc limit 6"); - while ($orders = tep_db_fetch_array($orders_query)) { - $output .= ' ' . - ' ' . - ' ' . - ' ' . - ' ' . - ' '; - } - - $output .= '
' . MODULE_ADMIN_DASHBOARD_ORDERS_TITLE . '' . MODULE_ADMIN_DASHBOARD_ORDERS_TOTAL . '' . MODULE_ADMIN_DASHBOARD_ORDERS_DATE . '' . MODULE_ADMIN_DASHBOARD_ORDERS_ORDER_STATUS . '
' . tep_output_string_protected($orders['customers_name']) . '' . strip_tags($orders['order_total']) . '' . tep_date_short($orders['date_last_modified']) . '' . $orders['orders_status_name'] . '
'; + + $output = null; + + $output .= '
'; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + $orders_query = tep_db_query("select o.orders_id, o.customers_name, greatest(o.date_purchased, ifnull(o.last_modified, 0)) as date_last_modified, s.orders_status_name, ot.text as order_total from orders o, orders_total ot, orders_status s where o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by date_last_modified desc limit " . (int)MODULE_ADMIN_DASHBOARD_ORDERS_DISPLAY); + while ($orders = tep_db_fetch_array($orders_query)) { + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + } + + $output .= ''; + $output .= '
' . MODULE_ADMIN_DASHBOARD_ORDERS_TITLE . '' . MODULE_ADMIN_DASHBOARD_ORDERS_TOTAL . '' . MODULE_ADMIN_DASHBOARD_ORDERS_DATE . '' . MODULE_ADMIN_DASHBOARD_ORDERS_ORDER_STATUS . '
' . tep_output_string_protected($orders['customers_name']) . '' . strip_tags($orders['order_total']) . '' . tep_date_short($orders['date_last_modified']) . '' . $orders['orders_status_name'] . '
'; + $output .= '
'; return $output; } @@ -62,16 +72,18 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Orders Module', 'MODULE_ADMIN_DASHBOARD_ORDERS_STATUS', 'True', 'Do you want to show the latest orders on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_ORDERS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Orders Module', 'MODULE_ADMIN_DASHBOARD_ORDERS_STATUS', 'True', 'Do you want to show the latest orders on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Orders to display', 'MODULE_ADMIN_DASHBOARD_ORDERS_DISPLAY', '5', 'This number of Orders will display, ordered by most recent.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_ORDERS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '3', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_ORDERS_SORT_ORDER', '300', 'Sort order of display. Lowest is displayed first.', '6', '4', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_ORDERS_STATUS', 'MODULE_ADMIN_DASHBOARD_ORDERS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_ORDERS_STATUS', 'MODULE_ADMIN_DASHBOARD_ORDERS_DISPLAY', 'MODULE_ADMIN_DASHBOARD_ORDERS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_ORDERS_SORT_ORDER'); } } -?> + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_partner_news.php b/admin/includes/modules/dashboard/d_partner_news.php index f0bcbeb9e..85ca83115 100755 --- a/admin/includes/modules/dashboard/d_partner_news.php +++ b/admin/includes/modules/dashboard/d_partner_news.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2013 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -16,6 +16,7 @@ class d_partner_news { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_TITLE; @@ -24,6 +25,7 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_CONTENT_WIDTH; } if ( !function_exists('json_decode') ) { @@ -39,21 +41,27 @@ function getOutput() { $output = null; if (is_array($result) && !empty($result)) { - $output = '' . - ' ' . - ' ' . - ' '; - - foreach ($result as $p) { - $output .= ' ' . - ' ' . - ' '; - } - - $output .= ' ' . - ' ' . - ' ' . - '
' . MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_TITLE . '
' . $p['title'] . ' (' . $p['category_title'] . ')
' . $p['status_update'] . '
' . MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_MORE_TITLE . '
'; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + foreach ($result as $p) { + $output .= ''; + $output .= ''; + $output .= ''; + } + + $output .= ''; + $output .= '
' . MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_TITLE . '
' . $p['title'] . ' (' . $p['category_title'] . ')
' . $p['status_update'] . '
'; + + $output .= ''; } return $output; @@ -127,16 +135,17 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Partner News Module', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_STATUS', 'True', 'Do you want to show the latest osCommerce Partner News on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Partner News Module', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_STATUS', 'True', 'Do you want to show the latest osCommerce Partner News on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_SORT_ORDER', '1100', 'Sort order of display. Lowest is displayed first.', '6', '3', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_STATUS', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_STATUS', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_SORT_ORDER'); } } -?> + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_paypal_app.php b/admin/includes/modules/dashboard/d_paypal_app.php index 1c04d3a4a..81d686875 100644 --- a/admin/includes/modules/dashboard/d_paypal_app.php +++ b/admin/includes/modules/dashboard/d_paypal_app.php @@ -20,6 +20,7 @@ class d_paypal_app { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->_app = new OSCOM_PayPal(); @@ -32,6 +33,7 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_PAYPAL_APP_SORT_ORDER') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_PAYPAL_APP_SORT_ORDER; $this->enabled = true; + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_PAYPAL_APP_CONTENT_WIDTH; } } @@ -323,7 +325,8 @@ function check() { } function install() { - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_PAYPAL_APP_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_PAYPAL_APP_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_PAYPAL_APP_SORT_ORDER', '1300', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { @@ -331,7 +334,7 @@ function remove() { } function keys() { - return array('MODULE_ADMIN_DASHBOARD_PAYPAL_APP_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_PAYPAL_APP_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_PAYPAL_APP_SORT_ORDER'); } } -?> + diff --git a/admin/includes/modules/dashboard/d_phoenix_addons.php b/admin/includes/modules/dashboard/d_phoenix_addons.php new file mode 100644 index 000000000..d78de166f --- /dev/null +++ b/admin/includes/modules/dashboard/d_phoenix_addons.php @@ -0,0 +1,92 @@ +title = MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_TITLE; + $this->description = MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_DESCRIPTION; + + if ( defined('MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_STATUS') ) { + $this->sort_order = MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_SORT_ORDER; + $this->enabled = (MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_CONTENT_WIDTH; + } + } + + function getOutput() { + $feed = simplexml_load_file('https://template.me.uk/addon_feed.xml'); + + $output = null; + + $output .= '
'; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + foreach ($feed->channel->item as $item) { + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + } + + $output .= ''; + $output .= '
' . tep_image('images/icon_phoenix.png', 'Phoenix') . ' ' . MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_TITLE . '' . MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_OWNER . '' . MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_RATING . ''. MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_DATE . '
' . $item->title . '' . $item->owner . '' . tep_draw_stars($item->rating) . '' . date("F j, Y", strtotime($item->pubDate)) . '
'; + $output .= '
'; + + $output .= ''; + + return $output; + } + + function isEnabled() { + return $this->enabled; + } + + function check() { + return defined('MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_STATUS'); + } + + function install() { + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Latest Add-Ons Module', 'MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_STATUS', 'True', 'Do you want to show the latest Phoenix Club Add-Ons on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_SORT_ORDER', '500', 'Sort order of display. Lowest is displayed first.', '6', '3', now())"); + } + + function remove() { + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + } + + function keys() { + return array('MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_STATUS', 'MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_PHOENIX_ADDONS_SORT_ORDER'); + } + } + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_reviews.php b/admin/includes/modules/dashboard/d_reviews.php index 2b4b3d6ee..894e2e2fb 100755 --- a/admin/includes/modules/dashboard/d_reviews.php +++ b/admin/includes/modules/dashboard/d_reviews.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -16,6 +16,7 @@ class d_reviews { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_REVIEWS_TITLE; @@ -24,34 +25,43 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_REVIEWS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_REVIEWS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_REVIEWS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_REVIEWS_CONTENT_WIDTH; } } function getOutput() { global $languages_id; - - $output = '' . - ' ' . - ' ' . - ' ' . - ' ' . - ' ' . - ' ' . - ' '; - - $reviews_query = tep_db_query("select r.reviews_id, r.date_added, pd.products_name, r.customers_name, r.reviews_rating, r.reviews_status from " . TABLE_REVIEWS . " r, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = r.products_id and pd.language_id = '" . (int)$languages_id . "' order by r.date_added desc limit 6"); - while ($reviews = tep_db_fetch_array($reviews_query)) { - $status_icon = ($reviews['reviews_status'] == '1') ? tep_image('images/icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) : tep_image('images/icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); - $output .= ' ' . - ' ' . - ' ' . - ' ' . - ' ' . - ' ' . - ' '; - } - - $output .= '
' . MODULE_ADMIN_DASHBOARD_REVIEWS_TITLE . '' . MODULE_ADMIN_DASHBOARD_REVIEWS_DATE . '' . MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEWER . '' . MODULE_ADMIN_DASHBOARD_REVIEWS_RATING . '' . MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEW_STATUS . '
' . $reviews['products_name'] . '' . tep_date_short($reviews['date_added']) . '' . tep_output_string_protected($reviews['customers_name']) . '' . tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif') . '' . $status_icon . '
'; + + $output = null; + + $output .= '
'; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + $reviews_query = tep_db_query("select r.reviews_id, r.date_added, pd.products_name, r.customers_name, r.reviews_rating, r.reviews_status from reviews r, products_description pd where pd.products_id = r.products_id and pd.language_id = '" . (int)$languages_id . "' order by r.date_added desc limit " . (int)MODULE_ADMIN_DASHBOARD_REVIEWS_DISPLAY); + while ($reviews = tep_db_fetch_array($reviews_query)) { + $status_icon = ($reviews['reviews_status'] == '1') ? '' : ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + } + + $output .= ''; + $output .= '
' . MODULE_ADMIN_DASHBOARD_REVIEWS_TITLE . '' . MODULE_ADMIN_DASHBOARD_REVIEWS_DATE . '' . MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEWER . '' . MODULE_ADMIN_DASHBOARD_REVIEWS_RATING . '' . MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEW_STATUS . '
' . $reviews['products_name'] . '' . tep_date_short($reviews['date_added']) . '' . tep_output_string_protected($reviews['customers_name']) . '' . tep_draw_stars($reviews['reviews_rating']) . '' . $status_icon . '
'; + $output .= '
'; return $output; } @@ -65,16 +75,18 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Reviews Module', 'MODULE_ADMIN_DASHBOARD_REVIEWS_STATUS', 'True', 'Do you want to show the latest reviews on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_REVIEWS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Reviews Module', 'MODULE_ADMIN_DASHBOARD_REVIEWS_STATUS', 'True', 'Do you want to show the latest reviews on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Reviews to display', 'MODULE_ADMIN_DASHBOARD_REVIEWS_DISPLAY', '5', 'This number of Reviews will display, ordered by latest added.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_REVIEWS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '1', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_REVIEWS_SORT_ORDER', '800', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_REVIEWS_STATUS', 'MODULE_ADMIN_DASHBOARD_REVIEWS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_REVIEWS_STATUS', 'MODULE_ADMIN_DASHBOARD_REVIEWS_DISPLAY', 'MODULE_ADMIN_DASHBOARD_REVIEWS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_REVIEWS_SORT_ORDER'); } } -?> \ No newline at end of file + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_security_checks.php b/admin/includes/modules/dashboard/d_security_checks.php index 223fedd60..49ce39f7c 100755 --- a/admin/includes/modules/dashboard/d_security_checks.php +++ b/admin/includes/modules/dashboard/d_security_checks.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2010 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -16,6 +16,7 @@ class d_security_checks { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_TITLE; @@ -24,6 +25,7 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_CONTENT_WIDTH; } } @@ -67,37 +69,33 @@ function getOutput() { } if (isset($secCheck_messages['error'])) { - $output .= '
'; - + $output .= '
'; foreach ($secCheck_messages['error'] as $error) { - $output .= '

' . $error . '

'; + $output .= '
' . $error . '
'; } - $output .= '
'; } if (isset($secCheck_messages['warning'])) { - $output .= '
'; - + $output .= '
'; foreach ($secCheck_messages['warning'] as $warning) { - $output .= '

' . $warning . '

'; + $output .= '
' . $warning . '
'; } - $output .= '
'; } if (isset($secCheck_messages['info'])) { - $output .= '
'; - + $output .= '
'; foreach ($secCheck_messages['info'] as $info) { - $output .= '

' . $info . '

'; + $output .= '
' . $info . '
'; } - $output .= '
'; } if (empty($secCheck_messages)) { - $output .= '

' . MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_SUCCESS . '

'; + $output .= '
'; + $output .= '
' . MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_SUCCESS . '
'; + $output .= '
'; } return $output; @@ -112,16 +110,17 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Security Checks Module', 'MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_STATUS', 'True', 'Do you want to run the security checks for this installation?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Security Checks Module', 'MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_STATUS', 'True', 'Do you want to run the security checks for this installation?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_SORT_ORDER', '600', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_STATUS', 'MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_STATUS', 'MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_SORT_ORDER'); } } -?> + \ No newline at end of file diff --git a/admin/includes/modules/dashboard/d_total_customers.php b/admin/includes/modules/dashboard/d_total_customers.php index 2bf93e961..eeef17cb8 100755 --- a/admin/includes/modules/dashboard/d_total_customers.php +++ b/admin/includes/modules/dashboard/d_total_customers.php @@ -16,6 +16,7 @@ class d_total_customers { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_TITLE; @@ -24,16 +25,20 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_CONTENT_WIDTH; } } function getOutput() { $days = array(); - for($i = 0; $i < 30; $i++) { + + $chart_days = (int)MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_DAYS; + + for($i = 0; $i < $chart_days; $i++) { $days[date('Y-m-d', strtotime('-'. $i .' days'))] = 0; } - $orders_query = tep_db_query("select date_format(customers_info_date_account_created, '%Y-%m-%d') as dateday, count(*) as total from " . TABLE_CUSTOMERS_INFO . " where date_sub(curdate(), interval 30 day) <= customers_info_date_account_created group by dateday"); + $orders_query = tep_db_query("select date_format(customers_info_date_account_created, '%Y-%m-%d') as dateday, count(*) as total from customers_info where date_sub(curdate(), interval '" . $chart_days . "' day) <= customers_info_date_account_created group by dateday"); while ($orders = tep_db_fetch_array($orders_query)) { $days[$orders['dateday']] = $orders['total']; } @@ -132,16 +137,18 @@ function check() { } function install() { - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Total Customers Module', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_STATUS', 'True', 'Do you want to show the total customers chart on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Total Customers Module', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_STATUS', 'True', 'Do you want to show the total customers chart on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Days', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_DAYS', '7', 'Days to display.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '3', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_SORT_ORDER', '200', 'Sort order of display. Lowest is displayed first.', '6', '4', now())"); } function remove() { - tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { - return array('MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_STATUS', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_SORT_ORDER'); + return array('MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_STATUS', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_DAYS', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_CONTENT_WIDTH', 'MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_SORT_ORDER'); } } -?> + diff --git a/admin/includes/modules/dashboard/d_total_revenue.php b/admin/includes/modules/dashboard/d_total_revenue.php index 8c0ae8bd2..c609dd929 100755 --- a/admin/includes/modules/dashboard/d_total_revenue.php +++ b/admin/includes/modules/dashboard/d_total_revenue.php @@ -16,6 +16,7 @@ class d_total_revenue { var $description; var $sort_order; var $enabled = false; + var $content_width = 6; function __construct() { $this->title = MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_TITLE; @@ -24,16 +25,20 @@ function __construct() { if ( defined('MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_STATUS') ) { $this->sort_order = MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_SORT_ORDER; $this->enabled = (MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_STATUS == 'True'); + $this->content_width = (int)MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_CONTENT_WIDTH; } } function getOutput() { $days = array(); - for($i = 0; $i < 30; $i++) { + + $chart_days = (int)MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_DAYS; + + for($i = 0; $i < $chart_days; $i++) { $days[date('Y-m-d', strtotime('-'. $i .' days'))] = 0; } - $orders_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as dateday, sum(ot.value) as total from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot where date_sub(curdate(), interval 30 day) <= o.date_purchased and o.orders_id = ot.orders_id and ot.class = 'ot_total' group by dateday"); + $orders_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as dateday, sum(ot.value) as total from orders o, orders_total ot where date_sub(curdate(), interval '" . $chart_days . "' day) <= o.date_purchased and o.orders_id = ot.orders_id and ot.class = 'ot_total' group by dateday"); while ($orders = tep_db_fetch_array($orders_query)) { $days[$orders['dateday']] = $orders['total']; } @@ -53,8 +58,8 @@ function getOutput() { $chart_label_link = tep_href_link('orders.php'); $output = <<
- -EOD; - - return $output; - } -?> diff --git a/includes/modules/boxes/bm_manufacturers.php b/includes/modules/boxes/bm_manufacturers.php index 3e162963b..35c9a25a6 100644 --- a/includes/modules/boxes/bm_manufacturers.php +++ b/includes/modules/boxes/bm_manufacturers.php @@ -37,34 +37,34 @@ function getData() { $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from manufacturers order by manufacturers_name"); if ($number_of_rows = tep_db_num_rows($manufacturers_query)) { - if ($number_of_rows <= MAX_DISPLAY_MANUFACTURERS_IN_A_LIST) { + if ($number_of_rows <= MODULE_BOXES_MANUFACTURERS_MAX_LIST) { // Display a list - $manufacturers_list = ''; + $manufacturers_list = '
'; while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { - $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']); - if (isset($_GET['manufacturers_id']) && ($_GET['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '' . $manufacturers_name .''; - $manufacturers_list .= '
  • ' . $manufacturers_name . '
  • '; + $manufacturers_name = $manufacturers['manufacturers_name']; + if (isset($_GET['manufacturers_id']) && ($_GET['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '' . $manufacturers['manufacturers_name'] .''; + $manufacturers_list .= '' . $manufacturers_name . ''; } + $manufacturers_list .= '
    '; $data = $manufacturers_list; } else { // Display a drop-down $manufacturers_array = array(); - if (MAX_MANUFACTURERS_LIST < 2) { - $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); - } + $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); - while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { - $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']); + while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], - 'text' => $manufacturers_name); + 'text' => $manufacturers['manufacturers_name']); } - $data .= '
  • '; - $data .= tep_draw_form('manufacturers', tep_href_link('index.php', '', $request_type, false), 'get'); - $data .= tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : ''), 'onchange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"') . tep_hide_session_id(); - $data .= ''; - $data .= '
  • '; + $data .= '
      '; + $data .= '
    • '; + $data .= tep_draw_form('manufacturers', tep_href_link('index.php', '', $request_type, false), 'get'); + $data .= tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : ''), 'onchange="this.form.submit();" style="width: 100%"') . tep_hide_session_id(); + $data .= ''; + $data .= '
    • '; + $data .= '
    '; } } @@ -94,7 +94,8 @@ function check() { function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Manufacturers Module', 'MODULE_BOXES_MANUFACTURERS_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_MANUFACTURERS_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_MANUFACTURERS_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '2', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); + tep_db_query("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Manufacturers List', 'MODULE_BOXES_MANUFACTURERS_MAX_LIST', '9', 'When the number of manufacturers exceeds this number, a drop-down list will be displayed instead of the default list', '6', '3', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_MANUFACTURERS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } @@ -103,7 +104,7 @@ function remove() { } function keys() { - return array('MODULE_BOXES_MANUFACTURERS_STATUS', 'MODULE_BOXES_MANUFACTURERS_CONTENT_PLACEMENT', 'MODULE_BOXES_MANUFACTURERS_SORT_ORDER'); + return array('MODULE_BOXES_MANUFACTURERS_STATUS', 'MODULE_BOXES_MANUFACTURERS_CONTENT_PLACEMENT', 'MODULE_BOXES_MANUFACTURERS_MAX_LIST', 'MODULE_BOXES_MANUFACTURERS_SORT_ORDER'); } } -?> + \ No newline at end of file diff --git a/includes/modules/boxes/bm_product_social_bookmarks.php b/includes/modules/boxes/bm_product_social_bookmarks.php deleted file mode 100644 index 2904301ed..000000000 --- a/includes/modules/boxes/bm_product_social_bookmarks.php +++ /dev/null @@ -1,88 +0,0 @@ -title = MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_TITLE; - $this->description = MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_DESCRIPTION; - - if ( defined('MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_STATUS') ) { - $this->sort_order = MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_SORT_ORDER; - $this->enabled = (MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_STATUS == 'True'); - - $this->group = ((MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); - } - } - - function execute() { - global $language, $oscTemplate; - - if ( isset($_GET['products_id']) && defined('MODULE_SOCIAL_BOOKMARKS_INSTALLED') && tep_not_null(MODULE_SOCIAL_BOOKMARKS_INSTALLED) ) { - $sbm_array = explode(';', MODULE_SOCIAL_BOOKMARKS_INSTALLED); - - $social_bookmarks = array(); - - foreach ( $sbm_array as $sbm ) { - $class = substr($sbm, 0, strrpos($sbm, '.')); - - if ( !class_exists($class) ) { - include('includes/languages/' . $language . '/modules/social_bookmarks/' . $sbm); - include('includes/modules/social_bookmarks/' . $class . '.php'); - } - - $sb = new $class(); - - if ( $sb->isEnabled() ) { - $social_bookmarks[] = $sb->getOutput(); - } - } - - if ( !empty($social_bookmarks) ) { - - ob_start(); - include('includes/modules/boxes/templates/tpl_' . basename(__FILE__)); - $data = ob_get_clean(); - - $oscTemplate->addBlock($data, $this->group); - } - } - } - - function isEnabled() { - return $this->enabled; - } - - function check() { - return defined('MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_STATUS'); - } - - function install() { - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Product Social Bookmarks Module', 'MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); - } - - function remove() { - tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); - } - - function keys() { - return array('MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_STATUS', 'MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_CONTENT_PLACEMENT', 'MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_SORT_ORDER'); - } - } diff --git a/includes/modules/boxes/templates/tpl_bm_manufacturers.php b/includes/modules/boxes/templates/tpl_bm_manufacturers.php index f1c5978e2..e091f2c3a 100644 --- a/includes/modules/boxes/templates/tpl_bm_manufacturers.php +++ b/includes/modules/boxes/templates/tpl_bm_manufacturers.php @@ -1,8 +1,6 @@
    -
      - -
    +
    map_to_template($tpl_data['file'])); + + $GLOBALS['oscTemplate']->addContent(ob_get_clean(), $tpl_data['group']); diff --git a/includes/modules/content/index_products/cm_ip_category_manufacturer_description.php b/includes/modules/content/index_products/cm_ip_category_manufacturer_description.php index 907345166..f39c8a594 100644 --- a/includes/modules/content/index_products/cm_ip_category_manufacturer_description.php +++ b/includes/modules/content/index_products/cm_ip_category_manufacturer_description.php @@ -37,15 +37,12 @@ function __construct() { } function execute() { - global $oscTemplate, $current_category_id, $languages_id, $OSCOM_category; + global $oscTemplate, $current_category_id, $languages_id, $OSCOM_category, $brand; $content_width = MODULE_CONTENT_IP_CATEGORY_DESCRIPTION_CONTENT_WIDTH; if (isset($_GET['manufacturers_id']) && !empty($_GET['manufacturers_id'])) { - $manufacturer_query = tep_db_query("select manufacturers_description from manufacturers_info where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'"); - $manufacturer = tep_db_fetch_array($manufacturer_query); - - $cm_description = $manufacturer['manufacturers_description']; + $cm_description = $brand->getData('manufacturers_description'); } else { $cm_description = $OSCOM_category->getData($current_category_id, 'description'); } diff --git a/includes/modules/content/index_products/cm_ip_title.php b/includes/modules/content/index_products/cm_ip_title.php index fd806cd9f..538c9d41c 100644 --- a/includes/modules/content/index_products/cm_ip_title.php +++ b/includes/modules/content/index_products/cm_ip_title.php @@ -37,16 +37,13 @@ function __construct() { } function execute() { - global $oscTemplate, $current_category_id, $OSCOM_category; + global $oscTemplate, $current_category_id, $OSCOM_category, $brand; $content_width = MODULE_CONTENT_IP_TITLE_CONTENT_WIDTH; if (isset($_GET['manufacturers_id']) && !empty($_GET['manufacturers_id'])) { - $manufacturer_query = tep_db_query("select manufacturers_image, manufacturers_name from manufacturers where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"); - $manufacturer = tep_db_fetch_array($manufacturer_query); - - $cm_name = $manufacturer['manufacturers_name']; - $cm_image = $manufacturer['manufacturers_image']; + $cm_name = $brand->getData('manufacturers_name'); + $cm_image = $brand->getData('manufacturers_image'); } else { $cm_name = $OSCOM_category->getData($current_category_id, 'name'); $cm_image = $OSCOM_category->getData($current_category_id, 'image'); diff --git a/includes/modules/content/product_info/cm_pi_options_attributes.php b/includes/modules/content/product_info/cm_pi_options_attributes.php index 76baa0d6c..df0d49fe0 100644 --- a/includes/modules/content/product_info/cm_pi_options_attributes.php +++ b/includes/modules/content/product_info/cm_pi_options_attributes.php @@ -37,7 +37,7 @@ function __construct() { } function execute() { - global $oscTemplate, $languages_id, $currencies, $product_info; + global $oscTemplate, $languages_id, $currencies, $product_info, $cart; $content_width = (int)MODULE_CONTENT_PI_OA_CONTENT_WIDTH; $options_output = null; diff --git a/includes/modules/content/testimonials/cm_t_list.php b/includes/modules/content/testimonials/cm_t_list.php new file mode 100644 index 000000000..1359c99d6 --- /dev/null +++ b/includes/modules/content/testimonials/cm_t_list.php @@ -0,0 +1,96 @@ +code = get_class($this); + $this->group = basename(dirname(__FILE__)); + + $this->title = MODULE_CONTENT_TESTIMONIALS_LIST_TITLE; + $this->description = MODULE_CONTENT_TESTIMONIALS_LIST_DESCRIPTION; + $this->description .= '
    ' . MODULE_CONTENT_BOOTSTRAP_ROW_DESCRIPTION . '
    '; + + if ( defined('MODULE_CONTENT_TESTIMONIALS_LIST_STATUS') ) { + $this->sort_order = MODULE_CONTENT_TESTIMONIALS_LIST_SORT_ORDER; + $this->enabled = (MODULE_CONTENT_TESTIMONIALS_LIST_STATUS == 'True'); + } + } + + function execute() { + global $oscTemplate, $languages_id; + + $content_width = MODULE_CONTENT_TESTIMONIALS_LIST_CONTENT_WIDTH; + $item_width = MODULE_CONTENT_TESTIMONIALS_LIST_CONTENT_WIDTH_EACH; + + $testimonials_query_raw = "select t.testimonials_id, td.testimonials_text, t.date_added, t.customers_name from testimonials t, testimonials_description td where t.testimonials_id = td.testimonials_id "; + if (MODULE_CONTENT_TESTIMONIALS_LIST_ALL == 'All') { + $testimonials_query_raw .= "and td.languages_id = '" . (int)$languages_id . "' "; + } + $testimonials_query_raw .= "and testimonials_status = 1 order by t.testimonials_id DESC"; + + $testimonials_split = new splitPageResults($testimonials_query_raw, MODULE_CONTENT_TESTIMONIALS_LIST_PAGING); + + if ($testimonials_split->number_of_rows > 0) { + $testimonials_query = tep_db_query($testimonials_split->sql_query); + + ob_start(); + include('includes/modules/content/' . $this->group . '/templates/tpl_' . basename(__FILE__)); + $template = ob_get_clean(); + } + else { + $template = '
    '; + $template .= ''; + $template .= '
    '; + } + + $oscTemplate->addContent($template, $this->group); + } + + function isEnabled() { + return $this->enabled; + } + + function check() { + return defined('MODULE_CONTENT_TESTIMONIALS_LIST_STATUS'); + } + + function install() { + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable List Module', 'MODULE_CONTENT_TESTIMONIALS_LIST_STATUS', 'True', 'Do you want to enable this module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_TESTIMONIALS_LIST_CONTENT_WIDTH', '12', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('View Testimonials', 'MODULE_CONTENT_TESTIMONIALS_LIST_ALL', 'All', 'Do you want to show all Testimonials or language specific Testimonials?', '6', '1', 'tep_cfg_select_option(array(\'All\', \'Language Specific\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Number of Testimonials', 'MODULE_CONTENT_TESTIMONIALS_LIST_PAGING', '12', 'How many Testimonials to display per page.', '6', '5', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Item Width', 'MODULE_CONTENT_TESTIMONIALS_LIST_CONTENT_WIDTH_EACH', '6', 'What width container should the each Testimonial be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_TESTIMONIALS_LIST_SORT_ORDER', '200', 'Sort order of display. Lowest is displayed first.', '6', '5', now())"); + } + + function remove() { + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + } + + function keys() { + return array('MODULE_CONTENT_TESTIMONIALS_LIST_STATUS', 'MODULE_CONTENT_TESTIMONIALS_LIST_CONTENT_WIDTH', 'MODULE_CONTENT_TESTIMONIALS_LIST_ALL', 'MODULE_CONTENT_TESTIMONIALS_LIST_PAGING', 'MODULE_CONTENT_TESTIMONIALS_LIST_CONTENT_WIDTH_EACH', 'MODULE_CONTENT_TESTIMONIALS_LIST_SORT_ORDER'); + } + } + \ No newline at end of file diff --git a/includes/modules/content/testimonials/cm_t_title.php b/includes/modules/content/testimonials/cm_t_title.php new file mode 100644 index 000000000..a47a24d23 --- /dev/null +++ b/includes/modules/content/testimonials/cm_t_title.php @@ -0,0 +1,74 @@ +code = get_class($this); + $this->group = basename(dirname(__FILE__)); + + $this->title = MODULE_CONTENT_TESTIMONIALS_TITLE_TITLE; + $this->description = MODULE_CONTENT_TESTIMONIALS_TITLE_DESCRIPTION; + $this->description .= '
    ' . MODULE_CONTENT_BOOTSTRAP_ROW_DESCRIPTION . '
    '; + + if ( defined('MODULE_CONTENT_TESTIMONIALS_TITLE_STATUS') ) { + $this->sort_order = MODULE_CONTENT_TESTIMONIALS_TITLE_SORT_ORDER; + $this->enabled = (MODULE_CONTENT_TESTIMONIALS_TITLE_STATUS == 'True'); + } + } + + function execute() { + global $oscTemplate; + + $content_width = MODULE_CONTENT_TESTIMONIALS_TITLE_CONTENT_WIDTH; + + ob_start(); + include('includes/modules/content/' . $this->group . '/templates/tpl_' . basename(__FILE__)); + $template = ob_get_clean(); + + $oscTemplate->addContent($template, $this->group); + + } + + function isEnabled() { + return $this->enabled; + } + + function check() { + return defined('MODULE_CONTENT_TESTIMONIALS_TITLE_STATUS'); + } + + function install() { + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Title Module', 'MODULE_CONTENT_TESTIMONIALS_TITLE_STATUS', 'True', 'Do you want to enable this module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_TESTIMONIALS_TITLE_CONTENT_WIDTH', '12', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_TESTIMONIALS_TITLE_SORT_ORDER', '100', 'Sort order of display. Lowest is displayed first.', '6', '5', now())"); + } + + function remove() { + tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); + } + + function keys() { + return array('MODULE_CONTENT_TESTIMONIALS_TITLE_STATUS', 'MODULE_CONTENT_TESTIMONIALS_TITLE_CONTENT_WIDTH', 'MODULE_CONTENT_TESTIMONIALS_TITLE_SORT_ORDER'); + } + } + \ No newline at end of file diff --git a/includes/modules/content/testimonials/templates/tpl_cm_t_list.php b/includes/modules/content/testimonials/templates/tpl_cm_t_list.php new file mode 100644 index 000000000..6c617162f --- /dev/null +++ b/includes/modules/content/testimonials/templates/tpl_cm_t_list.php @@ -0,0 +1,40 @@ +
    +
    + ' . PHP_EOL; + echo '
    ' . PHP_EOL; + echo '

    ' . tep_output_string_protected($testimonials['testimonials_text']) . '

    ' . PHP_EOL; + echo '
    ' . sprintf(MODULE_CONTENT_TESTIMONIALS_LIST_WRITERS_NAME_DATE, tep_output_string_protected($testimonials['customers_name']), tep_date_short($testimonials['date_added'])) . '
    ' . PHP_EOL; + echo '
    ' . PHP_EOL; + echo '
    ' . PHP_EOL; + } + ?> +
    +
    +
    + display_count(TEXT_DISPLAY_NUMBER_OF_TESTIMONIALS); ?> +
    +
    + display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?> +
    +
    +
    + + + \ No newline at end of file diff --git a/includes/modules/boxes/templates/tpl_bm_card_acceptance.php b/includes/modules/content/testimonials/templates/tpl_cm_t_title.php similarity index 86% rename from includes/modules/boxes/templates/tpl_bm_card_acceptance.php rename to includes/modules/content/testimonials/templates/tpl_cm_t_title.php index fbb4eb6af..176af3099 100644 --- a/includes/modules/boxes/templates/tpl_bm_card_acceptance.php +++ b/includes/modules/content/testimonials/templates/tpl_cm_t_title.php @@ -1,11 +1,10 @@ -
    -
    -
    +
    +

    + \ No newline at end of file diff --git a/includes/modules/header_tags/ht_manufacturer_seo.php b/includes/modules/header_tags/ht_manufacturer_seo.php index b45bb6a16..309a8ad16 100644 --- a/includes/modules/header_tags/ht_manufacturer_seo.php +++ b/includes/modules/header_tags/ht_manufacturer_seo.php @@ -29,18 +29,18 @@ function __construct() { } function execute() { - global $PHP_SELF, $oscTemplate, $manufacturers, $languages_id; + global $PHP_SELF, $oscTemplate, $manufacturers, $languages_id, $brand; if (basename($PHP_SELF) == 'index.php') { if (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) { - $meta_info_query = tep_db_query("select manufacturers_seo_description, manufacturers_seo_keywords from manufacturers_info where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'"); - $meta_info = tep_db_fetch_array($meta_info_query); + $brand_seo_description = $brand->getData('manufacturers_seo_description'); + $brand_seo_keywords = $brand->getData('manufacturers_seo_keywords'); - if (tep_not_null($meta_info['manufacturers_seo_description'])) { - $oscTemplate->addBlock('' . PHP_EOL, $this->group); + if (tep_not_null($brand_seo_description)) { + $oscTemplate->addBlock('' . PHP_EOL, $this->group); } - if ( (tep_not_null($meta_info['manufacturers_seo_keywords'])) && (MODULE_HEADER_TAGS_MANUFACTURERS_SEO_KEYWORDS_STATUS == 'True') ) { - $oscTemplate->addBlock('' . PHP_EOL, $this->group); + if ( (tep_not_null($brand_seo_keywords)) && (MODULE_HEADER_TAGS_MANUFACTURERS_SEO_KEYWORDS_STATUS == 'True') ) { + $oscTemplate->addBlock('' . PHP_EOL, $this->group); } } } diff --git a/includes/modules/header_tags/ht_manufacturer_title.php b/includes/modules/header_tags/ht_manufacturer_title.php index 7fdaad0b2..46645ea2d 100755 --- a/includes/modules/header_tags/ht_manufacturer_title.php +++ b/includes/modules/header_tags/ht_manufacturer_title.php @@ -29,20 +29,18 @@ function __construct() { } function execute() { - global $PHP_SELF, $oscTemplate, $manufacturers, $languages_id; + global $PHP_SELF, $oscTemplate, $manufacturers, $languages_id, $brand; if (basename($PHP_SELF) == 'index.php') { if (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) { - $manufacturers_query = tep_db_query("select m.manufacturers_name, mi.manufacturers_seo_title from manufacturers m, manufacturers_info mi where m.manufacturers_id = mi.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "'"); - if (tep_db_num_rows($manufacturers_query)) { - $manufacturers = tep_db_fetch_array($manufacturers_query); - - if ( tep_not_null($manufacturers['manufacturers_seo_title']) && (MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_TITLE_OVERRIDE == 'True') ) { - $oscTemplate->setTitle($manufacturers['manufacturers_seo_title'] . MODULE_HEADER_TAGS_MANUFACTURER_SEO_SEPARATOR . $oscTemplate->getTitle()); - } - else { - $oscTemplate->setTitle($manufacturers['manufacturers_name'] . MODULE_HEADER_TAGS_MANUFACTURER_SEO_SEPARATOR . $oscTemplate->getTitle()); - } + $brand_seo_title = $brand->getData('manufacturers_seo_title'); + $brand_name = $brand->getData('manufacturers_name'); + + if ( tep_not_null($brand_seo_title) && (MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_TITLE_OVERRIDE == 'True') ) { + $oscTemplate->setTitle($brand_seo_title . MODULE_HEADER_TAGS_MANUFACTURER_SEO_SEPARATOR . $oscTemplate->getTitle()); + } + else { + $oscTemplate->setTitle($brand_name . MODULE_HEADER_TAGS_MANUFACTURER_SEO_SEPARATOR . $oscTemplate->getTitle()); } } } diff --git a/includes/modules/navbar_modules/templates/tpl_nb_languages.php b/includes/modules/navbar_modules/templates/tpl_nb_languages.php index 8abcbf662..300f880c6 100644 --- a/includes/modules/navbar_modules/templates/tpl_nb_languages.php +++ b/includes/modules/navbar_modules/templates/tpl_nb_languages.php @@ -8,7 +8,7 @@ $lng = new language; } ?> -