[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> 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: htpasswd.php,v 1.6 2004/10/23 16:55:07 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/adherents/htpasswd.php,v $ 21 * 22 */ 23 24 /*! \file htdocs/adherents/htpasswd.php 25 \ingroup adherent 26 \brief Page d'export htpasswd du fichier des adherents 27 \author Rodolphe Quiedeville 28 \version $Revision: 1.6 $ 29 */ 30 31 require ("./pre.inc.php"); 32 33 llxHeader(); 34 35 if ($sortorder == "") { $sortorder="ASC"; } 36 if ($sortfield == "") { $sortfield="d.login"; } 37 38 if (! isset($statut)) 39 { 40 $statut = 1 ; 41 } 42 43 if (! isset($cotis)) 44 { 45 // par defaut les adherents doivent etre a jour de cotisation 46 $cotis=1; 47 } 48 $sql = "SELECT d.login, d.pass, ".$db->pdate("d.datefin")." as datefin"; 49 $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d "; 50 $sql .= " WHERE d.statut = $statut "; 51 if ($cotis==1){ 52 $sql .= " AND datefin > now() "; 53 } 54 $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); 55 56 $result = $db->query($sql); 57 if ($result) 58 { 59 $num = $db->num_rows(); 60 $i = 0; 61 62 print "<BR><DIV class=\"titre\">Export au format htpasswd des login des adhérents</DIV><BR>\n"; 63 //print_barre_liste("Export au format htpasswd des login des adhérents", $page, "htpasswd.php", ""); 64 print "<HR>\n"; 65 while ($i < $num) 66 { 67 $objp = $db->fetch_object($result); 68 $htpass=crypt($objp->pass,initialiser_sel()); 69 print $objp->login.":".$htpass."<BR>\n"; 70 $i++; 71 } 72 print "<HR>\n"; 73 } 74 else 75 { 76 print $sql; 77 print $db->error(); 78 } 79 80 81 $db->close(); 82 83 llxFooter("<em>Dernière modification $Date: 2004/10/23 16:55:07 $ révision $Revision: 1.6 $</em>"); 84 ?>
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 |
![]() |