From 2b2a12a71d37940e3fee838ff68b18b9eef90c76 Mon Sep 17 00:00:00 2001 From: gburton Date: Wed, 23 Oct 2019 13:05:21 +0100 Subject: [PATCH 1/9] New style Categories page for Admin Makes it a lot more flexible. --- admin/categories.php | 442 +++++++++--------- .../includes/languages/english/categories.php | 8 +- 2 files changed, 218 insertions(+), 232 deletions(-) diff --git a/admin/categories.php b/admin/categories.php index e16484d9b..dfb4db5df 100755 --- a/admin/categories.php +++ b/admin/categories.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2015 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ @@ -17,6 +17,8 @@ $action = (isset($_GET['action']) ? $_GET['action'] : ''); + $OSCOM_Hooks->call('categories', 'productPreAction'); + if (tep_not_null($action)) { switch ($action) { case 'setflag': @@ -41,7 +43,7 @@ $sql_data_array = array_merge($sql_data_array, $insert_sql_data); - tep_db_perform(TABLE_CATEGORIES, $sql_data_array); + tep_db_perform('categories', $sql_data_array); $categories_id = tep_db_insert_id(); } elseif ($action == 'update_category') { @@ -49,7 +51,7 @@ $sql_data_array = array_merge($sql_data_array, $update_sql_data); - tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "'"); + tep_db_perform('categories', $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "'"); } $languages = tep_get_languages(); @@ -74,9 +76,9 @@ $sql_data_array = array_merge($sql_data_array, $insert_sql_data); - tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array); + tep_db_perform('categories_description', $sql_data_array); } elseif ($action == 'update_category') { - tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); + tep_db_perform('categories_description', $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); } } @@ -84,7 +86,7 @@ $categories_image->set_destination(DIR_FS_CATALOG_IMAGES); if ($categories_image->parse() && $categories_image->save()) { - tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); + tep_db_query("update categories set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } tep_redirect(tep_href_link('categories.php', 'cPath=' . $cPath . '&cID=' . $categories_id)); @@ -98,7 +100,7 @@ $products_delete = array(); for ($i=0, $n=sizeof($categories); $i<$n; $i++) { - $product_ids_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$categories[$i]['id'] . "'"); + $product_ids_query = tep_db_query("select products_id from products_to_categories where categories_id = '" . (int)$categories[$i]['id'] . "'"); while ($product_ids = tep_db_fetch_array($product_ids_query)) { $products[$product_ids['products_id']]['categories'][] = $categories[$i]['id']; @@ -113,7 +115,7 @@ } $category_ids = substr($category_ids, 0, -2); - $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$key . "' and categories_id not in (" . $category_ids . ")"); + $check_query = tep_db_query("select count(*) as total from products_to_categories where products_id = '" . (int)$key . "' and categories_id not in (" . $category_ids . ")"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { $products_delete[$key] = $key; @@ -139,10 +141,10 @@ $product_categories = $_POST['product_categories']; for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) { - tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "' and categories_id = '" . (int)$product_categories[$i] . "'"); + tep_db_query("delete from products_to_categories where products_id = '" . (int)$product_id . "' and categories_id = '" . (int)$product_categories[$i] . "'"); } - $product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'"); + $product_categories_query = tep_db_query("select count(*) as total from products_to_categories where products_id = '" . (int)$product_id . "'"); $product_categories = tep_db_fetch_array($product_categories_query); if ($product_categories['total'] == '0') { @@ -150,6 +152,8 @@ } } + $OSCOM_Hooks->call('categories', 'productActionDelete'); + tep_redirect(tep_href_link('categories.php', 'cPath=' . $cPath)); break; case 'move_category_confirm': @@ -164,7 +168,7 @@ tep_redirect(tep_href_link('categories.php', 'cPath=' . $cPath . '&cID=' . $categories_id)); } else { - tep_db_query("update " . TABLE_CATEGORIES . " set parent_id = '" . (int)$new_parent_id . "', last_modified = now() where categories_id = '" . (int)$categories_id . "'"); + tep_db_query("update categories set parent_id = '" . (int)$new_parent_id . "', last_modified = now() where categories_id = '" . (int)$categories_id . "'"); tep_redirect(tep_href_link('categories.php', 'cPath=' . $new_parent_id . '&cID=' . $categories_id)); } @@ -175,9 +179,11 @@ $products_id = tep_db_prepare_input($_POST['products_id']); $new_parent_id = tep_db_prepare_input($_POST['move_to_category_id']); - $duplicate_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$new_parent_id . "'"); + $duplicate_check_query = tep_db_query("select count(*) as total from products_to_categories where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$new_parent_id . "'"); $duplicate_check = tep_db_fetch_array($duplicate_check_query); - if ($duplicate_check['total'] < 1) tep_db_query("update " . TABLE_PRODUCTS_TO_CATEGORIES . " set categories_id = '" . (int)$new_parent_id . "' where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$current_category_id . "'"); + if ($duplicate_check['total'] < 1) tep_db_query("update products_to_categories set categories_id = '" . (int)$new_parent_id . "' where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$current_category_id . "'"); + + $OSCOM_Hooks->call('categories', 'productActionMove'); tep_redirect(tep_href_link('categories.php', 'cPath=' . $new_parent_id . '&pID=' . $products_id)); break; @@ -209,16 +215,16 @@ $sql_data_array = array_merge($sql_data_array, $insert_sql_data); - tep_db_perform(TABLE_PRODUCTS, $sql_data_array); + tep_db_perform('products', $sql_data_array); $products_id = tep_db_insert_id(); - tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')"); + tep_db_query("insert into products_to_categories (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')"); } elseif ($action == 'update_product') { $update_sql_data = array('products_last_modified' => 'now()'); $sql_data_array = array_merge($sql_data_array, $update_sql_data); - tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'"); + tep_db_perform('products', $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'"); } $languages = tep_get_languages(); @@ -238,9 +244,9 @@ $sql_data_array = array_merge($sql_data_array, $insert_sql_data); - tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array); + tep_db_perform('products_description', $sql_data_array); } elseif ($action == 'update_product') { - tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'"); + tep_db_perform('products_description', $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'"); } } @@ -261,7 +267,7 @@ $sql_data_array['image'] = tep_db_prepare_input($t->filename); } - tep_db_perform(TABLE_PRODUCTS_IMAGES, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and id = '" . (int)$matches[1] . "'"); + tep_db_perform('products_images', $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and id = '" . (int)$matches[1] . "'"); $piArray[] = (int)$matches[1]; } elseif (preg_match('/^products_image_large_new_([0-9]+)$/', $key, $matches)) { @@ -277,17 +283,17 @@ $sql_data_array['image'] = tep_db_prepare_input($t->filename); $sql_data_array['sort_order'] = $pi_sort_order; - tep_db_perform(TABLE_PRODUCTS_IMAGES, $sql_data_array); + tep_db_perform('products_images', $sql_data_array); $piArray[] = tep_db_insert_id(); } } } - $product_images_query = tep_db_query("select image from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$products_id . "' and id not in (" . implode(',', $piArray) . ")"); + $product_images_query = tep_db_query("select image from products_images where products_id = '" . (int)$products_id . "' and id not in (" . implode(',', $piArray) . ")"); if (tep_db_num_rows($product_images_query)) { while ($product_images = tep_db_fetch_array($product_images_query)) { - $duplicate_image_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_IMAGES . " where image = '" . tep_db_input($product_images['image']) . "'"); + $duplicate_image_query = tep_db_query("select count(*) as total from products_images where image = '" . tep_db_input($product_images['image']) . "'"); $duplicate_image = tep_db_fetch_array($duplicate_image_query); if ($duplicate_image['total'] < 2) { @@ -297,9 +303,11 @@ } } - tep_db_query("delete from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$products_id . "' and id not in (" . implode(',', $piArray) . ")"); + tep_db_query("delete from products_images where products_id = '" . (int)$products_id . "' and id not in (" . implode(',', $piArray) . ")"); } + $OSCOM_Hooks->call('categories', 'productActionSave'); + tep_redirect(tep_href_link('categories.php', 'cPath=' . $cPath . '&pID=' . $products_id)); break; case 'copy_to_confirm': @@ -309,41 +317,45 @@ if ($_POST['copy_as'] == 'link') { if ($categories_id != $current_category_id) { - $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "'"); + $check_query = tep_db_query("select count(*) as total from products_to_categories where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { - tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$categories_id . "')"); + tep_db_query("insert into products_to_categories (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$categories_id . "')"); } } else { $messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error'); } } elseif ($_POST['copy_as'] == 'duplicate') { - $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id, products_gtin from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); + $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id, products_gtin from products where products_id = '" . (int)$products_id . "'"); $product = tep_db_fetch_array($product_query); - tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_gtin) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "', '" . tep_db_input($product['products_gtin']) . "')"); + tep_db_query("insert into products (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_gtin) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "', '" . tep_db_input($product['products_gtin']) . "')"); $dup_products_id = tep_db_insert_id(); - $description_query = tep_db_query("select language_id, products_name, products_description, products_url, products_seo_title, products_seo_description, products_seo_keywords from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'"); + $description_query = tep_db_query("select language_id, products_name, products_description, products_url, products_seo_title, products_seo_description, products_seo_keywords from products_description where products_id = '" . (int)$products_id . "'"); while ($description = tep_db_fetch_array($description_query)) { - tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_url, products_viewed, products_seo_title, products_seo_description, products_seo_keywords) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0', '" . tep_db_input($description['products_seo_title']) . "', '" . tep_db_input($description['products_seo_description']) . "', '" . tep_db_input($description['products_seo_keywords']) . "')"); + tep_db_query("insert into products_description (products_id, language_id, products_name, products_description, products_url, products_viewed, products_seo_title, products_seo_description, products_seo_keywords) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0', '" . tep_db_input($description['products_seo_title']) . "', '" . tep_db_input($description['products_seo_description']) . "', '" . tep_db_input($description['products_seo_keywords']) . "')"); } - $product_images_query = tep_db_query("select image, htmlcontent, sort_order from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$products_id . "'"); + $product_images_query = tep_db_query("select image, htmlcontent, sort_order from products_images where products_id = '" . (int)$products_id . "'"); while ($product_images = tep_db_fetch_array($product_images_query)) { - tep_db_query("insert into " . TABLE_PRODUCTS_IMAGES . " (products_id, image, htmlcontent, sort_order) values ('" . (int)$dup_products_id . "', '" . tep_db_input($product_images['image']) . "', '" . tep_db_input($product_images['htmlcontent']) . "', '" . tep_db_input($product_images['sort_order']) . "')"); + tep_db_query("insert into products_images (products_id, image, htmlcontent, sort_order) values ('" . (int)$dup_products_id . "', '" . tep_db_input($product_images['image']) . "', '" . tep_db_input($product_images['htmlcontent']) . "', '" . tep_db_input($product_images['sort_order']) . "')"); } - tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')"); + tep_db_query("insert into products_to_categories (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')"); $products_id = $dup_products_id; } } + $OSCOM_Hooks->call('categories', 'productActionCopy'); + tep_redirect(tep_href_link('categories.php', 'cPath=' . $categories_id . '&pID=' . $products_id)); break; } } + $OSCOM_Hooks->call('categories', 'productPostAction'); + // check if the catalog image directory exists if (is_dir(DIR_FS_CATALOG_IMAGES)) { if (!tep_is_writable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); @@ -353,23 +365,25 @@ require('includes/template_top.php'); + $base_url = ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_ADMIN : HTTP_SERVER . DIR_WS_ADMIN; + if ($action == 'new_product') { $parameters = array('products_name' => '', - 'products_description' => '', - 'products_url' => '', - 'products_id' => '', - 'products_quantity' => '', - 'products_model' => '', - 'products_image' => '', - 'products_larger_images' => array(), - 'products_price' => '', - 'products_weight' => '', - 'products_date_added' => '', - 'products_last_modified' => '', - 'products_date_available' => '', - 'products_status' => '', - 'products_tax_class_id' => '', - 'manufacturers_id' => ''); + 'products_description' => '', + 'products_url' => '', + 'products_id' => '', + 'products_quantity' => '', + 'products_model' => '', + 'products_image' => '', + 'products_larger_images' => array(), + 'products_price' => '', + 'products_weight' => '', + 'products_date_added' => '', + 'products_last_modified' => '', + 'products_date_available' => '', + 'products_status' => '', + 'products_tax_class_id' => '', + 'manufacturers_id' => ''); $parameters['products_gtin'] = ''; $parameters['products_seo_description'] = ''; $parameters['products_seo_keywords'] = ''; @@ -378,12 +392,12 @@ $pInfo = new objectInfo($parameters); if (isset($_GET['pID']) && empty($_POST)) { - $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id, p.products_gtin from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$_GET['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); + $product_query = tep_db_query("select pd.*, p.*, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available from products p, products_description pd where p.products_id = '" . (int)$_GET['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $pInfo->objectInfo($product); - $product_images_query = tep_db_query("select id, image, htmlcontent, sort_order from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product['products_id'] . "' order by sort_order"); + $product_images_query = tep_db_query("select id, image, htmlcontent, sort_order from products_images where products_id = '" . (int)$product['products_id'] . "' order by sort_order"); while ($product_images = tep_db_fetch_array($product_images_query)) { $pInfo->products_larger_images[] = array('id' => $product_images['id'], 'image' => $product_images['image'], @@ -393,14 +407,14 @@ } $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE)); - $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); + $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from manufacturers order by manufacturers_name"); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']); } $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE)); - $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title"); + $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from tax_class order by tax_class_title"); while ($tax_class = tep_db_fetch_array($tax_class_query)) { $tax_class_array[] = array('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']); @@ -417,7 +431,7 @@ $form_action = (isset($_GET['pID'])) ? 'update_product' : 'insert_product'; ?> - - - - - - - - - - - - - - - - - - - - call('categories', 'productTab'); ?> - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +

