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

Warning: Readdir()


Joilson Junior

Pergunta

6 respostass a esta questão

Posts Recomendados

  • 0

da uma olhada no codigo ai....

<?php // include "config.php"; include "conexao.php"; ?>

<style type="text/css">

.linhalateral {

BORDER-RIGHT: #eeeeee 1px solid; BORDER-TOP: 0px solid; BORDER-LEFT: 0px solid; BORDER-BOTTOM: 0px solid

}

.i_frameprin {

BORDER-RIGHT: #99cc33 1px dashed; PADDING-RIGHT: 1px; BORDER-TOP: #eeeeee 0px dashed; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; BORDER-LEFT: #99cc33 1px dashed; PADDING-TOP: 1px; BORDER-BOTTOM: #8091aa 0px dashed

}

</style>

<table width="770" height="100" background=imagens/topo.gif border=0 ><td width="38%"></td>

<td align="center"><? /*

$pagina = "eventos";

$posicao = 1;

include "estrutura/banners/banners468.php"; */ ?></td>

</table>

<table width="770">

<td width="43%" height="27">

<MAP

name=menuhomepage>

<AREA shape=RECT coords="5, 2, 48, 22" href="?pg=faleconosco" target="_top">

<AREA

shape=RECT coords="54, 0, 89, 22">

<AREA shape=RECT

coords="100, 0, 145, 22" href="?pg=anuncie" target="_top">

<AREA shape=RECT coords="155, 0, 220, 22" href="?pg=expediente" target="_top">

<AREA

shape=RECT coords="228, 0, 295, 22" href="?pg=publicidade" target="_top"></MAP>

<IMG height=26

src="imagens/td_1.jpg" width=56 border=0><IMG height=26 src="imagens/td_2.jpg" width=297

useMap=#menuhomepage border=0></td>

<td background=imagens/td_3.jpg align="center" ><? echo "$evento";?></td>

</table>

<table width="770" class="linhalateral"><td>

<table width="770">

<td>Fotos - <? echo "$pgEvento";?> - Dia - <? echo "$data";?> </td>

</table>

<img src="imagens/banner.gif" width="757" height="25">

<table class="i_frameprin"><td width="274"><iframe width="274" height="400" frameborder="0" marginheight="0" marginwidth="1" name="fotos" scrolling="no" src="fotos.php?dir=<? echo $dir?>"></iframe></td><td width="470">

<iframe width="470" height="400" frameborder="0" marginheight="0" marginwidth="1" name="exibe_foto" scrolling="no" src="zoom.php?dir=<? echo $dir?>&foto=<? echo $foto?>&evento=<? echo "$evento";?>

&data=<? echo $data?>&local=<? echo $local?>"></iframe>

</td></table>

<img src="imagens/banner_end.gif" width="757" height="15"> </td>

</table>

<MAP

name=rodape>

<AREA title=" Contato " shape=RECT

coords="10, 42, 76, 60"

href="?pg=faleconosco">

<AREA

title=" Seja nosso parceiro " shape=RECT coords="88, 42, 140, 60"

href="?pg=parceiros">

<AREA

title=" Sobre o portal " shape=RECT coords="146, 42, 230, 60"

href="?pg=expediente"></MAP>

<img width="770" border="0" height="105" src="imagens/rodape0.gif" useMap=#rodape >

Link para o comentário
Compartilhar em outros sites

  • 0

realmente você tem rasão tem n tem a função mais pode você pode perceber no codigo que ele chama mais dois iframe ai vão os codigos....

pagina zoom.php

<? include("path.php");?>

<script src="css/janelas_popup.js" language="JavaScript"></script>

<? $var1 = "&evento=$evento&data=$data&local=$local";?>

<table width="100" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td height="277">

<?

if(!isset($pg) ){

$pg=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++;

}

}

$pagina = 1;

if ($_GET['pg'])

$pagina = $_GET['pg'];

$paginas = ceil(count($imagens) / $ipp);

$total = ceil(count($imagens));

$inicio = $pg * $ipp;

for ($i = $inicio; $i < ($inicio + $ipp); $i++)

?>

<table width=88" height="68" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="<? echo $cortexto?>">

<?

$res=getimagesize("$dir$imagens[$i]");

if ($res[1]>265){

$height=338 ;

$width=($res[0]*$height)/$res[1];

} else {

$height=$res[1];

$width=$res[0];

}

$width=ceil($width);

$height=ceil($height);

?>

<tr width="320" style="border:1px solid #999999;" height="242" align="center" valign="middle" background="images/img_carregando.gif" >

<td align="center" valign="middle" bgcolor="E7E7E7"> <img src="<? echo "$dir$imagens[$i]";?>" border="0" height="<? print $height?>"></td>

</tr></table>

</td>

