1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
<?php
if (!empty($_POST['text']))
{
echo "<object ID='fichierliste'>"
."<param name='DataURL' VALUE='$tabsize'</param>"
. "</object>";
echo "<table width='800' class=tab align=center border=4 cellspacing=2 cellpadding=2 ID='elemtb1' DATASRC='#fichierliste'>"
."<thead>"
."<tr class='contentGRAYnormal2'><td width='5%'><b><a href ='affichage.php'>Type</a></b></td>"
."<td width='50%'><b><a href = 'affichage.php'>Nom du fichier</div></a></b></td>"
."<td width='15%'><b><a href ='affichage.php'>Date de modification</a></b></td><td width='10%'><b><a href='javascript:tailleclick();'><div id=taille>Taille</a></b></td></tr>\n"
."</thead>";
function recherche ($directory)
{
global $tabsize;
$tabsize = array($size);
if (empty($_POST['text']))
{
//echo "<meta http-equiv='refresh' content='text/html';URL=recherche.php>";
}
elseif ($dir = opendir($directory))
{
while ($file = readdir ($dir))
{
if (($file==$_POST['text']) || (eregi($_POST['text'],$file)))
{
$size = round(filesize($directory."/".$file)/1024,2);
affichage($directory,$file,$tabfichier,$tabsize);
//affichage2($tabfichier,$tabsize,$tabtaille,$tabdate);
}
if($file == "." || $file == "..")
{
continue;
}
elseif (is_dir($directory."/".$file))
{
recherche($directory."/".$file);
}
}
closedir($dir);
}
}
recherche(".");
//affichage($directory,$file,$tabfichier,$tabsize,$tabdate);
$tabsize = array($size);
echo"</table><br>";
?> |
Partager