<?
########## 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");

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

$id = safe_query( "select frontpage, cssl, maxmysql from anbieter where anbieter = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$skfrontpage = $werte["frontpage"];
$skssl = $werte["cssl"];
$maxmysql = $werte["maxmysql"];
if ($maxmysql != 0) $skmysql = 1;

if ($skfrontpage < 1)
	{
	 $fehlertext = ltext("kufr_error1");
	 db_close();
	 include("kunden_start.php");
	 exit();
	}

$id = safe_query( "select kunde from kunden where anbieter = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$anzahlkunden = db_num_rows($id);

?>

<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">

<script>
<?
echo js_f_call_help('kufr_title1', 'kufr_descr1');
?>
</script>
      <? 

$id = safe_query( "select kunde, name from kunden where anbieter = ?  order by number", TRUE, new SQLString( $PHP_AUTH_USER ) );

if (db_num_rows($id) > 0) 

	{
?>
        <tr > 
          <td  height="15" class="titel-3" >
       
            <? echo ltext("kufr_cell_user"); ?>
            </td>
          <td  align="left" valign="middle" height="15" class="titel-3" >
            <? echo ltext("kufr_cell_name"); ?>
            </td>
          <td  align="left" valign="middle" height="15" class="titel-3" >
            <? echo ltext("kufr_cell_action"); ?>
            </td>
        </tr>
        <?
while ($werte = db_fetch_array($id))
		{
		 $kunde = $werte["kunde"];
		 $name = $werte["name"];

		 if (istleer($name))
			{
			 $name = ltext("stku1_nousername");
			}


$id2 = safe_query( "select domain from domains where kunde = ?  and richtigedomain='3' and frontpage='1' and anbieter = ? ", TRUE, new SQLString( $kunde ), new SQLString( $PHP_AUTH_USER ) );
if (db_num_rows($id2) > 0) { $frontpage = 1; } else { $frontpage = 0; }
?>
        <tr > 
          <td  height="15">
            <? echo $kunde; ?>
            </td>
          <td  align="left" valign="middle" height="15">
            <? echo $name; ?>
            </td>
          <td  align="left" valign="middle" height="15"><a class=data href="kunden_frontpage_upd.php?kunde=<? echo $kunde; ?>">
            <? if ($frontpage == 1) { echo "<b>".ltext("kufr_fpdeact")."</b>"; } else { echo "<b>".ltext("kufr_fpact")."</b>"; } ?>
            </a></td>
        </tr>
        <?
		}
?>
      </table>
      <? } else { echo ltext("kufr_nouser"); }
?>
    </TD>
  </TR>
</TABLE>
</BODY>
</HTML>
<?
db_close();
?>
