26 require_once(
"../class/config.php");
27 include_once(
"head.php");
30 "domain" => array (
"request",
"string", (empty($domain)?
"":$domain) ),
31 "sub" => array (
"request",
"string", (empty($sub)?
"":$sub) ),
36 if (!$r=$dom->get_domain_all($domain)) {
38 echo $msg->msg_html_all();
44 if (isset($_GET[
"msg"])) {
45 $msg->raise(
"INFO",
"dom",$_GET[
"msg"]);
48 <h3><i
class=
"fas fa-globe-africa"></i> <?php printf(_(
"Manage %s"),$domain); ?></h3>
50 echo $msg->msg_html_all();
52 <script type=
"text/javascript">
54 alert(
'This function seems unused. If you see this message, please let us know.');
56 if (document.forms[
"fdns"].mx.disabled!=
null)
57 document.forms[
"fdns"].mx.disabled=
false;
58 if (document.forms[
"fdns"].emailon.disabled!=
null)
59 document.forms[
"fdns"].emailon.disabled=
true;
60 if (document.forms[
"fdns"].emailoff.disabled!=
null)
61 document.forms[
"fdns"].emailoff.disabled=
true;
64 alert(
'This function seems unused. If you see this message, please let us know.');
66 if (document.forms[
"fdns"].mx.disabled!=
null)
67 document.forms[
"fdns"].mx.disabled=
true;
68 if (document.forms[
"fdns"].emailon.disabled!=
null)
69 document.forms[
"fdns"].emailon.disabled=
false;
70 if (document.forms[
"fdns"].emailoff.disabled!=
null)
71 document.forms[
"fdns"].emailoff.disabled=
false;
74 function destruction_alert() {
76 if (<?php echo (
int)$r[
"dns"]; ?>!=1) {
79 if (document.forms[
"fdns"].email[1].checked) {
80 if ( confirm(
"<?php __("Are you sure you want to
do this? This will DELETE ALL the mailboxes, messages and aliases on
this domain ?
"); ?>") ) {
93 if ($r[
'dns_action']==
'UPDATE') {?>
94 <p
class=
"alert alert-info"><?php __(
"This domain have some DNS change pending. Please wait."); ?></p>
96 } elseif ($r[
'dns_action']==
'DELETE') {?>
97 <p
class=
"alert alert-warning"><?php printf(_(
"You requested deletion of domain %s."), $domain);?></p>
105 include_once(
"foot.php");
109 if (! empty($r[
'dns_result']) && $r[
'dns_result'] !=
'0') {
110 if ($r[
'dns_result'] == 1) $r[
'dns_result'] =_(
"DNS zone is locked, changes will be ignored");
111 echo
'<p class="alert alert-warning">'; __($r[
'dns_result']); echo
'</p>';
120 <li
class=
"edit"><a href=
"#tabsdom-editsub"><?php __(
"Edit subdomains");?></a></li>
121 <li
class=
"add"><a href=
"#tabsdom-addsub"><?php __(
"Add subdomains");?></a></li>
122 <li
class=
"settings"><a href=
"#tabsdom-params"><?php __(
"Settings");?></a></li>
123 <?php
if ( $r[
"dns"] ) { ?>
124 <li
class=
"view"><a href=
"#tabsdom-view" onClick=
"update_dns_content();"><?php __(
"View");?></a></li>
126 <li
class=
"delete"><a href=
"#tabsdom-delete"><?php __(
"Delete");?></a></li>
130 <div
id=
"tabsdom-editsub">
131 <h3><?php __(
"Main subdomains"); ?></h3>
133 $dt=$dom->domains_type_lst();
137 echo
'<p class="alert alert-danger">';
138 foreach (
$problems as $p) echo $p.
"</br>";
143 <table
class=
"tlist" id=
"dom_edit_table">
145 <tr><th colspan=
"2"> </th><th><?php __(
"Subdomain"); ?></th><th><?php __(
"HTTPS"); ?></th><th><?php __(
"Type");?></th><th><?php __(
"Status")?></th><th></th></tr>
150 for($i=0;$i<$r[
"nsub"];$i++) {
151 if ($r[
"sub"][$i][
"advanced"] && !$hasadvanced) {
155 <h3 style=
"padding: 40px 0 0 0"><?php __(
"Advanced subdomains"); ?></h3>
156 <p
class=
"alert alert-warning"><?php __(
"The following entries are advanced ones, edit them at your own risks."); ?></p>
157 <table
class=
"tlist" id=
"dom_edit_table">
159 <tr><th colspan=
"2"> </th><th><?php __(
"Subdomain"); ?></th><th><?php __(
"HTTPS"); ?></th><th><?php __(
"Type");?></th><th><?php __(
"Status")?></th><th></th></tr>
165 $disabled_class=in_array(strtoupper($r[
'sub'][$i][
'enable']),array(
'DISABLED',
'DISABLE') )?
'sub-disabled':
'';
167 <tr
class=
"lst" data-fqdn=
"<?php echo $r["sub
"][$i]["fqdn
"]; ?>">
168 <?php
if ( $r[
'sub'][$i][
'web_action'] ==
'DELETE') { echo
"<td colspan='2' />"; }
else { ?>
170 <?php
if (!(!$isinvited &&
$dt[strtolower($r[
"sub"][$i][
"type"])][
"enable"] !=
"ALL" )) { ?>
171 <?php
if ( isset(
$problems[$r[
"sub"][$i][
"fqdn"]])) {
174 <div
class=
"ina edit"><a href=
"dom_subedit.php?sub_domain_id=<?php echo urlencode($r["sub
"][$i]["id"]) ?>"><?php __(
"Edit"); ?></a></div><?php
179 </td><td
class=
"center">
180 <?php
if (!(!$isinvited &&
$dt[strtolower($r[
"sub"][$i][
"type"])][
"enable"] !=
"ALL" )) { ?>
181 <div
class=
"ina delete"><a href=
"dom_subdel.php?sub_domain_id=<?php echo urlencode($r["sub
"][$i]["id"]) ?>"><?php __(
"Delete"); ?></a></div>
185 <td><div
class=
"retour-auto <?php echo $disabled_class; ?>"><a href=
"http://<?php echo $r["sub
"][$i]["fqdn
"] ?>" target=
"_blank"><?php echo $r[
"sub"][$i][
"fqdn"]; ?></a></div></td>
188 if (!$r[
"sub"][$i][
"only_dns"]) {
189 switch ($r[
"sub"][$i][
"https"]) {
197 __(
"HTTP and HTTPS");
200 if ($r[
'sub'][$i][
'has_https_option']) {
204 __(
'Not applicable');
211 <td><div
class=
"retour-auto <?php echo $disabled_class; ?>"><?php
if ($r[
'sub'][$i][
'type_desc']) { __($r[
'sub'][$i][
'type_desc']); }
else { echo __(
"ERROR, please check your server setup"); } ?>
214 if ( @
$dt[$r[
"sub"][$i][
'type']][
'target'] ===
'DIRECTORY') {
215 $iidir=$r[
"sub"][$i][
"dest"];
216 if ($iidir==
'') $iidir=
'/';
217 echo
'<br /><a href="bro_main.php?R='.urlencode($iidir).
'">'.htmlspecialchars($iidir).
'</a>';
218 if ( ! file_exists($bro->convertabsolute($iidir,0))) { echo
" <span class=\"alerte\">"._(
"Directory not found").
"</span>"; }
220 if ($r[
"sub"][$i][
'type']) echo
"<br />".htmlspecialchars($r[
"sub"][$i][
"dest"]);
224 if (!(!$isinvited &&
$dt[strtolower($r[
"sub"][$i][
"type"])][
"enable"] !=
"ALL" )) {
225 if ( $r[
'sub'][$i][
'web_action'] !=
'DELETE') {
226 switch ($r[
'sub'][$i][
'enable']) {
229 echo
"<br/><a href='dom_substatus.php?sub_id=".urlencode($r[
"sub"][$i][
"id"]).
"&status=disable'>";__(
"Disable");echo
"</a>";
232 __(
"Activation pending");
236 echo
"<br/><a href='dom_substatus.php?sub_id=".urlencode($r[
"sub"][$i][
"id"]).
"&status=enable'>";__(
"Enable");echo
"</a>";
239 __(
"Desactivation pending");
245 switch ($r[
'sub'][$i][
'web_action']) {
247 __(
"Update pending");
250 __(
"Deletion pending");
263 echo
"<script type='text/javascript'>$(\"tr[data-fqdn='".$pr.
"']\").addClass('alert-danger-tr');</script>\n";
270 <a
class=
"inb ssl" href=
"dom_sslpref.php?domain=<?php ehe($domain); ?>"><?php __(
"HTTPS Preferences for this domain");?></a>
274 </div> <!-- tabsdom-editsub -->
277 <div
id=
"tabsdom-addsub">
278 <h3><?php printf(_(
"Add a subdomain to %s"),$domain); ?></h3>
281 require_once(
'dom_edit.inc.php');
282 sub_domains_edit($domain);
285 <?php $mem->show_help(
"edit_domain"); ?>
286 <!-- DNS SETTINGS -->
290 if (!$r[
'noerase']) {
293 <div
id=
"tabsdom-params">
294 <h3><?php __(
"DNS & Email parameters"); ?></h3>
295 <form action=
"dom_editdns.php?domain=<?php echo urlencode($r["name
"]) ?>" method=
"post" id=
"fdns" name=
"fdns" onSubmit=
"return destruction_alert();">
297 <table
class=
"tlist2">
299 <td><?php __(
"Manage the DNS on the server ?"); ?></td>
301 <input type=
"radio" id=
"yesdns" class=
"inc" name=
"dns" value=
"1"<?php cbox($r[
"dns"]); ?> /> <label
for=
"yesdns"><?php __(
"Yes"); ?></label>
302 </td><td><input type=
"radio" id=
"nodns" class=
"inc" name=
"dns" value=
"0"<?php cbox(!$r[
"dns"]); ?> /> <label
for=
"nodns"><?php __(
"No"); ?></label>
307 <?php
if ($r[
"dns"]) { ?>
308 <table
class=
"tlist2">
310 <td><?php __(
"Define TTL for the zone records"); ?> : </td>
312 <input type=
"text" id=
"ttldns" class=
"inc" name=
"ttl" size=
"6" value=
"<?php ehe($r["zonettl
"]); ?>" /> <?php __(
"seconds"); ?> <small><i><?php __(
"Warning: a low TTL can be problematic. It is recommended not to use a lower TTL than 3600 seconds."); ?></i></small>
318 <table
class=
"tlist2">
321 <?php __(
"Manage the Emails Addresses of this domain on the server?"); ?>
324 <input type=
"radio" id=
"yesemail" class=
"inc" name=
"email" value=
"1"<?php cbox($r[
"mail"]); ?> /> <label
for=
"yesemail"><?php __(
"Yes"); ?></label>
325 </td><td><input type=
"radio" id=
"noemail" class=
"inc" name=
"email" value=
"0"<?php cbox(!$r[
"mail"]); ?> /> <label
for=
"noemail"><?php __(
"No"); ?></label>
329 <p
class=
"alert alert-warning"> <?php __(
"Warning: If you set this to 'no', all your email accounts and aliases on this domain will be immediately deleted."); ?></p>
330 <input type=
"submit" class=
"inb ok" name=
"submit" value=
"<?php __("Submit the changes
"); ?>" />
335 <div
id=
"tabsdom-params">
336 <p
class=
"alert alert-info"><?php __(
"This domain is locked, only a server administrator can unlock it."); ?></p>
340 <?php
if ( $r[
"dns"] ) { ?>
341 <div
id=
"tabsdom-view">
343 <?php __(
"Here is the actual DNS zone running on the AlternC server. If you just made some changes, you have to wait for it."); ?>
347 <pre><span
class=
"petit" id=
"divdumpdns">
348 <a target=
"_blank" href=
"dom_dnsdump.php?domain=<?php echo urlencode($domain) ?>"><?php __(
"Click here to view the dump");?></a>
354 <p><a
class=
"inb" href=
"javascript:force_update_dns_content();"><?php __(
"Refresh");?></a></p>
359 if (!$r[
'noerase']) {
362 <div
id=
"tabsdom-delete">
363 <h3><?php __(
"Domain removal"); ?></h3>
364 <?php printf(_(
"If you want to destroy the domain %s, click on the button below. Warning: this also deletes all FTP accounts, email, mailing lists associated with the domain and subdomains."),$domain); ?><br />
365 <form action=
"dom_dodel.php?domain=<?php echo urlencode($domain) ?>" method=
"post">
368 <input type=
"submit" class=
"inb delete" name=
"detruire" value=
"<?php printf(_("Delete %s from
this server
"),$domain); ?>" />
371 </div> <!-- tabsdom-
delete -->
374 <div
id=
"tabsdom-delete">
375 <p
class=
"alert alert-info"><?php __(
"This domain is locked, only a server administrator can unlock it."); ?></p>
380 <div
id=
"tabsdom-ssl">
383 </div> <!-- tabsdom-ssl -->
385 </div> <!-- tabsdom -->
386 <script type=
"text/javascript">
389 $(
"#tabsdom").tabs();
393 function update_dns_content(){
394 if ( get_dns_content == 1 ) {
398 url:
"dom_dnsdump.php?domain=<?php echo urlencode($domain)?>",
399 }).done(
function( html ) {
400 $(
"#divdumpdns").html(html);
407 url:
"dom_ssl.inc.php?domain=<?php echo urlencode($domain)?>",
408 }).done(
function( html ) {
409 $(
"#sslpref").html(html);
415 $(
"#divdumpdns").html(
'In progress...');
416 update_dns_content();
419 $(document).ready(
function()
421 $(
"#dom_edit_table").tablesorter();
426 <?php include_once(
"foot.php"); ?>
$fields
Change a DOMAIN settings.
force_update_dns_content()