'."\r\n\r\n".$outputTest."\r\n\r\n", $template);
echo $template;
exit;
function getArticleLink($articleData) {
if (!is_array($articleData)) return false;
// TEST WHETHER THE PHP VERSION EXISTS...
$articleLink = "../archive/news{$articleData['issue']}{$articleData['story_number']}.php";
if (file_exists($articleLink)) return $articleLink;
// ELSE, TEST IF HTML VERSION EXISTS...
$articleLink = "../archive/news{$articleData['issue']}{$articleData['story_number']}.htm";
if (file_exists($articleLink)) return $articleLink;
// ELSE, TEST IF THE HTML VERSION OF THE WHOLE ISSUE EXISTS..
$articleLink = "../archive/news{$articleData['issue']}.htm";
if (file_exists($articleLink)) return $articleLink;
return false;
}
function getFeatureSummary($id) {
// Test inputs...
if (!is_numeric($id) || $id == 0) return false;
$conn = mysqlConnect();
$sql = " SELECT title, blurb, date, graphic_xsmall
FROM features
WHERE id = $id ";
$rs = mysqlQuery($sql, $conn);
$feature = mysqlGetRow($rs);
$date = makeHumanDate($feature['date'], 'words');
$output = array();
$output[] = "
";
$output[] = "
";
$output[] = "
";
$output[] = "
".$feature['blurb']."
";
$output[] = "
$date
";
$output[] = '
';
mysql_close($conn);
return implode("\r\n", $output);
}