inc/config-me.inc.php
author rejo
Tue, 25 Dec 2007 14:40:03 +0000
changeset 47 ae140472d97c
parent 23 4abaed69febd
child 74 43c31dc98305
permissions -rw-r--r--
[feladat @ 94] Second half of previous commit. :)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
     1
<?php
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
     2
47
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
     3
/*  PowerAdmin, a friendly web-based admin tool for PowerDNS.
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
     4
 *  See <https://rejo.zenger.nl/poweradmin> for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
     5
 *
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
     6
 *  Copyright 2007, 2008  Rejo Zenger <rejo@zenger.nl>
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
     7
 *
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
     8
 *  This program is free software: you can redistribute it and/or modify
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
     9
 *  it under the terms of the GNU General Public License as published by
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    10
 *  the Free Software Foundation, either version 3 of the License, or
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    11
 *  (at your option) any later version.
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    12
 *
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    13
 *  This program is distributed in the hope that it will be useful,
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    16
 *  GNU General Public License for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    17
 *
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    18
 *  You should have received a copy of the GNU General Public License
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    19
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    20
 */
ae140472d97c [feladat @ 94]
rejo
parents: 23
diff changeset
    21
8
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    22
/* Edit all fields below here to your information */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    23
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    24
/* MySQL Configuration */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    25
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    26
//
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    27
// Host we should connect to.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    28
// This could be for example "localhost" or a sock file
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    29
$dbhost = 'localhost';
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    30
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    31
//
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    32
// Your user with SELECT/INSERT/UPDATE/DELETE/CREATE access to $dbdatabase
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    33
$dbuser = '';
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    34
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    35
//
10
68d13494519e [feladat @ 24]
rejo
parents: 8
diff changeset
    36
// Your password, the password for $dbuser
8
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    37
$dbpass = '';
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    38
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    39
// Your database, the database you want to use for PowerDNS (or are already using)
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    40
$dbdatabase   = '';
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    41
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    42
// The dsn you want to use (which database you want to use)
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    43
// Tested is mysql and pgsql default is mysql
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    44
$dbdsntype = 'mysql';
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    45
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    46
/* URI Configuration */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    47
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    48
// $BASE_URL
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    49
// This will be the main URI you will use to connect to PowerAdmin.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    50
// For instance: "http://poweradmin.sjeemz.nl"
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    51
$BASE_URL = "http://";
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    52
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    53
// $BASE_PATH
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    54
// If PowerAdmin is in a subdir. Specify this here
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    55
// For instance: "/admin/"
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    56
$BASE_PATH = "/admin/";
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    57
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 10
diff changeset
    58
// $LANG
2ff220cfde13 [feladat @ 60]
rejo
parents: 10
diff changeset
    59
// Which language should be used for the web interface?
2ff220cfde13 [feladat @ 60]
rejo
parents: 10
diff changeset
    60
$LANG = "en_EN";
2ff220cfde13 [feladat @ 60]
rejo
parents: 10
diff changeset
    61
2ff220cfde13 [feladat @ 60]
rejo
parents: 10
diff changeset
    62
// $STYLE
2ff220cfde13 [feladat @ 60]
rejo
parents: 10
diff changeset
    63
// Define skin of web frontend. This should be the basename of the CSS file that
2ff220cfde13 [feladat @ 60]
rejo
parents: 10
diff changeset
    64
// will be included, it will be used like: "style/$STYLE.css.php".
2ff220cfde13 [feladat @ 60]
rejo
parents: 10
diff changeset
    65
$STYLE = "example";
8
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    66
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    67
/* DNS Record information */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    68
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    69
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    70
// $HOSTMASTER
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    71
// The email address of the hostmaster you want to be mailed.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    72
// For instance: "hostmaster@sjeemz.nl"
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    73
$HOSTMASTER = "";
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    74
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    75
// $NS1
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    76
// Your first nameserver
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    77
// Should be a domainname! Not an IP.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    78
$NS1 = "";
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    79
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    80
// $NS2
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    81
// Your second nameserver.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    82
// If you dont have a second nameserver, fill in the same value as $NS1
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    83
$NS2 = "";
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    84
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    85
/* You dont have to edit these fields. Change them if you want. */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    86
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    87
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    88
// $EXPIRE
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    89
// Session timeout in seconds. This is 1800 seconds which is 30 minutes by default.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    90
// The information in this field should be in seconds.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    91
// After this $EXPIRE you are automatically logged out from the system.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    92
$EXPIRE = 1800;
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    93
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    94
// $ALLOW_SOA_EDIT
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    95
// Allow users with level 1 to edit/delete SOA records?
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    96
$ALLOW_SOA_EDIT = 0;
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    97
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    98
// $ALLOW_NS_EDIT
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
    99
