Ver Mensaje Individual
  #16 (permalink)  
Antiguo 12/11/2012, 11:29
Avatar de andreamorante184
andreamorante184
 
Fecha de Ingreso: agosto-2012
Mensajes: 65
Antigüedad: 11 años, 8 meses
Puntos: 0
Respuesta: se puede pasar en una funcion por el metodo post

Primer Archivo
<?php
include("conectarme.php");
$link=Conectarse();

if (!isset($limit)) {
$limit = 1;
}

$SqlQuery = ""SELECT c, t, s, t1, (SELECT n FROM i WHERE pagina = 'G' AND i.s=t2.c AND destacada =1 ORDER BY fecha DESC LIMIT $limit) AS i FROM t2";


$result = mysql_query ($SqlQuery);
while ($row=mysql_fetch_array($result))
{
if ($row["c"]=='H' )
{
$imagen = "g/g/" . $row["i"];
$php = "g.php";
}

else if($row ["c"]=='CV' )
{
$imagen = "g/gc/" . $row["i"];
$php = "gc.php";
}
else if ($row ["c"]=='ElC' )
{
$imagen = "g/gdel/" . $row["i"];
$php = "gelp.php";
}
else if ($row ["c"]=='Eco' )
{
$imagen = "g/geco/" . $row["i"];
$php = "eco.php";
}

else if ($row ["c"]=='Ta' )
{
$imagen = "g/gta/" . $row["i"];
$php = "gta.php";
}
else if ($row ["c"]=='Epu' )
{
$imagen = "g/gp/" . $row["i"];
$php = "gelpueblo.php";
}
else if ($row ["c"]=='E' )
{
$imagen = "g/ge/" .$row["i"];
$php = "ge.php";
}
else if ($row ["c"]=='LCi' )
{
$imagen = "g/gciu/" .$row["i"];
$php = "gci.php";
}
else if ($row ["c"]=='QS' )
{
$imagen = "g/gqs/" .$row["i"];
$php = "gps.php";
}
else if ($row ["c"]=='NSe' )
{
$imagen = "g/gns/" .$row["i"];
$php = "gns.php";
}
else if ($row ["c"]=='Act' )
{
$imagen = "g/gai/" .$row["i"];
$php = "gai.php";
}
else if ($row ["c"]=='AE' )
{
$imagen = "g/ge/" .$row["i"];
$php = "ga.php";
}
else if ($row ["c"]=='T' )
{
$imagen = "g/gt/" .$row["i"];
$php = "gt.php";
}

$tabla .= "<tr><td height='167' colspan='2'><div align='center'><a href='" . $php . "' target='_parent'><img src='". $imagen . "' width='160' height='141' border='0'></a></div></td></tr>";

$tabla .= "<tr><td height='37' colspan='2' class='Estilo53' valign='top'><div align='center'><a href='" . $php . "' title='Galeria " . $row["titulo"] . "' target='_parent' style='text-decoration:none; color: #000000;'>Album / " . $row["subtitulo"] . "</a> </div></td></tr>";

}
echo($tabla);
__________________
Andrea Morante