Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Jhonathan José Cunha Sousa

Galeria Php - Não muda de foto, fica sempre na mesma

Recommended Posts


Estou com um problema em minha galeria, ela sempre que clico para passar para a próxima imagem, aparece a imagenzinha de carregando mas volta na mesma tela. O que pode estar acontecendo. Tenho o site hospedado em servidores linux.

Qualquer dúvida entre em www.portalvirginopolis.com (e veja a galeria o que acontece).

 

Pode ser alguma coisa relacionada com CHMOD?

 

Se alguém puder me ajudar ficarei muito grato. Obrigado.

 

**********Arquivo Zoom.php

<?
include("../conexao.php");

$id = $_GET[id];
$cidade = $_GET[cidade];
$sql = mysql_query("SELECT * FROM galeria where id='$id'");
$dados= mysql_fetch_array($sql);

$dir = "../images/eventos/$dados[id_franquia]/$dados[pasta]/";
?>

<script src="../janelas_popup.js" language="JavaScript"></script>
<?
if(!isset($page) ){
 $page=1;
}
$handle = opendir($dir);
$ext = "jpg";
$indice = 2;
$ipp = 1;

while (false !== ($file = readdir($handle)))
{
   $pathdata = pathinfo($file);
   if (!is_dir($file) && ($pathdata["extension"] == strtolower($ext)) || ($pathdata["extension"] == strtoupper($ext)))
   {
       $imagens[$indice] = $file;
       $indice++;
   }
}
natcasesort($imagens);
reset($imagens);
$pagina = 1;
if ($_GET['page'])
$pagina = $_GET['page'];
$paginas = ceil(count($imagens) / $ipp);
$total = ceil(count($imagens));
$inicio = $page * $ipp;
for ($i = $inicio; $i < ($inicio + $ipp); $i++)

if($dados[logo] == "S"){
$thumb="thumbs.php?w=320&h=240&imagem=";
} else {
$thumb="thumbs.php?w=320&h=240&imagem=";
}
?>

<?
$pg2 = ceil($paginas/$qts_thumbs);
//echo "$paginas/$qts_thumbs=$pg2<br>";

/*if($page == "16"){
$var = "1";
//echo "<meta http-equiv=\"refresh\" content=\"0;URL=janela.php?id=$id&cidade=$cidade&pg=$var\">";
    echo "<script>
     window.open('janela.php?id=$id&cidade=$cidade&pg=$var', '_top');
      </script>";
}

if($page < ($paginas-2)){
echo "
<script>
window.location = \"janela.php?id=$id&cidade=$cidade&pg=$var+1\";
return;
</script>
";
}
*/
//for ($i = $page; $i <= $page+14; $i++) {
?>


<table width="322" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top">
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
   <tr>
     <td width="67%">Evento: <b><? echo "$dados[nome]";?></b></td>
     <td width="33%" align="right">Data: <b><? $data = explode("-", $dados[data]); echo "$data[2]/$data[1]/$data[0]";?></b></td>
   </tr>
 </table>
	<table border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="320"  style="border:1px solid #999999;" height="242" align="center" valign="middle" background="images/img_carregando.gif"> <div id="Layer1" style="position:absolute; z-index:1; width: 29; height: 29; left: 283px; top: 213px;"><a href="java script:Amplia('foto-popup.php?imagem=<? echo "$dir$imagens[$i]";?>');"><img src="/portal/images/layout/lupinha.gif" width="29" height="29" border="0"></a></div>            <img src="<? echo "$thumb$dir$imagens[$i]";?>" border="0"></td>
    </tr></table>    
	<br><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr align="center">
            <td>
<?
if ($page > 1){
   $pag=$page - 1;
   
if($page > 0 && $page < 16){      $pg2 = "0"; } 
if($page >= 16 && $page < 31){    $pg2 = "1"; } 
if($page >= 31 && $page < 46){    $pg2 = "2"; } 
if($page >= 46 && $page < 61){    $pg2 = "3"; } 
if($page >= 61 && $page < 76){    $pg2 = "4"; } 
if($page >= 76 && $page < 91){    $pg2 = "5"; } 
if($page >= 91 && $page < 106){   $pg2 = "6"; } 
if($page >= 106 && $page < 121){  $pg2 = "7"; } 
if($page >= 121 && $page < 136){  $pg2 = "8"; } 
if($page >= 136 && $page < 151){  $pg2 = "9"; } 
if($page >= 151 && $page < 166){  $pg2 = "10"; } 
if($page >= 166 && $page < 181){  $pg2 = "11"; } 
if($page >= 181 && $page < 196){  $pg2 = "12"; } 
if($page >= 196 && $page < 211){  $pg2 = "13"; } 
if($page >= 211 && $page < 226){  $pg2 = "14"; } 
if($page >= 226 && $page < 241){  $pg2 = "15"; } 
if($page >= 241 && $page < 256){  $pg2 = "16"; } 
if($page >= 256 && $page < 271){  $pg2 = "17"; } 
if($page >= 271 && $page < 286){  $pg2 = "18"; } 
if($page >= 286 && $page < 301){  $pg2 = "19"; } 
if($page >= 301 && $page < 316){  $pg2 = "20"; } 
//echo $pg2;			
   
  echo "<a href=?id=$id&page=" . ($pag) . "><img src=`images/bt_vo.gif` width=`53` height=`16` border=`0`></a>";
   } else {
   echo "<img src=`images/bt_vo.gif` width=`53` height=`16`>";
   }
   
