[ 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/lolix/societe/ -> activation.php (source)

   1  <?php
   2  /* Copyright (C) 2004 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: activation.php,v 1.4 2004/10/31 13:34:27 eldy Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/lolix/societe/activation.php,v $
  20   *
  21   */
  22  
  23  require ("./pre.inc.php");
  24  
  25  $langs->load("companies");
  26  
  27  llxHeader("","","Lolix - Société a activer");
  28  
  29  /*
  30   * Sécurité accés client
  31   */
  32  if ($user->societe_id > 0) 
  33  {
  34    $action = '';
  35    $socidp = $user->societe_id;
  36  }
  37  
  38  if ($page == -1) { $page = 0 ; }
  39  
  40  $offset = $conf->liste_limit * $page ;
  41  $pageprev = $page - 1;
  42  $pagenext = $page + 1;
  43  
  44  $sql = "SELECT s.idp,s.nom, s.ville,".$db->pdate("datec") ." as da";
  45  $sql .= " FROM lolixfr.societe as s";
  46  $sql .= " WHERE active = 0";
  47  
  48  $sortfield = "s.datec";
  49  $sortorder = "DESC";
  50  
  51  $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1, $offset);
  52  
  53  $result = $db->query($sql);
  54  if ($result)
  55  {
  56    $num = $db->num_rows();
  57  
  58  
  59    print_barre_liste("Societe a activer", $page, "activation.php","",$sortfield,$sortorder,'',$num);
  60  
  61    $i = 0;
  62    
  63    if ($sortorder == "DESC")
  64      {
  65        $sortorder="ASC";
  66      }
  67    else
  68      {
  69        $sortorder="DESC";
  70      }
  71    print '<table class="noborder" width="100%">';
  72    print '<tr class="liste_titre">';
  73    print_liste_field_titre($langs->trans("Company"),$PHP_SELF,"s.nom","","",'valign=\"center\"');
  74    print_liste_field_titre($langs->trans("Town"),$PHP_SELF,"s.ville");
  75    print "<td>&nbsp;</td>";
  76  
  77    print "</tr>\n";
  78    $var=True;
  79  
  80    while ($i < min($num,$conf->liste_limit))
  81      {
  82        $obj = $db->fetch_object();
  83        
  84        $var=!$var;
  85  
  86        print "<tr $bc[$var]>";
  87        print '<td><a href="fiche.php?id='.$obj->idp.'">';
  88        print img_file();
  89        print "&nbsp;".$obj->nom.'</td>';
  90  
  91  
  92        print "</a>&nbsp;<a href=\"offre.php?id=$obj->idp\">$obj->ref</A></td>\n";     
  93        print "<TD>".$obj->ville."&nbsp;</TD>\n";
  94  
  95        print '<td align="center">'.strftime("%d/%m/%Y",$obj->da)."</td>\n";
  96  
  97        print "</TR>\n";
  98        $i++;
  99      }
 100    print "</TABLE>";
 101    $db->free();
 102  }
 103  else
 104  {
 105    print $db->error() . ' ' . $sql;
 106  }
 107  
 108  $db->close();
 109  
 110  llxFooter("<em>Derni&egrave;re modification $Date: 2004/10/31 13:34:27 $ r&eacute;vision $Revision: 1.4 $</em>");
 111  ?>


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