diff --git a/htdocs/lib/ldap.lib.php b/htdocs/lib/ldap.lib.php index 17122de9325..fca7a7bb846 100644 --- a/htdocs/lib/ldap.lib.php +++ b/htdocs/lib/ldap.lib.php @@ -27,7 +27,9 @@ * serveur ldap * * @package ldap.lib - * @version 1.9 + * @author Rodolphe Quiedeville + * @author Benoit Mortier + * @version 1.2 * */ diff --git a/htdocs/lib/mysql.lib.php b/htdocs/lib/mysql.lib.php index 733b525bbfb..fc72613f77b 100644 --- a/htdocs/lib/mysql.lib.php +++ b/htdocs/lib/mysql.lib.php @@ -22,6 +22,19 @@ * */ +/** + * classe DoliDb + * + * Classe contenant les fonctions pour gere la database de dolibarr + * + * @package mysql.lib.php + * @author Fabien Seisen + * @author Rodolphe Quiedeville + * @author Laurent Destailleur + * @version 1.2 + * + */ + class DoliDb { var $db, $results, $ok, $connected, $database_selected; @@ -55,7 +68,7 @@ class DoliDb { $name = $conf->db->name; } - //print "Name DB: $host,$user,$pass,$name
"; + //print "Name DB: $host,$user,$pass,$name
"; // Essai connexion serveur $this->db = $this->connect($host, $user, $pass); diff --git a/htdocs/lib/price.lib.php b/htdocs/lib/price.lib.php index b9dfa3c91d9..fab0b65d867 100644 --- a/htdocs/lib/price.lib.php +++ b/htdocs/lib/price.lib.php @@ -20,6 +20,24 @@ * */ +/** + * librairie contenant les fonctions pour calculer un prix + * + * @package price.lib.php + * @author Rodolphe Quiedeville + * @version 1.2 + * + */ + +/** + * permet de calculer un prix + * + * @access public + * @param integer $products + * @param integer $remise_percent + * @return integer $result + */ + Function calcul_price($products, $remise_percent) { $total_ht = 0; diff --git a/htdocs/lib/thermometer.php b/htdocs/lib/thermometer.php index ee5d70e6f16..bd4aba1691e 100644 --- a/htdocs/lib/thermometer.php +++ b/htdocs/lib/thermometer.php @@ -20,6 +20,28 @@ * $Source$ * */ + + /** + * librairie contenant les fonctions pour afficher un thermometre + * monetaire + * + * @package thermometer.php + * @author Timothy Kanters + * @author Rodolphe Quiedeville + * @version 1.2 + * + */ + +/** + * permet d'afficher un thermometre monetaire + * + * @access public + * @param integer $actualValue + * @param integer $pendingValue + * @param integer $intendValue + * @return string $thermometer $htmlLegenda + */ + function moneyMeter($actualValue=0, $pendingValue=0, $intentValue=0) /* This function returns the html for the moneymeter. diff --git a/htdocs/lib/webcal.class.php b/htdocs/lib/webcal.class.php index 3177374e2c7..5097a69e07e 100644 --- a/htdocs/lib/webcal.class.php +++ b/htdocs/lib/webcal.class.php @@ -20,28 +20,55 @@ * */ +/** + * classe Webcal + * + * Classe permettant d'acceder a la database webcalendar + * + * @package Webcal + * @author Rodolphe Quiedeville + * @version 1.2 + * + */ + class Webcal { var $localdb; var $heure = -1; var $duree = 0; +/** + * permet la connection a la base de donnée webcal + * + * @access public + * + */ Function Webcal() { global $conf; - + $this->localdb = new Db($conf->webcal->db->type, $conf->webcal->db->host, $conf->webcal->db->user, $conf->webcal->db->pass, $conf->webcal->db->name); } - + +/** + * ajoute une entree dans le calendrier de l'utilsateur + * + * @access public + * @param string $user + * @param integer $date + * @param string $texte + * @param string $desc + */ + Function add($user, $date, $texte, $desc) { - + $id = $this->get_next_id(); - + $cal_id = $id; $cal_create_by = $user->webcal_login; $cal_date = strftime('%Y%m%d', $date); @@ -54,49 +81,57 @@ class Webcal { $cal_access = "P"; $cal_name = $texte; $cal_description = $desc; - - $sql = "INSERT INTO webcal_entry (cal_id, cal_create_by,cal_date,cal_time,cal_mod_date, cal_mod_time,cal_duration,cal_priority,cal_type, cal_access, cal_name,cal_description)"; - - $sql .= " VALUES ($cal_id, '$cal_create_by', $cal_date, $cal_time,$cal_mod_date, $cal_mod_time, $cal_duration,$cal_priority,'$cal_type', '$cal_access', '$cal_name','$cal_description');"; - - if ( $this->localdb->query($sql) ) - { - - $sql = "INSERT INTO webcal_entry_user (cal_id, cal_login, cal_status)"; - $sql .= " VALUES ($cal_id, '$cal_create_by', 'A')"; - - if ( $this->localdb->query($sql) ) - { - - } - else - { - $error = $this->localdb->error() . '
' .$sql; - } - } + + $sql = "INSERT INTO webcal_entry (cal_id, cal_create_by,cal_date,cal_time,cal_mod_date, + cal_mod_time,cal_duration,cal_priority,cal_type, cal_access, cal_name,cal_description)"; + + $sql .= " VALUES ($cal_id, '$cal_create_by', $cal_date, $cal_time,$cal_mod_date, $cal_mod_time, + $cal_duration,$cal_priority,'$cal_type', '$cal_access', '$cal_name','$cal_description')"; + + if ( $this->localdb->query($sql) ) + { + + $sql = "INSERT INTO webcal_entry_user (cal_id, cal_login, cal_status)"; + $sql .= " VALUES ($cal_id, '$cal_create_by', 'A')"; + + if ( $this->localdb->query($sql) ) + { + + } + else + { + $error = $this->localdb->error() . '
' .$sql; + } + } else - { - $error = $this->localdb->error() . '
' .$sql; - } - - $this->localdb->close(); - } - + { + $error = $this->localdb->error() . '
' .$sql; + } + + $this->localdb->close(); + } +/** + * obtient l'id suivant + * + * @access public + * @return integer $id + */ + Function get_next_id() { $sql = "SELECT max(cal_id) FROM webcal_entry"; if ($this->localdb->query($sql)) - { - $id = $this->localdb->result(0, 0) + 1; - return $id; - } + { + $id = $this->localdb->result(0, 0) + 1; + return $id; + } else - { - print $this->localdb->error(); - } + { + print $this->localdb->error(); + } } } ?>