- if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
- print "<table class=\"headlinesList\" id=\"headlinesList\"
- cellspacing=\"0\" width=\"100%\">";
- }
-
- $lnum = 0;
-
- error_reporting (DEFAULT_ERROR_LEVEL);
-
- $num_unread = 0;
-
- while ($line = db_fetch_assoc($result)) {
-
- $class = ($lnum % 2) ? "even" : "odd";
-
- $id = $line["id"];
- $feed_id = $line["feed_id"];
-
- if ($line["last_read"] == "" &&
- ($line["unread"] != "t" && $line["unread"] != "1")) {
-
- $update_pic = "<img id='FUPDPIC-$id' src=\"images/updated.png\"
- alt=\"Updated\">";
- } else {
- $update_pic = "<img id='FUPDPIC-$id' src=\"images/blank_icon.gif\"
- alt=\"Updated\">";
- }
-
- if ($line["unread"] == "t" || $line["unread"] == "1") {
- $class .= "Unread";
- ++$num_unread;
- $is_unread = true;
- } else {
- $is_unread = false;
- }
-
- if ($line["marked"] == "t" || $line["marked"] == "1") {
- $marked_pic = "<img id=\"FMARKPIC-$id\" src=\"images/mark_set.png\"
- alt=\"Reset mark\" onclick='javascript:toggleMark($id)'>";
- } else {
- $marked_pic = "<img id=\"FMARKPIC-$id\" src=\"images/mark_unset.png\"
- alt=\"Set mark\" onclick='javascript:toggleMark($id)'>";
- }
-
-# $content_link = "<a target=\"_new\" href=\"".$line["link"]."\">" .
-# $line["title"] . "</a>";
-
- $content_link = "<a href=\"javascript:view($id,$feed_id);\">" .
- $line["title"] . "</a>";
-
-# $content_link = "<a href=\"javascript:viewContentUrl('".$line["link"]."');\">" .
-# $line["title"] . "</a>";
-
- if (get_pref($link, 'HEADLINES_SMART_DATE')) {
- $updated_fmt = smart_date_time(strtotime($line["updated"]));
- } else {
- $short_date = get_pref($link, 'SHORT_DATE_FORMAT');
- $updated_fmt = date($short_date, strtotime($line["updated"]));
- }
-
- if (get_pref($link, 'SHOW_CONTENT_PREVIEW')) {
- $content_preview = truncate_string(strip_tags($line["content_preview"]),
- 100);
- }
-
- $entry_author = $line["author"];
-
- if ($entry_author) {
- $entry_author = " - by $entry_author";
- }
-
- if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
-
- print "<tr class='$class' id='RROW-$id'>";
-
- print "<td class='hlUpdatePic'>$update_pic</td>";
-
- print "<td class='hlSelectRow'>
- <input type=\"checkbox\" onclick=\"toggleSelectRow(this)\"
- class=\"feedCheckBox\" id=\"RCHK-$id\">
- </td>";
-
- print "<td class='hlMarkedPic'>$marked_pic</td>";
-
- if ($line["feed_title"]) {
- print "<td class='hlContent'>$content_link</td>";
- print "<td class='hlFeed'>
- <a href=\"javascript:viewfeed($feed_id, '', false)\">".
- $line["feed_title"]."</a> </td>";
- } else {
- print "<td class='hlContent' valign='middle'>";
-
- print "<a href=\"javascript:view($id,$feed_id);\">" .
- $line["title"];
-
- if (get_pref($link, 'SHOW_CONTENT_PREVIEW') && !$rtl_tag) {
- if ($content_preview) {
- print "<span class=\"contentPreview\"> - $content_preview</span>";
- }
- }
-
- print "</a>";
- print "</td>";
- }
-
- print "<td class=\"hlUpdated\"><nobr>$updated_fmt </nobr></td>";
-
- print "</tr>";
-
- } else {
-
- if ($is_unread) {
- $add_class = "Unread";
- } else {
- $add_class = "";
- }
-
- print "<div class=\"cdmArticle$add_class\" id=\"RROW-$id\">";
-
- print "<div class=\"cdmHeader\">";
-
- print "<div style=\"float : right\">$updated_fmt,
- <a class=\"cdmToggleLink\"
- href=\"javascript:toggleUnread($id)\">Toggle unread</a>
- </div>";
-
- print "<a class=\"title\"
- onclick=\"javascript:toggleUnread($id, 0)\"
- target=\"new\" href=\"".$line["link"]."\">".$line["title"]."</a>";
-
- print $entry_author;
-
- if ($line["feed_title"]) {
- print " (<a href='javascript:viewfeed($feed_id)'>".$line["feed_title"]."</a>)";
- }
-
- print "</div>";
-
- print "<div class=\"cdmContent\">" . $line["content_preview"] . "</div><br clear=\"all\">";
-
- print "<div style=\"float : right\">$marked_pic</div>
- <div lass=\"cdmFooter\">
- <input type=\"checkbox\" onclick=\"toggleSelectRowById(this,
- 'RROW-$id')\" class=\"feedCheckBox\" id=\"RCHK-$id\"></div>";
-
-# print "<div align=\"center\"><a class=\"cdmToggleLink\"
-# href=\"javascript:toggleUnread($id)\">
-# Toggle unread</a></div>";
-
- print "</div>";
-
- }
-
- ++$lnum;
- }
-
- if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
- print "</table>";