From 6a0aa72bf86f4c9e88b43403ae2d877fabaae7a0 Mon Sep 17 00:00:00 2001 From: Camille Lafitte Date: Thu, 22 May 2008 14:40:18 +0000 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20d'un=20nouveau=20compte=20avec?= =?UTF-8?q?=20son=20sous=20domaine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Permettre à un (sous) administrateur d'affecter au choix le domaine entre ceux déclarés pour son compte ou celui générique du serveur (défini par l'admin général). close #1087 --- bureau/admin/adm_add.php | 25 +++++++++++++++++++------ bureau/admin/adm_doadd.php | 10 ++++------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/bureau/admin/adm_add.php b/bureau/admin/adm_add.php index 7a3acdfd..eac9067f 100644 --- a/bureau/admin/adm_add.php +++ b/bureau/admin/adm_add.php @@ -91,18 +91,31 @@ if ($error) { $type = $db->f("type"); echo ""; } ?> + - + - - + + + + + + - " /> diff --git a/bureau/admin/adm_doadd.php b/bureau/admin/adm_doadd.php index d90c85cf..c6e14753 100644 --- a/bureau/admin/adm_doadd.php +++ b/bureau/admin/adm_doadd.php @@ -59,16 +59,14 @@ if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type)) * * 1 = force = ne tient pas compte du whois ou des droits de tld */ - if ($create_dom) { - if (variable_get("hosting_tld")) { + + if (($create_dom == 1) && !is_null($create_dom_list)) { # make sure we don't have multiple dots there $dom->lock(); - $dom->add_domain($login.".".preg_replace("/^\.\.*/", "", variable_get("hosting_tld")),1,1,1); + $dom->add_domain($login.".".preg_replace("/^\.\.*/", "", $create_dom_list),1,1,1); $dom->unlock(); - } else { - $err->log("no 'hosting_tld' variable defined in `variables` table, not creating domain"); - } } + $ftp->add_ftp($login,"",$pass,"/"); $mem->unsu();