⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 product_notifications.php

📁 PHP 建站工具,CMS系统,类似与oscommerce
💻 PHP
字号:
<?php
/* -----------------------------------------------------------------------------------------
   $Id: product_notifications.php,v 1.1 2004/02/07 23:02:54 oldpa Exp $   

   TWE-Commerce - community made shopping   http://www.oldpa.com.tw   Copyright (c) 2003 TWE-Commerce
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(product_notifications.php,v 1.7 2003/05/25); www.oscommerce.com 
   (c) 2003	 nextcommerce (product_notifications.php,v 1.9 2003/08/17); www.nextcommerce.org   
   (c) 2003	 xt-commerce  www.xt-commerce.com
   Released under the GNU General Public License 
---------------------------------------------------------------------------------------*/
$box_smarty = new smarty;
$box_smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/'); 
$box_content='';
  // include needed files
  require_once(DIR_FS_INC . 'twe_get_products_name.inc.php');

  if (isset($_GET['products_id'])) {

    if (isset($_SESSION['customer_id'])) {
      $check_query = twe_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int)$_GET['products_id'] . "' and customers_id = '" . (int)$_SESSION['customer_id'] . "'");
      $check = twe_db_fetch_array($check_query);

      $notification_exists = (($check['count'] > 0) ? true : false);
    } else {
      $notification_exists = false;
    }

    $info_box_contents = array();
    if ($notification_exists == true) {
      $box_content = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . twe_href_link(basename($PHP_SELF), twe_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . twe_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a></td><td class="infoBoxContents"><a href="' . twe_href_link(basename($PHP_SELF), twe_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, twe_get_products_name($_GET['products_id'])) .'</a></td></tr></table>';
    } else {
      $box_content = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . twe_href_link(basename($PHP_SELF), twe_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . twe_image(DIR_WS_IMAGES . 'box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a></td><td class="infoBoxContents"><a href="' . twe_href_link(basename($PHP_SELF), twe_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY, twe_get_products_name($_GET['products_id'])) .'</a></td></tr></table>';
    }

  }




    $box_smarty->assign('BOX_CONTENT', $box_content);

 	$box_smarty->assign('language', $_SESSION['language']);
    	  // set cache ID
  if (USE_CACHE=='false') {
  $box_smarty->caching = 0;
  $box_notifications= $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_notifications.html');
  } else {
  $box_smarty->caching = 1;	
  $box_smarty->cache_lifetime=CACHE_LIFETIME;
  $box_smarty->cache_modified_check=CACHE_CHECK;
  $cache_id = $_SESSION['language'].$_GET['products_id'];
  $box_notifications= $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_notifications.html',$cache_id);
  }
    $box_notifications= $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_notifications.html');
    $smarty->assign('box_NOTIFICATIONS',$box_notifications);
    
    ?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -