inc/toolkit.inc.php
changeset 136 c795dd75a77e
parent 119 f74e4f88b680
child 137 79c33038ca14
equal deleted inserted replaced
135:3673b1c9246c 136:c795dd75a77e
    28 }
    28 }
    29 
    29 
    30 /*************
    30 /*************
    31  * Constants *
    31  * Constants *
    32  *************/
    32  *************/
    33 define('ROWAMOUNT', $ROWAMOUNT);
       
    34 
    33 
    35 if (isset($_GET["start"])) {
    34 if (isset($_GET["start"])) {
    36    define('ROWSTART', (($_GET["start"] - 1) * ROWAMOUNT));
    35    define('ROWSTART', (($_GET["start"] - 1) * $iface_rowamount));
    37    } else {
    36    } else {
    38    define('ROWSTART', 0);
    37    define('ROWSTART', 0);
    39 }
    38 }
    40 
    39 
    41 if (isset($_GET["letter"])) {
    40 if (isset($_GET["letter"])) {
    53 // Generates $db variable to access database.
    52 // Generates $db variable to access database.
    54 
    53 
    55 
    54 
    56 // Array of the available zone types
    55 // Array of the available zone types
    57 $server_types = array("MASTER", "SLAVE", "NATIVE");
    56 $server_types = array("MASTER", "SLAVE", "NATIVE");
       
    57 
       
    58 // $rtypes - array of possible record types
       
    59 $rtypes = array('A', 'AAAA', 'CNAME', 'HINFO', 'MX', 'NAPTR', 'NS', 'PTR', 'SOA', 'TXT');
       
    60 
       
    61 // If fancy records is enabled, extend this field.
       
    62 if($dns_fancy) {
       
    63         $rtypes[10] = 'URL';
       
    64         $rtypes[11] = 'MBOXFW';
       
    65 }
       
    66 
       
    67 // $template - array of records that will be applied when adding a new zone file
       
    68 $template = array(
       
    69                 array(
       
    70 
       
    71                                 "name"          =>              "##DOMAIN##",
       
    72                                 "type"          =>              "SOA",
       
    73                                 "content"       =>              "$dns_ns1 $dns_hostmaster 0",
       
    74                                 "ttl"           =>              "$dns_ttl",
       
    75                                 "prio"          =>              ""
       
    76                 ),
       
    77                 array(
       
    78                                 "name"          =>              "##DOMAIN##",
       
    79                                 "type"          =>              "NS",
       
    80                                 "content"       =>              "$dns_ns1",
       
    81                                 "ttl"           =>              "$dns_ttl",
       
    82                                 "prio"          =>              ""
       
    83                 ),
       
    84                 array(
       
    85                                 "name"          =>              "##DOMAIN##",
       
    86                                 "type"          =>              "NS",
       
    87                                 "content"       =>              "$dns_ns2",
       
    88                                 "ttl"           =>              "$dns_ttl",
       
    89                                 "prio"          =>              ""
       
    90                 ),
       
    91                 array(
       
    92                                 "name"          =>              "www.##DOMAIN##",
       
    93                                 "type"          =>              "A",
       
    94                                 "content"       =>              "##WEBIP##",
       
    95                                 "ttl"           =>              "$dns_ttl",
       
    96                                 "prio"          =>              ""
       
    97                 ),
       
    98                 array(
       
    99                                 "name"          =>              "##DOMAIN##",
       
   100                                 "type"          =>              "A",
       
   101                                 "content"       =>              "##WEBIP##",
       
   102                                 "ttl"           =>              "$dns_ttl",
       
   103                                 "prio"          =>              ""
       
   104                 ),
       
   105                 array(
       
   106                                 "name"          =>              "mail.##DOMAIN##",
       
   107                                 "type"          =>              "A",
       
   108                                 "content"       =>              "##MAILIP##",
       
   109                                 "ttl"           =>              "$dns_ttl",
       
   110                                 "prio"          =>              ""
       
   111                 ),
       
   112                 array(
       
   113                                 "name"          =>              "localhost.##DOMAIN##",
       
   114                                 "type"          =>              "A",
       
   115                                 "content"       =>              "127.0.0.1",
       
   116                                 "ttl"           =>              "$dns_ttl",
       
   117                                 "prio"          =>              ""
       
   118                 ),
       
   119                 array(
       
   120                                 "name"          =>              "##DOMAIN##",
       
   121                                 "type"          =>              "MX",
       
   122                                 "content"       =>              "mail.##DOMAIN##",
       
   123                                 "ttl"           =>              "$dns_ttl",
       
   124                                 "prio"          =>              "10"
       
   125                 )
       
   126 );
    58 
   127 
    59 
   128 
    60 /*************
   129 /*************
    61  * Includes  *
   130  * Includes  *
    62  *************/
   131  *************/