30 require_once(
"../class/config.php");
31 include_once(
"head.php");
34 "domain" => array (
"request",
"string", (empty(
$domain)?
"":
$domain) ),
35 "sub" => array (
"request",
"string", (empty(
$sub)?
"":
$sub) ),
40 if (!
$r=
$dom->get_domain_all($domain)) {
42 echo
"<p class=\"alert alert-danger\">$error</p>";
47 echo
"<p class=\"alert alert-danger\">$error</p>";
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 ?
"); ?>") ) {
91 <h3><img src=
"images/dom.png" alt=
"" /> <?php printf(_(
"Manage %s"),$domain); ?></h3>
95 if (
$r[
'dns_action']==
'UPDATE') {?>
96 <p
class=
"alert alert-info"><?php
__(
"This domain have some DNS change pending. Please wait."); ?></p>
98 } elseif (
$r[
'dns_action']==
'DELETE') {?>
99 <p
class=
"alert alert-warning"><?php printf(_(
"You requested deletion of domain %s."), $domain);?></p>
107 include_once(
"foot.php");
111 if (! empty(
$r[
'dns_result']) &&
$r[
'dns_result'] !=
'0') {
112 echo
'<p class="alert alert-warning">';
__(
$r[
'dns_result']); echo
'</p>';
121 <li
class=
"edit"><a href=
"#tabsdom-editsub"><?php
__(
"Edit subdomains");?></a></li>
122 <li
class=
"add"><a href=
"#tabsdom-addsub"><?php
__(
"Add subdomains");?></a></li>
123 <li
class=
"settings"><a href=
"#tabsdom-params"><?php
__(
"Settings");?></a></li>
124 <?php
if (
$r[
"dns"] ) { ?>
125 <li
class=
"view"><a href=
"#tabsdom-view" onClick=
"update_dns_content();"><?php
__(
"View");?></a></li>
127 <li
class=
"delete"><a href=
"#tabsdom-delete"><?php
__(
"Delete");?></a></li>
131 <div
id=
"tabsdom-editsub">
132 <h3><?php printf(_(
"Editing subdomains of %s"),$domain); ?></h3>
138 echo
'<p class="alert alert-danger">';
144 <table
class=
"tlist" id=
"dom_edit_table">
146 <tr><th colspan=
"2"> </th><th><?php
__(
"Subdomain"); ?></th><th><?php
__(
"Type");?></th><th><?php
__(
"Status")?></th><th></th></tr>
151 $disabled_class=in_array(strtoupper($r[
'sub'][
$i][
'enable']),array(
'DISABLED',
'DISABLE') )?
'sub-disabled':
'';
154 <tr
class=
"lst" data-fqdn=
"<?php echo $r["sub
"][$i]["fqdn
"]; ?>">
155 <?php
if ( $r[
'sub'][$i][
'web_action'] ==
'DELETE') { echo
"<td colspan='2' />"; }
else { ?>
157 <?php
if (!(!
$isinvited &&
$dt[strtolower($r[
"sub"][$i][
"type"])][
"enable"] !=
"ALL" )) { ?>
161 <div
class=
"ina edit"><a href=
"dom_subedit.php?sub_domain_id=<?php echo urlencode($r["sub
"][$i]["id"]) ?>"><?php
__(
"Edit"); ?></a></div><?php
166 </td><td
class=
"center">
167 <?php
if (!(!
$isinvited &&
$dt[strtolower($r[
"sub"][$i][
"type"])][
"enable"] !=
"ALL" )) { ?>
168 <div
class=
"ina delete"><a href=
"dom_subdel.php?sub_domain_id=<?php echo urlencode($r["sub
"][$i]["id"]) ?>"><?php
__(
"Delete"); ?></a></div>
172 <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>
173 <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"); } ?>
176 if ( @
$dt[$r[
"sub"][$i][
'type']][
'target'] ===
'DIRECTORY') {
177 $iidir=$r[
"sub"][
$i][
"dest"];
178 if ($iidir==
'') $iidir=
'/';
179 echo
'<br /><a href="bro_main.php?R='.urlencode($iidir).
'">'.htmlspecialchars($iidir).
'</a>';
180 if ( ! file_exists($bro->convertabsolute($iidir,0))) { echo
" <span class=\"alerte\">"._(
"Directory not found").
"</span>"; }
182 if ($r[
"sub"][$i][
'type']) echo
"<br />".htmlspecialchars($r[
"sub"][$i][
"dest"]);
186 if (!(!
$isinvited &&
$dt[strtolower($r[
"sub"][$i][
"type"])][
"enable"] !=
"ALL" )) {
187 if ( $r[
'sub'][$i][
'web_action'] !=
'DELETE') {
188 switch ($r[
'sub'][$i][
'enable']) {
191 echo
"<br/><a href='dom_substatus.php?sub_id=".urlencode($r[
"sub"][$i][
"id"]).
"&status=disable'>";
__(
"Disable");echo
"</a>";
194 __(
"Activation pending");
198 echo
"<br/><a href='dom_substatus.php?sub_id=".urlencode($r[
"sub"][$i][
"id"]).
"&status=enable'>";
__(
"Enable");echo
"</a>";
201 __(
"Desactivation pending");
207 switch ($r[
'sub'][$i][
'web_action']) {
209 __(
"Update pending");
212 __(
"Deletion pending");
225 echo
"<script type='text/javascript'>$(\"tr[data-fqdn='".$pr.
"']\").addClass('alert-danger-tr');</script>\n";
231 <div
id=
"tabsdom-addsub">
232 <h3><?php printf(_(
"Add a subdomains to %s"),$domain); ?></h3>
235 require_once(
'dom_edit.inc.php');
239 <?php
$mem->show_help(
"edit_domain"); ?>
240 <!-- *****************************************
241 modification des parametres dns
244 if (!$r[
'noerase']) {
248 <div
id=
"tabsdom-params">
249 <h3><?php
__(
"DNS & Email parameters"); ?></h3>
250 <form action=
"dom_editdns.php?domain=<?php echo urlencode($r["name
"]) ?>" method=
"post" id=
"fdns" name=
"fdns" onSubmit=
"return destruction_alert();">
252 <table
class=
"tlist2">
254 <td><?php
__(
"Manage the DNS on the server ?"); ?></td>
256 <input type=
"radio" id=
"yesdns" class=
"inc" name=
"dns" value=
"1"<?php
cbox($r[
"dns"]); ?> /> <label
for=
"yesdns"><?php
__(
"Yes"); ?></label>
257 </td><td><input type=
"radio" id=
"nodns" class=
"inc" name=
"dns" value=
"0"<?php
cbox(!$r[
"dns"]); ?> /> <label
for=
"nodns"><?php
__(
"No"); ?></label>
262 <?php
if ($r[
"dns"]) { ?>
263 <table
class=
"tlist2">
265 <td><?php
__(
"Define TTL for the zone records"); ?> : </td>
267 <input type=
"text" id=
"ttldns" class=
"inc" name=
"ttl" size=
"6" value=
"<?php echo ($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>
273 <table
class=
"tlist2">
276 <?php
__(
"Manage the Emails Addresses of this domain on the server?"); ?>
279 <input type=
"radio" id=
"yesemail" class=
"inc" name=
"email" value=
"1"<?php
cbox($r[
"mail"]); ?> /> <label
for=
"yesemail"><?php
__(
"Yes"); ?></label>
280 </td><td><input type=
"radio" id=
"noemail" class=
"inc" name=
"email" value=
"0"<?php
cbox(!$r[
"mail"]); ?> /> <label
for=
"noemail"><?php
__(
"No"); ?></label>
284 <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>
285 <input type=
"submit" class=
"inb ok" name=
"submit" value=
"<?php __("Submit the changes
"); ?>" />
290 <?php
if ( $r[
"dns"] ) { ?>
291 <div
id=
"tabsdom-view">
293 <?php
__(
"Here is the actual DNS zone running on the AlternC server. If you just made some changes, you have to wait for it."); ?>
296 <pre><span
class=
"petit" id=
"divdumpdns">
297 <a target=
"_blank" href=
"dom_dnsdump.php?domain=<?php echo urlencode($domain) ?>"><?php
__(
"Click here to view the dump");?></a>
300 <a href=
"javascript:force_update_dns_content();"><?php
__(
"Refresh");?></a>
305 <div
id=
"tabsdom-delete">
306 <h3><?php
__(
"Domain removal"); ?></h3>
307 <?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 />
308 <form action=
"dom_dodel.php?domain=<?php echo urlencode($domain) ?>" method=
"post">
310 <input type=
"submit" class=
"inb delete" name=
"detruire" value=
"<?php printf(_("Delete %s from
this server
"),$domain); ?>" />
313 </div> <!-- tabsdom-
delete -->
314 </div> <!-- tabsdom -->
316 <script type=
"text/javascript">
320 $(
"#tabsdom").tabs();
329 url:
"dom_dnsdump.php?domain=<?php echo urlencode($domain)?>",
330 }).done(
function( html ) {
331 $(
"#divdumpdns").html(html);
338 $(
"#divdumpdns").html(
'In progress...');
342 $(document).ready(
function()
344 $(
"#dom_edit_table").tablesorter();
349 <?php include_once(
"foot.php"); ?>