14) { echo ""; } echo "
"; echo ""; if (!$bSingleMode) { echo ""; } echo strtolower($row['subject']); if (!$bSingleMode) { echo ""; } echo ""; echo inlinestyle($row['news']); if (!empty($row['galleryid'])) { echo "
"; echo "
"; $SQL = "select ImageName, FullSizeImageName, Title from gallery where GalleryID = ".$row['galleryid']." order by ID asc"; $retid_g = mysql_query($SQL, $cid); if (!$retid_g) { echo( mysql_error()); } // failure while ($row_g = mysql_fetch_array($retid_g)) { if (!empty($row_g['FullSizeImageName'])) { echo ""; } else { echo ""; } } echo "
"; } $row_c = mysql_fetch_array(mysql_query("select count(ID) as CommentCount from comments where newsid = ".$row['id'], $cid)); $comments = $row_c['CommentCount']; $row_c = mysql_fetch_array(mysql_query("select captchaQ from news where id = ".$row['id'], $cid)); $captchaQ = $row_c['captchaQ']; if ($row['id'] == $latestPostID) { // 6 months for most recent post $bCanComment = ((abs(strtotime($row['posted']) - strtotime("now"))/86400) < 180); } else { // 2 weeks from postdate otherwise $bCanComment = ((abs(strtotime($row['posted']) - strtotime("now"))/86400) < 14); } if (empty($captchaQ)) { $bCanComment = 0; } echo ""; if (!$bSingleMode) { echo ""; } echo $comments." comment".($comments == 1 ? "" : "s"); if (!$bSingleMode) { echo ""; } echo "".date("g:ia - l, F jS, Y", strtotime($row['posted']))." - ".$row['poster'].""; if ($bSingleMode && ($comments > 0 || $bCanComment)) { echo ""; $SQL = "select subject, body, poster, posted from comments where newsid = ".$row['id']." order by posted asc"; $retid_c = mysql_query($SQL, $cid); while ($row_c = mysql_fetch_array($retid_c)) { echo "
"; echo "".$row_c['poster']."".date("g:ia - F jS, Y", strtotime($row_c['posted'])).""; echo nl2br($row_c['body']); echo "
"; } if ($bCanComment) { echo ""; echo "
"; echo " (Screen Name)
"; echo "
"; echo " (CAPTCHA)
"; echo ""; echo "
"; } else { echo "Commenting is now closed"; } } echo "
"; $lastPost = $row['posted']; } ?>