ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
hostnames.php
Go to the documentation of this file.
1 <?php
2 
3 require_once('../_include.php');
4 
5 // Load SimpleSAMLphp, configuration
8 
9 // Check if valid local session exists..
11 
12 $attributes = array();
13 
14 $attributes['HTTP_HOST'] = array($_SERVER['HTTP_HOST']);
15 $attributes['HTTPS'] = isset($_SERVER['HTTPS'])? array($_SERVER['HTTPS']) : array();
16 $attributes['SERVER_PROTOCOL'] = array($_SERVER['SERVER_PROTOCOL']);
17 $attributes['SERVER_PORT'] = array($_SERVER['SERVER_PORT']);
18 
19 $attributes['getBaseURL()'] = array(\SimpleSAML\Utils\HTTP::getBaseURL());
20 $attributes['getSelfHost()'] = array(\SimpleSAML\Utils\HTTP::getSelfHost());
21 $attributes['getSelfHostWithNonStandardPort()'] = array(\SimpleSAML\Utils\HTTP::getSelfHostWithNonStandardPort());
22 $attributes['selfURLhost()'] = array(\SimpleSAML\Utils\HTTP::getSelfURLHost());
23 $attributes['selfURLNoQuery()'] = array(\SimpleSAML\Utils\HTTP::getSelfURLNoQuery());
24 $attributes['getSelfHostWithPath()'] = array(\SimpleSAML\Utils\HTTP::getSelfHostWithPath());
25 $attributes['getFirstPathElement()'] = array(\SimpleSAML\Utils\HTTP::getFirstPathElement());
26 $attributes['selfURL()'] = array(\SimpleSAML\Utils\HTTP::getSelfURL());
27 
29 
30 $template->data['remaining'] = $session->getAuthData('admin', 'Expire') - time();
31 $template->data['attributes'] = $attributes;
32 $template->data['valid'] = 'na';
33 $template->data['logout'] = null;
34 
35 $template->show();
static requireAdmin()
Require admin access to the current page.
Definition: Auth.php:60
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
$attributes
Definition: hostnames.php:8
$config
Definition: hostnames.php:6
$session
Definition: hostnames.php:7
$template
Definition: hostnames.php:28
Attribute-related utility methods.
getBaseURL($t, $type='get', $key=null, $value=null)
Definition: showstats.php:145
static getSessionFromRequest()
Retrieves the current session.
Definition: Session.php:241
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.