[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/boxes/ -> product_notifications.php (source)

   1  <?php
   2  /*

   3  $Id: product_notifications.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13  // Most of this file is changed or moved to BTS - Basic Template System - format.

  14  
  15  
  16    if (isset($HTTP_GET_VARS['products_id'])) {
  17          if (tep_session_is_registered('customer_id')) {
  18                $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
  19        $check = tep_db_fetch_array($check_query);
  20        if ($check['count'] < 0) {
  21        
  22  ?>
  23  <!-- notifications //-->
  24  <?php
  25      $boxHeading = BOX_HEADING_NOTIFICATIONS;
  26      $corner_left = 'square';
  27      $corner_right = 'square';
  28      $boxLink = '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '"><img src="images/infobox/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
  29      $box_base_name = 'product_notifications'; // for easy unique box template setup (added BTSv1.2)

  30      $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)

  31  
  32      if (tep_session_is_registered('customer_id')) {
  33        $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int)$customer_id . "'");
  34        $check = tep_db_fetch_array($check_query);
  35  
  36        $notification_exists = (($check['count'] > 0) ? true : false);
  37      } else {
  38        $notification_exists = false;
  39      }
  40  
  41      if ($notification_exists == true) {
  42        $boxContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><center><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a></center></td></tr><tr><td class="infoBoxContents"><center><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></center></td></tr></table>';
  43      } else {
  44        $boxContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><center><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a></center></td></tr><tr><td class="infoBoxContents"><center><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></center></td></tr></table>';
  45      }
  46  
  47  
  48  
  49  
  50  
  51  include (bts_select('boxes', $box_base_name)); // BTS 1.5

  52      $boxLink = '';
  53    }
  54  }
  55  }
  56  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7