echo "      <td class=\"u\"><input size=\"4\" id=\"priority_field_" . $r['id'] . "\" name=\"record[" . $r['id'] . "][prio]\" value=\"" . $r['prio'] . "\"></td>\n";
         echo "      <td class=\"u\"><input size=\"4\" name=\"record[" . $r['id'] . "][ttl]\" value=\"" . $r['ttl'] . "\"></td>\n";
     }
     echo "     </tr>\n";
 }
 echo "    <tr>\n";
 echo "     <td colspan=\"6\">&nbsp;</td>\n";
 echo "    </tr>\n";
 echo "    <tr>\n";
 echo "     <td>&nbsp;</td><td colspan=\"5\">Comments:</td>\n";
 echo "    </tr>\n";
 echo "    <tr>\n";
 echo "     <td class=\"n\">\n";
 echo "      <a href=\"edit_comment.php?domain=" . $zone_id . "\">\n                                    <img src=\"images/edit.gif\" alt=\"[ " . _('Edit comment') . " ]\"></a>\n";
 echo "     </td>\n";
 echo "     <td colspan=\"4\"><textarea rows=\"5\" cols=\"80\" name=\"comment\">" . get_zone_comment($zone_id) . "</textarea></td>\n";
 echo "     <td>&nbsp;</td>\n";
 echo "     <tr>\n";
 echo "      <th colspan=\"6\"><br>Save as new template:</th>\n";
 echo "     </tr>\n";
 echo "     <tr>\n";
 echo "       <td colspan=\"2\">" . _('Template Name') . "</td>\n";
 echo "       <td><input class=\"wide\" type=\"text\" name=\"templ_name\" value=\"\"></td>\n";
 echo "      </tr>\n";
 echo "      <tr>\n";
 echo "       <td colspan=\"2\">" . _('Template Description') . "</td>\n";
 echo "       <td><input class=\"wide\" type=\"text\" name=\"templ_descr\" value=\"\"></td>\n";
 echo "      </tr>\n";
 echo "    </table>\n";
 echo "     <input type=\"submit\" class=\"button\" name=\"commit\" value=\"" . _('Commit changes') . "\">\n";
 echo "     <input type=\"reset\" class=\"button\" name=\"reset\" value=\"" . _('Reset changes') . "\">\n";
Exemplo n.º 2
0
         echo "      <td class=\"u\"><input size=\"4\" id=\"priority_field_" . $r['id'] . "\" name=\"record[" . $r['id'] . "][prio]\" value=\"" . htmlspecialchars($r['prio']) . "\"></td>\n";
         echo "      <td class=\"u\"><input size=\"4\" name=\"record[" . $r['id'] . "][ttl]\" value=\"" . htmlspecialchars($r['ttl']) . "\"></td>\n";
     }
     echo "     </tr>\n";
 }
 echo "    <tr>\n";
 echo "     <td colspan=\"6\">&nbsp;</td>\n";
 echo "    </tr>\n";
 echo "    <tr>\n";
 echo "     <td>&nbsp;</td><td colspan=\"5\">Comments:</td>\n";
 echo "    </tr>\n";
 echo "    <tr>\n";
 echo "     <td class=\"n\">\n";
 echo "      <a href=\"edit_comment.php?domain=" . $zone_id . "\">\n                            <img src=\"images/edit.gif\" alt=\"[ " . _('Edit comment') . " ]\"></a>\n";
 echo "     </td>\n";
 echo "     <td colspan=\"4\"><textarea rows=\"5\" cols=\"80\" name=\"comment\">" . htmlspecialchars(get_zone_comment($zone_id)) . "</textarea></td>\n";
 echo "     <td>&nbsp;</td>\n";
 echo "     <tr>\n";
 echo "      <th colspan=\"6\"><br>Save as new template:</th>\n";
 echo "     </tr>\n";
 echo "     <tr>\n";
 echo "       <td colspan=\"2\">" . _('Template Name') . "</td>\n";
 echo "       <td><input class=\"wide\" type=\"text\" name=\"templ_name\" value=\"\"></td>\n";
 echo "      </tr>\n";
 echo "      <tr>\n";
 echo "       <td colspan=\"2\">" . _('Template Description') . "</td>\n";
 echo "       <td><input class=\"wide\" type=\"text\" name=\"templ_descr\" value=\"\"></td>\n";
 echo "      </tr>\n";
 echo "    </table>\n";
 echo "     <input type=\"submit\" class=\"button\" name=\"commit\" value=\"" . _('Commit changes') . "\">\n";
 echo "     <input type=\"reset\" class=\"button\" name=\"reset\" value=\"" . _('Reset changes') . "\">\n";
$user_is_zone_owner = verify_user_is_owner_zoneid($zid);
$zone_type = get_domain_type($zid);
$zone_name = get_zone_name_from_id($zid);
if (isset($_POST["commit"])) {
    if ($zone_type == "SLAVE" || $perm_content_edit == "none" || $perm_content_edit == "own" && $user_is_zone_owner == "0") {
        error(ERR_PERM_EDIT_COMMENT);
    } else {
        edit_zone_comment($_GET['domain'], $_POST['comment']);
        success(SUC_COMMENT_UPD);
    }
}
echo "    <h2>" . _('Edit comment in zone') . " " . $zone_name . "</h2>\n";
if ($perm_view == "none" || $perm_view == "own" && $user_is_zone_owner == "0") {
    error(ERR_PERM_VIEW_COMMENT);
} else {
    $comment = get_zone_comment($zid);
    echo "     <form method=\"post\" action=\"edit_comment.php?domain=" . $zid . "\">\n";
    echo "      <table>\n";
    echo "      <tr>\n";
    echo "       <td colspan=\"6\">&nbsp;</td>\n";
    echo "      </tr>\n";
    echo "      <tr>\n";
    echo "       <td>&nbsp;</td><td colspan=\"5\">Comments:</td>\n";
    echo "      </tr>\n";
    if ($zone_type == "SLAVE" || $perm_content_edit == "none" || $perm_content_edit == "own" && $user_is_zone_owner == "0") {
        echo "    <tr>\n";
        echo "     <td class=\"n\">\n";
        echo "      &nbsp;\n";
        echo "     </td>\n";
        echo "     <td colspan=\"4\"><textarea rows=\"15\" name=\"comment\" disabled>" . $comment . "</textarea></td>\n";
        echo "     <td>&nbsp;</td>\n";