Line 19... |
Line 19... |
19 |
// | |
|
19 |
// | |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
24 |
// CVS : $Id: moteur_recherche.php,v 1.5 2005-05-19 12:46:12 jpm Exp $
|
24 |
// CVS : $Id: moteur_recherche.php,v 1.6 2005-05-25 13:49:22 jpm Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* Applette : moteur de recherche
|
26 |
* Applette : moteur de recherche
|
27 |
*
|
27 |
*
|
28 |
* Génère un formulaire contenant une zone de saisie permettant de taper un texte à rechercher sur l'ensemble
|
28 |
* Génère un formulaire contenant une zone de saisie permettant de taper un texte à rechercher sur l'ensemble
|
29 |
* des sites gérés par Papyrus.
|
29 |
* des sites gérés par Papyrus.
|
Line 36... |
Line 36... |
36 |
//Auteur original :
|
36 |
//Auteur original :
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
38 |
//Autres auteurs :
|
38 |
//Autres auteurs :
|
39 |
*@author Aucun
|
39 |
*@author Aucun
|
40 |
*@copyright Tela-Botanica 2000-2004
|
40 |
*@copyright Tela-Botanica 2000-2004
|
41 |
*@version $Revision: 1.5 $ $Date: 2005-05-19 12:46:12 $
|
41 |
*@version $Revision: 1.6 $ $Date: 2005-05-25 13:49:22 $
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
43 |
*/
|
43 |
*/
|
Line 44... |
Line 44... |
44 |
|
44 |
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
Line 142... |
Line 142... |
142 |
$recherche_papyrus_menu = new Recherche_Papyrus_Menu($_SESSION['_MOTEUR_RECHERCHE_']['rechercher']['more_motif']);
|
142 |
$recherche_papyrus_menu = new Recherche_Papyrus_Menu($_SESSION['_MOTEUR_RECHERCHE_']['rechercher']['more_motif']);
|
143 |
$moteur->ajouterRecherche($recherche_papyrus_menu);
|
143 |
$moteur->ajouterRecherche($recherche_papyrus_menu);
|
144 |
$aso_resultats = $moteur->rechercherMotif();
|
144 |
$aso_resultats = $moteur->rechercherMotif();
|
145 |
//$GLOBALS['_DEBOGAGE_'] = '<pre>'.print_r($aso_resultats, true).'</pre>';
|
145 |
//$GLOBALS['_DEBOGAGE_'] = '<pre>'.print_r($aso_resultats, true).'</pre>';
|
146 |
$retour_resultats .= '<h1>'.MORE_LG_RESULTAT_TITRE.'</h1>'."\n";
|
146 |
$retour_resultats .= '<h1>'.MORE_LG_RESULTAT_TITRE.'</h1>'."\n";
|
- |
|
147 |
if (count($aso_resultats) == 0) {
|
- |
|
148 |
$retour_resultats .= '<p class="information">'.MORE_LG_RESULTAT_VIDE.'</p>'."\n";
|
- |
|
149 |
} else {
|
147 |
$retour_resultats .= '<ul id="more_resultat">'."\n";
|
150 |
$retour_resultats .= '<ul id="more_resultat">'."\n";
|
148 |
foreach ($aso_resultats as $val) {
|
151 |
foreach ($aso_resultats as $val) {
|
149 |
if (!empty($val['url'])) {
|
152 |
if (!empty($val['url'])) {
|
150 |
$retour_resultats .= '<li>'."\n";
|
153 |
$retour_resultats .= '<li>'."\n";
|
151 |
$retour_resultats .= '<h2><a href="'.$val['url'].'" ';
|
154 |
$retour_resultats .= '<h2><a href="'.$val['url'].'" ';
|
152 |
if ($val['hreflang'] != '') {
|
155 |
if ($val['hreflang'] != '') {
|
153 |
$retour_resultats .= 'hreflang="'.$val['hreflang'].'" ';
|
156 |
$retour_resultats .= 'hreflang="'.$val['hreflang'].'" ';
|
- |
|
157 |
}
|
- |
|
158 |
if ($val['accesskey'] != '') {
|
- |
|
159 |
$retour_resultats .= 'accesskey="'.$val['accesskey'].'" ';
|
- |
|
160 |
}
|
- |
|
161 |
if ($val['title'] != '') {
|
- |
|
162 |
$retour_resultats .= 'title="'.$val['title'].'" ';
|
- |
|
163 |
}
|
- |
|
164 |
$retour_resultats .= '>'.$val['titre'].'</a></h2>';
|
- |
|
165 |
$retour_resultats .= '<dl>'."\n";
|
- |
|
166 |
//if (trim($val['poids']) != '') {
|
- |
|
167 |
// $retour_resultats .= '<dt>'.MORE_LG_RESULTAT_POIDS.'</dt>'."\n";
|
- |
|
168 |
// $retour_resultats .= '<dd>'.$val['poids'].'</dd>'."\n";
|
- |
|
169 |
//}
|
- |
|
170 |
if (trim($val['score']) != '') {
|
- |
|
171 |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_SCORE.'</dt>'."\n";
|
- |
|
172 |
$retour_resultats .= '<dd>'.$val['score'].MORE_LG_RESULTAT_POURCENT.'</dd>'."\n";
|
- |
|
173 |
}
|
- |
|
174 |
if (trim($val['date_creation']) != '') {
|
- |
|
175 |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_DATE_CREATION.'</dt>'."\n";
|
- |
|
176 |
$retour_resultats .= '<dd>'.$val['date_creation'].'</dd>'."\n";
|
- |
|
177 |
}
|
- |
|
178 |
if (trim($val['description']) != '') {
|
- |
|
179 |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_DESCRIPTION.'</dt>'."\n";
|
- |
|
180 |
$retour_resultats .= '<dd>'.$val['description'].'</dd>'."\n";
|
- |
|
181 |
}
|
- |
|
182 |
$retour_resultats .= '</dl>'."\n";
|
- |
|
183 |
$retour_resultats .= '</li>'."\n";
|
154 |
}
|
184 |
}
|
155 |
if ($val['accesskey'] != '') {
|
- |
|
156 |
$retour_resultats .= 'accesskey="'.$val['accesskey'].'" ';
|
- |
|
157 |
}
|
- |
|
158 |
if ($val['title'] != '') {
|
- |
|
159 |
$retour_resultats .= 'title="'.$val['title'].'" ';
|
- |
|
160 |
}
|
- |
|
161 |
$retour_resultats .= '>'.$val['titre'].'</a></h2>';
|
- |
|
162 |
$retour_resultats .= '<dl>'."\n";
|
- |
|
163 |
//if (trim($val['poids']) != '') {
|
- |
|
164 |
// $retour_resultats .= '<dt>'.MORE_LG_RESULTAT_POIDS.'</dt>'."\n";
|
- |
|
165 |
// $retour_resultats .= '<dd>'.$val['poids'].'</dd>'."\n";
|
- |
|
166 |
//}
|
- |
|
167 |
if (trim($val['score']) != '') {
|
- |
|
168 |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_SCORE.'</dt>'."\n";
|
- |
|
169 |
$retour_resultats .= '<dd>'.$val['score'].MORE_LG_RESULTAT_POURCENT.'</dd>'."\n";
|
- |
|
170 |
}
|
- |
|
171 |
if (trim($val['date_creation']) != '') {
|
- |
|
172 |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_DATE_CREATION.'</dt>'."\n";
|
- |
|
173 |
$retour_resultats .= '<dd>'.$val['date_creation'].'</dd>'."\n";
|
- |
|
174 |
}
|
- |
|
175 |
if (trim($val['description']) != '') {
|
- |
|
176 |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_DESCRIPTION.'</dt>'."\n";
|
- |
|
177 |
$retour_resultats .= '<dd>'.$val['description'].'</dd>'."\n";
|
- |
|
178 |
}
|
- |
|
179 |
$retour_resultats .= '</dl>'."\n";
|
- |
|
180 |
$retour_resultats .= '</li>'."\n";
|
- |
|
181 |
}
|
185 |
}
|
- |
|
186 |
$retour_resultats .= '</ul>'."\n";
|
182 |
}
|
187 |
}
|
183 |
$retour_resultats .= '</ul>'."\n";
|
- |
|
184 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = '';
|
188 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = '';
|
185 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_TETE'] = '';
|
189 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_TETE'] = '';
|
186 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = $retour_resultats;
|
190 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = $retour_resultats;
|
187 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_PIED'] = '';
|
191 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_PIED'] = '';
|
188 |
$GLOBALS['_GEN_commun']['info_menu'] = '';
|
192 |
$GLOBALS['_GEN_commun']['info_menu'] = '';
|
Line 206... |
Line 210... |
206 |
$partie_menu_debut = '<fieldset>'."\n".'<legend>'.MORE_LG_FORM_TITRE.'</legend>'."\n";
|
210 |
$partie_menu_debut = '<fieldset>'."\n".'<legend>'.MORE_LG_FORM_TITRE.'</legend>'."\n";
|
207 |
$more_form->addElement('html', $partie_menu_debut);
|
211 |
$more_form->addElement('html', $partie_menu_debut);
|
Line 208... |
Line 212... |
208 |
|
212 |
|
209 |
$id = 'more_motif';
|
213 |
$id = 'more_motif';
|
210 |
$aso_attributs = array( 'id'=>$id, 'tabindex' => $tab_index++, 'size' => MORE_FORM_MOTIF_SIZE, 'maxlength' => MORE_FORM_MOTIF_MAXLENGTH,
|
214 |
$aso_attributs = array( 'id'=>$id, 'tabindex' => $tab_index++, 'size' => MORE_FORM_MOTIF_SIZE, 'maxlength' => MORE_FORM_MOTIF_MAXLENGTH,
|
211 |
'onclick' => "javascript: this.value='';");
|
215 |
'accesskey' => MORE_LG_FORM_ACCESSKEY, 'onclick' => "javascript: this.value='';");
|
212 |
$label = '<label for="'.$id.'">'.MORE_LG_FORM_MOTIF.'</label>';
|
216 |
$label = '<label for="'.$id.'">'.MORE_LG_FORM_MOTIF.'</label>';
|
Line 213... |
Line 217... |
213 |
$more_form->addElement('text', $id, $label, $aso_attributs);
|
217 |
$more_form->addElement('text', $id, $label, $aso_attributs);
|
214 |
|
218 |
|
Line 235... |
Line 239... |
235 |
|
239 |
|
236 |
|
240 |
|
237 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
241 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
242 |
*
|
- |
|
243 |
* $Log: not supported by cvs2svn $
|
- |
|
244 |
* Revision 1.5 2005/05/19 12:46:12 jpm
|
- |
|
245 |
* Correction bogue accesskey.
|
- |
|
246 |
* Ajout d'un id à la liste.
|
238 |
*
|
247 |
* Arrondissement des score.
|
239 |
* $Log: not supported by cvs2svn $
|
248 |
*
|
240 |
* Revision 1.4 2005/04/14 17:39:34 jpm
|
249 |
* Revision 1.4 2005/04/14 17:39:34 jpm
|
241 |
* Amélioration du moteur de rechercher :
|
250 |
* Amélioration du moteur de rechercher :
|
242 |
* - pourcentage
|
251 |
* - pourcentage
|