<dirfile>
<filedirdb>
<id><?PHP $tdb = $response['filedirdb']; echo($tdb->getid()); ?></id>
</filedirdb>
<?PHP
if (isset($response['dirobj']))
{
for ($i = 0; $i<count($response['dirobj']); $i++)
{
$tq = $response['dirobj'][$i];
?>
<ufd>
<id><?PHP echo(xmlentities($tq->getid())); ?></id>
<linkid><?PHP echo(xmlentities($tq->getlinkid())); ?></linkid>
<type><?PHP echo(xmlentities($tq->gettype())); ?></type>
<pid><?PHP echo(xmlentities($tq->getpid())); ?></pid>
<status><?PHP echo(xmlentities($tq->getstatus())); ?></status>
<ownerid><?PHP echo(xmlentities($tq->getownerid())); ?></ownerid>
<ownertype><?PHP echo(xmlentities($tq->getownertype())); ?></ownertype>
<?PHP
if ($tq->gettype()==DIRECTORY)
{
$tt = $tq->getobj();
?>
<directory>
<id><?PHP echo(xmlentities($tt->getid())); ?></id>
<dirname><?PHP echo(xmlentities($tt->getdirname())); ?></dirname>
<fullpath><?PHP echo(xmlentities($tt->getfullpath())); ?></fullpath>
<temppass><?PHP echo(xmlentities($tt->gettemppass())); ?></temppass>
</directory>
<?PHP
}
elseif ($tq->gettype()==SFILE)
{
$tt = $tq->getobj();
?>
<file>
<id><?PHP echo(xmlentities($tt->getid())); ?></id>
<fullpath><?PHP echo(xmlentities($tt->getfullpath())); ?></fullpath>
<filename><?PHP echo(xmlentities($tt->getfilename())); ?></filename>
<filesize><?PHP echo(xmlentities($tt->getfilesize())); ?></filesize>
<contenttype><?PHP echo(xmlentities($tt->getcontenttype())); ?></contenttype>
<location><?PHP echo(xmlentities($tt->getlocation())); ?></location>
<status><?PHP echo(xmlentities($tt->getstatus())); ?></status>
<temppass><?PHP echo(xmlentities($tt->gettemppass())); ?></temppass>
</file>
<?PHP
}
?>
</ufd>
<?PHP
}
}
?>
</dirfile>