if ($stepno == 1) { // Get available TLDs $display["tlds"] = array(); // $TLDs = $RegistryModuleFactory->GetExtensionList(); foreach ($TLDs as $k => $v) { try { $Registry = $RegistryModuleFactory->GetRegistryByExtension($v); $display['tlds'][] = $v; } catch (Exception $e) { $errmsg = $e->getMessage(); } } $display["num_tlds"] = count($display["tlds"]); } else { if ($stepno == 2) { $rows = $db->GetAll("SELECT name FROM domains WHERE TLD = ? AND userid = ? AND status = ? ORDER BY name", array($post_TLD, $_SESSION['userid'], DOMAIN_STATUS::DELEGATED)); $items = array(); foreach ($rows as $row) { $items[$row['name']] = "{$row['name']}.{$post_TLD}"; } $display['checklist'] = array('source_title' => "Select domains", 'items' => $items, 'name' => 'domains[]'); } else { if ($stepno == 3) { $CForm = new DomainAllContactsForm(array('userid' => $_SESSION['userid'], 'tld' => $_SESSION['BU_TLD'], 'form_title' => sprintf(_("Bulk contacts update - Step %d (Set Contacts)"), $stepno), 'button_text' => _("Next step"), 'form_fields' => array('stepno' => $stepno))); $display['all_contacts_form'] = $CForm->GetRenderedData(); } } } $display['stepno'] = $stepno; $template_name = "client/bulk_update_contacts_step{$stepno}"; include_once "src/append.inc.php";
protected function ShowContacts() { $Factory = RegistryModuleFactory::GetInstance(); $tlds = $this->GetTLDs(); foreach ($tlds as $tld) { $CForm = new DomainAllContactsForm(array('userid' => $_SESSION['userid'], 'tld' => $tld, "form_title" => sprintf(_("%s contacts"), strtoupper($tld)))); $this->display["contact_forms"][] = $CForm->GetRenderedData(); } }