Jump to content


joaoqueiroz

Member Since 01/08/2005
Offline Last Active 03/08/2005, 10:31
-----

Posts I've Made

In Topic: Sistema De Fotos Igual Ao Do Www.bemnafoto.com.br

02/08/2005, 10:43

gente, completando os códigos q eu já tinha postado, e não estou enganado não, fiquei ontém das 6h às 7h da noite postando esses códigos, e agora faltou a metade...
mas tudo bem, estou postando denovo o q faltou...


código do script listar_arquivos.php

<? include("menu.php");?>
 <br>
<center>
  <font size="1" face="Verdana, Tahoma, MS Sans Serif"><strong>LISTA DE ARQUIVOS</strong></font> 
</center><br>

<?
if($caminho == ""){
$caminho = 'galeria';
$rep = opendir($caminho);
while ($file = readdir($rep)) {
$tipo = filetype("$caminho/$file");
	if($file != '..' && $file !='.' && $file !=''){ 
  if (!is_dir($file)){?>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="20" height="20"> 
      <? if($tipo != "dir"){ echo "<img src=\"icone_img.gif\" width=\"18\" height=\"18\">";}
	else { echo "<img src=\"icone_pastinha.gif\" width=\"15\" height=\"13\">";}
	?>
    </td>
    <td width="200">
	<? if($tipo == "dir"){ echo "<a href=\"listar_arquivos.php?caminho=$caminho/$file\"><font size=\"1\" face=\"Verdana, Tahoma, MS Sans Serif\"><strong>$file</strong></font></a>";}
	else { echo "<a href=\"$caminho/$file\" target=\"_blank\"><font size=\"1\" face=\"Verdana, Tahoma, MS Sans Serif\"><strong>$file</strong></font></a>";}?>
	</td>
     <td width="60"><a href="renomear_arq.php?caminho=<? echo $caminho?>&nomeantigo=<? echo $file?>"><font size="1" face="Verdana, Tahoma, MS Sans Serif">[Renomear]</font></a></td>
	<td width="50" align="right">
  <a href="<? if($tipo != "dir"){ echo "excluir_arquivo.php?caminho=$caminho&nomedoarquivo=$file";
  } else { echo "excluir_pasta.php?caminho=$caminho&nomedapasta=$file";}?>">
  <font size="1" face="Verdana, Tahoma, MS Sans Serif">[Excluir]</font></a></td>
  </tr>
</table>

<?
  }
	}
}
closedir($rep);


} else { 
$rep = opendir($caminho);
while ($file = readdir($rep)) {
$tipo = filetype("$caminho/$file");
	if($file != '..' && $file !='.' && $file !=''){ 
  if (!is_dir($file)){?>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="20" height="20"> 
      <? if($tipo != "dir"){ echo "<img src=\"icone_img.gif\" width=\"18\" height=\"18\">";}
	else { echo "<img src=\"icone_pastinha.gif\" width=\"15\" height=\"13\">";}
	?>
    </td>
    <td width="200">
	<? if($tipo == "dir"){ echo "<a href=\"listar_arquivos.php?caminho=$caminho/$file\"><font size=\"1\" face=\"Verdana, Tahoma, MS Sans Serif\"><strong>$file</strong></font></a>";}
	else { echo "<a href=\"$caminho/$file\" target=\"_blank\"><font size=\"1\" face=\"Verdana, Tahoma, MS Sans Serif\"><strong>$file</strong></font></a>";}?>
	</td>
     <td width="60"><a href="renomear_arq.php?caminho=<? echo $caminho?>&nomeantigo=<? echo $file?>"><font size="1" face="Verdana, Tahoma, MS Sans Serif">[Renomear]</font></a></td>
	<td width="50" align="right">
  <a href="<? if($tipo != "dir"){ echo "excluir_arquivo.php?caminho=$caminho&nomedoarquivo=$file";
  } else { echo "excluir_pasta.php?caminho=$caminho&nomedapasta=$file";}?>">
  <font size="1" face="Verdana, Tahoma, MS Sans Serif">[Excluir]</font></a></td>
  </tr>
</table>

<?
  }
	}
}
closedir($rep);
}?>


código do script listar_pastas.php
<? include("menu.php");?>
 <br>
<center>
  <font size="1" face="Verdana, Tahoma, MS Sans Serif"><strong>LISTA DE PASTA</strong></font> 
</center><br>

