| 1 |
lars |
1 |
<?
|
|
|
2 |
session_start();
|
|
|
3 |
require_once "../connect2.php";
|
|
|
4 |
require_once "system/loadSettings.php";
|
|
|
5 |
loadSettings("mediaran_de");
|
|
|
6 |
|
|
|
7 |
$steps=array( "Was", "Was genau", "Wie", "Wann");
|
|
|
8 |
|
|
|
9 |
foreach(array_keys($_POST) as $key)
|
|
|
10 |
{
|
|
|
11 |
$_SESSION[eBay][editor][$key]=$_REQUEST[$key];
|
|
|
12 |
}
|
|
|
13 |
|
|
|
14 |
if ($_GET[artikel_ID])
|
|
|
15 |
{
|
|
|
16 |
unset($_SESSION[eBay][editor]);
|
|
|
17 |
|
|
|
18 |
$_SESSION[eBay][editor]=array
|
|
|
19 |
(
|
|
|
20 |
"ListingStartTime" => $_SESSION[eBay][settings][ListingStartTime],
|
|
|
21 |
"Duration" => $_SESSION[eBay][settings][Duration]
|
|
|
22 |
);
|
|
|
23 |
|
|
|
24 |
// Daten des Artikel aus der Tabelle "artikel" laden
|
|
|
25 |
$query = "
|
|
|
26 |
select
|
|
|
27 |
Father,
|
|
|
28 |
preis1,
|
|
|
29 |
preis1 as MinimumBid,
|
|
|
30 |
preis1+".$_SESSION[eBay][settings][BuyItNowPriceAddon]." as BuyItNowPrice,
|
|
|
31 |
kurzbezeichnung as Title,
|
|
|
32 |
beschreibung as Description,
|
|
|
33 |
1 as Quantity
|
|
|
34 |
from
|
|
|
35 |
artikel
|
|
|
36 |
where
|
|
|
37 |
ID = ".$_GET[artikel_ID]."
|
|
|
38 |
and
|
|
|
39 |
Language='DE'
|
|
|
40 |
";
|
|
|
41 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
|
|
|
42 |
if ($zeile=mysql_fetch_assoc($result))
|
|
|
43 |
{
|
|
|
44 |
foreach(array_keys($zeile) as $key)
|
|
|
45 |
{
|
|
|
46 |
$_SESSION[eBay][editor][$key]=$zeile[$key];
|
|
|
47 |
}
|
|
|
48 |
$Artikel=$_SESSION[eBay][editor];
|
|
|
49 |
eval("\$buffer=\"".htmlspecialchars(str_replace("\"","\\\"",$_SESSION[eBay][settings][Description]), ENT_NOQUOTES)."\";");
|
|
|
50 |
$_SESSION[eBay][editor][Description]=$buffer;
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
// Daten eines Schwesterartikel aus der vorherigen Auktionen
|
|
|
54 |
$query="
|
|
|
55 |
SELECT DISTINCT
|
|
|
56 |
eBay_Auktionen.MinimumBid,
|
|
|
57 |
eBay_Auktionen.Category,
|
|
|
58 |
eBay_Auktionen.ListingStartTime,
|
|
|
59 |
eBay_Auktionen.Duration,
|
|
|
60 |
eBay_Auktionen.Private
|
|
|
61 |
FROM
|
|
|
62 |
artikel,
|
|
|
63 |
eBay_Auktionen
|
|
|
64 |
WHERE
|
|
|
65 |
artikel.Father = ".$_SESSION[eBay][editor][Father]."
|
|
|
66 |
AND
|
|
|
67 |
eBay_Auktionen.artikel_ID = artikel.ID
|
|
|
68 |
ORDER BY
|
|
|
69 |
eBay_Auktionen.ID
|
|
|
70 |
LIMIT 1
|
|
|
71 |
";
|
|
|
72 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
|
|
|
73 |
if ($sibling=mysql_fetch_assoc($result))
|
|
|
74 |
{
|
|
|
75 |
foreach(array_keys($sibling) as $key)
|
|
|
76 |
{
|
|
|
77 |
$_SESSION[eBay][editor][$key]=$sibling[$key];
|
|
|
78 |
}
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
// Daten des Artikel aus der vorherigen Auktionen laden
|
|
|
82 |
$query = "select * from eBay_Auktionen where artikel_ID = ".$_GET[artikel_ID]." order by ID desc";
|
|
|
83 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
|
|
|
84 |
if ($previous=mysql_fetch_assoc($result))
|
|
|
85 |
{
|
|
|
86 |
foreach(array_keys($previous) as $key)
|
|
|
87 |
{
|
|
|
88 |
$_SESSION[eBay][editor][$key]=$previous[$key];
|
|
|
89 |
}
|
|
|
90 |
}
|
|
|
91 |
$_SESSION[eBay][editor][ListingStartDay]=date("Y-m-d");
|
|
|
92 |
|
|
|
93 |
foreach(array_keys($_SESSION[eBay][editor]) as $key)
|
|
|
94 |
{
|
|
|
95 |
$_SESSION[eBay][editor][$key]=strip_tags($_SESSION[eBay][editor][$key]);
|
|
|
96 |
}
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
if ($_POST[step] == $steps[count($steps)-1])
|
|
|
101 |
{
|
|
|
102 |
foreach(array("preis1","step","PHPSESSID","Father") as $elem)
|
|
|
103 |
{
|
|
|
104 |
unset($_SESSION[eBay][editor][$elem]);
|
|
|
105 |
}
|
|
|
106 |
$dataKeys=implode(", ",array_keys($_SESSION[eBay][editor]));
|
|
|
107 |
$dataValues="'".implode("', '",$_SESSION[eBay][editor])."'";
|
|
|
108 |
|
|
|
109 |
$query="insert into eBay_Auktionen ($dataKeys) values ($dataValues)";
|
|
|
110 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
|
|
|
111 |
unset($_SESSION[eBay][editor]);
|
|
|
112 |
header("Location: Auktionen_abschicken.php");
|
|
|
113 |
exit;
|
|
|
114 |
}
|
|
|
115 |
?>
|
|
|
116 |
<html>
|
|
|
117 |
<head>
|
|
|
118 |
<title>Online-Shop Ebay-Interface</title>
|
|
|
119 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
120 |
<style type="text/css">
|
|
|
121 |
<!--
|
|
|
122 |
td { font-family: Arial, Helvetica, sans-serif; font-size: 14px}
|
|
|
123 |
.bold { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold}
|
|
|
124 |
.small { font-family: Arial, Helvetica, sans-serif; font-size: 9px}
|
|
|
125 |
-->
|
|
|
126 |
</style>
|
|
|
127 |
<script language="JavaScript" src="../../checkDate.js"></script>
|
|
|
128 |
<script language=JavaScript>
|
|
|
129 |
function AuktionOnly(form)
|
|
|
130 |
{
|
|
|
131 |
if ((form.MinimumBid.value > 0) && (form.Quantity.value > 1))
|
|
|
132 |
{
|
|
|
133 |
if (confirm('Bei einer Auktion kann immer nur EIN Artikel versteigert werden!\nSoll die Menge auf \"1\" zurückgesetzt gesetzt werden?'))
|
|
|
134 |
{
|
|
|
135 |
form.Quantity.value=1;
|
|
|
136 |
}
|
|
|
137 |
else
|
|
|
138 |
{
|
|
|
139 |
alert('Menge wird nicht zurückgesetzt!\nAuktion nicht möglich!');
|
|
|
140 |
form.MinimumBid.value='';
|
|
|
141 |
}
|
|
|
142 |
}
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
function SofortKaufOnly(form)
|
|
|
146 |
{
|
|
|
147 |
if ((form.MinimumBid.value > 0) && (form.Quantity.value > 1))
|
|
|
148 |
{
|
|
|
149 |
if (confirm('Bei einer Auktion kann immer nur EIN Artikel versteigert werden!\nSoll das Mindestgebot entfernt werden?'))
|
|
|
150 |
{
|
|
|
151 |
form.MinimumBid.value='';
|
|
|
152 |
}
|
|
|
153 |
else
|
|
|
154 |
{
|
|
|
155 |
alert('Mindestgebot wird nicht zurückgesetzt!\nMenge wird auf \"1\" zurückgesetzt!');
|
|
|
156 |
form.Quantity.value=1;
|
|
|
157 |
}
|
|
|
158 |
}
|
|
|
159 |
}
|
|
|
160 |
|
|
|
161 |
function browseCategories(source)
|
|
|
162 |
{
|
|
|
163 |
window.open("browseCategories.php",source,"width=800,height=600,scrollbars=yes,resizable=yes");
|
|
|
164 |
}
|
|
|
165 |
</script>
|
|
|
166 |
</head>
|
|
|
167 |
<body>
|
|
|
168 |
<form name="eBay" method="post" action="<?=$self?>">
|
|
|
169 |
<?
|
|
|
170 |
if ($_GET[artikel_ID])
|
|
|
171 |
{
|
|
|
172 |
?><input type="hidden" name="artikel_ID" value="<?=$_GET[artikel_ID];?>"><?
|
|
|
173 |
}
|
|
|
174 |
?>
|
|
|
175 |
<table width="100%" height="200" border="0" cellspacing="0" cellpadding="0">
|
|
|
176 |
<tr>
|
|
|
177 |
<td colspan="2">
|
|
|
178 |
<?
|
|
|
179 |
if (!$_REQUEST[step]) {$step=$steps[0];}
|
|
|
180 |
else {$step=$steps[array_search($step, $steps)+1];}
|
|
|
181 |
|
|
|
182 |
foreach($steps as $current_step)
|
|
|
183 |
{
|
|
|
184 |
if ($step == $current_step) {$class="bold";} else {$class="";}
|
|
|
185 |
echo "<span class=".$class.">".$current_step."</span> ";
|
|
|
186 |
}
|
|
|
187 |
?>
|
|
|
188 |
?
|
|
|
189 |
<hr noshade>
|
|
|
190 |
</td>
|
|
|
191 |
</tr>
|
|
|
192 |
<tr>
|
|
|
193 |
<td valign="top" width="100%" height="100%">
|
|
|
194 |
<table border=0 width="100%" cellpadding="0" cellspacing="0">
|
|
|
195 |
<?
|
|
|
196 |
switch ($step)
|
|
|
197 |
{
|
|
|
198 |
case "Wie":
|
|
|
199 |
?>
|
|
|
200 |
<tr>
|
|
|
201 |
<td width="44%" valign="top" rowspan="2">Auktion:<br>
|
|
|
202 |
<span class="small">(Verkauf zum Höchstgebot)</span></td>
|
|
|
203 |
<td width="10%">
|
|
|
204 |
<input name="MinimumBid" type="text" size="5" value="<?=$_SESSION[eBay][editor][MinimumBid];?>" onBlur="AuktionOnly(this.form)" onChange="this.value=killkomma(this.value);">
|
|
|
205 |
€ </td>
|
|
|
206 |
<td width="46%">Mindestgebot</td>
|
|
|
207 |
</tr>
|
|
|
208 |
<tr>
|
|
|
209 |
<td width="10%"> </td>
|
|
|
210 |
<td width="46%"><span class="small">Aktueller Shop-Preis:
|
|
|
211 |
<?=$_SESSION[eBay][editor][preis1];?>
|
|
|
212 |
</span></td>
|
|
|
213 |
</tr>
|
|
|
214 |
<tr>
|
|
|
215 |
<td width="44%">SofortKauf:<br>
|
|
|
216 |
<span class="small">(Verkauf zum Festpreis)</span></td>
|
|
|
217 |
<td colspan="2">
|
|
|
218 |
<input name="BuyItNowPrice" type="text" size="5" value="<?=$_SESSION[eBay][editor][BuyItNowPrice];?>" onChange="this.value=killkomma(this.value);">
|
|
|
219 |
€ </td>
|
|
|
220 |
</tr>
|
|
|
221 |
<tr>
|
|
|
222 |
<td width="44%">Menge:<br>
|
|
|
223 |
<span class="small">(bei Auktionen immer 1)</span> </td>
|
|
|
224 |
<td colspan="2">
|
|
|
225 |
<input name="Quantity" type="text" size="5" value="<?=$_SESSION[eBay][editor][Quantity];?>" onBlur="SofortKaufOnly(this.form)">
|
|
|
226 |
Stück</td>
|
|
|
227 |
</tr>
|
|
|
228 |
<?
|
|
|
229 |
break;
|
|
|
230 |
case "Was":
|
|
|
231 |
?>
|
|
|
232 |
<tr>
|
|
|
233 |
<td width="44%">Artikel:</td>
|
|
|
234 |
<td colspan="2">
|
|
|
235 |
<input name="Title" type="text" value="<?=$_SESSION[eBay][editor][Title];?>">
|
|
|
236 |
</td>
|
|
|
237 |
</tr>
|
|
|
238 |
<tr>
|
|
|
239 |
<td width="44%">Untertitel:<br>
|
|
|
240 |
<span class="small">(kostenpflichtig!)</span></td>
|
|
|
241 |
<td colspan="2">
|
|
|
242 |
<input name="SubtitleText" type="text" value="<?=$_SESSION[eBay][editor][SubtitleText];?>">
|
|
|
243 |
</td>
|
|
|
244 |
</tr>
|
|
|
245 |
<tr>
|
|
|
246 |
<td width="44%">Kategorie:</td>
|
|
|
247 |
<td colspan="2">
|
|
|
248 |
<input type="text" name="Category" value="<?=$_SESSION[eBay][editor][Category];?>">
|
|
|
249 |
<input type="button" value="Kategorie wählen" onClick="browseCategories('Category')">
|
|
|
250 |
</td>
|
|
|
251 |
</tr>
|
|
|
252 |
<tr>
|
|
|
253 |
<td width="44%">Kategorie2:<br>
|
|
|
254 |
<span class="small"><span class="small">(kostenpflichtig!)</span></span></td>
|
|
|
255 |
<td colspan="2">
|
|
|
256 |
<input type="text" name="Category2" value="<?=$_SESSION[eBay][editor][Category2];?>">
|
|
|
257 |
<input type="button" value="Kategorie wählen" onClick="browseCategories('Category2')">
|
|
|
258 |
</td>
|
|
|
259 |
</tr>
|
|
|
260 |
<?
|
|
|
261 |
break;
|
|
|
262 |
case "Was genau":
|
|
|
263 |
?>
|
|
|
264 |
<tr>
|
|
|
265 |
<td width="44%" valign="top">Beschreibung:</td>
|
|
|
266 |
<td colspan="2">
|
|
|
267 |
<textarea name="Description" cols="59" rows="12"><? echo $_SESSION[eBay][editor][Description]; ?></textarea>
|
|
|
268 |
</td>
|
|
|
269 |
</tr>
|
|
|
270 |
<?
|
|
|
271 |
break;
|
|
|
272 |
case "Wann":
|
|
|
273 |
?>
|
|
|
274 |
<tr>
|
|
|
275 |
<td width="44%">Start:</td>
|
|
|
276 |
<td colspan="2">
|
|
|
277 |
<input name="ListingStartDay" type="text" size="10" value="<?=$_SESSION[eBay][editor][ListingStartDay];?>" onFocus="if (this.value=='') {this.value=now('')};this.select();">
|
|
|
278 |
<input name="ListingStartTime" type="text" size="5" value="<?=$_SESSION[eBay][editor][ListingStartTime];?>" onFocus="if (this.value=='') {this.value='19:00';};this.select();">
|
|
|
279 |
</td>
|
|
|
280 |
</tr>
|
|
|
281 |
<tr>
|
|
|
282 |
<td width="44%">Dauer:</td>
|
|
|
283 |
<td colspan="2">
|
|
|
284 |
<select name="Duration">
|
|
|
285 |
<option value="1">1 Tag</option>
|
|
|
286 |
<option value="3">3 Tage</option>
|
|
|
287 |
<option value="5">5 Tage</option>
|
|
|
288 |
<option value="7">7 Tage</option>
|
|
|
289 |
<option value="10">10 Tage</option>
|
|
|
290 |
</select>
|
|
|
291 |
</td>
|
|
|
292 |
</tr>
|
|
|
293 |
<tr>
|
|
|
294 |
<td width="44%">Privatauktion:</td>
|
|
|
295 |
<td colspan="2">
|
|
|
296 |
<input type="hidden" name="Private" value="">
|
|
|
297 |
<input type="checkbox" name="Private" value="1" <? if ($_SESSION[eBay][editor][Private]) {echo " checked";} ?>>
|
|
|
298 |
</td>
|
|
|
299 |
</tr>
|
|
|
300 |
<?
|
|
|
301 |
break;
|
|
|
302 |
}
|
|
|
303 |
?>
|
|
|
304 |
</table>
|
|
|
305 |
</td>
|
|
|
306 |
</tr>
|
|
|
307 |
<tr>
|
|
|
308 |
<td colspan="2" align="center">
|
|
|
309 |
<hr noshade>
|
|
|
310 |
<input type="submit" value="< Zurück" onClick="this.form.step.value='<?=$steps[array_search($step, $steps)-2];?>';">
|
|
|
311 |
|
|
|
312 |
<input type="reset" value="Zurücksetzen">
|
|
|
313 |
<input type="submit" value="Weiter >">
|
|
|
314 |
<input type="hidden" name="step" value="<?=$step;?>">
|
|
|
315 |
</td>
|
|
|
316 |
</tr>
|
|
|
317 |
</table>
|
|
|
318 |
</form>
|
|
|
319 |
</body>
|
|
|
320 |
</html>
|
|
|
321 |
|
|
|
322 |
|
|
|
323 |
|
|
|
324 |
|
|
|
325 |
|
|
|
326 |
|
|
|
327 |
|
|
|
328 |
|
|
|
329 |
|
|
|
330 |
|
|
|
331 |
|
|
|
332 |
|
|
|
333 |
|
|
|
334 |
|
|
|
335 |
|
|
|
336 |
|
|
|
337 |
|
|
|
338 |
|
|
|
339 |
|
|
|
340 |
|
|
|
341 |
|
|
|
342 |
|
|
|
343 |
|
|
|
344 |
|
|
|
345 |
|
|
|
346 |
|
|
|
347 |
|
|
|
348 |
|
|
|
349 |
|
|
|
350 |
|
|
|
351 |
|
|
|
352 |
|
|
|
353 |
|
|
|
354 |
|
|
|
355 |
|
|
|
356 |
|
|
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
|
360 |
|
|
|
361 |
|
|
|
362 |
|
|
|
363 |
|
|
|
364 |
|