Alternc  latest
Alternc logiel libre pour l'hébergement
adm_doms.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  LICENSE
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License (GPL)
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  To read the license please visit http://www.gnu.org/copyleft/gpl.html
17  ----------------------------------------------------------------------
18 */
19 
20 /**
21  * List domains on the server and their DNS / Vhost compatibility
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 
28 if (!$admin->enabled) {
29  $msg->raise("ERROR", "admin", _("This page is restricted to authorized staff"));
30  echo $msg->msg_html_all();
31  exit();
32 }
33 
34 include_once ("head.php");
35 
36 ?>
37 <h3><?php __("Manage installed domains"); ?></h3>
38 <?php
39 echo $msg->msg_html_all();
40 
41 $fields = array (
42  "force" => array ("get", "integer", "0"),
43 );
45 
46 // List the domains. If the first parameter is true, also check their DNS & other IPs actual parameters.
47 // If the second parameter is true, check the domains whatever the dis cache is.
48 
49 $forcecheck=$force; // retrocompatibility
50 $c=$admin->dom_list(true,$forcecheck);
51 
52 ?>
53 <p>
54 <?php __("Here is the list of the domains installed on this server. You can remove a domain if it does not exist or does not point to our server anymore. You can also set the 'Lock' flag on a domain so that the user will not be able to change any DNS parameter or delete this domain from his account."); ?>
55 </p>
56 <p>
57 <?php __("The domain OK column are green when the domain exists in the worldwide registry and has a proper NS,MX and IP depending on its configuration. It is red if we have serious doubts about its NS, MX or IP configuration. Contact the user of this domain or a system administrator."); ?>
58 </p>
59 <p>
60 <?php __("If you want to force the check of NS, MX, IP on domains, click the link"); ?> <a href="adm_doms.php?force=1"><?php __("Show domain list with refreshed checked NS, MX, IP information"); ?></a>
61 </p>
62 <form method="post" action="adm_dodom.php" name="main" id="main">
63  <?php csrf_get(); ?>
64 <table class="tlist" id="dom_list_table">
65 <thead>
66  <tr><th></th><th><?php __("Action"); ?></th><th><?php __("Domain"); ?></th><th><?php __("Creator"); ?></th><th><?php __("Connect as"); ?></th><th><?php __("OK?"); ?></th><th><?php __("Status"); ?></th></tr>
67 </thead>
68 <tbody>
69 <?php
70 for($i=0;$i<count($c);$i++) {
71 ?>
72 
73 <tr class="lst">
74  <td><?php if ($c[$i]["noerase"]) {
75  echo "<img src=\"icon/encrypted.png\" width=\"16\" height=\"16\" alt=\""._("Locked Domain")."\" />";
76  } ?></td>
77 <td><div class="ina"><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i]["domaine"]); ?>"><?php
78  if ($c[$i]["noerase"]) __("Unlock"); else __("Lock"); ?></a></div></td>
79 <td><a href="http://<?php echo $c[$i]["domaine"]; ?>" target="_blank"><?php echo $c[$i]["domaine"]; ?></a></td>
80 <td><?php echo $c[$i]["login"]; ?></td>
81 <td>
82 <?php if($admin->checkcreator($c[$i]['uid'])) {
83  ?>
84  <div class="ina"><a href="adm_login.php?id=<?php echo $c[$i]["uid"];?>"><?php __("Connect as"); ?></a></div>
85  <?php } ?>
86 </td>
87 <td style="background: <?php
88  if ($c[$i]["errno"]==0) {
89  echo "green";
90  } else {
91  echo "red";
92  }
93  ?>">&nbsp;
94 </td>
95 <td><?php echo nl2br($c[$i]["errstr"]); ?></td>
96 </tr>
97 <?php
98 }
99 ?>
100 </tbody>
101 </table>
102 </form>
103 <script type="text/javascript">
104 
105 $(document).ready(function()
106  {
107  $("#dom_list_table").tablesorter();
108  }
109 );
110 </script>
111 <?php include_once("foot.php"); ?>
exit
Definition: adm_doadd.php:70
$forcecheck
Definition: adm_doms.php:49
$fields
Definition: adm_doms.php:41
$c
Definition: adm_doms.php:50
$msg
Definition: bootstrap.php:75
__($str)
Definition: functions.php:404
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
Definition: functions.php:688
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
Definition: functions.php:1159
$i