| 1 |
lars |
1 |
<?
|
|
|
2 |
require_once "../connect2.php";
|
|
|
3 |
require_once "../../Warenwirtschaft/includes/statistik/system.php";
|
|
|
4 |
require_once "system.php";
|
|
|
5 |
|
|
|
6 |
if ( $_REQUEST["filter"] )
|
|
|
7 |
{
|
|
|
8 |
$_SESSION["onlineshop"]["individual"]["filter"] = $_REQUEST["filter"];
|
|
|
9 |
}
|
|
|
10 |
$filter = $_SESSION["onlineshop"]["individual"]["filter"];
|
|
|
11 |
if ( empty( $filter["gueltig"] ) )
|
|
|
12 |
{
|
|
|
13 |
$filter["gueltig"] = "neu";
|
|
|
14 |
}
|
|
|
15 |
|
|
|
16 |
if ( $_REQUEST["mailSend"] )
|
|
|
17 |
{
|
|
|
18 |
$sql = "
|
|
|
19 |
SELECT
|
|
|
20 |
*
|
|
|
21 |
FROM
|
|
|
22 |
web_settings
|
|
|
23 |
WHERE
|
|
|
24 |
id=11
|
|
|
25 |
AND
|
|
|
26 |
shops_ID=" . $_REQUEST["shops_ID"] . "
|
|
|
27 |
";
|
|
|
28 |
$res = mysql_query( $sql );
|
|
|
29 |
$row = mysql_fetch_assoc( $res );
|
|
|
30 |
$email_from = $row["Inhalt"];
|
|
|
31 |
require_once "../../Warenwirtschaft/MailClient/mail_func.php";
|
|
|
32 |
$extra["headers"] = array( "From" => $email_from );
|
|
|
33 |
$extra["shops_ID"] = $_REQUEST["shops_ID"];
|
|
|
34 |
if ( $_POST["url"] )
|
|
|
35 |
{
|
|
|
36 |
// mail("niewerth@weban.de", "Übergabe an Pixelconsult (Preisanfrage)", $_POST["url"], "From: info@$site");
|
|
|
37 |
$url = $_POST["url"];
|
|
|
38 |
require_once $url;
|
|
|
39 |
}
|
|
|
40 |
send_email( $_REQUEST["mailTo"], $_REQUEST["mailSubject"],
|
|
|
41 |
stripslashes( $_REQUEST["mailText"] ), $extra );
|
|
|
42 |
}
|
|
|
43 |
if ( $_REQUEST["updateOK"] || $_REQUEST["updateNO"] )
|
|
|
44 |
{
|
|
|
45 |
$_GET["edit"] = $_REQUEST["ID"];
|
|
|
46 |
$_REQUEST["update"] = true;
|
|
|
47 |
|
|
|
48 |
if ( $_REQUEST["updateOK"] )
|
|
|
49 |
{
|
|
|
50 |
if ( $_REQUEST["erstellt_von"] == "Artikelanfrage" )
|
|
|
51 |
{
|
|
|
52 |
$id_subject_ok = 105;
|
|
|
53 |
$id_body_ok = 106;
|
|
|
54 |
}
|
|
|
55 |
else
|
|
|
56 |
{
|
|
|
57 |
$id_subject_ok = 101;
|
|
|
58 |
$id_body_ok = 102;
|
|
|
59 |
}
|
|
|
60 |
$sql = "
|
|
|
61 |
SELECT
|
|
|
62 |
*
|
|
|
63 |
FROM
|
|
|
64 |
web_settings
|
|
|
65 |
WHERE
|
|
|
66 |
id=$id_subject_ok
|
|
|
67 |
AND
|
|
|
68 |
shops_ID=" . $_REQUEST["shops_ID"] . "
|
|
|
69 |
";
|
|
|
70 |
$res = mysql_query( $sql );
|
|
|
71 |
$row = mysql_fetch_assoc( $res );
|
|
|
72 |
$mailSubject = $row["Inhalt"];
|
|
|
73 |
$sql = "
|
|
|
74 |
SELECT
|
|
|
75 |
*
|
|
|
76 |
FROM
|
|
|
77 |
web_settings
|
|
|
78 |
WHERE
|
|
|
79 |
id=$id_body_ok
|
|
|
80 |
AND
|
|
|
81 |
shops_ID=" . $_REQUEST["shops_ID"] . "
|
|
|
82 |
";
|
|
|
83 |
$res = mysql_query( $sql );
|
|
|
84 |
$row = mysql_fetch_assoc( $res );
|
|
|
85 |
$mailText = $row["Inhalt"];
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
if ( $_REQUEST["updateNO"] )
|
|
|
89 |
{
|
|
|
90 |
if ( $_REQUEST["erstellt_von"] == "Artikelanfrage" )
|
|
|
91 |
{
|
|
|
92 |
$id_subject_no = 107;
|
|
|
93 |
$id_body_no = 108;
|
|
|
94 |
}
|
|
|
95 |
else
|
|
|
96 |
{
|
|
|
97 |
$id_subject_no = 103;
|
|
|
98 |
$id_body_no = 104;
|
|
|
99 |
}
|
|
|
100 |
$sql = "
|
|
|
101 |
SELECT
|
|
|
102 |
*
|
|
|
103 |
FROM
|
|
|
104 |
web_settings
|
|
|
105 |
WHERE
|
|
|
106 |
id=$id_subject_no
|
|
|
107 |
AND
|
|
|
108 |
shops_ID=" . $_REQUEST["shops_ID"] . "
|
|
|
109 |
";
|
|
|
110 |
$res = mysql_query( $sql );
|
|
|
111 |
$row = mysql_fetch_assoc( $res );
|
|
|
112 |
$mailSubject = $row["Inhalt"];
|
|
|
113 |
$sql = "SELECT
|
|
|
114 |
*
|
|
|
115 |
FROM
|
|
|
116 |
web_settings
|
|
|
117 |
WHERE
|
|
|
118 |
id=$id_body_no
|
|
|
119 |
AND
|
|
|
120 |
shops_ID=" . $_REQUEST["shops_ID"] . "
|
|
|
121 |
";
|
|
|
122 |
$res = mysql_query( $sql );
|
|
|
123 |
$row = mysql_fetch_assoc( $res );
|
|
|
124 |
$mailText = $row["Inhalt"];
|
|
|
125 |
}
|
|
|
126 |
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
$a_id = checkItem( $_REQUEST["itemAdd"]["artikel_ID"], $_REQUEST["shops_ID"] );
|
|
|
130 |
if ( $a_id )
|
|
|
131 |
{
|
|
|
132 |
sonderPreisSetItem( $_REQUEST["ID"], $a_id, "", $_REQUEST["itemAdd"]["preis"] );
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
if ( $_REQUEST["update"] )
|
|
|
136 |
{
|
|
|
137 |
foreach ( $_REQUEST["value"]["preis"] as $ID => $preis )
|
|
|
138 |
{
|
|
|
139 |
$query = "
|
|
|
140 |
update
|
|
|
141 |
sonderPreisArtikel
|
|
|
142 |
set
|
|
|
143 |
preis='" . $preis . "',
|
|
|
144 |
inBasket='" . $_REQUEST["value"]["inBasket"][$ID] . "',
|
|
|
145 |
letzte_Aenderung_von = '$PHP_AUTH_USER'
|
|
|
146 |
where
|
|
|
147 |
ID = '" . $ID . "'
|
|
|
148 |
";
|
|
|
149 |
mysql_query( $query ) or die( mysql_errno() . ": " . mysql_error
|
|
|
150 |
() . pre( $query, true ) );
|
|
|
151 |
}
|
|
|
152 |
|
|
|
153 |
$query = "
|
|
|
154 |
update
|
|
|
155 |
sonderPreis
|
|
|
156 |
set
|
|
|
157 |
gueltigVon = '" . implode( "-", array_reverse( explode( ".", $gueltigVon ) ) ) .
|
|
|
158 |
" 00:00:00',
|
|
|
159 |
gueltigBis = '" . implode( "-", array_reverse( explode( ".", $gueltigBis ) ) ) .
|
|
|
160 |
" 23:59:59',
|
|
|
161 |
letzte_Aenderung_von = '$PHP_AUTH_USER'
|
|
|
162 |
where
|
|
|
163 |
ID = '" . $_REQUEST["ID"] . "'
|
|
|
164 |
";
|
|
|
165 |
mysql_query( $query ) or die( mysql_errno() . ": " . mysql_error() .
|
|
|
166 |
pre( $query, true ) );
|
|
|
167 |
|
|
|
168 |
}
|
|
|
169 |
|
|
|
170 |
if ( $_REQUEST["deleteAnfrage"] )
|
|
|
171 |
{
|
|
|
172 |
if ( is_array( $_REQUEST["deleteAnfrage"] ) )
|
|
|
173 |
{
|
|
|
174 |
foreach ( $_REQUEST["deleteAnfrage"] as $anfrageID )
|
|
|
175 |
{
|
|
|
176 |
$query = "delete from sonderPreis where ID = '$anfrageID'";
|
|
|
177 |
mysql_query( $query ) or die( mysql_errno() . ": " .
|
|
|
178 |
mysql_error() . pre( $query, true ) );
|
|
|
179 |
|
|
|
180 |
$query =
|
|
|
181 |
"delete from sonderPreisArtikel where sonderPreis_ID = '$anfrageID'";
|
|
|
182 |
mysql_query( $query ) or die( mysql_errno() . ": " .
|
|
|
183 |
mysql_error() . pre( $query, true ) );
|
|
|
184 |
}
|
|
|
185 |
}
|
|
|
186 |
else
|
|
|
187 |
{
|
|
|
188 |
$query = "delete from sonderPreis where ID = '" . $_REQUEST["deleteAnfrage"] .
|
|
|
189 |
"'";
|
|
|
190 |
mysql_query( $query ) or die( mysql_errno() . ": " . mysql_error
|
|
|
191 |
() . pre( $query, true ) );
|
|
|
192 |
|
|
|
193 |
$query =
|
|
|
194 |
"delete from sonderPreisArtikel where sonderPreis_ID = '" .
|
|
|
195 |
$_REQUEST["deleteAnfrage"] . "'";
|
|
|
196 |
mysql_query( $query ) or die( mysql_errno() . ": " . mysql_error
|
|
|
197 |
() . pre( $query, true ) );
|
|
|
198 |
}
|
|
|
199 |
}
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
if ( $_REQUEST["deleteItem"] )
|
|
|
203 |
{
|
|
|
204 |
$query = "delete from sonderPreisArtikel where ID = '" . $_REQUEST["deleteItem"] .
|
|
|
205 |
"'";
|
|
|
206 |
mysql_query( $query ) or die( mysql_errno() . ": " . mysql_error() .
|
|
|
207 |
pre( $query, true ) );
|
|
|
208 |
} ?>
|
|
|
209 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
210 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
211 |
<head>
|
|
|
212 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
|
213 |
<title>Sonder-Preis</title>
|
|
|
214 |
<link rel="stylesheet" type="text/css" href="../redaktion.css">
|
|
|
215 |
<style>
|
|
|
216 |
td { vertical-align:top; }
|
|
|
217 |
ul { margin:0px; }
|
|
|
218 |
td.delete {text-align:center; }
|
|
|
219 |
input.button { width:100px; float:right; }
|
|
|
220 |
input.terminButton { width:100px; }
|
|
|
221 |
</style>
|
|
|
222 |
<style media="print">
|
|
|
223 |
.noprint
|
|
|
224 |
{
|
|
|
225 |
display:none;
|
|
|
226 |
}
|
|
|
227 |
</style>
|
|
|
228 |
<script language="javascript">
|
|
|
229 |
function formatTime(timeobj)
|
|
|
230 |
{
|
|
|
231 |
//with (timeobj) { return getFullYear()+"-"+(getMonth()+1)+"-"+getDate()+" "+getHours()+":"+getMinutes()+":"+getSeconds(); }
|
|
|
232 |
with (timeobj) { return getDate()+"."+(getMonth()+1)+"."+getFullYear(); }
|
|
|
233 |
}
|
|
|
234 |
function artikel_suche(lang)
|
|
|
235 |
{
|
|
|
236 |
open('artikelsuche.php?lang='+lang,'artikelsuche');
|
|
|
237 |
}
|
|
|
238 |
function setZeitraum(formobj, intervall)
|
|
|
239 |
{
|
|
|
240 |
var oneDaymilliseconds = 1000*60*60*24;
|
|
|
241 |
var Jetzt = new Date();
|
|
|
242 |
var Dann = new Date(Jetzt.getTime() + oneDaymilliseconds * intervall);
|
|
|
243 |
|
|
|
244 |
with (formobj)
|
|
|
245 |
{
|
|
|
246 |
gueltigVon.value = formatTime(Jetzt);
|
|
|
247 |
gueltigBis.value = formatTime(Dann);
|
|
|
248 |
}
|
|
|
249 |
}
|
|
|
250 |
|
|
|
251 |
function killkomma(w)
|
|
|
252 |
{
|
|
|
253 |
return w.replace(/,/,'.');
|
|
|
254 |
}
|
|
|
255 |
|
|
|
256 |
function check_all()
|
|
|
257 |
{
|
|
|
258 |
with (document.forms[0])
|
|
|
259 |
{
|
|
|
260 |
for (i=0; i < elements.length; i++)
|
|
|
261 |
{
|
|
|
262 |
if (elements[i].type == "checkbox")
|
|
|
263 |
{
|
|
|
264 |
elements[i].checked=true;
|
|
|
265 |
}
|
|
|
266 |
}
|
|
|
267 |
}
|
|
|
268 |
}
|
|
|
269 |
|
|
|
270 |
function uncheck_all()
|
|
|
271 |
{
|
|
|
272 |
with (document.forms[0])
|
|
|
273 |
{
|
|
|
274 |
for (i=0; i < elements.length; i++)
|
|
|
275 |
{
|
|
|
276 |
if (elements[i].type == "checkbox")
|
|
|
277 |
{
|
|
|
278 |
elements[i].checked=false;
|
|
|
279 |
}
|
|
|
280 |
}
|
|
|
281 |
}
|
|
|
282 |
}
|
|
|
283 |
</script>
|
|
|
284 |
</head>
|
|
|
285 |
<body>
|
|
|
286 |
<?
|
|
|
287 |
$gueltigOptionen = array( array( "ID" => "neu", "Name" => "neu" ), array
|
|
|
288 |
( "ID" => "aktuell", "Name" => "aktuell" ), array( "ID" =>
|
|
|
289 |
"abgelaufen", "Name" => "abgelaufen" ), array( "ID" => "kommend",
|
|
|
290 |
"Name" => "kommend" ) ); ?>
|
|
|
291 |
<form action="<?= $self; ?>" method="post" name="individualpreis">
|
|
|
292 |
<table border="1" cellspacing="0" cellpadding="2" style="width:700px" class="noprint">
|
|
|
293 |
<tr>
|
|
|
294 |
<td class="links">SonderPreis Übersicht: </td>
|
|
|
295 |
</tr>
|
|
|
296 |
<tr>
|
|
|
297 |
<td class="rechts">
|
|
|
298 |
<table border="0" cellspacing="0" cellpadding="2">
|
|
|
299 |
<tr class="rechts">
|
|
|
300 |
<td>Shop</td>
|
|
|
301 |
<td>
|
|
|
302 |
<? select( "filter[shop]", getShops(), "ID",
|
|
|
303 |
"Name", $filter["shop"], false ); ?>
|
|
|
304 |
</td>
|
|
|
305 |
<td>Name</td>
|
|
|
306 |
<td>
|
|
|
307 |
<input type="text" name="filter[name]" value="<?= $filter["name"]; ?>" />
|
|
|
308 |
</td>
|
|
|
309 |
<td>Gültigkeit</td>
|
|
|
310 |
<td>
|
|
|
311 |
<? select( "filter[gueltig]", $gueltigOptionen,
|
|
|
312 |
"ID", "Name", $filter["gueltig"], false ); ?>
|
|
|
313 |
</td>
|
|
|
314 |
<td>
|
|
|
315 |
<input type="submit" value="OK" class="button" />
|
|
|
316 |
</td>
|
|
|
317 |
</tr>
|
|
|
318 |
</table>
|
|
|
319 |
</td>
|
|
|
320 |
</tr>
|
|
|
321 |
</table>
|
|
|
322 |
<br />
|
|
|
323 |
<?
|
|
|
324 |
if ( !$_GET["edit"] )
|
|
|
325 |
{ ?>
|
|
|
326 |
<table border="1" cellspacing="0" cellpadding="5" style="width:100%;">
|
|
|
327 |
<tr class="links" bgcolor="#<? echo $webs[bgcolor_links] ?>">
|
|
|
328 |
<td class="headline">Anfrage-<br>datum</td>
|
|
|
329 |
<td class="headline">Kunde</td>
|
|
|
330 |
<td class="headline">eventueller Gültigkeitszeitraum / <br />Artikelliste</td>
|
|
|
331 |
<td class="headline" width="150">Löschen <br>
|
|
|
332 |
<a onclick="check_all();return false;" style="cursor:pointer">alle wählen</a>
|
|
|
333 |
<br>
|
|
|
334 |
<a onclick="uncheck_all();return false;" style="cursor:pointer">alle abwählen</a>
|
|
|
335 |
</td>
|
|
|
336 |
</tr>
|
|
|
337 |
<?
|
|
|
338 |
|
|
|
339 |
$anfragen = getSonderPreisAnfragen( $filter["shop"], $filter["name"],
|
|
|
340 |
$filter["gueltig"] );
|
|
|
341 |
/*$anz=getAnzSonderPreisAnfragen();
|
|
|
342 |
echo $anz;*/
|
|
|
343 |
foreach ( $anfragen as $anfrage )
|
|
|
344 |
{
|
|
|
345 |
$sql = "
|
|
|
346 |
SELECT
|
|
|
347 |
*
|
|
|
348 |
FROM
|
|
|
349 |
shops
|
|
|
350 |
WHERE
|
|
|
351 |
ID=" . $anfrage["shops_ID"] . "
|
|
|
352 |
";
|
|
|
353 |
$res = mysql_query( $sql );
|
|
|
354 |
$row = mysql_fetch_assoc( $res );
|
|
|
355 |
$shopName = $row["Name"];
|
|
|
356 |
$shopLang = $row["Language"]; ?>
|
|
|
357 |
<tr class="rechts" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
358 |
<td><a href="<?= $self; ?>?edit=<?= $anfrage["ID"]; ?>"><?= $anfrage["erstellt_am"]; ?></a></td>
|
|
|
359 |
<td><a href="<?= $self; ?>?edit=<?= $anfrage["ID"]; ?>"><?= $anfrage["kundeName"]; ?></a><br>aus <?=
|
|
|
360 |
$anfrage["kundePLZ"] . " " . $anfrage["kundeOrt"]; ?></td>
|
|
|
361 |
<td>
|
|
|
362 |
<div>
|
|
|
363 |
<?php
|
|
|
364 |
if ( $anfrage["fremd_link"] )
|
|
|
365 |
{
|
|
|
366 |
$url = parse_url( $anfrage["fremd_link"] );
|
|
|
367 |
$link = $url["scheme"] . "://" . $url["host"] .
|
|
|
368 |
"/shopping_cart.php?" . $url["query"];
|
|
|
369 |
}
|
|
|
370 |
else
|
|
|
371 |
{
|
|
|
372 |
$link = "http://www." . $shopName . "/";
|
|
|
373 |
$link .= ( $shopLang != "DE" ) ? "specialprice" :
|
|
|
374 |
"sonderpreis";
|
|
|
375 |
$link .= "/" . $anfrage["chksum"] . ".htm";
|
|
|
376 |
$link .= ( $shopLang != "DE" ) ? "?stop=no" : "";
|
|
|
377 |
} ?>
|
|
|
378 |
<a href="<?= $link ?>" target="_blank"><? if ( $anfrage["gueltigVon"] )
|
|
|
379 |
{
|
|
|
380 |
echo "[" . $anfrage["gueltigVon"] . " - " . $anfrage["gueltigBis"] .
|
|
|
381 |
"]";
|
|
|
382 |
} ?></a></div>
|
|
|
383 |
<a href="<?= $self; ?>?edit=<?= $anfrage["ID"]; ?>"><ul><?
|
|
|
384 |
|
|
|
385 |
foreach ( sonderPreisGetItems( $anfrage["ID"] ) as $sonderPreisItem )
|
|
|
386 |
{ ?><li><?= $sonderPreisItem["itemName"]; ?><br /><?= $sonderPreisItem["kundeNachricht"]; ?></li><?
|
|
|
387 |
} ?></ul></a></td><td class="delete"><!--<a href="<?= $self; ?>?deleteAnfrage=<?= $anfrage["ID"]; ?>">[X]</a>--><input type="checkbox" name="deleteAnfrage[]" value="<?= $anfrage["ID"]; ?>"></td>
|
|
|
388 |
</tr>
|
|
|
389 |
<?
|
|
|
390 |
} ?>
|
|
|
391 |
<tr bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
392 |
<td colspan="3"> </td><td><input type="submit" value="Löschen" /></td>
|
|
|
393 |
</tr>
|
|
|
394 |
</table>
|
|
|
395 |
<?
|
|
|
396 |
}
|
|
|
397 |
else
|
|
|
398 |
{
|
|
|
399 |
$id = $_GET["edit"];
|
|
|
400 |
|
|
|
401 |
$kundenDaten = sonderPreisGetKundenDaten( $id );
|
|
|
402 |
if ( $kundenDaten["fremd_link"] )
|
|
|
403 |
{
|
|
|
404 |
$url = parse_url( $kundenDaten["fremd_link"] );
|
|
|
405 |
$link = $url["scheme"] . "://" . $url["host"] .
|
|
|
406 |
"/shopping_cart.php?" . $url["query"];
|
|
|
407 |
$kundenDaten["link"] = $link;
|
|
|
408 |
$vdat = implode( "-", array_reverse( explode( ".", $gueltigVon ) ) );
|
|
|
409 |
$bdat = implode( "-", array_reverse( explode( ".", $gueltigBis ) ) );
|
|
|
410 |
$gueltigVon_tstamp = strtotime( $vdat );
|
|
|
411 |
$gueltigBis_tstamp = strtotime( $bdat );
|
|
|
412 |
$url = $kundenDaten["fremd_link"] . "&gueltigVon=" . $gueltigVon_tstamp .
|
|
|
413 |
"&gueltigBis=" . $gueltigBis_tstamp;
|
|
|
414 |
}
|
|
|
415 |
else
|
|
|
416 |
{
|
|
|
417 |
$url = "";
|
|
|
418 |
$link = "http://www." . $kundenDaten["shop_Name"] .
|
|
|
419 |
"/sonderpreis/" . $kundenDaten["chksum"] . ".htm";
|
|
|
420 |
}
|
|
|
421 |
$sql = "
|
|
|
422 |
SELECT
|
|
|
423 |
*
|
|
|
424 |
FROM
|
|
|
425 |
shops
|
|
|
426 |
WHERE
|
|
|
427 |
ID=" . $kundenDaten["shops_ID"] . "
|
|
|
428 |
";
|
|
|
429 |
$res = mysql_query( $sql );
|
|
|
430 |
$row = mysql_fetch_assoc( $res );
|
|
|
431 |
$shopName = $row["Name"];
|
|
|
432 |
$shopLang = $row["Language"];
|
|
|
433 |
extract( $kundenDaten );
|
|
|
434 |
|
|
|
435 |
$items = array();
|
|
|
436 |
$cnt = 0;
|
|
|
437 |
foreach ( sonderPreisGetItems( $id ) as $item )
|
|
|
438 |
{
|
|
|
439 |
if ( $url )
|
|
|
440 |
{
|
|
|
441 |
$url .= "&anfrage[$cnt][products_id]=" . $item["artikel_ID"] .
|
|
|
442 |
"&anfrage[$cnt][products_price]=" . $item["preis"];
|
|
|
443 |
$cnt++;
|
|
|
444 |
}
|
|
|
445 |
$items[] = str_pad( " " . $item[itemName], 61, " " ) . "|" .
|
|
|
446 |
str_pad( $item[preis] . " Euro ", 18, " ", STR_PAD_LEFT );
|
|
|
447 |
}
|
|
|
448 |
$kundenDaten["items"] = implode( "\n", $items );
|
|
|
449 |
|
|
|
450 |
$mailText = templateContent( $kundenDaten, $mailText, $display = false );
|
|
|
451 |
$mailSubject = templateContent( $kundenDaten, $mailSubject, $display = false ); ?>
|
|
|
452 |
<table border="1" cellspacing="0" cellpadding="5">
|
|
|
453 |
<tr>
|
|
|
454 |
<td colspan="3" class="links"><div style="float:right"><?= $erstellt_am; ?></div>Preisanfrage: <?= $shopName; ?> - <a href="mailto:<?= $kundeMail; ?>"><?= $kundeName; ?></a> aus <?= $kundePLZ .
|
|
|
455 |
" " . $kundeOrt; ?></td>
|
|
|
456 |
</tr>
|
|
|
457 |
<tr class="rechts">
|
|
|
458 |
<td>Löschen</td>
|
|
|
459 |
<td>Artikel / Shop-Preis<br />
|
|
|
460 |
Bemerkung</td>
|
|
|
461 |
<td width="100">In Warenkorb legen / Preis</td>
|
|
|
462 |
</tr>
|
|
|
463 |
<? foreach ( sonderPreisGetItems( $id ) as $item )
|
|
|
464 |
{
|
|
|
465 |
?>
|
|
|
466 |
<tr>
|
|
|
467 |
<td class="delete"><a href="<?= $self; ?>?deleteItem=<?= $item["ID"]; ?>&edit=<?= $ID; ?>">[X]</a></td>
|
|
|
468 |
<td>
|
|
|
469 |
<div style="float:right;"><?= $item["shopPreis"]; ?></div>
|
|
|
470 |
<u><?= $item["itemName"]; ?></u>
|
|
|
471 |
(
|
|
|
472 |
<a href="/Online-Shop/artikel.php?action=edit&ID=<?= $item["artikel_ID"] ?>" target="_blank" class="noprint">?</a>
|
|
|
473 |
<?php
|
|
|
474 |
if ( $row["domain"] )
|
|
|
475 |
{ ?>
|
|
|
476 |
|
|
|
|
477 |
<a href="http://www.<?= $row["domain"] ?>/index.php?item=<?= $item["artikel_ID"] ?>" target="_blank">S</a>
|
|
|
478 |
<?php
|
|
|
479 |
} ?>
|
|
|
480 |
)
|
|
|
481 |
<br /><?= $item["kundeNachricht"]; ?>
|
|
|
482 |
</td>
|
|
|
483 |
<td>
|
|
|
484 |
<input type="hidden" name="value[inBasket][<?= $item["ID"]; ?>]" value="0" />
|
|
|
485 |
<input type="checkbox" name="value[inBasket][<?= $item["ID"]; ?>]" value="1" <? if ( $item["inBasket"] ==
|
|
|
486 |
"1" )
|
|
|
487 |
{
|
|
|
488 |
echo "checked";
|
|
|
489 |
} ?> />
|
|
|
490 |
<input type="text" name="value[preis][<?= $item["ID"]; ?>]" value="<?= $item["preis"]; ?>" size="5" onchange="this.value=killkomma(this.value);" />
|
|
|
491 |
<? //pre($item); ?> </td>
|
|
|
492 |
</tr>
|
|
|
493 |
<? } ?>
|
|
|
494 |
<tr class="rechts">
|
|
|
495 |
<td> <input type="hidden" name="itemAdd[sonderPreis_ID]" /></td>
|
|
|
496 |
<td>
|
|
|
497 |
<input type="text" name="itemAdd[artikel_ID]" id="artikel_id" readonly="readonly" />
|
|
|
498 |
<input type="button" onclick="javascript:artikel_suche('<?= $shopLang; ?>');" value="Artikelsuche">
|
|
|
499 |
</td>
|
|
|
500 |
<td>
|
|
|
501 |
<input type="hidden" name="itemAdd[inBasket]" value="0" />
|
|
|
502 |
<input type="checkbox" name="itemAdd[inBasket]" value="1" />
|
|
|
503 |
<input type="text" name="itemAdd[preis]" size="8" onchange="this.value=killkomma(this.value);" /> </td>
|
|
|
504 |
</tr>
|
|
|
505 |
<tr class="rechts">
|
|
|
506 |
<td>Angebot gültig</td>
|
|
|
507 |
<td colspan="2">
|
|
|
508 |
<table border="0" cellspacing="0" cellpadding="3">
|
|
|
509 |
<tr>
|
|
|
510 |
<td>von:</td>
|
|
|
511 |
<td><input type="text" name="gueltigVon" value="<?= $gueltigVon; ?>" /></td>
|
|
|
512 |
<td><input type="button" class="button" value="1 Tag" onclick="setZeitraum(this.form,1)" /></td>
|
|
|
513 |
</tr>
|
|
|
514 |
<tr>
|
|
|
515 |
<td>bis:</td>
|
|
|
516 |
<td><input type="text" name="gueltigBis" value="<?= $gueltigBis; ?>" /></td>
|
|
|
517 |
<td><input type="button" class="button" value="3 Tage" onclick="setZeitraum(this.form,3)" /></td>
|
|
|
518 |
</tr>
|
|
|
519 |
<tr>
|
|
|
520 |
<td> </td>
|
|
|
521 |
<td> </td>
|
|
|
522 |
<td><input type="button" class="button" value="7 Tage" onclick="setZeitraum(this.form,7)" /></td>
|
|
|
523 |
</tr>
|
|
|
524 |
</table> </td>
|
|
|
525 |
</tr>
|
|
|
526 |
<tr class="links noprint">
|
|
|
527 |
<td colspan="3">
|
|
|
528 |
<?
|
|
|
529 |
$buttons = array( array( "name" => "updateOK", "value" =>
|
|
|
530 |
"Speichern und OK - Mail", "style" => "width:330px; float:left;" ),
|
|
|
531 |
array( "name" => "updateNO", "value" =>
|
|
|
532 |
"Speichern und Nein - Mail", "style" => "width:330px;" ) );
|
|
|
533 |
|
|
|
534 |
foreach ( $buttons as $button )
|
|
|
535 |
{ ?><input type="submit" name="<? if ( $_REQUEST[$button['name']] )
|
|
|
536 |
{
|
|
|
537 |
echo "mailSend";
|
|
|
538 |
}
|
|
|
539 |
else
|
|
|
540 |
{
|
|
|
541 |
echo $button['name'];
|
|
|
542 |
} ?>" value="<?= $button['value'];
|
|
|
543 |
if ( $_REQUEST[$button['name']] )
|
|
|
544 |
{
|
|
|
545 |
echo " versenden";
|
|
|
546 |
}
|
|
|
547 |
else
|
|
|
548 |
{
|
|
|
549 |
echo " zeigen";
|
|
|
550 |
} ?>" class="button" style="<?= $button['style']; ?>" /><?
|
|
|
551 |
} ?> </td>
|
|
|
552 |
</tr>
|
|
|
553 |
<tr class="links noprint">
|
|
|
554 |
<td>
|
|
|
555 |
Empfänger: </td>
|
|
|
556 |
<td colspan="2"><input type="text" name="mailTo" style="width:500px;" value="<?= $kundeMail; ?>" /></td>
|
|
|
557 |
</tr>
|
|
|
558 |
<tr class="links noprint">
|
|
|
559 |
<td>
|
|
|
560 |
Betreff: </td>
|
|
|
561 |
<td colspan="2"><input type="text" name="mailSubject" style="width:500px;" value="<?= $mailSubject; ?>" /></td>
|
|
|
562 |
</tr>
|
|
|
563 |
<tr class="links noprint">
|
|
|
564 |
<td colspan="3">
|
|
|
565 |
<textarea name="mailText" style="width:680px; height:400px;"><?= $mailText ?></textarea> </td>
|
|
|
566 |
</tr>
|
|
|
567 |
<tr class="links">
|
|
|
568 |
<td colspan="3">
|
|
|
569 |
<input type="hidden" name="ID" value="<?= $ID; ?>" />
|
|
|
570 |
<input type="hidden" name="shops_ID" value="<?= $shops_ID ?>" />
|
|
|
571 |
<input type="hidden" name="erstellt_von" value="<?= $erstellt_von; ?>">
|
|
|
572 |
<input type="hidden" name="url" value="<?= $url; ?>">
|
|
|
573 |
letzte Änderung: <?= $letzte_Aenderung_von; ?> (<?= $letzte_Aenderung_am; ?>)
|
|
|
574 |
<input type="submit" name="update" value="Speichern" class="button noprint" />
|
|
|
575 |
</td>
|
|
|
576 |
</tr>
|
|
|
577 |
</table>
|
|
|
578 |
<?
|
|
|
579 |
} ?>
|
|
|
580 |
</form>
|
|
|
581 |
</body>
|
|
|
582 |
</html>
|