File: registry.list.php

package info (click to toggle)
simplesamlphp 1.19.7-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 42,920 kB
  • sloc: php: 202,044; javascript: 14,867; xml: 2,700; sh: 225; perl: 82; makefile: 70; python: 5
file content (46 lines) | stat: -rw-r--r-- 1,734 bytes parent folder | download | duplicates (3)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/'.
    $this->data['baseurlpath'].'module.php/oauth/assets/oauth.css" />'."\n";
$this->includeAtTemplateBase('includes/header.php');

echo '<h1>OAuth Client Registry</h1>';
echo '<p>Here you can register new OAuth Clients. You are successfully logged in as '.
    htmlspecialchars($this->data['userid']).'</p>';

echo '<h2>Your clients</h2>';
echo '<table class="metalist" style="width: 100%">';
$i = 0;
$rows = ['odd', 'even'];
foreach ($this->data['entries']['mine'] as $entryc) {
    $entry = $entryc['value'];
    $i++;
    echo '<tr class="'.$rows[$i % 2].'"><td>'.
        htmlspecialchars($entry['name']).'</td>	<td><code>'.htmlspecialchars($entry['key']).
        '</code></td><td><a href="registry.edit.php?editkey='.urlencode($entry['key']).
        '">edit</a>&nbsp;&nbsp;<a href="registry.php?delete='.urlencode($entry['key']).'">delete</a></td></tr>';
}
if ($i == 0) {
    echo'<tr><td colspan="3">No entries registered</td></tr>';
}
echo '</table>';

echo '<p><a href="registry.edit.php">Add new client</a></p>';

echo '<h2>Other clients</h2>';
echo '<table class="metalist" style="width: 100%">';
$i = 0;
$rows = ['odd', 'even'];
foreach ($this->data['entries']['others'] as $entryc) {
    $entry = $entryc['value'];
    $i++;
    echo '<tr class="'.$rows[$i % 2].'"><td>'.
        htmlspecialchars($entry['name']).'</td><td><code>'.htmlspecialchars($entry['key']).
        '</code></td><td>'.(isset($entry['owner']) ? htmlspecialchars($entry['owner']) : 'No owner').
        '</td></tr>';
}
if ($i == 0) {
    echo '<tr><td colspan="3">No entries registered</td></tr>';
}
echo '</table>';

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