function rss_print_content_k($item, $num, $count) { global $_conf, $xml_en, $channel, $ch_title; $item = array_map('trim', $item); // 変数の初期化 $date_ht = ''; $subject_ht = ''; $creator_ht = ''; $description_ht = ''; $prev_item_ht = ''; $next_item_ht = ''; // タイトル $item_title = htmlspecialchars($item['title'], ENT_QUOTES, 'Shift_JIS', false); // リンク $link_orig = P2Util::throughIme($item['link']); // jigブラウザWEB http://bwXXXX.jig.jp/fweb/?_jig_= $view_jig = ''; /* $link_jig = 'http://bwXXXX.jig.jp/fweb/?_jig_=' . rawurlencode($item['link']); $view_jig = ' <a href="' . P2Util::throughIme($link_jig) . '">jW</a>'; */ // トピック if (isset($item['dc:subject'])) { $subject_ht = $item['dc:subject']; } // 文責 if (isset($item['dc:creator']) && $item['dc:creator'] !== '') { $creator_ht = $item['dc:creator']; } // 日時 if (!empty($item['dc:date'])) { $date_ht = rss_format_date($item['dc:date']); } elseif (!empty($item['dc:pubdate'])) { $date_ht = rss_format_date($item['dc:pubdate']); } // 概要 if (isset($item['content:encoded']) && $item['content:encoded'] !== '') { $description_ht = rss_desc_converter($item['content:encoded']); } elseif (isset($item['description']) && $item['description'] !== '') { $description_ht = rss_desc_converter($item['description']); } // 前後の概要へのリンク $prev_item_num = $num - 1; $next_item_num = $num + 1; if ($prev_item_num >= 0) { $prev_item_ht = "<a href=\"read_rss.php?xml={$xml_en}&num={$prev_item_num}\"{$_conf['k_accesskey_at']['prev']}>{$_conf['k_accesskey_st']['prev']}前</a>"; } if ($next_item_num <= $count) { $next_item_ht = "<a href=\"read_rss.php?xml={$xml_en}&num={$next_item_num}\"{$_conf['k_accesskey_at']['next']}>{$_conf['k_accesskey_st']['next']}次</a>"; } // 表示 if ($_conf['iphone']) { echo <<<EOP <h3>{$item_title}</h3> <div>{$creator_ht}{$date_ht} <a href="{$link_orig}">直</a>{$view_jig}</div> <hr> <div>{$description_ht}</div> <hr> <div class="read-footer">{$prev_item_ht} {$next_item_ht}<br> <a href="subject_rss.php?xml={$xml_en}">{$ch_title}</a><br> {$_conf['k_to_index_ht']} </div> EOP; } else { echo <<<EOP <h3>{$item_title}</h3> <div>{$creator_ht}{$date_ht} <a href="{$link_orig}">直</a>{$view_jig}</div> <hr> <div>{$description_ht}</div> <hr> <div>{$prev_item_ht} {$next_item_ht}<br> <a href="subject_rss.php?xml={$xml_en}"{$_conf['k_accesskey_at'][5]}>{$_conf['k_accesskey_st'][5]}{$ch_title}</a><br> <a href="menu_k.php?view=rss"{$_conf['k_accesskey_at'][9]}>{$_conf['k_accesskey_st'][9]}RSS</a> {$_conf['k_to_index_ht']} </div> EOP; } }
function rss_print_content($item, $num, $count) { $item = array_map('trim', $item); // 変数の初期化 $date_ht = ''; $subject_ht = ''; $creator_ht = ''; $description_ht = ''; $prev_item_ht = ''; $next_item_ht = ''; // リンク $item_title = p2h($item['title'], false); // タイトル $link_orig = P2Util::throughIme($item['link']); // トピック if (isset($item['dc:subject'])) { $subject_ht = $item['dc:subject']; } // 文責 if (isset($item['dc:creator']) && $item['dc:creator'] !== '') { $creator_ht = "<b class=\"name\">" . trim($item['dc:creator']) . "</b>:"; } // 日時 if (!empty($item['dc:date'])) { $date_ht = rss_format_date($item['dc:date']); } elseif (!empty($item['dc:pubdate'])) { $date_ht = rss_format_date($item['dc:pubdate']); } // 概要 if (isset($item['content:encoded']) && $item['content:encoded'] !== '') { $description_ht = rss_desc_converter($item['content:encoded']); } elseif (isset($item['description']) && $item['description'] !== '') { $description_ht = rss_desc_converter($item['description']); } // 前後の概要へジャンプ if ($count != 0) { $prev_item_num = $num - 1; $next_item_num = $num + 1; if ($prev_item_num != 0) { $prev_item_ht = "<a href=\"#it{$prev_item_num}\">▲</a>"; } if ($next_item_num <= $count) { $next_item_ht = "<a href=\"#it{$next_item_num}\">▼</a>"; } } // 表示 echo <<<EOP <table id="it{$num}" width="100%"> <tr> <td align="left"><h3 class="thread_title">{$item_title}</h3></td> <td align="right" nowrap>{$prev_item_ht} {$next_item_ht}</td> </tr> </table> <div style="margin:0.5em">{$creator_ht}{$date_ht} <a href="{$link_orig}">[LINK]</a></div> <div style="margin:1em 1em 1em 2em"> {$description_ht} </div> <div style="text-align:right"><a href="#it{$num}">▲</a></div> EOP; if ($count != 0 && $num != $count) { echo "\n<hr style=\"margin:20px 0px\">\n\n"; } }
} } // トピック if ($subject_column_ht) { $subject_ht = "<td class=\"t\">" . htmlspecialchars($item['dc:subject'], ENT_QUOTES, 'Shift_JIS', false) . "</td>"; } // 文責 if ($creator_column_ht) { $creator_ht = "<td class=\"t\">" . htmlspecialchars($item['dc:creator'], ENT_QUOTES, 'Shift_JIS', false) . "</td>"; } // 日時 if ($date_column_ht) { if (!empty($item['dc:date'])) { $date = rss_format_date($item['dc:date']); } elseif (!empty($item['dc:pubdate'])) { $date = rss_format_date($item['dc:pubdate']); } $date_ht = "<td class=\"t\">{$date}</td>"; } // 2ch,bbspinkのスレッドをp2で表示 if (preg_match('/http:\\/\\/([^\\/]+\\.(2ch\\.net|bbspink\\.com))\\/test\\/read\\.cgi\\/([^\\/]+)\\/([0-9]+)(\\/)?([^\\/]+)?/', $item['link'])) { $link_orig = preg_replace_callback('/http:\\/\\/([^\\/]+\\.(2ch\\.net|bbspink\\.com))\\/test\\/read\\.cgi\\/([^\\/]+)\\/([0-9]+)(\\/)?([^\\/]+)?/', 'rss_link2ch_callback', $item['link']); $preview_one = "<a href=\"{$link_orig}&one=true\">>>1</a> "; } else { $link_orig = P2Util::throughIme($item['link'], TRUE); } // 一列表示 $item_title = $item['title']; echo <<<EOP <tr class="{$r}">{$description_ht}<td class="tl">{$preview_one}<a id="tt{$i}" class="thre_title" href="{$link_orig}">{$item_title}</a></td>{$subject_ht}{$creator_ht}{$date_ht}</tr>