+ +
+
    +
  • ' . SECTION_HEADING_GENERAL . ''; ?>
  • +
  • ' . SECTION_HEADING_DATA . ''; ?>
  • +
  • ' . SECTION_HEADING_IMAGES . ''; ?>
  • +
+ +
- - + + + - - - - - + +
+
products_date_available, 'id="products_date_available"') . ' (YYYY-MM-DD)'; ?>
manufacturers_id); ?>
products_id) ? '' : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?>
products_id) ? '' : tep_get_products_seo_title($pInfo->products_id, $languages[$i]['id'])), 'style="width: 500px;"'); ?>
- - - - - - - - - - - - - + + - - - - + + - - - + + - - - - - - + + + + + + + - - - - - - + + + - - -
products_tax_class_id, 'onchange="updateGross()"'); ?>
products_price, 'onkeyup="updateGross()"'); ?>
products_price, 'onkeyup="updateNet()"'); ?>products_id) ? '' : tep_get_products_name($pInfo->products_id, $languages[$i]['id'])), 'style="width: 500px;"'); ?>
- - - - -
 products_id) ? '' : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?>
products_id) ? '' : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?>
products_quantity); ?>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . ''; ?>products_id, $languages[$i]['id'])), 'style="width: 500px;"'); ?>
products_model); ?>
products_id) ? '' : tep_get_products_seo_title($pInfo->products_id, $languages[$i]['id'])), 'style="width: 500px;"'); ?>
products_id) ? '' : tep_get_products_seo_description($pInfo->products_id, $languages[$i]['id']))); ?>
products_gtin); ?>
products_id, $languages[$i]['id']), 'style="width: 500px;" placeholder="' . PLACEHOLDER_COMMA_SEPARATION . '"'); ?>
-
' . TEXT_PRODUCTS_MAIN_IMAGE . ' (' . SMALL_IMAGE_WIDTH . ' x ' . SMALL_IMAGE_HEIGHT . 'px)
' . (tep_not_null($pInfo->products_image) ? '' . $pInfo->products_image . ' | ' : '') . tep_draw_file_field('products_image'); ?>
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
products_date_available, 'id="products_date_available" style="width: 500px;"') . ' (YYYY-MM-DD)'; ?>
manufacturers_id, 'style="width: 500px;"'); ?>
products_tax_class_id, 'style="width: 500px;" onchange="updateGross()"'); ?>
products_price, 'style="width: 200px;" onkeyup="updateGross()"'); ?>
products_price, 'style="width: 200px;" onkeyup="updateNet()"'); ?>
products_quantity, 'style="width: 200px;"'); ?>
products_model, 'style="width: 500px;"'); ?>
products_weight, 'style="width: 200px;"'); ?>
products_gtin, 'style="width: 500px;"'); ?>
+
-
    +
    +
    ' . TEXT_PRODUCTS_MAIN_IMAGE . '
    ' . (tep_not_null($pInfo->products_image) ? '' . $pInfo->products_image . ' | ' : '') . tep_draw_file_field('products_image'); ?>
    + +
      products_larger_images as $pi) { $pi_counter++; - echo '
    • ' . TEXT_PRODUCTS_LARGE_IMAGE . '
      ' . tep_draw_file_field('products_image_large_' . $pi['id']) . '
      ' . $pi['image'] . '

      ' . TEXT_PRODUCTS_LARGE_IMAGE_HTML_CONTENT . '
      ' . tep_draw_textarea_field('products_image_htmlcontent_' . $pi['id'], 'soft', '70', '3', $pi['htmlcontent']) . '
    • '; + echo '
    • ' . TEXT_PRODUCTS_LARGE_IMAGE . '
      ' . tep_draw_file_field('products_image_large_' . $pi['id']) . '
      ' . $pi['image'] . '

      ' . TEXT_PRODUCTS_LARGE_IMAGE_HTML_CONTENT . '
      ' . tep_draw_textarea_field('products_image_htmlcontent_' . $pi['id'], 'soft', '70', '3', $pi['htmlcontent']) . '
    • '; } ?> -
    - - +
+ +
+ +

@@ -648,85 +680,33 @@ function showPiDelConfirm(piId) { $('#piDelConfirm').dialog('open'); } +
-
' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . ''; ?>products_id, $languages[$i]['id']))); ?>
products_weight); ?>
- - - - -
 products_id) ? '' : tep_get_products_seo_description($pInfo->products_id, $languages[$i]['id']))); ?>
- - - - -
 products_id, $languages[$i]['id']), 'placeholder="' . PLACEHOLDER_COMMA_SEPARATION . '" style="width: 300px;"'); ?>
