[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/product/concert/ -> index.php (source)

   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:35:08 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/product/concert/index.php,v $
  21   *
  22   */
  23  
  24  require ("./pre.inc.php");
  25  
  26  llxHeader();
  27  
  28  if ($sortfield == "") {
  29    $sortfield="c.date_concert";
  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 concerts", $page, "index.php");
  41  
  42  //$sql = "SELECT c.rowid, c.date_concert as dc, ga.nom, lc.nom as lieu, lc.ville";
  43  $sql = "SELECT c.rowid, c.date_concert as dc, c.fk_groupart, c.fk_lieu_concert, ga.nom, lc.nom as lieu, lc.ville";
  44  $sql .= " FROM ".MAIN_DB_PREFIX."concert as c, ".MAIN_DB_PREFIX."groupart as ga, ".MAIN_DB_PREFIX."lieu_concert as lc";
  45  $sql .= " WHERE c.fk_groupart = ga.rowid AND c.fk_lieu_concert = lc.rowid";
  46  $sql .= " ORDER BY $sortfield $sortorder ";
  47  $sql .= $db->plimit( $limit ,$offset);
  48   
  49  if ( $db->query($sql) ) {
  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("Titre","index.php", "a.title");
  55    print_liste_field_titre("Artiste/Groupe","index.php", "ga.nom");
  56    print_liste_field_titre("Salle","index.php", "lc.nom");
  57    print_liste_field_titre("Ville","index.php", "lc.ville");
  58    print "</tr>\n";
  59  
  60    $var=True;
  61    while ($i < $num) {
  62      $objp = $db->fetch_object( $i);
  63      $var=!$var;
  64      print "<TR $bc[$var]>";
  65      print "<TD><a href=\"fiche.php?id=$objp->rowid\">$objp->dc</a></TD>\n";
  66      //    print '<TD><a href="product_info.php?products_id='.$objp->osc_id.'">'.$objp->nom.'</a></TD>';
  67      print '<TD><a href="../groupart/fiche.php?id='.$objp->fk_groupart.'">'.$objp->nom.'</a></TD>';
  68      //    print '<TD><a href="product_info.php?products_id='.$objp->osc_id.'">'.$objp->lieu.'</a></TD>';
  69      print '<TD><a href="fichelieu.php?id='.$objp->fk_lieu_concert.'">'.$objp->lieu.'</a></TD>';
  70      print '<TD>'.$objp->ville.'</TD>';
  71      print "</TR>\n";
  72      $i++;
  73    }
  74    print "</TABLE>";
  75    $db->free();
  76  }
  77  
  78  
  79  $db->close();
  80  
  81  llxFooter("<em>Derni&egrave;re modification $Date: 2004/10/31 13:35:08 $ r&eacute;vision $Revision: 1.7 $</em>");
  82  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics