add_record.php
changeset 71 e1b918eaf69a
parent 47 ae140472d97c
child 79 0c0aa144356a
equal deleted inserted replaced
70:47248e2af079 71:e1b918eaf69a
    35 }
    35 }
    36 
    36 
    37 include_once("inc/header.inc.php");
    37 include_once("inc/header.inc.php");
    38 ?>
    38 ?>
    39 
    39 
    40     <h2><? echo _('Add record to zone'); ?> "<? echo get_domain_name_from_id($_GET["id"]) ?>"</H2>
    40     <h2><?php echo _('Add record to zone'); ?> "<?php echo get_domain_name_from_id($_GET["id"]) ?>"</H2>
    41 
    41 
    42     <form method="post">
    42     <form method="post">
    43      <input type="hidden" name="zoneid" value="<? echo $_GET["id"] ?>">
    43      <input type="hidden" name="zoneid" value="<?php echo $_GET["id"] ?>">
    44      <table border="0" cellspacing="4">
    44      <table border="0" cellspacing="4">
    45       <tr>
    45       <tr>
    46        <td class="n"><? echo _('Name'); ?></td>
    46        <td class="n"><?php echo _('Name'); ?></td>
    47        <td class="n">&nbsp;</td>
    47        <td class="n">&nbsp;</td>
    48        <td class="n"><? echo _('Type'); ?></td>
    48        <td class="n"><?php echo _('Type'); ?></td>
    49        <td class="n"><? echo _('Priority'); ?></td>
    49        <td class="n"><?php echo _('Priority'); ?></td>
    50        <td class="n"><? echo _('Content'); ?></td>
    50        <td class="n"><?php echo _('Content'); ?></td>
    51        <td class="n"><? echo _('TTL'); ?></td>
    51        <td class="n"><?php echo _('TTL'); ?></td>
    52       </tr>
    52       </tr>
    53       <tr>
    53       <tr>
    54        <td class="n"><input type="text" name="name" class="input">.<? echo get_domain_name_from_id($_GET["id"]) ?></td>
    54        <td class="n"><input type="text" name="name" class="input">.<?php echo get_domain_name_from_id($_GET["id"]) ?></td>
    55        <td class="n">IN</td>
    55        <td class="n">IN</td>
    56        <td class="n">
    56        <td class="n">
    57         <select name="type">
    57         <select name="type">
    58 <?
    58 <?php
    59 $dname = get_domain_name_from_id($_GET["id"]);
    59 $dname = get_domain_name_from_id($_GET["id"]);
    60 foreach (get_record_types() as $c) {
    60 foreach (get_record_types() as $c) {
    61         if (eregi('in-addr.arpa', $dname) && strtoupper($c) == 'PTR') {
    61         if (eregi('in-addr.arpa', $dname) && strtoupper($c) == 'PTR') {
    62                 $add = " SELECTED";
    62                 $add = " SELECTED";
    63         } elseif (strtoupper($c) == 'A') {
    63         } elseif (strtoupper($c) == 'A') {
    64                 $add = " SELECTED";
    64                 $add = " SELECTED";
    65         } else {
    65         } else {
    66                 unset($add);
    66                 unset($add);
    67         }
    67         }
    68         ?><option<? echo $add ?> value="<? echo $c ?>"><? echo $c ?></option><?
    68         ?><option<?php echo $add ?> value="<?php echo $c ?>"><?php echo $c ?></option><?php
    69 }
    69 }
    70 ?>
    70 ?>
    71         </select>
    71         </select>
    72        </td>
    72        </td>
    73        <td class="n"><input type="text" name="prio" class="sinput"></td>
    73        <td class="n"><input type="text" name="prio" class="sinput"></td>
    74        <td class="n"><input type="text" name="content" class="input"></td>
    74        <td class="n"><input type="text" name="content" class="input"></td>
    75        <td class="n"><input type="text" name="ttl" class="sinput" value="<? echo $DEFAULT_TTL?>"></td>
    75        <td class="n"><input type="text" name="ttl" class="sinput" value="<?php echo $DEFAULT_TTL?>"></td>
    76       </tr>
    76       </tr>
    77      </table>
    77      </table>
    78      <br>
    78      <br>
    79      <input type="submit" name="commit" value="<? echo _('Add record'); ?>" class="button">
    79      <input type="submit" name="commit" value="<?php echo _('Add record'); ?>" class="button">
    80     </form>
    80     </form>
    81 
    81 
    82 <? include_once("inc/footer.inc.php"); ?>
    82 <?php include_once("inc/footer.inc.php"); ?>