header("Content-type: text/xml;charset=utf-8");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
$limit = 100; // feed 생성 수
$buff = '';
$buff .= "".PHP_EOL;
$buff .= 'http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:activity="http://activitystrea.ms/spec/1.0/" >'.PHP_EOL;
$buff .= ''.PHP_EOL;
$buff .= ''.PHP_EOL;
$buff .= 'http://kbsba.kr'.PHP_EOL;
$buff .= ''.PHP_EOL;
$buff .= 'ko'.PHP_EOL;
$Search = " where (1) ";
$Search .= " and wr_is_comment = 0 ";
$SelectBoard = " select bo_table,bo_subject from ".$g5['board_table']." where bo_use_search = 1 ";
$QueryBoard = sql_query($SelectBoard);
while($RowBoard = sql_fetch_array($QueryBoard)){ $ResultSelect[] = "( select *, '".$RowBoard['bo_table']."' as bo_table from ".$g5['write_prefix'].$RowBoard['bo_table'].$Search." )"; }
$ResultQuery = implode(" union all ", $ResultSelect);
$ResultQuery .= " order by wr_datetime desc limit 0 , $limit ";
$Query = sql_query($ResultQuery);
while($Row = sql_fetch_array($Query)){
$content = strip_tags($Row['wr_content']);
$content = str_replace(" "," ",$content);
$board = sql_fetch("select bo_subject from g5_board where bo_table = '".$Row['bo_table']."'");
$buff .= "- ".PHP_EOL;
$buff .= "".PHP_EOL;
$buff .= "".PHP_EOL;
$buff .= "".G5_BBS_URL."/board.php?bo_table=".$Row['bo_table']."&wr_id=".$Row['wr_id']."".PHP_EOL;
$buff .= "".PHP_EOL;
$buff .= "".$Row['wr_name']."".PHP_EOL;
$buff .= "".date("D, d M Y H:i:s T", strtotime($Row['wr_datetime']))."".PHP_EOL;
$buff .= "
".PHP_EOL;
}
$buff .= "".PHP_EOL;
$buff .= "";
echo $buff;
?>