Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.2 2007-11-30 15:02:50 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.3 2007-12-03 15:16:21 jp_milcent Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
*@package bazar
|
25 |
*@package bazar
|
26 |
//Auteur original :
|
26 |
//Auteur original :
|
27 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
27 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
28 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
28 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
29 |
//Autres auteurs :
|
29 |
//Autres auteurs :
|
30 |
*@copyright Tela-Botanica 2000-2006
|
30 |
*@copyright Tela-Botanica 2000-2006
|
31 |
*@version $Revision: 1.99.2.2 $
|
31 |
*@version $Revision: 1.99.2.3 $
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
33 |
*/
|
33 |
*/
|
Line 34... |
Line 34... |
34 |
|
34 |
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
Line 394... |
Line 394... |
394 |
}
|
394 |
}
|
395 |
$res .= '</div>'."\n";
|
395 |
$res .= '</div>'."\n";
|
396 |
$res .= '</div>'."\n";
|
396 |
$res .= '</div>'."\n";
|
397 |
}
|
397 |
}
|
Line 398... |
Line 398... |
398 |
|
398 |
|
- |
|
399 |
// Nous vérifions comment est appelé la fonction
|
399 |
// ATTENTION : vérifier que le div ci-dessous est bien inutile dans tous les cas! Il n'y a pas dans cette fonction de div ouvrant correspondant.
|
400 |
if ($danslappli == 0) {
|
- |
|
401 |
$res .= '</div>'."\n";
|
Line 400... |
Line 402... |
400 |
// $res .= '</div>'."\n";
|
402 |
} else if ($danslappli == 1 ) {
|
401 |
|
403 |
|
402 |
//on ajoute les appropriations, s'il le faut
|
404 |
// Ajout des appropriations, s'il le faut
|
403 |
if (($danslappli==1)and($GLOBALS['_BAZAR_']['appropriation']==1)) {
|
405 |
if ($GLOBALS['_BAZAR_']['appropriation'] == 1) {
|
404 |
$res .= '<br />'."\n".'<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
406 |
$res .= '<br />'."\n".'<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
405 |
$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LES_STRUCTURES_POSSEDANT_UNE_RESSOURCE.'</h2>'."\n";
|
407 |
$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LES_STRUCTURES_POSSEDANT_UNE_RESSOURCE.'</h2>'."\n";
|
406 |
$requete = 'SELECT '.BAZ_CHAMPS_ID.', '.BAZ_CHAMPS_NOM.' FROM bazar_appropriation,'.BAZ_ANNUAIRE.' WHERE ba_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' AND ba_ce_id_structure='.BAZ_CHAMPS_ID.' ORDER BY '.BAZ_CHAMPS_NOM.' ASC';
|
408 |
$requete = 'SELECT '.BAZ_CHAMPS_ID.', '.BAZ_CHAMPS_NOM.' FROM bazar_appropriation,'.BAZ_ANNUAIRE.' WHERE ba_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' AND ba_ce_id_structure='.BAZ_CHAMPS_ID.' ORDER BY '.BAZ_CHAMPS_NOM.' ASC';
|
407 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
409 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
408 |
if (DB::isError ($resultat)) {
|
410 |
if (DB::isError ($resultat)) {
|
409 |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
|
411 |
return $resultat->getMessage().'<br />'.$resultat->getDebugInfo();
|
410 |
}
|
412 |
}
|
411 |
$possede_ressource=0;
|
413 |
$possede_ressource=0;
|
412 |
if ($resultat->numRows()>0) {
|
414 |
if ($resultat->numRows()>0) {
|
Line 443... |
Line 445... |
443 |
}
|
445 |
}
|
444 |
$res .='</p>'."\n";
|
446 |
$res .='</p>'."\n";
|
445 |
$res .= '</div>'."\n";
|
447 |
$res .= '</div>'."\n";
|
446 |
}
|
448 |
}
|
Line 447... |
Line 449... |
447 |
|
449 |
|
448 |
//on ajoute les commentaires, s'il le faut
|
450 |
// Ajout des commentaires, s'il le faut
|
449 |
if (($danslappli==1)and($GLOBALS['_BAZAR_']['commentaire']==1)) {
|
451 |
if ($GLOBALS['_BAZAR_']['commentaire'] == 1) {
|
450 |
$res .= '<br />'."\n".'<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
452 |
$res .= '<br />'."\n".'<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
451 |
$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LES_COMMENTAIRES.'</h2>'."\n";
|
453 |
$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LES_COMMENTAIRES.'</h2>'."\n";
|
452 |
$requete = 'SELECT * FROM bazar_commentaires WHERE bc_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' ORDER BY bc_date ASC';
|
454 |
$requete = 'SELECT * FROM bazar_commentaires WHERE bc_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' ORDER BY bc_date ASC';
|
453 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
455 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
454 |
if (DB::isError ($resultat)) {
|
456 |
if (DB::isError ($resultat)) {
|
455 |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
|
457 |
return $resultat->getMessage().'<br />'.$resultat->getDebugInfo();
|
456 |
}
|
458 |
}
|
457 |
if ($resultat->numRows()>0) {
|
459 |
if ($resultat->numRows()>0) {
|
458 |
$res .= BAZ_IL_Y_A.$resultat->numRows().' ';
|
460 |
$res .= BAZ_IL_Y_A.$resultat->numRows().' ';
|
459 |
if ($resultat->numRows()==1) $res .= BAZ_COMMENTAIRE.'<br />'."\n";
|
461 |
if ($resultat->numRows()==1) $res .= BAZ_COMMENTAIRE.'<br />'."\n";
|
Line 497... |
Line 499... |
497 |
$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ;
|
499 |
$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ;
|
498 |
$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
|
500 |
$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
|
499 |
$res .= $form_commentaire->toHTML();
|
501 |
$res .= $form_commentaire->toHTML();
|
500 |
$res .= '</div>'."\n";
|
502 |
$res .= '</div>'."\n";
|
501 |
}
|
503 |
}
|
- |
|
504 |
}
|
Line 502... |
Line 505... |
502 |
|
505 |
|
503 |
// Nettoyage de l'url
|
506 |
// Nettoyage de l'url
|
504 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
507 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
505 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
|
508 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
|
Line 1239... |
Line 1242... |
1239 |
}
|
1242 |
}
|
Line 1240... |
Line 1243... |
1240 |
|
1243 |
|
1241 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1244 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1242 |
*
|
1245 |
*
|
- |
|
1246 |
* $Log: not supported by cvs2svn $
|
- |
|
1247 |
* Revision 1.99.2.2 2007-11-30 15:02:50 alexandre_tb
|
- |
|
1248 |
* simplification du code et correction du bug (les fiches de la carto n affichent pas la bonne nature
|
1243 |
* $Log: not supported by cvs2svn $
|
1249 |
*
|
1244 |
* Revision 1.99.2.1 2007-11-30 14:14:36 jp_milcent
|
1250 |
* Revision 1.99.2.1 2007-11-30 14:14:36 jp_milcent
|
1245 |
* Ajout d'un décodage des apostrophes de type RIGHT SINGLE QUOTATION MARK.
|
1251 |
* Ajout d'un décodage des apostrophes de type RIGHT SINGLE QUOTATION MARK.
|
1246 |
*
|
1252 |
*
|
1247 |
* Revision 1.99 2007-11-05 10:17:19 alexandre_tb
|
1253 |
* Revision 1.99 2007-11-05 10:17:19 alexandre_tb
|