Skip to content
Snippets Groups Projects
Select Git revision
  • 1c34bba01e3aa6b43ea72f2123cd95a14d0fd47c
  • master default protected
  • Legacy_Php7
3 results

foremanapi.class.php

Blame
  • index.php 2.98 KiB
    <?php
    /*
        ======================================================================
    
        AAI LOGIN WITH SHIBBOLETH HANDLING MULTIPLE ORGANIZATIONS
    
        ----------------------------------------------------------------------
    
        Institute for Medical Education; University of Bern
        License: GNU GPL 3.0
        Source: https://git-repo.iml.unibe.ch/iml-open-source/login-aai
        ----------------------------------------------------------------------
        2024-09-13    Initial version
        ======================================================================
    */
    
        require 'inc_functions.php';
    
        $aAbout = [
            'title' => 'AAI Login',
            'author' => 'Axel Hahn, Institute for Medical Education, University of Bern',
            'source' => 'https://git-repo.iml.unibe.ch/iml-open-source/login-aai',
            'license' => 'GNU GPL 3.0',
            'version' => '0.3',
        ];
    
    ?><!DOCTYPE html>
    <html lang="" dir="">
    
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title><?php echo $aConfig['title'] ?? 'AAI Login'; ?></title>
    
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" type="text/css" href="login_aai.css" media="screen" />
    
    </head>
    
    <body>
    
        <div id="head">
            <h1><?php echo $aConfig['title'] ?? 'AAI Login'; ?></h1>
        </div>
    
        <div class="content">
    
            <?php
    
                // --- set language for js script
                echo '<input type="hidden" id="lang" value="'.($aConfig['lang'] ?? 'en').'">';
                
                // --- messages
                echo $SELFURL ? '' : showMessage('error', 'SELFURL is not set. $_SERVER[\'SERVER_NAME\'] is not available.');
                echo $aConfig['text-info'] ? showMessage('info', $aConfig['text-info']) : ''; 
    
                // --- id "errorbox" is used for javascript error messages
                echo '<div id="errorbox" class="msg error hidden"></div>';
    
                // --- text block if the user is logged in already
                echo '<div id="shib-check-logged-in" class="hidden">
                <h2>'.$L->t('logged-in-already-title').'</h2>
                <p>
                    '.$L->t('logged-in-already-text').'<br>
                    <a href="/">'.$L->t('home').'</a>
                </p>
                </div>';
    
                echo '<div id="shib-select-idp">';