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

include_once("auth.php");

## mysql verbindung aufbauen
db_connect($db_host, $db_user, $db_pass);
## /mysql verbindung aufbauen

?>
<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 doChange2()
{
document.forms[1].submit();
}
</script>
<script>
function doChange()
{
document.forms[0].submit();
}
</script>
<form method="post" action="statistik_kunde1.php">
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
  <TR>
      <td  colspan="4" align="left" class="titel-3" ><? echo ltext("stkun_cell_title1"); ?></td>
   </tr>
   <tr>
            <td colspan=2>
              <input type="text" name="kunde">
            </td>
            <td align="left" valign="middle" colspan=2><? echo ltext("stkun_cell_text1"); ?></td>
          </tr>
          <tr > 
            <td >&nbsp; </td>
            <td align="left" valign="middle" colspan="3"><? echo std_button(ltext("stkun_button1"), "javascript:doChange()"); ?></td>
          </tr>
      </form>
<?
if ($ergebnis == 1)
	{
?>
        <tr > 
          <td  height="15" class="titel-3" >
            <? echo ltext("stkun_cell_user"); ?>
            </td>
          <td  align="left" valign="middle" height="15" class="titel-3" >
            <? echo ltext("stkun_cell_name"); ?>
            </td>
          <td  align="left" valign="middle" height="15" class="titel-3" >
            <? echo ltext("stkun_cell_domains"); ?>
            </td>
          <td  align="left" valign="middle" height="15" class="titel-3" >
            <? echo ltext("stkun_cell_select"); ?>
            </td>
        </tr>
        <?
	for ($i = 0; $i < (count($tabelle)); $i++)
		{
		 $kunde = $tabelle[$i]["kunde"];
		 $name = $tabelle[$i]["name"];
		 $domains = $tabelle[$i]["domains"];
		 $gesperrt = $tabelle[$i]["gesperrt"];
?> 
        <tr >
          <td  height="15"><? echo $kunde; ?>
		  <? if ($gesperrt > 0) { echo "<b><font color=\"red\">!</b>"; } ?>
		  </td>
          <td  align="left" valign="middle" height="15"><? echo $name; ?></td>
          <td  align="left" valign="middle" height="15"><? echo $domains; ?></td>
          <td  align="left" valign="middle" height="15"><a class=data href="statistik_kunde2.php?kunde=<? echo $kunde; ?>"><? echo ltext("stkun_cell_select"); ?></a></td>
        </tr>
        <?
		}
?> 
<? } ?>
      <form method="post" action="statistik_kunden2.php">
          <tr > 
            <td colspan="4" align="left" class="titel-3" >
              <? echo ltext("stkun_cell_title2"); ?>
              </td>
          </tr>
          <tr >
            <td ><? echo ltext("stkun_cell_numberofusers"); ?></td>
            <td  align="left" valign="middle" colspan=2>
              <? echo ltext("stkun_cell_sortedby"); ?>
              </td>
            <td  align="left" valign="middle">
              <? echo ltext("stkun_cell_reseller"); ?>
              </td>
          </tr>
          <tr > 
            <td colspan=2>
              <select name="schritte">
                <option value="5">5 <? echo ltext("stkun_select1_users"); ?></option>
                <option value="15">15 <? echo ltext("stkun_select1_users"); ?></option>
                <option value="25" selected>25 <? echo ltext("stkun_select1_users"); ?></option>
                <option value="50">50 <? echo ltext("stkun_select1_users"); ?></option>
                <option value="100">100 <? echo ltext("stkun_select1_users"); ?></option>
                <option value="200">200 <? echo ltext("stkun_select1_users"); ?></option>
              </select>
              <input type="hidden" name="start" value="0">
            </td>
            <td   align="left" valign="middle" colspan=1>
              <select name="order">
                <option value="benutzer" selected><? echo ltext("stkun_select2_user"); ?></option>
                <option value="email"><? echo ltext("stkun_select2_email"); ?></option>
                <option value="pop3"><? echo ltext("stkun_select2_pop"); ?></option>
                <option value="atransfer"><? echo ltext("stkun_select2_traffic"); ?></option>
                <option value="ltransfer"><? echo ltext("stkun_select2_lmtraffic"); ?></option>
                <option value="kb"><? echo ltext("stkun_select2_du"); ?></option>
              </select>
            </td>
            <td   align="left" valign="middle"> 
              <select name="anbieter">
                <option value="alle" selected><? echo ltext("stkun_select3_allresellers"); ?></option>

<?
$id = safe_query("select anbieter from anbieter order by anbieter");
while ($werte = db_fetch_array($id))
	{

	 $anbieter = $werte["anbieter"];

	?><option value="<? echo $anbieter; ?>"><? echo $anbieter; ?></option><?

} ?>

              </select>
            </td>
          </tr>
          <tr > 
            <td  colspan="2">
              <input type="checkbox" name="limit" value="yes">
              <? echo ltext("stkun_cell_overlimit"); ?>
              </td>
            <td   align="left" valign="middle" colspan="2"><? echo std_button(ltext("stkun_button1"), "javascript:doChange2()"); ?></td>
          </tr>
      </form>
    </TD>
  </TR>
</TABLE>
</BODY>
</HTML>

<?
db_close();
?>
