Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 322 → Rev 323

/trunk/bibliotheque/bazarTemplate.class.php
20,7 → 20,7
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
 
// CVS : $Id: bazarTemplate.class.php,v 1.5 2007-08-27 12:33:40 alexandre_tb Exp $
// CVS : $Id: bazarTemplate.class.php,v 1.6 2007-10-22 10:09:21 florian Exp $
 
/**
* Application projet
33,7 → 33,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.5 $
*@version $Revision: 1.6 $
// +------------------------------------------------------------------------------------------------------+
*/
 
69,19 → 69,19
$this->_db = $objetDB ;
}
function getTemplate ($id_template, $lang='fr-FR', $categorie_nature = 0) {
function getTemplate ($id_template, $lang='fr-FR', $categorie_nature = 'toutes') {
$requete = 'select bt_template from bazar_template where bt_id_template='.$id_template.
' and bt_id_i18n like "'.$lang.'%"' ;
if($categorie_nature != 0)
' and bt_id_i18n like "'.$lang.'%" ' ;
if($categorie_nature != 'toutes')
$requete .= ' and bt_categorie_nature='.$categorie_nature ;
else //si toutes les catégories natures sont afficher, on affiche par défaut le template du numéro 1
$requete .= ' and bt_categorie_nature=1' ;
$resultat = $this->_db->query($requete) ;
if (DB::isError($resultat)) return $this->raiseError ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
if ($resultat->numRows() == 0) return $this->raiseError ('Aucun template avec l\'identifiant: '.$id_template.
' et la langue: '.$lang.'<br />'.$requete) ;
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
 
return $ligne->bt_template ;
}
}
/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.71 2007-10-22 09:18:39 alexandre_tb Exp $
// CVS : $Id: bazar.fonct.php,v 1.72 2007-10-22 10:09:21 florian Exp $
/**
*
* Fonctions du module bazar
31,7 → 31,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.71 $ $Date: 2007-10-22 09:18:39 $
*@version $Revision: 1.72 $ $Date: 2007-10-22 10:09:21 $
// +------------------------------------------------------------------------------------------------------+
*/
 
308,7 → 308,7
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
$res .= $modele->getTemplate(BAZ_TEMPLATE_MESSAGE_LOGIN, $GLOBALS['_BAZAR_']['langue']);
$res .= $modele->getTemplate(BAZ_TEMPLATE_MESSAGE_LOGIN, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']);
}
return $res;
}
680,7 → 680,7
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
$res .= $modele->getTemplate(BAZ_TEMPLATE_MESSAGE_LOGIN, $GLOBALS['_BAZAR_']['langue']);
$res .= $modele->getTemplate(BAZ_TEMPLATE_MESSAGE_LOGIN, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']);
}
 
return $res;
1376,6 → 1376,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.71 2007-10-22 09:18:39 alexandre_tb
* prise en compte de la langue dans les requetes sur bazar_nature
*
* Revision 1.70 2007-10-10 13:26:36 alexandre_tb
* utilisation de la classe Administrateur_bazar a la place de niveau_droit
* suppression de fonction niveau_droit
/trunk/bibliotheque/bazar.fonct.rss.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.rss.php,v 1.95 2007-10-22 09:22:02 alexandre_tb Exp $
// CVS : $Id: bazar.fonct.rss.php,v 1.96 2007-10-22 10:09:21 florian Exp $
/**
*
*@package bazar
28,7 → 28,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2006
*@version $Revision: 1.95 $
*@version $Revision: 1.96 $
// +------------------------------------------------------------------------------------------------------+
*/
 
367,9 → 367,9
$res .= '</div>'."\n";
if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {
$res .='<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
if ( $est_admin ) {
$res .= '<ul>'."\n";
$res .= '<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
$res .= '<ul>'."\n";
if ( $est_admin ) {
$lien_publie = &$GLOBALS['_BAZAR_']['url'];
$lien_publie->addQueryString('action', BAZ_VOIR_FICHE);
$lien_publie->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
1240,6 → 1240,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.95 2007-10-22 09:22:02 alexandre_tb
* prise en compte de la langue dans les requetes sur bazar_nature
*
* Revision 1.94 2007-10-10 13:26:00 alexandre_tb
* utilisation de la classe Administrateur_bazar a la place de niveau_droit
*