Can anyone help me please?
I have this code in php:
<?php
$line=1;
$color1="#8B8B8B";
$color2="#999999";
$files = array();
$dir = opendir("files");
$i = 0;
//fill array with filename information
while(false !== ($file = readdir($dir)) )
{
if($files != "." && $files != "..")
{
$files[$i] = $file;
$i++;
}
}
closedir($dir);
//sort the files
sort($files);
foreach ($files as $file)
{
//pick the table color
$tabel=($line?$color1:$color2);
//get file extension information
$e=explode(".",$file);
if($e[1]=="rar"||$e[1]=="zip"||$e[1]=="pdf"||$e[1]=="JPG"||$e[1]=="png"||$e[1]=="gif"||$e[1]=="jpg"||$e[1]=="php"||$e[1]=="htm"||$e[1]=="html"||$e[1]=="doc"||$e[1]=="exe"||$e[1]=="wmv"||$e[1]=="wma"||$e[1]=="mp3"||$e[1]=="wav"||$e[1]=="mpeg"||$e[1]=="mpg"||$e[1]=="avi"||$e[1]=="txt"||$e[1]=="js")
{
echo '
<tr>
<td width="1" height="20" bgcolor='.$tabel.' align="left">
<p align="left"><img src="pics/'.$e[1].'.gif">
</td>
<td width="480" height="20" bgcolor='.$tabel.' align="left">
<p align="left"><a href="files/'.$file.'" target="_blank">'.$file.'</a>
</td>
</tr>
<tr>
<td colspan=2 height=1></td>
</tr>
';
}
elseif($e[1]=="")
{
}
else {
echo '
<tr>
<td width="1" height="20" bgcolor='.$tabel.' align="left">
<p align="left"><img src="pics/undefined.gif">
</td>
<td width="480" height="20" bgcolor='.$tabel.' align="left">
<p align="left"><a href="files/'.$file.'" target="_blank">'.$file.'</a>
</td>
</tr>
<tr>
<td colspan=2 height=1></td>
</tr>
';
}
$line=!$line;
}
?>
Can i somehow place that in a MovieClip box - to display the files i have in a folder named “files”? In a way that i dont have to change anything anywhere … only upload files and they get dispalyed in my webpage?!
Thanks in advance…
If any questions accure , please let me know … i understand that i didnt explain the situation perfectly