Source for file AdminLogin.php
Documentation is available at AdminLogin.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | MCMS: a PHP Content Management System for creating accessible sites. |
// | Copyright (C) 2005 Silvio Moioli |
// | This program is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
// +----------------------------------------------------------------------+
// | Authors: Silvio Moioli <silvio at moioli dot net> www.moioli.net |
// +----------------------------------------------------------------------+
/** Importa la classe di base per l'interfaccia utente (autore) */
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/view/AdminPage.php";
/** Importa la libreria per semplificare l'aggiunta di tag XML */
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/view/Tagger.php";
/** Carica il gestore dei template (Smarty) */
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/include/smarty/libs/Smarty.class.php";
* La pagina con il form per con la richiesta della password.
* @author Silvio Moioli <silvio at moioli dot net>
/** @var Author l'autore che deve essere autenticato */
* @param Author $author l'autore che deve essere autenticato
* Ritorna il titolo (in XHTML) di questa pagina.
* @return string una stringa XHTML rappresentante il titolo della pagina
return "Password richiesta!";
* Ritorna un array di stringhe XHTML relative al menu (barra di navigazione)
* @return array vettore di stringhe XHTML rappresentante il menu della pagina
$menuEntries = array("Immetti la tua password oppure...");
$menuEntries [] = p(a("do.php?goTo=AdminIndex",
"Torna alla selezione degli autori"));
* Ritorna il contenuto (XHTML) del corpo di questa pagina.
* @return string la stringa XHTML rappresentante il corpo della pagina
$contents = p("Immetti la tua password nel campo qui sotto:");
//Ricopia le variabili GET e POST se presenti
foreach ($_GET as $key => $value) {
$action .= "$key=$value&";
foreach ($_POST as $key => $value) {
$formContents .= input("hidden", $key, $value);
$formContents .= input("password", "password", ""). br();
$contents .= form($action, "POST", $formContents);
* Questo metodo viene passato ad Auth per la visualizzazione della
$compiler->display($this);
* Compila la pagina e la visualizza all'utente.
//Assegno le variabili a Smarty
$smarty->assign('title',$this->getTitle());
//Elaboro la pagina vera e propria
$smarty->display("adminTemplate.tpl");
|