Popups from links
Heya all
I have a script that allows my website to display the contents of a
folder as links. I want those links to open as their MIME type (MP3
files) in a small window, displaying that file's name as an H2 tag.
Can someone help me out? Here's the script that I have:
$imagepath="/media/mp3s/new_tunes";
$realpath=$_SERVER['DOCUMENT_ROOT']."$imagepath";
$n=0;
$list=array();
if ($dir = @opendir($realpath)) {
while (($file = readdir($dir)) !== false) {
if(is_file("$realpath/$file") && ($file!=".htaccess")){
$n++;
$list[]=$file;
}
}
closedir($dir);
natcasesort($list);
echo "<p>$n Files:</p>\n";
echo "<ul>\n";
for ($i=0;$i<count($list);$i++){
$x=$i+1;
echo "<li>";
echo "<a href=\"$imagepath/$list[$i]\">$list[$i]</a>";
echo "</li>\n";
}
echo "</ul>";
}
Any help would be mucho appreciated!
~B
.
Relevant Pages
- Re: ASPEmail & ASPUpload problems
... >>separately and use files that are in the same folder as the script so ... >attachment part of the form working. ... You have a computer and a new 21" LCD display. ... (microsoft.public.inetserver.asp.general) - Re: Why picture dose not show up in web?
... Did you "Save as a website" again after inserting the image? ... not display. ... Upload the index_files folder, ... It dose not display pictures. ... (microsoft.public.publisher.webdesign) - Re: Options --> After sending, move to...
... Get this script Open Folder: ... buttons default button 1 with icon stop ... display dialog "An error occurred and the messages were not moved. ... (microsoft.public.mac.office.entourage) - Re: Internet Explorer - Firefox
... Firefox, the problem is how publisher displayed it in IE. ... I imagine it is a problem with how the script is ... suppose to display a search box for flights..i am pretty sure that the ... (microsoft.public.publisher.webdesign) - Re: Display a block of text in Firefox & Safari
... in FireFox and Safari it appears as a narrow ... There seems to be a needless reliance on the global variable 'NumberOfQuestionsShown', I've suggested a different strategy below that should be easier to maintain - it uses a single class to hide/show questions so the script doesn't need to know how many questions there are nor do they need to be consecutively numbered. ... var questionNum; ... Instead of going through all questions, how about giving them all the same style, then just modify the style to change display from 'none' to ''. ... (comp.lang.javascript) |
|