Alternc  latest
Alternc logiel libre pour l'hébergement
adm_db_servers.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  * Show the list of MySQL db servers that this AlternC instance can use
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 
28 include("head.php");
29 
30 if (!$admin->enabled) {
31  $msg->raise("ERROR", "admin", _("This page is restricted to authorized staff"));
32  echo $msg->msg_html_all();
33  exit();
34 }
35 
36 ?>
37 <h3><?php __("List of the databases servers"); ?></h3>
38 <hr/>
39 <?php
40 
41 $lst_db_servers = $mysql->list_db_servers();
42 
43 echo "<p>";
44 __("Here the list of the available databases servers.");
45 echo "</p>";
46 
47 ?>
48 
49 <table class="tlist">
50  <tr>
51  <th><?php __("ID"); ?></th>
52  <th><?php __("Name"); ?></th>
53  <th><?php __("Hostname"); ?></th>
54  <th><?php __("Login"); ?></th>
55  <th><?php __("Client"); ?></th>
56  <th><?php __("Users"); ?></th>
57  </tr>
58 <?php
59 foreach ( $lst_db_servers as $l) {
60  echo "<tr class='lst'>"; ?>
61  <td><?php echo $l['id']; ?></td>
62  <td><?php echo $l['name']; ?></td>
63  <td><?php echo $l['host']; ?></td>
64  <td><?php echo $l['login']; ?></td>
65  <td><?php echo $l['client']; ?></td>
66  <td><?php echo $l['nb_users']; ?></td>
67  </tr>
68 <?php } //foreach lst_db_servers ?>
69 </table>
70 
71 <?php
72 echo "<p>";
73 __("To add a database server, do an INSERT into the db_servers table");
74 echo "</p>";
75 echo "<p>";
76 __("To update the list of the server on the PhpMyAdmin login page, launch alternc.install");
77 echo "</p>";
78 
79 include_once('foot.php');
80 ?>
$lst_db_servers
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
__($str)
Definition: functions.php:404