Skip to content
Snippets Groups Projects
Commit ad0bf099 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Tidy up frontpage code. Indenting etc.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1156 44740490-163a-0410-bde0-09ae8108e29a
parent 6b745354
No related branches found
No related tags found
No related merge requests found
......@@ -4,103 +4,104 @@
?>
<div class="enablebox mini">
<table>
<?php
$icon_enabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/accept.png" alt="enabled" />';
$icon_disabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/delete.png" alt="disabled" />';
?>
<tr class="<?php echo $this->data['enablematrix']['saml20-sp'] ? 'enabled' : 'disabled'; ?>"><td>SAML 2.0 SP</td>
<td><?php echo $this->data['enablematrix']['saml20-sp'] ? $icon_enabled : $icon_disabled; ?></td></tr>
<table>
<tr class="<?php echo $this->data['enablematrix']['saml20-idp'] ? 'enabled' : 'disabled'; ?>"><td>SAML 2.0 IdP</td>
<td><?php echo $this->data['enablematrix']['saml20-idp'] ? $icon_enabled : $icon_disabled; ?></td></tr>
<?php
$icon_enabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/accept.png" alt="enabled" />';
$icon_disabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/delete.png" alt="disabled" />';
?>
<tr class="<?php echo $this->data['enablematrix']['shib13-sp'] ? 'enabled' : 'disabled'; ?>"><td>Shib 1.3 SP</td>
<td><?php echo $this->data['enablematrix']['shib13-sp'] ? $icon_enabled : $icon_disabled; ?></td></tr>
<tr class="<?php echo $this->data['enablematrix']['saml20-sp'] ? 'enabled' : 'disabled'; ?>"><td>SAML 2.0 SP</td>
<td><?php echo $this->data['enablematrix']['saml20-sp'] ? $icon_enabled : $icon_disabled; ?></td></tr>
<tr class="<?php echo $this->data['enablematrix']['saml20-idp'] ? 'enabled' : 'disabled'; ?>"><td>SAML 2.0 IdP</td>
<td><?php echo $this->data['enablematrix']['saml20-idp'] ? $icon_enabled : $icon_disabled; ?></td></tr>
<tr class="<?php echo $this->data['enablematrix']['shib13-sp'] ? 'enabled' : 'disabled'; ?>"><td>Shib 1.3 SP</td>
<td><?php echo $this->data['enablematrix']['shib13-sp'] ? $icon_enabled : $icon_disabled; ?></td></tr>
<tr class="<?php echo $this->data['enablematrix']['shib13-idp'] ? 'enabled' : 'disabled'; ?>"><td>Shib 1.3 IdP</td>
<td><?php echo $this->data['enablematrix']['shib13-idp'] ? $icon_enabled : $icon_disabled; ?></td></tr>
</table>
</div>
<p><?php echo $this->t('intro'); ?></p>
<div>
<code style="background: white; border: 1px solid #ccc; padding: 1em; color: #555" ><?php
echo $this->data['directory'] . ' (' . $this->data['version'] . ')';
?></code>
</div>
<h2><?php echo $this->t('useful_links_header'); ?></h2>
<ul>
<?php
<tr class="<?php echo $this->data['enablematrix']['shib13-idp'] ? 'enabled' : 'disabled'; ?>"><td>Shib 1.3 IdP</td>
<td><?php echo $this->data['enablematrix']['shib13-idp'] ? $icon_enabled : $icon_disabled; ?></td></tr>
foreach ($this->data['links'] AS $link) {
echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a></li>';
}
?>
</ul>
<h2><?php echo $this->t('metadata_header'); ?></h2>
<ul>
<?php
</table>
</div>
foreach ($this->data['links_meta'] AS $link) {
echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a></li>';
}
?>
</ul>
<h2><?php echo $this->t('doc_header'); ?></h2>
<ul>
<?php
foreach ($this->data['links_doc'] AS $link) {
echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a></li>';
}
?>
</ul>
<p><?php echo $this->t('intro'); ?></p>
<div>
<code style="background: white; border: 1px solid #ccc; padding: 1em; color: #555" ><?php
echo $this->data['directory'] . ' (' . $this->data['version'] . ')';
?></code>
</div>
<h2><?php echo $this->t('useful_links_header'); ?></h2>
<ul>
<?php
foreach ($this->data['links'] AS $link) {
echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a></li>';
}
?>
</ul>
<?php
if (array_key_exists('warnings', $this->data) && is_array($this->data['warnings']) && !empty($this->data['warnings'])) {
<h2><?php echo $this->t('metadata_header'); ?></h2>
<ul>
<?php
foreach ($this->data['links_meta'] AS $link) {
echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a></li>';
}
?>
</ul>
<h2><?php echo $this->t('doc_header'); ?></h2>
<ul>
<?php
foreach ($this->data['links_doc'] AS $link) {
echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a></li>';
}
?>
</ul>
<?php
if (array_key_exists('warnings', $this->data) && is_array($this->data['warnings']) && !empty($this->data['warnings'])) {
echo '<h2>' . $this->t('warnings') . '</h2>';
echo '<h2>' . $this->t('warnings') . '</h2>';
foreach($this->data['warnings'] AS $warning) {
echo '<div class="caution">' . $this->t($warning) . '</div>';
}
}
?>
<h2><?php echo $this->t('checkphp'); ?></h2>
<div class="enablebox">
<table>
<?php
$icon_enabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/accept.png" alt="enabled" />';
$icon_disabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/delete.png" alt="disabled" />';
foreach ($this->data['funcmatrix'] AS $func) {
echo '<tr class="' . ($func['enabled'] ? 'enabled' : 'disabled') . '"><td>' . ($func['enabled'] ? $icon_enabled : $icon_disabled) . '</td>
<td>' . $this->t($func['required']) . '</td><td>' . $func['descr'] . '</td></tr>';
foreach($this->data['warnings'] AS $warning) {
echo '<div class="caution">' . $this->t($warning) . '</div>';
}
?>
}
?>
<h2><?php echo $this->t('checkphp'); ?></h2>
<div class="enablebox">
<table>
<?php
$icon_enabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/accept.png" alt="enabled" />';
$icon_disabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/delete.png" alt="disabled" />';
foreach ($this->data['funcmatrix'] AS $func) {
echo '<tr class="' . ($func['enabled'] ? 'enabled' : 'disabled') . '"><td>' . ($func['enabled'] ? $icon_enabled : $icon_disabled) . '</td>
<td>' . $this->t($func['required']) . '</td><td>' . $func['descr'] . '</td></tr>';
}
?>
</table>
</div>
</table>
</div>
<h2><?php echo $this->t('about_header'); ?></h2>
<p><?php echo $this->t('about_text'); ?></p>
<h2><?php echo $this->t('about_header'); ?></h2>
<p><?php echo $this->t('about_text'); ?></p>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?>
\ No newline at end of file
......@@ -33,26 +33,29 @@ if ($config->getValue('enable.saml20-sp') === true)
if ($config->getValue('enable.shib13-sp') === true)
$links[] = array(
'href' => 'example-simple/shib13-example.php',
'text' => 'link_shib13example');
'text' => 'link_shib13example'
);
$links[] = array(
'href' => 'example-simple/hostnames.php?dummy=1',
'text' => 'link_diagnostics');
'text' => 'link_diagnostics'
);
$links[] = array(
'href' => 'admin/phpinfo.php',
'text' => 'link_phpinfo');
'text' => 'link_phpinfo'
);
$links[] = array(
'href' => 'admin/config.php',
'text' => 'link_configcheck',
);
);
if($config->getBoolean('idpdisco.enableremember', FALSE)) {
$links[] = array(
'href' => 'cleardiscochoices.php',
'text' => 'link_cleardiscochoices',
);
);
}
......@@ -63,18 +66,16 @@ if ($publishURL !== NULL) {
'saml20-sp' => 'saml2/sp/metadata.php',
'shib13-idp' => 'shib13/idp/metadata.php',
'shib13-sp' => 'shib13/sp/metadata.php',
);
);
foreach($metadataSources as $name => $url) {
if(!$config->getBoolean('enable.' . $name, FALSE)) {
continue;
}
if(!$config->getBoolean('enable.' . $name, FALSE)) continue;
$url = SimpleSAML_Utilities::resolveURL($url);
$linkTarget = SimpleSAML_Utilities::addURLparameter($publishURL, array('url' => $url));
$links[] = array(
'href' => $linkTarget,
'text' => 'link_publish_' . $name,
);
);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment