','>',$xmlStr);
$xmlStr=str_replace('"','"',$xmlStr);
$xmlStr=str_replace("'",''',$xmlStr);
$xmlStr=str_replace("&",'&',$xmlStr);
return $xmlStr;
}
// Opens a connection to a MySQL server
$host="localhost";
$connection=mysql_connect ($host, $username, $password);
if (!$connection) {
die('Not connected : ' . mysql_error());
}
// Set the active MySQL database
$db_selected = mysql_select_db($database, $connection);
if (!$db_selected) {
die ('Can\'t use db : ' . mysql_error());
}
// Select all the rows in the markers table
$query = "SELECT * FROM $table WHERE $lattitude>$latmin AND $lattitude<$latmax AND $longitude>$lonmin AND $longitude<$lonmax $sqlwhere $sqlorder $sqllimit";
$result = mysql_query($query);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
header("Content-type: text/xml");
// Start XML file, echo parent node
$allowed_args = ',f_name,l_name,subject,msg,';
echo '';
if (@$_SERVER['HTTP_REFERER']!="http://mapa.prosek.czf/") {
//foreach(array_keys($_SERVER) as $k) {
//echo $k.".......".$_SERVER[$k]." ";
//}
if (@$_ENV['HOSTNAME']!="ztop") {
echo "fatal - response too slow";
die();
}
}
// Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
// ADD TO XML DOCUMENT NODE
echo '';
echo '';
if (@$row[$id]) {
$query = "SELECT * FROM line WHERE id1=$row[$id]";
$resultl = mysql_query($query);
if (!$resultl) {
die('Invalid query: ' . mysql_error());
}
while ($rowl = @mysql_fetch_assoc($resultl)){
echo '';
}
}
}
// End XML file
echo '';
?>
WebSVN
- czfgmap
- Blame
- Rev 2
- /mapa_genxml.php
czfgmap
Subversion Repositories:
[/] [mapa_genxml.php] - Blame information for rev 2