Source for file Event.php
Documentation is available at Event.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 |
// +----------------------------------------------------------------------+
/** Carica la classe base di MCMS per l'interfacciamento al Database */
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/model/Engine.php";
* Un Event modella una possibile richiesta dell'utente con tutti i parametri
* ad essa associati (POST e GET).
/** @var Engine l'oggetto per la comunicazione al Database */
/** @var array i parametri di questo evento */
* @param array $post i parametri POST della richiesta
* @param array $get i parametri GET della richiesta
/*abstract*/ function Event($engine, $post, $get)
foreach ($httpParams as $key => $value) {
* Ritorna un parametro generico (se esiste).
* @return string il parametro o null
* Ritorna tutti i parametri.
* @return array i parametri
* Se tra i parametri c'è un ID di autore, ritorna l'oggetto
* @return l'oggetto Author o null
* Se tra i parametri c'è un ID di articolo, ritorna l'oggetto
* @return l'oggetto Article o null
* Se tra i parametri c'è un ID di notizia, ritorna l'oggetto
* @return l'oggetto News o null
* Se tra i parametri c'è un ID di sito, ritorna l'oggetto
* @return l'oggetto Site o null
* Se tra i parametri c'è un ID di sezione, ritorna l'oggetto
* @return l'oggetto Category o null
* Se tra i parametri ci sono più ID di articolo, ritorna
* gli oggetti corrispondenti.
* @return un array di Article
* Se tra i parametri ci sono più ID di componente, ritorna
* gli oggetti corrispondenti.
* @return un array di Components
$componentNames = array();
foreach($components as $i){
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/plugins/$componentName.php";
$this->parameters["component$componentName"] == "on") {
* Formatta (applica il quoting) a stringhe potenzialmente non sicure
* che devono essere trattate come testo semplice.
* @param string $string la stringa da preparare
* @return la stringa formattata
* Formatta (applica il quoting) a stringhe potenzialmente non sicure
* che devono essere trattate come XML.
* @param string $string la stringa da preparare
* @return la stringa formattata
//Rimuovi il codice JavaScript
$result = preg_replace("@<script[^>]*?>.*?</script>@si", "", $result);
|