prepare('SELECT * FROM overview WHERE msgid=:messageid AND newsgroup=:group'); $articles_query->execute(['messageid' => $id, 'group' => $group]); $found = 0; while ($row = $articles_query->fetch()) { $id = $row['number']; $found = 1; break; } $dbh = null; if($found) { $newurl = 'article-flat.php?id='.$id.'&group='.$group.'#'.$id; header("Location: $newurl"); die(); } } } if(isset($_REQUEST["first"])) $first=$_REQUEST["first"]; $_SESSION['rsactive'] = true; $location = $_SERVER['REQUEST_URI'].$_SERVER['REQUEST_STRING']; $_SESSION['return_page'] = $location.'#'.$id; file_put_contents($accessfile, "\n".format_log_date()." ".$config_name." ".$group.":".$id, FILE_APPEND); if(isset($frames_on) && $frames_on === true) { ?> header->subject); header("Last-Modified: ".date("r", $message->header->date)); $title.= ' - '.$group.' - '.$subject; } include "head.inc"; echo '

'; echo ''.basename(getcwd()).' / '; echo ''.htmlspecialchars(group_display_name($group)).' / '.$subject.'

'; if($message) { // load thread-data and get IDs of the actual subthread $thread=thread_load($group); $subthread=thread_getsubthreadids($message->header->id,$thread); if($thread_articles == false) { sort($subthread); } // If no page is set, lets look, if we can calculate the page by // the message-number if(!isset($first)) { $first=intval(array_search($id,$subthread)/$articleflat_articles_per_page)* $articleflat_articles_per_page+1; } // which articles are exactly on this page? $pageids=array(); for($i=$first-1; (($iheader->id,$group,$thread,$pageids); message_thread($message->header->id,$group,$thread,false); echo '
'; echo ''; // navigation line echo ''; // Article List button echo ''; // Pages echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo articleflat_pageselect($group,$id,count($subthread),$first); echo '
'; foreach($pageids as $subid) { flush(); $message=message_read($subid,0,$group); echo ' '; message_show($group,$subid,0,$message,$articleflat_chars_per_articles); if ((!$CONFIG['readonly']) && ($message)) { echo '
'. ''. ''. ''. ''. '
'; } } // navigation line echo ''; // Article List button echo ''; // Pages echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo articleflat_pageselect($group,$id,count($subthread),$first); echo '
'; } include "tail.inc"; ?>