Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?
2
	$self=basename($PHP_SELF);
3
	$DB="artikel";
4
 
5
	function eBaylink($target)
6
	{
7
		if ($_SESSION[eBay][settings][$target] == "/web/apache/content-management/sandbox.config")
8
		{
9
			return "http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll";
10
		}
11
		else
12
		{
13
			return "http://cgi.ebay.de/ws/eBayISAPI.dll";
14
		}
15
	}
16
 
17
	define ("modul_name", "online_shop");
18
	define ("tool_name", "eBay");
19
	require_once "../connect2.php";
20
 
21
	session_start();
22
 
23
	require_once "/web/apache/content-management/Online-Shop/eBay/system/loadSettings.php";
24
	loadSettings($webs[datenbank]);
25
 
26
	// $charset laden um die jeweiligen ISO-Zeichensätzte zu laden.
27
	require_once "../charset.php";
28
 
29
	switch($_GET[action])
30
	{
31
		case "delete":
32
				mysql_query("delete from eBay_Auktionen where ID=$_GET[ID]");
33
			break;
34
	}
35
?>
36
<html>
37
<head>
38
<title><? echo $webs[kunde_bezeichnung] ?>: Redaktionssystem</title>
39
<meta http-equiv="Content-Type" content="text/html; charset=<? echo $charset ?>">
40
<link rel=stylesheet type="text/css" href="../redaktion.css">
41
<style type="text/css">
42
body
43
{
44
	font-family: Arial, Helvetica, sans-serif; font-size: 10pt;
45
<? if ($webs[font_color_seite])		{ ?>color:				#<? echo $webs[font_color_seite] ?>;<? } ?>
46
<? if ($webs[bgcolor_seite])		{ ?>background-color:	#<? echo $webs[bgcolor_seite] ?>;<? } ?>
47
<? if ($webs[hintergrundbild]) 		{ ?>background-image: url(../images/hintergrundbild/<? echo $webs[hintergrundbild] ?>);<? } ?>
48
}
49
 
50
.links
51
{
52
font-size: 10pt;
53
<? if ($webs[font_color_links])		{ ?>color:				#<? echo $webs[font_color_links] ?>;<? } ?>
54
<? if ($webs[bgcolor_links])		{ ?>background-color:	#<? echo $webs[bgcolor_links] ?>;<? } ?>
55
}
56
 
57
.rechts
58
{
59
font-size: 10pt;
60
<? if ($webs[font_color_rechts])	{ ?>color:				#<? echo $webs[font_color_rechts] ?>;<? } ?>
61
<? if ($webs[bgcolor_rechts])		{ ?>background-color:	#<? echo $webs[bgcolor_rechts] ?>;<? } ?>
62
}
63
 
64
A:link {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
65
A:visited {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
66
A:active {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
67
A:hover {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
68
</style>
69
<style type="text/css">
70
<!--
71
table.input
72
{
73
	border-width: 2px 1px 1px 2px;
74
	border-top-color    : #CCCCCC;
75
	border-left-color   : #CCCCCC;
76
	border-bottom-color : #AAAAAA;
77
	border-right-color  : #AAAAAA;
78
	border-style		:inset;
79
	background-color	: #FFFFFF;
80
}
81
-->
82
</style>
83
<script language="JavaScript">
84
<!--
85
 
86
function MM_swapImgRestore() { //v3.0
87
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
88
}
89
 
90
function MM_preloadImages() { //v3.0
91
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
92
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
93
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
94
}
95
 
96
function MM_swapImage() { //v3.0
97
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
98
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
99
}
100
 
101
function MM_findObj(n, d) { //v4.0
102
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
103
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
104
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
105
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
106
  if(!x && document.getElementById) x=document.getElementById(n); return x;
107
}
108
 
109
function killkomma(w)
110
{
111
 return w.replace(/,/,'.');
112
}
113
 
114
function call_editor(Feldname,properties)
115
{
116
	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");;
117
}
118
 
119
function explore(Feldname,bild_dir,ID)
120
{
121
	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");;
122
}
123
//-->
124
</script>
125
<script language="JavaScript" src="../../checkDate.js"></script>
126
<meta name="description" content="Redaktionssystem">
127
<meta name="author" content="Webagentur Niewerth">
128
<meta name="robots" content="noindex">
129
</head>
130
 
131
<body bgcolor="#<? echo $webs[bgcolor_seite]; ?>" leftmargin="20" topmargin="10" marginwidth="20" marginheight="10" text="#000000">
132
<form method="post" action="<? echo $self ?>" name="formname" enctype="multipart/form-data">
133
  <table width="558" border="0" cellspacing="0" cellpadding="0">
134
    <tr valign="top">
135
      <td width="508">
136
        <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
137
          <tr>
138
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_links] ?>"><b>eBay-Auktions&uuml;bersicht</b></td>
139
          </tr>
140
<?
141
	if (isset($user_rechte[modul_name][tool_name][waiting]))
142
	{
143
		$result=mysql_query
144
		("
145
			select
146
				*,
147
				date_format(ListingStartDay,'%d.%m.%Y') as ListingStartDay,
148
				time_format(ListingStartTime,'%H:%i')	as ListingStartTime
149
			from
150
				eBay_Auktionen
151
			where
152
				eBay_Id=0
153
			order by
154
				ListingStartDay,
155
				ListingStartTime
156
		");
157
		if (mysql_num_rows($result) > 0)
158
		{
159
?>
160
          <tr>
161
            <td colspan="2">Queue<br>
162
              (Noch nicht eingestellte oder fehlerhafte Auktionen)</td>
163
          </tr>
164
<?
165
		}
166
		while($zeile=mysql_fetch_assoc($result))
167
		{
168
?>
169
          <tr>
170
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%">
171
              <?=$zeile[ListingStartDay];?>
172
              <br>
173
              <?=$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>
174
            <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')">
175
              <?=$zeile[Title];?>
176
              </a>
177
              <? if ($zeile[eBay_error]) { ?>
178
              &nbsp;&nbsp;<a href="#" onClick="window.open('error.php?error=<?=urlencode($zeile[eBay_error]);?>','','height=200,width=300');">FEHLER!</a>
179
              <? } ?>
180
            </td>
181
          </tr>
182
<?
183
		}
184
	}
185
//	if (isset($user_rechte[modul_name][tool_name][running]))
186
//	{
187
		$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");
188
		if (mysql_num_rows($result) > 0)
189
		{
190
?>
191
          <tr>
192
            <td colspan="2">lfd. Auktionen</td>
193
          </tr>
194
<?
195
		}
196
		while($zeile=mysql_fetch_assoc($result))
197
		{
198
?>
199
          <tr>
200
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%">
201
              <?=$zeile[EndTime];?></td>
202
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" width="80%">
203
			<a href="<?=eBaylink($zeile[confDatei]);?>?ViewItem&item=<?=$zeile[eBay_Id];?>&rd=1" target="_blank">
204
              <img src="../../images/Online-Shop/globeanm.gif" width="15" height="15" border="0"> <?=$zeile[Title];?>
205
			</a>
206
              <!--
207
				EbayBezeichnung,
208
              	aktueller Gebotspreis (Datum Zeit),
209
				Gebote / Preis Sofortkauf
210
			-->
211
            </td>
212
          </tr>
213
<?
214
		}
215
//	}
216
	if (isset($user_rechte[modul_name][tool_name][finished]))
217
	{
218
		$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");
219
		if (mysql_num_rows($result) > 0)
220
		{
221
?>
222
          <tr>
223
            <td colspan="2">abgeschl. Auktionen</td>
224
          </tr>
225
<?
226
		}
227
		while($zeile=mysql_fetch_assoc($result))
228
		{
229
?>
230
<tr>
231
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%">
232
              <?=$zeile[EndTime];?></td>
233
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" width="80%">
234
			<a href="<?=eBaylink($zeile[confDatei]);?>?ViewItem&item=<?=$zeile[eBay_Id];?>&rd=1" target="_blank">
235
              <img src="../../images/Online-Shop/globeanm.gif" width="15" height="15" border="0"> <?=$zeile[Title];?>
236
			</a>
237
 
238
              <!--
239
				EbayBezeichnung.
240
				Preis,
241
				Auktion/Sofortkauf
242
			  -->
243
            </td>
244
          </tr>
245
<?
246
		}
247
	}
248
?>
249
          <tr>
250
            <td colspan="3" align="right" bgcolor="#<? echo $webs[bgcolor_links] ?>">
251
              <p>&nbsp;</p>
252
              </td>
253
          </tr>
254
        </table>
255
      </td>
256
      <td valign="top" align="right" width="50">&nbsp; </td>
257
</tr>
258
</table>
259
</form>
260
</body>