diff --git a/htdocs/boutique/livre/index.php b/htdocs/boutique/livre/index.php index bf035da141c..3aa497e36c2 100644 --- a/htdocs/boutique/livre/index.php +++ b/htdocs/boutique/livre/index.php @@ -25,31 +25,34 @@ require("./pre.inc.php"); llxHeader(); $db = new Db(); -if ($sortfield == "") { +if ($sortfield == "") +{ $sortfield="lower(l.title)"; } -if ($sortorder == "") { +if ($sortorder == "") +{ $sortorder="ASC"; } - if ($page == -1) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; - -print_barre_liste("Liste des Livres", $page, $PHP_SELF); +print_barre_liste("Liste des Livres", $page, $PHP_SELF, "", $sortfield, $sortorder); $sql = "SELECT l.rowid, l.title, l.oscid, l.ref, l.status FROM llx_livre as l"; $sql .= " ORDER BY $sortfield $sortorder "; $sql .= $db->plimit( $limit ,$offset); -if ( $db->query($sql) ) { +if ( $db->query($sql) ) +{ $num = $db->num_rows(); $i = 0; print "

"; - print ""; print ''; @@ -59,7 +62,10 @@ if ( $db->query($sql) ) { $objp = $db->fetch_object( $i); $var=!$var; print ""; - print "\n"; + + print '\n"; print "\n";
Réf."; + print "
"; + print_liste_field_titre("Réf.",$PHP_SELF, "l.ref"); + print ""; print_liste_field_titre("Titre",$PHP_SELF, "l.title"); print " 
rowid\">$objp->refFiche livre '; + + print "rowid\">$objp->refrowid\">$objp->title