#!/usr/bin/perl


########################################################
#                                                      #
# Gestdb v1.0 by Michela Fontana                       #
# Website : http://www.calzatura.com                   #
# Created : 15/10/2001                                 #
#                                                      #
########################################################

############   ADJUST THESE VARIABLES   ################

        use CGI;
        use DBI;

# Get the form variables
	if ($ENV{'REQUEST_METHOD'} eq 'GET') {
        	$buffer = $ENV{'QUERY_STRING'};
	}	
	else {
        	read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
	}
# Break em up into a format the script can read
	@pairs = split(/&/, $buffer);
	foreach $pair (@pairs) {
        	($name, $value) = split(/=/, $pair);
        	$value =~ tr/+/ /;
        	$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
        	$FORM{$name} = $value;
	}

# Get the heading information

  $headfile = '/italy/head/head_motore.txt';

   unless (open (DATA,"$headfile")) {die (&error);}
		if ($uselock eq '1') {
			flock DATA, 2;
			seek DATA, 0, 0;
		}
		@headinfo = <DATA>;
		if ($uselock eq '1') {
			flock DATA, 8;
		}
	close (DATA);
	foreach $headline (@headinfo){
		$heading = $heading.$headline;
	}

# Get the footer information

  $footfile = '/italy/head/foot.txt';

   unless (open (DATA,"$footfile")) {die (&error);}
		if ($uselock eq '1') {
			flock DATA, 2;
			seek DATA, 0, 0;
		}
		@footinfo = <DATA>;
		if ($uselock eq '1') {
			flock DATA, 8;
		}
	close (DATA);
	foreach $footline (@footinfo){
		$footing = $footing.$footline;
	}

$id = $FORM{'id'};
$utente   = $FORM{'utente'};
$chiave = $FORM{'chiave'};
$identificativo = $FORM{'identificativo'};
$lingua = $FORM{'lingua'};

print "Content-type: text/html\n\n";
print "$heading";

##################################################################################

# Open DB connection
$dbh = DBI->connect("DBI:mysql:calzatura_com_calzatura:mysql.register.it", GS1219_CALZATURA, michela);
if (!dbh) { print "Errore!"; }


