Skip to content
Snippets Groups Projects
Commit 2126244d authored by Olav Morken's avatar Olav Morken
Browse files

Added template-based logout page.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@758 44740490-163a-0410-bde0-09ae8108e29a
parent 4e7faa73
No related branches found
No related tags found
No related merge requests found
<?php
$lang = array(
'title' => array (
'en' => 'Logged out',
),
'logged_out_text' => array (
'en' => 'You have been logged out. Thank you for using this service.',
),
'default_link_text' => array (
'en' => 'Go back to simpleSAMLphp installation page',
),
);
?>
\ No newline at end of file
<?php
$this->data['header'] = $this->t('{logout:title}');
$this->includeAtTemplateBase('includes/header.php');
echo('<div id="content">');
echo('<h2>' . $this->data['header'] . '</h2>');
echo('<p>' . $this->t('{logout:logged_out_text}') . '</p>');
if($this->getTag($this->data['text']) !== NULL) {
$this->data['text'] = $this->t($this->data['text']);
}
echo('<p>[ <a href="' . htmlspecialchars($this->data['link']) . '">' .
htmlspecialchars($this->data['text']) . '</a> ]</p>');
$this->includeAtTemplateBase('includes/footer.php');
?>
\ No newline at end of file
<?php
require_once('_include.php');
$config = SimpleSAML_Configuration::getInstance();
if(array_key_exists('link_href', $_REQUEST)) {
$link = $_REQUEST['link_href'];
} else {
$link = 'index.php';
}
if(array_key_exists('link_text', $_REQUEST)) {
$text = $_REQUEST['link_text'];
} else {
$text = '{logout:default_link_text}';
}
$t = new SimpleSAML_XHTML_Template($config, 'logout.php');
$t->data['link'] = $link;
$t->data['text'] = $text;
$t->show();
exit();
?>
\ No newline at end of file
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