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

## falls kein rückaufruf durch ..personendaten2.php dann personendaten neu aus db holen
if (!isset($fehlertext)) {

##werte aus db
$id = db_query("select * from anbieter where anbieter='$anbieter'");
$werte = db_fetch_array($id);
$name = $werte["name"];
$firma = $werte["firma"];
$anschrift = $werte["anschrift"];
$ort = $werte["plzort"];
$telefon = $werte["telefon"];
$fax = $werte["fax"];
$emailadresse = $werte["emailadresse"];
$kundennummer = $werte["kundennummer"];
$freifeldname1 = $werte["freifeldname1"];
$freifeldname2 = $werte["freifeldname2"];
$freifeldname3 = $werte["freifeldname3"];
$freifeldwert1 = $werte["freifeldwert1"];
$freifeldwert2 = $werte["freifeldwert2"];
$freifeldwert3 = $werte["freifeldwert3"];
$kundendatenanzeigen = $werte["kundendatenanzeigen"];
$gender = $werte["gender"];
$firstname = $werte["firstname"];
$plz = $werte["plz"];
$land = $werte["land"];
$dnr = $werte["dnr"];
##/werte aus db

}
## /falls kein rückaufruf durch ..personendaten2.php dann personendaten neu aus db holen
## sonst nichts

?>
<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" width="350" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<script>
<?
echo js_f_call_help('', 'anaepe_descr1');
?>
</script>

  <TR> 
    <td colspan=2> 
        <? echo ltext("anaepe_reseller"); ?>
        <b><? echo $anbieter; ?></b> 
</td></tr>
      <form method="post" action="anbieter_aendern_personendaten2.php">
      <input type="hidden" name="dnr" value="<? echo $dnr; ?>">
<tr > 
            <td class="titel-3" >
              <? echo ltext("anaepe_cell_description"); ?>
              </td>
            <td class="titel-3" >
              <? echo ltext("anaepe_cell_input"); ?>
              </td>
          </tr>
          <tr >
            <td   align="right">
              <? echo ltext("anan2_cell_gender"); ?>
              </td>
            <td  >
              <select name="gender">
               <option value="m" <? if ($gender=="m") { echo selected; } ?>><? echo ltext("anan2_cell_gender1"); ?>
               <option value="f" <? if ($gender=="f") { echo selected; } ?>><? echo ltext("anan2_cell_gender2"); ?>
              </select>
            </td>
          </tr>
          <tr >
            <td   align="right">
              <? echo ltext("anan2_cell_firstname"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="firstname" value="<? if (isset($name)) { echo $firstname; } ?>">
            </td>
          </tr>
          <tr >
            <td   align="right">
              <? echo ltext("anan2_cell_name"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="name" value="<? if (isset($name)) { echo $name; } ?>">
            </td>
          </tr>
          <tr >
            <td   align="right">
              <? echo ltext("anan2_cell_firm"); ?>
              </td>
            <td  >
              <input type="text" name="firma" value="<? if (isset($firma)) { echo $firma; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_address"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="anschrift" value="<? if (isset($anschrift)) { echo $anschrift; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_city"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="ort" value="<? if (isset($ort)) { echo $ort; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_zip"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="plz" value="<? if (isset($plz)) { echo $plz; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_country"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="land" value="<? if (isset($land)) { echo $land; } ?>">
            </td>
</tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_tel"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="telefon" value="<? if (isset($telefon)) { echo $telefon; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_fax"); ?>
              </td>
            <td  >
              <input type="text" name="fax" value="<? if (isset($fax)) { echo $fax; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_email"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="emailadresse" value="<? if (isset($emailadresse)) { echo $emailadresse; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_cid"); ?>
              </td>
            <td  >
              <input type="text" name="kundennummer" value="<? if (isset($kundennummer)) { echo $kundennummer; } ?>">
            </td>
          </tr>

          <tr > 
            <td  class="titel-3" >
              <? echo ltext("anaepe_cell_userdeffields"); ?>
              </td>
            <td  class="titel-3" >
              <? echo ltext("anaepe_cell_input"); ?>
              </td>
          </tr>
          <tr > 
            <td  align="right"> 
              <input type="text" name="freifeldname1" value="<? if (isset($freifeldname1)) { echo $freifeldname1; } ?>">
            </td>
            <td  > 
              <input type="text" name="freifeldwert1" value="<? if (isset($freifeldwert1)) { echo $freifeldwert1; } ?>">
            </td>
          </tr>
          <tr > 
            <td  align="right"> 
              <input type="text" name="freifeldname2" value="<? if (isset($freifeldname2)) { echo $freifeldname2; } ?>">
            </td>
            <td  > 
              <input type="text" name="freifeldwert2" value="<? if (isset($freifeldwert2)) { echo $freifeldwert2; } ?>">
            </td>
          </tr>
          <tr > 
            <td  align="right"> 
              <input type="text" name="freifeldname3" value="<? if (isset($freifeldname3)) { echo $freifeldname3; } ?>">
            </td>
            <td  > 
              <input type="text" name="freifeldwert3" value="<? if (isset($freifeldwert3)) { echo $freifeldwert3; } ?>">
            </td>
          </tr>
          <tr > 
            <td colspan="2" class="titel-3" >
              <? echo ltext("anaepe_cell_title1"); ?>
            </td></tr><tr><td colspan=2>
              <? echo ltext("anaepe_cell_descr1"); ?><br>
              <input type="radio" name="kundendatenanzeigen" value="1"<? if ($kundendatenanzeigen == "0") { echo ""; } else { echo " checked"; } ?>>
              <b>
              <? echo ltext("g_yes"); ?>
              </b> 
              <input type="radio" name="kundendatenanzeigen" value="0"<? if ($kundendatenanzeigen == "0") { echo " checked"; } ?>>
              <b>
              <? echo ltext("g_no"); ?>
              </b> </td>
          </tr>
	  <tr>
	  <td>
	  <div align="right">Design</div> 
	  </td>
	  <td>
	  <select name="skin">
<?

$id = db_query("SELECT skin_id FROM skins WHERE cuser='$anbieter'");
$res = db_fetch_array($id);
$thisskin = $res['skin_id'];

$id = db_query('SELECT oldskins FROM admin');
$res = db_fetch_array($id);


$query = "SELECT id, show_name, path FROM custom_skins WHERE (owner_type='preinstalled' OR (owner_type='reseller' AND anbieter='$anbieter'))";
if(!$res['oldskins'])
{
	$query .= " AND version <> 'classic20'";
}
$id = db_query($query);
while($res = db_fetch_array($id))
{
	$selected = '';
	if($thisskin == $res['id'])
	{
		$selected = ' selected';
	}
	?><OPTION value="<?=$res['id']?>"<?=$selected?>><?=$res['show_name']?></option><?
}

?>
	  </select>

	  </td>
	  </tr>

          <tr > 
            <td >&nbsp;</td>
            <td><? echo std_button(ltext("anaepe_button1"), "javascript:doChange()"); ?></td>
          </tr>
        </table>
        <input type=hidden name=anbieter value="<? echo $anbieter; ?>">
      </form>
    </td>
  </TR>
</TABLE>
<P>&nbsp;</P>
</BODY>
</HTML>

<?
db_close();
?>
