function txtdaterange($date1, $date2) { if (nulldate($date1) && nulldate($date2)) { return "always"; } if (nulldate($date1) && !nulldate($date2)) { return "before " . usdate($date2); } if (!nulldate($date1) && nulldate($date2)) { return "after " . usdate($date1); } if (!nulldate($date1) && !nulldate($date2)) { return "between " . usdate($date1) . " and " . usdate($date2); } return "????"; }
if ($o->getField("title") && $o->getField("type") != "link" && $o->getField("type") != "file" && $o->getField("type") != "image") { printc("<strong>"); printc("<a name='" . $o->id . "'"); printc(" href='index.php?{$sid}&action=viewsite&site={$site}&section={$section}&page={$page}&story=" . $o->id . "&detail=" . $o->id . "'>"); printc(spchars($o->getField("title")) . "</a></strong>\n"); } printc("</div>\n"); /****************************************************************************** * check is story is active and if not, display active dates. ******************************************************************************/ if (!indaterange($o->getField("activatedate"), $o->getField("deactivatedate"))) { printc("<div class='contentinfo' align='left'>\n"); if (!nulldate($o->getField("activatedate"))) { printc("Active dates: <strong><a href='index.php?{$sid}&action=edit_story&edit_story=" . $o->id . "&comingFrom=viewsite&step=3&site={$site}&section={$section}&page={$page}&'>" . $o->getField("activatedate") . "</a></strong>"); } if (!nulldate($o->getField("deactivatedate"))) { printc(" to <strong><a href='index.php?{$sid}&action=edit_story&edit_story=" . $o->id . "&comingFrom=viewsite&step=3&site={$site}&section={$section}&page={$page}&'>" . $o->getField("deactivatedate") . "</strong>"); } printc("</div>"); } /****************************************************************************** * Get story tags and display them ******************************************************************************/ $record_id = $o->id; $user_id = $_SESSION[aid]; $record_type = "story"; $story_tags = get_record_tags($record_id); if ($story_tags) { printc("\n\t\t\t\t<div class='contentinfo' style='margin-top: 0px;'>"); printc("Categories:"); foreach ($story_tags as $tag) {