Subversion-Projekte lars-tiefland.content-management

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        $self=basename($PHP_SELF);
        $DB="artikel";

        function eBaylink($target)
        {
                if ($_SESSION[eBay][settings][$target] == "/web/apache/content-management/sandbox.config")
                {
                        return "http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll";  
                }
                else
                {
                        return "http://cgi.ebay.de/ws/eBayISAPI.dll";
                }
        }

        define ("modul_name", "online_shop");
        define ("tool_name", "eBay");
        require_once "../connect2.php";

        session_start();
        
        require_once "/web/apache/content-management/Online-Shop/eBay/system/loadSettings.php";
        loadSettings($webs[datenbank]);

        // $charset laden um die jeweiligen ISO-Zeichensätzte zu laden.
        require_once "../charset.php";

        switch($_GET[action])
        {
                case "delete":
                                mysql_query("delete from eBay_Auktionen where ID=$_GET[ID]");
                        break;
        }
?>
<html>
<head>
<title><? echo $webs[kunde_bezeichnung] ?>: Redaktionssystem</title>
<meta http-equiv="Content-Type" content="text/html; charset=<? echo $charset ?>">
<link rel=stylesheet type="text/css" href="../redaktion.css">
<style type="text/css">
body 
{
        font-family: Arial, Helvetica, sans-serif; font-size: 10pt;
<? if ($webs[font_color_seite])         { ?>color:                              #<? echo $webs[font_color_seite] ?>;<? } ?>
<? if ($webs[bgcolor_seite])            { ?>background-color:   #<? echo $webs[bgcolor_seite] ?>;<? } ?>
<? if ($webs[hintergrundbild])          { ?>background-image: url(../images/hintergrundbild/<? echo $webs[hintergrundbild] ?>);<? } ?>
}

.links
{
font-size: 10pt;
<? if ($webs[font_color_links])         { ?>color:                              #<? echo $webs[font_color_links] ?>;<? } ?>
<? if ($webs[bgcolor_links])            { ?>background-color:   #<? echo $webs[bgcolor_links] ?>;<? } ?>
}

.rechts
{
font-size: 10pt;
<? if ($webs[font_color_rechts])        { ?>color:                              #<? echo $webs[font_color_rechts] ?>;<? } ?>
<? if ($webs[bgcolor_rechts])           { ?>background-color:   #<? echo $webs[bgcolor_rechts] ?>;<? } ?>
}

A:link {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
A:visited {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
A:active {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
A:hover {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
</style>
<style type="text/css">
<!--
table.input
{
        border-width: 2px 1px 1px 2px;
        border-top-color    : #CCCCCC;
        border-left-color   : #CCCCCC;
        border-bottom-color : #AAAAAA;
        border-right-color  : #AAAAAA;
        border-style            :inset;
        background-color        : #FFFFFF;
}       
-->
</style>
<script language="JavaScript">
<!--

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function killkomma(w)
{
 return w.replace(/,/,'.');
}

function call_editor(Feldname,properties)
{
        editor=window.open("../editor/editor.php?properties="+properties,Feldname,"height=400,width=750,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no");;
}

function explore(Feldname,bild_dir,ID)
{
        explorer_fenster=window.open("explore.php?Tab=<? echo $DB ?>&Feld="+Feldname+"&bild_dir="+bild_dir+"&ID="+ID,"explorer_fenster","height=400,width=300,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no");;
}
//-->
</script>
<script language="JavaScript" src="../../checkDate.js"></script>
<meta name="description" content="Redaktionssystem">
<meta name="author" content="Webagentur Niewerth">
<meta name="robots" content="noindex">
</head>

<body bgcolor="#<? echo $webs[bgcolor_seite]; ?>" leftmargin="20" topmargin="10" marginwidth="20" marginheight="10" text="#000000">
<form method="post" action="<? echo $self ?>" name="formname" enctype="multipart/form-data">
  <table width="558" border="0" cellspacing="0" cellpadding="0">
    <tr valign="top"> 
      <td width="508"> 
        <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
          <tr> 
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_links] ?>"><b>eBay-Auktions&uuml;bersicht</b></td>
          </tr>
<?
        if (isset($user_rechte[modul_name][tool_name][waiting]))
        {
                $result=mysql_query
                ("
                        select
                                *,
                                date_format(ListingStartDay,'%d.%m.%Y') as ListingStartDay,
                                time_format(ListingStartTime,'%H:%i')   as ListingStartTime
                        from
                                eBay_Auktionen
                        where
                                eBay_Id=0
                        order by
                                ListingStartDay,
                                ListingStartTime
                ");
                if (mysql_num_rows($result) > 0)
                {
?>
          <tr> 
            <td colspan="2">Queue<br>
              (Noch nicht eingestellte oder fehlerhafte Auktionen)</td>
          </tr>
<?
                }
                while($zeile=mysql_fetch_assoc($result))
                {
?>
          <tr> 
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%">
              <?=$zeile[ListingStartDay];?>
              <br>
              <?=$zeile[ListingStartTime];?><? if (isset($user_rechte[modul_name][tool_name][delWaitingAuction])) {?><a href="<?=$self;?>?action=delete&ID=<?=$zeile[ID];?>"><font color="#FF0000">X</font></a><? } ?></td>
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" width="80%"><a href="javascript:;" onClick="window.open('index.php?edit=<?=$zeile[ID];?>','','status=no,width=1010,height=700')"> 
              <?=$zeile[Title];?>
              </a> 
              <? if ($zeile[eBay_error]) { ?>
              &nbsp;&nbsp;<a href="#" onClick="window.open('error.php?error=<?=urlencode($zeile[eBay_error]);?>','','height=200,width=300');">FEHLER!</a>
              <? } ?>
            </td>
          </tr>
<?
                }
        }
//      if (isset($user_rechte[modul_name][tool_name][running]))
//      {
                $result=mysql_query("select eBay_Auktionen.*,date_format(StartTime,'%d.%m.%Y<br>%H:%i') as StartTime,date_format(EndTime,'%d.%m.%Y %H:%i') as EndTime from eBay_AuktionsDaten,eBay_Auktionen where NOW() <= EndTime and eBay_Auktionen.eBay_Id = eBay_AuktionsDaten.Id order by EndTime");
                if (mysql_num_rows($result) > 0)
                {
?>
          <tr> 
            <td colspan="2">lfd. Auktionen</td>
          </tr>
<?
                }
                while($zeile=mysql_fetch_assoc($result))
                {
?>
          <tr> 
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%">
              <?=$zeile[EndTime];?></td>
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" width="80%"> 
                        <a href="<?=eBaylink($zeile[confDatei]);?>?ViewItem&item=<?=$zeile[eBay_Id];?>&rd=1" target="_blank">
              <img src="../../images/Online-Shop/globeanm.gif" width="15" height="15" border="0"> <?=$zeile[Title];?>
                        </a>
              <!--
                                EbayBezeichnung, 
                aktueller Gebotspreis (Datum Zeit),
                                Gebote / Preis Sofortkauf
                        -->
            </td>
          </tr>
<?
                }
//      }
        if (isset($user_rechte[modul_name][tool_name][finished]))
        {
                $result=mysql_query("select eBay_Auktionen.*,date_format(StartTime,'%d.%m.%Y<br>%H:%i') as StartTime, date_format(EndTime,'%d.%m.%Y %H:%i') as EndTime from eBay_AuktionsDaten,eBay_Auktionen where EndTime < NOW() and eBay_Auktionen.eBay_Id = eBay_AuktionsDaten.Id order by EndTime");
                if (mysql_num_rows($result) > 0)
                {
?>
          <tr> 
            <td colspan="2">abgeschl. Auktionen</td>
          </tr>
<?
                }
                while($zeile=mysql_fetch_assoc($result))
                {
?>
<tr> 
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%"> 
              <?=$zeile[EndTime];?></td>
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" width="80%">
                        <a href="<?=eBaylink($zeile[confDatei]);?>?ViewItem&item=<?=$zeile[eBay_Id];?>&rd=1" target="_blank">
              <img src="../../images/Online-Shop/globeanm.gif" width="15" height="15" border="0"> <?=$zeile[Title];?>
                        </a>

              <!--
                                EbayBezeichnung.
                                Preis,
                                Auktion/Sofortkauf
                          -->
            </td>
          </tr>
<?
                }
        }
?>
          <tr> 
            <td colspan="3" align="right" bgcolor="#<? echo $webs[bgcolor_links] ?>"> 
              <p>&nbsp;</p>
              </td>
          </tr>
        </table>
      </td>
      <td valign="top" align="right" width="50">&nbsp; </td>
</tr>
</table>
</form>
</body>