Add analytics
[bus.git] / busui / owa / modules / base / templates / resultSetXml.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php echo ("<?xml version='1.0' encoding='UTF-8'?>");?>
<resultSet>
        <timePeriod>
<?php foreach ($rs->timePeriod as $k => $v):?>
                <?php echo sprintf("<%s>%s</%s>\n", $k, $this->escapeForXml($v), $k);?>
<?php endforeach;?>
        </timePeriod>
 
        <aggregates>
<?php foreach ($rs->aggregates as $item):?>
                <?php echo sprintf("<%s name='%s' value='%s' label='%s'/>\n", $item['result_type'], $this->escapeForXml($item['name']), $this->escapeForXml($item['value']), $this->escapeForXml($item['label']));?>
<?php endforeach;?>
        </aggregates>
 
        <resultsTotal><?php echo $rs->resultsTotal;?></resultsTotal>
        
        <resultsReturned><?php echo $rs->resultsReturned;?></resultsReturned>
        
        <resultsPerPage><?php echo $rs->resultsPerPage;?></resultsPerPage>
        
        <resultsRows>
<?php foreach ($rs->resultsRows as $row):?>
                <row>
<?php foreach ($row as $item):?>
                        <?php echo sprintf("<%s name='%s' value='%s' label='%s'/>\n", $item['result_type'], $this->escapeForXml($item['name']), $this->escapeForXml($item['value']), $this->escapeForXml($item['label']));?>
<?php endforeach;?>
                </row>
<?php endforeach;?>
        </resultsRows>
 
</resultSet>