Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pop Up Image is not resizing


getitdone99

Recommended Posts

Can anyone tell us why when you click on ther image to enlarge it the pop up box that opens doesn't resize to the height/width of the picture? It only opens a small box and then you have to resize it.

 

Here is the code in the popup_image.php:

============================================

<?php

 

/*

 

$Id: popup_image.php,v MoPics 6 2003/06/05 23:26:23 Exp $

 

 

 

osCommerce, Open Source E-Commerce Solutions

 

http://www.oscommerce.com

 

 

 

Copyright © 2003 osCommerce

 

 

 

Released under the GNU General Public License

 

Updated by John Wood - www.z-is.net

 

*/

 

 

 

require('includes/application_top.php');

 

 

 

$navigation->remove_current_page();

 

 

 

$products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");

 

$products = tep_db_fetch_array($products_query);

 

// BOF: More Pics 6

 

$PID = $HTTP_GET_VARS['pID'];

 

$invis = $HTTP_GET_VARS['invis'];

 

$result = mysql_query("select * from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

 

// EOF: More Pics 6

 

?>

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

<html <?php echo HTML_PARAMS; ?>>

 

<head>

 

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

 

<title><?php echo $products['products_name']; ?></title>

 

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

 

<script language="javascript"><!--

 

var i=0;

 

function resize() {

 

<?php // BOF: More Pics 6 ?>

 

if (document.layers) i=40;

 

if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+200-i);

 

<?php // EOF: More Pics 6 ?>

 

self.focus();

 

}

 

//--></script>

 

<?php // BOF: More Pics 6 ?>

 

<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">

 

<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">

 

<?php // EOF: More Pics 6 ?>

 

</head>

 

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

 

<?php // BOF: More Pics 6 ?>

 

<table border="0" cellpadding="0" cellspacing="0" align="center">

 

<?php // Lets find the last available image !

 

$image = tep_db_fetch_array($result);

 

if ($image['products_subimage6'] != ''){

 

$last = '6';

 

}elseif ($image['products_subimage5'] != ''){

 

$last = '5';

 

}elseif ($image['products_subimage4'] != ''){

 

$last = '4';

 

}elseif ($image['products_subimage3'] != ''){

 

$last = '3';

 

}elseif ($image['products_subimage2'] != ''){

 

$last = '2';

 

}elseif ($image['products_subimage1'] != ''){

 

$last = '1';

 

}elseif ($image['products_image'] != ''){

 

$last = '0';

 

}

 

$next = $invis + '1';

 

$back = $invis - '1';

 

?>

 

<?php

 

if (($invis == '0') || ($invis == '')){

 

$insert = $image['products_image'];

 

} else {

 

$insert = $image['products_subimage' . $invis. ''];

 

}

 

 

 

$img = DIR_WS_IMAGES . $insert;

 

echo '<tr><td align="center"><img src="' . $img . '"></td>';

 

?> </tr>

 

<tr>

 

<td height="0" align="center"></td></tr>

 

<tr>

 

<td height="20" align="center">

 

<?php

 

if (($back != '-1') || ($next <= $last)) {

 

echo '<hr color="#666666" size="3">';

 

}

 

if ($back != '-1'){

 

echo '<a href="'.tep_href_link('popup_image.php','pID='.$PID.'&invis='.$back).'">' . tep_image(DIR_WS_IMAGES.'left.gif', 'previous', '', '', 'border="0"') . '</a> ';

 

}

 

if ($next <= $last){

 

echo '<a href="'.tep_href_link('popup_image.php','pID='.$PID.'&invis='. $next).'">' . tep_image(DIR_WS_IMAGES.'right.gif', 'next', '', '', 'border="0"') . '</a>';

 

}

 

echo '</td></tr>';

 

?>

 

</table>

 

<?php // EOF: More Pics 6 ?><script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

<script type="text/javascript">

var pageTracker = _gat._getTracker("UA-5638206-1");

pageTracker._trackPageview();

</script></body>

 

 

</html>

 

<?php require('includes/application_bottom.php'); ?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...