diff --git a/htdocs/admin/import/import.php b/htdocs/admin/import/import.php
new file mode 100644
index 00000000000..438504dff34
--- /dev/null
+++ b/htdocs/admin/import/import.php
@@ -0,0 +1,87 @@
+
+ *
+ * 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$
+ */
+
+/**
+ \file htdocs/admin/index.php
+ \brief Page d'import de donnee
+ \version $Revision$
+*/
+
+require("./pre.inc.php");
+
+require(DOL_DOCUMENT_ROOT.'/admin/import/dolibarrimport.class.php');
+
+$langs->load("admin");
+$langs->load("companies");
+
+if (!$user->admin)
+ accessforbidden();
+
+/*
+ * Affichage page
+ */
+llxHeader();
+
+$form = new Form($db);
+
+print_fiche_titre($langs->trans("ImportArea"),'','setup');
+
+print "
";
+
+print '
';
+
+
+if ( $_POST["sendit"] && $conf->upload != 0)
+{
+ $imp = new DolibarrImport($db);
+ $imp->CreateBackupDir();
+ if (doliMoveFileUpload($_FILES['userfile']['tmp_name'], $imp->upload_dir . "/" . $_FILES['userfile']['name']))
+ {
+
+ $imp->ImportClients($imp->upload_dir . "/" . $_FILES['userfile']['name']);
+
+ print "Imports : ".$imp->nb_import."
";
+ print "Imports corrects : ".$imp->nb_import_ok."
";
+ print "Imports erreurs : ".$imp->nb_import_ko."
";
+
+ }
+ else
+ {
+ $mesg = "Le fichier n'a pas été téléchargé";
+ }
+}
+
+$db->close();
+
+llxFooter('$Date$ - $Revision$');
+?>
diff --git a/htdocs/admin/import/index.php b/htdocs/admin/import/index.php
index 438504dff34..ed1d6aba147 100644
--- a/htdocs/admin/import/index.php
+++ b/htdocs/admin/import/index.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2005-2007 Laurent Destailleur
*
* 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
@@ -20,68 +20,147 @@
*/
/**
- \file htdocs/admin/index.php
- \brief Page d'import de donnee
- \version $Revision$
+ \file htdocs/imports/index.php
+ \ingroup core
+ \brief Page accueil de la zone import
+ \version $Revision$
*/
+
+require_once("./pre.inc.php");
+require_once(DOL_DOCUMENT_ROOT."/admin/import/dolibarrimport.class.php");
-require("./pre.inc.php");
+$langs->load("exports");
-require(DOL_DOCUMENT_ROOT.'/admin/import/dolibarrimport.class.php');
+$user->getrights();
-$langs->load("admin");
-$langs->load("companies");
-
-if (!$user->admin)
+if (! $user->societe_id == 0)
accessforbidden();
-/*
- * Affichage page
- */
-llxHeader();
+
-$form = new Form($db);
+$export=new DolibarrImport($db);
+//$export->load_arrays($user);
-print_fiche_titre($langs->trans("ImportArea"),'','setup');
+
+llxHeader('',$langs->trans("ImportArea"));
-print "
";
+print_fiche_titre($langs->trans("ImportArea"));
-print '