From bc8ad8d93c4645d0e29372fdf55abeead50c50e0 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 9 Jul 2007 14:05:54 +0000 Subject: [PATCH] Affichage des liens xDSL --- htdocs/telephonie/contrat/fiche.php | 63 ++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/htdocs/telephonie/contrat/fiche.php b/htdocs/telephonie/contrat/fiche.php index 065e7a2859d..421e55f303d 100644 --- a/htdocs/telephonie/contrat/fiche.php +++ b/htdocs/telephonie/contrat/fiche.php @@ -669,7 +669,68 @@ else print $sql; } - print ""; + print "
"; + + /* Liens xDSL */ + + require_once DOL_DOCUMENT_ROOT.'/telephonie/adsl/ligneadsl.class.php'; + + $sql = "SELECT l.rowid, l.numero_ligne, l.statut, t.intitule"; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_adsl_ligne as l"; + $sql .= " , ".MAIN_DB_PREFIX."telephonie_adsl_type as t"; + $sql .= " WHERE l.fk_contrat=".$contrat->id; + $sql .= " AND t.rowid = l.fk_type"; + $sql .= " ORDER BY l.statut ASC;"; + $resql = $db->query($sql); + if ( $resql ) + { + $numlignes = $db->num_rows($resql); + if ( $numlignes > 0 ) + { + $i = 0; + + $ligne = new LigneAdsl($db); + + print ''; + print ''; + print "\n"; + + while ($i < $numlignes) + { + $obj = $db->fetch_object($i); + $var=!$var; + + print "\n"; + + print '\n"; + print '\n"; + print "\n"; + $i++; + } + print "
Liens xDSL'; + print 'Numero supportStatut
"; + + print ' '; + + print ''; + print img_file(); + + print ' '; + + print ''.stripslashes($obj->intitule)."'.$obj->numero_ligne."'.$ligne->statuts[$obj->statut]."
"; + } + $db->free($resql); + + + + } + else + { + print $db->error(); + print $sql; + } + + } /*