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

include_once("auth.php");

db_connect($db_host, $db_user, $db_pass);
$id = safe_query( "select mysql from admin", TRUE );
$werte = db_fetch_array($id);
if ($werte["mysql"] != 1) header("Location: ./anbieter_start.php");

$id = safe_query( "select * from mysql_datenbanken", TRUE );
while ($werte = db_fetch_array($id))
	{
	 $kindex = str_replace($user_prefix, "", $werte["kunde"]);
	 $aindex = str_replace("res", "", $werte["anbieter"]);
	 $tabelle[$aindex][$kindex][$werte["datenbank"]] = $werte["dbext"];
	}

?>

<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">
<? include("../fehler.inc.php"); ?>
<BR>
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr>
<td class="titel-3" ><? echo ltext("anmy_cell_reseller"); ?></td>
<td class="titel-3" ><? echo ltext("anmy_cell_user"); ?></td>
<td class="titel-3" ><? echo ltext("anmy_cell_db"); ?></td>
<td class="titel-3" ><? echo ltext("anmy_cell_ext"); ?></td>
</tr>

        <?
if (is_array($tabelle))	{
ksort($tabelle);
while (list ($anbieter, $kunden) = each ($tabelle))
	{
	 ksort($kunden);
	 $anbieterstr = "res".$anbieter;
	 while (list ($kunde, $datenbanken) = each ($kunden))
		{
		 ksort($datenbanken);
		 $kundenstr = $user_prefix.$kunde;
		 while (list ($datenbank, $dbext) = each ($datenbanken))
			{
			 $datenbankstr = "usr_".$kundenstr."_".$datenbank;
			 if ($dbext == 1) $dbextlink = ltext("anmy_cell_true"); else $dbextlink = ltext("anmy_cell_false");
			 $dbextlink = '<a class=data href="anbieter_mysql_dbext.php?dbname='.$datenbankstr.'">'.$dbextlink.'</a>';
?>
        <tr > 
          <td> 
            <? echo $anbieterstr; ?>
            </td>
          <td> 
            <? echo $kundenstr; ?>
            </td>
          <td > 
            <? echo $datenbankstr; ?>
            </td>
          <td> 
            <? echo $dbextlink; ?>
            </td>
        </tr>
        <?
			}
		}
	}
}
?>
      </table>
      <p>&nbsp;</p>
    </TD>
  </TR>
  </TBODY> 
</TABLE>
<P>&nbsp;</P>
</BODY>
</HTML>
