"; 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 = 123682; 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,"") !== FALSE) { for ($i=0;$i<$numf;$i++) { bd_coge_variables($fot,$i); $tamano = GetImageSize($FOTOS_web.$nombre); $ancho = $tamano[0]; $alto = $tamano[1]; $imagen = ""; if ($align == "left") $imagen .= ""; else $imagen .= ""; $imagen .= ""; if ($align == "left") $imagen .= ""; else $imagen .= ""; $imagen .= "

$pie
$pie

"; $texto = str_replace_count("",$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 = ""; $imagen .= ""; $imagen .= ""; $imagen .= ""; $imagen .= ""; if ($i==($numf-1)) $imagen .= "

$pie

"; } $texto = $imagen.$texto; } $tamano = GetImageSize($IMGS_web.$grafico); $ancho = $tamano[0]; $alto = $tamano[1];?>