\n"; ?> \n"; echo "$url/bbs/board.php?bo_table=$bo\n"; $temp = sql_fetch("select wr_datetime from `$g5[write_prefix]$bo` order by wr_datetime DESC"); $lastmod = str_replace(" ", "T", substr($temp[wr_datetime], 0, 30))."+00:00"; // if if(!$lastmod || strlen($lastmod) < 25 || strcmp($lastmod, "+00:00")) $lastmod = "2014-10-10T00:00:00+00:00"; echo "$lastmod\n"; echo "daily\n"; echo "0.9\n"; echo "\n"; $query = sql_query("select wr_id, wr_datetime from `$g5[write_prefix]$bo` where wr_is_comment='0' AND wr_option NOT LIKE '%secret%'"); while($row = sql_fetch_array($query)) { // list of each article echo ""; echo "$url/bbs/board.php?bo_table=$bo&wr_id=$row[wr_id]"; $temp = sql_fetch("select wr_datetime from `$g5[write_prefix]$bo` where wr_parent='$row[wr_id]' order by wr_id DESC"); $lastmod = str_replace(" ", "T", substr($temp[wr_datetime], 0, 30))."+00:00"; if(!$lastmod) { $temp = sql_fetch("select wr_datetime from `$g5[write_prefix]$bo` where wr_id='$row[wr_id]'"); $lastmod = str_replace(" ", "T", substr($temp[wr_datetime], 0, 30))."+00:00"; } if(!$lastmod) $lastmod = $g5[time_ymd]; echo "$lastmod"; echo "weekly"; echo "0.5"; echo "\n"; } $i++; } ?>