($id, $titoloita, $titoloeng, $titolospa, $titolo, $titolotipo, $newsita, $newseng, $newsspa, $news,
$fotoA, $fotoB, $fotoC, $fotoD,
$tit1ita, $tit1eng, $tit1spa, $tit1, $tit2ita, $tit2eng, $tit2spa, $tit2,
$tit3ita, $tit3eng, $tit3spa, $tit3, $tit4ita, $tit4eng, $tit4spa, $tit4,
$fonte, $imgfonte, $numero, $data,
$psw, $categoria) = $dbh->selectrow_array("SELECT 
    ID, TITOLOITA, TITOLOENG, TITOLOSPA, TITOLO, TITOLOTIPO,
                                 NEWSITA, NEWSENG, NEWSSPA, NEWS,
                                 FOTOA, FOTOB, FOTOC, FOTOD,
                                 TIT1ITA, TIT1ENG, TIT1SPA, TIT1, TIT2ITA, TIT2ENG, TIT2SPA, TIT2,
                                 TIT3ITA, TIT3ENG, TIT3SPA, TIT3, TIT4ITA, TIT4ENG, TIT4SPA, TIT4,
                                 FONTE, IMGFONTE, NUMERO, DATA, PSW, CATEGORIA
                          FROM News
                          WHERE ID='$id'");
$i = $currentline;
$trovato = 'no';
$ident = '';



($iconaita, $iconaeng, $iconaspa, $iconaimg) = $dbh->selectrow_array("SELECT CATITA, CATENG, CATSPA, IMG FROM Icone WHERE CATITA='$categoria'");
($nomenazione,$imgnazione) = $dbh->selectrow_array("SELECT NAZIONE,IMMAGINE FROM Nazioni WHERE ID='$titolotipo'");

$fotourlA='http://www.calzatura.com/cgi/news/'.$fotoA;
$fotourlB='http://www.calzatura.com/cgi/news/'.$fotoB;
$fotourlC='http://www.calzatura.com/cgi/news/'.$fotoC;
$fotourlD='http://www.calzatura.com/cgi/news/'.$fotoD;
$fotourlF='http://www.calzatura.com/cgi/news/'.$imgfonte;

if (($fonte eq 'Ars Arpel') && ($imgfonte eq '')) { $fotourlF = 'http://www.calzatura.com/cgi/riviste/arpel.jpg'; }
if (($fonte eq 'Ars Sutoria') && ($imgfonte eq '')) { $fotourlF = 'http://www.calzatura.com/cgi/riviste/ars.jpg'; }
if (($fonte eq 'Calzatura') && ($imgfonte eq '')) { $fotourlF = 'http://www.calzatura.com/cgi/riviste/calzatura.jpg'; }
if (($fonte eq 'Fotoshoe') && ($imgfonte eq '')) { $fotourlF = 'http://www.calzatura.com/cgi/riviste/fotoshoe.jpg'; }
if (($fonte eq 'International Technology') && ($imgfonte eq '')) { $fotourlF = 'http://www.calzatura.com/cgi/riviste/it.jpg'; }
if (($fonte eq 'Leather International') && ($imgfonte eq '')) { $fotourlF = 'http://www.calzatura.com/cgi/riviste/leather.jpg'; }
if (($fonte eq 'Serma') && ($imgfonte eq '')) { $fotourlF = 'http://www.calzatura.com/cgi/riviste/serma.jpg'; }
if (($fonte eq 'Shoe Intelligence') && ($imgfonte eq '')) { $fotourlF = 'http://www.calzatura.com/cgi/riviste/shoeintelligence.jpg'; }

#######################################################

if ($lingua eq 'ita') {
print "$heading";

print "<body topmargin=0 bgcolor=#E8E8E8 leftmargin=2 link=#305790 vlink=#4375C0 alink=#305790 text=#305790>
<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td width=50% bgcolor=#808080 valign=center><font face=Verdana color=#FFFFFF size=2><p align=center><strong>NEWS DAL MONDO:</strong></font></p></td>
    <td width=20% bgcolor=#CDDEFD valign=center><p align=center><font face=Verdana color=#000080><small><small><strong>";

if (($fonte ne '') || ($imgfonte ne '')) {
if (($urlfonte ne '') && ($imgfonte ne '')) { print "F</strong>onte:<br><a href=$urlfonte target=_blank><img src=$fotourlF width=70 height=35 alt='$fonte' border=0></a><br>"; }
if (($urlfonte ne '') && ($imgfonte eq '')) { print "F</strong>onte:<br><a href=$urlfonte target=_blank>&quot; $fonte &quot;</a><br>"; }
if (($urlfonte eq '') && ($imgfonte ne '')) { print "F</strong>onte:<br><img src=$fotourlF width=70 height=35 alt='$fonte' border=0><br>"; }
if (($urlfonte eq '') && ($imgfonte eq '')) { print "F</strong>onte:<br>&quot;$fonte&quot;<br>"; }
}

print "</small></small></font></td>
       <td width=30% bgcolor=#CDDEFD valign=middle><font face=Verdana color=#000080><small><small><strong>";

if ($fonte ne '') {
print "$fonte</strong><br>";
}

if ($numero ne '') {
print "N° &nbsp;&nbsp; $numero &nbsp;&nbsp; ";
}

@vardata = split(/-/,$data);

if (($data ne '0000-00-00') && ($data ne '') && ($data ne '--')) {
print "&nbsp; Del &nbsp; $vardata[2]/$vardata[1]/$vardata[0]";
}

print "</small></small></font></td>
     </tr>
   </table>
<div align=center>

<table border=0 cellpadding=3 cellspacing=3 width=100%>
  <tr>
    <td width=100% bgcolor=#000080><p align=center><font face=Verdana color=#ffffff><small><strong>$titoloita </small></font></td>
  </tr>
</table>
<div align=center><center>";

if ($fotoA ne '') {

print "<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td valign=top width=178><div align=center><center><table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlA target=_blank><img src=$fotourlA width=150 height=150 alt='$tit1ita' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit1ita</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=left><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoB ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlB target=_blank><img src=$fotourlB width=150 height=150 alt='$tit2ita' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit2ita</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
    <td width=448 valign=top><font face=Verdana size=2 color=#000080>$newsita</font></td>
    <td width=149 valign=top><div align=center><center>";

if ($fotoC ne '') {
print "<table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlC target=_blank><img src=$fotourlC width=150 height=150 alt='$tit3ita' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit3ita</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=right><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoD ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlD target=_blank><img src=$fotourlD width=150 height=150 alt='$tit4ita' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit4ita</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
  </tr>
</table>
</center></div>
</body>";

print "$footing";

$dbh->disconnect;

exit;
}

#############################################################

if ($lingua eq 'eng') {
print "$heading";

print "<body topmargin=0 bgcolor=#E8E8E8 leftmargin=2 link=#305790 vlink=#4375C0 alink=#305790 text=#305790>
<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td width=50% bgcolor=#808080 valign=center><font face=Verdana color=#FFFFFF size=2><p align=center><strong>WORLD NEWS:</strong></font></p></td>
    <td width=20% bgcolor=#CDDEFD valign=center><p align=center><font face=Verdana color=#000080><small><small><strong>";

if (($fonte ne '') || ($imgfonte ne '')) {
if (($urlfonte ne '') && ($imgfonte ne '')) { print "S</strong>ource:<br><a href=$urlfonte target=_blank><img src=$fotourlF width=70 height=35 alt='$fonte' border=0></a><br>"; }
if (($urlfonte ne '') && ($imgfonte eq '')) { print "S</strong>ource:<br><a href=$urlfonte target=_blank>&quot; $fonte &quot;</a><br>"; }
if (($urlfonte eq '') && ($imgfonte ne '')) { print "S</strong>ource:<br><img src=$fotourlF width=70 height=35 alt='$fonte' border=0><br>"; }
if (($urlfonte eq '') && ($imgfonte eq '')) { print "S</strong>ource:<br>&quot;$fonte&quot;<br>"; }
}

print "</small></small></font></td>
       <td width=30% bgcolor=#CDDEFD valign=middle><font face=Verdana color=#000080><small><small><strong>";

if ($fonte ne '') {
print "$fonte</strong><br>";
}

if ($numero ne '') {
print "N° &nbsp;&nbsp; $numero &nbsp;&nbsp; ";
}

@vardata = split(/-/,$data);

if (($data ne '0000-00-00') && ($data ne '')) {
print "&nbsp;&nbsp; $vardata[2]/$vardata[1]/$vardata[0]";
}

print "</small></small></font></td>
     </tr>
   </table>
<div align=center>

<table border=0 cellpadding=3 cellspacing=3 width=100%>
  <tr>
    <td width=100% bgcolor=#000080><p align=center><font face=Verdana color=#ffffff><small><strong>$titoloita </small></font></td>
  </tr>
</table>
<div align=center><center>";

if ($fotoA ne '') {

print "<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td valign=top width=178><div align=center><center><table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlA target=_blank><img src=$fotourlA width=150 height=150 alt='$tit1eng' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit1eng</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=left><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoB ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlB target=_blank><img src=$fotourlB width=150 height=150 alt='$tit2eng' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit2eng</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
    <td width=448 valign=top><font face=Verdana size=2 color=#000080>$newseng</font></td>
    <td width=149 valign=top><div align=center><center>";

if ($fotoC ne '') {
print "<table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlC target=_blank><img src=$fotourlC width=150 height=150 alt='$tit3eng' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit3eng</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=right><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoD ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlD target=_blank><img src=$fotourlD width=150 height=150 alt='$tit4eng' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit4eng</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
  </tr>
</table>
</center></div>
</body>";

print "$footing";

$dbh->disconnect;

exit;
}

#############################################################

if ($lingua eq 'spa') {
print "$heading";

print "<body topmargin=0 bgcolor=#E8E8E8 leftmargin=2 link=#305790 vlink=#4375C0 alink=#305790 text=#305790>
<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td width=50% bgcolor=#808080 valign=center><font face=Verdana color=#FFFFFF size=2><p align=center><strong>NOTICIAS DEL MUNDO:</strong></font></p></td>
    <td width=20% bgcolor=#CDDEFD valign=center><p align=center><font face=Verdana color=#000080><small><small><strong>";

if (($fonte ne '') || ($imgfonte ne '')) {
if (($urlfonte ne '') && ($imgfonte ne '')) { print "O</strong>rigen:<br><a href=$urlfonte target=_blank><img src=$fotourlF width=70 height=35 alt='$fonte' border=0></a><br>"; }
if (($urlfonte ne '') && ($imgfonte eq '')) { print "O</strong>rigen:<br><a href=$urlfonte target=_blank>&quot; $fonte &quot;</a><br>"; }
if (($urlfonte eq '') && ($imgfonte ne '')) { print "O</strong>rigen:<br><img src=$fotourlF width=70 height=35 alt='$fonte' border=0><br>"; }
if (($urlfonte eq '') && ($imgfonte eq '')) { print "O</strong>rigen:<br>&quot;$fonte&quot;<br>"; }
}

print "</small></small></font></td>
       <td width=30% bgcolor=#CDDEFD valign=middle><font face=Verdana color=#000080><small><small><strong>";

if ($fonte ne '') {
print "$fonte</strong><br>";
}

if ($numero ne '') {
print "N° &nbsp;&nbsp; $numero &nbsp;&nbsp; ";
}

@vardata = split(/-/,$data);

if (($data ne '0000-00-00') && ($data ne '')) {
print "&nbsp;&nbsp; $vardata[2]/$vardata[1]/$vardata[0]";
}

print "</small></small></font></td>
     </tr>
   </table>
<div align=center>

<table border=0 cellpadding=3 cellspacing=3 width=100%>
  <tr>
    <td width=100% bgcolor=#000080><p align=center><font face=Verdana color=#ffffff><small><strong>$titoloita </small></font></td>
  </tr>
</table>
<div align=center><center>";

if ($fotoA ne '') {

print "<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td valign=top width=178><div align=center><center><table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlA target=_blank><img src=$fotourlA width=150 height=150 alt='$tit1spa' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit1spa</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=left><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoB ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlB target=_blank><img src=$fotourlB width=150 height=150 alt='$tit2spa' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit2spa</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
    <td width=448 valign=top><font face=Verdana size=2 color=#000080>$newsspa</font></td>
    <td width=149 valign=top><div align=center><center>";

if ($fotoC ne '') {
print "<table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlC target=_blank><img src=$fotourlC width=150 height=150 alt='$tit3spa' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit3spa</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=right><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoD ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlD target=_blank><img src=$fotourlD width=150 height=150 alt='$titspa' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit4spa</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
  </tr>
</table>
</center></div>
</body>";

print "$footing";

$dbh->disconnect;

exit;
}

#############################################################

if ($lingua eq 'ling') {
print "$heading";

print "<body topmargin=0 bgcolor=#E8E8E8 leftmargin=2 link=#305790 vlink=#4375C0 alink=#305790 text=#305790>
<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td width=50% bgcolor=#808080 valign=center><font face=Verdana color=#FFFFFF size=2><p align=center><strong>WORLD NEWS:</strong></font></p></td>
    <td width=20% bgcolor=#CDDEFD valign=center><p align=center><font face=Verdana color=#000080><small><small><strong>";

if ($fonte eq 'Ars Arpel') {
print "P</strong>ublished in:<br><a href=http://www.calzatura.com/web/arsarpel/index.htm target=_blank><img src=http://www.calzatura.com/cgi/riviste/arpel.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Ars Sutoria') {
print "P</strong>ublished in:<br><a href=http://www.calzatura.com/web/arsarpel/index.htm target=_blank><img src=http://www.calzatura.com/cgi/riviste/ars.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Fotoshoe') {
print "P</strong>ublished in:<br><img src=http://www.calzatura.com/cgi/riviste/fotoshoe.jpg width=70 height=35 alt='$fonte' border=0>";
}

if ($fonte eq 'International Technology') {
print "P</strong>ublished in:<br><a href=http://www.calzatura.com/web/internationaltechnology/index.htm target=_blank><img src=http://www.calzatura.com/cgi/riviste/it.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Leather International') {
print "P</strong>ublished in:<br><img src=http://www.calzatura.com/cgi/riviste/leather.jpg width=70 height=35 border=0 alt='$fonte'>";
}

if ($fonte eq 'Serma') {
print "P</strong>ublished in:<br><a href=http://www.serma.net target=_blank><img src=http://www.calzatura.com/cgi/riviste/serma.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Shoe Intelligence') {
print "P</strong>ublished in:<br><a href=http://www.calzatura.com/web/shoeintelligence/index.htm target=_blank><img src=http://www.calzatura.com/cgi/riviste/shoeintelligence.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Calzatura') {
print "P</strong>ublished in:<br><a href=http://www.calzatura.com target=_top><img src=http://www.calzatura.com/cgi/riviste/calzatura.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if (($fonte ne 'Ars Arpel') && ($fonte ne 'Ars Sutoria') && ($fonte ne 'Fotoshoe') &&
($fonte ne 'International Technology') && ($fonte ne 'Leather International') &&
($fonte ne 'Serma') && ($fonte ne 'Shoe Intelligence') &&($fonte ne 'Calzatura') &&
($fonte ne '')) {
print "P</strong>ublished in:<br><img src=$fotourlF width=70 height=35 alt='$fonte' border=0>";
}

print "</small></small></font></td>
       <td width=30% bgcolor=#CDDEFD valign=middle><font face=Verdana color=#000080><small><small><strong>";

if ($fonte ne '') {
print "$fonte</strong><br>";
}

if ($numero ne '') {
print "N° &nbsp;&nbsp; $numero &nbsp;&nbsp; ";
}

@vardata = split(/-/,$data);

if (($data ne '0000-00-00') && ($data ne '')) {
print "&nbsp;&nbsp; $vardata[2]/$vardata[1]/$vardata[0]";
}

print "</small></small></font></td>
     </tr>
   </table>
<div align=center>

<table border=0 cellpadding=3 cellspacing=3 width=100%>
  <tr>
    <td width=100% bgcolor=#000080><p align=center><font face=Verdana color=#ffffff><small><strong>$titoloita </small></font></td>
  </tr>
</table>
<div align=center><center>";

if ($fotoA ne '') {

print "<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td valign=top width=178><div align=center><center><table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlA target=_blank><img src=$fotourlA width=150 height=150 alt='$tit1' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit1</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=left><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoB ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlB target=_blank><img src=$fotourlB width=150 height=150 alt='$tit2' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit2</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
    <td width=448 valign=top><font face=Verdana size=2 color=#000080>$news</font></td>
    <td width=149 valign=top><div align=center><center>";

if ($fotoC ne '') {
print "<table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlC target=_blank><img src=$fotourlC width=150 height=150 alt='$tit3' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit3</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=right><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoD ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlD target=_blank><img src=$fotourlD width=150 height=150 alt='$tit' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>$tit4</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
  </tr>
</table>
</center></div>
</body>";

print "$footing";

$dbh->disconnect;

exit;
}

#############################################################
print "$heading";

print "<body topmargin=0 bgcolor=#E8E8E8 leftmargin=2 link=#305790 vlink=#4375C0 alink=#305790 text=#305790>
<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td width=50% bgcolor=#808080 valign=center><font face=Verdana color=#FFFFFF size=2><p align=center><strong>NEWS DAL MONDO:</strong></font></p></td>
    <td width=20% bgcolor=#CDDEFD valign=center><p align=center><font face=Verdana color=#000080><small><small><strong>";

if ($fonte eq 'Ars Arpel') {
print "F</strong>onte:<br><a href=http://www.calzatura.com/web/arsarpel/index.htm target=_blank><img src=http://www.calzatura.com/cgi/riviste/arpel.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Ars Sutoria') {
print "F</strong>onte:<br><a href=http://www.calzatura.com/web/arsarpel/index.htm target=_blank><img src=http://www.calzatura.com/cgi/riviste/ars.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Fotoshoe') {
print "F</strong>onte:<br><img src=http://www.calzatura.com/cgi/riviste/fotoshoe.jpg width=70 height=35 alt='$fonte' border=0>";
}

if ($fonte eq 'International Technology') {
print "F</strong>onte:<br><a href=http://www.calzatura.com/web/internationaltechnology/index.htm target=_blank><img src=http://www.calzatura.com/cgi/riviste/it.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Leather International') {
print "F</strong>onte:<br><img src=http://www.calzatura.com/cgi/riviste/leather.jpg width=70 height=35 border=0 alt='$fonte'>";
}

if ($fonte eq 'Serma') {
print "F</strong>onte:<br><a href=http://www.serma.net target=_blank><img src=http://www.calzatura.com/cgi/riviste/serma.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Shoe Intelligence') {
print "F</strong>onte:<br><a href=http://www.calzatura.com/web/shoeintelligence/index.htm target=_blank><img src=http://www.calzatura.com/cgi/riviste/shoeintelligence.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if ($fonte eq 'Calzatura') {
print "F</strong>onte:<br><a href=http://www.calzatura.com target=_top><img src=http://www.calzatura.com/cgi/riviste/calzatura.jpg width=70 height=35 alt='$fonte' border=0></a>";
}

if (($fonte ne 'Ars Arpel') && ($fonte ne 'Ars Sutoria') && ($fonte ne 'Fotoshoe') &&
($fonte ne 'International Technology') && ($fonte ne 'Leather International') &&
($fonte ne 'Serma') && ($fonte ne 'Shoe Intelligence') &&($fonte ne 'Calzatura') &&
($fonte ne '')) {
print "F</strong>onte:<br><img src=$fotourlF width=70 height=35 alt='$fonte' border=0>";
}

print "</small></small></font></td>
       <td width=30% bgcolor=#CDDEFD valign=middle><font face=Verdana color=#000080><small><small><strong>";

if ($fonte ne '') {
print "$fonte</strong><br>";
}

if ($numero ne '') {
print "N° &nbsp;&nbsp; $numero &nbsp;&nbsp; ";
}

@vardata = split(/-/,$data);

if (($data ne '0000-00-00') && ($data ne '')) {
print "&nbsp; Del &nbsp; $vardata[2]/$vardata[1]/$vardata[0]";
}

print "</small></small></font></td>
     </tr>
   </table>
<div align=center>

<table border=0 cellpadding=3 cellspacing=3 width=100%>
  <tr>
    <td width=100% bgcolor=#000080><p align=center><font face=Verdana color=#ffffff><small><strong>";

if ($titoloita ne '') { print "$titoloita"; }
else {
    if ($titoloeng ne '') { print "$titoloeng"; }
       else {
          if ($titolospa ne '') { print "$titolospa"; }
             else {
               if ($titolo ne '') { print "$titolo"; }
} } }

print "</small></font></td>
  </tr>
</table>
<div align=center><center>";

if ($fotoA ne '') {

print "<table border=0 cellpadding=3 cellspacing=0 width=100%>
  <tr>
    <td valign=top width=178><div align=center><center><table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlA target=_blank><img src=$fotourlA width=150 height=150 alt='";

if ($tit1ita ne '') { print "$tit1ita"; }
else {
    if ($tit1eng ne '') { print "$tit1eng"; }
       else {
          if ($tit1spa ne '') { print "$tit1spa"; }
             else {
               if ($tit1 ne '') { print "$tit1"; }
} } }

print "' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>";

if ($tit1ita ne '') { print "$tit1ita"; }
else {
    if ($tit1eng ne '') { print "$tit1eng"; }
       else {
          if ($tit1spa ne '') { print "$tit1spa"; }
             else {
               if ($tit1 ne '') { print "$tit1"; }
} } }

print "</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=left><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoB ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlB target=_blank><img src=$fotourlB width=150 height=150 alt='";

if ($tit2ita ne '') { print "$tit2ita"; }
else {
    if ($tit2eng ne '') { print "$tit2eng"; }
       else {
          if ($tit2spa ne '') { print "$tit2spa"; }
             else {
               if ($tit2 ne '') { print "$tit2"; }
} } }

print "' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>";

if ($tit2ita ne '') { print "$tit2ita"; }
else {
    if ($tit2eng ne '') { print "$tit2eng"; }
       else {
          if ($tit2spa ne '') { print "$tit2spa"; }
             else {
               if ($tit2 ne '') { print "$tit2"; }
} } }

print "</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
    <td width=448 valign=top><font face=Verdana size=2 color=#000080>";

if ($newsita ne '') { print "$newsita"; }
else {
    if ($newseng ne '') { print "$newseng"; }
       else {
          if ($newsspa ne '') { print "$newsspa"; }
             else {
               if ($news ne '') { print "$news"; }
} } }

print "</font></td>
    <td width=149 valign=top><div align=center><center>";

if ($fotoC ne '') {
print "<table border=0 cellpadding=0
    cellspacing=0 width=100% height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlC target=_blank><img src=$fotourlC width=150 height=150 alt='";

if ($tit3ita ne '') { print "$tit3ita"; }
else {
    if ($tit3eng ne '') { print "$tit3eng"; }
       else {
          if ($tit3spa ne '') { print "$tit3spa"; }
             else {
               if ($tit3 ne '') { print "$tit3"; }
} } }

print "' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>";

if ($tit3ita ne '') { print "$tit3ita"; }
else {
    if ($tit3eng ne '') { print "$tit3eng"; }
       else {
          if ($tit3spa ne '') { print "$tit3spa"; }
             else {
               if ($tit3 ne '') { print "$tit3"; }
} } }

print "</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div><p align=right><br>
    <br>
    <br>
    </p>
    <div align=center><center>";

if ($fotoD ne '') {
print "<table border=0 cellpadding=0 cellspacing=0 width=100%
    height=150>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>
        &nbsp;&nbsp;&nbsp;&nbsp; </small></small></small></small></small></small></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=106 width=1></td>
        <td bgcolor=#95B9FB height=150 width=150 valign=middle><p align=center>
        <a href=$fotourlD target=_blank><img src=$fotourlD width=150 height=150 alt='";

if ($tit4ita ne '') { print "$tit4ita"; }
else {
    if ($tit4eng ne '') { print "$tit4eng"; }
       else {
          if ($tit4spa ne '') { print "$tit4spa"; }
             else {
               if ($tit4 ne '') { print "$tit4"; }
} } }

print"' border=0></a></td>
        <td bgcolor=#CDDEFD height=106></td>
      </tr>
      <tr>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small>&nbsp;</small></small></small></small></small></small></td>
        <td bgcolor=#CDDEFD height=1><font face=Verdana size=1 color=#000080>";

if ($tit4ita ne '') { print "$tit4ita"; }
else {
    if ($tit4eng ne '') { print "$tit4eng"; }
       else {
          if ($tit4spa ne '') { print "$tit4spa"; }
             else {
               if ($tit4 ne '') { print "$tit4"; }
} } }

print "</font></td>
        <td bgcolor=#CDDEFD height=1><small><small><small><small><small><small></small></small></small></small></small></small></td>
      </tr>
    </table>";
}

print "</center></div></td>
  </tr>
</table>
</center></div>
</body>";

print "$footing";

$dbh->disconnect;

exit;

##################################################################################


sub error {    
	$noshow = 1;
	print "<CENTER><FONT $font><h2>File Access Error</h2><P><B>You have an error in your PATH configuration variables in the $ENV{'SCRIPT_NAME'} file.</B><P>Your server reports that your BASE path is : $ENV{'DOCUMENT_ROOT'}<BR>Note that this is reported as your BASE path, not the FULL path to your files.<P>If you require help installing this script please consider purchasing the professional version of this script. Your purchase includes full tech support and installation.<P><B>Get it at : <A HREF=http://www.getperl.com/easysearch/>http://www.getperl.com/easysearch/</A></B></FONT></CENTER><P>\n";
	&footer;
}
