removed dns templates from user menu

This commit is contained in:
Serghey Rodin 2012-07-25 10:11:57 +03:00
parent fe71ef2f08
commit fda044bb92
4 changed files with 10 additions and 24 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
# info: add dns domain
# options: user domain ip [template] [ns1] [ns2] [ns3] [ns4]
# options: user domain ip [template] [ns1] [ns2] [ns3] [ns4] [restart]
#
# The function adds DNS zone with records defined in the template. If the exp
# argument isn't stated, the expiration date value will be set to next year.

View file

@ -1,6 +1,6 @@
#!/bin/bash
# info: add dns domain record
# options: user domain record type value [priority] [id]
# options: user domain record type value [priority] [id] [restart]
#
# The call is used for adding new DNS record. Complex records of TXT, MX and
# SRV types can be used by a filling in the 'value' argument. The function also
@ -24,7 +24,7 @@ dvalue=$(idn -t --quiet -u "$5" )
dvalue=$(echo "$dvalue" | tr '[:upper:]' '[:lower:]')
priority=$6
id=$7
restart=$8
# Includes
source $VESTA/conf/vesta.conf
@ -36,7 +36,7 @@ source $VESTA/func/domain.sh
# Verifications #
#----------------------------------------------------------#
check_args '5' "$#" 'user domain record type value [priority] [id]'
check_args '5' "$#" 'user domain record type value [priority] [id] [restart]'
validate_format 'user' 'domain' 'record' 'rtype' 'dvalue'
is_system_enabled "$DNS_SYSTEM"
is_object_valid 'user' 'USER' "$user"
@ -81,7 +81,9 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
increase_user_value "$user" '$U_DNS_RECORDS'
# Restart named
$BIN/v_restart_dns "$EVENT"
if [ "$restart" != 'no' ]; then
$BIN/v_restart_dns "$EVENT"
fi
# Logging
log_history "$EVENT"

View file

@ -52,7 +52,7 @@
<tr><td><input type="text" size="20" class="add-input" name="v_exp" <?php if (!empty($v_exp)) echo "value=".$v_exp; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">TTL</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_ttl" <?php if (!empty($v_ttl)) echo "value=".$v_ttl; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">NameServers</td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Name Servers</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_ns1" <?php if (!empty($v_ns1)) echo "value=".$v_ns1; ?>></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_ns2" <?php if (!empty($v_ns2)) echo "value=".$v_ns2; ?>></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_ns3" <?php if (!empty($v_ns3)) echo "value=".$v_ns3; ?>></tr>

View file

@ -32,27 +32,11 @@
<tr><td class="add-text" style="padding: 10px 0 0 2px;"><a href="javascript:elementHideShow('advtable');" class="add-advanced">Advanced Options ⇢</a></td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 0px;">
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Template</td></tr>
<tr><td><select class="add-list" name="v_template">
<?php
foreach ($templates as $key => $value) {
echo "\t\t\t\t<option value=\"".$value."\"";
if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
echo ' selected' ;
}
if ((empty($v_template)) && ( $value == $template)){
echo ' selected' ;
}
echo ">".$value."</option>\n";
}
?>
</select></td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Domain Expiriation</td></tr>
<tr><td class="add-text" style="padding: 0px 0 0 2px;">Domain Expiriation</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_exp" <?php if (!empty($v_exp)) echo "value=".$v_exp; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">TTL</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_ttl" <?php if (!empty($v_ttl)) echo "value=".$v_ttl; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">NameServers</td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Name Servers</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_ns1" <?php if (!empty($v_ns1)) echo "value=".$v_ns1; ?>></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_ns2" <?php if (!empty($v_ns2)) echo "value=".$v_ns2; ?>></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_ns3" <?php if (!empty($v_ns3)) echo "value=".$v_ns3; ?>></tr>