[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 源代码 popup_image.php

Zen Cart 源代码 popup_image.php




下载文件

文件名: popup_image.php
文件类型: PHP文件
文件大小: 2.61 KiB
MD5: 606e5f6a9b6d82053b489c2317b4a194

popup_image.php - 关闭高亮
  1. <?php
  2. //
  3. // +----------------------------------------------------------------------+
  4. // |zen-cart Open Source E-commerce                                       |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 2003 The zen-cart developers                           |
  7. // |                                                                      |
  8. // | http://www.zen-cart.com/index.php                                    |
  9. // |                                                                      |
  10. // | Portions Copyright (c) 2003 osCommerce                               |
  11. // +----------------------------------------------------------------------+
  12. // | This source file is subject to version 2.0 of the GPL license,       |
  13. // | that is bundled with this package in the file LICENSE, and is        |
  14. // | available through the world-wide-web at the following url:           |
  15. // | http://www.zen-cart.com/license/2_0.txt.                             |
  16. // | If you did not receive a copy of the zen-cart license and are unable |
  17. // | to obtain it through the world-wide-web, please send a note to       |
  18. // | license@zen-cart.com so we can mail you a copy immediately.          |
  19. // +----------------------------------------------------------------------+
  20. //  $Id: popup_image.php 1969 2005-09-13 06:57:21Z drbyte $
  21. //
  22.  
  23.   require('includes/application_top.php');
  24.  
  25.   reset($_GET);
  26.   while (list($key, ) = each($_GET)) {
  27.     switch ($key) {
  28.       case 'banner':
  29.         $banners_id = zen_db_prepare_input($_GET['banner']);
  30.  
  31.         $banner = $db->Execute("select banners_title, banners_image, banners_html_text
  32.                                from " . TABLE_BANNERS . "
  33.                                where banners_id = '" . (int)$banners_id . "'");
  34.  
  35.         $page_title = $banner->fields['banners_title'];
  36.  
  37.         if ($banner->fields['banners_html_text']) {
  38.           $image_source = $banner->fields['banners_html_text'];
  39.         } elseif ($banner->fields['banners_image']) {
  40.           $image_source = zen_image(DIR_WS_CATALOG_IMAGES . $banner->fields['banners_image'], $page_title);
  41.         }
  42.         break;
  43.     }
  44.   }
  45. ?>
  46. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  47. <html <?php echo HTML_PARAMS; ?>>
  48. <head>
  49. <title><?php echo $page_title; ?></title>
  50. <script language="javascript"><!--
  51. var i=0;
  52.  
  53. function resize() {
  54.   if (navigator.appName == 'Netscape') i = 40;
  55.   window.resizeTo(document.images[0].width + 30, document.images[0].height + 60 - i);
  56. }
  57. //--></script>
  58. </head>
  59. <body onload="resize();">
  60. <?php echo $image_source; ?>
  61. </body>
  62. </html>