- - - - - - products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('categories.php', 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : ''))); ?> - - - +
+ products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('categories.php', 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : ''))); ?> +
+ Date: Wed, 23 Oct 2019 13:10:14 +0100 Subject: [PATCH 2/9] Introduce Bootstrap into Admin --- admin/includes/functions/html_output.php | 62 ++++++++++++++++++- admin/includes/template_top.php | 2 + includes/hooks/admin/siteWide/bootStrap.php | 38 ++++++++++++ includes/hooks/admin/siteWide/fontAwesome.php | 29 +++++++++ 4 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 includes/hooks/admin/siteWide/bootStrap.php create mode 100644 includes/hooks/admin/siteWide/fontAwesome.php diff --git a/admin/includes/functions/html_output.php b/admin/includes/functions/html_output.php index b96e70821..d35cd1a6d 100755 --- a/admin/includes/functions/html_output.php +++ b/admin/includes/functions/html_output.php @@ -430,4 +430,64 @@ function tep_draw_button($title = null, $icon = null, $link = null, $priority = return $button; } -?> + +//// +// Output a Bootstrap Button + function tep_draw_bootstrap_button($title = null, $icon = null, $link = null, $priority = null, $params = null, $style = null) { + $types = array('submit', 'button', 'reset'); + + if ( !is_array($params) ) $params = array(); + + if ( !isset($params['type']) ) { + $params['type'] = 'submit'; + } + + if ( !in_array($params['type'], $types) ) { + $params['type'] = 'submit'; + } + + if ( ($params['type'] == 'submit') && isset($link) ) { + $params['type'] = 'button'; + } + + if (!isset($priority)) { + $priority = 'secondary'; + } + + $button = NULL; + + if ( ($params['type'] == 'button') && isset($link) ) { + $button .= ''; + } else { + $button .= ''; + } + + return $button; + } \ No newline at end of file diff --git a/admin/includes/template_top.php b/admin/includes/template_top.php index b9784fe2d..8012d85d2 100755 --- a/admin/includes/template_top.php +++ b/admin/includes/template_top.php @@ -23,6 +23,8 @@ call('siteWide', 'injectSiteStart'); + if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) { ?> diff --git a/includes/hooks/admin/siteWide/bootStrap.php b/includes/hooks/admin/siteWide/bootStrap.php new file mode 100644 index 000000000..eec99918c --- /dev/null +++ b/includes/hooks/admin/siteWide/bootStrap.php @@ -0,0 +1,38 @@ +sitestart .= '' . PHP_EOL; + $this->sitestart .= '' . PHP_EOL; + + return $this->sitestart; + } + + function listen_injectSiteEnd() { + $this->siteend .= '' . PHP_EOL; + $this->siteend .= '' . PHP_EOL; + $this->siteend .= '' . PHP_EOL; + + return $this->siteend; + } + +} diff --git a/includes/hooks/admin/siteWide/fontAwesome.php b/includes/hooks/admin/siteWide/fontAwesome.php new file mode 100644 index 000000000..360a75324 --- /dev/null +++ b/includes/hooks/admin/siteWide/fontAwesome.php @@ -0,0 +1,29 @@ +sitestart .= '' . PHP_EOL; + $this->sitestart .= '' . PHP_EOL; + + return $this->sitestart; + } + +} From e3594ddf992e1a3ddf34ce8823463ee321ecc5a8 Mon Sep 17 00:00:00 2001 From: gburton Date: Wed, 23 Oct 2019 13:12:39 +0100 Subject: [PATCH 3/9] Login Page Bootstrapped and Prettified TY @Omar_one for guidance and idea --- admin/images/CE-Phoenix.png | Bin 0 -> 16935 bytes admin/includes/languages/english/login.php | 11 +-- admin/includes/template_bottom.php | 2 +- admin/includes/template_top.php | 4 +- admin/login.php | 102 ++++++++++----------- 5 files changed, 54 insertions(+), 65 deletions(-) create mode 100644 admin/images/CE-Phoenix.png diff --git a/admin/images/CE-Phoenix.png b/admin/images/CE-Phoenix.png new file mode 100644 index 0000000000000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=+Z$mUAZ?5UxT7f_ z2lfIN0Otcg1Dpq(1q}7zv)7wozZ19%_#SXOa5oFOAj4Tq`a{~ej)H|;pnBet~t<34bTAug+#tHfbF2zIIflc?W yz#^S8iutPPj?o>bF)1>az!)3E7#qZxuekvncu&{6p5f#G0000 literal 0 HcmV?d00001 diff --git a/admin/includes/languages/english/login.php b/admin/includes/languages/english/login.php index 0abc5b16f..e1c5dd5f0 100755 --- a/admin/includes/languages/english/login.php +++ b/admin/includes/languages/english/login.php @@ -5,17 +5,17 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2007 osCommerce + Copyright (c) 2019 osCommerce Released under the GNU General Public License */ -define('HEADING_TITLE', 'Administrator Login'); +define('HEADING_TITLE', ' Secure Login Access'); -define('TEXT_USERNAME', 'Username:'); -define('TEXT_PASSWORD', 'Password:'); +define('TEXT_USERNAME', 'Username'); +define('TEXT_PASSWORD', 'Password'); -define('TEXT_CREATE_FIRST_ADMINISTRATOR', 'No administrators exist in the database table. Please fill in the following information to create the first administrator. (A manual login is still required after this step)'); +define('TEXT_CREATE_FIRST_ADMINISTRATOR', '
No administrators exist in the database table. Please use this form to create the first administrator.
A manual login is still required after this step.
'); define('ERROR_INVALID_ADMINISTRATOR', 'Error: Invalid administrator login attempt.'); @@ -23,4 +23,3 @@ define('BUTTON_CREATE_ADMINISTRATOR', 'Create Administrator'); define('ERROR_ACTION_RECORDER', 'Error: The maximum number of login attempts has been reached. Please try again in %s minutes.'); -?> diff --git a/admin/includes/template_bottom.php b/admin/includes/template_bottom.php index 2a2d0c4d0..48a75700e 100755 --- a/admin/includes/template_bottom.php +++ b/admin/includes/template_bottom.php @@ -14,7 +14,7 @@ call('siteWide', 'injectSiteEnd'); ?> diff --git a/admin/includes/template_top.php b/admin/includes/template_top.php index 8012d85d2..886461266 100755 --- a/admin/includes/template_top.php +++ b/admin/includes/template_top.php @@ -42,10 +42,10 @@ - - diff --git a/admin/login.php b/admin/login.php index e257c0b0a..0ada4bb4b 100755 --- a/admin/login.php +++ b/admin/login.php @@ -36,7 +36,7 @@ $actionRecorder = new actionRecorderAdmin('ar_admin_login', null, $username); if ($actionRecorder->canPerform()) { - $check_query = tep_db_query("select id, user_name, user_password from " . TABLE_ADMINISTRATORS . " where user_name = '" . tep_db_input($username) . "'"); + $check_query = tep_db_query("select id, user_name, user_password from administrators where user_name = '" . tep_db_input($username) . "'"); if (tep_db_num_rows($check_query) == 1) { $check = tep_db_fetch_array($check_query); @@ -44,7 +44,7 @@ if (tep_validate_password($password, $check['user_password'])) { // migrate old hashed password to new phpass password if (tep_password_type($check['user_password']) != 'phpass') { - tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_password = '" . tep_encrypt_password($password) . "' where id = '" . (int)$check['id'] . "'"); + tep_db_query("update administrators set user_password = '" . tep_encrypt_password($password) . "' where id = '" . (int)$check['id'] . "'"); } tep_session_register('admin'); @@ -95,14 +95,14 @@ break; case 'create': - $check_query = tep_db_query("select id from " . TABLE_ADMINISTRATORS . " limit 1"); + $check_query = tep_db_query("select id from administrators limit 1"); if (tep_db_num_rows($check_query) == 0) { $username = tep_db_prepare_input($_POST['username']); $password = tep_db_prepare_input($_POST['password']); if ( !empty($username) ) { - tep_db_query("insert into " . TABLE_ADMINISTRATORS . " (user_name, user_password) values ('" . tep_db_input($username) . "', '" . tep_db_input(tep_encrypt_password($password)) . "')"); + tep_db_query("insert into administrators (user_name, user_password) values ('" . tep_db_input($username) . "', '" . tep_db_input(tep_encrypt_password($password)) . "')"); } } @@ -123,64 +123,54 @@ } } - $admins_check_query = tep_db_query("select id from " . TABLE_ADMINISTRATORS . " limit 1"); + $admins_check_query = tep_db_query("select id from administrators limit 1"); if (tep_db_num_rows($admins_check_query) < 1) { $messageStack->add(TEXT_CREATE_FIRST_ADMINISTRATOR, 'warning'); } require('includes/template_top.php'); + + if ($messageStack->size > 0) echo $messageStack->output(); + ?> - - - - - - - - -
- - - - 1) { -?> - - - - - - -
'; ?>
- - 0) { - $heading[] = array('text' => '' . HEADING_TITLE . ''); - - $contents = array('form' => tep_draw_form('login', 'login.php', 'action=process')); - $contents[] = array('text' => TEXT_USERNAME . '
' . tep_draw_input_field('username')); - $contents[] = array('text' => '
' . TEXT_PASSWORD . '
' . tep_draw_password_field('password')); - $contents[] = array('align' => 'center', 'text' => '
' . tep_draw_button(BUTTON_LOGIN, 'key')); - } else { - $heading[] = array('text' => '' . HEADING_TITLE . ''); - - $contents = array('form' => tep_draw_form('login', 'login.php', 'action=create')); - $contents[] = array('text' => TEXT_CREATE_FIRST_ADMINISTRATOR); - $contents[] = array('text' => '
' . TEXT_USERNAME . '
' . tep_draw_input_field('username')); - $contents[] = array('text' => '
' . TEXT_PASSWORD . '
' . tep_draw_password_field('password')); - $contents[] = array('align' => 'center', 'text' => '
' . tep_draw_button(BUTTON_CREATE_ADMINISTRATOR, 'key')); - } - - $box = new box; - echo $box->infoBox($heading, $contents); -?> - -
+
+
+
+
+
+ +
+ 0) { + echo tep_draw_form('login', 'login.php', 'action=process'); + $button_text = BUTTON_LOGIN; + $intro_text = null; + } + else { + echo tep_draw_form('login', 'login.php', 'action=create'); + $button_text = BUTTON_CREATE_ADMINISTRATOR; + $intro_text = TEXT_CREATE_FIRST_ADMINISTRATOR; + } + ?> + +
    +
  • +
  • +
  • +
+ 1) { + ?> + + +
+
+
Date: Wed, 23 Oct 2019 17:34:27 +0100 Subject: [PATCH 4/9] Hardcode container-fluid and move out to template_*.php It will affect all pages minimally, until each is updated properly for Bootstrap. --- admin/includes/template_bottom.php | 13 +++++++------ admin/includes/template_top.php | 2 ++ admin/login.php | 3 +-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/admin/includes/template_bottom.php b/admin/includes/template_bottom.php index 48a75700e..33aab2ddc 100755 --- a/admin/includes/template_bottom.php +++ b/admin/includes/template_bottom.php @@ -11,15 +11,16 @@ */ ?> - + -call('siteWide', 'injectSiteEnd'); -?> + echo $OSCOM_Hooks->call('siteWide', 'injectSiteEnd'); + ?> -
+
+ diff --git a/admin/includes/template_top.php b/admin/includes/template_top.php index 886461266..1582652de 100755 --- a/admin/includes/template_top.php +++ b/admin/includes/template_top.php @@ -42,6 +42,8 @@ +
+ size > 0) echo $messageStack->output(); ?> -
+
@@ -170,7 +170,6 @@ ?>
-
Date: Thu, 24 Oct 2019 14:46:40 +0100 Subject: [PATCH 5/9] 1.0.3.0 --- includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/version.php b/includes/version.php index 97cb20662..12cf88d3c 100755 --- a/includes/version.php +++ b/includes/version.php @@ -1 +1 @@ -1.0.2.8 \ No newline at end of file +1.0.3.0 \ No newline at end of file From 4d85166b2ff8b549236d9c1f4178b0575c58d8ec Mon Sep 17 00:00:00 2001 From: gburton Date: Thu, 24 Oct 2019 15:21:46 +0100 Subject: [PATCH 6/9] Remove outdated Banner System --- admin/banner_manager.php | 440 ------------------ admin/banner_statistics.php | 154 ------ admin/includes/boxes/tools.php | 5 - admin/includes/database_tables.php | 2 - admin/includes/functions/general.php | 32 -- admin/includes/functions/html_graphs.php | 206 +------- admin/includes/graphs/banner_daily.php | 53 --- admin/includes/graphs/banner_infobox.php | 47 -- admin/includes/graphs/banner_monthly.php | 51 -- admin/includes/graphs/banner_yearly.php | 45 -- admin/includes/languages/english.php | 3 - .../languages/english/banner_manager.php | 67 --- .../languages/english/banner_statistics.php | 34 -- admin/popup_image.php | 54 --- includes/application_top.php | 5 - includes/functions/banner.php | 125 ----- install/oscommerce.sql | 29 -- redirect.php | 10 - 18 files changed, 1 insertion(+), 1361 deletions(-) delete mode 100755 admin/banner_manager.php delete mode 100755 admin/banner_statistics.php delete mode 100755 admin/includes/graphs/banner_daily.php delete mode 100755 admin/includes/graphs/banner_infobox.php delete mode 100755 admin/includes/graphs/banner_monthly.php delete mode 100755 admin/includes/graphs/banner_yearly.php delete mode 100755 admin/includes/languages/english/banner_manager.php delete mode 100755 admin/includes/languages/english/banner_statistics.php delete mode 100755 admin/popup_image.php delete mode 100755 includes/functions/banner.php diff --git a/admin/banner_manager.php b/admin/banner_manager.php deleted file mode 100755 index a86fcc2ac..000000000 --- a/admin/banner_manager.php +++ /dev/null @@ -1,440 +0,0 @@ -add_session(SUCCESS_BANNER_STATUS_UPDATED, 'success'); - } else { - $messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error'); - } - - tep_redirect(tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $_GET['bID'])); - break; - case 'insert': - case 'update': - if (isset($_POST['banners_id'])) $banners_id = tep_db_prepare_input($_POST['banners_id']); - $banners_title = tep_db_prepare_input($_POST['banners_title']); - $banners_url = tep_db_prepare_input($_POST['banners_url']); - $new_banners_group = tep_db_prepare_input($_POST['new_banners_group']); - $banners_group = (empty($new_banners_group)) ? tep_db_prepare_input($_POST['banners_group']) : $new_banners_group; - $banners_html_text = tep_db_prepare_input($_POST['banners_html_text']); - $banners_image_local = tep_db_prepare_input($_POST['banners_image_local']); - $banners_image_target = tep_db_prepare_input($_POST['banners_image_target']); - $db_image_location = ''; - $expires_date = tep_db_prepare_input($_POST['expires_date']); - $expires_impressions = tep_db_prepare_input($_POST['expires_impressions']); - $date_scheduled = tep_db_prepare_input($_POST['date_scheduled']); - - $banner_error = false; - if (empty($banners_title)) { - $messageStack->add(ERROR_BANNER_TITLE_REQUIRED, 'error'); - $banner_error = true; - } - - if (empty($banners_group)) { - $messageStack->add(ERROR_BANNER_GROUP_REQUIRED, 'error'); - $banner_error = true; - } - - if (empty($banners_html_text)) { - if (empty($banners_image_local)) { - $banners_image = new upload('banners_image'); - $banners_image->set_destination(DIR_FS_CATALOG_IMAGES . $banners_image_target); - if ( ($banners_image->parse() == false) || ($banners_image->save() == false) ) { - $banner_error = true; - } - } - } - - if ($banner_error == false) { - $db_image_location = (tep_not_null($banners_image_local)) ? $banners_image_local : $banners_image_target . $banners_image->filename; - $sql_data_array = array('banners_title' => $banners_title, - 'banners_url' => $banners_url, - 'banners_image' => $db_image_location, - 'banners_group' => $banners_group, - 'banners_html_text' => $banners_html_text, - 'expires_date' => 'null', - 'expires_impressions' => 0, - 'date_scheduled' => 'null'); - - if ($action == 'insert') { - $insert_sql_data = array('date_added' => 'now()', - 'status' => '1'); - - $sql_data_array = array_merge($sql_data_array, $insert_sql_data); - - tep_db_perform(TABLE_BANNERS, $sql_data_array); - - $banners_id = tep_db_insert_id(); - - $messageStack->add_session(SUCCESS_BANNER_INSERTED, 'success'); - } elseif ($action == 'update') { - tep_db_perform(TABLE_BANNERS, $sql_data_array, 'update', "banners_id = '" . (int)$banners_id . "'"); - - $messageStack->add_session(SUCCESS_BANNER_UPDATED, 'success'); - } - - if (tep_not_null($expires_date)) { - $expires_date = substr($expires_date, 0, 4) . substr($expires_date, 5, 2) . substr($expires_date, 8, 2); - - tep_db_query("update " . TABLE_BANNERS . " set expires_date = '" . tep_db_input($expires_date) . "', expires_impressions = null where banners_id = '" . (int)$banners_id . "'"); - } elseif (tep_not_null($expires_impressions)) { - tep_db_query("update " . TABLE_BANNERS . " set expires_impressions = '" . tep_db_input($expires_impressions) . "', expires_date = null where banners_id = '" . (int)$banners_id . "'"); - } - - if (tep_not_null($date_scheduled)) { - $date_scheduled = substr($date_scheduled, 0, 4) . substr($date_scheduled, 5, 2) . substr($date_scheduled, 8, 2); - - tep_db_query("update " . TABLE_BANNERS . " set status = '0', date_scheduled = '" . tep_db_input($date_scheduled) . "' where banners_id = '" . (int)$banners_id . "'"); - } - - tep_redirect(tep_href_link('banner_manager.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'bID=' . $banners_id)); - } else { - $action = 'new'; - } - break; - case 'deleteconfirm': - $banners_id = tep_db_prepare_input($_GET['bID']); - - if (isset($_POST['delete_image']) && ($_POST['delete_image'] == 'on')) { - $banner_query = tep_db_query("select banners_image from " . TABLE_BANNERS . " where banners_id = '" . (int)$banners_id . "'"); - $banner = tep_db_fetch_array($banner_query); - - if (is_file(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) { - if (tep_is_writable(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) { - unlink(DIR_FS_CATALOG_IMAGES . $banner['banners_image']); - } else { - $messageStack->add_session(ERROR_IMAGE_IS_NOT_WRITEABLE, 'error'); - } - } else { - $messageStack->add_session(ERROR_IMAGE_DOES_NOT_EXIST, 'error'); - } - } - - tep_db_query("delete from " . TABLE_BANNERS . " where banners_id = '" . (int)$banners_id . "'"); - tep_db_query("delete from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int)$banners_id . "'"); - - if (function_exists('imagecreate') && tep_not_null($banner_extension)) { - if (is_file('images/graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) { - if (tep_is_writable('images/graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) { - unlink('images/graphs/banner_infobox-' . $banners_id . '.' . $banner_extension); - } - } - - if (is_file('images/graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) { - if (tep_is_writable('images/graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) { - unlink('images/graphs/banner_yearly-' . $banners_id . '.' . $banner_extension); - } - } - - if (is_file('images/graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) { - if (tep_is_writable('images/graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) { - unlink('images/graphs/banner_monthly-' . $banners_id . '.' . $banner_extension); - } - } - - if (is_file('images/graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) { - if (tep_is_writable('images/graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) { - unlink('images/graphs/banner_daily-' . $banners_id . '.' . $banner_extension); - } - } - } - - $messageStack->add_session(SUCCESS_BANNER_REMOVED, 'success'); - - tep_redirect(tep_href_link('banner_manager.php', 'page=' . $_GET['page'])); - break; - } - } - -// check if the graphs directory exists - $dir_ok = false; - if (function_exists('imagecreate') && tep_not_null($banner_extension)) { - if (is_dir('images/graphs')) { - if (tep_is_writable('images/graphs')) { - $dir_ok = true; - } else { - $messageStack->add(ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE, 'error'); - } - } else { - $messageStack->add(ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST, 'error'); - } - } - - require('includes/template_top.php'); -?> - - - - - - - - '', - 'date_scheduled' => '', - 'banners_title' => '', - 'banners_url' => '', - 'banners_group' => '', - 'banners_image' => '', - 'banners_html_text' => '', - 'expires_impressions' => ''); - - $bInfo = new objectInfo($parameters); - - if (isset($_GET['bID'])) { - $form_action = 'update'; - - $bID = tep_db_prepare_input($_GET['bID']); - - $banner_query = tep_db_query("select banners_title, banners_url, banners_image, banners_group, banners_html_text, status, date_format(date_scheduled, '%Y/%m/%d') as date_scheduled, date_format(expires_date, '%Y/%m/%d') as expires_date, expires_impressions, date_status_change from " . TABLE_BANNERS . " where banners_id = '" . (int)$bID . "'"); - $banner = tep_db_fetch_array($banner_query); - - $bInfo->objectInfo($banner); - } elseif (tep_not_null($_POST)) { - $bInfo->objectInfo($_POST); - } - - $groups_array = array(); - $groups_query = tep_db_query("select distinct banners_group from " . TABLE_BANNERS . " order by banners_group"); - while ($groups = tep_db_fetch_array($groups_query)) { - $groups_array[] = array('id' => $groups['banners_group'], 'text' => $groups['banners_group']); - } -?> - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
banners_title, '', true); ?>
banners_url); ?>
banners_group) . TEXT_BANNERS_NEW_GROUP . '
' . tep_draw_input_field('new_banners_group', '', '', ((sizeof($groups_array) > 0) ? false : true)); ?>
' . DIR_FS_CATALOG_IMAGES . tep_draw_input_field('banners_image_local', (isset($bInfo->banners_image) ? $bInfo->banners_image : '')); ?>
banners_html_text); ?>
date_scheduled, 'id="date_scheduled"') . ' (YYYY-MM-DD)'; ?>
expires_date, 'id="expires_date"') . ' (YYYY-MM-DD)' . TEXT_BANNERS_OR_AT . '
' . tep_draw_input_field('expires_impressions', $bInfo->expires_impressions, 'maxlength="7" size="7"') . ' ' . TEXT_BANNERS_IMPRESSIONS; ?>
- - - -
- - - - -
' . TEXT_BANNERS_INSERT_NOTE . '
' . TEXT_BANNERS_EXPIRCY_NOTE . '
' . TEXT_BANNERS_SCHEDULE_NOTE; ?>
- - - '' . $bInfo->banners_title . ''); - - $contents = array('form' => tep_draw_form('banners', 'banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=deleteconfirm')); - $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); - $contents[] = array('text' => '
' . $bInfo->banners_title . ''); - if ($bInfo->banners_image) $contents[] = array('text' => '
' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE); - $contents[] = array('align' => 'center', 'text' => '
' . tep_draw_button(IMAGE_DELETE, 'trash', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $_GET['bID']))); - break; - default: - if (is_object($bInfo)) { - $heading[] = array('text' => '' . $bInfo->banners_title . ''); - - $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=new')) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=delete')) . tep_draw_button(IMAGE_DETAILS, 'info', tep_href_link('banner_statistics.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id))); - $contents[] = array('text' => '
' . TEXT_BANNERS_DATE_ADDED . ' ' . tep_date_short($bInfo->date_added)); - - if ( (function_exists('imagecreate')) && ($dir_ok) && ($banner_extension) ) { - $banner_id = $bInfo->banners_id; - $days = '3'; - include('includes/graphs/banner_infobox.php'); - $contents[] = array('align' => 'center', 'text' => '
' . tep_image('images/graphs/banner_infobox-' . $banner_id . '.' . $banner_extension)); - } else { - include('includes/functions/html_graphs.php'); - $contents[] = array('align' => 'center', 'text' => '
' . tep_banner_graph_infoBox($bInfo->banners_id, '3')); - } - - $contents[] = array('text' => tep_image('images/graph_hbar_blue.gif', 'Blue', '5', '5') . ' ' . TEXT_BANNERS_BANNER_VIEWS . '
' . tep_image('images/graph_hbar_red.gif', 'Red', '5', '5') . ' ' . TEXT_BANNERS_BANNER_CLICKS); - - if ($bInfo->date_scheduled) $contents[] = array('text' => '
' . sprintf(TEXT_BANNERS_SCHEDULED_AT_DATE, tep_date_short($bInfo->date_scheduled))); - - if ($bInfo->expires_date) { - $contents[] = array('text' => '
' . sprintf(TEXT_BANNERS_EXPIRES_AT_DATE, tep_date_short($bInfo->expires_date))); - } elseif ($bInfo->expires_impressions) { - $contents[] = array('text' => '
' . sprintf(TEXT_BANNERS_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions)); - } - - if ($bInfo->date_status_change) $contents[] = array('text' => '
' . sprintf(TEXT_BANNERS_STATUS_CHANGE, tep_date_short($bInfo->date_status_change))); - } - break; - } - - if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { - echo ' ' . "\n"; - } -?> - -
- - - - - - - -banners_id)) { - echo ' ' . "\n"; - } else { - echo ' ' . "\n"; - } -?> - - - - - - - - - - -
 
