Mini Shell
<?
//echo "pesquisa fotos:".$cod_produto;
require_once('conexao.php');
$sql="select cod_produto_foto,foto
from mayer_produtos_fotos
where
cod_empresa='$cod_empresa'
and
cod_produto='$cod_produto'
ORDER BY ordem ASC
;";
$query=mysqli_query($con,$sql);
$totitens=@mysqli_num_rows($query);
if ($totitens!="")
{
while($row = mysqli_fetch_array($query))
{
$cod_produto_foto=$row['cod_produto_foto'];
$foto=$row['foto'];
?>
<div class="foto_thumb">
<a href="excluir-produto-foto.php?cod_produto_foto=<?=$cod_produto_foto;?>&cod_produto=<?=$cod_produto;?>"> excluir </a>
<br>
<img height="128" src="<?=$base_url;?>/images/portfolio/produtos/<?=$foto?>" border="0">
</div>
<?
} //while($row = mysqli_fetch_array($query))
} //if ($totitens!="")
else
{
echo "Nenhuma foto cadastrada para este produto.";
} //else if ($totitens!="")
?>
<style type="text/css">
.foto_thumb {
display:table;
float:left;
background-color:#ffffff;
border:1px solid #323232;
width:200px;
height:128px;
text-align:center;
}
</style>
Zerion Mini Shell 1.0