<?php
  $result=mysql_query("select * from events where id='".$id."' and (tipo_contenido='2' or tipo_contenido='".$current_valid."') and estado='1'",$link);
  $row=mysql_fetch_array($result) or die();
?>   
    <table width="100%"  border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td class="verddeu"><p><img src="img/titol4.gif" width="465" height="27"></p></td>
      </tr>
      <tr>
        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="31%" bgcolor="#EEEFF1" class="docegrana">&nbsp;</td>
            <td width="20%" bgcolor="#EEEFF1" class="docegrana">&nbsp;</td>
            <td width="26%" bgcolor="#EEEFF1" class="docegrana">&nbsp;</td>
            <td width="23%" bgcolor="#EEEFF1" class="docegrana"><a href="inicio.php?page=event1">Mes activitats&gt;&gt; </a></td>
          </tr>
          <tr>
            <td colspan="4" valign="top"><table width="100%" cellpadding="2" cellspacing="2" class="tabbajo">
              <tr>
                <td width="31%" valign="top" class="verddeu"><p align="justify"><a href="javascript:history.back();">&lt;&lt;Tornar</a></p></td>
                <td width="69%" valign="top" class="verddeu"><div align="left"></div></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="364" valign="top">      
<table width="100%" cellpadding="2" cellspacing="2" class="tabbajo">
  <tr bgcolor="#EEEFF1">
    <td width="76%" valign="top" class="verddeu"><strong><span class="docegrana"><a href="#"><img src="img/icon4.gif" width="12" height="8" border="0"></a></span><?php echo $row["titulo"]; ?></strong></td>
    <td width="24%" valign="top" class="verddeu"><div align="center">
<?php if($row["form"]=='0') { ?>
<?php echo convert_date($row["fecha"]); ?>
<?php } else { ?>
<a href="inicio.php?page=formacio_form&id=<?php echo $id; ?>">Inscripcions>></a>
<?php } ?>
    </div></td>
  </tr>
  <tr>
    <td height="159" colspan="2" valign="top" class="verddeu">
      <table width="100%"  border="0" cellpadding="1" cellspacing="1" class="verddeu">
        <tr >
          <td colspan="2"><strong>Lloc de l'acte: </strong><?php echo $row["lugar"]; ?></td>
        </tr>
        <tr >
          <td height="15" colspan="2"><strong>Data: </strong><?php echo convert_date($row["fecha"]); ?></td>
        </tr>
        <tr >
          <td colspan="2"><strong>Hora: </strong><?php echo substr($row["inicio"],0,5)." - ".substr($row["fin"],0,5); ?></td>
        </tr>
        <tr>
          <td width="76%">&nbsp;</td>
          <td width="24%">&nbsp;</td>
        </tr>
        <tr>
<td colspan="2" valign="top" class="verddeu" ><p align="justify"><strong>Acte:</strong> <?php echo html_entity_decode($row["resumen"]); ?></p>
                <table width="100%"  border="0" cellspacing="2" cellpadding="2">
                  <tr>
<?php
  if($row["foto1"]!="") {
?>
                    <td class="verddeu" width="46%"><div align="center"><a href="javascript:vent('showimage.php?file=<?php echo $row["foto1"]; ?>',300,300)"><img src="../admin/phpthumb/phpThumb.php?src=../files/<?php echo $row["foto1"]; ?>&w=150&h=100" border="0"></a><br><?php echo $row["piefoto1"]; ?></div></td>
<?php
  }
  if($row["foto2"]!="") {
?>
                    <td class="verddeu" width="46%"><div align="center"><a href="javascript:vent('showimage.php?file=<?php echo $row["foto2"]; ?>',300,300)"><img src="../admin/phpthumb/phpThumb.php?src=../files/<?php echo $row["foto2"]; ?>&w=150&h=100" border="0"></a><br><?php echo $row["piefoto2"]; ?></div></td>
<?php
  }
?>
                  </tr>
                </table><p align="justify"><?php echo html_entity_decode($row["noticia_ampliada"]); ?></p>
                </td>
        <tr>
          <td width="76%">&nbsp;</td>
          <td width="24%">&nbsp;</td>
        </tr>
<?php
  if($row["email"]!="") {
?>
        <tr>
          <td colspan="2" ><strong>Correu : </strong><a href="mailto:<?php echo $row["email"]; ?>"><?php echo $row["email"]; ?></a></td>
        </tr>
<?php
  }
  if($row["url_relacionada"]!="") {
?>
        <tr>
          <td colspan="2" ><strong>Web relaccionada: </strong><a href="<?php echo $row["url_relacionada"]; ?>" target="_new"><?php echo $row["url_relacionada"]; ?></a></td>
        </tr>
<?php
  }
  if($row["form"]=='1') {
?>
        <tr>
          <td colspan="2" ><strong>Formulari d'inscripció: </strong><a href="http://www.elcol-legi.org/web/inicio.php?page=formacio_form&id=<?php echo $id; ?>">Faci clic aqu&iacute; per accedir al formulari d'inscripci&oacute;</a></td>
        </tr>
<?php
  }
?>
      </table>
    </td>
  </tr>
</table>
<?php 
  mysql_free_result($result);
  showextend($id,"evento");
?>
          <br>
          <a href="javascript:history.back();" class="verddeu">&lt;&lt;Tornar</a></td>
      </tr>
    </table>
