Subversion Repositories Applications.bazar

Rev

Rev 411 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 411 Rev 418
Line 18... Line 18...
18
// | You should have received a copy of the GNU General Public                                            |
18
// | You should have received a copy of the GNU 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
// +------------------------------------------------------------------------------------------------------+
Line 22... Line 22...
22
 
22
 
Line 23... Line 23...
23
// CVS : $Id: bazarTemplate.class.php,v 1.6 2007-10-22 10:09:21 florian Exp $
23
// CVS : $Id: bazarTemplate.class.php,v 1.7 2008-10-29 15:44:02 alexandre_tb Exp $
24
 
24
 
25
/**
25
/**
26
* Application projet
26
* Application projet
Line 31... Line 31...
31
//Auteur original :
31
//Auteur original :
32
*@author        Alexandre Granier <alexandre@tela-botanica.org>
32
*@author        Alexandre Granier <alexandre@tela-botanica.org>
33
//Autres auteurs :
33
//Autres auteurs :
34
*@author        Aucun
34
*@author        Aucun
35
*@copyright     Tela-Botanica 2000-2004
35
*@copyright     Tela-Botanica 2000-2004
36
*@version       $Revision: 1.6 $
36
*@version       $Revision: 1.7 $
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
38
*/
38
*/
Line 39... Line 39...
39
 
39
 
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line 58... Line 58...
58
define ('BAZ_TEMPLATE_ACCUEIL_CARTE_GOOGLE', 6); // Modele de la page d accueil de l appli bazar.carte_google.php
58
define ('BAZ_TEMPLATE_ACCUEIL_CARTE_GOOGLE', 6); // Modele de la page d accueil de l appli bazar.carte_google.php
59
define ('BAZ_TEMPLATE_FORMULAIRE_ACCUEIL', 7); // Modele, de la page saisie formulaire ou l'on choisit le type de fiche a saisir
59
define ('BAZ_TEMPLATE_FORMULAIRE_ACCUEIL', 7); // Modele, de la page saisie formulaire ou l'on choisit le type de fiche a saisir
Line 60... Line 60...
60
 
60
 
Line -... Line 61...
-
 
61
define ('BAZ_TEMPLATE_FORMULAIRE', 8); // Modele du formulaire (different de celui ci-dessus)
-
 
62
 
-
 
63
define ('BAZ_TEMPLATE_MAIL_MODIFIER_FICHE_SUJET', 9); // Modele du mail pour prevenir les admins d une modification de fiche (sujet)
61
define ('BAZ_TEMPLATE_FORMULAIRE', 8); // Modele du formulaire (different de celui ci-dessus)
64
define ('BAZ_TEMPLATE_MAIL_MODIFIER_FICHE_CORPS', 10); // Modele du mail pour prevenir les admins d une modification de fiche (corps)
Line 62... Line 65...
62
 
65
 
Line 70... Line 73...
70
    }
73
    }
Line 71... Line 74...
71
    
74
    
72
    function getTemplate ($id_template, $lang='fr-FR', $categorie_nature = 'toutes') {
75
    function getTemplate ($id_template, $lang='fr-FR', $categorie_nature = 'toutes') {
73
    		$requete = 'select bt_template from bazar_template where bt_id_template='.$id_template.
76
    		$requete = 'select bt_template from bazar_template where bt_id_template='.$id_template.
74
    					' and bt_id_i18n like "'.$lang.'%" ' ;
-
 
75
    		if($categorie_nature != 'toutes')
-
 
76
    			$requete .= ' and bt_categorie_nature='.$categorie_nature ;
-
 
77
    		else  //si toutes les catégories natures sont afficher, on affiche par défaut le template du numéro 1
-
 
78
    			$requete .= ' and bt_categorie_nature=1' ;
77
    					' and bt_id_i18n like "'.$lang.'%" ' ;
79
    		$resultat = $this->_db->query($requete) ;
78
    		$resultat = $this->_db->query($requete) ;
80
    		if (DB::isError($resultat)) return $this->raiseError ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
79
    		if (DB::isError($resultat)) return $this->raiseError ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
81
    		if ($resultat->numRows() == 0) return $this->raiseError ('Aucun template avec l\'identifiant: '.$id_template.
80
    		if ($resultat->numRows() == 0) return $this->raiseError ('Aucun template avec l\'identifiant: '.$id_template.
82
				' et la langue: '.$lang.'<br />'.$requete) ;
81
				' et la langue: '.$lang.'<br />'.$requete) ;