Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 8 → Rev 9

/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.5 2005-09-28 16:06:03 florian Exp $
// CVS : $Id: bazar.php,v 1.6 2005-09-30 12:22:54 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.5 $ $Date: 2005-09-28 16:06:03 $
*@version $Revision: 1.6 $ $Date: 2005-09-30 12:22:54 $
// +------------------------------------------------------------------------------------------------------+
*/
 
/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.5 2005-09-28 16:06:03 florian Exp $
// CVS : $Id: baz_config.inc.php,v 1.6 2005-09-30 12:22:54 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.5 $ $Date: 2005-09-28 16:06:03 $
*@version $Revision: 1.6 $ $Date: 2005-09-30 12:22:54 $
// +------------------------------------------------------------------------------------------------------+
*/
//==================================== LES FLUX RSS==================================
/trunk/bazar.interne.css
32,9 → 32,9
#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;}
.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;}
/trunk/documentation/bazar.sql
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/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.4 2005-09-28 16:06:03 florian Exp $
// CVS : $Id: bazar.fonct.php,v 1.5 2005-09-30 12:22:54 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.4 $ $Date: 2005-09-28 16:06:03 $
*@version $Revision: 1.5 $ $Date: 2005-09-30 12:22:54 $
// +------------------------------------------------------------------------------------------------------+
*/
 
