';?>
Search recent messages in
(searches last articles per group)
Search Terms :
Subject Poster Message-ID
   
'.$grouplist[0].' (latest)'; echo ''; // Article List button echo ''; // Newsgroups button (hidden) echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; echo ''; echo '
'; echo '
'; } else { echo '

'; echo ''.basename(getcwd()).' / '; echo 'search results for: '.$_POST['terms'].'

'; echo ''; // Newsgroups button (hidden) echo ''; echo '
'; echo '
'; echo ''; echo '
'; echo '
'; } echo ''; # Iterate through groups $results=0; if(isset($_COOKIE['tzo'])) { $offset=$_COOKIE['tzo']; } else { $offset=$CONFIG['timezone']; } $searchterms = "%".$_POST['terms']."%"; # Prepare search database $database = $spooldir.'/'.$config_name.'-overview.db3'; $table = 'overview'; $dbh = rslight_db_open($database, $table); if($dbh) { // $stmt = $dbh->prepare("SELECT * FROM $table WHERE ".$_POST['searchpoint']." like '%".$_POST['terms']."%' ORDER BY date DESC"); $stmt = $dbh->prepare("SELECT * FROM $table WHERE ".$_POST['searchpoint']." like :terms ORDER BY date DESC"); $stmt->bindParam(':terms', $searchterms); $stmt->execute(); while($overviewline = $stmt->fetch()) { # Generate link $url = $thissite."/article-flat.php?id=".$overviewline['number']."&group="._rawurlencode($overviewline['newsgroup'])."#".$overviewline['number']; $groupurl = $thissite."/thread.php?group="._rawurlencode($overviewline['newsgroup']); $fromoutput = explode("<", html_entity_decode($overviewline['name'])); // Use local timezone if possible $ts = new DateTime(date($text_header["date_format"], $overviewline['date']), new DateTimeZone('UTC')); $ts->add(DateInterval::createFromDateString($offset.' minutes')); if($offset != 0) { $newdate = $ts->format('D, j M Y H:i'); } else { $newdate = $ts->format($text_header["date_format"]); } unset($ts); $fromline=address_decode(headerDecode($overviewline['name']),"nirgendwo"); if (!isset($fromline[0]["personal"])) { $lastname=$fromline[0]["mailbox"];; } else { $lastname=$fromline[0]["personal"]; } if(($results % 2) != 0){ echo ''; if($results++ > ($maxdisplay - 2)) break; } $dbh = null; } echo '
'; } else { echo '
'; } echo '

'; echo ''.mb_decode_mimeheader($overviewline['subject'])."\r\n"; echo '

'; echo ''.$overviewline['newsgroup'].''; echo '

'; echo '

Posted: '.$newdate.' by: '.mb_decode_mimeheader($lastname).'

'; echo '
'; echo "

".$results." matching articles found.

\r\n"; #echo "
Rocksolid Overboard version ".$version; include "tail.inc"; $thispage = ob_get_contents(); ob_end_clean(); echo $thispage; function highlightStr($haystack, $needle) { preg_match_all("/$needle+/i", $haystack, $matches); if (is_array($matches[0]) && count($matches[0]) >= 1) { foreach ($matches[0] as $match) { $haystack = str_replace($match, ''.$match.'', $haystack); } } return $haystack; } ?>