[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: index.php,v 1.7 2004/10/31 13:34:50 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/postnuke/articles/index.php,v $ 21 * 22 */ 23 24 require ("./pre.inc.php"); 25 26 llxHeader(); 27 28 if ($sortfield == "") 29 { 30 $sortfield="lower(p.pn_title)"; 31 } 32 if ($sortorder == "") 33 { 34 $sortorder="ASC"; 35 } 36 37 if ($page == -1) { $page = 0 ; } 38 $limit = $conf->liste_limit; 39 $offset = $limit * $page ; 40 41 print_barre_liste("Liste des articles", $page, "index.php", "", $sortfield, $sortorder, $form); 42 43 $sql = "SELECT p.pn_sid, p.pn_title FROM " . PN_DB_NAME . "." . PN_TABLE_STORIES_NAME . " as p"; 44 45 $sql .= " ORDER BY $sortfield $sortorder "; 46 $sql .= $db->plimit( $limit ,$offset); 47 48 if ( $db->query($sql) ) 49 { 50 $num = $db->num_rows(); 51 $i = 0; 52 print "<table class=\"noborder\" width=\"100%\">"; 53 print "<tr class=\"liste_titre\">"; 54 print_liste_field_titre($langs->trans("Ref"),"index.php", "p.pn_title"); 55 print '<td colspan="3"> </td>'; 56 print "</tr>\n"; 57 $var=True; 58 while ($i < $num) 59 { 60 $objp = $db->fetch_object(); 61 $var=!$var; 62 print "<tr $bc[$var]>"; 63 64 print '<td><a href="fiche.php?id='.$objp->pn_sid.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche livre"></a> '; 65 66 print "<a href=\"fiche.php?id=$objp->pn_sid\">$objp->pn_title</a></td>\n"; 67 print "<td width='70%'><a href=\"fiche.php?id=$objp->pn_sid\">$objp->title</a></td>\n"; 68 69 print "</tr>\n"; 70 $i++; 71 } 72 print "</table>"; 73 $db->free(); 74 } 75 else 76 { 77 dolibarr_print_error($db); 78 } 79 80 $db->close(); 81 82 llxFooter("<em>Dernière modification $Date: 2004/10/31 13:34:50 $ révision $Revision: 1.7 $</em>"); 83 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |