[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 main_product_image.php

Zen Cart 源代码 main_product_image.php




下载文件

文件名: main_product_image.php
文件类型: PHP文件
文件大小: 2.53 KiB
MD5: 47caeb67c6639fa104370aabe8c2faea

main_product_image.php - 关闭高亮
  1. <?php
  2. /**mod Image Handler 4.3.2
  3.  * main_product_image module
  4.  *
  5.  * @package templateSystem
  6.  * @copyright Copyright 2005-2006 Tim Kroeger
  7.  * @copyright Copyright 2003-2006 Zen Cart Development Team
  8.  * @copyright Portions Copyright 2003 osCommerce
  9.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  10.  * @version $Id: main_product_image.php 4663 2006-10-02 04:08:32Z drbyte $
  11.  * Last modified by DerManoMann 2010-05-31 23:41:53
  12.  */
  13. if (!defined('IS_ADMIN_FLAG')) {
  14.   die('Illegal Access');
  15. }
  16. $products_image_extension = substr($products_image, strrpos($products_image, '.'));
  17. //Begin Image Handler changes 1 of 2
  18. //the next three lines are commented out for Image Handler 4
  19. //$products_image_base = str_replace($products_image_extension, '', $products_image);
  20. //$products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
  21. //$products_image_large = $products_image_base . IMAGE_SUFFIX_LARGE . $products_image_extension;
  22. $products_image_base = preg_replace('/'.$products_image_extension . '$/', '', $products_image);
  23. $products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
  24. $products_image_large  = DIR_WS_IMAGES . 'large/' . $products_image_base . IMAGE_SUFFIX_LARGE .  $products_image_extension;
  25. //End Image Handler changes 1 of 2
  26.  
  27. //Begin Image Handler changes 2 of 2 (this entire section is commented out for Image Handler 4)
  28. // check for a medium image else use small
  29. //if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
  30. //  $products_image_medium = DIR_WS_IMAGES . $products_image;
  31. //} else {
  32. //  $products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
  33. //}
  34. // check for a large image else use medium else use small
  35. //if (!file_exists(DIR_WS_IMAGES . 'large/' . $products_image_large)) {
  36. //  if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
  37. //    $products_image_large = DIR_WS_IMAGES . $products_image;
  38. //  } else {
  39. //    $products_image_large = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
  40. //  }
  41. //} else {
  42. //  $products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_large;
  43. //}
  44. //End Image Handler changes 2 of 2 (this entire section is commented out for Image Handler 4)
  45.   /*
  46.     echo
  47.     'Base ' . $products_image_base . ' - ' . $products_image_extension . '<br>' .
  48.     'Medium ' . $products_image_medium . '<br><br>' .
  49.     'Large ' . $products_image_large . '<br><br>';
  50.   */
  51. // to be built into a single variable string