por lo pronto, este archivo sí muestra una imagen:
Código:
<?php
header('Content-Type: image/gif;');
header('Content-Type: image/jpeg;');
include("../../adf/bdADF.php");
connect_db();
if(isset($_GET["categoryId"]))
$pk = $_GET["categoryId"];
else if(isset($_GET["objectId"]))
$pk = $_GET["objectId"];
else if(isset($_GET["workId"]))
$pk = $_GET["objectId"];
else if(isset($_GET["newId"]))
$pk = $_GET["newId"];
else if(isset($_GET["artistImage"]))
$pk = $_GET["artistImage"];
$type = $_GET["picType"];
if($type == "on"){
$query = "select onImage as image from category where category.id = $pk;";
} else if($type == "off"){
$query = "select offImage as image from category where category.id = $pk;";
} else if($type == "th"){
$query = "select thumbnail as image from category where category.id = $pk;";
} else if($type == "main"){
$query = "select mainImage as image from object where object.id = $pk;";
} else if($type == "th2"){
$query = "select thumbnail as image from object where object.id = $pk;";
} else if($type == "wMain"){
$query = "select mainImage as image from work where work.id = $pk;";
} else if($type == "wThumb"){
$query = "select thumbnail as image from work where work.id = $pk;";
} else if($type == "newsMain"){
$query = "select mainImage as image from news where news.id = $pk;";
} else if($type == "artistImage"){
$query = "select artistImage as image from artist where artist.id = $pk;";
}
$result = mysql_query($query);
//echo $result[0]["image"];
$array = array();
while($row = mysql_fetch_assoc($result)){
$array[] = $row;
}
echo $array[0]["image"];
?>
pero no logro encontrar la relación con el que no la muestra y sí debería...