// // // // // // // // // // // // // // error_reporting(7); header("Content-type: text/xml"); echo ''; include("../forum/globalxml.php"); echo ''; //not logged in users gets everyone data if (!$bbuserinfo['userid']) { # echo ''; # die(); $db="gendb"; } $db=str_replace(" ","",@$db); $latmin=str_replace(" ","",@$latmin); $latmax=str_replace(" ","",@$latmax); $lonmin=str_replace(" ","",@$lonmin); $lonmax=str_replace(" ","",@$lonmax); $where=str_replace(" ","",@$where); switch (@$db) { case "czfreemapa": require("mapa_dbinfo_czfreemapa.php"); break; case "czfmutf": require("mapa_dbinfo_czfmutf.php"); break; case "ajax": require("mapa_dbinfo_ajax.php"); break; case "gendb": require("mapa_dbinfo_gendb.php"); break; default: require("mapa_dbinfo_czfmutf.php"); } if(!@$latmin) $latmin="50.11389119307087"; if(!@$latmax) $latmax="50.13040037545383"; if(!@$lonmin) $lonmin="14.483671188354492"; if(!@$lonmax) $lonmax="14.518003463745117"; #$limit=10; if(!@$sortby) { $sqlorder="ORDER BY name"; } else { $sortby=str_replace(" ","",@$sortby); if(!@$order) { $sqlorder="ORDER BY $sortby"; } else { $order=str_replace(" ","",@$order); $sqlorder="ORDER BY $sortby $order "; } } if((!@$limit)) { $sqllimit=""; } else { $limit=str_replace(" ","",@$limit); if($limit == 0) { $sqllimit=""; } else { $sqllimit="LIMIT $limit"; } } if((!@$where)) { $sqlwhere=""; } else { $where=str_replace(" ","",@$where); $sqlwhere="AND $where"; } function parseToXML($htmlStr) { $xmlStr=str_replace('<','<',$htmlStr); $xmlStr=str_replace('>','>',$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()); } // $lattitude = mysql_real_escape_string($lattitude); $longitude = mysql_real_escape_string($longitude); $latmin = mysql_real_escape_string($latmin); $latmax = mysql_real_escape_string($latmax); $lonmin = mysql_real_escape_string($lonmin); $lonmax = mysql_real_escape_string($lonmax); $sqlwhere = mysql_real_escape_string($sqlwhere); $sqlorder = mysql_real_escape_string($sqlorder); $sqllimit = mysql_real_escape_string($sqllimit); $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()); } // 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 15 - /mapa_genxml.php
  jablonka.czprosek.czf

czfgmap

Subversion Repositories:
[/] [mapa_genxml.php] - Blame information for rev 15

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1