<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

include_once( "../include/class.SQLString.php" );
include_once("auth.php");

db_connect($db_host, $db_user, $db_pass);

## maxmysql ermitteln
$id = safe_query( "select maxmysql from kunden where kunde = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$maxmysql = $werte["maxmysql"];
## //

$id = safe_query( "select phpmyadmin, phpmyadminpfad from admin", TRUE );
$werte = db_fetch_array($id);
$phpmyadmin = $werte["phpmyadmin"];
$phpmyadminpfad = $werte["phpmyadminpfad"];

## anzahl mysql ermitteln
$id = safe_query( "select count(datenbank) as mysql from mysql_datenbanken where kunde = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$mysql = $werte["mysql"];
## //

?>
<HTML>
<HEAD>
<META content="text/html; charset=<? echo $lang_html_charset; ?>" http-equiv=Content-Type>
<LINK href="<?=$strSkinName?>/style.css" rel=stylesheet type=text/css>
</HEAD>

<BODY bgColor=#ffffff bottomMargin=0 leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<br><? include("../fehler.inc.php"); ?>
<script>
function doChange()
{
document.forms[0].submit();
}
</script>
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr>
    <TD>
      <b><? echo ltext("dbmy_title"); ?></b><br><br>
      <table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
      <?
	if ( $maxmysql == -1 )
	  echo ltext( "dbmy_desc4", array($mysql) );
	else
	  echo ltext( "dbmy_desc1", array( $mysql, $maxmysql ) );
      ?>
      <? if ($mysql != 0) { ?> 
        <tr > 
          <td class="titel-3" ><? echo ltext("dbmy_cell_db"); ?></td>
          <td class="titel-3" ><? echo ltext("dbmy_cell_action"); ?></td>
        </tr>
        <?
$id = safe_query( "select datenbank, dbname from mysql_datenbanken where kunde = ?  order by datenbank desc", TRUE, new SQLString( $PHP_AUTH_USER ) );
while ($werte = db_fetch_array($id)) {
$dblang = $werte["dbname"];
$db = $werte["datenbank"];
?> 
        <tr > 
          <td ><? echo $dblang; ?></td>
          <td ><a class=data href="db_mysql_loeschen.php?db=<? echo $db; ?>"><? echo ltext("dbmy_cell_dbdel"); ?></a></td>
        </tr>
        <? } ?> 
      <? }

if ($mysql != 0) { ?> 
      <tr><td colspan=2><? echo ltext("dbmy_desc2", array($PHP_AUTH_USER)); ?></td></tr>
      <? }
if (($maxmysql - $mysql) != 0) { ?> 
      <tr><td colspan=2><? echo ltext("dbmy_desc3"); ?></td></tr>
      <? } ?> </TD>
      </table>
  </TR>
   
</TABLE>
</BODY>
</HTML>
<?
db_close();
?>
