echo " <h2>" . _('Deactivate zone key') . "</h2>\n"; } else { echo " <h2>" . _('Activate zone key') . "</h2>\n"; } if ($confirm == '1') { if ($key_info[5]) { if (dnssec_deactivate_zone_key($domain_name, $key_id)) { success(SUC_EXEC_PDNSSEC_DEACTIVATE_ZONE_KEY); } } else { if (dnssec_activate_zone_key($domain_name, $key_id)) { success(SUC_EXEC_PDNSSEC_ACTIVATE_ZONE_KEY); } } } else { if ($user_is_zone_owner == "1") { echo " " . _('Domain') . ": " . $domain_name . "<br>\n"; echo " " . _('Id') . ": " . $key_info[0] . "<br>\n"; echo " " . _('Type') . ": " . $key_info[1] . "<br>\n"; echo " " . _('Tag') . ": " . $key_info[2] . "<br>\n"; echo " " . _('Algorithm') . ": " . dnssec_algorithm_to_name($key_info[3]) . "<br>\n"; echo " " . _('Bits') . ": " . $key_info[4] . "<br>\n"; echo " " . _('Active') . ": " . ($key_info[5] ? _('Yes') : _('No')) . "\n"; echo " <p>" . _('Are you sure?') . "</p>\n"; echo " <input type=\"button\" class=\"button\" OnClick=\"location.href='dnssec_edit_key.php?id=" . $zone_id . "&key_id={$key_id}&confirm=1'\" value=\"" . _('Yes') . "\">\n"; echo " <input type=\"button\" class=\"button\" OnClick=\"location.href='index.php'\" value=\"" . _('No') . "\">\n"; } else { error(ERR_PDNSSEC_DEL_ZONE_KEY); } } include_once "inc/footer.inc.php";
/** Return algorithm name for given short name * * @param string $short_name Short algorithm name * @return string Algorithm name */ function dnssec_shorthand_to_algorithm_name($short_name) { $name = 'Unknown'; switch ($short_name) { case "rsamd5": $name = dnssec_algorithm_to_name(1); break; case "dh": $name = dnssec_algorithm_to_name(2); break; case "dsa": $name = dnssec_algorithm_to_name(3); break; case "ecc": $name = dnssec_algorithm_to_name(4); break; case "rsasha1": $name = dnssec_algorithm_to_name(5); break; case "rsasha256": $name = dnssec_algorithm_to_name(8); break; case "rsasha512": $name = dnssec_algorithm_to_name(10); break; case "gost": $name = dnssec_algorithm_to_name(12); break; case "ecdsa256": $name = dnssec_algorithm_to_name(13); break; case "ecdsa384": $name = dnssec_algorithm_to_name(14); break; case "ed25519": $name = dnssec_algorithm_to_name(250); break; } return $name; }
$zone_template_id = get_zone_template($zone_id); echo " <h2>" . _('DNSSEC keys for zone') . " \"" . get_zone_name_from_id($zone_id) . "\"</h2>\n"; echo " <table>\n"; echo " <tr>\n"; echo " <th> </th>\n"; echo " <th>" . _('ID') . "</th>\n"; echo " <th>" . _('Type') . "</th>\n"; echo " <th>" . _('Tag') . "</th>\n"; echo " <th>" . _('Algorithm') . "</th>\n"; echo " <th>" . _('Bits') . "</th>\n"; echo " <th>" . _('Active') . "</th>\n"; echo " </tr>\n"; $keys = dnssec_get_keys($domain_name); foreach ($keys as $item) { echo "<tr>\n"; echo "<td width=\"60\" class=\"actions\"> \n"; echo "<a href=\"dnssec_edit_key.php?id=" . $zone_id . "&key_id=" . $item[0] . "\"><img src=\"images/edit.gif\" title=\"" . _('Edit zone key') . " " . $item[0] . "\" alt=\"[ " . _('Edit zone key') . " " . $domain_name . " ]\"></a>\n"; echo "<a href=\"dnssec_delete_key.php?id=" . $zone_id . "&key_id=" . $item[0] . "\"><img src=\"images/delete.gif\" title=\"" . _('Delete zone key') . " " . $item[0] . "\" alt=\"[ " . _('Delete zone key') . " " . $domain_name . " ]\"></a>\n"; echo "</td>"; echo "<td class=\"cell\">" . $item[0] . "</td>\n"; echo "<td class=\"cell\">" . $item[1] . "</td>\n"; echo "<td class=\"cell\">" . $item[2] . "</td>\n"; echo "<td class=\"cell\">" . dnssec_algorithm_to_name($item[3]) . "</td>\n"; echo "<td class=\"cell\">" . $item[4] . "</td>\n"; echo "<td class=\"cell\">" . ($item[5] ? _('Yes') : _('No')) . "</td>\n"; echo "</tr>\n"; } echo " </table>\n"; echo " <input type=\"button\" class=\"button\" onclick=\"location.href = 'dnssec_add_key.php?id=" . $zone_id . "';\" value=\"" . _('Add new key') . "\">\n"; echo " <input type=\"button\" class=\"button\" onclick=\"location.href = 'dnssec_ds_dnskey.php?id=" . $zone_id . "';\" value=\"" . _('Show DS and DNSKEY') . "\">\n"; include_once "inc/footer.inc.php";