File: list.php

package info (click to toggle)
simplesamlphp 1.14.11-1%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 15,024 kB
  • sloc: php: 72,337; xml: 1,078; python: 376; sh: 220; perl: 185; makefile: 57
file content (33 lines) | stat: -rw-r--r-- 1,211 bytes parent folder | download
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
32
33
<?php
$this->includeAtTemplateBase('includes/header.php');
?>
    <h1><?php echo $this->t('{aggregator2:aggregator:header}'); ?></h1>

<?php
if (count($this->data['sources']) === 0) {
    echo "    <p>".$this->t('{aggregator2:aggregator:no_aggregators}')."</p>\n";
} else {
    echo "    <ul>";

    foreach ($this->data['sources'] as $id => $source) {
        $encId = urlencode($id);
        $params = array(
            'id' => $encId,
        );
        echo str_repeat(' ', 8)."<li>\n";
        echo str_repeat(' ', 12).'<a href="';
        echo SimpleSAML_Module::getModuleURL('aggregator2/get.php', $params).'">'.htmlspecialchars($id)."</a>\n";
        echo str_repeat(' ', 12).'<a href="';
        $params['mimetype'] = 'text/plain';
        echo SimpleSAML_Module::getModuleURL('aggregator2/get.php', $params).'">['.
            $this->t('{aggregator2:aggregator:text}')."]</a>\n";
        echo str_repeat(' ', 12).'<a href="';
        $params['mimetype'] = 'application/xml';
        echo SimpleSAML_Module::getModuleURL('aggregator2/get.php', $params)."\">[XML]</a>\n";
        echo str_repeat(' ', 8)."</li>\n";
    }

    echo "    </ul>\n";
}

$this->includeAtTemplateBase('includes/footer.php');