test commit marc
[aidenligne_francais_universite.git] / ajax / requetes / requetes.common.php
CommitLineData
c495c100
P
1<?php
2require("ajax/xajax.inc.php");
3
4function infoMot($id_mot)
5{
6 $objResponse = new xajaxResponse();
7 $result_groupes = spip_query("SELECT * FROM spip_groupes_mots WHERE id_groupe=$id_mot");
8 while($row = spip_fetch_array($result_groupes)) {
9 $titre = $row['titre'];
10 $descriptif = $row['descriptif'];
11 $texte = $row['texte'];
12 }
13 $contener = "<div class='contenu_popUp'> <h2>".supprimer_numero($titre)."</h2><p>".propre($texte)."</p></div>";
14 $objResponse->addAssign("popUp","innerHTML",$contener);
15 return $objResponse;
16}
17
18$xajax = new xajax();
19$xajax->registerFunction("infoMot");
20$xajax->processRequests();
21?>