[ 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/telephonie/ligne/commande/retour/ -> atraiter.php (source)

   1  <?PHP
   2  /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   *
   4   * This program is free software; you can redistribute it and/or modify
   5   * it under the terms of the GNU General Public License as published by
   6   * the Free Software Foundation; either version 2 of the License, or
   7   * (at your option) any later version.
   8   *
   9   * This program is distributed in the hope that it will be useful,
  10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12   * GNU General Public License for more details.
  13   *
  14   * You should have received a copy of the GNU General Public License
  15   * along with this program; if not, write to the Free Software
  16   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17   *
  18   * $Id: atraiter.php,v 1.3 2005/04/07 13:44:41 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/ligne/commande/retour/atraiter.php,v $
  20   *
  21   */
  22  require ("./pre.inc.php");
  23  
  24  if (!$user->rights->telephonie->lire) accessforbidden();
  25  
  26  llxHeader('','Telephonie - Ligne - Commande - Retour');
  27  
  28  
  29  $page = $_GET["page"];
  30  $sortorder = $_GET["sortorder"];
  31  
  32  if ($page == -1) { $page = 0 ; }
  33  
  34  $offset = $conf->liste_limit * $page ;
  35  $pageprev = $page - 1;
  36  $pagenext = $page + 1;
  37  
  38  if ($sortorder == "") {
  39    $sortorder="DESC";
  40  }
  41  if ($sortfield == "") {
  42    $sortfield="rowid";
  43  }
  44  
  45  /*
  46   *
  47   */
  48  $sql = "SELECT ";
  49  $sql .= " cli,mode,situation,date_mise_service,date_resiliation,motif_resiliation,commentaire,fichier, traite ";
  50  $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_commande_retour";
  51  $sql .= " WHERE traite = 0";
  52  $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
  53  
  54  $resql = $db->query($sql);
  55  
  56  if ($resql)
  57  {
  58    $num = $db->num_rows($resql);
  59    $i = 0;
  60  
  61    print_barre_liste("Retours Fournisseurs", $page, "atraiter.php", "", $sortfield, $sortorder, '', $num);
  62  
  63    print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
  64    print '<tr class="liste_titre"><td>Lignes Statuts</td><td>Mode</td><td align="center">Resultat</td>';
  65    print '<td align="center">Date</td><td>Résil</td><td>Commentaire</td>';
  66    print "</tr>\n";
  67    $var=True;
  68  
  69    while ($i < min($num,$conf->liste_limit))
  70      {
  71        $obj = $db->fetch_object($resql);
  72        $var=!$var;
  73  
  74        $ligne = new LigneTel($db);
  75  
  76        if ( $ligne->fetch($obj->cli) == 1);
  77        {
  78      print "<tr $bc[$var]><td>";
  79      print '<img src="'.DOL_URL_ROOT.'/telephonie/ligne/graph'.$ligne->statut.'.png">&nbsp;';
  80      print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?numero='.$obj->cli.'">';
  81      print dolibarr_print_phone($obj->cli)."</a></td>\n";
  82      print '<td>'.$obj->mode."</td>\n";
  83      print '<td align="center">'.$obj->situation."</td>\n";
  84      print '<td align="center">'.$obj->date_mise_service."</td>\n";
  85      print '<td align="center">'.$obj->date_resiliation."</td>\n";
  86      print '<td>'.$obj->commentaire."</td>\n";
  87      print "</tr>\n";
  88        }
  89        $i++;
  90      }
  91    print "</table>";
  92    $db->free($resql);
  93  }
  94  else 
  95  {
  96    print $db->error() . ' ' . $sql;
  97  }
  98  
  99  
 100  $db->close();
 101  
 102  llxFooter("<em>Derni&egrave;re modification $Date: 2005/04/07 13:44:41 $ r&eacute;vision $Revision: 1.3 $</em>");
 103  ?>


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