// Allow users with level 1 to edit/delete pre-set NS records for their domain.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   100
$ALLOW_NS_EDIT = 1;
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   101
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   102
// $DEFAULT_TTL
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   103
// Default TTL for records.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   104
// Default time to live for all records. This notation is in seconds.
23
4abaed69febd [feladat @ 70]
rejo
parents: 13
diff changeset
   105
$DEFAULT_TTL = 86400;      // (3600 seconds / 1 hour by default)
8
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   106
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   107
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   108
// $NAME_LEVEL_X
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   109
// These directives allow you to change the statusnames of users on the system.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   110
$NAME_LEVEL_1 = _('Normal user');
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   111
$NAME_LEVEL_5 = _('Administrator');
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   112
$NAME_LEVEL_10 = _('Administrator w/ user admin rights');
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   113
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   114
// Enable fancy records or not (http://doc.powerdns.com/fancy-records.html)? true/false
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   115
$FANCY_RECORDS = true;
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   116
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   117
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   118
/* ------------------------------------------ */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   119
/* No need to make changes below this line... */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   120
/* Which means, dont touch it		      */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   121
/* ------------------------------------------ */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   122
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   123
/* -------------------------------------------------------------------- */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   124
/* NO REALLY DONT TOUCH IT! Unless you _REALLY_ know what you are doing */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   125
/* -------------------------------------------------------------------- */
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   126
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   127
// $rtypes - array of possible record types
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   128
$rtypes = array('A', 'AAAA', 'CNAME', 'HINFO', 'MX', 'NAPTR', 'NS', 'PTR', 'SOA', 'TXT');
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   129
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   130
// If fancy records is enabled, extend this field.
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   131
if($FANCY_RECORDS)
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   132
{
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   133
	$rtypes[10] = 'URL';
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   134
	$rtypes[11] = 'MBOXFW';
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   135
}
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   136
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   137
// $template - array of records that will be applied when adding a new zone file
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   138
$template = array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   139
                array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   140
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   141
                                "name"          =>              "##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   142
                                "type"          =>              "SOA",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   143
                                "content"       =>              "$NS1 $HOSTMASTER 1",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   144
                                "ttl"           =>              "$DEFAULT_TTL",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   145
                                "prio"          =>              ""
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   146
                ),
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   147
                array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   148
                                "name"          =>              "##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   149
                                "type"          =>              "NS",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   150
                                "content"       =>              "$NS1",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   151
                                "ttl"           =>              "$DEFAULT_TTL",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   152
                                "prio"          =>              ""
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   153
                ),
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   154
                array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   155
                                "name"          =>              "##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   156
                                "type"          =>              "NS",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   157
                                "content"       =>              "$NS2",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   158
                                "ttl"           =>              "$DEFAULT_TTL",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   159
                                "prio"          =>              ""
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   160
                ),
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   161
                array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   162
                                "name"          =>              "www.##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   163
                                "type"          =>              "A",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   164
                                "content"       =>              "##WEBIP##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   165
                                "ttl"           =>              "$DEFAULT_TTL",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   166
                                "prio"          =>              ""
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   167
                ),
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   168
                array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   169
                                "name"          =>              "##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   170
                                "type"          =>              "A",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   171
                                "content"       =>              "##WEBIP##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   172
                                "ttl"           =>              "$DEFAULT_TTL",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   173
                                "prio"          =>              ""
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   174
                ),
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   175
                array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   176
                                "name"          =>              "mail.##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   177
                                "type"          =>              "A",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   178
                                "content"       =>              "##MAILIP##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   179
                                "ttl"           =>              "$DEFAULT_TTL",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   180
                                "prio"          =>              ""
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   181
                ),
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   182
                array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   183
                                "name"          =>              "localhost.##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   184
                                "type"          =>              "A",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   185
                                "content"       =>              "127.0.0.1",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   186
                                "ttl"           =>              "$DEFAULT_TTL",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   187
                                "prio"          =>              ""
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   188
                ),
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   189
                array(
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   190
                                "name"          =>              "##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   191
                                "type"          =>              "MX",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   192
                                "content"       =>              "mail.##DOMAIN##",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   193
                                "ttl"           =>              "$DEFAULT_TTL",
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   194
                                "prio"          =>              "10"
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   195
                )
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   196
);
47dd15d8bb8c [feladat @ 20]
rejo
parents:
diff changeset
   197
?>