diff --git a/htdocs/telephonie/adsl/history.php b/htdocs/telephonie/adsl/history.php index f206d66060b..f1afafb2a0f 100644 --- a/htdocs/telephonie/adsl/history.php +++ b/htdocs/telephonie/adsl/history.php @@ -56,35 +56,40 @@ if ($_GET["id"]) print ''; - print ''; + print ''; $client = new Societe($db, $ligne->client_id); $client->fetch($ligne->client_id); - print ''; + print ''; - print ''; - /* Contacts */ + print ''; + + /* historique */ $sql = "SELECT ".$db->pdate("l.tms").", l.statut, l.fk_user, u.name, u.firstname, l.comment"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_adsl_ligne_statut as l"; $sql .= ",".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE u.rowid = l.fk_user AND l.fk_ligne = ".$ligne->id; $sql .= " ORDER BY l.tms DESC "; - if ( $db->query( $sql) ) + + $resql = $db->query($sql); + + if ( $resql ) { - $num = $db->num_rows(); + $num = $db->num_rows($resql); if ( $num > 0 ) { $i = 0; while ($i < $num) { - $row = $db->fetch_row($i); + $row = $db->fetch_row($resql); print ''; @@ -95,11 +100,11 @@ if ($_GET["id"]) print '
'.$row[5]; } - print '"; + print '"; $i++; } } - $db->free(); + $db->free($resql); } else { @@ -123,14 +128,6 @@ else print "Error"; } - -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ - - $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$");
Numéro'.dolibarr_print_phone($ligne->numero).'
Numéro de support'.dolibarr_print_phone($ligne->numero).'
Client'.$client->nom.'
Client'.$client->nom.'
Statut'; + print '
Statut'; print ' '; print $ligne->statuts[$ligne->statut]; print '
Historique
'.strftime("%a %d %B %Y %H:%M:%S",$row[0]).''.$row[4] . " " . $row[3] . "
'.$row[4] . " " . $row[3] . "