Ir para conteúdo
Fórum Script Brasil
  • 0

Duvida .. sou iniciante


UberabaClick.Com

Pergunta

O q esta errado nesse codigo em php , que não muda a pagina da galeria ?

Tem as opcoes de mudar de pagina mais não muda a pagina =/ eu cliko em 2 volta na mesma pagina !

zoom

<?

include("../../config.php");

$id = $_GET['id'];

$cidade = $_GET['cidade'];

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

$dados= mysql_fetch_array($sql);

$page=$_GET['page];

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

?>

&lt;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++)

//$thumb=thumbs.php?w=320&h=240&imagem="; //sem a logo

$thumb="thumbs3.php?w=500&h=325&imagem="; //com a logo

?>

<?

$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 "&lt;script>

window.open('janela.php?id=$id&cidade=$cidade&pg=$var', '_top');

</script>";

}

if($page < ($paginas-2)){

echo "

&lt;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" bgcolor="#FFFFFF">

<tr>

<td valign="top">

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="67%" height="25">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 width="500" height="320" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="480" height="325" align="center" valign="middle" bgcolor="#FFFFFF" style="border:1px solid #999999;"> <img src="<? echo "$thumb$dir$imagens[$i]";?>" border="0"></td>

</tr></table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">

<tr><td colspan="5" height="7"></td></tr>

<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 "&lt;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 "../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>&nbsp;</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>

janela

<?

include("../../config.php");

$id = $_GET['id];

$cidade = $_GET['cidade'];

$page = $_GET['page'];

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

$dados= mysql_fetch_array($sql);

$dir = "images/galeria/$dados[pasta]/";

?>

<style type="text/css">

<!--

body {

margin-left: 1px;

margin-top: 1px;

margin-right: 1px;

margin-bottom: 1px;

background-image: url(../../images/layout/bk_ent.gif);

background-color: #FFFFFF;

}

-->

</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="879" height="361" border="0" cellpadding="3" cellspacing="0" bgcolor="#000000">

<tr>

<td width="200" rowspan="2" align="right" valign="top" bgcolor="#CCCCCC"><? include("fotos.php");?></td>

</tr>

<tr>

<td height="282" align="center" valign="top"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">

<tr>

<td align="center"><em><strong>Coberturas UberabaClick.Com</strong></em>

<iframe width="500" height="375" 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"><table width="134" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td height="230" align="center" valign="top">

<p><img src="../../images/layout/menu_direito.jpg" />

<?

$pagina = "fotos";

$posicao = 1;

include "../banners/banners120.php";

$posicao = 2;

include "../banners/banners120.php";

$posicao = 3;

include "../banners/banners120.php";

$posicao = 4;

include "../banners/banners120.php";

?>

</p>

</td>

</tr>

<tr>

<td align="center" valign="top"><div align="right"><img src="images/bt_fe.gif" width="53" height="18" border="0" usemap="#Map">

<map name="Map">

<area shape="rect" coords="-10,-25,117,42" href="java script:self.close()">

</map>

</div></td>

</tr>

</table>

<br>

</td>

</tr>

<tr bgcolor="#333333">

<td colspan="3" class="pequeno"><div align="center">TODOS OS DIREITOS RESERVADOS. | Produzido por Fabio</a> </div></td>

</tr>

</table>

Editado por UberabaClick.Com
Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      652k
×
×
  • Criar Novo...