Remove Atom link that does not exist in RSS 2.0 spec.
Remove Atom link that does not exist in RSS 2.0 spec.

File last commit:

f4cda9e28354
8139ce4867fc
Show More
rant-archive.php
80 lines | 2.5 KiB | text/x-php | XmlPhpLexer
/ rant-archive.php
Add root-directory files.
r2 <?php
include('frontend.inc.php');
$AUTHORS = mysqli_query($link,"SELECT DISTINCT id, name FROM contributor");
#$MTIME = mysqli_query($link,'SELECT UNIX_TIMESTAMP(MAX(published)) FROM strip') or die(mysqli_error($link));
#conditional_exit(current(mysqli_fetch_row($MTIME)));
pagehead('archive', 'Rant Archives');
?>
<div class="content">
<h2>View By:</h2>
<div><ul class="nl">
<li><a href="rant-archive.php?list_by=date">View by Date</a></li>
<li><a href="rant-archive.php">View by Author</a></li>
</ul></div>
</div>
<?php
if(isset($_REQUEST['list_by']) && $_REQUEST['list_by'] == "date")
{
$rants = mysqli_query($link,"SELECT rant.id AS id, rant.title AS title, contributor.name AS author,
DATE_FORMAT(rant.published, '%M %D, %Y') AS pubdate
FROM rant JOIN contributor ON rant.author = contributor.id
WHERE (rant.published < NOW())
AND rant.status = 'published' ORDER BY rant.published") or die(mysqli_error($link));
echo '<div class="content"><h2>Rants by Date</h2><div><ol>';
Remove spaces at EOL.
r36
Add root-directory files.
r2 while($rant = mysqli_fetch_assoc($rants))
{
printf('<li><a title="%s" name="%d" href="./rant/%d">%s - %s</a></li>', $rant['pubdate'], $rant['id'], $rant['id'],
$rant['author'], utfentities($rant['title']));
}
Remove spaces at EOL.
r36
Add root-directory files.
r2 echo '</ol></div></div>';
}
else
{
?>
<div class="content" id="typelinks">
<h2>Rants by Author</h2>
<div><ul><?php
while ($author = mysqli_fetch_assoc($AUTHORS)) {
$rants = mysqli_query($link,"SELECT distinct id
FROM rant WHERE author = $author[id] AND published < NOW() AND rant.status = 'published'");
if (mysqli_num_rows($rants) <= 0)
continue;
echo "\t\t<li><a href=\"rant-archive.php#$author[name]\">", utfentities($author[name]), "</a></li>\n";
}
?></ul></div>
</div>
<?php
Remove spaces at EOL.
r36
Add root-directory files.
r2 mysqli_data_seek($AUTHORS, 0);
while ($author = mysqli_fetch_assoc($AUTHORS)) {
$rants = mysqli_query($link,"SELECT distinct id, title,
DATE_FORMAT(published, '%M %D, %Y') AS pubdate
FROM rant WHERE author = $author[id] AND published < NOW() AND rant.status = 'published'");
if (mysqli_num_rows($rants) <= 0)
continue;
echo '<div class="content"><h2><a id="', $author['name'], '">', utfentities($author['name']), '</a></h2><div><ol>';
Remove spaces at EOL.
r36
Add root-directory files.
r2 while($rant = mysqli_fetch_assoc($rants))
{
printf('<li><a title="%s" name="%d" href="./rant/%d">%s</a></li>', $rant['pubdate'], $rant['id'], $rant['id'],
utfentities($rant['title']));
}
echo '</ol></div></div>';
}
}
pagefoot();
?>
</body>
</html>