MCMS
[ class tree: MCMS ] [ index: MCMS ] [ all elements ]

Source for file AdminIndex.php

Documentation is available at AdminIndex.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | MCMS: a PHP Content Management System for creating accessible sites. |
  5. // | Copyright (C) 2005  Silvio Moioli                                    |
  6. // |                                                                      |
  7. // | This program is free software; you can redistribute it and/or modify |
  8. // | it under the terms of the GNU General Public License as published by |
  9. // | the Free Software Foundation; either version 2 of the License, or    |
  10. // | (at your option) any later version.                                  |
  11. // |                                                                      |
  12. // | This program is distributed in the hope that it will be useful,      |
  13. // | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
  14. // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
  15. // | GNU General Public License for more details.                         |
  16. // |                                                                      |
  17. // | You should have received a copy of the GNU General Public License    |
  18. // | along with this program; if not, write to the Free Software          |
  19. // | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 |
  20. // +----------------------------------------------------------------------+
  21. // | Authors: Silvio Moioli <silvio at moioli dot net> www.moioli.net     |
  22. // +----------------------------------------------------------------------+
  23. //
  24. //$Id:
  25.  
  26. /** Importa la classe di base per l"interfaccia utente (autore) */
  27. require_once $_SERVER["DOCUMENT_ROOT"]."/admin/lib/view/AdminPage.php";
  28. /** Importa la libreria per semplificare l"aggiunta di tag XML */
  29. require_once $_SERVER["DOCUMENT_ROOT"]."/admin/lib/view/Tagger.php";
  30.  
  31. /**
  32.  * Rappresenta la pagina indice, permette di fare il login o creare un nuovo autore.
  33.  * 
  34.  * @package  MCMS
  35.  * @version  2
  36.  * @author   Silvio Moioli <silvio at moioli dot net>
  37.  */
  38. class AdminIndex extends AdminPage
  39. {
  40.     /** @var Engine l'oggetto per la comunicazione al Database */
  41.     var $engine = null;
  42.     
  43.     /**
  44.      * Costruttore di default
  45.      *
  46.      * @see AdminPage
  47.      * @param Engine $engine l'oggetto per la comunicazione al Database
  48.      */
  49.     function AdminIndex($engine)
  50.     {
  51.         parent::AdminPage();
  52.         $this->engine = $engine;
  53.     }
  54.     
  55.     /**
  56.      * Ritorna il titolo (in XHTML) di questa pagina.
  57.      *
  58.      * @return string una stringa XHTML rappresentante il titolo della pagina
  59.      * @see Compilable
  60.      */
  61.     function getTitle()
  62.     {
  63.         return "Login al Progettista";
  64.     }
  65.     
  66.     /**
  67.      * Ritorna un array di stringhe XHTML relative al menu (barra di navigazione)
  68.      * di questa pagina.
  69.      *
  70.      * @return array vettore di stringhe XHTML rappresentante il menu della pagina
  71.      * @see Compilable
  72.      */
  73.     function getMenuEntries()
  74.     {
  75.         return array();
  76.     }
  77.     
  78.     /**
  79.      * Ritorna il contenuto (XHTML) del corpo di questa pagina.
  80.      *
  81.      * @return string la stringa XHTML rappresentante il corpo della pagina
  82.      * @see Compilable
  83.      */
  84.     function getContents()
  85.     {
  86.         $contents h1("Chi sei?");
  87.         $contents .= p("Per lavorare con il Progettista,
  88.          devi farti riconoscere! Ecco gli autori che il Progettista conosce:");
  89.         
  90.         $authors $this->engine->getAuthors();
  91.         $listElements "";
  92.         foreach ($authors as $i{
  93.             $listElements .= li(a("do.php?authorID=".$i->getID().
  94.                 "&amp;goTo=AdminMain",
  95.                 getAuthorSignature($i)));
  96.         }
  97.         $contents .= ul($listElements);
  98.         $contents .= h2(a("do.php?goTo=AdminAddAuthor","Non sono
  99.                     nella lista, sono nuovo!"));
  100.         return $contents;
  101.     }
  102. }
  103. ?>

Documentation generated on Wed, 26 Jul 2006 21:44:43 +0200 by phpDocumentor 1.3.0RC6