<?php 

        $query = "SELECT * FROM dumps ORDER BY date DESC";
        $result = pg_query($query);
        if (!$result) {
            echo "Problem with query " . $query . "<br />";
            echo pg_last_error();
            exit();
        }

        while($myrow = pg_fetch_assoc($result)) {
            printf ("<div class='dump'><strong>Title:</strong> %s <br /><strong>Date:</strong> %s <br /><strong>Description:</strong> %s <br /> <img alt='' src='img/rsnicon'><a href='dumps/%s'>%s</a><br /><strong>Author:</strong> %s", htmlspecialchars($myrow['title']), $myrow['date'],htmlspecialchars($myrow['description']),
			htmlspecialchars($myrow['filename']),htmlspecialchars($myrow['filename']), htmlspecialchars($myrow['author']) );
			if ($logged) { // if logged and user is author then he has to be able to delete the entry
			}
			printf ("</div>");
        }
?> 