/home/a/aquarion/sites/www.aquarionics.com/epistula/chapters/blink.inc.php
All my code (That is, anything not in the "Others" list on the right) is BSD licenced.
You can also view this page as text/plain or colour-coded source
<?PHP
/*******************************************************************************
Chapter - Blink
********************************************************************************
B-Links, aka "List-o-links" the traditional quick list of links
Was known as "Cool, Cooler, Coolest" in AqCom v1
$Id: blink.inc.php,v 1.2 2004/05/17 16:45:11 aquarion Exp $
$log$
11/01/2004 - aq - repaired archive functionality
- Added referrer support
22/12/2003 - aq - First version
*******************************************************************************/
#array_shift($wanted);
$file = implode("/",$wanted);
$page->title = "Links";
$types = array("article");
$display = "full";
$limit = 10;
$page->localnav .= $page->ulink("/meta/blink.rss2", $page->image("/assets/images/buttons/rss2.gif", "[RSS Icon]"), "Aquarionics ".$page->chapter." RSS Feed")."<br>";
$page->localnav .= $page->ulink("/meta/blink.esf", $page->image("/assets/images/buttons/esf.gif", "[ESF Icon]"), "Aquarionics ".$page->chapter." ESF Feed")."<br>";
$page->localnav .= $page->ulink("/meta/journal.cdf", $page->image("/assets/images/buttons/cdf.gif", "[CDF Icon]"), "Aquarionics ".$page->chapter." CDF Channel");
if ($wanted[1] == "sources"){
$page->content .= "
<h2 id=\"ip\">Interesting People</h2>
<p>Dave Faber's <a href=\"http://www.interesting-people.org/archives/interesting-people/\">Interesting People</a> list is a source of interesting articles around, and usually affecting, the Internet.</p>
<h2 id=\"afp\">Alt.Fan.Pratchett/#afp</h2>
<p>AFP is a group of people formed around a shared love of the books of Terry Pratchett. Not that we ever discuss the books, it's just a starting point for us to have met. #afp is the associated IRC channel.</p>
<h2 id=\"eddings\">#eddings</h2>
<p>An IRC channel.</p>
<h2 id=\"email\">email</h2>
<p>Someone sent it to me by email</p>
";
} elseif ($wanted[1]){
$page->status = 404;
} else {
$query = "select *, unix_timestamp(date_created) as epoch from blink order by date_created desc";
$page->content .= "As ".$page->ulink("http://www.upian.net/hotlinks/?q=&f=24&n=", "featured", "Upian filtered by Aquarion's Links")." on "
.$page->ulink("http://www.upian.net/hotlinks/", "upian.net's hotlinks");
$blogolinks = safequery($query);
$links = array();
$date = "";
while($row = mysql_fetch_assoc($blogolinks)) {
if (date("F Y",$row['epoch']) != $date){
$date = date("F Y",$row['epoch']);
$page->content .= $page->buildlist($links,false,"plainlist");
$page->content .= "<H2>".$date."</H2>";
$links = array();
}
$text = $page->ulink(htmlentities($row['link']), htmlentities($row['title']), htmlentities($row['content']));
if ($row['content']){
$text .= " (".$row['content'].")";
}
if ($row['referrer']){
$text .= " [".$page->ulink(htmlentities($row['referrer']), "via")."]";
}
$links[] = $text;
#$links[] = array('name' => $row['title'], 'link' => $row['link'], 'title' => $row['content']);
#$page->content .= $row['title']."<br>";
}
$page->content .= $page->buildlist($links,false,"plainlist");
}
$page->content = $page->item($page->content);
?>
Using a heavily customised version of Tom's PHPCode2ValidXHTML Thing