Exemplo n.º 1
0
    $action = $board . " | " . $title . " | " . $title2 . " | " . $title3 . " | " . $userid . " | " . $dt . " | " . $mgon . " | " . $agon . " | " . $ogon . " | " . $num;
    $action = "[" . date("Y-m-d H:i:s") . "] {$id}({$ip}) | " . $action . "\n";
    $logs = BBS_HOME . "/bbsbfind.log";
    if (!($fn = fopen($logs, "a"))) {
        return FALSE;
    }
    if (!flock($fn, LOCK_EX)) {
        fclose($fh);
        return FALSE;
    }
    fputs($fn, $action);
    flock($fn, LOCK_UN);
    fclose($fn);
    return TRUE;
}
$articles = bbs_search_articles($board, $title, $title2, $title3, $userid, $dt, $mgon, $agon, $ogon);
if ($articles <= 0) {
    html_error_quit("系统错误:" . $articles);
}
//	log_it($currentuser["userid"], $_SERVER["REMOTE_ADDR"], $board, $title, $title2, $title3, $userid, $dt, $mgon, $agon, $ogon, count($articles));
?>
<script>
var ta = new tabWriter(0,'main wide',0,[['编号','6%','center'],['标记','6%','center'],['作者','12%','center'],['日期','8%','center'],['标题',0,0]]);
<?php 
foreach ($articles as $article) {
    $flags = $article["FLAGS"];
    $col1 = $article["NUM"] + 1;
    $col2 = $flags[0] . $flags[3];
    $col3 = '<a href="bbsqry.php?userid=' . $article["OWNER"] . '">' . $article["OWNER"] . '</a>';
    $col4 = strftime("%b&nbsp;%e", $article["POSTTIME"]);
    $col5 = '<a href="bbscon.php?bid=' . $brdnum . '&id=' . $article["ID"] . '">' . htmlspecialchars($article["TITLE"], ENT_QUOTES) . ' </a>';
Exemplo n.º 2
0
 /**
  * function search
  *
  * @param Board $board
  * @param string $t1
  * @param string $t2
  * @param string $tn not contain
  * @param string $author
  * @param int $day
  * @param boolean $m
  * @param boolean $a attachment
  * @param boolean $t only threads
  * @return array
  * @access public
  */
 public static function search($board, $t1, $t2, $tn, $author, $day, $m, $a, $t)
 {
     $m = $m ? 1 : 0;
     $a = $a ? 1 : 0;
     $t = $t ? 1 : 0;
     $ret = bbs_search_articles($board->NAME, $t1, $t2, $tn, $author, intval($day), $m, $a, $t);
     if (!is_array($ret)) {
         return array();
     }
     foreach ($ret as &$v) {
         $v = new Article($v, $board);
     }
     return $ret;
 }