require_once('cabecalho.php');
$sql = "select c.categoria,
c1.id,
upper(c1.categoria) as subcategoria,
c1.imagem_on,
c1.imagem_off
from categorias c
left join categorias c1 on substring(c1.codigo, 1, 2) = substring(c.codigo, 1, 2) and coalesce(c1.ativo, 0) = 1 and instr(c1.codigo, '.') > 0
where c.id = {$_GET['id']}
and coalesce(c.ativo, 0) = 1
and (c1.liberacao = 1 or c1.liberacao is null)
order by c1.codigo";
$res = mysql_query($sql, $conexao);
while($row = mysql_fetch_assoc($res)){
$dados[] = $row;
}
?>
|
if($dados[0]['id']){
?>
for($i = 0; $i < sizeof($dados); $i++){
if($i % 4 == 0){
if($i != 0){
?>
}
?>
}
?>
|
}
if($i != 0){
?>
}
?>
} else {
?>
}
?>
|
require_once('rodape.php');
?>