Created
September 2, 2016 19:05
-
-
Save blar/d705c09bf8f65471a2e9ffc38ed6ad36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function isValidFile($file) { | |
if($file == ".") { | |
return false; | |
} | |
if($file == "..") { | |
return false; | |
} | |
if($file == "index.php") { | |
return false; | |
} | |
if($file == "Thumbs.db") { | |
return false; | |
} | |
if($file == "green-v.png") { | |
return false; | |
} | |
if($file == "blue-h.png") { | |
return false; | |
} | |
if($file == "green-h.png") { | |
return false; | |
} | |
if($file == "red-h.png") { | |
return false; | |
} | |
if($file == "red-v.png") { | |
return false; | |
} | |
if($file == "yellow-h.png") { | |
return false; | |
} | |
if($file == "yellow-v.png") { | |
return false; | |
} | |
return true; | |
} | |
if ($handle = opendir('.')) { | |
while (false !== ($file = readdir($handle))) { | |
//Ausschliessen der Files die wir nicht gelistet haben wollen ... | |
if (isValidFile($file)) | |
{ | |
$bla = explode(".", $file); | |
$thelist .= '<table> | |
<tr> | |
<td class="table_td" style="padding:2px 4px 2px 4px;"><a href="'.$file.'" target="blank">#'.$bla[0].'</a></td> | |
</tr> | |
</table>'; | |
} | |
} | |
closedir($handle); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment