"; $xmlDoc.=" $url $lastmod 0.5 daily "; /* 그누보드 URL 수정(.htaccess) 하신분 샘플 $url/ 뒷부분만 'Community' 수정하세요*/ $xmlDoc.=" $url/Community $lastmod 0.5 daily "; /* 카테고리샘플 시작 $url 뒷부분의 '3D_Printing', '서울' 을 자신의 사이트 맞게 수정하세요 */ $xmlDoc.=" $url/bbs/board.php?bo_table=3D_Printing&sca=서울 $lastmod 0.5 weekly "; /* 카테고리예제 끝 */ ?> $url/bbs/board.php?board_id=$bo"; $temp = sql_fetch("select wdate from `$g5[write_prefix]$bo` order by wdate DESC"); $lastmod = str_replace(" ", "T", substr($temp[wdate], 0, 30))."+00:00"; // if if(!$lastmod || strlen($lastmod) < 25 || strcmp($lastmod, "+00:00")) $lastmod = "2014-12-12T00:00:00+00:00"; $xmlDoc.=" $lastmod daily 0.9 "; $query = sql_query("select wr_id, wdate 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 $xmlDoc.=" $url/bbs/board.php?board_id=$bo&wr_id=$row[wr_id] "; $temp = sql_fetch("select wdate from `$g5[write_prefix]$bo` where wr_parent='$row[wr_id]' order by wr_id DESC"); $lastmod = str_replace(" ", "T", substr($temp[wdate], 0, 30))."+00:00"; if(!$lastmod) { $temp = sql_fetch("select wdate from `$g5[write_prefix]$bo` where wr_id='$row[wr_id]'"); $lastmod = str_replace(" ", "T", substr($temp[wdate], 0, 30))."+00:00"; } if(!$lastmod) $lastmod = $g5[time_ymd]; $xmlDoc.=" $lastmod weekly 0.5 "; } $i++; } $xmlDoc.=" "; $fp = fopen("./sitemap.xml","w"); fputs($fp, $xmlDoc); fclose($fp); ?>