diff --git a/htdocs/includes/modules/propale/mod_propale_ivoire.php b/htdocs/includes/modules/propale/mod_propale_ivoire.php index 6f32cb2bab0..2ad37d37962 100644 --- a/htdocs/includes/modules/propale/mod_propale_ivoire.php +++ b/htdocs/includes/modules/propale/mod_propale_ivoire.php @@ -21,23 +21,31 @@ * */ -function propale_get_num($objsoc=0) -{ - global $db; - - $sql = "SELECT count(*) FROM llx_propal"; - - if ( $db->query($sql) ) +Class mod_propale_ivoire +{ + Function info() { - $row = $db->fetch_row(0); - - $num = $row[0]; + return "Renvoie le numéro sous la forme PR0012"; } - $y = strftime("%y",time()); - - return "PR" . "$y" . substr("000".$num, strlen("000".$num)-4,4); + function propale_get_num($objsoc=0) + { + global $db; + + $sql = "SELECT count(*) FROM llx_propal"; + + if ( $db->query($sql) ) + { + $row = $db->fetch_row(0); + + $num = $row[0]; + } + + $y = strftime("%y",time()); + + return "PR" . "$y" . substr("000".$num, strlen("000".$num)-4,4); + } } ?> diff --git a/htdocs/includes/modules/propale/mod_propale_jade.php b/htdocs/includes/modules/propale/mod_propale_jade.php index 236d45174c9..f54d4077d2d 100644 --- a/htdocs/includes/modules/propale/mod_propale_jade.php +++ b/htdocs/includes/modules/propale/mod_propale_jade.php @@ -21,23 +21,30 @@ * */ -function propale_get_num($objsoc=0) -{ - global $db; - - $sql = "SELECT count(*) FROM llx_propal"; - - if ( $db->query($sql) ) +Class mod_propale_jade +{ + Function info() { - $row = $db->fetch_row(0); - - $num = $row[0]; + return "Renvoie le numéro sous la forme PROP2, PROP3"; } - $y = strftime("%y",time()); - - return "PROP" . $num; - + function propale_get_num($objsoc=0) + { + global $db; + + $sql = "SELECT count(*) FROM llx_propal"; + + if ( $db->query($sql) ) + { + $row = $db->fetch_row(0); + + $num = $row[0]; + } + + $y = strftime("%y",time()); + + return "PROP" . $num; + } } ?>