jablonka.czprosek.czf

czfgmap

Subversion Repositories:
[/] [mapa_genxml.php] - Diff between revs 4 and 5

Show entire file Ignore whitespace

Rev 4 Rev 5
Line 1... Line 1...
<?php <?php
   
  error_reporting(7);
   
  header("Content-type: text/xml");
   
  echo '<nodes>';
   
  include("../forum/globalxml.php");
   
  echo '<auth username="'.$bbuserinfo['username'].'" ';
  echo 'userid="'.$bbuserinfo['userid'].'" ';
  echo 'mapperms="'.$bbuserinfo['mapperms'].'" />';
   
  //not logged in users gets no data
  if (!$bbuserinfo['userid']) {
  echo '</nodes>';
  die();
  }
   
$db=str_replace(" ","",@$db); $db=str_replace(" ","",@$db);
$latmin=str_replace(" ","",@$latmin); $latmin=str_replace(" ","",@$latmin);
$latmax=str_replace(" ","",@$latmax); $latmax=str_replace(" ","",@$latmax);
$lonmin=str_replace(" ","",@$lonmin); $lonmin=str_replace(" ","",@$lonmin);
Line 89... Line 107...
$result = mysql_query($query); $result = mysql_query($query);
if (!$result) { if (!$result) {
die('Invalid query: ' . mysql_error()); die('Invalid query: ' . mysql_error());
} }
   
header("Content-type: text/xml");  
   
// Start XML file, echo parent node // Start XML file, echo parent node
$allowed_args = ',f_name,l_name,subject,msg,'; $allowed_args = ',f_name,l_name,subject,msg,';
   
echo '<nodes>';  
   
if (@$_SERVER['HTTP_REFERER']!="http://mapa.prosek.czf/") { //if (@$_SERVER['HTTP_REFERER']!="http://connected.czf/mapa/") {
//foreach(array_keys($_SERVER) as $k) { //foreach(array_keys($_SERVER) as $k) {
//echo $k.".......".$_SERVER[$k]."<br>"; //echo $k.".......".$_SERVER[$k]."<br>";
//} //}
if (@$_ENV['HOSTNAME']!="ztop") { // if (@$_ENV['HOSTNAME']!="ztop") {
echo "fatal - response too slow"; // echo "fatal - response too slow";
die(); // die();
} // }
} //}
   
// Iterate through the rows, printing XML nodes for each // Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){ while ($row = @mysql_fetch_assoc($result)){
// ADD TO XML DOCUMENT NODE // ADD TO XML DOCUMENT NODE
echo '<node '; echo '<node ';

Powered by WebSVN 2.2.1