-
+ *
+ * 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$
+ *
+ */
include("./inc.php");
-$etape = 4;
-print "
Installation de Dolibarr - Etape $etape/$etapes
";
-
+pHeader("Création du compte administrateur","etape5");
$conf = "../conf/conf.php";
if (file_exists($conf))
{
@@ -21,43 +29,44 @@ if (file_exists($conf))
require ($dolibarr_main_document_root . "/lib/mysql.lib.php");
require ($dolibarr_main_document_root . "/conf/conf.class.php");
-if ($HTTP_POST_VARS["action"] == "set")
+print '
';
+
+$error=0;
+
+$conf = new Conf();
+$conf->db->host = $dolibarr_main_db_host;
+$conf->db->name = $dolibarr_main_db_name;
+$conf->db->user = $dolibarr_main_db_user;
+$conf->db->pass = $dolibarr_main_db_pass;
+$db = new DoliDb();
+$ok = 0;
+if ($db->ok == 1)
{
- umask(0);
- print 'Création du compte admin
';
- print '
';
- $db->close();
+ print '
Les mots de passe ne concordent pas, veuillez recommencer !
';
}
+
+ if ($_GET["error"] == 2)
+ {
+ print '
Veuillez saisir un mot de passe, les mots de passe vides ne sont pas acceptés !
';
+ }
+
+ if ($_GET["error"] == 3)
+ {
+ print '
Veuillez saisir un login !
';
+ }
+ $db->close();
}
+pFooter($err);
?>
-