Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 6 → Rev 7

/trunk/bazar.interne.css
9,216 → 9,36
| Auteur : Florian SCHMITT <florian@ecole-et-nature.org> |
+----------------------------------------------------------------------------+
*/
#BAZ_corps {width:100%;}
#BAZ_menu {width:100%;height:40px;font: normal 9px Georgia, serif;margin: 10px 0 10px 0;}
#BAZ_menu a {text-decoration: none;display: block;width: 9em;}
#BAZ_menu ul {padding: 0;}
#BAZ_menu li {padding: 2px;margin: 0;height:23px;float: left;list-style: none;list-style-type:none;background:transparent;
border-left: 3px solid #849950;border-right: 3px solid #849950;border-bottom: 2px solid #849950;}
#BAZ_menu li:hover {color: #FFF;background-color: #B1BB7E;}
#BAZ_menu li ul {position: absolute;background:#FFF;border: 1px solid #849950;left: -999em;width: 10.1em;z-index:14;}
#BAZ_menu li:hover ul {left: auto;margin: 2px 0 0 -6px;z-index:15;}
#BAZ_menu ul li a:hover {color: #FFF;}
 
#BAZ_hautdepage {
width: 670px;
}
 
#BAZ_corps {
float:left;
width: 670px;
}
 
#BAZ_pieddepage {
clear: both;
width: 100%;
padding: 3px;
text-align:center;
background-color: #CC0000;
font: normal 11px Georgia, serif;color: #FFCC66;
}
#BAZ_menu {
float:left;
width: 690px;
padding: 3px;
font: normal 11px Georgia, serif;
margin: 10px 0 10px 0;
}
 
 
#BAZ_menu a {
font-size: 12px;
text-decoration: none;
display: block;
width: 9em;
}
 
#BAZ_menu ul { /* toutes les listes */
padding: 0;
margin: 0;
line-height: 1;
}
 
#BAZ_menu li { /* tous les items de liste */
padding: 3px;
margin: 0;
float: left;
list-style: none;
list-style-type:none;
background:#FFF;
border-left: 5px solid #849950;
border-bottom: 2px solid #849950;
height:26px;
}
 
#BAZ_menu li:hover {
color: #FFFFFF;
background-color: #B1BB7E;
}
#BAZ_menu li ul { /* listes de deuxième niveau */
position: absolute;
background:#FFF;
border: 1px solid #849950;
left: -999em; /* on met left plutôt que display pour cacher les menus parce que display: none n'est pas lu par les lecteurs d'écran */
width: 10.8em;
z-index:14;
}
 
#BAZ_menu li:hover ul { /* listes imbriquées sous les items de listes survolés */
left: auto;
margin: 2px 0 0 -8px;
z-index:15;
}
 
 
#BAZ_menu ul li a:hover {
color: #FFFFFF;
}
 
/*-------------Les fiches Bazar-------------------------------------------------*/
 
#BAZ_cadre_fiche {
margin-left:25px;
width:654px;
}
 
#BAZ_cadre_fiche a {
font: 13px arial, sans-serif;
color:#000;
text-decoration:none;
}
#BAZ_cadre_fiche a:hover {
color:#515966;
text-decoration:underline;
}
 
#BAZ_cadre_fiche_haut {
height:18px;
width:654px;
background:url(http://educ-envir.org/client/bazar/images/BAZ_cadre_haut.gif) top left;
}
 
#BAZ_cadre_fiche_corps {
/*width:504px;
padding:20px 35px 0px 35px;*/
font: 13px arial, sans-serif;
text-align:justify;
line-height: 17px;
border-left:solid 1px #000;
border-right:solid 1px #000;
}
 
#BAZ_cadre_fiche_bas {
height:18px;
width:654px;
background:url(http://educ-envir.org/client/bazar/images/BAZ_cadre_bas.gif) top left;
}
 
#bulle_haut {
margin: 0 auto;
width:588px;
height:20px;
background:url(http://educ-envir.org/client/bazar/images/BAZ_encadre_haut.jpg) top left;
}
 
