juesevett Adelbert
I tried your alteration to the code with same results.
PHP Version: PHP 4.x
Test link: Test.php
It shows the photo and gives me an error message. If I refresh it, the photo disappears and I get a different error message.
Code on Test.php:
<?php require_once( "webassist/caching/CachedResize_Image.php" ); ?>
<?php require_once('Connections/Celebrity.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_Celebrity, $Celebrity);
$query_rsGalleries = "SELECT * FROM tbl_gallerycategories ORDER BY CategoryName ASC";
$rsGalleries = mysql_query($query_rsGalleries, $Celebrity) or die(mysql_error());
$row_rsGalleries = mysql_fetch_assoc($rsGalleries);
$totalRows_rsGalleries = mysql_num_rows($rsGalleries);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<a href="GalleryDetail.php?Category=<?php echo $row_rsGalleries['ID']; ?>">
<?php
if(TRUE){ // Begin Cached Resized Image: ImageCacheInstance_1288705059835
ob_start();
?>
<img src="CelebrityRanch/assets/gallery/<?php echo $row_rsGalleries['ID']; ?>/<?php echo $row_rsGalleries['Photo']; ?>" alt="<?php echo $row_rsGalleries['PhotoAlt']; ?>" name="thumb" width="109" height="109" border="0" class="mediaimage" />
<?php
echo(getCachedResizedImageHTML(ob_get_clean(), "image_cache", "crop", "", false));
} // End Cached Resized Image: ImageCacheInstance_1288705059835
?>
</a>
</body>
</html>
<?php
mysql_free_result($rsGalleries);
?>