Source for file AdminListNews.php
Documentation is available at AdminListNews.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";
* Rappresenta la pagina di gestione delle notizie. Viene mostrato un elenco da
* cui è possibile scegliere di modificare, cancellare o aggiungere notizie al
* @author Silvio Moioli <silvio at moioli dot net>
/** @var Author l'autore che accede a questa pagina */
/** @var Site il sito di cui mostrare le notizie */
* @param Author $author l'autore che accede a questa pagina
* @param Site $site il sito di cui mostrare le notizie
* Ritorna il titolo (in XHTML) di questa pagina.
* @return string una stringa XHTML rappresentante il titolo della pagina
$title = a("do.php?goTo=AdminMain&authorID=$authorID",
a("do.php?goTo=AdminManageSite&authorID=$authorID".
* 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(p(a("do.php?goTo=AdminManageSite&".
"siteID=$siteID&authorID=$authorID","Torna alla gestione del sito").
br(). a("../index$siteID.html", "Vedi il tuo sito!")));
* Ritorna il contenuto (XHTML) del corpo di questa pagina.
* @return string la stringa XHTML rappresentante il corpo della pagina
$contents = h1("Le notizie del sito ". a("../index$siteID.html",
p("Da questa pagina puoi gestire le notizie del tuo sito, rimuovendole o
cambiandole a tuo piacere.". br().
"Il Progettista consiglia: usare molto le notizie è
di moda ultimamente, specialmente nei Blog.").
h2(a("do.php?authorID=$authorID&siteID=$siteID&goTo=AdminEditNews".
"&mode=new", "Aggiungi nuova notizia..."));
foreach ($newslist as $i) {
$author = $i->getAuthor();
$newsAuthorID = $author->getID();
$contents .= h2($i->getTitle(). ", ". $i->getDate());
a("do.php?goTo=AdminEditNews&authorID=$authorID&".
"siteID=$siteID&newsID=$newsID&mode=edit",
a("do.php?goTo=AdminDropNews&authorID=$authorID&".
"siteID=$siteID&newsID=$newsID","Cancella notizia")));
$contents .= p("Non puoi modificare questa notizia perchè ".
" non ne sei l"autore.");
|