3 $this->
data[
'header'] = $this->t(
'{core:frontpage:page_title}');
4 $this->includeAtTemplateBase(
'includes/header.php');
6 if ($this->
data[
'isadmin']) {
7 echo
'<p class="float-r youareadmin">'.$this->t(
'{core:frontpage:loggedin_as_admin}').
'</p>';
9 echo
'<p class="float-r youareadmin"><a href="'.$this->data[
'loginurl'].
'">'.
10 $this->t(
'{core:frontpage:login_as_admin}').
'</a></p>';
13 if (is_array($this->
data[
'metaentries'][
'hosted']) && count($this->
data[
'metaentries'][
'hosted']) > 0) {
15 foreach ($this->
data[
'metaentries'][
'hosted'] as $hm) {
16 echo
'<dt>'.$this->t($this->
data[
'mtype'][$hm[
'metadata-set']]).
'</dt>';
18 echo
'<p>Entity ID: '.$hm[
'entityid'];
19 if (isset($hm[
'deprecated']) && $hm[
'deprecated']) {
20 echo
'<br /><b>Deprecated</b>';
22 if ($hm[
'entityid'] !== $hm[
'metadata-index']) {
23 echo
'<br />Index: '.$hm[
'metadata-index'];
25 if (!empty($hm[
'name'])) {
26 echo
'<br /><strong>'.
27 $this->getTranslator()->getPreferredTranslation(
SimpleSAML\Utils\Arrays::arrayize($hm[
'name'],
'en')).
30 if (!empty($hm[
'descr'])) {
31 echo
'<br /><strong>'.
32 $this->getTranslator()->getPreferredTranslation(
SimpleSAML\Utils\Arrays::arrayize($hm[
'descr'],
'en')).
36 echo
'<br />[ <a href="'.$hm[
'metadata-url'].
'">'.$this->t(
'{core:frontpage:show_metadata}').
'</a> ]';
43 if (is_array($this->
data[
'metaentries'][
'remote']) && count($this->
data[
'metaentries'][
'remote']) > 0) {
45 foreach ($this->
data[
'metaentries'][
'remote'] as $setkey => $set) {
47 echo
'<fieldset class="fancyfieldset"><legend>'.$this->t($this->
data[
'mtype'][$setkey]).
' (Trusted)</legend>';
49 foreach ($set as $entry) {
54 'core/show_metadata.php',
55 array(
'entityid' => $entry[
'entityid'],
'set' => $setkey)
58 if (!empty($entry[
'name'])) {
59 echo htmlspecialchars($this->getTranslator()->getPreferredTranslation(
60 SimpleSAML\Utils\Arrays::arrayize($entry[
'name'],
'en')
62 } elseif (!empty($entry[
'OrganizationDisplayName'])) {
63 echo htmlspecialchars($this->getTranslator()->getPreferredTranslation(
64 SimpleSAML\Utils\Arrays::arrayize($entry[
'OrganizationDisplayName'],
'en')
67 echo htmlspecialchars($entry[
'entityid']);
70 if (array_key_exists(
'expire', $entry)) {
71 if ($entry[
'expire'] < $now) {
72 echo
'<span style="color: #500; font-weight: bold"> (expired '.
73 number_format(($now - $entry[
'expire']) / 3600, 1).
' hours ago)</span>';
75 echo
' (expires in '.number_format(($entry[
'expire'] - $now) / 3600, 1).
' hours)';
85 <h2><?php echo $this->t(
'{core:frontpage:tools}'); ?></h2>
87 foreach ($this->
data[
'links_federation'] as $link) {
88 echo
'<li><a href="'.htmlspecialchars($link[
'href']).
'">'.$this->t($link[
'text']).
'</a></li>';
93 if ($this->
data[
'isadmin']) { ?>
94 <fieldset
class=
"fancyfieldset">
95 <legend>Lookup metadata</legend>
96 <form action=
"<?php echo SimpleSAML\Module::getModuleURL('core/show_metadata.php'); ?>" method=
"get">
97 <p
style=
"margin: 1em 2em ">Look
up metadata
for entity:
98 <select name=
"set"><?php
99 if (is_array($this->
data[
'metaentries'][
'remote']) && count($this->
data[
'metaentries'][
'remote']) > 0) {
100 foreach ($this->
data[
'metaentries'][
'remote'] as $setkey => $set) {
101 echo
'<option value="'.htmlspecialchars($setkey).
'">'.$this->t($this->
data[
'mtype'][$setkey]).
'</option>';
106 <input type=
"text" name=
"entityid" />
107 <button
class=
"btn" type=
"submit">Lookup </button>
113 $this->includeAtTemplateBase(
'includes/footer.php');
Attribute-related utility methods.
Create styles array
The data for the language used.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.