Jump to content


Photo

Exibir Imagens Lado A Lado


  • Faça o login para participar
2 replies to this topic

#1 ricardinho27

ricardinho27

    Novato no fórum

  • Usuários
  • 1 posts
  • Sexo:Masculino
  • Localidade:colatina

Posted 17/08/2010, 16:25

Boa tarde a todos.. meunome é Ricardo, sou novo em PHo e precisava da ajuda de vocês... Bom, é o seguinte, tenho um sistema para cadastramento de galeria de fotos.. o sistema cadastra a foto, faz tudo direito.. só tem um problema... não consigo colocar as fotos da minha galeria lado a laro.. ela fica uma embaixo da outra quando cadastro elas... Será que podem em ajudar? estou enviando o script

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>GALERIA FOTOS</title>

<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #333333;
}
a:hover {
text-decoration: none;
color: #FF6600;
}
a:active {
text-decoration: none;
}
body {
background-color: #FFFFFF;
}
-->
</style></head>

<?php
include("conecta.php");

@$acao="$_GET[acao]";
?>
<body marginheight="0" marginwidth="0" background="imagens/fundo_kras_w600h900_2.gif" topmargin="0" leftmargin="0">
<div>
<div align="center"><?php fotos_todas();?></div>
</div>
</body>
</html>

<?php function fotos_todas(){?>
<table width="100%" cellspacing="-1">
<tr>
<td align="center" valign="top">
<?php
@$pagina="$_GET[pagina]";
$busca="select * from galeria order by id desc";
$total_reg = "3"; // número de registros por página
$pagina=$pagina;
$i=0;
if (!$pagina) {$pc = "1";} else { $pc = $pagina;}
$inicio = $pc - 1;
$inicio = $inicio * $total_reg;
$limite = mysql_query("$busca LIMIT $inicio,$total_reg");
$todos = mysql_query("$busca");
$tr = mysql_num_rows($todos); // verifica o número total de registros
$tp = $tr / $total_reg; // verifica o número total de páginas

$x1=0;$id="";
while ($dados1 = mysql_fetch_array($limite)) {
$hash1=$dados1["hash"];
$nome1=$dados1["nome"];
$data1=$dados1["data"];
$id1=$dados1["id"];
if($i%2==0){$class="";}else{$class="#990100";}
?>
<table cellspacing=0 width="100%"><tr><td>
<table width='100%' cellspacing=0 width="100%" class="menuhd_2">
<?php
if($dados1){
$result_1=mysql_query("select id,thumb,location from galeria_fotos where hash='$hash1' ORDER BY id asc LIMIT 1;");
while (list ($idx,$thumb,$location) = mysql_fetch_row ($result_1)) {
$id=$idx;
$class="#fafefa";
echo "<tr><td width=80 bgcolor=$class>";?>
<table cellspacing="0">
<tr>
<td background="imagens/barra_topo_fotos.jpg" height="2"></td>
<td background="imagens/barra_topo_fotos.jpg" height="2"></td>
<td background="imagens/barra_topo_fotos.jpg" height="2"></td>
</tr>
<tr>
<td background="imagens/barra_esq_dir_fotos.jpg"></td>
<td><a href="#" class="links" onClick="MM_openBrWindow('index_festas.php?hash=<? echo $hash1;?>&id=<? echo $idx;?>&nome=<?php echo $nome1;?>','','status=yes,resizable=yes,width=500,height=375')">
<img src="<?php echo $thumb;?>" border="0">
</a></td>
<td background="imagens/barra_esq_dir_fotos.jpg"></td>
</tr>
<tr>
<td background="imagens/barra_rodape_fotos.jpg" height="2"></td>
<td background="imagens/barra_rodape_fotos.jpg" height="2"></td>
<td background="imagens/barra_rodape_fotos.jpg" height="2"></td>
</tr>
</table>
<?php echo "</td><td width=200 valign=top align=left>";
} echo $data1.'<br>';?>
<a href="#" class="links" onClick="MM_openBrWindow('index_festas.php?hash=<? echo $hash1;?>&id=<? echo $id;?>&nome=<?php echo $nome1;?>','','status=yes,resizable=yes,width=775,height=600')">
<?php echo $nome1;?>
</a>
</td>
<td valign="top" align="left"><? echo $descr1; }?></td>
</td></tr></table>
<tr>
<td background="imagens/barra_vert.jpg" height="1"></td>
<td background="imagens/barra_vert.jpg" height="1"></td>
<td background="imagens/barra_vert.jpg" height="1"></td>
</tr>
</td></tr></table>

<?php
$i++;}//fecha while
$anterior = $pc -1;
$proximo = $pc +1;
?>
<tr><?php
if ($pc>1) { echo "<td><a class='links_bXv' href='?pagina=$anterior'><==</a></td>";}
if ($pc<$tp) { echo "<td><a class='links_bXv' href='?pagina=$proximo'>==></a></td>";}
?></tr>
</td></tr></table>
<?php }/*fecha function fotos_todas*/?>

Obrigado !!!!

#2 marctrin

marctrin

    Novato no fórum

  • Usuários
  • 4 posts
  • Sexo:Masculino
  • Localidade:nonoai

Posted 17/09/2010, 00:23

Estou com o mesmo codigo e nao consegui, se alguem puder dar uma luz; sou iniciante, o q mostra as imagens é a variavel $thumbs....

#3 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 16/10/2017, 19:01

Alli 120 Refill Pack Levitra 10 Mg Caratteristiche generic viagra Allergie Lioresal Intrathecal Pharmacy Viagra Prices
Tadalafil 20 Mg Buy Direct From India viagra online prescription Tarif Du Levitra En Baisse
Priligy Alcohol Last Longer Exercise Amoxicillin Yeast Infection whoesale levitra pills Tadalafil Overnight Delivery




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq