Ir para conteúdo

POWERED BY:

Arquivado

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

Bruno Depieri Barduchi

Pastas em adm

Recommended Posts

Caros preciso da vossa ajuda novamente:

 

Tenho um adm base bootstrap, mas preciso mostrar as pastas do diretório cliente, porém sem sair do adm.

ex:

 

img1 = index.php?p=/clientes/sapato

img2 = index.php?p=/clientes/camisa

 

como faço para abrir a subpasta sem sair do adm com essa estrutura de link?

 

vlw

Compartilhar este post


Link para o post
Compartilhar em outros sites

Galera achei uma resposta

 

vlw msm assim, segue o fonte que achei na net

<?php

/*
Script distribuído por brasilphp.net
Qualquer dúvida, escreva para contato@brasilphp.net
Para criação e manutenção de scripts e sistemas, escreva para contato@sobralsites.com
*/

function varSet($VAR) { return isset($_GET[$VAR]) ? $_GET[$VAR] : ""; }
$action = varSet("action");
$pasta = base64_decode(varSet("pasta"));

//Lista dos arquivos que nao serão listados
$denyFiles = array(".htaccess","thumbs.db");

if ($action == "download") {
$file = base64_decode(varSet("file"));
header("Content-disposition: attachment; filename=\"".basename($file)."\"");
readfile(".$file");
exit;
}
?>
<style type="text/css">
body {
font:11px Verdana, Arial, Helvetica, sans-serif;
padding:0px;
margin:0px;
}
a {
text-decoration:none;
color:#003366;
}
a:hover { color:#0099CC }
.row1 { background-color:#F7F7F7 }
.row2 { background-color:#EBEBEB }
.rowOver { background-color:#C7DCFC }
.extCell { font-weight:bold }
</style>
<script language="javascript" type="text/javascript">
function over(Obj) {
nClass = Obj.className
Obj.className = "rowOver"
Obj.onmouseout = function() {
Obj.className = nClass
}
}
</script>
<?php
if ($action == ""):
$fdir = "./$pasta";
chdir($fdir);
$dir = opendir(".");
while ($file = readdir($dir)) if (is_dir($file)) $dirs[] = $file; else $files[] = $file;
$row = 2;
?>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="50px;"> </td>
</tr>
</table>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr style="font-weight:bold">
<td width="55" height="20"> </td>
<td width="204">Nome</td>
<td width="130">Tamanho</td>
<td width="316">Ações</td>
</tr>
<?php if ($pasta != ""): ?>
<tr class="row<?php echo $row; ?>" onmouseover="over(this)">
<td align="center" width="55" height="20" class="extCell">[DIR]</td>
<td><a href="?pasta=<?php echo base64_encode(substr("$pasta",0,strrpos($pasta,"/"))); ?>">..</a></td>
<td>–</td>
<td> </td>
</tr>
<?php endif; ?>
<?php
if (is_array($dirs)) :
sort($dirs);
foreach ($dirs as $nome):
if ($nome == ".." || $nome == ".") continue;
if ($row == 2) $row = 1; else $row = 2;
?>
<tr class="row<?php echo $row; ?>" onmouseover="over(this)">
<td align="center" width="55" height="20" class="extCell">[DIR]</td>
<td><a href="?pasta=<?php echo base64_encode("$pasta/$nome"); ?>"><?php echo $nome; ?></a></td>
<td>–</td>
<td> </td>
</tr>
<?php
endforeach;
endif;
?>
<?php
if (is_array($files)):
sort($files);
foreach ($files as $nome):
if (in_array(strtolower($nome),$denyFiles)) continue;
if ($row == 2) $row = 1; else $row = 2;
$tamanho = filesize("./$nome");
$info = pathinfo("./$nome");
?>
<tr class="row<?php echo $row; ?>" onmouseover="over(this)">
<td align="center" width="55" height="20" class="extCell">[<?php echo strtoupper($info["extension"]); ?>]</td>
<td>
<a href="?action=download&file=<?php echo base64_encode("$pasta/$nome"); ?>"><?php echo $nome; ?></a>
</td>
<td><?php echo $tamanho > 1048576 ? round($tamanho/1048576,2)." Mb" : round($tamanho/1024,2)." Kb"; ?></td>
<td> </td>
</tr>
<?php
endforeach;
endif;
?>
</table>
<?php endif; ?>
<?php closedir($dir); ?>

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.