1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
function fonction8($id_activite)
{
require_once ('connexion.php.inc');
$reponse8 = new xajaxResponse();
$resu8="";
$req8="SELECT organisation.nom_org, organisation.adresse, organisation.id_commune, organisation.telephone, ".
"organisation.fax, organisation.mail, organisation.site, proposer.commentaire, ".
"lieu_pratique.nom, lieu_pratique.adresse, lieu_pratique.id_commune, commune.cp, commune.nom_ville ".
"FROM organisation, proposer, lieu_pratique, commune, activite ".
"WHERE proposer.id_lieu=lieu_pratique.id_lieu ".
"AND proposer.id_activite=activite.id_activite ".
"AND activite.id_activite='".$id_activite."' ".
"AND lieu_pratique.id_commune=commune.id_commune ".
"and organisation.id_org=proposer.id_org ";
$rep8=mysql_query($req8);
$l=0;
while ($o_sql8=mysql_fetch_array($rep8))
{
$nom=($o_sql8[0]);
$adresse=($o_sql8[1]);
$id_commune=($o_sql8[2]);
$tel=($o_sql8[3]);
$fax=($o_sql8[4]);
$mail=($o_sql8[5]);
$site=($o_sql8[6]);
$commentaire=($o_sql8[7]);
$lieu_pratique=($o_sql8[8]);
$adresse_lieu_pratique=($o_sql8[9]);
$cp=($o_sql8[10]);
$nom_ville=($o_sql8[11]);
$req8_1="select commune.cp, commune.nom_ville from commune where id_commune=".$id_commune;
$rep8_1=mysql_query($req8_1);
while ($o_sql8_1=mysql_fetch_array($rep8_1))
{
$cp_org=($o_sql8_1[0]);
$ville_org=($o_sql8_1[1]);
}
$resu8.=$nom."<br />".$adresse." - ".$cp_org." - ".$ville_org."<br />".$lieu_pratique."<br />".$adresse_lieu_pratique." - ".$cp." - ".$nom_ville."<hr>";
}
// en gros je veux faire ça :
afficherAdresse2('$adresse','$ville','$commentaire')
$reponse8->assign('test', 'innerHTML', utf8_encode($resu8));//Enfin, on affiche le resultat
return $reponse8;
mysql_close();
}
require_once('./xajax_core/xajax.inc.php');
$xajax = new xajax();
$xajax->register(XAJAX_FUNCTION, 'fonction8');
$xajax->processRequest();
$xajax->printJavascript(); |
Partager