diff --git a/bureau/admin/dom_add.php b/bureau/admin/dom_add.php index 20bf1a7b..f7fd8b66 100644 --- a/bureau/admin/dom_add.php +++ b/bureau/admin/dom_add.php @@ -71,7 +71,7 @@ if ($q["u"]>0) { /> get_domain_list($cuid); +$dl=$dom->get_domain_list($cuid, false); $ddl=array(); foreach($dl as $d) { $ddl[$d]=$d; diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 17a3dd83..4eff38a7 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -1132,14 +1132,20 @@ class m_dom { /** * Returns the complete hosted domain list : */ - function get_domain_list($uid=-1) { + function get_domain_list($uid=-1, $nodns=true) { global $db,$err; $uid=intval($uid); $res=array(); + if ( $nodns ) { + $sql=" gesdns=0 "; + } else { + $sql=" gesdns=1 "; + } + if ($uid!=-1) { - $sql=" AND compte='$uid' "; + $sql.=" AND compte='$uid' "; } - $db->query("SELECT domaine FROM domaines WHERE gesdns=1 $sql ORDER BY domaine"); + $db->query("SELECT domaine FROM domaines WHERE $sql ORDER BY domaine"); while ($db->next_record()) { $res[]=$db->f("domaine"); }