</tr>

<tr>

<TD height="42">

<table border="0" align="center" cellpadding="0" cellspacing="0">

<tr valign="top">

<td width="70" align="center"> <font size="<? echo $tfonte?>" face="<? echo $fonte?>">

<strong>

<?

if ($pg > 1){

$pag=$pg - 1;

echo "<a href=\"?dir=$dir&pg=" . ($pag) . "$var1\"><img src=\"images/icone_anterior.jpg\" border=0></a>";

} else { echo "<font color=$onmouseover><img src=\"images/icone_anterior.jpg\" border=0></font>";}

$div=$pg/12;

for ($x=1;$x<99;$x++){

if ($div==$x){

$inter=0;

break;

}

}

if (isset($inter) AND $div * 12 < $pg){

if ($div==1){

$div=0;

} else {

$div=$div-1;

}

echo "<script language=JavaScript>

window.open('fotos.php?dir=$dir&pg=".($div)."$var1', 'fotos');

</SCRIPT>";

}

?>

</strong> </font></td>

<td width="70" align="center"><a href="java script:popup('imagempop.php?imagem=<? echo "$dir$imagens[$i]";?>');"><img src="images/icone_ampliar.jpg" border=0></a></td>

<td width="70" align="center"><a href="java script:imprimi('imprimir.php?imagem=<? echo "$dir$imagens[$i]";?><? echo $var1?>');"><img src="images/icone_imprimir.jpg" border=0></a></td>

<td width="70" align="center"><a href="java script:indica('indicacao.php?dir=<? echo "$dir";?>&imagem=<? echo $imagens[$i]?><? echo $var1?>');"><img src="images/icone_enviar.jpg" border=0></a></td>

<td width="70" align="center"> <strong><font size="<? echo $tfonte?>" face="<? echo $fonte?>">

<? if($pg<$total) {

$pagp=$pg+1;

echo "<a href=\"?dir=$dir&pg=" . ($pagp) . "$var1\"><img src=\"images/icone_proxima.jpg\" border=0></a>";

} else { echo "<font color=$onmouseover><img src=\"images/icone_proxima.jpg\" border=0></font>";}

?>

</font></strong></td>

</tr>

</table>

<?

$div=$pag/12;

if (!strstr($div,'.'))

{

$inter=0;

}

if (isset($inter) AND $div * 12 < $pg)

{

echo "<script language=JavaScript>

window.open('fotos.php?dir=$dir&pg=$div$var1', 'fotos');

</SCRIPT>";

}

?>

</td>

</tr>

</table>

e o outro codigo fotos.php

<?

if (strstr($pg,".")== TRUE){

$pg=ceil($pg);

$pg=$pg-1;

}

if (!$pg==0)

{

$cont=$pg * 12;

} else {

$cont=0;

}

?>

<? include("path.php");?>

<table border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="230" height="274" valign="top">

<?

$handle = opendir($dir);

$ext = "jpg";

$indice = 0;

$ipp = 12;

while (false !== ($file = readdir($handle)))

{

$pathdata = pathinfo($file);

if (!is_dir($file) && ($pathdata["extension] == strtolower($ext)) || ($pathdata["extension"] == strtoupper($ext)))

{

$imagens[$indice] = $file;

$indice++;

}

}

$pagina = 1;

if ($_GET['pg'])

$pagina = $_GET['pg'];

$paginas = ceil(count($imagens) / $ipp);

$inicio = $pg * $ipp;

$thumb="imagemdim.php?imagem=";

$var1 = "&evento=$evento&data=$data&local=$local";

for ($i=$inicio; $i<($inicio+$ipp); $i++)

if($imagens[$i] != ""){ ?>

<? $cont=$cont+1; ?>

<a href="zoom.php?dir=<? echo "$dir";?><? echo $var1?>&pg=<? echo "$cont";?>" target="exibe_foto">

<img src="<? echo "$thumb$dir$imagens[$i]"; ?>" hspace="1" vspace="1" border="1"></a>

<? }?>

</td>

</tr>

<tr>

<TD width="230" align="left" valign="top">

<table width="230" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="70" valign="top"><strong>

<? $total = ceil(count($imagens)); echo $total; ?>

Fotos.</strong></td>

<td align="right" valign="top"><strong>Pgs:</strong> |

<?

for($i=0; $i<$paginas; $i++){

$url = "?dir=$dir&pg=$i";

if ($i==$pg) {

echo " <b>".($i+1)."</b> |";

} else {

echo " <a href='$url'>".($i+1)."</a> |";

}

}

?>

</td>

</tr>

</table>

</td>

</tr>

</table>

</body>

vlw maninho...

Link para o comentário
Compartilhar em outros sites

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
      152k
    • Posts
      651,7k
×
×
  • Criar Novo...