Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
sql_getparam.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: sql_getparam.php,v 1.4 2005/05/27 20:10:18 arnaud-lb Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13 
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18 
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Benjamin Sonntag
27  Purpose of file: Return the current SQL settings
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 include_once("head.php");
32 
33 $fields = array (
34  "dbname" => array ("request", "string", ""),
35 );
37 if (!$r=$mysql->get_dblist()) {
38  $error=$err->errstr();
39 }
40 
41 
42 
43 ?>
44 <h3><?php __("MySQL Databases"); ?></h3>
45 <hr id="topbar"/>
46 <br />
47 <?php
48  if (isset($error) && $error) {
49  echo "<p class=\"alert alert-danger\">$error</p><p>&nbsp;</p>";
50  }
51 $r=$mysql->get_defaultsparam($dbname);
52 ?>
53 <p><?php __("Your current connection settings are"); ?> : </p>
54 <table class="tedit">
55  <tr>
56  <th colspan="2" style='text-align:center;'><?php echo '<h1>'.$mysql->dbus->HumanHostname.'</h1>'; ?></th>
57  </tr>
58  <tr>
59  <th><?php __("Mysql Server"); ?></th>
60  <td><code><?php echo $mysql->dbus->Host; ?></code></td>
61  </tr>
62  <tr>
63  <th><?php __("Database"); ?></th>
64  <td><code><?php echo $dbname; ?></code></td>
65  </tr>
66 <?php
67 if(isset($r['user'])){
68 ?>
69  <tr>
70  <th><?php __("Login"); ?></th>
71  <td><code><?php echo $r['user']; ?></code></td>
72  </tr>
73  <tr>
74  <th><?php __("Password"); ?></th>
75  <td><code><?php echo $r['password']; ?></code></td>
76  </tr>
77  <tr>
78  <td colspan="2" align="center">
79  <a href="/alternc-sql/" target="_blank"><?php __("Web interface PhpMyAdmin"); ?></a>
80  <p>
81  <code>http://<?php echo $L_FQDN; ?>/alternc-sql/</code>
82  </p>
83  </td>
84  </tr>
85 <?php
86 }
87 ?>
88 </table>
89 <?php
90 if(!isset($r['user'])){
91  echo "<p class=\"alert alert-warning\">";__("You changed the MySQL User base configuration. Please refer to your configuration");echo"</p><p>&nbsp;</p>";
92 }
93 ?>
94 <p><span class="ina back"><a href="sql_list.php"><?php __("Back to the MySQL database list"); ?></a></span></p>
95 
96 
97 <?php
98  include_once("foot.php"); ?>
99