<?
/*if (!isset($_COOKIE['publiacb']))
{
  if ($_GET['set'] != 'yes')
  {
    setcookie("publiacb", "0-0-0", mktime(0,0,0,3,29,date("Y")), "/", "acb.com");
    header ("Location: redaccion.php?id=".$_GET['id']."&set=yes");
    exit;
  }
}
else
{
    $valor = $_COOKIE['publiacb'];
    $valor = explode("-",$valor);
//    echo "Valor: $valor[2]<br />";
    if ($valor[2]=="0")
    {
      header("Location: interstacb.php?id=".$_GET['id']);
      exit;
    }
    if ($valor[2]=="1")
    {
      $fecha = mktime(substr($valor[1],0,2),substr($valor[1],2,2),substr($valor[1],4,2),substr($valor[0],4,2),substr($valor[0],6,2)+2,substr($valor[0],0,4));
      if ($fecha <= time())
      {
        header("Location: interstacb.php?id=".$_GET['id']);
        exit;
      }
    }
}*/
require_once("../../F_bd.php");
require_once("../../F_constantes.php");
require_once("../../F_design.php");
require_once("../../F_formularios.php");
require_once("../../F_funciones.php");
$id_art = 117194;
if (!$id_art or (!is_numeric($id_art)))
{
  header("Location: $PATH_web/");
  exit;
}
$db  = pg_Connect($PGCONNECT);
$res = bd_exec($db,"select * from articulos where id_art=$id_art;");
$num = bd_numrows($res);
if (!$num)
{
   pg_close($db);
   header("Location: $PATH_web/");
}
bd_coge_variables($res);
if ($ocultar == "t")
{
   pg_close($db);
   header("Location: $PATH_web/");
}
include("../../cabecera_modelo.php");
$modelo = bd_exec($db,"select lower(substr(nombre,1,1)) as letra,grafico,nombre as modelo from modelos where id_mod=$id_mod;");
$letra = bd_result($modelo,0,'letra');
$grafico = bd_result($modelo,0,'grafico');
$modelo = bd_result($modelo,0,'modelo');
if ($id_aut)
{
   $aut = bd_exec($db,"select nombre,firma from autores where id_aut=$id_aut;");
   $autor = bd_result($aut,0,'nombre');
   $firmaautor = bd_result($aut,0,'firma');
}
if ($id_log and ($id_mod == 3)) // Tiene que ser un artículo para buscar el logotipo
{
   $log = bd_exec($db,"select nombre from logos_cabecera where id_log=$id_log;");
   $grafico = bd_result($log,0,'nombre');
}
$texto = stripslashes($texto);
$fot = bd_exec($db,"select a.align,a.pie,f.nombre from articulos_fotos a,fotos f where a.id_fot=f.id_fot and a.id_art=$id_art and f.id_def=$ID_DEF_ARTICULOS order by orden;");
$numf = bd_numrows($fot);
if (strpos($texto,"<f>") !== FALSE)
{
   for ($i=0;$i<$numf;$i++)
   {
      bd_coge_variables($fot,$i);
      $tamano = GetImageSize($FOTOS_web.$nombre);
      $ancho = $tamano[0];
      $alto = $tamano[1];
      $imagen = "<table border=\"0\" align=\"$align\" cellspacing=\"0\" cellpadding=\"0\">";
      if ($align == "left")
         $imagen .= "<tr><td width=\"150\"><img src=\"$FOTOS_web$nombre\" width=\"$ancho\" height=\"$alto\"></td><td width=\"15\"><img src=\"pixel.gif\" width=\"15\"></td></tr>";
      else
         $imagen .= "<tr><td width=\"15\"><img src=\"pixel.gif\" width=\"15\"></td><td width=\"150\"><img src=\"$FOTOS_web$nombre\" width=\"$ancho\" height=\"$alto\"></td></tr>";
      $imagen .= "<tr><td colspan=\"2\"><br></td></tr>";
      if ($align == "left")
         $imagen .= "<tr><td class=\"piefoto\">$pie</td><td width=\"15\"><img src=\"pixel.gif\" width=\"15\"></td></tr>";
      else
         $imagen .= "<tr><td width=\"15\"><img src=\"pixel.gif\" width=\"15\"></td><td class=\"piefoto\">$pie</td></tr>";
      $imagen .= "<tr><td colspan=\"2\"><br></td></tr></table>";
      $texto = str_replace_count("<f>",$imagen,$texto,1);
   }
}
else
{
   for ($i=0;$i<$numf;$i++)
   {
      bd_coge_variables($fot,$i);
      $tamano = GetImageSize($FOTOS_web.$nombre);
      $ancho = $tamano[0];
      $alto = $tamano[1];
      if ($i==0)
         $imagen = "<table border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"0\">";
      $imagen .= "<tr><td width=\"150\"><img src=\"$FOTOS_web$nombre\" width=\"$ancho\" height=\"$alto\"></td><td width=\"15\"><img src=\"pixel.gif\" width=\"15\"></td></tr>";
      $imagen .= "<tr><td colspan=\"2\"><br></td></tr>";
      $imagen .= "<tr><td class=\"piefoto\">$pie</td><td width=\"15\"><img src=\"pixel.gif\" width=\"15\"></td></tr>";
      $imagen .= "<tr><td colspan=\"2\"><br></td></tr>";
      if ($i==($numf-1))
         $imagen .= "</table>";
   }
      $texto = $imagen.$texto;
}
$tamano = GetImageSize($IMGS_web.$grafico);
$ancho = $tamano[0];
$alto = $tamano[1];?>
<link rel="stylesheet" href="<?=$PATH_web?>/css/redaccion.css" type="text/css">
<table width=1003 align=center cellspacing="0" cellpadding="0"><tr><td width=1003 bgcolor=#000000 align=center><div align=center><img src=http://www.acb.com/docs/imgs/bp3-laparadoja.jpg border=0 align=center width=1003></div></td></tr></table>
<div align=center><table class="cuerpoart" cellspacing="0" style="width:800px;" align=center>
<tr>
   <td width="2" valign="top" bgcolor=#000000><!-- <div class="menuseparacionblanco2"><img src="pixel.gif" width="145" height="5" alt=""></div><?include("izquierda_modelo.php")?> //--></td>
   <td width="30" bgcolor=#000000><br></td>
   <td width="940" valign="top" bgcolor=#FFFFFF>   <!-- <img src=http://www.acb.com/docs/imgs/uncleg.jpg align=left width=814> //-->
      <table width=800 bgcolor=#FFFFFF><td width="30" bgcolor=#FFFFFF><td width=800 bgcolor=#FFFFFF cellpadding=5><br>
	  <table align=center border=0 width=95%><td align=left width=100%><font size=4><div align=left><b>Su padre fue guardaespaldas de Jordan tras servir a la Marina en Espa&ntilde;a y su madre le entren&oacute; tras profetizar su gloria. El estudiante perfecto, el trabajador de hotel. El draft maldito, el tiro que cruz&oacute; dos vidas. La historia de Brandon Paul, por Daniel Barranquero</b></font></div></td></table>
	  <div style="float:right;margin-top:5px;">
        <div style="float:right;margin-left:5px;">&nbsp;&nbsp;&nbsp;
         <!-- <a onclick="window.open('http://www.tuenti.com/share?url=<?=$linktw?>', '_blank', 'height=375,width=600'); return false;" href="http://www.tuenti.com/share?url=<?=$linktw?>"><img src="<?=$IMGS_web?>tuenti.png" border="0" /></a> //-->
        </div>
        <div style="float:right;margin-left:5px;">
          <a name="fb_share" type="button_count" share_url="<?=$urltw?>" href="http://www.facebook.com/sharer.php">Compartir</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
        </div>

        <div style="float:right;">
          <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
        </div>
      </div><br><div class="cuerpoarticulo" style="width:780px; margin:10px;"><font size=2><?=$texto?></font></div>
<?if ($firma == "t") {?>      <div id="firmaarticulo"><?=stripslashes($firmaautor)?></div><?}?>
<td width="194" valign="top" align="left" bgcolor=#FFFFFF><br></td>
</tr>
</table>
<!-- <?escribe(pon_pie2());
pg_close($db);?> //-->
