2006-04-26 12:28:53 +00:00
< ? php
/*
$Id : sql_getparam . php , v 1.4 2005 / 05 / 27 20 : 10 : 18 arnaud - lb Exp $
----------------------------------------------------------------------
AlternC - Web Hosting System
Copyright ( C ) 2002 by the AlternC Development Team .
http :// alternc . org /
----------------------------------------------------------------------
Based on :
Valentin Lacambre ' s web hosting softwares : http :// altern . org /
----------------------------------------------------------------------
LICENSE
This program is free software ; you can redistribute it and / or
modify it under the terms of the GNU General Public License ( GPL )
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
To read the license please visit http :// www . gnu . org / copyleft / gpl . html
----------------------------------------------------------------------
Original Author of file : Benjamin Sonntag
Purpose of file : Return the current SQL settings
----------------------------------------------------------------------
*/
require_once ( " ../class/config.php " );
2009-09-08 05:29:38 +00:00
include_once ( " head.php " );
2006-04-26 12:28:53 +00:00
2012-08-25 17:05:38 +00:00
$fields = array (
" dbname " => array ( " request " , " string " , " " ),
);
getFields ( $fields );
2006-04-26 12:28:53 +00:00
if ( ! $r = $mysql -> get_dblist ()) {
$error = $err -> errstr ();
}
2016-05-23 14:37:32 +00:00
$r = $mysql -> get_defaultsparam ( $dbname );
if ( ! $r ) {
$error = $err -> errstr ();
}
2012-08-25 17:05:38 +00:00
2006-04-26 12:28:53 +00:00
?>
< h3 >< ? php __ ( " MySQL Databases " ); ?> </h3>
2010-05-27 15:10:45 +00:00
< hr id = " topbar " />
< br />
2006-04-26 12:28:53 +00:00
< ? php
2011-03-06 22:37:34 +00:00
if ( isset ( $error ) && $error ) {
2013-10-18 09:59:03 +00:00
echo " <p class= \" alert alert-danger \" > $error </p><p> </p> " ;
2016-05-23 14:37:32 +00:00
include_once ( " foot.php " );
exit ();
}
2006-04-26 12:28:53 +00:00
?>
2012-08-25 17:05:38 +00:00
< p >< ? php __ ( " Your current connection settings are " ); ?> : </p>
2010-04-06 20:29:08 +00:00
< table class = " tedit " >
2013-04-19 07:18:25 +00:00
< tr >
< th colspan = " 2 " style = 'text-align:center;' >< ? php echo '<h1>' . $mysql -> dbus -> HumanHostname . '</h1>' ; ?> </th>
</ tr >
2010-04-06 20:29:08 +00:00
< tr >
2012-08-25 17:05:38 +00:00
< th >< ? php __ ( " Mysql Server " ); ?> </th>
2013-03-01 16:37:33 +00:00
< td >< code >< ? php echo $mysql -> dbus -> Host ; ?> </code></td>
2009-09-08 05:29:38 +00:00
</ tr >
2010-04-06 20:29:08 +00:00
< tr >
2012-08-25 17:05:38 +00:00
< th >< ? php __ ( " Database " ); ?> </th>
2016-05-23 14:37:32 +00:00
< td >< code >< ? php ehe ( $dbname ); ?> </code></td>
2009-09-08 05:29:38 +00:00
</ tr >
2012-08-25 17:05:38 +00:00
< ? php
if ( isset ( $r [ 'user' ])){
?>
2010-04-06 20:29:08 +00:00
< tr >
2012-08-25 17:05:38 +00:00
< th >< ? php __ ( " Login " ); ?> </th>
< td >< code >< ? php echo $r [ 'user' ]; ?> </code></td>
2009-09-08 05:29:38 +00:00
</ tr >
2010-04-06 20:29:08 +00:00
< tr >
2012-08-25 17:05:38 +00:00
< th >< ? php __ ( " Password " ); ?> </th>
< td >< code >< ? php echo $r [ 'password' ]; ?> </code></td>
2009-09-08 05:29:38 +00:00
</ tr >
2012-09-07 16:26:11 +00:00
< tr >
2013-04-19 07:18:25 +00:00
< td colspan = " 2 " align = " center " >
< a href = " /alternc-sql/ " target = " _blank " >< ? php __ ( " Web interface PhpMyAdmin " ); ?> </a>
< p >
< code > http ://< ? php echo $L_FQDN ; ?> /alternc-sql/</code>
</ p >
2012-11-08 14:40:04 +00:00
</ td >
2012-09-07 16:26:11 +00:00
</ tr >
2012-08-25 17:05:38 +00:00
< ? php
}
?>
2006-04-26 12:28:53 +00:00
</ table >
2012-08-25 17:05:38 +00:00
< ? php
if ( ! isset ( $r [ 'user' ])){
2013-10-18 09:59:03 +00:00
echo " <p class= \" alert alert-warning \" > " ; __ ( " You changed the MySQL User base configuration. Please refer to your configuration " ); echo " </p><p> </p> " ;
2012-08-25 17:05:38 +00:00
}
?>
2013-04-29 09:19:15 +00:00
< p >< span class = " ina back " >< a href = " sql_list.php " >< ? php __ ( " Back to the MySQL database list " ); ?> </a></span></p>
2010-04-29 08:31:15 +00:00
2012-08-25 17:05:38 +00:00
< ? php
include_once ( " foot.php " ); ?>