#bulle_corps {
margin: 0 auto;
width:578px;
padding-left:10px;
background:url(http://educ-envir.org/client/bazar/images/BAZ_encadre_barre.jpg) repeat-y;
}
 
#bulle_bas {
margin: 0 auto;
width:588px;
height:20px;
background:url(http://educ-envir.org/client/bazar/images/BAZ_encadre_bas.jpg) top left;
}
 
#BAZ_bas_page {
margin-left:30px;
height:165px;
background:url(http://educ-envir.org/client/bazar/images/BAZ_Enfants.gif) no-repeat bottom right;
}
#formation_qualifiante {
position:relative;top:197px;left:622px;height:190px;width:30px;background:url(http://test.educ-envir.org/client/bazar/images/BAZ_formation_qualifiante.gif) top right;
}
 
#formation_diplomante {
position:relative;top:7px;left:622px;height:190px;width:30px;background:url(http://test.educ-envir.org/client/bazar/images/BAZ_formation_diplomante.gif) top right;
}
 
#formation_continue {
position:relative;top:387px;left:622px;height:190px;width:30px;background:url(http://test.educ-envir.org/client/bazar/images/BAZ_formation_continue.gif) top right;
}
 
#fiche_haut {
margin:-180px 0 -20px 30px;
height:170px;
}
 
#fiche_image {
float:left;
height:160px;
width:160px;
}
 
#fiche_titre_image {
float:left;
width:400px;
text-align:center;
padding:6px;
background:#F2B43B;
color:#FFF;
font: 18px arial, sans-serif;
}
 
#fiche_titre {
width: 93%;
text-align:center;
padding:6px;
background:#F2B43B;
color:#FFF;
font: 18px arial, sans-serif;
}
 
.centrer {
clear:both;
margin:0 auto;
}
 
.rubrique {
width:150px;
text-align:left;
font: bold 15px arial, sans-serif; color: #515966;
}
 
.description {
font: 13px arial, sans-serif;
text-align:justify;
width:420px;
padding-bottom:10px ;
}
 
.rubrique_bulle {
width:90px;
text-align:left;
font: bold 15px arial, sans-serif; color: #000;
}
 
.infos {
font: bold 16px arial, sans-serif; color: #B1BB7E;
line-height: 25px;
}
 
