Source for file AdminMain.php
Documentation is available at AdminMain.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";
* La pagina iniziale di lavoro con MCMS. Permette di cambiare i dati
* dell'autore, cancellarlo o accedere alle pagine di modifica dei
* @author Silvio Moioli <silvio at moioli dot net>
/** @var Author l'autore che accede a questa pagina */
* @param Author l'autore che accede a questa pagina
* Ritorna il titolo (in XHTML) di questa pagina.
* @return string una stringa XHTML rappresentante il titolo della pagina
* Ritorna un array di stringhe XHTML relative al menu (barra di navigazione)
* @return array vettore di stringhe XHTML rappresentante il menu della pagina
return array(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 = h1("Ciao, $authorName! Benvenuto nel Progettista!");
$contents .= p("Benvenuto in Moio's CMS! Questa è
la pagina principale del Progettista, la parte di MCMS che ti aiuta
a gestire i contenuti sul tuo sito.". br().
"Quando hai finito, torna alla tua homepage tramite il menu, tutte le
modifiche al tuo sito saranno apportate automaticamente!". br());
$contents .= p("Voglio che il Progettista ".
a("do.php?authorID=$authorID&goTo=AdminEditAuthor",
$contents .= p("Voglio essere ". a("do.php?authorID=$authorID&".
"goTo=AdminDropAuthor","cancellato dal Progettista"));
$contents .= h2(a("do.php?authorID=$authorID&goTo=AdminAddSite",
$contents .= h2("I siti mantenuti dal Progettista:");
$sites = $engine->getSites();
$homepage = $i->getHomepage();
$homepageAuthor = $homepage->getAuthor();
$homepageAuthorID = $homepageAuthor->getID();
$listElement = $i->getShortURL(). " ". a("do.php?siteID=$siteID&".
"authorID=$authorID&goTo=AdminManageSite","modifica");
$listElement .= " oppure ". a("do.php?siteID=$siteID&".
"authorID=$authorID&goTo=AdminDropSite","cancella").
" (sei il ". b("fondatore"). " di questo sito!)";
$listElements []= $listElement;
|