Subversion-Projekte lars-tiefland.content-management

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        session_start();
        require_once "connect2.php";
        
        foreach(array_keys($_REQUEST) as $key)
        {
                $_SESSION[$key]=$_REQUEST[$key];
        }
?>
<html>
<head>
<title>Online-Shop Ebay-Interface</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
td {  font-family: Arial, Helvetica, sans-serif; font-size: 14px}
.bold {  font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold}
.small {  font-family: Arial, Helvetica, sans-serif; font-size: 9px}
-->
</style>
<script language="JavaScript" src="../../checkDate.js"></script>
<script language=JavaScript>
function AuktionOnly(form)
{
        if ((form.Startpreis.value > 0) && (form.Menge.value > 1))
        {
                if (confirm('Bei einer Auktion kann immer nur EIN Artikel versteigert werden!\nSoll die Menge auf \"1\" zurückgesetzt gesetzt werden?'))
                {
                        form.Menge.value=1;
                }
                else
                {
                        alert('Menge wird nicht zurückgesetzt!\nAuktion nicht möglich!');
                        form.Startpreis.value='';
                }
        } 
}

function SofortKaufOnly(form)
{
        if ((form.Startpreis.value > 0) && (form.Menge.value > 1))
        {
                if (confirm('Bei einer Auktion kann immer nur EIN Artikel versteigert werden!\nSoll das Mindestgebot entfernt werden?'))
                {
                        form.Startpreis.value='';
                }
                else
                {
                        alert('Mindestgebot wird nicht zurückgesetzt!\nMenge wird auf \"1\" zurückgesetzt!');
                        form.Menge.value=1;
                }
        } 
}

function browseCategories(source)
{
        window.open("browseCategories.php",source,"width=800,height=600,scrollbars=yes,resizable=yes")
}
</script>
</head>
<body>
<? $steps=array( "Was", "Wie","Wann"); ?>
<form name="eBay" method="post" action="<?=$self?>">
  <table width="70%" height="200" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td colspan="2"> 
        <?
        if (!$_REQUEST[step]) {$step=$steps[0];}
        else {$step=$steps[array_search($step, $steps)+1];}

        /* NUR IN DER ENTWICKLUNGSPHASE */
        if (!$step) {$step=$steps[0];}
        /* WIRD GELÖSCHT WENN FERTIG */
        
        foreach($steps as $current_step)
        {
                if ($step == $current_step) {$class="bold";} else {$class="";}
                echo "<span class=".$class.">".$current_step."</span> ";
        }
?>
        ? 
        <hr noshade>
      </td>
    </tr>
    <tr> 
      <td valign="top" width="100%" height="100%"> 
        <table border=0 width="100%" cellpadding="0" cellspacing="0">
          <?
        switch ($step)
        {
                case "Wie":
?>
          <tr> 
            <td width="44%" valign="top" rowspan="2">Auktion:<br>
              <span class="small">(Verkauf zum H&ouml;chstgebot)</span></td>
            <td width="10%"> 
              <input name="Startpreis" type="text" size="5" value="<?=$_SESSION[Startpreis];?>" onBlur="AuktionOnly(this.form)" onChange="this.value=killkomma(this.value);">
              &euro; </td>
            <td width="46%">Mindestgebot</td>
          </tr>
          <tr> 
            <td width="10%">&nbsp;</td>
            <td width="46%"><span class="small">Aktueller Shop-Preis:</span></td>
          </tr>
          <tr> 
            <td width="44%">SofortKauf:<br>
              <span class="small">(Verkauf zum Festpreis)</span></td>
            <td colspan="2"> 
              <input name="SofortKauf" type="text" size="5" value="<?=$_SESSION[SofortKauf];?>" onChange="this.value=killkomma(this.value);">
              &euro; </td>
          </tr>
          <tr> 
            <td width="44%">Menge:<br>
              <span class="small">(bei Auktionen immer 1)</span> </td>
            <td colspan="2"> 
              <input name="Menge" type="text" size="5" value="<?=$_SESSION[Menge];?>" onBlur="SofortKaufOnly(this.form)">
              St&uuml;ck</td>
          </tr>
          <?
                break;
                case "Was":
?>
          <tr> 
            <td width="44%">Artikel:</td>
            <td colspan="2"> 
              <input name="artikel" type="text" value="<?=$_SESSION[artikel];?>">
            </td>
          </tr>
          <tr> 
            <td width="44%">Kategorie:</td>
            <td colspan="2"> 
              <input type="text" name="Kategorie1" value="<?=$_SESSION[Kategorie1];?>">
              <input type="button" value="Kategorie w&auml;hlen" onClick="browseCategories('Kategorie1')">
            </td>
          </tr>
          <tr> 
            <td width="44%">Kategorie2:<br>
              <span class="small">(optional)</span></td>
            <td colspan="2"> 
              <input type="text" name="Kategorie2" value="<?=$_SESSION[Kategorie2];?>">
              <input type="button" value="Kategorie w&auml;hlen" onClick="browseCategories('Kategorie2')">
            </td>
          </tr>
          <?
                break;
                case "Wann":
?>
          <tr> 
            <td width="44%">Start:</td>
            <td colspan="2"> 
              <input name="Angebotsbeginn" type="text" size="18" value="<?=$_SESSION[Angebotsbeginn];?>" onFocus="if (this.value=='') {this.value=now2('19:00')};this.select();">
              (tt.mm.jjjj hh.mm)</td>
          </tr>
          <tr> 
            <td width="44%">Dauer:</td>
            <td colspan="2"> 
              <select name="Angebotsdauer">
                <option value="1">1 Tag</option>
                <option value="3">3 Tage</option>
                <option value="5">5 Tage</option>
                <option value="7">7 Tage</option>
                <option value="10">10 Tage</option>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="44%">Privatauktion:</td>
            <td colspan="2"> 
              <input type="checkbox" name="Privatauktion" value="Privatauktion">
            </td>
          </tr>
          <?
                break;
        }
?>
        </table>
      </td>
    </tr>
    <tr> 
      <td colspan="2" align="center"> 
        <hr noshade>
        <input type="submit" value="&lt; Zur&uuml;ck" onClick="this.form.step.value='<?=$steps[array_search($step, $steps)-2];?>';">
        &nbsp; 
        <input type="reset" value="Zur&uuml;cksetzen">
        <input type="submit" value="Weiter &gt;">
        <input type="hidden" name="step" value="<?=$step;?>">
      </td>
    </tr>
  </table>
</form>
</body>
</html>