관리-도구
편집 파일: popup_image.php
<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2003 The zen-cart developers | // | | // | http://www.zen-cart.com/index.php | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.zen-cart.com/license/2_0.txt. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | license@zen-cart.com so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: popup_image.php 1969 2005-09-13 06:57:21Z drbyte $ // require('includes/application_top.php'); reset($_GET); while (list($key, ) = each($_GET)) { switch ($key) { case 'banner': $banners_id = zen_db_prepare_input($_GET['banner']); $banner = $db->Execute("select banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where banners_id = '" . (int)$banners_id . "'"); $page_title = $banner->fields['banners_title']; if ($banner->fields['banners_html_text']) { $image_source = $banner->fields['banners_html_text']; } elseif ($banner->fields['banners_image']) { $image_source = zen_image(DIR_WS_CATALOG_IMAGES . $banner->fields['banners_image'], $page_title); } break; } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <title><?php echo $page_title; ?></title> <script language="javascript"><!-- var i=0; function resize() { if (navigator.appName == 'Netscape') i = 40; window.resizeTo(document.images[0].width + 30, document.images[0].height + 60 - i); } //--></script> </head> <body onload="resize();"> <?php echo $image_source; ?> </body> </html>