8
+ − 1
<?php
+ − 2
+ − 3
/* Edit all fields below here to your information */
+ − 4
+ − 5
/* MySQL Configuration */
+ − 6
+ − 7
//
+ − 8
// Host we should connect to.
+ − 9
// This could be for example "localhost" or a sock file
+ − 10
$dbhost = 'localhost' ;
+ − 11
+ − 12
//
+ − 13
// Your user with SELECT/INSERT/UPDATE/DELETE/CREATE access to $dbdatabase
+ − 14
$dbuser = '' ;
+ − 15
+ − 16
//
10
+ − 17
// Your password, the password for $dbuser
8
+ − 18
$dbpass = '' ;
+ − 19
+ − 20
// Your database, the database you want to use for PowerDNS (or are already using)
+ − 21
$dbdatabase = '' ;
+ − 22
+ − 23
// The dsn you want to use (which database you want to use)
+ − 24
// Tested is mysql and pgsql default is mysql
+ − 25
$dbdsntype = 'mysql' ;
+ − 26
+ − 27
/* URI Configuration */
+ − 28
+ − 29
// $BASE_URL
+ − 30
// This will be the main URI you will use to connect to PowerAdmin.
+ − 31
// For instance: "http://poweradmin.sjeemz.nl"
+ − 32
$BASE_URL = "http://" ;
+ − 33
+ − 34
// $BASE_PATH
+ − 35
// If PowerAdmin is in a subdir. Specify this here
+ − 36
// For instance: "/admin/"
+ − 37
$BASE_PATH = "/admin/" ;
+ − 38
13
+ − 39
// $LANG
+ − 40
// Which language should be used for the web interface?
+ − 41
$LANG = "en_EN" ;
+ − 42
+ − 43
// $STYLE
+ − 44
// Define skin of web frontend. This should be the basename of the CSS file that
+ − 45
// will be included, it will be used like: "style/$STYLE.css.php".
+ − 46
$STYLE = "example" ;
8
+ − 47
+ − 48
/* DNS Record information */
+ − 49
+ − 50
+ − 51
// $HOSTMASTER
+ − 52
// The email address of the hostmaster you want to be mailed.
+ − 53
// For instance: "hostmaster@sjeemz.nl"
+ − 54
$HOSTMASTER = "" ;
+ − 55
+ − 56
// $NS1
+ − 57
// Your first nameserver
+ − 58
// Should be a domainname! Not an IP.
+ − 59
$NS1 = "" ;
+ − 60
+ − 61
// $NS2
+ − 62
// Your second nameserver.
+ − 63
// If you dont have a second nameserver, fill in the same value as $NS1
+ − 64
$NS2 = "" ;
+ − 65
+ − 66
/* You dont have to edit these fields. Change them if you want. */
+ − 67
+ − 68
+ − 69
// $EXPIRE
+ − 70
// Session timeout in seconds. This is 1800 seconds which is 30 minutes by default.
+ − 71
// The information in this field should be in seconds.
+ − 72
// After this $EXPIRE you are automatically logged out from the system.
+ − 73
$EXPIRE = 1800 ;
+ − 74
+ − 75
// $ALLOW_SOA_EDIT
+ − 76
// Allow users with level 1 to edit/delete SOA records?
+ − 77
$ALLOW_SOA_EDIT = 0 ;
+ − 78
+ − 79
// $ALLOW_NS_EDIT
+ − 80
// Allow users with level 1 to edit/delete pre-set NS records for their domain.
+ − 81
$ALLOW_NS_EDIT = 1 ;
+ − 82
+ − 83
// $DEFAULT_TTL
+ − 84
// Default TTL for records.
+ − 85
// Default time to live for all records. This notation is in seconds.
+ − 86
$DEFAULT_TTL = 3600 ; // (3600 seconds / 1 hour by default)
+ − 87
+ − 88
+ − 89
// $NAME_LEVEL_X
+ − 90
// These directives allow you to change the statusnames of users on the system.
+ − 91
$NAME_LEVEL_1 = _ ( 'Normal user' );
+ − 92
$NAME_LEVEL_5 = _ ( 'Administrator' );
+ − 93
$NAME_LEVEL_10 = _ ( 'Administrator w/ user admin rights' );
+ − 94
+ − 95
// Enable fancy records or not (http://doc.powerdns.com/fancy-records.html)? true/false
+ − 96
$FANCY_RECORDS = true ;
+ − 97
+ − 98
+ − 99
/* ------------------------------------------ */
+ − 100
/* No need to make changes below this line... */
+ − 101
/* Which means, dont touch it */
+ − 102
/* ------------------------------------------ */
+ − 103
+ − 104
/* -------------------------------------------------------------------- */
+ − 105
/* NO REALLY DONT TOUCH IT! Unless you _REALLY_ know what you are doing */
+ − 106
/* -------------------------------------------------------------------- */
+ − 107
+ − 108
// $rtypes - array of possible record types
+ − 109
$rtypes = array ( 'A' , 'AAAA' , 'CNAME' , 'HINFO' , 'MX' , 'NAPTR' , 'NS' , 'PTR' , 'SOA' , 'TXT' );
+ − 110
+ − 111
// If fancy records is enabled, extend this field.
+ − 112
if ( $FANCY_RECORDS )
+ − 113
{
+ − 114
$rtypes [ 10 ] = 'URL' ;
+ − 115
$rtypes [ 11 ] = 'MBOXFW' ;
+ − 116
}
+ − 117
+ − 118
// $template - array of records that will be applied when adding a new zone file
+ − 119
$template = array (
+ − 120
array (
+ − 121
+ − 122
"name" => "##DOMAIN##" ,
+ − 123
"type" => "SOA" ,
+ − 124
"content" => " $NS1 $HOSTMASTER 1" ,
+ − 125
"ttl" => " $DEFAULT_TTL " ,
+ − 126
"prio" => ""
+ − 127
),
+ − 128
array (
+ − 129
"name" => "##DOMAIN##" ,
+ − 130
"type" => "NS" ,
+ − 131
"content" => " $NS1 " ,
+ − 132
"ttl" => " $DEFAULT_TTL " ,
+ − 133
"prio" => ""
+ − 134
),
+ − 135
array (
+ − 136
"name" => "##DOMAIN##" ,
+ − 137
"type" => "NS" ,
+ − 138
"content" => " $NS2 " ,
+ − 139
"ttl" => " $DEFAULT_TTL " ,
+ − 140
"prio" => ""
+ − 141
),
+ − 142
array (
+ − 143
"name" => "www.##DOMAIN##" ,
+ − 144
"type" => "A" ,
+ − 145
"content" => "##WEBIP##" ,
+ − 146
"ttl" => " $DEFAULT_TTL " ,
+ − 147
"prio" => ""
+ − 148
),
+ − 149
array (
+ − 150
"name" => "##DOMAIN##" ,
+ − 151
"type" => "A" ,
+ − 152
"content" => "##WEBIP##" ,
+ − 153
"ttl" => " $DEFAULT_TTL " ,
+ − 154
"prio" => ""
+ − 155
),
+ − 156
array (
+ − 157
"name" => "mail.##DOMAIN##" ,
+ − 158
"type" => "A" ,
+ − 159
"content" => "##MAILIP##" ,
+ − 160
"ttl" => " $DEFAULT_TTL " ,
+ − 161
"prio" => ""
+ − 162
),
+ − 163
array (
+ − 164
"name" => "localhost.##DOMAIN##" ,
+ − 165
"type" => "A" ,
+ − 166
"content" => "127.0.0.1" ,
+ − 167
"ttl" => " $DEFAULT_TTL " ,
+ − 168
"prio" => ""
+ − 169
),
+ − 170
array (
+ − 171
"name" => "##DOMAIN##" ,
+ − 172
"type" => "MX" ,
+ − 173
"content" => "mail.##DOMAIN##" ,
+ − 174
"ttl" => " $DEFAULT_TTL " ,
+ − 175
"prio" => "10"
+ − 176
)
+ − 177
);
+ − 178
?>