[ 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.9 2004/10/31 13:00:23 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/boutique/newsletter/index.php,v $ 21 * 22 */ 23 24 require ("./pre.inc.php"); 25 26 llxHeader(); 27 28 if ($sortfield == "") { 29 $sortfield="datec"; 30 } 31 if ($sortorder == "") { 32 $sortorder="DESC"; 33 } 34 35 36 if ($page == -1) { $page = 0 ; } 37 $limit = $conf->liste_limit; 38 $offset = $limit * $page ; 39 40 print_barre_liste("Liste des Newsletter", $page, "index.php"); 41 42 $sql = "SELECT rowid, email_subject, email_from_name, email_from_email, email_replyto, email_body, target, sql_target, status, date_send_request, date_send_begin, date_send_end, nbsent"; 43 $sql .= " FROM ".MAIN_DB_PREFIX."newsletter"; 44 $sql .= " ORDER BY $sortfield $sortorder "; 45 $sql .= $db->plimit( $limit ,$offset); 46 47 if ( $db->query($sql) ) 48 { 49 $num = $db->num_rows(); 50 $i = 0; 51 print "<table class=\"noborder\" width=\"100%\">"; 52 print "<tr class=\"liste_titre\">"; 53 print_liste_field_titre($langs->trans("Subject"),"index.php", "email_subject"); 54 print '<td align="center">'.$langs->trans("Status").'</td>'; 55 print '<td align="center">Nb envois</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->rowid.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche"></a> '; 65 66 print "<a href=\"fiche.php?id=$objp->rowid\">$objp->email_subject</a></td>\n"; 67 print '<td align="center">'.$objp->status.'</td>'; 68 print '<td align="center">'.$objp->nbsent.'</td>'; 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:00:23 $ révision $Revision: 1.9 $</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 |
![]() |