* printSectionDocs('Recitation', 'doc/rec', 'rec', 20);
*/
function printSectionDocs($title, $directory, $startswith, $maxnum){
- $i = 1;
+ $count = 0;
for ($i=$maxnum; $i>=0; $i-=1) {
$front = "$directory/$startswith".$i."_";
$frontlen = strlen($front);
}
}
if ($num_readable > 0 or is_readable($comment_file)) {
+ $count += 1;
echo "<h4 id=\"s$i\">$title $i</h4>\n";
} // 's' b/c id attributes must begin with a letter, not a digit.
if (is_readable($comment_file)) {
echo "</ul>\n";
}
}
+ if ($count == 0) {
+ echo "<p>No entries yet</p>\n";
+ }
}
?>