[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/ -> popup_image.php (source)

   1  <?php
   2  /*

   3  $Id: popup_image.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  // For adding in contribution or modification - parts of this file has been moved to: catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).

  15  //       catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).

  16  // (Sub 'fallback' with your current template to see if there is a template specific file.)

  17  
  18    require ('includes/application_top.php');
  19  
  20  // LINE ADDED: MOD - dynamic mopics functions

  21    require (DIR_WS_FUNCTIONS . 'dynamic_mopics.php');
  22  
  23  // LINE ADDED

  24    require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . FILENAME_POPUP_IMAGE);
  25  
  26  // BOF: MOD - Search engine friendly urls

  27    if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
  28      if (isset($HTTP_GET_VARS)) $_GET =& $HTTP_GET_VARS;
  29    }
  30  // EOF: MOD - Search engine friendly urls

  31    $navigation->remove_current_page();
  32  
  33    $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
  34    $product_info = tep_db_fetch_array($products_query);
  35  
  36  // BOF: MOD - dynamic mopics functions

  37  // Set the large image's basename; replaces "imagebase" in the user's pattern

  38    $image_base_lg = mopics_get_imagebase($product_info['products_image'], DIR_WS_IMAGES . DYNAMIC_MOPICS_BIGIMAGES_DIR);
  39  
  40  // Validate the image type

  41    $allowed_types = explode(',', str_replace(' ', '', DYNAMIC_MOPICS_BIG_IMAGE_TYPES));
  42    if (!in_array($_GET['type'], $allowed_types)) {
  43      die("Requested image was not found.");
  44    }
  45  
  46    if (isset($_GET['pic']) && tep_not_null($_GET['pic'])) {
  47  
  48    // Get the current count

  49      $i = $_GET['pic'];
  50  
  51      // Set the search for the str_replace pattern search/replace

  52      $search = array('imagebase', mopics_match_pattern(DYNAMIC_MOPICS_PATTERN));
  53  
  54      // Set the replace for the str_replace pattern search/replace

  55      $replace = array($image_base_lg, $i);
  56  
  57      // Set the large image

  58      $image = str_replace($search, $replace, DYNAMIC_MOPICS_PATTERN) . '.' . $_GET['type'];
  59  
  60    } else {
  61      $image = $image_base_lg . '.' . $_GET['type'];
  62    }
  63  // BOF: MOD - dynamic mopics functions

  64    $content = CONTENT_POPUP_IMAGE;
  65    $javascript = $content . '.js';
  66    $body_attributes = ' onload="resize();"';
  67  
  68    require(DIR_WS_TEMPLATES . TEMPLATENAME_POPUP);
  69  
  70    require ('includes/application_bottom.php');
  71  ?>


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