| version 1.122, 2013/11/13 12:09:53 |
version 1.123, 2013/11/18 11:04:44 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/functions.inc.php,v 1.121 2013-11-13 12:02:56 igor Exp $ */ |
/* $Platon: Metafox/functions.inc.php,v 1.122 2013-11-13 12:09:53 igor Exp $ */ |
| |
|
| function ezin_eval($evalcode) /* {{{ */ |
function ezin_eval($evalcode) /* {{{ */ |
| { |
{ |
| Line 2384 function ezin_get_sitemap() { |
|
| Line 2384 function ezin_get_sitemap() { |
|
| $host = 'http://'.$_SERVER['HTTP_HOST']; |
$host = 'http://'.$_SERVER['HTTP_HOST']; |
| $ret = '<| "<" |>?xml version="1.0" encoding="<|$ezin_encoding|>" ?<| ">\n" |> |
$ret = '<| "<" |>?xml version="1.0" encoding="<|$ezin_encoding|>" ?<| ">\n" |> |
| <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n"; |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n"; |
| |
$oldest_dt = ezin_get_oldest_dt(); |
| $sections = ezin_get_section_list(); |
$sections = ezin_get_section_list(); |
| foreach($sections as $section) { |
foreach($sections as $section) { |
| ezin_section_link_process($section); |
ezin_section_link_process($section); |
| |
$changed_dt = ''; |
| |
$changed_dt = (strlen($changed_dt) <= 0) ? $section['section_changed_dt'] : $changed_dt; |
| |
$changed_dt = (strlen($changed_dt) <= 0) ? $section['section_created_dt'] : $changed_dt; |
| |
$changed_dt = (strlen($changed_dt) <= 0) ? $oldest_dt : $changed_dt; |
| $ret .= ' |
$ret .= ' |
| <url> |
<url> |
| <loc>'.$host.$section['section_link'].'</loc> |
<loc>'.$host.$section['section_link'].'</loc> |
| <lastmod>'.date("Y-m-d", strtotime($section['section_changed_dt'])).'</lastmod> |
<lastmod>'.date("Y-m-d", strtotime($changed_dt)).'</lastmod> |
| </url>'."\n"; |
</url>'."\n"; |
| } |
} |
| $articles = ezin_get_available_articles(); |
$articles = ezin_get_available_articles(); |
| foreach($articles as $article) { |
foreach($articles as $article) { |
| ezin_article_link_process($article); |
ezin_article_link_process($article); |
| |
$changed_dt = ''; |
| |
$changed_dt = (strlen($changed_dt) <= 0) ? $article['article_changed_dt'] : $changed_dt; |
| |
$changed_dt = (strlen($changed_dt) <= 0) ? $article['article_created_dt'] : $changed_dt; |
| |
$changed_dt = (strlen($changed_dt) <= 0) ? $oldest_dt : $changed_dt; |
| $ret .= ' |
$ret .= ' |
| <url> |
<url> |
| <loc>'.$host.$article['article_link'].'</loc> |
<loc>'.$host.$article['article_link'].'</loc> |
| <lastmod>'.date("Y-m-d", strtotime($article['article_changed_dt'])).'</lastmod> |
<lastmod>'.date("Y-m-d", strtotime($changed_dt)).'</lastmod> |
| </url>'."\n"; |
</url>'."\n"; |
| } |
} |
| $ret .= '</urlset>'."\n"; |
$ret .= '</urlset>'."\n"; |