From b34ad8dfd85d5f29f16d2967a0142aad78749be3 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 23 Jun 2003 14:17:16 +0000 Subject: [PATCH] =?UTF-8?q?Ce=20fichier=20n'est=20plus=20utilis=E9,=20un?= =?UTF-8?q?=20compte=20admin=20est=20cr=E9=E9=20=E0=20partir=20du=20fichie?= =?UTF-8?q?r=20data.sql=20lors=20de=20l'installation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/public/password.php | 66 -------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 htdocs/public/password.php diff --git a/htdocs/public/password.php b/htdocs/public/password.php deleted file mode 100644 index 90af6bd7f5e..00000000000 --- a/htdocs/public/password.php +++ /dev/null @@ -1,66 +0,0 @@ - - * Copyright (c) 2002 Jean-Louis Bergamo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - */ - -require($GLOBALS["DOCUMENT_ROOT"]."/main.inc.php3"); - - -$db = new Db(); - -$sql = "SELECT count(*) FROM llx_user"; -$result = $db->query($sql); - -if ($result) -{ - if ($db->num_rows()) - { - $row = $db->fetch_row(0); - - $db->free(); - - if ($row[0] > 0) - { - print "La base contient déjà des mots de passes"; - } - else - { - $user = new User($db); - - $user->login = "admin"; - $user->admin = 1; - $user->create(); - - $user->id = 1; - - $user->password("admin",$conf->password_encrypted); - - print "Compte admin/admin créé"; - } - } -} -else -{ - print $db->error(); -} - - - -?>