From 3d18bf433baeda58c1cff5ae8f5e53c75a3c0d6b Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 23 Jan 2004 11:58:29 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=E0=20jour=20des=20vues=20et=20de=20la?= =?UTF-8?q?=20navigation=20dans=20les=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/contact/index.php | 54 ++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index afb4d84ed34..d686ebb3780 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -47,7 +47,14 @@ if ($page < 0) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; -print_barre_liste("Liste des contacts",$page, $PHP_SELF, '', $sortfield, $sortorder); +if ($_GET["view"] == 'phone') +{ + $titre = "Liste des contacts (Vue téléphone)"; +} +else +{ + $titre = "Liste des contacts"; +} /* * @@ -56,7 +63,7 @@ print_barre_liste("Liste des contacts",$page, $PHP_SELF, '', $sortfield, $sortor * */ -$sql = "SELECT s.idp, s.nom, p.idp as cidp, p.name, p.firstname, p.email, p.phone "; +$sql = "SELECT s.idp, s.nom, p.idp as cidp, p.name, p.firstname, p.email, p.phone, p.phone_mobile, p.fax "; $sql .= "FROM llx_socpeople as p"; $sql .= " LEFT JOIN llx_societe as s ON (s.idp = p.fk_soc)"; @@ -85,11 +92,11 @@ if ($socid) if($_GET["view"] == "recent") { - $sql .= " ORDER BY p.datec DESC " . $db->plimit( $limit, $offset); + $sql .= " ORDER BY p.datec DESC " . $db->plimit( $limit + 1, $offset); } else { - $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset); + $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1, $offset); } $result = $db->query($sql); @@ -98,6 +105,8 @@ if ($result) { $num = $db->num_rows(); $i = 0; + + print_barre_liste($titre ,$page, $PHP_SELF, '&view='.$_GET["view"].'&userid='.$_GET["userid"], $sortfield, $sortorder,'',$num); if ($sortorder == "DESC") { @@ -107,7 +116,7 @@ if ($result) { $sortorder="DESC"; } - print "

"; + print "

"; print ""; print ""; - print ''; + print ''; + + print ''; + + + if ($_GET["view"] == 'phone') + { + print ''; + print ''; + } + else + { + print ''; + } + print "\n"; $var=True; - while ($i < $num) + while ($i < min($num,$limit)) { $obj = $db->fetch_object( $i); @@ -140,10 +162,22 @@ if ($result) } print "idp\">$obj->nom\n"; - print ''; - print ''; + print ''; + + if ($_GET["view"] == 'phone') + { + print ''; + + print ''; + + } + else + { + print ''; + } + print "\n"; $i++; }
"; print_liste_field_titre("Nom",$PHP_SELF,"lower(p.name)", $begin); @@ -115,11 +124,24 @@ if ($result) print_liste_field_titre("Prénom",$PHP_SELF,"lower(p.firstname)", $begin); print ""; print_liste_field_titre("Société",$PHP_SELF,"lower(s.nom)", $begin); - print "emailTéléphoneTéléphonePortableFaxemail
'.$obj->email.' '.$obj->phone.' '.$obj->phone.' '.$obj->phone_mobile.' '.$obj->fax.' '.$obj->email.'