This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
accm-website/pages/FooterPage.inc.php
2010-08-14 22:32:09 +02:00

56 lines
1.5 KiB
PHP

<?php
include_once './pages/PageInterface.inc.php';
include_once './includes/database/MySQLDatabase.inc.php';
/**
* This page represents the content of the footer line.
*
* @author Thomas Schwery <thomas.schwery@epfl.ch>
*/
class FooterPage implements PageInterface {
private $title;
private $content;
public function __construct() {
$this->title = "";
$loginLabel = Localization::userLoginLink;
$this->content = "<a href='./?page=Login'>$loginLabel</a>";
$this->content.= " - Website by Thomas Schwery - ";
if (array_key_exists("language", $_SESSION)) {
$language = $_SESSION['language'];
}
/*
* TODO: Correct the English Localization ...
if ($language == "French") {
$this->content.= "<a href='./?page=Index&amp;language=English>Switch to English</a>";
} else {
$this->content.= "<a href='./?page=Index&amp;language=French>Passer en Français</a>";
}
*/
}
public function getContent() {
if (key_exists('loggedin', $_SESSION) && $_SESSION['loggedin'] == true) {
$time = (microtime(true) - $_SESSION['startTime']);
$this->content .= " - " . MySQLDatabase::getInstance()->getCount() . " requêtes";
$this->content .= " - " . $time . " ms.";
}
return $this->content;
}
public function getTitle() {
return $this->title;
}
public static function getStaticTitle() {
return "";
}
}
?>