[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文件
文件大小: 1.7 KiB
MD5: c6b91e9fcc5917a43e8482c7c39bedb0

main_product_image.php - 关闭高亮
  1. <?php
  2. /**
  3.  * main_product_image module
  4.  *
  5.  * @package templateSystem
  6.  * @copyright Copyright 2003-2006 Zen Cart Development Team
  7.  * @copyright Portions Copyright 2003 osCommerce
  8.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  9.  * @version $Id: main_product_image.php 4663 2006-10-02 04:08:32Z drbyte $
  10.  */
  11. if (!defined('IS_ADMIN_FLAG')) {
  12.   die('Illegal Access');
  13. }
  14. $products_image_extension = substr($products_image, strrpos($products_image, '.'));
  15. $products_image_base = str_replace($products_image_extension, '', $products_image);
  16. $products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
  17. $products_image_large = $products_image_base . IMAGE_SUFFIX_LARGE . $products_image_extension;
  18.  
  19. // check for a medium image else use small
  20. if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
  21.   $products_image_medium = DIR_WS_IMAGES . $products_image;
  22. } else {
  23.   $products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
  24. }
  25. // check for a large image else use medium else use small
  26. if (!file_exists(DIR_WS_IMAGES . 'large/' . $products_image_large)) {
  27.   if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
  28.     $products_image_large = DIR_WS_IMAGES . $products_image;
  29.   } else {
  30.     $products_image_large = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
  31.   }
  32. } else {
  33.   $products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_large;
  34. }
  35. /*
  36. echo
  37. 'Base ' . $products_image_base . ' - ' . $products_image_extension . '<br>' .
  38. 'Medium ' . $products_image_medium . '<br><br>' .
  39. 'Large ' . $products_image_large . '<br><br>';
  40. */
  41. // to be built into a single variable string
  42.  
  43. ?>