' . tep_image('images/icon_popup.gif', 'View Banner') . ' ' . $banners['banners_title']; ?> -' . tep_image('images/icon_status_red_light.gif', 'Set Inactive', 10, 10) . ''; - } else { - echo '' . tep_image('images/icon_status_green_light.gif', 'Set Active', 10, 10) . '  ' . tep_image('images/icon_status_red.gif', 'Inactive', 10, 10); - } -?>' . tep_image('images/icons/statistics.gif', ICON_STATISTICS) . ' '; if (isset($bInfo) && is_object($bInfo) && ($banners['banners_id'] == $bInfo->banners_id)) { echo tep_image('images/icon_arrow_right.gif', ''); } else { echo '' . tep_image('images/icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> 
- - - - - - - -
display_count($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_BANNERS); ?>display_links($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?>
' . "\n"; - - $box = new box; - echo $box->infoBox($heading, $contents); - - echo '
- - diff --git a/admin/banner_statistics.php b/admin/banner_statistics.php deleted file mode 100755 index bb51c5205..000000000 --- a/admin/banner_statistics.php +++ /dev/null @@ -1,154 +0,0 @@ -add(ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE, 'error'); - } - } else { - $messageStack->add(ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST, 'error'); - } - } - - $banner_query = tep_db_query("select banners_title from " . TABLE_BANNERS . " where banners_id = '" . (int)$_GET['bID'] . "'"); - $banner = tep_db_fetch_array($banner_query); - - $years_array = array(); - $years_query = tep_db_query("select distinct year(banners_history_date) as banner_year from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int)$_GET['bID'] . "'"); - while ($years = tep_db_fetch_array($years_query)) { - $years_array[] = array('id' => $years['banner_year'], - 'text' => $years['banner_year']); - } - - $months_array = array(); - for ($i=1; $i<13; $i++) { - $months_array[] = array('id' => $i, - 'text' => strftime('%B', mktime(0,0,0,$i))); - } - - $type_array = array(array('id' => 'daily', - 'text' => STATISTICS_TYPE_DAILY), - array('id' => 'monthly', - 'text' => STATISTICS_TYPE_MONTHLY), - array('id' => 'yearly', - 'text' => STATISTICS_TYPE_YEARLY)); - - require('includes/template_top.php'); -?> - - - - - - - - - - - - - - - - - -
- - - - - -

-'; - break; - default: - case 'daily': - echo TITLE_MONTH . ' ' . tep_draw_pull_down_menu('month', $months_array, (isset($_GET['month']) ? $_GET['month'] : date('n')), 'onchange="this.form.submit();"') . '
' . TITLE_YEAR . ' ' . tep_draw_pull_down_menu('year', $years_array, (isset($_GET['year']) ? $_GET['year'] : date('Y')), 'onchange="this.form.submit();"') . ''; - break; - } -?> -
- - - - - - - -' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n"; - } -?> -
' . $stats[$i][0] . '' . number_format($stats[$i][1]) . '' . number_format($stats[$i][2]) . '
- -
- - diff --git a/admin/includes/boxes/tools.php b/admin/includes/boxes/tools.php index 93a29b05d..f44e43655 100755 --- a/admin/includes/boxes/tools.php +++ b/admin/includes/boxes/tools.php @@ -23,11 +23,6 @@ 'title' => BOX_TOOLS_BACKUP, 'link' => tep_href_link('backup.php') ), - array( - 'code' => 'banner_manager.php', - 'title' => BOX_TOOLS_BANNER_MANAGER, - 'link' => tep_href_link('banner_manager.php') - ), array( 'code' => 'define_language.php', 'title' => BOX_TOOLS_DEFINE_LANGUAGE, diff --git a/admin/includes/database_tables.php b/admin/includes/database_tables.php index 1fe69c1bf..496724631 100755 --- a/admin/includes/database_tables.php +++ b/admin/includes/database_tables.php @@ -15,8 +15,6 @@ define('TABLE_ADDRESS_BOOK', 'address_book'); define('TABLE_ADDRESS_FORMAT', 'address_format'); define('TABLE_ADMINISTRATORS', 'administrators'); - define('TABLE_BANNERS', 'banners'); - define('TABLE_BANNERS_HISTORY', 'banners_history'); define('TABLE_CATEGORIES', 'categories'); define('TABLE_CATEGORIES_DESCRIPTION', 'categories_description'); define('TABLE_CONFIGURATION', 'configuration'); diff --git a/admin/includes/functions/general.php b/admin/includes/functions/general.php index 4dd19912d..850806db2 100755 --- a/admin/includes/functions/general.php +++ b/admin/includes/functions/general.php @@ -728,18 +728,6 @@ function tep_cfg_get_zone_name($zone_id) { } } -//// -// Sets the status of a banner - function tep_set_banner_status($banners_id, $status) { - if ($status == '1') { - return tep_db_query("update " . TABLE_BANNERS . " set status = '1', expires_impressions = NULL, expires_date = NULL, date_status_change = NULL where banners_id = '" . $banners_id . "'"); - } elseif ($status == '0') { - return tep_db_query("update " . TABLE_BANNERS . " set status = '0', date_status_change = now() where banners_id = '" . $banners_id . "'"); - } else { - return -1; - } - } - //// // Sets the status of a product function tep_set_product_status($products_id, $status) { @@ -1141,26 +1129,6 @@ function tep_get_tax_class_title($tax_class_id) { } } - function tep_banner_image_extension() { - if (function_exists('imagetypes')) { - if (imagetypes() & IMG_PNG) { - return 'png'; - } elseif (imagetypes() & IMG_JPG) { - return 'jpg'; - } elseif (imagetypes() & IMG_GIF) { - return 'gif'; - } - } elseif (function_exists('imagecreatefrompng') && function_exists('imagepng')) { - return 'png'; - } elseif (function_exists('imagecreatefromjpeg') && function_exists('imagejpeg')) { - return 'jpg'; - } elseif (function_exists('imagecreatefromgif') && function_exists('imagegif')) { - return 'gif'; - } - - return false; - } - //// // Wrapper function for round() for php3 compatibility function tep_round($value, $precision) { diff --git a/admin/includes/functions/html_graphs.php b/admin/includes/functions/html_graphs.php index 69e869778..8116788ac 100755 --- a/admin/includes/functions/html_graphs.php +++ b/admin/includes/functions/html_graphs.php @@ -361,208 +361,4 @@ function double_vertical_graph($names, $values, $bars, $vals, $dvalues, $dbars) return $double_vertical_graph_string; } - -//// -// draws a double vertical bar graph for the banner views vs clicks statistics - function tep_banner_graph_infoBox($banner_id, $days) { - $names = array(); - $values = array(); - $dvalues = array(); - - $banner_stats_query = tep_db_query("select dayofmonth(banners_history_date) as name, banners_shown as value, banners_clicked as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and to_days(now()) - to_days(banners_history_date) < " . $days . " order by banners_history_date"); - while ($banner_stats = tep_db_fetch_array($banner_stats_query)) { - $names[] = $banner_stats['name']; - $values[] = $banner_stats['value']; - $dvalues[] = $banner_stats['dvalue']; - } - $largest = @max($values); - - $bars = array(); - $dbars = array(); - for ($i = 0, $n = sizeof($values); $i < $n; $i++) { - $bars[$i] = 'images/graph_hbar_blue.gif'; - $dbars[$i] = 'images/graph_hbar_red.gif'; - } - - $graph_vals = @array('vlabel'=>TEXT_BANNERS_DATA, - 'hlabel'=>TEXT_BANNERS_LAST_3_DAYS, - 'type'=>'3', - 'cellpadding'=>'', - 'cellspacing'=>'1', - 'border'=>'', - 'width'=>'', - 'vfcolor'=>'#ffffff', - 'hfcolor'=>'#ffffff', - 'vbgcolor'=>'#81a2b6', - 'hbgcolor'=>'#81a2b6', - 'vfstyle'=>'Verdana, Arial, Helvetica', - 'hfstyle'=>'Verdana, Arial, Helvetica', - 'scale'=>100/$largest, - 'namebgcolor'=>'#f3f5fe', - 'valuebgcolor'=>'#f3f5fe', - 'namefcolor'=>'', - 'valuefcolor'=>'#0000d0', - 'namefstyle'=>'Verdana, Arial, Helvetica', - 'valuefstyle'=>'', - 'doublefcolor'=>'#ff7339'); - - return html_graph($names, $values, $bars, $graph_vals, $dvalues, $dbars); - } - -//// -// draws a double vertical bar graph for the banner views vs clicks statistics - function tep_banner_graph_yearly($banner_id) { - global $banner; - - $banner_stats_query = tep_db_query("select year(banners_history_date) as year, sum(banners_shown) as value, sum(banners_clicked) as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' group by year(banners_history_date)"); - while ($banner_stats = tep_db_fetch_array($banner_stats_query)) { - $names[] = $banner_stats['year']; - $values[] = (($banner_stats['value']) ? $banner_stats['value'] : '0'); - $dvalues[] = (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'); - } - - $largest = @max($values); - - $bars = array(); - $dbars = array(); - for ($i = 0, $n = sizeof($values); $i < $n; $i++) { - $bars[$i] = 'images/graph_hbar_blue.gif'; - $dbars[$i] = 'images/graph_hbar_red.gif'; - } - - $graph_vals = @array('vlabel'=>TEXT_BANNERS_DATA, - 'hlabel'=>sprintf(TEXT_BANNERS_YEARLY_STATISTICS, $banner['banners_title']), - 'type'=>'3', - 'cellpadding'=>'', - 'cellspacing'=>'1', - 'border'=>'', - 'width'=>'', - 'vfcolor'=>'#ffffff', - 'hfcolor'=>'#ffffff', - 'vbgcolor'=>'#81a2b6', - 'hbgcolor'=>'#81a2b6', - 'vfstyle'=>'Verdana, Arial, Helvetica', - 'hfstyle'=>'Verdana, Arial, Helvetica', - 'scale'=>100/$largest, - 'namebgcolor'=>'#f3f5fe', - 'valuebgcolor'=>'#f3f5fe', - 'namefcolor'=>'', - 'valuefcolor'=>'#0000d0', - 'namefstyle'=>'Verdana, Arial, Helvetica', - 'valuefstyle'=>'', - 'doublefcolor'=>'#ff7339'); - - return html_graph($names, $values, $bars, $graph_vals, $dvalues, $dbars); - } - -//// -// draws a double vertical bar graph for the banner views vs clicks statistics - function tep_banner_graph_monthly($banner_id) { - global $banner; - - $year = (($_GET['year']) ? $_GET['year'] : date('Y')); - - for ($i=1; $i<13; $i++) { - $names[] = strftime('%b', mktime(0,0,0,$i)); - $values[] = '0'; - $dvalues[] = '0'; - } - - $banner_stats_query = tep_db_query("select month(banners_history_date) as banner_month, sum(banners_shown) as value, sum(banners_clicked) as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and year(banners_history_date) = '" . $year . "' group by month(banners_history_date)"); - while ($banner_stats = tep_db_fetch_array($banner_stats_query)) { - $names[($banner_stats['banner_month']-1)] = strftime('%b', mktime(0,0,0,$banner_stats['banner_month'])); - $values[($banner_stats['banner_month']-1)] = (($banner_stats['value']) ? $banner_stats['value'] : '0'); - $dvalues[($banner_stats['banner_month']-1)] = (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'); - } - - $largest = @max($values); - - $bars = array(); - $dbars = array(); - for ($i = 0, $n = sizeof($values); $i < $n; $i++) { - $bars[$i] = 'images/graph_hbar_blue.gif'; - $dbars[$i] = 'images/graph_hbar_red.gif'; - } - - $graph_vals = @array('vlabel'=>TEXT_BANNERS_DATA, - 'hlabel'=>sprintf(TEXT_BANNERS_MONTHLY_STATISTICS, $banner['banners_title'], date('Y')), - 'type'=>'3', - 'cellpadding'=>'', - 'cellspacing'=>'1', - 'border'=>'', - 'width'=>'', - 'vfcolor'=>'#ffffff', - 'hfcolor'=>'#ffffff', - 'vbgcolor'=>'#81a2b6', - 'hbgcolor'=>'#81a2b6', - 'vfstyle'=>'Verdana, Arial, Helvetica', - 'hfstyle'=>'Verdana, Arial, Helvetica', - 'scale'=>100/$largest, - 'namebgcolor'=>'#f3f5fe', - 'valuebgcolor'=>'#f3f5fe', - 'namefcolor'=>'', - 'valuefcolor'=>'#0000d0', - 'namefstyle'=>'Verdana, Arial, Helvetica', - 'valuefstyle'=>'', - 'doublefcolor'=>'#ff7339'); - - return html_graph($names, $values, $bars, $graph_vals, $dvalues, $dbars); - } - -//// -// draws a double vertical bar graph for the banner views vs clicks statistics - function tep_banner_graph_daily($banner_id) { - global $banner; - - $year = (isset($_GET['year']) ? $_GET['year'] : date('Y')); - $month = (isset($_GET['month']) ? $_GET['month'] : date('n')); - - $days = (date('t', mktime(0,0,0,$month))+1); - $stats = array(); - for ($i=1; $i<$days; $i++) { - $names[] = $i; - $values[] = '0'; - $dvalues[] = '0'; - } - - $banner_stats_query = tep_db_query("select dayofmonth(banners_history_date) as banner_day, banners_shown as value, banners_clicked as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and month(banners_history_date) = '" . $month . "' and year(banners_history_date) = '" . $year . "'"); - while ($banner_stats = tep_db_fetch_array($banner_stats_query)) { - $names[($banner_stats['banner_day']-1)] = $banner_stats['banner_day']; - $values[($banner_stats['banner_day']-1)] = (($banner_stats['value']) ? $banner_stats['value'] : '0'); - $dvalues[($banner_stats['banner_day']-1)] = (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'); - } - - $largest = @max($values); - - $bars = array(); - $dbars = array(); - for ($i = 0, $n = sizeof($values); $i < $n; $i++) { - $bars[$i] = 'images/graph_hbar_blue.gif'; - $dbars[$i] = 'images/graph_hbar_red.gif'; - } - - $graph_vals = @array('vlabel'=>TEXT_BANNERS_DATA, - 'hlabel'=>sprintf(TEXT_BANNERS_DAILY_STATISTICS, $banner['banners_title'], strftime('%B', mktime(0,0,0,$month)), $year), - 'type'=>'3', - 'cellpadding'=>'', - 'cellspacing'=>'1', - 'border'=>'', - 'width'=>'', - 'vfcolor'=>'#ffffff', - 'hfcolor'=>'#ffffff', - 'vbgcolor'=>'#81a2b6', - 'hbgcolor'=>'#81a2b6', - 'vfstyle'=>'Verdana, Arial, Helvetica', - 'hfstyle'=>'Verdana, Arial, Helvetica', - 'scale'=>100/$largest, - 'namebgcolor'=>'#f3f5fe', - 'valuebgcolor'=>'#f3f5fe', - 'namefcolor'=>'', - 'valuefcolor'=>'#0000d0', - 'namefstyle'=>'Verdana, Arial, Helvetica', - 'valuefstyle'=>'', - 'doublefcolor'=>'#ff7339'); - - return html_graph($names, $values, $bars, $graph_vals, $dvalues, $dbars); - } -?> + \ No newline at end of file diff --git a/admin/includes/graphs/banner_daily.php b/admin/includes/graphs/banner_daily.php deleted file mode 100755 index d8272c673..000000000 --- a/admin/includes/graphs/banner_daily.php +++ /dev/null @@ -1,53 +0,0 @@ -SetFileFormat($banner_extension); - $graph->SetIsInline(1); - $graph->SetPrintImage(0); - - $graph->SetSkipBottomTick(1); - $graph->SetDrawYGrid(1); - $graph->SetPrecisionY(0); - $graph->SetPlotType('lines'); - - $graph->SetPlotBorderType('left'); - $graph->SetTitleFontSize('4'); - $graph->SetTitle(sprintf(TEXT_BANNERS_DAILY_STATISTICS, $banner['banners_title'], strftime('%B', mktime(0,0,0,$month)), $year)); - - $graph->SetBackgroundColor('white'); - - $graph->SetVertTickPosition('plotleft'); - $graph->SetDataValues($stats); - $graph->SetDataColors(array('blue','red'),array('blue', 'red')); - - $graph->DrawGraph(); - - $graph->PrintImage(); -?> diff --git a/admin/includes/graphs/banner_infobox.php b/admin/includes/graphs/banner_infobox.php deleted file mode 100755 index 3ce6f7efa..000000000 --- a/admin/includes/graphs/banner_infobox.php +++ /dev/null @@ -1,47 +0,0 @@ -SetFileFormat($banner_extension); - $graph->SetIsInline(1); - $graph->SetPrintImage(0); - - $graph->draw_vert_ticks = 0; - $graph->SetSkipBottomTick(1); - $graph->SetDrawXDataLabels(0); - $graph->SetDrawYGrid(0); - $graph->SetPlotType('bars'); - $graph->SetDrawDataLabels(1); - $graph->SetLabelScalePosition(1); - $graph->SetMarginsPixels(15,15,15,30); - - $graph->SetTitleFontSize('4'); - $graph->SetTitle(TEXT_BANNERS_LAST_3_DAYS); - - $graph->SetDataValues($stats); - $graph->SetDataColors(array('blue','red'),array('blue', 'red')); - - $graph->DrawGraph(); - - $graph->PrintImage(); -?> diff --git a/admin/includes/graphs/banner_monthly.php b/admin/includes/graphs/banner_monthly.php deleted file mode 100755 index 513fa5836..000000000 --- a/admin/includes/graphs/banner_monthly.php +++ /dev/null @@ -1,51 +0,0 @@ -SetFileFormat($banner_extension); - $graph->SetIsInline(1); - $graph->SetPrintImage(0); - - $graph->SetSkipBottomTick(1); - $graph->SetDrawYGrid(1); - $graph->SetPrecisionY(0); - $graph->SetPlotType('lines'); - - $graph->SetPlotBorderType('left'); - $graph->SetTitleFontSize('4'); - $graph->SetTitle(sprintf(TEXT_BANNERS_MONTHLY_STATISTICS, $banner['banners_title'], $year)); - - $graph->SetBackgroundColor('white'); - - $graph->SetVertTickPosition('plotleft'); - $graph->SetDataValues($stats); - $graph->SetDataColors(array('blue','red'),array('blue', 'red')); - - $graph->DrawGraph(); - - $graph->PrintImage(); -?> diff --git a/admin/includes/graphs/banner_yearly.php b/admin/includes/graphs/banner_yearly.php deleted file mode 100755 index 30aef8089..000000000 --- a/admin/includes/graphs/banner_yearly.php +++ /dev/null @@ -1,45 +0,0 @@ -SetFileFormat($banner_extension); - $graph->SetIsInline(1); - $graph->SetPrintImage(0); - - $graph->SetSkipBottomTick(1); - $graph->SetDrawYGrid(1); - $graph->SetPrecisionY(0); - $graph->SetPlotType('lines'); - - $graph->SetPlotBorderType('left'); - $graph->SetTitleFontSize('4'); - $graph->SetTitle(sprintf(TEXT_BANNERS_YEARLY_STATISTICS, $banner['banners_title'])); - - $graph->SetBackgroundColor('white'); - - $graph->SetVertTickPosition('plotleft'); - $graph->SetDataValues($stats); - $graph->SetDataColors(array('blue','red'),array('blue', 'red')); - - $graph->DrawGraph(); - - $graph->PrintImage(); -?> diff --git a/admin/includes/languages/english.php b/admin/includes/languages/english.php index 0aa26a9f3..da7d811a2 100755 --- a/admin/includes/languages/english.php +++ b/admin/includes/languages/english.php @@ -104,7 +104,6 @@ function tep_date_raw($date, $reverse = false) { define('BOX_HEADING_TOOLS', 'Tools'); define('BOX_TOOLS_ACTION_RECORDER', 'Action Recorder'); define('BOX_TOOLS_BACKUP', 'Database Backup'); -define('BOX_TOOLS_BANNER_MANAGER', 'Banner Manager'); define('BOX_TOOLS_DEFINE_LANGUAGE', 'Define Languages'); define('BOX_TOOLS_MAIL', 'Send Email'); define('BOX_TOOLS_NEWSLETTER_MANAGER', 'Newsletter Manager'); @@ -212,7 +211,6 @@ function tep_date_raw($date, $reverse = false) { define('IMAGE_MODULE_INSTALL', 'Install Module'); define('IMAGE_MODULE_REMOVE', 'Remove Module'); define('IMAGE_MOVE', 'Move'); -define('IMAGE_NEW_BANNER', 'New Banner'); define('IMAGE_NEW_CATEGORY', 'New Category'); define('IMAGE_NEW_COUNTRY', 'New Country'); define('IMAGE_NEW_CURRENCY', 'New Currency'); @@ -259,7 +257,6 @@ function tep_date_raw($date, $reverse = false) { // constants for use in tep_prev_next_display function define('TEXT_RESULT_PAGE', 'Page %s of %d'); -define('TEXT_DISPLAY_NUMBER_OF_BANNERS', 'Displaying %d to %d (of %d banners)'); define('TEXT_DISPLAY_NUMBER_OF_COUNTRIES', 'Displaying %d to %d (of %d countries)'); define('TEXT_DISPLAY_NUMBER_OF_CUSTOMERS', 'Displaying %d to %d (of %d customers)'); define('TEXT_DISPLAY_NUMBER_OF_CURRENCIES', 'Displaying %d to %d (of %d currencies)'); diff --git a/admin/includes/languages/english/banner_manager.php b/admin/includes/languages/english/banner_manager.php deleted file mode 100755 index e472a52eb..000000000 --- a/admin/includes/languages/english/banner_manager.php +++ /dev/null @@ -1,67 +0,0 @@ -Banner Notes:
  • Use an image or HTML text for the banner - not both.
  • HTML Text has priority over an image
