예제 #1
0
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 "????";
}
예제 #2
0
 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}&amp;action=viewsite&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;story=" . $o->id . "&amp;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}&amp;action=edit_story&amp;edit_story=" . $o->id . "&amp;comingFrom=viewsite&amp;step=3&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;'>" . $o->getField("activatedate") . "</a></strong>");
     }
     if (!nulldate($o->getField("deactivatedate"))) {
         printc(" to <strong><a href='index.php?{$sid}&amp;action=edit_story&amp;edit_story=" . $o->id . "&amp;comingFrom=viewsite&amp;step=3&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;'>" . $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) {