<?php
/*
Consolidated Member Directory:
Outputs the member roster
in XML format.
*/
include '../inc/db.inc';
include '../inc/error.inc';
include '../inc/site_globals.inc';
include '../inc/html_entity_decode.php';
header('Content-Type: text/xml');
print '<?xml version="1.0" encoding="iso-8859-1"?'.'>' . "\n";
print "<members>\n";
// log in to the database
if (!($db = @ mysql_connect($hostName, $userName, $passWord)))
showError();
if (!( @ mysql_select_db($databaseName,$db)))
showError();
$sql = "SELECT * FROM $members ORDER BY Biz ASC";
if(!$result = mysql_query($sql, $db))
showError();
while($myrow = mysql_fetch_array($result, MYSQL_ASSOC))
{
print " <member>\n";
foreach($myrow as $tag => $data)
{
print " <$tag>" . htmlspecialchars(html_entity_decode($data)) . "</$tag>\n";
}
print " </member>\n";
}
print "</members>\n";
?>