<?php
require_once('ed/sitebase.inc');
require_once('ed/entry.inc');
require_once('ed/signup.inc');
tophdr(0);
$edid='ed_log';
$cnum='c1';
edset();
unset($_SESSION['HomeTopicno']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>The Schooner Sara B Log</title>
</head>
<body>

<div align="center"><big><big>The Schooner <i>Sara B</i> Log</big></big><br>
</div>

<center><table width=80%><tr><td>
<div class=pagebox>
<?php
$top_res=mysqli_query($msql,
        "SELECT topicno, entryno FROM ${edid}_topic ORDER BY topicno DESC");
if (!$top_res) {echo '<br>Malfunction:'.mysqli_error($msql).'<br>'; exit(); }
echo "<table width=100% cellpadding=2 cellspacing=0>\n";
$bg=array('#DDDDDD','#EEEEEE');
$bgn=0;
while ($topic=mysqli_fetch_assoc($top_res))
    {echo '<tr bgcolor="'.$bg[$bgn].'">';
    $entry=getrec('entry', 'entryno', $topic['entryno']);
    index_disent($entry, $topic['topicno']);
    echo "</tr>\n";
    $bgn=1-$bgn;
    }
mysqli_free_result($top_res);
?></table>
</div></td></tr></table></center>
<br><br>

<?php
function index_disent($entry, $tanch)
    {global $msql, $edid, $urec, $edcfg, $cnum;
    if (!$entry)
        {echo '*malfunction*</td><td></td><td></td>'; }
    else {
        echo '<td width=10% align=right><nobr>'
            .($tanch?'<a name="'.$tanch.'"></a> ':'')
            .'<a href="ed/entry.php?'.$edcfg['idq']
            .'&topicno='.$entry['topicno'].'">'
            .date('F d, Y', strtotime($entry['edate']))
            .'</a> &nbsp;</nobr></td>';
        echo '<td>'.$entry['subject'].'</td>';
        }
    }

?>

<br>
<div align="center">
To get automatic notices of new postings send us a note.<br><br>
email: <a href="mailto:sarab@brownroad.com">sarab@brownroad.com</a><br>
<br>
</div>

</body></html>
