Skip to content

Instantly share code, notes, and snippets.

Created June 9, 2010 18:40
Show Gist options
  • Save anonymous/431948 to your computer and use it in GitHub Desktop.
Save anonymous/431948 to your computer and use it in GitHub Desktop.
<?php
$file = fopen("./pages/nieuwsteller.txt", "r");
$counter = fgets($file, 4096);
fclose($file);
if ( $counter == 0 ) {
echo "<div class=item>";
echo "<h4>Er zijn nog geen berichten geplaatst!</h4>";
echo "</div>";
} else {
for ($id = $counter; $id > 0; $id--)
{
if (is_dir("./pages/alle/".$id)) {
echo "<div class=item>";
echo "<div><h2>";
echo "<a href=\"index.php?page=5&id=".$id."\">";
include("./pages/alle/".$id."/titel.txt");
echo "</a>";
echo "</h2></div>";
echo "<div><small>Geplaatst door ";
include("./pages/alle/".$id."/naam.txt");
echo " op ";
include("./pages/alle/".$id."/datum.txt");
echo "</small></div>";
echo "<div><p>";
include("./pages/alle/".$id."/inhoud.txt");
echo "</p></div>";
echo "<div><small>Reacties: ";
include("./pages/alle/".$id."/aantalreacties.txt");
echo "</small></div>";
echo "</div><br>";
}}}?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment