<?php

include ("setup.php");


echo'
<body topmargin="0">';



if($mod=='INTROGALERIA')
{

echo'
<table border="0" cellspacing="0" cellpadding="0" width="300">
<tr>
<td valign="top" align="left">';

$sql = "select * from galeriafotos where idsupercat = 'link' order by nome  ASC";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '

<a href="index.php?mod=GALERIAFOTOS&md=CATGALERIAFOTOS&supercat='.$valor["supercategoria"].'" title="'.$valor["supercategoria"].'">
<img src="/wpg/images/'.$valor["foto"].'"  border="0" width="30" height="40">
</a>';


         }
     }//end while

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


}







if($md=='SUPERCATGALERIAFOTOS')
{

echo'
<div align="left">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.php?mod=GALERIAFOTOS&md=SUPERCATGALERIAFOTOS">
<font size="2">
In&iacute;cio
</font>
</a>
<font size="2">
 / 
</font>
</div>
<br>

<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="20">
</td>
';


$sql = "select * from galeriafotos where idsupercat = 'link' order by idsupercat ASC";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '
<td valign="top" 
onmouseout="nereidFade(this,100,10,50)"
onmouseover="nereidFade(this,60,10,30)"
style="FILTER: alpha(opacity=100)">

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" valign="top" width="50" align="left">
<a href="index.php?mod=GALERIAFOTOS&md=CATGALERIAFOTOS&supercat='.$valor["supercategoria"].'">
<img src="/wpg/images/'.$valor["foto"].'"  border="0" width="80" height="60">
</a>
</td>
</tr>
<tr>
<td valign="top" align="left">
<a href="index.php?mod=GALERIAFOTOS&md=CATGALERIAFOTOS&supercat='.$valor["supercategoria"].'">
<font size="2">
'.$valor["supercategoria"].'
</font>
</a>
</td>
</tr>
</table>

</td>';

         }
     }//end while



echo'
</tr>
</table>';


}




if($md=='CATGALERIAFOTOS')
{

echo'
<div align="left">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.php?mod=GALERIAFOTOS&md=SUPERCATGALERIAFOTOS">
<font size="2">
In&iacute;cio
</font>
</a>
<font size="2">
 / 
</font>
<font size="2">
'.$supercat.'
</font>
</div>
<br>


<table  border="0">
<tr>';

$sql = "select * from galeriafotos where idcat = 'link' and supercategoria = '$supercat' order by idcat  ASC limit 0,4";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '
<td valign="top" width="25%" align="center"
onmouseout="nereidFade(this,100,10,50)"
onmouseover="nereidFade(this,60,10,30)"
style="FILTER: alpha(opacity=100)">

<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">

<img src="/wpg/images/'.$valor["foto"].'"  border="0" width="100" height="80">

</a>

<br>

<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">
<font size="2">
'.$valor["categoria"].'
</font>
</a>

<br><br>

</td>';


         }
     }//end while

echo'
</tr>
<tr>';

$sql = "select * from galeriafotos where idcat = 'link' and supercategoria = '$supercat' order by idcat ASC limit 4,4";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '
<td valign="top" width="25%" align="center"
onmouseout="nereidFade(this,100,10,50)"
onmouseover="nereidFade(this,60,10,30)"
style="FILTER: alpha(opacity=100)">


<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">

<img src="/wpg/images/'.$valor["foto"].'"  border="0" width="100" height="80">

</a>

<br>

<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">
<font size="2">
'.$valor["categoria"].'
</font>
</a>

<br><br>

</td>';


         }
     }//end while

echo'
</tr>
<tr>';

$sql = "select * from galeriafotos where idcat = 'link' and supercategoria = '$supercat' order by idcat ASC limit 8,4";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '
<td valign="top" width="25%" align="center"
onmouseout="nereidFade(this,100,10,50)"
onmouseover="nereidFade(this,60,10,30)"
style="FILTER: alpha(opacity=100)">


<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">

<img src="/wpg/images/'.$valor["foto"].'"  border="0" width="100" height="80">

</a>

<br>

<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">
<font size="2">
'.$valor["categoria"].'
</font>
</a>

<br><br>

</td>';


         }
     }//end while

echo'
</tr>
<tr>';

$sql = "select * from galeriafotos where idcat = 'link' and supercategoria = '$supercat' order by idcat ASC limit 12,4";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '
<td valign="top" width="25%" align="center"
onmouseout="nereidFade(this,100,10,50)"
onmouseover="nereidFade(this,60,10,30)"
style="FILTER: alpha(opacity=100)">


<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">

<img src="/wpg/images/'.$valor["foto"].'"  border="0" width="100" height="80">

</a>

<br>

<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">
<font size="2">
'.$valor["categoria"].'
</font>
</a>

<br><br>

</td>';


         }
     }//end while

echo'
</tr>
<tr>';

$sql = "select * from galeriafotos where idcat = 'link' and supercategoria = '$supercat' order by idcat ASC limit 16,4";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '
<td valign="top" width="25%" align="center"
onmouseout="nereidFade(this,100,10,50)"
onmouseover="nereidFade(this,60,10,30)"
style="FILTER: alpha(opacity=100)">


<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">

<img src="/wpg/images/'.$valor["foto"].'"  border="0" width="100" height="80">

</a>

<br>

<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'">
<font size="2">
'.$valor["categoria"].'
</font>
</a>

<br><br>

</td>';


         }
     }//end while

echo'
</tr>
</table>';

}





if($md=='SUBCATGALERIAFOTOS')
{

echo'
<div align="left">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.php?mod=GALERIAFOTOS&md=SUPERCATGALERIAFOTOS">
<font size="2">
In&iacute;cio
</font>
</a>
<font size="2">
 / 
</font>
<font size="2">
<a href="index.php?mod=GALERIAFOTOS&md=CATGALERIAFOTOS&supercat='.$supercat.'">
'.$supercat.'
</a>
</font>
<font size="2">
 / 
</font>
<font size="2">
'.$cat.'
</font>
</div>
<br>';


echo '
<center>
<table border="0" cellspacing="15">
<tr>';

$sql = "select * from galeriafotos where idsubcat = 'link' and supercategoria = '$supercat' and categoria = '$cat' order by nome  ASC";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '
<td width="100" valign="top" align="left"
onmouseout="nereidFade(this,100,10,50)"
onmouseover="nereidFade(this,60,10,30)"
style="FILTER: alpha(opacity=100)">

<a href="index.php?mod=GALERIAFOTOS&md=SLIDESHOW&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'&subcat='.$valor["subcategoria"].'&id='.$valor["id"].'">

<img src="/wpg/images/'.$valor["foto"].'"  border="0" width="120" height="100">

</a>

<br>

<a href="index.php?mod=GALERIAFOTOS&md=SLIDESHOW&supercat='.$valor["supercategoria"].'&cat='.$valor["categoria"].'&subcat='.$valor["subcategoria"].'&cod=11">
<font size="2">
'.$valor["subcategoria"].'
</font>
</a>

</td>';


         }
     }//end while

echo'
</tr>
</table>
</center>';

}








 if($md=='SLIDESHOW')
     {

echo'
<div align="left">

<!--

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.php?mod=GALERIAFOTOS&md=SUPERCATGALERIAFOTOS">
<font size="2">
In&iacute;cio
</font>
</a>
<font size="2">
 / 
</font>
<font size="2">
<a href="index.php?mod=GALERIAFOTOS&md=CATGALERIAFOTOS&supercat='.$supercat.'">
'.$supercat.'
</a>
</font>
<font size="2">
 / 
</font>
<font size="2">
<a href="index.php?mod=GALERIAFOTOS&md=SUBCATGALERIAFOTOS&supercat='.$supercat.'&cat='.$cat.'">
'.$cat.'
</a>
</font>
<font size="2">
 / 
</font>
<font size="2">
'.$subcat.'
</font>
</div>

-->


<br>
<div align="right">
<table cellpadding="0" cellspacing="0" width="100%" border="0" height="100%">
<tr>
<td width="30">
</td>
<td align="left" valign="top">';

include ("menu_slideshowgaleria.php");

echo'
</td>
<td width="10">
</td>
<td align="left" valign="top">';


include ("fotos.php");

echo'
</td>
<td width="20">
</td>
<td align="left" valign="top">';

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

     }





 if($md == 'FOTO')
     {

echo'
<div align="right">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<table border="0" height="100%">
<tr>
<td width="80">
</td>
<td align="left" valign="top">';

include ("menu_slideshowgaleria.php");

echo'
</td>
<td width="20">
</td>
<td align="right" valign="top">';

include ("fotos.php");

echo'
</td>
<td width="20">
</td>
<td align="left" valign="top">';

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

    }



echo'
</body>';




?>