<?
$rep = opendir('.');
while ($file = readdir($rep)) {
	if($file != '..' && $file !='.' && $file !=''){ 
  if (is_dir($file)){?>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="20" height="20"><img src="icone_pastinha.gif" width="15" height="14"></td>
    <td width="200"><a href="listar_arquivos.php?caminho=<? echo $file?>"><strong><font size="1" face="Verdana, Tahoma, MS Sans Serif"><? echo $file?></font></strong></a></td>
    <td width="60"><a href="renomear_dir.php?nomeantigo=<? echo $file?>"><font size="1" face="Verdana, Tahoma, MS Sans Serif">[Renomear]</font></a></td>
    <td width="50" align="right"><a href="excluir_pasta.php?nomedapasta=<? echo $file?>"><font size="1" face="Verdana, Tahoma, MS Sans Serif">[Excluir]</font></a></td>
  </tr>
</table>

<?
  }
	}
}
closedir($rep);
?>


código do script menu.php
<center>
  <br>
  <font size="1" face="Verdana, Tahoma, MS Sans Serif"><a href="listar_arquivos.php">Listar 
  Arquivos</a> | <a href="cria_dir.php">Criar Pasta</a></font><br>
  <hr size="1" noshade>
</center>


código do script renomear_arq.php
<? include("menu.php");?>
 <br>
<center>
  <font size="1" face="Verdana, Tahoma, MS Sans Serif"><strong>RENOMEAR ARQUIVO</strong></font> 
</center><br>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<form name="form1" method="post" action="renomear_arquivo.php">
<input name="nomeantigo" type="hidden" value="<? echo $nomeantigo?>">
<input name="caminho" type="hidden" value="<? echo $caminho?>">
        <font size="1" face="Verdana, Tahoma, MS Sans Serif">Digite o novo nome:</font> 
        <input name="nomenovo" type="text" style="width:150; height:20; border:1px solid" maxlength="25">
        <input type="submit" name="Submit" value="Alterar" style="width:50; height:20; border:1px solid">
      </form></td>
  </tr>
</table>
</body>
</html>


código do script renomear_arquivo.php
<? include("menu.php");?>
<?
$var1 = "$caminho/$nomeantigo";
$var2 = "$caminho/$nomenovo";
rename("$var1", "$var2");
?>
<meta http-equiv="refresh" content="2;URL=listar_arquivos.php?caminho=<? echo $caminho?>">
<center><br>
<br>
<br>
  <font size="1" face="Verdana, Tahoma, MS Sans Serif">O Arquivo <strong><? echo $nomeantigo?></strong> 
  foi renomeado para <strong><? echo $nomenovo?></strong> com sucesso!</font> 
</center>


código do script renomear_dir.php
<? include("menu.php");?>
 <br>
<center>
  <font size="1" face="Verdana, Tahoma, MS Sans Serif"><strong>RENOMEAR PASTA</strong></font> 
</center><br>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<form name="form1" method="post" action="renomear_pasta.php">
<input name="nomeantigo" type="hidden" value="<? echo $nomeantigo?>">
        <font size="1" face="Verdana, Tahoma, MS Sans Serif">Digite o novo nome:</font> 
        <input name="nomedapasta" type="text" style="width:150; height:20; border:1px solid" maxlength="25">
        <input type="submit" name="Submit" value="Alterar" style="width:50; height:20; border:1px solid">
      </form></td>
  </tr>
</table>
</body>
</html>


código do script renomear_pasta.php
<? include("menu.php");?>
<?
rename("$nomeantigo", "$nomedapasta");
?>
<meta http-equiv="refresh" content="2;URL=listar_arquivos.php">
<center><br>
<br>
<br>
  <font size="1" face="Verdana, Tahoma, MS Sans Serif">A pasta <strong><? echo $nomeantigo?></strong> 
  foi renomeada para <strong><? echo $nomedapasta?></strong> com sucesso!</font> 
</center>


código do script select_pastas.php
<? include("menu.php");?>
 <br>
<center>
  <font size="1" face="Verdana, Tahoma, MS Sans Serif"><strong>SELECIONE A PASTA DE DESTINO</strong></font> 
</center><br>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200">
<select name="nomedapasta" style="width:250" onChange="if(options[selectedIndex].value) window.location.href= (options[selectedIndex].value)">
<option selected>Escolha uma Pasta...</option>
<option>==============================</option>
<?
$rep = opendir('galeria');
while ($file = readdir($rep)) {
	if($file != '..' && $file !='.' && $file !=''){ 
  if (!is_dir($file)){?>
<option value="enviar_fotos.php?nomedapasta=<? echo $file?>"><? echo $file?></option>
<?
  }
	}
}
closedir($rep);
?>
</select>
</form>
	</td>
  </tr>
</table>


Gente é isso ai... os códigos q precisam ser melhorados são os do script fotos.php e zoom.php, q exibem as fotos, principalmente a paginação do zoom.php

Dúvidas, postem ai...

Abraços,
Sandro Porto

Falta o codigo
path.php

In Topic: Flash Em Contato Com Um Texto No Bloco De Notas

01/08/2005, 14:45

Não te consigo ajudar mas quando tiveres essa apostila envia para mim
tambem estou a precisar.

IPB Skin By Virteq