Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 845 → Rev 846

/trunk/papyrus/applettes/moteur_recherche/moteur_recherche.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: moteur_recherche.php,v 1.9 2006-04-28 12:41:49 florian Exp $
// CVS : $Id: moteur_recherche.php,v 1.10 2006-05-19 10:04:55 jp_milcent Exp $
/**
* Applette : moteur de recherche
*
38,7 → 38,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.9 $ $Date: 2006-04-28 12:41:49 $
*@version $Revision: 1.10 $ $Date: 2006-05-19 10:04:55 $
// +------------------------------------------------------------------------------------------------------+
*/
 
53,6 → 53,8
//Utilisation de la bibliothèque PEAR NET_URL inclue par Papyrus
/** Inclusion du fichier de configuration de cette application.*/
require_once GEN_CHEMIN_APPLETTE.'moteur_recherche/configuration/more_configuration.inc.php';
/** Inclusion du fichier de configuration des Spip.*/
require_once GEN_CHEMIN_APPLETTE.'moteur_recherche/configuration/more_config_spip.inc.php';
/** Inclusion de la bibliothèque PEAR de conception de formulaire.*/
require_once MORE_CHEMIN_BIBLIOTHEQUE_PEAR.'HTML/QuickForm.php';
/** Inclusion de la bibliothèque PEAR de modification des squelettes des formulaires QuickForm.*/
73,13 → 75,11
 
if (isset($_POST['more_motif']) && $_POST['more_motif'] != '') {
// Initialisation de variable extérieures
$GLOBALS['_VEI_']['usurpation'] = MORE_LG_USURPATION.$_POST['more_motif'];
$GLOBALS['_VEI_']['usurpation'] = MORE_LG_USURPATION.htmlentities(stripslashes($_POST['more_motif']));
$GLOBALS['_GEN_commun']['info_menu'] = null;
$GLOBALS['_PAPYRUS_']['general']['application_chemin'] = null;
// Titre de la page
$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = MORE_LG_TITRE.$_POST['more_motif'];
// Modification des meta de l'entête de la page
GEN_modifierMetaHttpEquiv('Content-Type', 'text/html; charset=iso-8859-15');
GEN_modifierMetaHttpEquiv('Content-Type', 'text/html; charset=ISO-8859-15');
GEN_modifierMetaHttpEquiv('Content-style-type', 'text/css');
GEN_modifierMetaHttpEquiv('Content-script-type', 'text/javascript');
GEN_modifierMetaHttpEquiv('Content-language', $GLOBALS['_GEN_commun']['i18n']);
122,6 → 122,8
$indent_pas = 4;// Pas d'indentation en nombre d'espace
$retour = '';
$retour_resultats = '';
// Titre de la page
$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = MORE_LG_TITRE.htmlentities(stripslashes($_POST['more_motif']));
// --------------------------------------------------------------------------------------------------------
// Lancement de la recherche si nécessaire
133,15 → 135,24
$_SESSION['_MOTEUR_RECHERCHE_']['rechercher']['more_motif'] = $_POST['more_motif'];
/** Inclusion de la classe Recherche.*/
require_once MORE_CHEMIN_BIBLIO.'more_recherche.class.php';
/** Inclusion de la classe Recherche_Menu_Meta.*/
/** Inclusion de la classe Recherche_Papyrus_Menu.*/
require_once MORE_CHEMIN_BIBLIO.'more_recherche_papyrus_menu.class.php';
/** Inclusion de la classe Recherche_Spip_Article.*/
require_once MORE_CHEMIN_BIBLIO.'more_recherche_spip_article.class.php';
$moteur = new Recherche($_SESSION['_MOTEUR_RECHERCHE_']['rechercher']['more_motif']);
$recherche_papyrus_menu = new Recherche_Papyrus_Menu($_SESSION['_MOTEUR_RECHERCHE_']['rechercher']['more_motif']);
$recherche_spip_article = new Recherche_Spip_Article($_SESSION['_MOTEUR_RECHERCHE_']['rechercher']['more_motif']);
$moteur->ajouterRecherche($recherche_papyrus_menu);
$moteur->ajouterRecherche($recherche_spip_article);
$aso_resultats = $moteur->rechercherMotif();
//$GLOBALS['_DEBOGAGE_'] = '<pre>'.print_r($aso_resultats, true).'</pre>';
$retour_resultats .= '<h1>'.MORE_LG_RESULTAT_TITRE.'</h1>'."\n";
if (count($aso_resultats) == 0) {
$nbre_pages = count($aso_resultats);
if ($nbre_pages <= 1) {
$retour_resultats .= '<h1>'.sprintf(MORE_LG_RESULTAT_TITRE, $nbre_pages).'</h1>'."\n";
} else {
$retour_resultats .= '<h1>'.sprintf(MORE_LG_RESULTAT_TITRE_PLURIEL, $nbre_pages).'</h1>'."\n";
}
if ($nbre_pages == 0) {
$retour_resultats .= '<p class="information">'.MORE_LG_RESULTAT_VIDE.'</p>'."\n";
} else {
$retour_resultats .= '<ul id="more_resultat">'."\n";
209,7 → 220,7
$id = 'more_motif';
$aso_attributs = array( 'id'=>$id, 'tabindex' => $tab_index++, 'maxlength' => MORE_FORM_MOTIF_MAXLENGTH,
'accesskey' => MORE_LG_FORM_ACCESSKEY, 'onclick' => "javascript: this.value='';");
'accesskey' => MORE_LG_FORM_ACCESSKEY);
$label = '<label for="'.$id.'">'.MORE_LG_FORM_MOTIF.'</label>';
$more_form->addElement('text', $id, $label, $aso_attributs);
238,6 → 249,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.9 2006/04/28 12:41:49 florian
* corrections erreurs chemin
*
* Revision 1.8 2006/03/02 10:49:49 ddelon
* Fusion branche multilinguisme dans branche principale
*