Subversion Repositories Applications.bazar

Rev

Rev 39 | Rev 45 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 39 Rev 44
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.php,v 1.13 2005-10-21 16:15:04 florian Exp $
22
// CVS : $Id: bazar.fonct.php,v 1.14 2005-11-07 08:48:02 florian Exp $
23
/**
23
/**
24
*
24
*
25
* Fonctions du module bazar
25
* Fonctions du module bazar
26
*
26
*
27
*@package bazar
27
*@package bazar
28
//Auteur original :
28
//Auteur original :
29
*@author        Alexandre Granier <alexandre@tela-botanica.org>
29
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Florian Schmitt <florian@ecole-et-nature.org>
30
*@author        Florian Schmitt <florian@ecole-et-nature.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@copyright     Tela-Botanica 2000-2004
32
*@copyright     Tela-Botanica 2000-2004
33
*@version       $Revision: 1.13 $ $Date: 2005-10-21 16:15:04 $
33
*@version       $Revision: 1.14 $ $Date: 2005-11-07 08:48:02 $
34
// +------------------------------------------------------------------------------------------------------+
34
// +------------------------------------------------------------------------------------------------------+
35
*/
35
*/
Line 36... Line 36...
36
 
36
 
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
Line 765... Line 765...
765
		if ($tableau[$i]['type']!='labelhtml') {
765
		if ($tableau[$i]['type']!='labelhtml') {
766
			if (($tableau[$i]['type']=='listedatedeb')or($tableau[$i]['type']=='listedatefin')) {
766
			if (($tableau[$i]['type']=='listedatedeb')or($tableau[$i]['type']=='listedatefin')) {
767
				$val=$valeur[$tableau[$i]['nom_bdd']]['Y'].'-'.$valeur[$tableau[$i]['nom_bdd']]['m'].'-'.$valeur[$tableau[$i]['nom_bdd']]['d'];
767
				$val=$valeur[$tableau[$i]['nom_bdd']]['Y'].'-'.$valeur[$tableau[$i]['nom_bdd']]['m'].'-'.$valeur[$tableau[$i]['nom_bdd']]['d'];
768
			}
768
			}
769
			else {
769
			else {
770
				$val=stripslashes($valeur[$tableau[$i]['nom_bdd']]);
770
				$val=addslashes(baz_unhtmlentities($valeur[$tableau[$i]['nom_bdd']]));
771
			}
771
			}
772
			$requete.=$tableau[$i]['nom_bdd'].'="'.$val.'", ';
772
			$requete.=$tableau[$i]['nom_bdd'].'="'.$val.'", ';
773
		}
773
		}
774
	}
774
	}
Line 785... Line 785...
785
* @integer Valeur de l'identifiant de la fiche
785
* @integer Valeur de l'identifiant de la fiche
786
* @return   void
786
* @return   void
787
*/
787
*/
788
function baz_insertion($valeur) {
788
function baz_insertion($valeur) {
Line 789... Line 789...
789
	
789
	
Line 790... Line 790...
790
		// Récupération de bn_appropriation
790
		// Recuperation de bn_appropriation
791
		
791
		
792
		$requete_app = 'select bn_appropriation from bazar_nature where bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'] ;
792
		$requete_app = 'select bn_appropriation from bazar_nature where bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'] ;
Line 1328... Line 1328...
1328
	}
1328
	}
1329
	$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
1329
	$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
1330
	return $ligne->maxi + 1 ;
1330
	return $ligne->maxi + 1 ;
1331
}
1331
}
Line 1332... Line -...
1332
 
-
 
1333
function encoderChaine($chaine)
-
 
1334
{
-
 
1335
       $entites = array(
-
 
1336
           '?' => '&#8218;',
-
 
1337
	   '?' => '&#402;',
-
 
1338
           '?' => '&#8222;',
-
 
1339
           '?' => '&#8230;',
-
 
1340
           '?' => '&#8224;',
-
 
1341
           '?' => '&#8225;',
-
 
1342
           '?' => '&#710;',
-
 
1343
           '?' => '&#8240;',
-
 
1344
           'à' => '&#352;',
-
 
1345
           '?' => '&#8249;',
-
 
1346
           'à' => '&#338;',
-
 
1347
           '?' => '&#8216;',
-
 
1348
           '?' => '&#8217;',
-
 
1349
           '?' => '&#8220;',
-
 
1350
           '?' => '&#8221;',
-
 
1351
           '?' => '&#8226;',
-
 
1352
           '?' => '&#8211;',
-
 
1353
           '?' => '&#8212;',
-
 
1354
           '?' => '&#732;',
-
 
1355
           '?' => '&#8482;',
-
 
1356
           'à' => '&#353;',
-
 
1357
           '?' => '&#8250;',
-
 
1358
           'à' => '&#339;',
-
 
1359
           'à' => '&#376;',
-
 
1360
           'à' => '&#8364;');
-
 
1361
       return str_replace(array_keys($entites),
-
 
1362
                                array_values($entites),
-
 
1363
                                $chaine);
-
 
1364
}
-
 
1365
 
1332
 
1366
/* +--Fin du code ----------------------------------------------------------------------------------------+
1333
/* +--Fin du code ----------------------------------------------------------------------------------------+
1367
*
1334
*
-
 
1335
* $Log: not supported by cvs2svn $
-
 
1336
* Revision 1.13  2005/10/21 16:15:04  florian
-
 
1337
* mise a jour appropriation
1368
* $Log: not supported by cvs2svn $
1338
*
1369
* Revision 1.11  2005/10/12 17:20:33  ddelon
1339
* Revision 1.11  2005/10/12 17:20:33  ddelon
1370
* Reorganisation calendrier + applette
1340
* Reorganisation calendrier + applette
1371
*
1341
*
1372
* Revision 1.10  2005/10/12 15:14:06  florian
1342
* Revision 1.10  2005/10/12 15:14:06  florian