示例#1
0
文件: browser.php 项目: unisexx/adf16
 protected function xmlTree(array $tree)
 {
     $xml = '<dir readable="' . ($tree['readable'] ? "yes" : "no") . '" writable="' . ($tree['writable'] ? "yes" : "no") . '" removable="' . ($tree['removable'] ? "yes" : "no") . '" hasDirs="' . ($tree['hasDirs'] ? "yes" : "no") . '"' . (isset($tree['current']) ? ' current="yes"' : '') . '><name>' . text::xmlData($tree['name']) . '</name>';
     if (isset($tree['dirs']) && is_array($tree['dirs']) && count($tree['dirs'])) {
         $xml .= "<dirs>";
         foreach ($tree['dirs'] as $dir) {
             $xml .= $this->xmlTree($dir);
         }
         $xml .= "</dirs>";
     }
     $xml .= '</dir>';
     return $xml;
 }
示例#2
0
<root>
<?php 
foreach ($dirs as $dir) {
    ?>
    <dir readable="<?php 
    echo $dir['readable'] ? "yes" : "no";
    ?>
" writable="<?php 
    echo $dir['writable'] ? "yes" : "no";
    ?>
" removable="<?php 
    echo $dir['removable'] ? "yes" : "no";
    ?>
" hasDirs="<?php 
    echo $dir['hasDirs'] ? "yes" : "no";
    ?>
">
        <name><?php 
    echo text::xmlData($dir['name']);
    ?>
</name>
    </dir>
    <?php 
}
?>
</root>
示例#3
0
<root>
<?php 
if (is_array($message)) {
    ?>
    <?php 
    foreach ($message as $msg) {
        ?>
        <error><?php 
        echo text::xmlData($msg);
        ?>
</error>
        <?php 
    }
    ?>
    <?php 
} else {
    ?>
    <error><?php 
    echo text::xmlData($message);
    ?>
</error>
<?php 
}
?>
</root>
示例#4
0
文件: tpl_init.php 项目: Rotron/hero
    ?>
" readable="<?php 
    echo $file['readable'] ? "yes" : "no";
    ?>
" writable="<?php 
    echo $file['writable'] ? "yes" : "no";
    ?>
" bigIcon="<?php 
    echo $file['bigIcon'] ? "yes" : "no";
    ?>
" smallIcon="<?php 
    echo $file['smallIcon'] ? "yes" : "no";
    ?>
" thumb="<?php 
    echo $file['thumb'] ? "yes" : "no";
    ?>
" smallThumb="<?php 
    echo $file['smallThumb'] ? "yes" : "no";
    ?>
">
<name><?php 
    echo text::xmlData($file['name']);
    ?>
</name>
</file>
<?php 
}
?>
</files>
</root>
示例#5
0
<root>
<name><?php 
echo text::xmlData($name);
?>
</name>
</root>