.BAZ_cadre_fiche {margin:0 auto;width:654px;}
.BAZ_cadre_fiche a {font: 13px arial, sans-serif;color:#000;text-decoration:none;}
.BAZ_cadre_fiche a:hover {color:#515966;text-decoration:underline;}
.BAZ_cadre_fiche_haut {height:18px;width:654px;background:url(http://educ-envir.org/client/bazar/images/BAZ_cadre_haut.gif) top left;}
.BAZ_cadre_fiche_corps {padding:15px 15px 0 15px;font: 13px arial, sans-serif;text-align:justify;line-height: 17px;border-left:solid 1px #000;border-right:solid 1px #000;background:#FFF;}
.BAZ_cadre_fiche_bas {height:18px;width:654px;background:url(http://educ-envir.org/client/bazar/images/BAZ_cadre_bas.gif) top left;}
#fiche_image {float:left;height:160px; width:160px;}
#fiche_titre_image {float:left;width:400px; text-align:center; padding:6px; background:#F2B43B; color:#FFF; font: 18px arial, sans-serif;}
#fiche_titre {text-align:center; padding:6px; background:#F2B43B; color:#FFF; font: 18px arial, sans-serif;}
#BAZ_description {margin:10px 0;font: 15px arial, sans-serif;text-align:justify;}
#BAZ_bas_page { height:165px;background:url(http://educ-envir.org/client/bazar/images/BAZ_Enfants.gif) no-repeat bottom right;}
#bulle_haut {margin: 0 auto; margin-top:10px;width:588px;height:20px;background:url(http://educ-envir.org/client/bazar/images/BAZ_encadre_haut.jpg) top left;}
#bulle_corps {margin: 0 auto;width:578px;padding-left:10px;background:url(http://educ-envir.org/client/bazar/images/BAZ_encadre_barre.jpg) repeat-y;}
#bulle_bas {margin: 0 auto; margin-bottom:10px;width:588px;height:20px;background:url(http://educ-envir.org/client/bazar/images/BAZ_encadre_bas.jpg) top left;}
#formation_qualifiante {position:relative;top:197px;left:622px;height:190px;width:30px;background:url(http://test.educ-envir.org/client/bazar/images/BAZ_formation_qualifiante.gif) top right;}
#formation_diplomante {position:relative;top:7px;left:622px;height:190px;width:30px;background:url(http://test.educ-envir.org/client/bazar/images/BAZ_formation_diplomante.gif) top right;}
#formation_continue {position:relative;top:387px;left:622px;height:190px;width:30px;background:url(http://test.educ-envir.org/client/bazar/images/BAZ_formation_continue.gif) top right;}
.centrer {clear:both;margin:0 auto;}
.rubrique {width:150px; text-align:left;font: bold 15px arial, sans-serif; color: #515966;}
.rubrique_bulle {width:90px;text-align:left;font: bold 15px arial, sans-serif; color: #000;}
.infos {font: bold 16px arial, sans-serif; color: #B1BB7E;line-height: 25px;}
/trunk/documentation/bazar.sql
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/bibliotheque/bazar.fonct.rss.php
44,28 → 44,35
* @return string HTML
*/
function baz_voir_fiche($danslappli, $idfiche='') {
$res = '';
if (isset($_GET['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_GET['id_fiche'];
if ($idfiche!='') $GLOBALS['_BAZAR_']['id_fiche']=$idfiche;
//on cherche le type d'annonce
$requete = 'SELECT bn_label_nature FROM bazar_fiche, bazar_nature WHERE bn_id_nature=bf_ce_nature AND bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
//on met à jour le nb de visites pour la fiche
$requete = 'UPDATE bazar_fiche SET bf_nb_consultations=bf_nb_consultations+1 WHERE bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
//on cherche le type d'annonce, l'annonceur et les stats
$requete = 'SELECT bn_label_nature, bn_commentaire, bn_appropriation, bf_ce_utilisateur,bf_nb_consultations FROM bazar_fiche, bazar_nature WHERE bn_id_nature=bf_ce_nature AND bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$GLOBALS['_BAZAR_']['typeannonce']=$ligne['bn_label_nature'];
$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire'];
$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation'];
$GLOBALS['_BAZAR_']['annonceur']=$ligne['bf_ce_utilisateur'];
$GLOBALS['_BAZAR_']['nb_consultations']=$ligne['bf_nb_consultations'];
}
$res = '<div id="BAZ_cadre_fiche">'."\n";
$res .= '<div id="BAZ_cadre_fiche_haut">'."\n";
$res = '<div class="BAZ_cadre_fiche">'."\n";
$res .= '<div class="BAZ_cadre_fiche_haut">'."\n";
$res .= '&nbsp;</div>'."\n";
$res .= '<div id="BAZ_cadre_fiche_corps">'."\n";
$res .= '<div class="BAZ_cadre_fiche_corps">'."\n";
//si le template existe, on génère le template
if ((file_exists(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php'))) {
include_once(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php');
$res .=genere_fiche($GLOBALS['_BAZAR_']['id_fiche'],$danslappli);
$res .=genere_fiche($GLOBALS['_BAZAR_']['id_fiche']);
}
//on affiche ligne par ligne sinon
else {
76,10 → 83,17
}
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
if (isset($ligne['bf_url_image'])) $res .= '<img src="'.'http://'.$_SERVER['HTTP_HOST'].'/client/bazar/images/'.$ligne['bf_url_image'].'" border=0 alt="'.BAZ_TEXTE_IMG_ALTERNATIF.'" align="left" style="padding:0 10px 5px 0;" />'."\n";
$res .= '<h2>'.$ligne['bf_titre'].'</h2>'."\n" ;
if (isset($ligne['bf_description'])) $res .= '<br />'.$ligne['bf_description'].'<br /><br />'."\n";
if (isset($ligne['bf_url_image'])) {
$res .= '<div id="fiche_image">'."\n";
$res .= '<img src="'.'http://'.$_SERVER['HTTP_HOST'].'/client/bazar/images/'.$ligne['bf_url_image'].'" border=0 alt="'.BAZ_TEXTE_IMG_ALTERNATIF.'" />'."\n";
$res .= '</div>'."\n";
$res .= '<div id="fiche_titre_image">'.$ligne['bf_titre'];
}
else {
$res .= '<div id="fiche_titre">'.$ligne['bf_titre'];
}
$res .= '</div>'."\n";
$res .= '<div id="BAZ_description">'.$ligne['bf_description'].'</div>'."\n";
$tableau=baz_valeurs_template($GLOBALS['_BAZAR_']['typeannonce'].'.tpl');
for ($i=0; $i<count($tableau); $i++) {
if (isset($ligne[$tableau[$i]['nom_bdd']])) {
92,67 → 106,142
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
}
while ($tab = $resultat->fetchRow()) {
$val=encoderChaine($tab[1]);
$val=$tab[1];
}
}
else {
$val=encoderChaine($ligne[$tableau[$i]['nom_bdd']]);
$val=$ligne[$tableau[$i]['nom_bdd']];
}
if (($tableau[$i]['nom_bdd']!='bf_titre')and($tableau[$i]['nom_bdd']!='bf_description')) {
if ($val!='') $res .= '<br /><strong>'.constant($tableau[$i]['label']).':</strong> '.$val.'<br />'."\n";
if ($val!='') {
$res .= '<span class="rubrique">'.constant($tableau[$i]['label']).':</span>'."\n";
$res .= '<span class="description"> '.$val.'</span>'."\n".'<br />'."\n";
}
}
}
}
//afficher les liens pour l'annonce
$requete = 'SELECT bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
//afficher les liens pour l'annonce
$requete = 'SELECT bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
if ($resultat->numRows()>0) {
$res .= '<span class="rubrique">'.BAZ_LIEN_INTERNET.':</span>'."\n";
$res .= '<span class="description">'."\n";
$res .= '<ul>'."\n";
while ($ligne1 = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$res .= '<li><a href="'.$ligne1['bu_url'].'" target="_blank">'.$ligne1['bu_descriptif_url'].'</a></li>'."\n";
}
if ($resultat->numRows()>0) {
$res .= '<br /><strong>'.BAZ_LIEN_INTERNET.':</strong>'."\n";
$res .= '<ul>'."\n";
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$res .= '<li><a href="'.$ligne['bu_url'].'" target="_blank">'.$ligne['bu_descriptif_url'].'</a></li>'."\n";
$res .= '</ul></span>'."\n";
}
//afficher les fichiers pour l'annonce
$requete = 'SELECT bfj_description, bfj_fichier FROM bazar_fichier_joint WHERE bfj_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
if ($resultat->numRows()>0) {
$res .= '<span class="rubrique">'.BAZ_LISTE_FICHIERS_JOINTS.':</span>'."\n";
$res .= '<span class="description">'."\n";
$res .= '<ul>'."\n";
while ($ligne2 = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$res .= '<li><a href="http://'.$_SERVER['HTTP_HOST'].'/client/bazar/upload/'.$ligne2['bfj_fichier'].'">'.$ligne2['bfj_description'].'</a></li>'."\n";
}
$res .= '</ul></span>'."\n";
}
$res .= '<div id="bulle_haut">&nbsp;</div>'."\n";
$res .= '<div id="bulle_corps">'."\n";
//affichage du rédacteur de la fiche
$requete = 'SELECT '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.', '.BAZ_CHAMPS_EMAIL.' FROM '.BAZ_ANNUAIRE.' WHERE '.BAZ_CHAMPS_ID.'='.$GLOBALS['_BAZAR_']['annonceur'];
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
while ($redacteur = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$res .= BAZ_FICHE_ECRITE.'<a href="mailto:'.$redacteur[BAZ_CHAMPS_EMAIL].'">'.$redacteur[BAZ_CHAMPS_PRENOM].' '.$redacteur[BAZ_CHAMPS_NOM].'</a><br />'."\n";
}
$res .= BAZ_NB_VUS.'<strong>'.$GLOBALS['_BAZAR_']['nb_consultations'].'</strong>'.BAZ_FOIS.'<br />'."\n";
$res .= '</div>'."\n";
$res .= '<div id="bulle_bas">&nbsp;</div>'."\n";
$res .= '<div id="BAZ_bas_page">';
//informations complémentaires (id fiche, état publication,... )
if ($danslappli==1) {
$res .= '<span class="rubrique">'.BAZ_NUM_FICHE.':</span> '.$GLOBALS['_BAZAR_']['id_fiche'].'<br />'."\n";
$res .= '<span class="rubrique">'.BAZ_NATURE.':</span> '.$GLOBALS['_BAZAR_']['typeannonce'].'<br />'."\n";
if ($ligne['bf_statut_fiche']==1) {
$res .= '<span class="rubrique">'.BAZ_PUBLIEE.':</span> '.BAZ_OUI.'<br />'."\n";
}
else {
$res .= '<span class="rubrique">'.BAZ_PUBLIEE.':</span> '.BAZ_NON.'<br />'."\n";
}
$res .= '<span class="rubrique">'.BAZ_DATE_CREATION.':</span> '.strftime('%d.%m.%Y &agrave; %H:%M',strtotime($ligne['bf_date_creation_fiche'])).'<br />'."\n";
$res .= '<span class="rubrique">'.BAZ_DATE_MAJ.':</span> '.strftime('%d.%m.%Y &agrave; %H:%M',strtotime($ligne['bf_date_maj_fiche']));
//pour les identifiés seulement, administrateurs de la rubrique ou superadmins
if ($GLOBALS['AUTH']->getAuth()) {
$est_admin=0;
$requete='SELECT bn_id_nature FROM bazar_nature WHERE bn_label_nature="'.$GLOBALS['_BAZAR_']['typeannonce'].'"';
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
$res .= '</ul>'."\n";
$result = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
if ((niveau_droit($result['bn_id_nature'],$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID)))=='administrateur') {
$est_admin=1;
}
if (($est_admin)or(niveau_droit($id_nature_offre='0',$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur')or($GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))) {
$lien_modifier=$GLOBALS['_BAZAR_']['url'];
$lien_modifier->addQueryString('action', BAZ_ACTION_MODIFIER);
$lien_modifier->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
$lien_modifier->addQueryString('typeannonce', $GLOBALS['_BAZAR_']['typeannonce']);
$res .= '&nbsp;<a href="'.$lien_modifier->getURL().'">'.BAZ_MODIFIER_LA_FICHE.'</a>'."\n";
}
}
//afficher les fichiers pour l'annonce
$requete = 'SELECT bfj_description, bfj_fichier FROM bazar_fichier_joint WHERE bfj_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
}
$res .= '</div>'."\n";
$res .= '</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_bas">&nbsp;</div>'."\n";
$res .= '</div>'."\n";
//on ajoute les commentaires, s'il le faut
if ($GLOBALS['_BAZAR_']['commentaire']==1) {
$res .= '<div class="BAZ_cadre_fiche">'."\n";
$res .= '<div class="BAZ_cadre_fiche_haut">&nbsp;</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_corps">'."\n";
$res .= '<h3>'.BAZ_LES_COMMENTAIRES.'</h3>'."\n";
$requete = 'SELECT * FROM bazar_commentaires WHERE bc_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' ORDER BY bc_date ASC';
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
if (DB::isError ($resultat)) {
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
}
if ($resultat->numRows()>0) {
$res .= '<br /><strong>'.BAZ_LISTE_FICHIERS_JOINTS.':</strong>'."\n";
$res .= '<ul>'."\n";
$res .= 'Il y a '.$resultat->numRows();
if ($resultat->numRows()==1) $res .= 'commentaire : '.'<br />'."\n";
else $res .= 'commentaires : '.'<br />'."\n";
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$res .= '<li><a href="http://'.$_SERVER['HTTP_HOST'].'/client/bazar/upload/'.$ligne['bfj_fichier'].'">'.$ligne['bfj_description'].'</a></li>'."\n";
$res .= 'essai'."\n";
}
$res .= '</ul>'."\n";
}
else $res .= BAZ_PAS_DE_COMMENTAIRES.'<br />'."\n";
$res .= '</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_bas">&nbsp;</div>'."\n";
$res .= '</div>'."\n";
}
//on ajoute les appropriations, s'il le faut
if ($GLOBALS['_BAZAR_']['appropriation']==1) {
$res .= '<div class="BAZ_cadre_fiche">'."\n";
$res .= '<div class="BAZ_cadre_fiche_haut">&nbsp;</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_corps">'."\n";
//informations complémentaires (id fiche, état publication,... )
if ($danslappli==1) {
$res .= '<br /><br /><strong>'.BAZ_NUM_FICHE.':</strong> '.$GLOBALS['_BAZAR_']['id_fiche'];
$res .= '<br /><strong>'.BAZ_NATURE.':</strong> '.$GLOBALS['_BAZAR_']['typeannonce'];
if ($ligne['bf_statut_fiche']==1) {
$res .= '<br /><strong>'.BAZ_PUBLIEE.':</strong> '.BAZ_OUI;
}
else {
$res .= '<br /><strong>'.BAZ_PUBLIEE.':</strong> '.BAZ_NON;
}
$res .= '<br /><strong>'.BAZ_DATE_CREATION.':</strong> '.$ligne['bf_date_creation_fiche'];
$res .= '<br /><strong>'.BAZ_DATE_MAJ.':</strong> '.$ligne['bf_date_maj_fiche'];
$res .='<ul><li><a href="Javascript:history.go(-1)">'.BAZ_RETOUR.'</a></li></ul>'."\n";
}
$res .= '</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_bas">&nbsp;</div>'."\n";
$res .= '</div>'."\n";
}
$res .= '</div>'."\n";
$res .= '<div id="BAZ_cadre_fiche_bas">'."\n";
$res .= '&nbsp;</div>'."\n";
$res .= '</div>'."\n";
return $res ;
}
 
/trunk/bibliotheque/bazar.fonct.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bazar.fonct.php,v 1.3 2005-07-21 19:03:12 florian Exp $
// CVS : $Id: bazar.fonct.php,v 1.4 2005-09-28 16:06:03 florian Exp $
/**
*
* Fonctions du module bazar
30,7 → 30,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.3 $ $Date: 2005-07-21 19:03:12 $
*@version $Revision: 1.4 $ $Date: 2005-09-28 16:06:03 $
// +------------------------------------------------------------------------------------------------------+
*/
 
82,7 → 82,7
// Pour les administrateurs d'une rubrique, on affiche les fiches a valider de cette rubrique
// On effectue une requete sur le bazar pour voir les fiches a administrer
$res= '<h2>'.BAZ_ANNONCES_A_ADMINISTRER.'</h2>';
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_statut_fiche=0 AND bn_id_nature=bf_ce_nature ORDER BY bf_date_maj_fiche DESC' ;
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_statut_fiche=0 AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.' ORDER BY bf_date_maj_fiche DESC' ;
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
158,7 → 158,7
$res= '<h2>'.BAZ_VOS_ANNONCES.'</h2>'."\n";
// requête pour voir si l'utilisateur a des fiches à son nom, classées par date de MAJ et nature d'annonce
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_ce_utilisateur='. $GLOBALS['id_user'].
' AND bn_id_nature=bf_ce_nature ORDER BY bf_date_maj_fiche DESC,bf_ce_nature ASC';
' AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.' ORDER BY bf_date_maj_fiche DESC,bf_ce_nature ASC';
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
496,7 → 496,7
$res = '';
//requete pour obtenir le nom et la description des types d'annonce
$requete = "SELECT bn_id_nature, bn_label_nature, bn_description, bn_condition FROM bazar_nature ORDER BY bn_label_nature ASC";
$requete = "SELECT bn_id_nature, bn_label_nature, bn_description, bn_condition FROM bazar_nature WHERE bn_ce_id_menu=".$_REQUEST['menu']." ORDER BY bn_label_nature ASC";
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
506,19 → 506,22
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) {
$droitspers=niveau_droit($ligne["bn_id_nature"],$GLOBALS["id_user"]);
if (($droitspers=='redacteur') or ($droitspers=='administrateur') or ($droitspers=='superadministrateur')) {
$radio[] = &HTML_QuickForm::createElement('radio', 'typeannonce', '', '<b>'.$ligne['bn_label_nature'].
':</b><br />'.$ligne['bn_description'].'<br />', $ligne['bn_label_nature'], array("id" => "select"));
$formtemplate->addElement('radio', 'typeannonce', '', '<strong>'.$ligne['bn_label_nature'].
':</strong><br />'.$ligne['bn_description'], $ligne['bn_label_nature'], array("id" => 'select'.$ligne['bn_id_nature'], "style" => 'float:left;'));
}
}
$formtemplate->addGroup($radio, null, null, '');
$squelette =& $formtemplate->defaultRenderer();
$squelette->setFormTemplate("\n".'<div id="choix"><form {attributes}>'."\n".'{content}'."\n".'</form></div>'."\n");
$squelette->setElementTemplate( '<div style="clear:both;">'."\n".'{element}'."\n".'</div>'."\n");
//Mettre les annonces en choix par défaut
$formtemplate->setdefaults(array('typeannonce'=>'Annonces'));
//Bouton de validation du formulaire
$bouton[] = &HTML_QuickForm::createElement('submit', 'valider', BAZ_VALIDER);
$formtemplate->addGroup($bouton, null, null, '');
$formtemplate->addGroup($bouton, null, null, '&nbsp;');
//Affichage à l'écran
$res.= $formtemplate->toHTML() ;
651,7 → 654,7
$res.= '<a href='.$lien_passer_superadmin->getURL().'>'.BAZ_PASSER_SUPERADMINISTRATEUR.'</a><br />'."\n";
//on cherche les différentes rubriques d'annonces
$requete = 'SELECT bn_id_nature, bn_label_nature FROM bazar_nature';
$requete = 'SELECT bn_id_nature, bn_label_nature FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu;
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
1044,7 → 1047,7
//requete pour obtenir l'id et le label des types d'annonces
$requete = 'SELECT bn_id_nature, bn_label_nature '.
'FROM bazar_nature ';
'FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu;
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
1146,8 → 1149,8
//requete pour obtenir l'id et le label des types d'annonces
$requete = 'SELECT bn_label_nature '.
'FROM bazar_nature '.
'ORDER BY bn_label_nature ASC';
'FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.
' ORDER BY bn_label_nature ASC';
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
1326,6 → 1329,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/07/21 19:03:12 florian
* nouveautés bazar: templates fiches, correction de bugs, ...
*
* Revision 1.1.1.1 2005/02/17 18:05:11 florian
* Import initial de Bazar
*
/trunk/langues/baz_langue_fr.inc.php
19,9 → 19,9
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: baz_langue_fr.inc.php,v 1.3 2005-07-21 19:03:12 florian Exp $
// CVS : $Id: baz_langue_fr.inc.php,v 1.4 2005-09-28 16:06:03 florian Exp $
/**
* Fichier de traduction en français de l'application inscription
* Fichier de traduction en français de l'application Bazar
*
*@package bazar
//Auteur original :
30,7 → 30,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.3 $ $Date: 2005-07-21 19:03:12 $
*@version $Revision: 1.4 $ $Date: 2005-09-28 16:06:03 $
// +------------------------------------------------------------------------------------------------------+
*/
define ('BAZ_TITREAPPLI','Gestionnaire d\'annonces et de ressources (Bazar) ');
115,6 → 115,11
define ('BAZ_CONSULTER','Consulter les annonces de type');
define ('BAZ_SAISIR','Saisir des annonces');
define ('BAZ_ADMINISTRER','Administrer');
define ('BAZ_FICHE_ECRITE','Fiche &eacute;crite par : ');
define ('BAZ_NB_VUS','Cette fiche a &eacute;t&eacute; consult&eacute;e ');
define ('BAZ_FOIS', ' fois depuis sa cr&eacute;ation.');
define ('BAZ_LES_COMMENTAIRES', 'Les commentaires sur cette fiche');
define ('BAZ_PAS_DE_COMMENTAIRES', 'Pas de commentaires postés pour l\'instant, vous êtes le (la) premier (première) !!');
//================Textes pour les formations====================================
define ('BAZ_TITRE_FORMATION','Intitul&eacute; de la formation');
define ('BAZ_TITRE_FORMATION_REQUIS','L\'intitul&eacute; de la formation est obligatoire, veuillez le saisir');
270,6 → 275,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/07/21 19:03:12 florian
* nouveautés bazar: templates fiches, correction de bugs, ...
*
* Revision 1.1.1.1 2005/02/17 18:05:11 florian
* Import initial de Bazar
*
/trunk/bazar.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bazar.php,v 1.4 2005-07-21 19:03:12 florian Exp $
// CVS : $Id: bazar.php,v 1.5 2005-09-28 16:06:03 florian Exp $
/**
*
*@package bazar
28,7 → 28,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $ $Date: 2005-07-21 19:03:12 $
*@version $Revision: 1.5 $ $Date: 2005-09-28 16:06:03 $
// +------------------------------------------------------------------------------------------------------+
*/
 
80,10 → 80,9
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
$res = '';
//---------------l'entête de l'appli-----------
$res.='<div id="BAZ_hautdepage">'."\n";
$res.='<h1>'.BAZ_TITREAPPLI.'</h1>'."\n";
$res.='<h1>'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n";
$res.='</div>'."\n";
//---------------le menu de l'appli-----------
95,7 → 94,7
$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'<ul>'."\n";
$GLOBALS['_BAZAR_']['url']->removeQueryString('nature');
$requete = 'SELECT bn_id_nature, bn_label_nature FROM bazar_nature' ;
$requete = 'SELECT bn_id_nature, bn_label_nature FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu ;
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
211,6 → 210,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/07/21 19:03:12 florian
* nouveautés bazar: templates fiches, correction de bugs, ...
*
* Revision 1.2 2005/02/22 15:33:32 florian
* integration dans Papyrus
*
/trunk/configuration/baz_config.inc.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: baz_config.inc.php,v 1.4 2005-07-21 19:03:12 florian Exp $
// CVS : $Id: baz_config.inc.php,v 1.5 2005-09-28 16:06:03 florian Exp $
/**
* Fichier de configuration du bazar
*
31,7 → 31,7
*@author Florian SCHMITT <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $ $Date: 2005-07-21 19:03:12 $
*@version $Revision: 1.5 $ $Date: 2005-09-28 16:06:03 $
// +------------------------------------------------------------------------------------------------------+
*/
//==================================== LES FLUX RSS==================================
63,10 → 63,11
$GLOBALS['_BAZAR_']['db'] = & $GLOBALS['_GEN_commun']['pear_db'];
$GLOBALS['AUTH'] =& $GLOBALS['_GEN_commun']['pear_auth'];
define ('BAZ_ANNUAIRE','annuaire');
define ('BAZ_CHAMPS_ID','a_id'); //Champs index sur la table annuaire
define ('BAZ_CHAMPS_NOM','a_nom'); //Champs nom sur la table annuaire
define ('BAZ_CHAMPS_PRENOM','a_prenom'); //Champs prenom sur la table annuaire
define ('BAZ_ANNUAIRE','gen_annuaire'); //Table annuaire
define ('BAZ_CHAMPS_ID','ga_id_administrateur'); //Champs index sur la table annuaire
define ('BAZ_CHAMPS_NOM','ga_nom'); //Champs nom sur la table annuaire
define ('BAZ_CHAMPS_PRENOM','ga_prenom'); //Champs prenom sur la table annuaire
define ('BAZ_CHAMPS_EMAIL','ga_mail'); //Champs prenom sur la table annuaire
$GLOBALS['_BAZAR_']['url'] = $GLOBALS['_GEN_commun']['url'];
//BAZ_CHEMIN_APPLI : chemin vers l'application bazar METTRE UN SLASH (/) A LA FIN!!!!
89,6 → 90,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/07/21 19:03:12 florian
* nouveautés bazar: templates fiches, correction de bugs, ...
*
* Revision 1.2 2005/02/22 15:34:17 florian
* integration dans Papyrus
*