'); -define('TEXT_BANNERS_INSERT_NOTE', 'Image Notes:
  • Uploading directories must have proper user (write) permissions setup!
  • Do not fill out the \'Save To\' field if you are not uploading an image to the webserver (ie, you are using a local (serverside) image).
  • The \'Save To\' field must be an existing directory with an ending slash (eg, banners/).
'); -define('TEXT_BANNERS_EXPIRCY_NOTE', 'Expiry Notes:
  • Only one of the two fields should be submitted
  • If the banner is not to expire automatically, then leave these fields blank
'); -define('TEXT_BANNERS_SCHEDULE_NOTE', 'Schedule Notes:
  • If a schedule is set, the banner will be activated on that date.
  • All scheduled banners are marked as deactive until their date has arrived, to which they will then be marked active.
'); - -define('TEXT_BANNERS_DATE_ADDED', 'Date Added:'); -define('TEXT_BANNERS_SCHEDULED_AT_DATE', 'Scheduled At: %s'); -define('TEXT_BANNERS_EXPIRES_AT_DATE', 'Expires At: %s'); -define('TEXT_BANNERS_EXPIRES_AT_IMPRESSIONS', 'Expires At: %s impressions'); -define('TEXT_BANNERS_STATUS_CHANGE', 'Status Change: %s'); - -define('TEXT_BANNERS_DATA', 'D
A
T
A'); -define('TEXT_BANNERS_LAST_3_DAYS', 'Last 3 Days'); -define('TEXT_BANNERS_BANNER_VIEWS', 'Banner Views'); -define('TEXT_BANNERS_BANNER_CLICKS', 'Banner Clicks'); - -define('TEXT_INFO_DELETE_INTRO', 'Are you sure you want to delete this banner?'); -define('TEXT_INFO_DELETE_IMAGE', 'Delete banner image'); - -define('SUCCESS_BANNER_INSERTED', 'Success: The banner has been inserted.'); -define('SUCCESS_BANNER_UPDATED', 'Success: The banner has been updated.'); -define('SUCCESS_BANNER_REMOVED', 'Success: The banner has been removed.'); -define('SUCCESS_BANNER_STATUS_UPDATED', 'Success: The status of the banner has been updated.'); - -define('ERROR_BANNER_TITLE_REQUIRED', 'Error: Banner title required.'); -define('ERROR_BANNER_GROUP_REQUIRED', 'Error: Banner group required.'); -define('ERROR_IMAGE_DIRECTORY_DOES_NOT_EXIST', 'Error: Target directory does not exist: %s'); -define('ERROR_IMAGE_DIRECTORY_NOT_WRITEABLE', 'Error: Target directory is not writeable: %s'); -define('ERROR_IMAGE_DOES_NOT_EXIST', 'Error: Image does not exist.'); -define('ERROR_IMAGE_IS_NOT_WRITEABLE', 'Error: Image can not be removed.'); -define('ERROR_UNKNOWN_STATUS_FLAG', 'Error: Unknown status flag.'); - -define('ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST', 'Error: Graphs directory does not exist. Please create a \'graphs\' directory inside \'images\'.'); -define('ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE', 'Error: Graphs directory is not writeable.'); -?> diff --git a/admin/includes/languages/english/banner_statistics.php b/admin/includes/languages/english/banner_statistics.php deleted file mode 100755 index 4666edf10..000000000 --- a/admin/includes/languages/english/banner_statistics.php +++ /dev/null @@ -1,34 +0,0 @@ -a
t
a'); -define('TEXT_BANNERS_DAILY_STATISTICS', '%s Daily Statistics For %s %s'); -define('TEXT_BANNERS_MONTHLY_STATISTICS', '%s Monthly Statistics For %s'); -define('TEXT_BANNERS_YEARLY_STATISTICS', '%s Yearly Statistics'); - -define('STATISTICS_TYPE_DAILY', 'Daily'); -define('STATISTICS_TYPE_MONTHLY', 'Monthly'); -define('STATISTICS_TYPE_YEARLY', 'Yearly'); - -define('TITLE_TYPE', 'Type:'); -define('TITLE_YEAR', 'Year:'); -define('TITLE_MONTH', 'Month:'); - -define('ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST', 'Error: Graphs directory does not exist. Please create a \'graphs\' directory inside \'images\'.'); -define('ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE', 'Error: Graphs directory is not writeable.'); -?> \ No newline at end of file diff --git a/admin/popup_image.php b/admin/popup_image.php deleted file mode 100755 index c858968e1..000000000 --- a/admin/popup_image.php +++ /dev/null @@ -1,54 +0,0 @@ - - -> - -<?php echo $page_title; ?> - - - - - - - - - - diff --git a/includes/application_top.php b/includes/application_top.php index bf376d972..f2dea84bf 100755 --- a/includes/application_top.php +++ b/includes/application_top.php @@ -328,11 +328,6 @@ // split-page-results require('includes/classes/split_page_results.php'); -// auto activate and expire banners - require('includes/functions/banner.php'); - tep_activate_banners(); - tep_expire_banners(); - // auto expire special products require('includes/functions/specials.php'); tep_expire_specials(); diff --git a/includes/functions/banner.php b/includes/functions/banner.php deleted file mode 100755 index 09ba1229d..000000000 --- a/includes/functions/banner.php +++ /dev/null @@ -1,125 +0,0 @@ -= $banners['date_scheduled']) { - tep_set_banner_status($banners['banners_id'], '1'); - } - } - } - } - -//// -// Auto expire banners - function tep_expire_banners() { - $banners_query = tep_db_query("select b.banners_id, b.expires_date, b.expires_impressions, sum(bh.banners_shown) as banners_shown from banners b, banners_history bh where b.status = '1' and b.banners_id = bh.banners_id group by b.banners_id"); - if (tep_db_num_rows($banners_query)) { - while ($banners = tep_db_fetch_array($banners_query)) { - if (tep_not_null($banners['expires_date'])) { - if (date('Y-m-d H:i:s') >= $banners['expires_date']) { - tep_set_banner_status($banners['banners_id'], '0'); - } - } elseif (tep_not_null($banners['expires_impressions'])) { - if ( ($banners['expires_impressions'] > 0) && ($banners['banners_shown'] >= $banners['expires_impressions']) ) { - tep_set_banner_status($banners['banners_id'], '0'); - } - } - } - } - } - -//// -// Display a banner from the specified group or banner id ($identifier) - function tep_display_banner($action, $identifier) { - if ($action == 'dynamic') { - $banners_query = tep_db_query("select count(*) as count from banners where status = '1' and banners_group = '" . tep_db_input($identifier) . "'"); - $banners = tep_db_fetch_array($banners_query); - if ($banners['count'] > 0) { - $banner = tep_random_select("select banners_id, banners_title, banners_image, banners_html_text from banners where status = '1' and banners_group = '" . tep_db_input($identifier) . "'"); - } else { - return 'TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!'; - } - } elseif ($action == 'static') { - if (is_array($identifier)) { - $banner = $identifier; - } else { - $banner_query = tep_db_query("select banners_id, banners_title, banners_image, banners_html_text from banners where status = '1' and banners_id = '" . (int)$identifier . "'"); - if (tep_db_num_rows($banner_query)) { - $banner = tep_db_fetch_array($banner_query); - } else { - return 'TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive'; - } - } - } else { - return 'TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\''; - } - - if (tep_not_null($banner['banners_html_text'])) { - $banner_string = $banner['banners_html_text']; - } else { - $banner_string = '
' . tep_image('images/' . $banner['banners_image'], htmlspecialchars($banner['banners_title'])) . ''; - } - - tep_update_banner_display_count($banner['banners_id']); - - return $banner_string; - } - -//// -// Check to see if a banner exists - function tep_banner_exists($action, $identifier) { - if ($action == 'dynamic') { - return tep_random_select("select banners_id, banners_title, banners_image, banners_html_text from banners where status = '1' and banners_group = '" . tep_db_input($identifier) . "'"); - } elseif ($action == 'static') { - $banner_query = tep_db_query("select banners_id, banners_title, banners_image, banners_html_text from banners where status = '1' and banners_id = '" . (int)$identifier . "'"); - return tep_db_fetch_array($banner_query); - } else { - return false; - } - } - -//// -// Update the banner display statistics - function tep_update_banner_display_count($banner_id) { - $banner_check_query = tep_db_query("select count(*) as count from banners_history where banners_id = '" . (int)$banner_id . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')"); - $banner_check = tep_db_fetch_array($banner_check_query); - - if ($banner_check['count'] > 0) { - tep_db_query("update banners_history set banners_shown = banners_shown + 1 where banners_id = '" . (int)$banner_id . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')"); - } else { - tep_db_query("insert into banners_history (banners_id, banners_shown, banners_history_date) values ('" . (int)$banner_id . "', 1, now())"); - } - } - -//// -// Update the banner click statistics - function tep_update_banner_click_count($banner_id) { - tep_db_query("update banners_history set banners_clicked = banners_clicked + 1 where banners_id = '" . (int)$banner_id . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')"); - } -?> diff --git a/install/oscommerce.sql b/install/oscommerce.sql index ae2950625..9a53f57dd 100755 --- a/install/oscommerce.sql +++ b/install/oscommerce.sql @@ -63,35 +63,6 @@ CREATE TABLE administrators ( PRIMARY KEY (id) ) CHARACTER SET utf8 COLLATE utf8_unicode_ci; -DROP TABLE IF EXISTS banners; -CREATE TABLE banners ( - banners_id int NOT NULL auto_increment, - banners_title varchar(64) NOT NULL, - banners_url varchar(255) NOT NULL, - banners_image varchar(64) NOT NULL, - banners_group varchar(10) NOT NULL, - banners_html_text text, - expires_impressions int(7) DEFAULT '0', - expires_date datetime DEFAULT NULL, - date_scheduled datetime DEFAULT NULL, - date_added datetime NOT NULL, - date_status_change datetime DEFAULT NULL, - status int(1) DEFAULT '1' NOT NULL, - PRIMARY KEY (banners_id), - KEY idx_banners_group (banners_group) -) CHARACTER SET utf8 COLLATE utf8_unicode_ci; - -DROP TABLE IF EXISTS banners_history; -CREATE TABLE banners_history ( - banners_history_id int NOT NULL auto_increment, - banners_id int NOT NULL, - banners_shown int(5) NOT NULL DEFAULT '0', - banners_clicked int(5) NOT NULL DEFAULT '0', - banners_history_date datetime NOT NULL, - PRIMARY KEY (banners_history_id), - KEY idx_banners_history_banners_id (banners_id) -) CHARACTER SET utf8 COLLATE utf8_unicode_ci; - DROP TABLE IF EXISTS categories; CREATE TABLE categories ( categories_id int NOT NULL auto_increment, diff --git a/redirect.php b/redirect.php index 4ce65bddb..8f7c5bcf1 100644 --- a/redirect.php +++ b/redirect.php @@ -13,16 +13,6 @@ require('includes/application_top.php'); switch ($_GET['action']) { - case 'banner': - $banner_query = tep_db_query("select banners_url from banners where banners_id = '" . (int)$_GET['goto'] . "'"); - if (tep_db_num_rows($banner_query)) { - $banner = tep_db_fetch_array($banner_query); - tep_update_banner_click_count($_GET['goto']); - - tep_redirect($banner['banners_url']); - } - break; - case 'url': if (isset($_GET['goto']) && tep_not_null($_GET['goto'])) { $check_query = tep_db_query("select products_url from products_description where products_url = '" . tep_db_input($_GET['goto']) . "' limit 1"); From 7eebb6d7accf2d19192a16b37b5c6f20b976fe2f Mon Sep 17 00:00:00 2001 From: gburton Date: Thu, 24 Oct 2019 15:32:26 +0100 Subject: [PATCH 7/9] Full width Buy Button --- install/oscommerce.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/oscommerce.sql b/install/oscommerce.sql index 9a53f57dd..38b7e573d 100755 --- a/install/oscommerce.sql +++ b/install/oscommerce.sql @@ -1538,7 +1538,7 @@ insert into configuration (configuration_title, configuration_key, configuration insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_PI_DATE_AVAILABLE_SORT_ORDER', '70', 'Sort order of display. Lowest is displayed first.', '6', '0', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Buy Button', 'MODULE_CONTENT_PI_BUY_STATUS', 'True', 'Should this module be shown on the product info page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now()); -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_PI_BUY_CONTENT_WIDTH', '6', 'What width container should the content be shown in?', '6', '1', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now()); +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_PI_BUY_CONTENT_WIDTH', '12', 'What width container should the content be shown in?', '6', '1', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_PI_BUY_SORT_ORDER', '100', 'Sort order of display. Lowest is displayed first.', '6', '0', now()); #Product Reviews From 3cdde49a85229f1861f389f3bab6719864c5b540 Mon Sep 17 00:00:00 2001 From: gburton Date: Thu, 24 Oct 2019 15:33:07 +0100 Subject: [PATCH 8/9] Installer --- install/templates/main_page.php | 2 +- install/templates/pages/install_4.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install/templates/main_page.php b/install/templates/main_page.php index 620ac34ac..770472a68 100755 --- a/install/templates/main_page.php +++ b/install/templates/main_page.php @@ -34,7 +34,7 @@
-
From 35c52a1579f983a634e866e0ee8c3344f2d0629f Mon Sep 17 00:00:00 2001 From: gburton Date: Thu, 24 Oct 2019 21:43:42 +0100 Subject: [PATCH 9/9] Add Form Injection TY @raiwa for idea --- checkout_confirmation.php | 4 +++- checkout_payment.php | 4 ++++ checkout_payment_address.php | 2 ++ checkout_shipping.php | 4 ++++ checkout_shipping_address.php | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/checkout_confirmation.php b/checkout_confirmation.php index 7c92dd9e2..d5d95ebd8 100644 --- a/checkout_confirmation.php +++ b/checkout_confirmation.php @@ -227,8 +227,10 @@ call('siteWide', 'injectFormDisplay'); ?> - +
+ + call('siteWide', 'injectFormDisplay'); + ?>
diff --git a/checkout_payment_address.php b/checkout_payment_address.php index 15cb525dc..faebfe617 100644 --- a/checkout_payment_address.php +++ b/checkout_payment_address.php @@ -269,6 +269,8 @@ call('siteWide', 'injectFormDisplay'); ?>
diff --git a/checkout_shipping.php b/checkout_shipping.php index ae4934770..0ec24d1a0 100644 --- a/checkout_shipping.php +++ b/checkout_shipping.php @@ -291,6 +291,10 @@
+ call('siteWide', 'injectFormDisplay'); + ?> +
diff --git a/checkout_shipping_address.php b/checkout_shipping_address.php index e3b381dcf..6024956f4 100644 --- a/checkout_shipping_address.php +++ b/checkout_shipping_address.php @@ -278,6 +278,8 @@ call('siteWide', 'injectFormDisplay'); ?>