This commit is contained in:
Rodolphe Quiedeville 2005-04-12 09:08:27 +00:00
parent f6cad19b4f
commit d3e3fff23b

View File

@ -47,7 +47,7 @@ if ($_GET["id"])
$head[$h][1] = $langs->trans("Contrats"); $head[$h][1] = $langs->trans("Contrats");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/fiche.php?id=".$soc->id; $head[$h][0] = DOL_URL_ROOT."/telephonie/client/lignes.php?id=".$soc->id;
$head[$h][1] = $langs->trans("Lignes"); $head[$h][1] = $langs->trans("Lignes");
$h++; $h++;
@ -104,10 +104,10 @@ if ($_GET["id"])
$sql .= " AND s.idp = ".$soc->id; $sql .= " AND s.idp = ".$soc->id;
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
$result = $db->query($sql); $resql = $db->query($sql);
if ($result) if ($resql)
{ {
$num = $db->num_rows(); $num = $db->num_rows($resql);
$i = 0; $i = 0;
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
@ -121,7 +121,7 @@ if ($_GET["id"])
while ($i < min($num,$conf->liste_limit)) while ($i < min($num,$conf->liste_limit))
{ {
$obj = $db->fetch_object(); $obj = $db->fetch_object($resql);
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
@ -148,14 +148,12 @@ if ($_GET["id"])
$i++; $i++;
} }
print "</table>"; print "</table>";
$db->free(); $db->free($resql);
} }
else else
{ {
print $db->error() . ' ' . $sql; print $db->error() . ' ' . $sql;
} }
} }
} }
} }
@ -164,7 +162,6 @@ else
print "Error"; print "Error";
} }
print '</div>'; print '</div>';
/* ************************************************************************** */ /* ************************************************************************** */