ZenCart_Documentation  1.5.0
http://www.collinsharper.com
C:/xampp/htdocs/zen-cart/admin/popup_image.php
Go to the documentation of this file.
00001 <?php
00002 //
00003 // +----------------------------------------------------------------------+
00004 // |zen-cart Open Source E-commerce                                       |
00005 // +----------------------------------------------------------------------+
00006 // | Copyright (c) 2003 The zen-cart developers                           |
00007 // |                                                                      |
00008 // | http://www.zen-cart.com/index.php                                    |
00009 // |                                                                      |
00010 // | Portions Copyright (c) 2003 osCommerce                               |
00011 // +----------------------------------------------------------------------+
00012 // | This source file is subject to version 2.0 of the GPL license,       |
00013 // | that is bundled with this package in the file LICENSE, and is        |
00014 // | available through the world-wide-web at the following url:           |
00015 // | http://www.zen-cart.com/license/2_0.txt.                             |
00016 // | If you did not receive a copy of the zen-cart license and are unable |
00017 // | to obtain it through the world-wide-web, please send a note to       |
00018 // | [email protected] so we can mail you a copy immediately.          |
00019 // +----------------------------------------------------------------------+
00020 //  $Id: popup_image.php 1969 2005-09-13 06:57:21Z drbyte $
00021 //
00022 
00023   require('includes/application_top.php');
00024 
00025   reset($_GET);
00026   while (list($key, ) = each($_GET)) {
00027     switch ($key) {
00028       case 'banner':
00029         $banners_id = zen_db_prepare_input($_GET['banner']);
00030 
00031         $banner = $db->Execute("select banners_title, banners_image, banners_html_text
00032                                 from " . TABLE_BANNERS . "
00033                                 where banners_id = '" . (int)$banners_id . "'");
00034 
00035         $page_title = $banner->fields['banners_title'];
00036 
00037         if ($banner->fields['banners_html_text']) {
00038           $image_source = $banner->fields['banners_html_text'];
00039         } elseif ($banner->fields['banners_image']) {
00040           $image_source = zen_image(DIR_WS_CATALOG_IMAGES . $banner->fields['banners_image'], $page_title);
00041         }
00042         break;
00043     }
00044   }
00045 ?>
00046 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
00047 <html <?php echo HTML_PARAMS; ?>>
00048 <head>
00049 <title><?php echo $page_title; ?></title>
00050 <script language="javascript"><!--
00051 var i=0;
00052 
00053 function resize() {
00054   if (navigator.appName == 'Netscape') i = 40;
00055   window.resizeTo(document.images[0].width + 30, document.images[0].height + 60 - i);
00056 }
00057 //--></script>
00058 </head>
00059 <body onload="resize();">
00060 <?php echo $image_source; ?>
00061 </body>
00062 </html>
 All Data Structures Namespaces Files Functions Variables Enumerations