/*   
    $div=$page/$qts_thumbs;
for ($x=1;$x<99;$x++){
  if ($div==$x){
   $inter=0;
   break;
  }
}
if (isset($inter) AND $div * $qts_thumbs < $page){
if ($div==1){
 $div=0;
} else {
 $div=$div-1;
}
    echo "<script language=JavaScript>
     window.open('fotos.php?dir=$dir&page=".($div)."$var1', 'fotos');
      </SCRIPT>";
}
*/
?></td>
            <td><a href="java script:indica('<? echo "indicacao.php?id=$id&cidade=$cidade&imagem=$imagens[$i]";?>');"><img src="images/bt_en.gif" width="53" height="16" border="0"></a></td>
            <td><a href="java script:Comprar('<? echo "../estrutura/pedidos/comprar_form.php?id=$id&cidade=$cidade&imagem=$imagens[$i]&page=$page";?>');"><img src="images/bt_co.gif" width="53" height="16" border="0"></a></td>
            <td><a href="java script:AddAlbum('<? echo "../estrutura/usuarios_vip/add_album_form.php?id=$id&imagem=$imagens[$i]";?>');"><img src="images/bt_ad.gif" width="53" height="16" border="0"></a></td>
            <td><? if($page<$total) {
           $pagp=$page+1;
   echo "<a href=?id=$id&cidade=$cidade&page=" . ($pagp) . "><img src=`images/bt_av.gif` width=`53` height=`16` border=`0`></a>";
} else { echo "<img src=`images/bt_av.gif` width=`53` height=`16` border=`0`>";}
?></td>
        </tr>
    </table>	</td>
 </tr>
</table>

***************Arquivo janela.php

<?
include("../config.php");
$id = $_GET[id];
$cidade = $_GET[cidade];
$page = $_GET

;

$sql = mysql_query("SELECT * FROM galeria where id='$id'");
$dados= mysql_fetch_array($sql);

$dir = "../images/eventos/1/$dados[pasta]/";
?>
<style type="text/css">
<!--
body {
	margin-left: 1px;
	margin-top: 1px;
	margin-right: 1px;
	margin-bottom: 1px;
	background-image: url(../../images/bg_body.gif);
}
-->
</style>

<!--
<script>
  function Muda(img,page)
  {
   ft.src = img;
   page = page;
  }  
  
  atual = page;
  function Proxima()
  {
    atual = atual + 1;
    eval("ft.src = 'images/"+ atual +".jpg'");
  }  
</script>-->



<table width="706" height="361"  border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="200" rowspan="2" align="right" valign="top" bgcolor="#999999"><? include("fotos.php");?></td>
    <td colspan="2" bgcolor="#CCCCCC"><table  border="0" align="left" cellpadding="2" cellspacing="0">
      <tr>
        <td><? 
			$limite = 1;
			$pagina = "fotos";
			 include "../estrutura/banners/banners468.php"; ?></td>
        <td><img src="../images/layout/pub_top2.gif" width="16" height="60"></td>
      </tr>
    </table>    </td>
  </tr>
  <tr>
    <td height="282" align="center" valign="top" bgcolor="#CCCCCC"><table width="100%"  border="0" align="center" cellpadding="2" cellspacing="0">
      <tr>
        <td align="center"><iframe width="325" height="295" frameborder="0" marginheight="0" marginwidth="0" name="exibe_fotos" scrolling="no" src="zoom.php?id=<? echo $id?>&cidade=<? echo $cidade?>&page=<? if(empty($page)){ echo 1;} else { echo $page; }?>"></iframe><? // include("zoom.php");?></td>
        </tr>
    </table></td>
    <td width="140" align="center" valign="top" bgcolor="#CCCCCC"><table width="134"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="230" align="center" valign="top">
<? 
$pagina = "fotos";

$posicao = 1;
include "../estrutura/banners/banners120.php";
$posicao = 2;
include "../estrutura/banners/banners120.php";
$posicao = 3;
include "../estrutura/banners/banners120.php";
?></td>
      </tr>
      <tr>
        <td align="center" valign="top">           </td>
      </tr>
    </table>
    <br>    </td>
  </tr>
<tr align="center" bgcolor="#0066CC">
        <td colspan="3" class="pequeno">® 2007 PortalVirginopolis.Com - Todos os direitos reservados - 
        Desenvolvido por: PortalVirginopolis.Com</td>
  </tr>
</table>

 

Se precisar de mais alguma coisa por favor me diga. Mas não dá nenhum problema.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.