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