';
include("../forum/globalxml.php");
echo '';
//not logged in users gets no data
if (!$bbuserinfo['userid']) {
    echo '';
    die();
}
$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());
}
// 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());
}
    // Start XML file, echo parent node
$allowed_args = ',f_name,l_name,subject,msg,';
//if (@$_SERVER['HTTP_REFERER']!="http://connected.czf/mapa/") {
//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 6
            - /mapa_genxml.php
      
      
	
	
  
    czfgmap | 
    Subversion Repositories:  | 
  
[/] [mapa_genxml.php] - Blame information for rev 6
 
 
      Powered by WebSVN 2.2.1