PHP Classes

File: web/SSO/modules/core/templates/logout-iframe-wrapper.php

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/modules/core/templates/logout-iframe-wrapper.php   Download  
File: web/SSO/modules/core/templates/logout-iframe-wrapper.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 873 bytes
 

Contents

Class file image Download
<?php

$id
= $this->data['id'];
$SPs = $this->data['SPs'];

$iframeURL = 'logout-iframe.php?type=embed&id=' . urlencode($id);

/* Pretty arbitrary height, but should have enough safety margins for most cases. */
$iframeHeight = 25 + count($SPs) * 4;

$this->data['header'] = $this->t('{logout:progress}');
$this->includeAtTemplateBase('includes/header.php');
echo
'<iframe style="width:100%; height:' . $iframeHeight . 'em; border:0;" src="' . htmlspecialchars($iframeURL) . '"></iframe>';

foreach (
$SPs AS $assocId => $sp) {
   
$spId = sha1($assocId);

    if (
$sp['core:Logout-IFrame:State'] !== 'inprogress') {
        continue;
    }
   
assert('isset($sp["core:Logout-IFrame:URL"])');

   
$url = $sp["core:Logout-IFrame:URL"];

    echo(
'<iframe style="width:0; height:0; border:0;" src="' . htmlspecialchars($url) . '"></iframe>');
}

$this->includeAtTemplateBase('includes/footer.php');