<?
########## 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

## status des anbieters
$id = safe_query( "select gesperrt from anbieter where anbieter = ? ", TRUE, new SQLString( $anbieter ) );
$werte = db_fetch_array($id);
$gesperrt = $werte["gesperrt"];
## /status des anbieters

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

if ($gesperrt == 0) {

?>
<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('', 'anaesp_title1');
?>
</script>

  <TR> 
    <TD width=430 valign="top"><? echo ltext("anaesp_descr1",array($anbieter,$anzahlkunden)); ?>
	
      <form method="post" action="anbieter_aendern_sperren2.php">
        <p>
          <? echo ltext("anaesp_text1",array($anbieter)); ?>
          </p>
        <p> 
          <input type="radio" name="sperren" value="yes">
          <? echo ltext("g_yes"); ?>
           <br>
          <input type="radio" name="sperren" value="no">
          <? echo ltext("g_no"); ?>
          </p>
        <p>
	
    <? echo std_button(ltext("anaesp_button1"), "javascript:doChange()"); ?>
          <input type="hidden" name="anbieter" value="<? echo $anbieter; ?>">
        </p>
      </form>
      <p>&nbsp;</p>
    </TD>
  </TR>
</TABLE>
<P>&nbsp;</P>
</BODY>
</HTML>

<? } elseif ($gesperrt == 1) {

?>
<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('', 'anaesp_title2');
?>
</script>

<tr>
    <TD width=430 valign="top"> 
      <P>
      <? echo ltext("anaesp_descr2",array($anbieter)); ?></P>
      <form method="post" action="anbieter_aendern_sperren2.php">
        <p>
      <? echo ltext("anaesp_text2",array($anbieter)); ?></p>
        <p> 
          <input type="radio" name="freigeben" value="yes">
      <? echo ltext("g_yes"); ?> <br>
          <input type="radio" name="freigeben" value="no">
      <? echo ltext("g_no"); ?></p>
        <p>
	
    <? echo std_button(ltext("anaesp_button1"), "javascript:doChange()"); ?>

	  <input type="hidden" name="anbieter" value="<? echo $anbieter; ?>">
        </p>
      </form>
      </TD>
  </TR>
</TABLE>
<P>&nbsp;</P>
</BODY>
</HTML>

<? }

db_close(); ?>
