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

include_once( "../include/class.SQLInteger.php" );
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 maxftp, webmail, webftp, pwschutz, fehlerseiten, perl from kunden where kunde = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$maxftp = $werte["maxftp"];
$skwebmail = $werte["webmail"];
$skwebftp = $werte["webftp"];
$skfehlerseiten = $werte["fehlerseiten"];
$skpwschutz = $werte["pwschutz"];
$skperl = $werte["perl"];
if (isset($ident)) $id = safe_query( "select * from pwschutz where ident = ?  and kunde = ? ", TRUE, new SQLInteger( $ident ), new SQLString( $PHP_AUTH_USER ) ); else $id = safe_query( "select * from pwschutz where pfad = ?  and kunde = ? ", TRUE, new SQLString( $pfad ), new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$bereich = $werte["bereich"];
$ident = $werte["ident"];
$pfad = $werte["pfad"];
?>
<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>
<?
echo js_f_call_help('', 'topwae_title');
?>
function doChange2()
{
document.forms[1].submit();
}
function doChange3()
{
document.forms[2].submit();
}
function doChange()
{
document.forms[0].submit();
}
</script>
      <form action="tools_pwschutz_aendern2.php" method="post">
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
	<tr><td colspan=3 class="titel-3" ><? echo ltext("topwae_subtitle1"); ?></td></tr>
	<tr >
            <td>
              <? echo ltext("topwae_cell_dir"); ?>
              </td>
            <td colspan=2>
              <input type="text" name="pfad" value="<? echo $pfad; ?>" maxlength="255">
            </td>
          </tr>
          <tr > 
            <td>
              <? echo ltext("topwae_cell_area"); ?>
              </td>
            <td colspan=2>
              <input type="text" name="bereich" maxlength="20" value="<? echo $bereich; ?>">
            </td>
          </tr>
          <tr > 
            <td  >&nbsp;</td>
            <td colspan=2> 
              <input type="hidden" name="ident" value="<? echo $ident; ?>">
	      <? echo std_button(ltext('topwae_btn_change'), 'javascript:doChange()') ?></td>
          </tr>
      </form>
      <?
$id = safe_query( "select * from users where parent = ?  and kunde = ?  order by login", TRUE, new SQLInteger( $ident ), new SQLString( $PHP_AUTH_USER ) );
if (db_num_rows($id) > 0) { ?>
        <tr><td colspan=3 class="titel-3" ><? echo ltext("topwae_subtitle2"); ?></td></tr>
	<tr> 
          <td class="titel-3" >
            <? echo ltext("topwae_cell_user"); ?>
            </td>
          <td class="titel-3" >
            <? echo ltext("topwae_cell_action"); ?>
            </td>
          <td class="titel-3" >
            <? echo ltext("topwae_cell_action"); ?>
            </td>
        </tr>
        <?
while ($werte = db_fetch_array($id))	{
$login2 = $werte["login"];
$ident2 = $werte["ident"];
?>
        <tr> 
          <td >  
            <? echo $login2; ?>
            </td>
          <td > 
            <a class=data href="tools_pwschutz_pwaendern.php?ident=<? echo $ident2; ?>&parent=<? echo $ident; ?>">
            <? echo ltext("topwae_link_change"); ?>
            </a></td>
          <td ><a class=data href="tools_pwschutz_loeschen.php?ident=<? echo $ident2; ?>&parent=<? echo $ident; ?>">
            <? echo ltext("topwae_link_del"); ?>
            </a></td>
        </tr>
        <? } ?>
      <? } ?>
      <form action="tools_pwschutz_neubenutzer.php" method="post">
          <tr><td colspan=3 class="titel-3" ><? echo ltext("topwae_subtitle3"); ?></td></tr>
	  <tr >
            <td >
              <? echo ltext("topwae_cell_login"); ?>
              </td>
            <td colspan=2>
              <input type="text" name="login" value="<? echo $login; ?>" maxlength="35">
              <input type="hidden" name="ident" value="<? echo $ident; ?>">
              <input type="hidden" name="pfad" value="<? echo $pfad; ?>">
            </td>
          </tr>
          <tr > 
            <td >
              <? echo ltext("topwae_cell_pw1"); ?>
              </td>
            <td colspan=2>
              <input type="password" name="pass1" maxlength=<?= MaxPwdLength ?>>
            </td>
          </tr>
          <tr > 
            <td >
              <? echo ltext("topwae_cell_pw2"); ?>
              </td>
            <td colspan=2>
              <input type="password" name="pass2" maxlength=<?= MaxPwdLength ?>>
            </td>
          </tr>
          <tr > 
            <td >&nbsp;</td>
            <td colspan=2><? echo std_button(ltext('topwae_btn_new'), 'javascript:doChange2()') ?></td>
          </tr>
      </form>
      <form method="post" action="tools_pwschutz_aufheben.php">
          <tr><td colspan=3 class="titel-3" ><? echo ltext("topwae_subtitle4"); ?></td></tr>
	  <tr > 
            <td colspan=3><? echo std_button(ltext('topwae_btn_del'), 'javascript:doChange3()') ?>
              <input type="hidden" name="ident" value="<? echo $ident; ?>">
              <input type="hidden" name="pfad2" value="<? echo $pfad; ?>">
            </td>
          </tr>
        </table>
      </form>
</BODY>
</HTML>
<?
db_close();
?>
