From fbffb7c7a57e33b7c9d220fdf3cf540d417e38b5 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 5 Feb 2004 18:39:38 +0000 Subject: [PATCH] Ajout fonction dolibarr_set_const --- htdocs/lib/functions.inc.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 7da04fc5312..bedf7f377d5 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -26,6 +26,21 @@ $yn[0] = "non"; $yn[1] = "oui"; +Function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0) +{ + $sql = "REPLACE INTO llx_const SET name = '$name', value='$value', visible=$visible, type='$type'"; + + if ($db->query($sql)) + { + return 1; + } + else + { + return 0; + } + +} + Function dolibarr_print_object_info($object) { print "Créé par : " . $object->user_creation->fullname . '
';