/trunk/bibliotheque/bazar.fonct.rss.php
47,10 → 47,22
if (isset($_GET['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_GET['id_fiche'];
if ($idfiche!='') $GLOBALS['_BAZAR_']['id_fiche']=$idfiche;
//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) ;
$url= $GLOBALS['_BAZAR_']['url'];
$url->addQueryString('action', BAZ_VOIR_FICHE);
$url->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
$url = preg_replace ('/&amp;/', '&', $url->getURL()) ;
//cas ou un commetaire a été entré
if (isset($_POST['Nom'])) {
$requete = 'INSERT INTO bazar_commentaires VALUES ('.$GLOBALS['_BAZAR_']['id_fiche'].', "'.$_POST['Nom'].'", "'.$_POST['Commentaire'].'", NOW() )';
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
}
else {
//sinon on met à jour le nb de visites pour la fiche, puisque c'est une simple consultation
$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) ;
64,6 → 76,23
$GLOBALS['_BAZAR_']['annonceur']=$ligne['bf_ce_utilisateur'];
$GLOBALS['_BAZAR_']['nb_consultations']=$ligne['bf_nb_consultations'];
}
//on vérifie si l'utilisateur est administrateur
$est_admin=0;
if ($GLOBALS['AUTH']->getAuth()) {
$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()) ;
}
$result = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
if ((niveau_droit($result['bn_id_nature'],$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='administrateur')
or(niveau_droit('0',$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur'))
{
$est_admin=1;
}
}
$res = '<div class="BAZ_cadre_fiche">'."\n";
$res .= '<div class="BAZ_cadre_fiche_haut">'."\n";
$res .= '&nbsp;</div>'."\n";
152,8 → 181,8
}
$res .= '</ul></span>'."\n";
}
$res .= '<div id="bulle_haut">&nbsp;</div>'."\n";
$res .= '<div id="bulle_corps">'."\n";
$res .= '<div class="bulle_haut">&nbsp;</div>'."\n";
$res .= '<div class="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'];
166,8 → 195,9
}
$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 class="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";
180,25 → 210,12
}
$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()) ;
}
$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";
}
if (($est_admin)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";
}
}
$res .= '</div>'."\n";
218,14 → 235,48
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
}
if ($resultat->numRows()>0) {
$res .= 'Il y a '.$resultat->numRows();
if ($resultat->numRows()==1) $res .= 'commentaire : '.'<br />'."\n";
else $res .= 'commentaires : '.'<br />'."\n";
$res .= BAZ_IL_Y_A.$resultat->numRows().' ';
if ($resultat->numRows()==1) $res .= BAZ_COMMENTAIRE.'<br />'."\n";
else $res .= BAZ_COMMENTAIRES.'<br />'."\n";
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$res .= 'essai'."\n";
$res .= '<div class="bulle_haut">&nbsp;</div>'."\n";
$res .= '<div class="bulle_corps">'."\n";
//affichage du commentaire
$res .= $ligne['bc_commentaire'].'<br />'."\n";
$res .= '</div>'."\n";
$res .= '<div class="bulle_bas">'."\n";
$res .= '<span style="font-size:9px;margin-left:10px;">'.BAZ_PAR.' : <strong>'.$ligne['bc_nom'].'</strong>'.BAZ_ECRIT_LE.$ligne['bc_date'].'</span>'."\n";
//pour les identifiés seulement, administrateurs de la rubrique ou superadmins
if ($est_admin==1) {
$url_comment= $GLOBALS['_BAZAR_']['url'];
$url_comment->addQueryString('action', BAZ_VOIR_FICHE);
$url_comment->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
$url_comment->addQueryString('date', $ligne['bc_date']);
$res .= '<span style="float:right;"><a href="'.$url_comment->getURL().'">'.BAZ_SUPPRIMER.'</a></span>'."\n";
}
$res .= '</div>'."\n";
}
}
else $res .= BAZ_PAS_DE_COMMENTAIRES.'<br />'."\n";
else $res .= BAZ_PAS_DE_COMMENTAIRES.'<br /><br />'."\n";
//formulaire des commentaires
$form_commentaire = new HTML_QuickForm('commentaire', 'post', $url);
$squelette =& $form_commentaire->defaultRenderer();
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
$squelette->setElementTemplate( '<label style="width:200px;">{label}&nbsp;</label><br />'."\n".'{element}<br />'."\n");
$squelette->setRequiredNoteTemplate("\n".'{requiredNote} '."\n");
$option=array('style'=>'width:300px;', 'maxlength'=>100);
$form_commentaire->addElement('text', 'Nom', BAZ_ENTREZ_VOTRE_NOM, $option);
$option=array('style'=>'width:100%;height:100px;white-space: pre;padding:3px;');
require_once 'HTML/QuickForm/textarea.php';
$formtexte= new HTML_QuickForm_textarea('Commentaire', BAZ_ENTREZ_VOTRE_COMMENTAIRE, $option);
$form_commentaire->addElement($formtexte) ;
$form_commentaire->addElement('submit', 'Envoyer', BAZ_ENVOYER);
$form_commentaire->addRule('Nom', BAZ_NOM_REQUIS, 'required', '', 'client') ;
$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ;
$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
$res .= $form_commentaire->toHTML();
$res .= '</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_bas">&nbsp;</div>'."\n";
$res .= '</div>'."\n";
/trunk/langues/baz_langue_fr.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_langue_fr.inc.php,v 1.4 2005-09-28 16:06:03 florian Exp $
// CVS : $Id: baz_langue_fr.inc.php,v 1.5 2005-09-30 12:22:54 florian Exp $
/**
* Fichier de traduction en français de l'application Bazar
*
30,7 → 30,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $ $Date: 2005-09-28 16:06:03 $
*@version $Revision: 1.5 $ $Date: 2005-09-30 12:22:54 $
// +------------------------------------------------------------------------------------------------------+
*/
define ('BAZ_TITREAPPLI','Gestionnaire d\'annonces et de ressources (Bazar) ');
120,6 → 120,15
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) !!');
define ('BAZ_IL_Y_A', 'Il y a ');
define ('BAZ_COMMENTAIRE', 'commentaire : ');
define ('BAZ_COMMENTAIRES', 'commentaires : ');
define ('BAZ_ENTREZ_VOTRE_NOM', 'Entrez votre nom : ');
define ('BAZ_ENTREZ_VOTRE_COMMENTAIRE', 'Entrez votre commentaire : ');
define ('BAZ_ENVOYER','Envoyer');
define ('BAZ_NOM_REQUIS', 'Le champs nom ne doit pas rester vide');
define ('BAZ_COMMENTAIRE_REQUIS', 'Le champs commentaire ne doit pas rester vide');
 
//================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');
161,7 → 170,9
define ('BAZ_COORDONNEES_CONTACT', '<tr><td colspan="2">Coordonnées de la personne contact</td></tr>');
define ('BAZ_DUREE_DE_PARUTION', '<tr><td colspan="2"><strong>Durée de parution:</strong> la date de début de parution indique le moment ou l\'annonce devient visible sur le site, et la date de fin de parution, le moment où elle disparait.</td></tr>');
define ('BAZ_LIGNE_HORIZONTALE', '<tr><td colspan="2"><hr /></td></tr>');
define ('BAZ_CHAMPS_REQUIS', '<span style="color:red;">*</span>: champs requis');
define ('BAZ_CHAMPS_REQUIS', '<span style="color:red;">*</span>&nbsp;: champs requis');
define ('BAZ_PAR', 'par');
define ('BAZ_ECRIT_LE',', &eacute;crit le ');
 
//================Le formulaire ================================================
define ('BAZ_AJOUTER_CHAMPS_DE_BASE', 'Ajouter les informations de base pour l\'annonce');