2006-04-26 12:28:53 +00:00
< ? php
/*
----------------------------------------------------------------------
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
----------------------------------------------------------------------
*/
2017-10-08 17:53:03 +00:00
/**
* Show the settings ( may be plural ) available
* to access a MySQL database for an account
*
* @ copyright AlternC - Team 2000 - 2017 https :// alternc . com /
*/
2006-04-26 12:28:53 +00:00
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 );
2017-08-15 17:51:04 +00:00
if ( ! $res = $mysql -> get_dblist ()) {
2006-04-26 12:28:53 +00:00
$error = $err -> errstr ();
}
2017-08-15 17:51:04 +00:00
$res = $mysql -> get_defaultsparam ( $dbname );
2012-08-25 17:05:38 +00:00
2006-04-26 12:28:53 +00:00
?>
2017-10-07 16:20:18 +00:00
< h3 >< ? php printf ( _ ( " MySQL settings for database '%s' " ), $dbname ); ?> </h3>
2010-05-27 15:10:45 +00:00
< hr id = " topbar " />
< br />
2006-04-26 12:28:53 +00:00
< ? php
2017-08-15 17:51:04 +00:00
echo $msg -> msg_html_all ();
2017-10-06 16:12:41 +00:00
if ( $msg -> has_msgs ( " ERROR " )) {
2017-08-15 17:51:04 +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>
2017-08-15 17:51:04 +00:00
< ? php
$i = 0 ;
foreach ( $res as $r ) {
$i ++ ;
$title = ( count ( $res ) > 1 ) ? " Paramètres " . $i : " Paramètres " ;
?>
2010-04-06 20:29:08 +00:00
< table class = " tedit " >
2013-04-19 07:18:25 +00:00
< tr >
2017-08-15 17:51:04 +00:00
< th colspan = " 2 " style = 'text-align:center;' >< ? php echo '<h1>' . $title . '</h1>' ; ?> </th>
2013-04-19 07:18:25 +00:00
</ 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>
2017-08-15 17:51:04 +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 >
2017-08-15 17:51:04 +00:00
< tr >
2017-10-08 17:53:03 +00:00
< th >< ? php __ ( " User Rights " ); ?> </th>
2017-08-15 17:51:04 +00:00
< ? php
2017-10-08 17:53:03 +00:00
// We test the 'Rights' value to know if this user have all or only specific rights.
2017-10-08 13:01:12 +00:00
if ( $r [ " Rights " ] == 'All' ) {
2017-08-15 17:51:04 +00:00
$rights = " Tous " ;
} else {
$rights = " <span style='color:orange;'>Sélectifs</span> " ;
}
?>
< td >< ? php echo $rights ; ?> <span class="ina configure"><a href="sql_users_rights.php?id=<?php echo $r["user"] ?>"><?php __("Manage the rights"); ?></a></span></td>
</ tr >
2012-09-07 16:26:11 +00:00
< tr >
2013-04-19 07:18:25 +00:00
< td colspan = " 2 " align = " center " >
2017-10-07 16:28:02 +00:00
< a href = " /sql_pma_sso.php?db=<?php echo $dbname ; ?> " target = " _blank " >< ? php __ ( " Click here to access PhpMyAdmin interface " ); ?> </a>
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
}
?>
2017-08-15 17:51:04 +00:00
< br >
2017-10-08 17:53:03 +00:00
< ? php
} // end foreach
?>
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
2017-10-08 17:53:03 +00:00
include_once ( " foot.php " );
?>
2012-08-25 17:05:38 +00:00