<?php
// http://api.moreover.com/ping?u=http:...YourSiteMapURL

//define('CNSTNT_SET_LOCALE', '"UTF-8"');
define('SITE_ADDRESS_HTTP', 'http://www.vitoshabg.com/');
$root_path = './';

/*
$_glb_mysql['server'] = 'localhost';
$_glb_mysql['dbname'] = 'vita';
$_glb_mysql['user'] = 'vikonta';             //vikonta
$_glb_mysql['password'] = 'vikonta99';              //sqlmyvita
$_glb_mysql['collation'] = 'utf8';
$_glb_mysql['setlocale'] = 'UTF-8';

$_glb_settings['system'] = 2;      // 1=UNIX(Linux), 2=Windows, 3=Machintos
$_glb_settings['inc_folder'] = $root_path .'inc/';
$_glb_settings['inc_ext'] = ".inc.php";
*/

include ($root_path ."init.inc.php");
$_glb_mysql['menu_tbl']  = 'menu';    //CNSTNT_TBL_MENU;
$_glb_mysql['where_and'] = ' AND hdn=0 AND sts=0 AND psn<9 ' .
                           ' AND rel_word<>"sitemap"';

include($_glb_settings['inc_folder'] ."_menu.class.php");
include($_glb_settings['inc_folder'] ."_menu_node.class.php");

// The root nodes have 0 as a parent id !!!
$menu_tree = new Tree($_glb_mysql, 0, $c_line, 'map', 'xml');
$_tree_str = $menu_tree->showTree($c_line, 'map', 'xml');

header("Content-Type: text/xml; charset=".$_glb_mysql['setlocale']);
$_str = '<?xml version="1.0" encoding="'.$_glb_mysql['setlocale'].'"?>'.$c_line .
'<urlset 
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
'.$c_line.$c_line;
print($_str);
print($_tree_str);
print("</urlset>");
?>