Source for file search.php
Documentation is available at search.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 |
// +----------------------------------------------------------------------+
* Classe per la creazione della mappa di un sito gestito da MCMS.
* @author Silvio Moioli <silvio at moioli dot net>
/** Carica la classe base di MCMS per l'interfacciamento al Database */
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/model/Engine.php";
* Classe per la creazione della mappa di un sito gestito da MCMS.
* Il componente è composto da questo file e dal file viewMap.php
* nella cartella principale del progetto.
* @author Silvio Moioli <silvio at moioli dot net>
* Scritto solo per la concatenazione dei costruttori.
* Ritorna il nome di questo componente.
* @return string il nome del componente
return "Ricerca con Google";
* Questo componente non ha bisogno di inizializzazione,
* perciò questo metodo è vuoto.
* @param Engine $engine il motore di MCMS
* Aggiunge la voce di menu per la mappa del sito (a tutte le
* @param string $contents i contenuti della pagina da modificare
* @param array $menuEntries il menu della pagina
* @param string $title il titolo della pagina da modificare
* @param Site $site il sito corrente
$siteName = $site->getShortURL();
<form method="get" action="http://www.google.it/search">
<label for="q">Cerca in questo sito:</label>
<input type="text" id="q" name="q" size="10" value="sms"/>
<input type="hidden" id="domains" name="domains" value="'. $siteName. '"/>
<input type="hidden" id="sitesearch" name="sitesearch" value="'. $siteName. '"/>
<input type="hidden" id="sourceid" name="sourceid" value="google-search"/>
<input type="submit" id="submit" name="Cerca" value="Cerca"/>
* Questo componente non ha file esterni da salvare
/*abstract*/ function saveFiles($site, $compiler){
|