<?php 
if ($this->data['isadmin']) {
    ?>

<fieldset class="fancyfieldset"><legend>Lookup metadata</legend>
	<form action="<?php 
    echo SimpleSAML_Module::getModuleURL('core/show_metadata.php');
    ?>
" method="get" >
		<p style="margin: 1em 2em ">Look up metadata for entity:
			<select name="set">
				
				<?php 
    if (is_array($this->data['metaentries']['remote']) && count($this->data['metaentries']['remote']) > 0) {
        foreach ($this->data['metaentries']['remote'] as $setkey => $set) {
            echo '<option value="' . htmlspecialchars($setkey) . '">' . $this->t(mtype($setkey)) . '</option>';
        }
    }
    ?>
				
				
			</select>
			<input type="text" name="entityid">
			<input type="submit" value="Lookup">
		</p>
	</form>
</fieldset>

<?php 
}
?>
Beispiel #2
0
            echo '<br />Index: ' . $hm['metadata-index'];
        }
        if (array_key_exists('name', $hm)) {
            echo '<br /><strong>' . $this->getTranslation(SimpleSAML_Utilities::arrayize($hm['name'], 'en')) . '</strong>';
        }
        if (array_key_exists('descr', $hm)) {
            echo '<br /><strong>' . $this->getTranslation(SimpleSAML_Utilities::arrayize($hm['descr'], 'en')) . '</strong>';
        }
        echo '<br  />[ <a href="' . $hm['metadata-url'] . '">' . $this->t('show_metadata') . '</a> ]';
        echo '</dd>';
    }
}
echo '</dl>';
if (is_array($this->data['metaentries']['remote']) && count($this->data['metaentries']['remote']) > 0) {
    foreach ($this->data['metaentries']['remote'] as $setkey => $set) {
        echo '<fieldset class="fancyfieldset"><legend>' . $this->t(mtype($setkey)) . ' (Trusted)</legend>';
        echo '<ul>';
        foreach ($set as $entry) {
            echo '<li>';
            if (array_key_exists('name', $entry)) {
                echo $this->getTranslation(SimpleSAML_Utilities::arrayize($entry['name'], 'en'));
            } else {
                echo $entry['entityid'];
            }
            if (array_key_exists('expire', $entry)) {
                if ($entry['expire'] < $now) {
                    echo '<span style="color: #500; font-weight: bold"> (expired ' . number_format(($now - $entry['expire']) / 3600, 1) . ' hours ago)</span>';
                } else {
                    echo ' (expires in ' . number_format(($entry['expire'] - $now) / 3600, 1) . ' hours)';
                }
            }