} if ($row['content_flags'] & 0x4) { $icons .= ' <img border=0 src="' . $root_dir . $youtube_img . '"/> '; } if ($row['content_flags'] & $content_nsfw) { $nsfw .= '<span class="nsfw">NSFW</span>'; } $subj = print_subject(encode_subject($row['subject'])); if (extension_loaded('mbstring')) { $content_to_compare = $row['compare_to']; if (is_null($content_to_compare)) { $content_to_compare = $row['msg_subject']; } $from_text = $subj; // htmlentities($body, HTML_ENTITIES,'UTF-8'); $to_text = print_subject(encode_subject($content_to_compare)); $from_text = mb_convert_encoding($from_text, 'HTML-ENTITIES', 'UTF-8'); $to_text = mb_convert_encoding($to_text, 'HTML-ENTITIES', 'UTF-8'); $diff_opcodes = FineDiff::getDiffOpcodes($from_text, $to_text); $subj = mb_convert_encoding(FineDiff::renderDiffToHTMLFromOpcodes($from_text, $diff_opcodes), 'UTF-8', 'HTML-ENTITIES'); } $line = $icons . '<a id="' . $msg_id . '_' . $row['id'] . '" name="' . $msg_id . '_' . $row['id'] . '" target="bottom" href="' . $root_dir . $page_version . '?id=' . $msg_id . '&ver=' . $row['id'] . '">' . $subj . '</a> ' . $nsfw . ' ' . ' [' . $row['views'] . ' views] ' . $row['created'] . ' <b>' . $row['chars'] . '</b> bytes'; } if (isset($version) && $version == $row['id']) { print '<font color="green">></font>'; } else { print '<span style="opacity:0;">></span>'; } print '<i><font color="gray">' . $line . '</font></i>'; print '<br/>'; }
if ($row['content_flags'] & 0x4) { $icons .= ' <img border=0 src="' . $root_dir . $youtube_img . '"/> '; } $nsfw = ''; global $content_nsfw; if ($row['content_flags'] & $content_nsfw) { $nsfw .= ' <span class="nsfw">NSFW</span>'; } $line = ""; if ($show_hidden == 1 && in_array($row['author'], $ignored)) { $line = "<li><div style=\"visibility:visible\" id=\"hidden_msg_" . $id . "\"><font color=\"lightgrey\">Hidden message by " . $post_author . " <A href=\"#\" onclick=\"show_hidden_msg(" . $id . ");return false;\"><font color=\"lightgrey\"><b>show</b></font></A></font></div><div style=\"visibility:hidden; height:0;\" id=\"shown_msg_" . $id . "\">"; $line .= "<A href=\"#\" onclick=\"hide_shown_msg(" . $id . "); return false;\" ><font color=\"lightgrey\"><b>hide</b></font></A> "; } else { $line = "<li>"; } $line .= $icons . '<a target="bottom" name="' . $id . '" href="' . $root_dir . $page_msg . '?id=' . $id . '"> ' . print_subject($subj) . '</a> ' . $nsfw . ' <b>' . $enc_user . '</b>' . ' ' . '[' . $row['views'] . ' views] ' . $row['created'] . ' <b>' . $row['chars'] . '</b> bytes'; if (!is_null($row['likes'])) { $likes = $row['likes']; if ($likes > 0) { $line .= ' <font color="green"><b>+' . $likes . '</b></font>'; } } if (!is_null($row['dislikes'])) { $dislikes = $row['dislikes']; if ($dislikes > 0) { $line .= ' <font color="red"><b>-' . $dislikes . '</b></font>'; } } if ($show_hidden == 1 && in_array($row['author'], $ignored)) { $line .= "</div>"; }
function print_line_in_one_thread($row) { global $root_dir; global $image_img; global $youtube_img; global $page_msg; global $show_hidden; global $ignored; $msg_moder = $row['moder']; // $subj = translit(/*nl2br(*/htmlentities($row['subject'], HTML_ENTITIES,'UTF-8')/*)*/, $proceeded); $subj = print_subject(encode_subject($row['subject'])); $enc_user = htmlentities($row['username'], HTML_ENTITIES, 'UTF-8'); $length = $row['chars']; if (is_null($length)) { $length = $row['len']; } $img = ''; $thread_closed = $row['t_closed']; if ($row['level'] == 0) { if ($thread_closed != 0) { $img = '<img border=0 src="images/cs.gif" width=16 height=16 alt="*"> '; } else { $img = '<img border=0 src="images/bs.gif" width=16 height=16 alt="*"> '; } } else { $img = '<img border=0 src="images/dc.gif" width=16 height=16 alt="*"> '; } if ($row['status'] == 2) { $line = ' <span>' . $img . '<I><font color="gray"><del>This message has been deleted</del></font></I> '; } else { $icons = ''; if ($row['content_flags'] & 0x2) { $icons = ' <img border=0 src="' . $root_dir . $image_img . '"/> '; } if ($row['content_flags'] & 0x4) { $icons .= ' <img border=0 src="' . $root_dir . $youtube_img . '"/> '; } $line = ' <span id="sp_' . $row['id'] . '"><a id="' . $row['id'] . '" name="' . $row['id'] . '" target="bottom" href="' . $root_dir . $page_msg . '?id=' . $row['id'] . '" onclick="selectMsg(\'' . $row['id'] . '\')">' . $img . $icons . $subj . ' </a>'; } if ($row['modified'] != null) { $date = $row['modified'] . '<span class="edited">*</span>'; } else { $date = $row['created']; } $suffix = ''; if ($row['modified'] != null) { $date = $row['modified']; // . '<span class="edited">*</span>'; $suffix_style = $suffix = 'edited'; } else { $date = $row['created']; if ($length == 0) { $suffix_style = 'empty'; $suffix = "(-)"; } } if ($suffix != "") { $suffix = ' <span class="' . $suffix_style . '">' . $suffix . '</span>'; } $line .= ' <b>' . $enc_user . '</b>' . $suffix . ' ' . '[' . $row['views'] . ' views] ' . $date . ' <b>' . $length . '</b> bytes'; if (!is_null($row['likes'])) { $likes = $row['likes']; if ($likes > 0) { $line .= ' <font color="green"><b>+' . $likes . '</b></font>'; } } if (!is_null($row['dislikes'])) { $dislikes = $row['dislikes']; if ($dislikes > 0) { $line .= ' <font color="red"><b>-' . $dislikes . '</b></font>'; } } return $line . " </span>"; }