| 1 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/* $Id: bestellung_formular.php 2766 2010-07-23 06:20:50Z niewerth $ */
|
|
|
4 |
|
|
|
5 |
$preise_anzeigen = 0;
|
|
|
6 |
if ( isset($web_rechte[modul_name][tool_name][preise_anzeigen]) )
|
|
|
7 |
{
|
|
|
8 |
if ( isset($user_rechte[modul_name][tool_name][preise_anzeigen]) )
|
|
|
9 |
{
|
|
|
10 |
//echo "<br>für bestimmte user preis anzeigen";
|
|
|
11 |
$preise_anzeigen = 1;
|
|
|
12 |
}
|
|
|
13 |
else
|
|
|
14 |
{
|
|
|
15 |
// "<br>für bestimmte user preis verbergen";
|
|
|
16 |
$preise_anzeigen = 0;
|
|
|
17 |
}
|
|
|
18 |
}
|
|
|
19 |
else
|
|
|
20 |
{
|
|
|
21 |
//echo "<br>preis immer anzeigen";
|
|
|
22 |
$preise_anzeigen = 1;
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
$kk = 0;
|
|
|
27 |
// Beim Eintritt in die Seite puffern.
|
|
|
28 |
bestellung_puffern( $Bestellung );
|
|
|
29 |
|
|
|
30 |
$query = "
|
|
|
31 |
select
|
|
|
32 |
Bestellung.*,
|
|
|
33 |
Logins.Status,
|
|
|
34 |
Logins.user,
|
|
|
35 |
Logins.passwd,
|
|
|
36 |
Logins.Anrede,
|
|
|
37 |
Logins.Vorname,
|
|
|
38 |
Logins.Name1,
|
|
|
39 |
Logins.Name2,
|
|
|
40 |
Logins.Strasse,
|
|
|
41 |
Logins.Hausnummer,
|
|
|
42 |
Logins.PLZ,
|
|
|
43 |
Logins.ORT,
|
|
|
44 |
Logins.Telefon,
|
|
|
45 |
Logins.Fax,
|
|
|
46 |
Logins.E_Mail,
|
|
|
47 |
Logins.Land,
|
|
|
48 |
Logins.AP_Name,
|
|
|
49 |
Logins.AP_Handy,
|
|
|
50 |
Logins.AP_Bemerkung
|
|
|
51 |
from
|
|
|
52 |
Bestellung,
|
|
|
53 |
Logins
|
|
|
54 |
where
|
|
|
55 |
Bestellung.ID = $Bestellung
|
|
|
56 |
and
|
|
|
57 |
Logins.ID = Bestellung.Login
|
|
|
58 |
";
|
|
|
59 |
$result = mysql_query_logged( $query ) or die( mysql_errno() . ": " .
|
|
|
60 |
mysql_error() . "<hr>" . nl2br($query) . "<hr>" );
|
|
|
61 |
$zeile = mysql_fetch_array( $result );
|
|
|
62 |
$BestellData = $zeile;
|
|
|
63 |
//$web_settings �bersetzen
|
|
|
64 |
$Userdata = $zeile;
|
|
|
65 |
$erstellt_am = datetime2human( $zeile[erstellt_am] );
|
|
|
66 |
$Datum = $erstellt_am[Datum];
|
|
|
67 |
$Zeit = $erstellt_am[Zeit];
|
|
|
68 |
$Username = $_SERVER["PHP_AUTH_USER"];
|
|
|
69 |
$Username_text = $_SESSION["USERNAME"];
|
|
|
70 |
$Auftragsnummer = $Bestellung;
|
|
|
71 |
$Heute = date( "d.m.Y" );
|
|
|
72 |
$jetzt = date( "H:i" );
|
|
|
73 |
// Markus
|
|
|
74 |
$BestellID = $zeile["ID"];
|
|
|
75 |
$shops_ID = $zeile["shops_ID"];
|
|
|
76 |
$Artikelliste = createOrderText( $BestellID, $shops_ID );
|
|
|
77 |
$Artikelliste_html = createOrderText_html( $BestellID, $shops_ID );
|
|
|
78 |
$Artikelliste_html_v2 = createOrderText_html_v2( $BestellID, $shops_ID );
|
|
|
79 |
$Bestellwert_brutto = Bestellwert_brutto( $BestellID, $shops_ID );
|
|
|
80 |
|
|
|
81 |
if ( $bestellart )
|
|
|
82 |
{
|
|
|
83 |
$query = "
|
|
|
84 |
SELECT
|
|
|
85 |
*
|
|
|
86 |
FROM
|
|
|
87 |
web_settings
|
|
|
88 |
WHERE
|
|
|
89 |
bestellart_id=" . $zeile["bestellart_id"] . "
|
|
|
90 |
AND
|
|
|
91 |
shops_ID = $shops_ID
|
|
|
92 |
ORDER BY
|
|
|
93 |
Rang";
|
|
|
94 |
}
|
|
|
95 |
else
|
|
|
96 |
{
|
|
|
97 |
$query = "
|
|
|
98 |
SELECT
|
|
|
99 |
*
|
|
|
100 |
FROM
|
|
|
101 |
web_settings
|
|
|
102 |
WHERE
|
|
|
103 |
shops_ID = $shops_ID
|
|
|
104 |
ORDER BY
|
|
|
105 |
Rang";
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
$result_w = mysql_query_logged( $query ) or die( mysql_errno() . ": " .
|
|
|
109 |
mysql_error() . "<hr>$query<hr>" );
|
|
|
110 |
while ( $zeile_w = mysql_fetch_assoc($result_w) )
|
|
|
111 |
{
|
|
|
112 |
// $web_settings[$zeile_w["shops_ID"]][$zeile_w["ID"]] = $zeile_w["Inhalt"];
|
|
|
113 |
$buffer = $zeile_w["Inhalt"];
|
|
|
114 |
$wsID = $zeile_w["ID"];
|
|
|
115 |
if ( $wsID != 1000 )
|
|
|
116 |
{
|
|
|
117 |
if ( strpos($buffer, '"') !== false )
|
|
|
118 |
{
|
|
|
119 |
$buffer = str_replace( '"', "***", $buffer );
|
|
|
120 |
}
|
|
|
121 |
@eval( "\$buffer=\"$buffer\";" );
|
|
|
122 |
if ( strpos($buffer, '***') !== false )
|
|
|
123 |
{
|
|
|
124 |
$buffer = str_replace( '***', '"', $buffer );
|
|
|
125 |
}
|
|
|
126 |
}
|
|
|
127 |
$web_settings[$shops_ID][$wsID] = rawurlencode( $buffer );
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
?>
|
|
|
131 |
<script language="JavaScript" src="../systemtermine/systemtermine.js.php"></script>
|
|
|
132 |
<script language="JavaScript" src="kundenauftrag_drucken.js.php"></script>
|
|
|
133 |
|
|
|
134 |
<table width="900" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
|
|
|
135 |
<tr>
|
|
|
136 |
<td colspan="2" class="links" id="noprint">Bestellung: Bearbeiten</td>
|
|
|
137 |
</tr>
|
|
|
138 |
<tr>
|
|
|
139 |
<td class="links" id="noprint">Bestellnummer:</td>
|
|
|
140 |
<?php
|
|
|
141 |
/*if (isset($user_rechte["Warenwirtschaft"]["bestellung"]["shopChange"]))
|
|
|
142 |
{*/
|
|
|
143 |
?>
|
|
|
144 |
<td ondblclick="location.href='<?= $self; ?>?s_id=<?= $zeile['shops_ID']; ?>&Bestellung=<?= $_GET['Bestellung']; ?>'">
|
|
|
145 |
<?php
|
|
|
146 |
/*}
|
|
|
147 |
else
|
|
|
148 |
{
|
|
|
149 |
?>
|
|
|
150 |
<td>
|
|
|
151 |
<?php
|
|
|
152 |
}*/
|
|
|
153 |
?>
|
|
|
154 |
<?php echo $zeile[ID] ?>
|
|
|
155 |
-
|
|
|
156 |
<?php echo $zeile[Language] ?>
|
|
|
157 |
- Shop:
|
|
|
158 |
<?php
|
|
|
159 |
if ( !$s_id )
|
|
|
160 |
{
|
|
|
161 |
echo $_SESSION[shops][$zeile[shops_ID]][Name];
|
|
|
162 |
if ( $zeile["bestellart_id"] )
|
|
|
163 |
{
|
|
|
164 |
echo ", " . $bestellarten[$zeile["bestellart_id"]]["name"];
|
|
|
165 |
}
|
|
|
166 |
?>
|
|
|
167 |
<form method="post" action="<?php echo $self;
|
|
|
168 |
if ( $Bestellung )
|
|
|
169 |
{
|
|
|
170 |
echo "#$Bestellung";
|
|
|
171 |
} ?>" name="formname" enctype="multipart/form-data">
|
|
|
172 |
<?php
|
|
|
173 |
}
|
|
|
174 |
else
|
|
|
175 |
{
|
|
|
176 |
?>
|
|
|
177 |
<form name="edit_shop" action="saveshop.php" method="get">
|
|
|
178 |
<input type="hidden" name="b_id" value="<?= $_GET["Bestellung"]; ?>" />
|
|
|
179 |
<select name="s_id">
|
|
|
180 |
<?php
|
|
|
181 |
|
|
|
182 |
foreach ( $l as $l_id => $l_name )
|
|
|
183 |
{
|
|
|
184 |
$selected = ( $l_id == $s_id ) ? "selected='selected'" : "";
|
|
|
185 |
if ( strtolower($l_name) != "pieper-shop.de" )
|
|
|
186 |
{
|
|
|
187 |
?>
|
|
|
188 |
<option value="<?= $l_id; ?>" <?= $selected; ?>><?= $l_name; ?></option>
|
|
|
189 |
<?php
|
|
|
190 |
}
|
|
|
191 |
}
|
|
|
192 |
?>
|
|
|
193 |
</select>
|
|
|
194 |
<input type="submit" value="speichern" />
|
|
|
195 |
<?php
|
|
|
196 |
if ( $zeile["bestellart_id"] )
|
|
|
197 |
{
|
|
|
198 |
echo ", " . $bestellarten[$zeile["bestellart_id"]]["name"];
|
|
|
199 |
}
|
|
|
200 |
?>
|
|
|
201 |
</form>
|
|
|
202 |
<form method="post" action="<?php echo $self;
|
|
|
203 |
if ( $Bestellung )
|
|
|
204 |
{
|
|
|
205 |
echo "#$Bestellung";
|
|
|
206 |
} ?>" name="formname" enctype="multipart/form-data">
|
|
|
207 |
<?php
|
|
|
208 |
}
|
|
|
209 |
?>
|
|
|
210 |
</td>
|
|
|
211 |
</tr>
|
|
|
212 |
<tr>
|
|
|
213 |
<td valign="top" class="links" id="noprint"><a href="../logins/logins.php?action=edit&ID=<?php echo
|
|
|
214 |
$zeile[Login] ?>">Kunde:</a><br>
|
|
|
215 |
Userlevel:
|
|
|
216 |
<?php echo $zeile[Status] ?>
|
|
|
217 |
</td>
|
|
|
218 |
<td class="rechts">
|
|
|
219 |
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFF00">
|
|
|
220 |
<tr>
|
|
|
221 |
<td height="24" class="rechts">
|
|
|
222 |
<?php if ( $zeile[Anrede] )
|
|
|
223 |
{
|
|
|
224 |
echo ( $zeile[Anrede] . " " );
|
|
|
225 |
} ?><?php if ( $zeile[Vorname] )
|
|
|
226 |
{
|
|
|
227 |
echo ( $zeile[Vorname] . " " );
|
|
|
228 |
} ?>
|
|
|
229 |
<?php echo $zeile[Name1] ?> </td>
|
|
|
230 |
<td class="rechts">
|
|
|
231 |
<?php echo $zeile[Strasse] ?> <?php echo $zeile[Hausnummer] ?> </td>
|
|
|
232 |
<td class="rechts"><a style="text-decoration:none" href="callto:<?php echo
|
|
|
233 |
$zeile[Telefon] ?>">
|
|
|
234 |
<?php echo $zeile[Telefon] ?>
|
|
|
235 |
<img src="../images/Online-Shop/telefon.gif" border="0"></a> </td>
|
|
|
236 |
<td class="rechts">
|
|
|
237 |
<?php echo $zeile[Fax] ?>
|
|
|
238 |
</td>
|
|
|
239 |
</tr>
|
|
|
240 |
<tr>
|
|
|
241 |
<td height="41" class="rechts">
|
|
|
242 |
<?php if ( $zeile[Name2] != '' )
|
|
|
243 |
{ ?>
|
|
|
244 |
<strong>Firma / Organisation</strong><br>
|
|
|
245 |
<?php } ?>
|
|
|
246 |
<?php echo $zeile[Name2] ?>
|
|
|
247 |
</td>
|
|
|
248 |
<td class="rechts">
|
|
|
249 |
<?php echo $zeile[PLZ] ?> <?php echo $zeile[ORT] ?> </td>
|
|
|
250 |
<td class="rechts">
|
|
|
251 |
<?php if ( $zeile[E_Mail] )
|
|
|
252 |
{
|
|
|
253 |
if ( isset($web_rechte["Warenwirtschaft"]["bestellung"]["mail_client"]) )
|
|
|
254 |
{
|
|
|
255 |
$i = 0;
|
|
|
256 |
$mailData[$zeile["ID"]][$i]['mailto'] = $zeile["E_Mail"];
|
|
|
257 |
$FelddatenII = explode( ";", $web_rechte["Warenwirtschaft"]["bestellung"]["mail_client"] );
|
|
|
258 |
if ( $FelddatenII[0] == "websettingid" )
|
|
|
259 |
{
|
|
|
260 |
$mailData[$zeile["ID"]][$i]['mailfrom'] = $web_settings[$zeile["shops_ID"]][$FelddatenII[1]];
|
|
|
261 |
}
|
|
|
262 |
$mailData[$zeile["ID"]][$i]['subject'] = $web_settings[$zeile["shops_ID"]][198];
|
|
|
263 |
$mailData[$zeile["ID"]][$i]['body'] = $web_settings[$zeile["shops_ID"]][199];
|
|
|
264 |
$mailData[$zeile["ID"]][$i]['inTextField'] =
|
|
|
265 |
"Sonstige E-Mail von " . $_SERVER["PHP_AUTH_USER"] . " am " .
|
|
|
266 |
date( "d.m.Y" ) . " um " . date( "H:i" ) . " Uhr veschickt" .
|
|
|
267 |
'\n';
|
|
|
268 |
$onClick = "window.open('MailClient/index.php?id=$i&Bestellung=" .
|
|
|
269 |
$zeile["ID"] . "&shop=" . $zeile["shops_ID"] .
|
|
|
270 |
"&button=Mailausgang', 'MailClient', 'status, menubar, height=600, width=900, scrollbars=yes');";
|
|
|
271 |
?>
|
|
|
272 |
<input
|
|
|
273 |
name="update[list]"
|
|
|
274 |
type="button"
|
|
|
275 |
class="status_red"
|
|
|
276 |
value="<?= $zeile["E_Mail"] ?>"
|
|
|
277 |
onClick="<?= $onClick ?>"
|
|
|
278 |
>
|
|
|
279 |
<?php
|
|
|
280 |
}
|
|
|
281 |
else
|
|
|
282 |
{
|
|
|
283 |
?>
|
|
|
284 |
<a href="mailto:<?php echo $zeile[E_Mail] ?>">
|
|
|
285 |
<?php echo $zeile[E_Mail] ?> </a>
|
|
|
286 |
<?php } ?>
|
|
|
287 |
<?
|
|
|
288 |
|
|
|
289 |
}
|
|
|
290 |
?>
|
|
|
291 |
</td>
|
|
|
292 |
<td class="rechts">
|
|
|
293 |
<?php echo $zeile[Land] ?>
|
|
|
294 |
</td>
|
|
|
295 |
</tr>
|
|
|
296 |
</table>
|
|
|
297 |
<?php if ( $zeile[liefer_Strasse] != '' )
|
|
|
298 |
{ ?>
|
|
|
299 |
<br>
|
|
|
300 |
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFF00">
|
|
|
301 |
<tr>
|
|
|
302 |
<td height="24" class="rechts"><strong>Lieferadresse:</strong></td>
|
|
|
303 |
<td class="rechts">Name:<br>
|
|
|
304 |
<?php
|
|
|
305 |
echo $zeile[liefer_Anrede] . " " . $zeile[liefer_Vorname] . " " . $zeile[liefer_Name];
|
|
|
306 |
?>
|
|
|
307 |
</td>
|
|
|
308 |
<td class="rechts">
|
|
|
309 |
<?php if ( $zeile[liefer_Firma] != '' )
|
|
|
310 |
{ ?>
|
|
|
311 |
Firma / Organisation:<br>
|
|
|
312 |
<?php } ?>
|
|
|
313 |
<?php echo $zeile[liefer_Firma] ?>
|
|
|
314 |
</td>
|
|
|
315 |
</tr>
|
|
|
316 |
<tr>
|
|
|
317 |
<td height="41" class="rechts">
|
|
|
318 |
<?php echo $zeile[liefer_Strasse] ?> <?php echo $zeile[liefer_Str_Nr] ?>
|
|
|
319 |
</td>
|
|
|
320 |
<td class="rechts">
|
|
|
321 |
<?php echo $zeile[liefer_PLZ] ?> <?php echo $zeile[liefer_Ort] ?>
|
|
|
322 |
</td>
|
|
|
323 |
<td class="rechts">
|
|
|
324 |
<?php echo $zeile[liefer_Land] ?>
|
|
|
325 |
</td>
|
|
|
326 |
</tr>
|
|
|
327 |
</table>
|
|
|
328 |
<?php
|
|
|
329 |
}
|
|
|
330 |
if ( isset($user_rechte["Warenwirtschaft"]["bestellung"]["lieferadresse_aendern"]) )
|
|
|
331 |
{
|
|
|
332 |
?>
|
|
|
333 |
<input type="button" onclick="window.open('change_lieferadresse.php?b_id=<?= $Bestellung ?>');" value="Lieferadresse <?= ( $zeile[liefer_Strasse] !=
|
|
|
334 |
'' ) ? "bearbeiten" : "anlegen"; ?>">
|
|
|
335 |
<?php
|
|
|
336 |
}
|
|
|
337 |
?>
|
|
|
338 |
</td>
|
|
|
339 |
</tr>
|
|
|
340 |
<?
|
|
|
341 |
if ( isset($user_rechte["Warenwirtschaft"]["bestellung"]["tracking"]) )
|
|
|
342 |
{
|
|
|
343 |
if ( $web_rechte["Warenwirtschaft"]["bestellung"]["tracking"] )
|
|
|
344 |
{
|
|
|
345 |
$daten = explode( ";", $web_rechte["Warenwirtschaft"]["bestellung"]["tracking"] );
|
|
|
346 |
$name = $daten[0];
|
|
|
347 |
$url = $daten[1];
|
|
|
348 |
?>
|
|
|
349 |
<tr>
|
|
|
350 |
<td class="links" ><?= $name; ?></td>
|
|
|
351 |
<td>
|
|
|
352 |
<table>
|
|
|
353 |
<?
|
|
|
354 |
$sql = "
|
|
|
355 |
SELECT
|
|
|
356 |
*
|
|
|
357 |
FROM
|
|
|
358 |
bestellung_paketnummern
|
|
|
359 |
WHERE
|
|
|
360 |
Bestellung=" . $zeile["ID"] . "
|
|
|
361 |
ORDER BY
|
|
|
362 |
datum
|
|
|
363 |
";
|
|
|
364 |
$res = mysql_query( $sql );
|
|
|
365 |
while ( $row = mysql_fetch_assoc($res) )
|
|
|
366 |
{
|
|
|
367 |
?>
|
|
|
368 |
<tr>
|
|
|
369 |
<td>
|
|
|
370 |
<input type="button" value="<?= $row["paketnummer"] ?>" onclick="window.open('<?= $url .
|
|
|
371 |
$row["paketnummer"] ?>');"> vom <?= date( "d.m.Y H:i", $row["datum"] ); ?>
|
|
|
372 |
</td>
|
|
|
373 |
</tr>
|
|
|
374 |
<?
|
|
|
375 |
}
|
|
|
376 |
?>
|
|
|
377 |
</table>
|
|
|
378 |
</td>
|
|
|
379 |
</tr>
|
|
|
380 |
<?
|
|
|
381 |
}
|
|
|
382 |
}
|
|
|
383 |
?>
|
|
|
384 |
<tr>
|
|
|
385 |
<td valign="top" class="links" id="noprint"><p>Artikel:</p>
|
|
|
386 |
</td>
|
|
|
387 |
<td align="right" class="rechts">
|
|
|
388 |
<table width="100%" border="0" cellspacing="2" cellpadding="2">
|
|
|
389 |
<?php
|
|
|
390 |
$summe = 0;
|
|
|
391 |
$runner = 0;
|
|
|
392 |
|
|
|
393 |
if ( $web_rechte['Warenwirtschaft']['bestellung']['mahnungStatus'] )
|
|
|
394 |
{
|
|
|
395 |
$mahnungStatus = 1;
|
|
|
396 |
}
|
|
|
397 |
if ( $web_rechte['Warenwirtschaft']['bestellung']['garantieStatus'] )
|
|
|
398 |
{
|
|
|
399 |
$garantieStatus = 1;
|
|
|
400 |
}
|
|
|
401 |
|
|
|
402 |
|
|
|
403 |
$cmd_buttons = array( array('O', 'offen', 'status_red', 'artikelStatus',
|
|
|
404 |
0), array('B', 'in Bearbeitung', 'status_yellow', 'artikelStatus', 0),
|
|
|
405 |
array('R', 'reserviert', 'status_blue', 'artikelStatus', 0), array('E',
|
|
|
406 |
'erledigt', 'status_green', 'artikelStatus', 0), array('A',
|
|
|
407 |
'abgeschlossen', 'status_white', 'artikelStatus', 0), str_repeat(" ",
|
|
|
408 |
3), array('S', 'schreiben', 'status_red', 'rechnungStatus', 6),
|
|
|
409 |
array('G', 'geschrieben', 'status_yellow', 'rechnungStatus', 6),
|
|
|
410 |
array('B', 'bezahlt', 'status_green', 'rechnungStatus', 6),
|
|
|
411 |
str_repeat(" ", 3), array('S', 'schreiben', 'status_yellow',
|
|
|
412 |
'lieferscheinStatus', 0), array('G', 'geschrieben', 'status_green',
|
|
|
413 |
'lieferscheinStatus', 0), array('O', 'offen', 'status_red',
|
|
|
414 |
'lieferscheinStatus', 0), str_repeat(" ", 3), array('1',
|
|
|
415 |
'mahnung1', 'status_green', 'mahnungStatus', 0), array('2',
|
|
|
416 |
'mahnung2', 'status_yellow', 'mahnungStatus', 0), array('3',
|
|
|
417 |
'mahnung3', 'status_red', 'mahnungStatus', 0), str_repeat(" ",
|
|
|
418 |
3), array('E', 'eingereicht', 'status_red', 'garantieStatus', 0),
|
|
|
419 |
array('A', 'abgeschlossen', 'status_green', 'garantieStatus', 0), );
|
|
|
420 |
|
|
|
421 |
|
|
|
422 |
$user_rechte[modul_name][tool_name][artikelStatus] = &$user_rechte[modul_name][tool_name][status];
|
|
|
423 |
|
|
|
424 |
|
|
|
425 |
foreach ( array_keys($cmd_buttons) as $buttonIndex )
|
|
|
426 |
{
|
|
|
427 |
if ( (!isset($user_rechte[modul_name][tool_name][$cmd_buttons[$buttonIndex][3]])) and
|
|
|
428 |
(is_array($cmd_buttons[$buttonIndex])) )
|
|
|
429 |
{
|
|
|
430 |
unset( $cmd_buttons[$buttonIndex] );
|
|
|
431 |
}
|
|
|
432 |
}
|
|
|
433 |
|
|
|
434 |
if ( $filter[shops_ID] != "alle" )
|
|
|
435 |
{
|
|
|
436 |
$shopsIDaddOn = " and shops.ID = " . $filter[shops_ID];
|
|
|
437 |
}
|
|
|
438 |
|
|
|
439 |
|
|
|
440 |
// ME:
|
|
|
441 |
//existiert das Feld 'option_eingabe'?
|
|
|
442 |
$fields = mysql_list_fields( $webs['datenbank'], 'artikel_to_Bestellung' );
|
|
|
443 |
$columns = mysql_num_fields( $fields );
|
|
|
444 |
for ( $i = 0; $i < $columns; $i++ )
|
|
|
445 |
{
|
|
|
446 |
$field_array[] = mysql_field_name( $fields, $i );
|
|
|
447 |
}
|
|
|
448 |
if ( in_array('option_eingabe', $field_array) )
|
|
|
449 |
{
|
|
|
450 |
$option_eingabe = "artikel_to_Bestellung.option_eingabe,";
|
|
|
451 |
}
|
|
|
452 |
|
|
|
453 |
if ( isset($web_rechte["Warenwirtschaft"]["bestellung"]["artikel_sortieren"]) )
|
|
|
454 |
{
|
|
|
455 |
|
|
|
456 |
|
|
|
457 |
$query_artikel = "
|
|
|
458 |
select
|
|
|
459 |
artikel_to_Bestellung.ID as ab_id,
|
|
|
460 |
artikel_to_Bestellung.status as artikelStatus,
|
|
|
461 |
artikel_to_Bestellung.Preis_pro_Stueck,
|
|
|
462 |
artikel_to_Bestellung.Menge,
|
|
|
463 |
artikel_to_Bestellung.Bezeichnung,
|
|
|
464 |
artikel_to_Bestellung.Bestellung,
|
|
|
465 |
artikel_to_Bestellung.rechnungStatus,
|
|
|
466 |
artikel_to_Bestellung.lieferscheinStatus,
|
|
|
467 |
";
|
|
|
468 |
if ( $option_eingabe )
|
|
|
469 |
{
|
|
|
470 |
$query_artikel .= $option_eingabe;
|
|
|
471 |
}
|
|
|
472 |
if ( $mahnungStatus )
|
|
|
473 |
{
|
|
|
474 |
$query_artikel .= "artikel_to_Bestellung.mahnungStatus,";
|
|
|
475 |
}
|
|
|
476 |
if ( $garantieStatus )
|
|
|
477 |
{
|
|
|
478 |
$query_artikel .= "artikel_to_Bestellung.garantieStatus,";
|
|
|
479 |
}
|
|
|
480 |
$query_artikel .= artikelDatabase( $zeile[shops_ID] ) . ".*,
|
|
|
481 |
ifnull(" . artikelDatabase( $zeile[shops_ID] ) . ".Father, 1) as Father,
|
|
|
482 |
ifnull(artikel_to_Bestellung.Bezeichnung, " . artikelDatabase( $zeile[shops_ID] ) .
|
|
|
483 |
".kurzbezeichnung) as kurzbezeichnung,
|
|
|
484 |
artikel_to_Bestellung.Rang as ab_Rang
|
|
|
485 |
from
|
|
|
486 |
shops
|
|
|
487 |
join
|
|
|
488 |
artikel_to_Bestellung
|
|
|
489 |
join
|
|
|
490 |
Bestellung
|
|
|
491 |
left join
|
|
|
492 |
" . artikelDatabase( $zeile[shops_ID] ) . "
|
|
|
493 |
on
|
|
|
494 |
artikel_to_Bestellung.artikel=" . artikelDatabase( $zeile[shops_ID] ) .
|
|
|
495 |
".ID
|
|
|
496 |
and
|
|
|
497 |
" . artikelDatabase( $zeile[shops_ID] ) . ".language=Bestellung.Language
|
|
|
498 |
where
|
|
|
499 |
Bestellung.ID = " . $zeile[ID] . "
|
|
|
500 |
and
|
|
|
501 |
artikel_to_Bestellung.Bestellung = Bestellung.ID
|
|
|
502 |
and
|
|
|
503 |
shops.ID = Bestellung.shops_ID
|
|
|
504 |
order by
|
|
|
505 |
Father desc,
|
|
|
506 |
artikel_to_Bestellung.Rang,
|
|
|
507 |
" . artikelDatabase( $zeile[shops_ID] ) . ".Kennung
|
|
|
508 |
";
|
|
|
509 |
}
|
|
|
510 |
else
|
|
|
511 |
{
|
|
|
512 |
$query_artikel = "
|
|
|
513 |
select
|
|
|
514 |
artikel_to_Bestellung.ID as ab_id,
|
|
|
515 |
artikel_to_Bestellung.status as artikelStatus,
|
|
|
516 |
artikel_to_Bestellung.Preis_pro_Stueck,
|
|
|
517 |
artikel_to_Bestellung.Menge,
|
|
|
518 |
artikel_to_Bestellung.Bezeichnung,
|
|
|
519 |
artikel_to_Bestellung.Bestellung,
|
|
|
520 |
artikel_to_Bestellung.rechnungStatus,
|
|
|
521 |
artikel_to_Bestellung.lieferscheinStatus,";
|
|
|
522 |
|
|
|
523 |
if ( $option_eingabe )
|
|
|
524 |
{
|
|
|
525 |
$query_artikel .= $option_eingabe;
|
|
|
526 |
}
|
|
|
527 |
if ( $mahnungStatus )
|
|
|
528 |
{
|
|
|
529 |
$query_artikel .= "artikel_to_Bestellung.mahnungStatus,";
|
|
|
530 |
}
|
|
|
531 |
if ( $garantieStatus )
|
|
|
532 |
{
|
|
|
533 |
$query_artikel .= "artikel_to_Bestellung.garantieStatus,";
|
|
|
534 |
}
|
|
|
535 |
$query_artikel .= artikelDatabase( $zeile[shops_ID] ) . ".*,
|
|
|
536 |
ifnull(" . artikelDatabase( $zeile[shops_ID] ) . ".Father, 1) as Father,
|
|
|
537 |
ifnull(artikel_to_Bestellung.Bezeichnung, " . artikelDatabase( $zeile[shops_ID] ) .
|
|
|
538 |
".kurzbezeichnung) as kurzbezeichnung
|
|
|
539 |
from
|
|
|
540 |
shops
|
|
|
541 |
join
|
|
|
542 |
artikel_to_Bestellung
|
|
|
543 |
join
|
|
|
544 |
Bestellung
|
|
|
545 |
left join
|
|
|
546 |
" . artikelDatabase( $zeile[shops_ID] ) . "
|
|
|
547 |
on
|
|
|
548 |
artikel_to_Bestellung.artikel=" . artikelDatabase( $zeile[shops_ID] ) .
|
|
|
549 |
".ID
|
|
|
550 |
and
|
|
|
551 |
" . artikelDatabase( $zeile[shops_ID] ) . ".language=Bestellung.Language
|
|
|
552 |
where
|
|
|
553 |
Bestellung.ID = " . $zeile[ID] . "
|
|
|
554 |
and
|
|
|
555 |
artikel_to_Bestellung.Bestellung = Bestellung.ID
|
|
|
556 |
and
|
|
|
557 |
shops.ID = Bestellung.shops_ID
|
|
|
558 |
order by
|
|
|
559 |
Father desc,
|
|
|
560 |
" . artikelDatabase( $zeile[shops_ID] ) . ".Kennung
|
|
|
561 |
";
|
|
|
562 |
}
|
|
|
563 |
//echo $query_artikel;
|
|
|
564 |
|
|
|
565 |
$itemList = array();
|
|
|
566 |
unset( $Versand_Artikel );
|
|
|
567 |
$result_artikel = mysql_query_logged( $query_artikel ) or die( mysql_errno
|
|
|
568 |
() . ": " . mysql_error() . "<hr>" . nl2br($query_artikel) . "<hr>" );
|
|
|
569 |
$count = mysql_num_rows( $result_artikel );
|
|
|
570 |
?>
|
|
|
571 |
<tr>
|
|
|
572 |
<td colspan="2">
|
|
|
573 |
|
|
|
574 |
</td>
|
|
|
575 |
<td>
|
|
|
576 |
<table border="0">
|
|
|
577 |
<tr>
|
|
|
578 |
<td width="140" class="rechts">
|
|
|
579 |
Artikelstatus
|
|
|
580 |
</td>
|
|
|
581 |
<td width="80" class="rechts">
|
|
|
582 |
Rechnung
|
|
|
583 |
</td>
|
|
|
584 |
<?php
|
|
|
585 |
|
|
|
586 |
if ( $user_rechte['Warenwirtschaft']['bestellung']['lieferscheinStatus'] )
|
|
|
587 |
{
|
|
|
588 |
echo " <td></td>
|
|
|
589 |
<td colspan=\"3\" width=\"90\" class=\"rechts\">
|
|
|
590 |
Lieferung
|
|
|
591 |
</td>";
|
|
|
592 |
}
|
|
|
593 |
else
|
|
|
594 |
{
|
|
|
595 |
|
|
|
596 |
echo " <td></td>
|
|
|
597 |
<td colspan=\"3\" width=\"90\">
|
|
|
598 |
|
|
|
599 |
</td>";
|
|
|
600 |
|
|
|
601 |
}
|
|
|
602 |
if ( $user_rechte['Warenwirtschaft']['bestellung']['mahnungStatus'] )
|
|
|
603 |
{
|
|
|
604 |
echo " <td></td>
|
|
|
605 |
<td colspan=\"3\" class=\"rechts\">
|
|
|
606 |
Mahnung
|
|
|
607 |
</td>";
|
|
|
608 |
}
|
|
|
609 |
else
|
|
|
610 |
{
|
|
|
611 |
echo " <td></td>
|
|
|
612 |
<td colspan=\"3\" >
|
|
|
613 |
|
|
|
614 |
</td>";
|
|
|
615 |
|
|
|
616 |
}
|
|
|
617 |
|
|
|
618 |
if ( $user_rechte['Warenwirtschaft']['bestellung']['garantieStatus'] )
|
|
|
619 |
{
|
|
|
620 |
echo " <td></td>
|
|
|
621 |
<td colspan=\"3\" class=\"rechts\">
|
|
|
622 |
Garantieantrag
|
|
|
623 |
</td>";
|
|
|
624 |
}
|
|
|
625 |
else
|
|
|
626 |
{
|
|
|
627 |
echo " <td></td>
|
|
|
628 |
<td colspan=\"3\" >
|
|
|
629 |
|
|
|
630 |
</td>";
|
|
|
631 |
|
|
|
632 |
}
|
|
|
633 |
|
|
|
634 |
?>
|
|
|
635 |
</tr>
|
|
|
636 |
</table>
|
|
|
637 |
</td>
|
|
|
638 |
</tr>
|
|
|
639 |
<?php
|
|
|
640 |
while ( $zeile_artikel = mysql_fetch_array($result_artikel) )
|
|
|
641 |
{
|
|
|
642 |
?>
|
|
|
643 |
<?php
|
|
|
644 |
|
|
|
645 |
if ( $zeile_artikel[artikelStatus] != "storniert" )
|
|
|
646 |
{
|
|
|
647 |
$summe += $zeile_artikel[2] * $zeile_artikel[Menge];
|
|
|
648 |
}
|
|
|
649 |
/*
|
|
|
650 |
ein artikel ist kein versand, wenn
|
|
|
651 |
er einen vater > 3 hat
|
|
|
652 |
ODER KEINEN VATER hat
|
|
|
653 |
und der Status != versand
|
|
|
654 |
*/
|
|
|
655 |
if ( (($zeile_artikel[Father] > -3) or ($zeile_artikel[Father] == "")) and
|
|
|
656 |
($zeile_artikel[artikelStatus] != 'versand') )
|
|
|
657 |
{
|
|
|
658 |
$itemList[] = $zeile_artikel[0];
|
|
|
659 |
?>
|
|
|
660 |
<tr class="<?php if ( $runner++ % 2 != 0 )
|
|
|
661 |
{ ?>lightgray<?php }
|
|
|
662 |
else
|
|
|
663 |
{ ?>darkgray<?php } ?>">
|
|
|
664 |
<td width="5%" valign="top">
|
|
|
665 |
<?php
|
|
|
666 |
if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
667 |
{
|
|
|
668 |
echo '<strike>';
|
|
|
669 |
}
|
|
|
670 |
echo $zeile_artikel[kennung];
|
|
|
671 |
if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
672 |
{
|
|
|
673 |
echo '</strike>';
|
|
|
674 |
}
|
|
|
675 |
?>
|
|
|
676 |
</td>
|
|
|
677 |
<td width="90%">
|
|
|
678 |
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
|
|
|
679 |
<tr>
|
|
|
680 |
<td align="right" valign="top" nowrap>
|
|
|
681 |
<?php if ( $_GET[edit] == $zeile_artikel[0] )
|
|
|
682 |
{ ?>
|
|
|
683 |
<input type="text" name="cmd[artikel_to_Bestellung][<?= $zeile_artikel[0]; ?>][Menge]" size="2" value="<?php echo
|
|
|
684 |
$zeile_artikel[Menge] ?>">
|
|
|
685 |
<?php }
|
|
|
686 |
else
|
|
|
687 |
{
|
|
|
688 |
if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
689 |
{
|
|
|
690 |
echo '<strike>';
|
|
|
691 |
}
|
|
|
692 |
echo $zeile_artikel[Menge];
|
|
|
693 |
if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
694 |
{
|
|
|
695 |
echo '<strike>';
|
|
|
696 |
}
|
|
|
697 |
} ?>
|
|
|
698 |
x </td>
|
|
|
699 |
<td width="100%" onDblClick="location.href='<?= $self ?>?Bestellung=<?= $_GET[Bestellung]; ?><?php if ( $_GET[edit] !=
|
|
|
700 |
$zeile_artikel[0] )
|
|
|
701 |
{ ?>&edit=<?= $zeile_artikel[0]; ?><?php } ?>'">
|
|
|
702 |
<?php
|
|
|
703 |
if ( $zeile_artikel[Bezeichnung] )
|
|
|
704 |
{
|
|
|
705 |
$zeile_artikel[kurzbezeichnung] = $zeile_artikel[Bezeichnung];
|
|
|
706 |
}
|
|
|
707 |
if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
708 |
{
|
|
|
709 |
echo '<strike>';
|
|
|
710 |
}
|
|
|
711 |
if ( $zeile_artikel[hersteller] )
|
|
|
712 |
{
|
|
|
713 |
// Hole den Herstellernamen dieses Artikels
|
|
|
714 |
$sql_hersteller = "
|
|
|
715 |
SELECT
|
|
|
716 |
Name
|
|
|
717 |
FROM
|
|
|
718 |
Herstellerkatalog
|
|
|
719 |
WHERE
|
|
|
720 |
ID = '" . $zeile_artikel[hersteller] . "'
|
|
|
721 |
;";
|
|
|
722 |
$result_hersteller = mysql_query( $sql_hersteller ) or die( mysql_errno
|
|
|
723 |
() . ': ' . mysql_error() . '<hr />' . $sql_hersteller );
|
|
|
724 |
$row_hersteller = mysql_fetch_assoc( $result_hersteller );
|
|
|
725 |
$zeile_artikel[hersteller] = $row_hersteller['Name'];
|
|
|
726 |
|
|
|
727 |
if ( $zeile_artikel[Father] > 0 && !stristr($zeile_artikel[kurzbezeichnung],
|
|
|
728 |
$zeile_artikel[hersteller]) )
|
|
|
729 |
{
|
|
|
730 |
echo $zeile_artikel[hersteller] . " ";
|
|
|
731 |
}
|
|
|
732 |
}
|
|
|
733 |
|
|
|
734 |
if ( $_GET[edit] == $zeile_artikel[0] )
|
|
|
735 |
{
|
|
|
736 |
?><input type="text" name="cmd[artikel_to_Bestellung][<?= $zeile_artikel[0]; ?>][Bezeichnung]" size="45" value="<?php echo
|
|
|
737 |
$zeile_artikel[kurzbezeichnung] ?>"><?php
|
|
|
738 |
}
|
|
|
739 |
else
|
|
|
740 |
{
|
|
|
741 |
// PL: Bestandskennzeichnung
|
|
|
742 |
if ( isset($web_rechte['Warenwirtschaft']['lagerwirtschaft']['bestandskennzeichnung']) )
|
|
|
743 |
{
|
|
|
744 |
if ( getBestandsmenge($zeile_artikel['ID']) > 0 )
|
|
|
745 |
{
|
|
|
746 |
echo "<span class='bestandskennzeichnung' style='cursor: pointer; background-color: " . getBestandskennzeichnung($web_rechte['Warenwirtschaft']['lagerwirtschaft']['bestandskennzeichnung']) . "'>";
|
|
|
747 |
}
|
|
|
748 |
}
|
|
|
749 |
echo strip_tags( $zeile_artikel[kurzbezeichnung] );
|
|
|
750 |
// PL: Bestandskennzeichnung
|
|
|
751 |
if ( isset($web_rechte['Warenwirtschaft']['lagerwirtschaft']['bestandskennzeichnung']) )
|
|
|
752 |
{
|
|
|
753 |
if ( getBestandsmenge($zeile_artikel['ID']) )
|
|
|
754 |
{
|
|
|
755 |
echo "</span>";
|
|
|
756 |
}
|
|
|
757 |
}
|
|
|
758 |
// ME:
|
|
|
759 |
if ( $zeile_artikel['option_eingabe'] )
|
|
|
760 |
{
|
|
|
761 |
echo buildCustomTextEmail( unserialize($zeile_artikel['option_eingabe']),
|
|
|
762 |
1 );
|
|
|
763 |
}
|
|
|
764 |
}
|
|
|
765 |
|
|
|
766 |
|
|
|
767 |
if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
768 |
{
|
|
|
769 |
echo '</strike>';
|
|
|
770 |
}
|
|
|
771 |
?>
|
|
|
772 |
<?php if ( $zeile_artikel[ID] )
|
|
|
773 |
{ ?><a href="/Online-Shop/artikel.php?action=edit&ID=<?php echo
|
|
|
774 |
$zeile_artikel[ID]; ?>" target="_blank">(?)</a><?php } ?>
|
|
|
775 |
<?php
|
|
|
776 |
// Sonderausgaben wenn shop = eBay-shop - Nw 02.09.2004
|
|
|
777 |
|
|
|
778 |
$sql = "
|
|
|
779 |
SELECT
|
|
|
780 |
eb.eBay_Auktionen_ID AS aukId
|
|
|
781 |
FROM
|
|
|
782 |
eBay_Bestellung AS eb LEFT JOIN artikel_to_Bestellung AS a2b
|
|
|
783 |
ON eb.Bestellung_ID = a2b.Bestellung
|
|
|
784 |
WHERE
|
|
|
785 |
a2b.Bestellung = $zeile_artikel[Bestellung]
|
|
|
786 |
AND a2b.Preis_pro_Stueck = $zeile_artikel[Preis_pro_Stueck]
|
|
|
787 |
";
|
|
|
788 |
if ( $result = mysql_query($sql) )
|
|
|
789 |
{
|
|
|
790 |
$row = mysql_fetch_assoc( $result );
|
|
|
791 |
$ebay_art_id = $row[aukId];
|
|
|
792 |
}
|
|
|
793 |
|
|
|
794 |
|
|
|
795 |
// Falls 'eBay_Auktionen_ID' einen Wert hat, gebe den Link zum Artikel aus
|
|
|
796 |
if ( $ebay_art_id )
|
|
|
797 |
{ ?>
|
|
|
798 |
<?php if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
799 |
{
|
|
|
800 |
echo '<strike>';
|
|
|
801 |
} ?>
|
|
|
802 |
|
|
|
803 |
(<a href="http://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&rd=1&item=<?php echo
|
|
|
804 |
$ebay_art_id ?>" target="_blank"><?php echo "eBay-Auktion" ?> </a>)
|
|
|
805 |
|
|
|
806 |
<?php if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
807 |
{
|
|
|
808 |
echo '</strike>';
|
|
|
809 |
} ?>
|
|
|
810 |
<?php } ?>
|
|
|
811 |
</td>
|
|
|
812 |
<td align="right" nowrap valign="top">
|
|
|
813 |
<?php if ( $_GET[edit] == $zeile_artikel[0] )
|
|
|
814 |
{
|
|
|
815 |
if ( $preise_anzeigen == 1 )
|
|
|
816 |
{
|
|
|
817 |
?>
|
|
|
818 |
<input type="text" name="cmd[artikel_to_Bestellung][<?= $zeile_artikel[0]; ?>][Preis_pro_Stueck]" size="3" value="<?php echo
|
|
|
819 |
$zeile_artikel[2] ?>" onChange="this.value=killkomma(this.value);">
|
|
|
820 |
<?php
|
|
|
821 |
|
|
|
822 |
}
|
|
|
823 |
}
|
|
|
824 |
else
|
|
|
825 |
{
|
|
|
826 |
|
|
|
827 |
if ( $preise_anzeigen == 1 )
|
|
|
828 |
{
|
|
|
829 |
|
|
|
830 |
if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
831 |
{
|
|
|
832 |
echo '<strike>';
|
|
|
833 |
}
|
|
|
834 |
echo number_format( $zeile_artikel[2], 2, ',', '.' );
|
|
|
835 |
if ( $zeile_artikel[artikelStatus] == 'storniert' )
|
|
|
836 |
{
|
|
|
837 |
echo '</strike>';
|
|
|
838 |
}
|
|
|
839 |
}
|
|
|
840 |
}
|
|
|
841 |
if ( $preise_anzeigen == 1 )
|
|
|
842 |
{
|
|
|
843 |
?>
|
|
|
844 |
€
|
|
|
845 |
<?php
|
|
|
846 |
}
|
|
|
847 |
?>
|
|
|
848 |
</td>
|
|
|
849 |
<td align="right" nowrap valign="top">
|
|
|
850 |
<?php
|
|
|
851 |
// Storno- Button
|
|
|
852 |
if ( $_GET[edit] == $zeile_artikel[0] )
|
|
|
853 |
{
|
|
|
854 |
echo '<a href="' . $self . '?Bestellung=' . $zeile[ID] .
|
|
|
855 |
'&artikelStatus[' . $zeile_artikel[0] . ']=S">X</a>';
|
|
|
856 |
}
|
|
|
857 |
?>
|
|
|
858 |
</td>
|
|
|
859 |
<?php
|
|
|
860 |
if ( isset($web_rechte["Warenwirtschaft"]["bestellung"]["artikel_sortieren"]) )
|
|
|
861 |
{
|
|
|
862 |
?>
|
|
|
863 |
<td>
|
|
|
864 |
<?php
|
|
|
865 |
if ( $runner > 1 && $zeile_artikel["ab_Rang"] > 0 )
|
|
|
866 |
{
|
|
|
867 |
$url = "$SELF?Bestellung=$Bestellung&id=" . $zeile_artikel["ab_id"] .
|
|
|
868 |
"&dir=up";
|
|
|
869 |
?>
|
|
|
870 |
<a href="<?php echo $url; ?>"><img src="../images/Online-Shop/directory/scroll_up.gif" alt="auf" border="0" width="11" /></a>
|
|
|
871 |
<?php
|
|
|
872 |
}
|
|
|
873 |
if ( $runner <= $count - 1 )
|
|
|
874 |
{
|
|
|
875 |
$url = "$SELF?Bestellung=$Bestellung&id=" . $zeile_artikel["ab_id"] .
|
|
|
876 |
"&dir=down"
|
|
|
877 |
?>
|
|
|
878 |
<a href="<?php echo $url; ?>"><img src="../images/Online-Shop/directory/scroll_down.gif" alt="ab" border="0" width="11" /></a>
|
|
|
879 |
<?php
|
|
|
880 |
}
|
|
|
881 |
?>
|
|
|
882 |
</td>
|
|
|
883 |
<?php
|
|
|
884 |
}
|
|
|
885 |
?>
|
|
|
886 |
</tr>
|
|
|
887 |
</table>
|
|
|
888 |
</td>
|
|
|
889 |
<td colspan=9 bgcolor="#FFFF00">
|
|
|
890 |
<table border="0" cellspacing="2" cellpadding="2">
|
|
|
891 |
<tr>
|
|
|
892 |
<?php
|
|
|
893 |
$my_buttons = $cmd_buttons;
|
|
|
894 |
|
|
|
895 |
foreach ( array("artikelStatus", "rechnungStatus",
|
|
|
896 |
"lieferscheinStatus", "mahnungStatus") as $wr_index )
|
|
|
897 |
{
|
|
|
898 |
$wr = &$web_rechte[modul_name][tool_name][$wr_index];
|
|
|
899 |
$wr = explode( ";", $wr );
|
|
|
900 |
|
|
|
901 |
foreach ( $wr as $wr_key => $wr_value )
|
|
|
902 |
{
|
|
|
903 |
$wr[$wr_key] = explode( "#", $wr[$wr_key] );
|
|
|
904 |
}
|
|
|
905 |
}
|
|
|
906 |
|
|
|
907 |
foreach ( $my_buttons as $my_buttons_index => $my_buttons_value )
|
|
|
908 |
{
|
|
|
909 |
if ( !isset($user_rechte[modul_name][tool_name][rechnungStatus]) )
|
|
|
910 |
{
|
|
|
911 |
if ( $my_buttons_value[3] == "rechnungStatus" )
|
|
|
912 |
{
|
|
|
913 |
$my_buttons[$my_buttons_index] = "";
|
|
|
914 |
}
|
|
|
915 |
|
|
|
916 |
}
|
|
|
917 |
if ( !isset($user_rechte[modul_name][tool_name]["garantieStatus"]) )
|
|
|
918 |
{
|
|
|
919 |
if ( $my_buttons_value[3] == "garantieStatus" )
|
|
|
920 |
{
|
|
|
921 |
$my_buttons[$my_buttons_index] = "";
|
|
|
922 |
}
|
|
|
923 |
|
|
|
924 |
}
|
|
|
925 |
}
|
|
|
926 |
foreach ( $my_buttons as $my_buttons_index => $my_buttons_value )
|
|
|
927 |
{
|
|
|
928 |
if ( !isset($user_rechte[modul_name][tool_name][mahnungStatus]) )
|
|
|
929 |
{
|
|
|
930 |
if ( $my_buttons_value[3] == "mahnungStatus" )
|
|
|
931 |
{
|
|
|
932 |
$my_buttons[$my_buttons_index] = "";
|
|
|
933 |
}
|
|
|
934 |
|
|
|
935 |
}
|
|
|
936 |
}
|
|
|
937 |
unset( $wr );
|
|
|
938 |
// zum kopieren Ma
|
|
|
939 |
if ( $PHP_AUTH_USER == 'admin' )
|
|
|
940 |
{
|
|
|
941 |
//print_r($my_buttons);
|
|
|
942 |
}
|
|
|
943 |
foreach ( $my_buttons as $my_button_index => $button )
|
|
|
944 |
{
|
|
|
945 |
echo "<td valign=top nowrap";
|
|
|
946 |
if ( is_array($button) )
|
|
|
947 |
{
|
|
|
948 |
echo " class=darkgray>";
|
|
|
949 |
echo "<a href=\"$self?Bestellung=$Bestellung&" . $button[3] .
|
|
|
950 |
"[" . $zeile_artikel[0] . "]=" . $button[0] . "\" ";
|
|
|
951 |
echo " title=\"" . $button[1] . "\" ";
|
|
|
952 |
//echo "<br>zeile_artikel: ".$zeile_artikel[$button[3]]." | ";
|
|
|
953 |
//echo "<br>button: ".$button[1]." | ";
|
|
|
954 |
|
|
|
955 |
if ( $zeile_artikel[$button[3]] == $button[1] )
|
|
|
956 |
{
|
|
|
957 |
echo "class=" . $button[2];
|
|
|
958 |
// Confirm fuer den Status
|
|
|
959 |
echo " onClick=\"return confirm('Achtung, wollen Sie den Status : \'" .
|
|
|
960 |
$zeile_artikel[$button[3]] . "\' löschen ?');\" ";
|
|
|
961 |
}
|
|
|
962 |
else
|
|
|
963 |
{
|
|
|
964 |
echo "class=status_off ";
|
|
|
965 |
// Confirm fuer den Status
|
|
|
966 |
//echo "onClick=\"return confirm('Wollen Sie diesen Status: \'".$button[1]."\' ändern ?');\" ";
|
|
|
967 |
|
|
|
968 |
}
|
|
|
969 |
if ( !empty($zeile_artikel[$button[3]]) )
|
|
|
970 |
{
|
|
|
971 |
|
|
|
972 |
}
|
|
|
973 |
echo "> ";
|
|
|
974 |
|
|
|
975 |
//$my_output = &$web_rechte[modul_name][tool_name][$button[3]][$my_button_index-$button[4]][0];
|
|
|
976 |
if ( empty($my_output) )
|
|
|
977 |
{
|
|
|
978 |
echo $button[0];
|
|
|
979 |
}
|
|
|
980 |
else
|
|
|
981 |
{
|
|
|
982 |
echo $my_output;
|
|
|
983 |
}
|
|
|
984 |
|
|
|
985 |
echo " </a>";
|
|
|
986 |
}
|
|
|
987 |
else
|
|
|
988 |
{
|
|
|
989 |
echo ">" . $button;
|
|
|
990 |
}
|
|
|
991 |
echo "</td>";
|
|
|
992 |
}
|
|
|
993 |
?>
|
|
|
994 |
</tr>
|
|
|
995 |
</table>
|
|
|
996 |
</td>
|
|
|
997 |
</tr>
|
|
|
998 |
<?php
|
|
|
999 |
}
|
|
|
1000 |
else
|
|
|
1001 |
{
|
|
|
1002 |
$Versand_Artikel = $zeile_artikel;
|
|
|
1003 |
?>
|
|
|
1004 |
<tr class="<?php if ( $runner++ % 2 != 0 )
|
|
|
1005 |
{ ?>lightgray<?php }
|
|
|
1006 |
else
|
|
|
1007 |
{ ?>darkgray<?php } ?>">
|
|
|
1008 |
<td width="5%" valign="top"> </td>
|
|
|
1009 |
<td width="90%">
|
|
|
1010 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
1011 |
<tr>
|
|
|
1012 |
<td nowrap valign="top" onDblClick="location.href='<?= $self ?>?Bestellung=<?= $_GET[Bestellung]; ?><?php if ( $_GET[edit] !=
|
|
|
1013 |
$zeile_artikel[0] )
|
|
|
1014 |
{ ?>&edit=<?= $zeile_artikel[0]; ?><?php } ?>'"> Versand:
|
|
|
1015 |
<?php
|
|
|
1016 |
if ( $zeile_artikel[Bezeichnung] )
|
|
|
1017 |
{
|
|
|
1018 |
$zeile_artikel[kurzbezeichnung] = $zeile_artikel[Bezeichnung];
|
|
|
1019 |
}
|
|
|
1020 |
|
|
|
1021 |
|
|
|
1022 |
if ( $_GET[edit] == $zeile_artikel[0] )
|
|
|
1023 |
{ ?>
|
|
|
1024 |
<input type="text" name="cmd[artikel_to_Bestellung][<?= $zeile_artikel[0]; ?>][Bezeichnung]" size="20" value="<?php echo
|
|
|
1025 |
$zeile_artikel[kurzbezeichnung] ?>">
|
|
|
1026 |
<?php }
|
|
|
1027 |
else
|
|
|
1028 |
{
|
|
|
1029 |
echo strip_tags( $zeile_artikel[kurzbezeichnung] );
|
|
|
1030 |
} ?>
|
|
|
1031 |
</td>
|
|
|
1032 |
<td align="right" nowrap valign="top" onDblClick="location.href='<?= $self ?>?Bestellung=<?= $_GET[Bestellung]; ?><?php if ( $_GET[edit] !=
|
|
|
1033 |
$zeile_artikel[0] )
|
|
|
1034 |
{ ?>&edit=<?= $zeile_artikel[0]; ?><?php } ?>'">
|
|
|
1035 |
|
|
|
1036 |
<?php if ( $_GET[edit] == $zeile_artikel[0] )
|
|
|
1037 |
{
|
|
|
1038 |
if ( $preise_anzeigen == 1 )
|
|
|
1039 |
{
|
|
|
1040 |
?>
|
|
|
1041 |
<input type="text" name="cmd[artikel_to_Bestellung][<?= $zeile_artikel[0]; ?>][Preis_pro_Stueck]" size="3" value="<?php echo
|
|
|
1042 |
$zeile_artikel[2] ?>" onChange="this.value=killkomma(this.value);">
|
|
|
1043 |
<?php
|
|
|
1044 |
}
|
|
|
1045 |
}
|
|
|
1046 |
else
|
|
|
1047 |
{
|
|
|
1048 |
if ( $preise_anzeigen == 1 )
|
|
|
1049 |
{
|
|
|
1050 |
echo number_format( $zeile_artikel[2], 2, ',', '.' );
|
|
|
1051 |
}
|
|
|
1052 |
}
|
|
|
1053 |
if ( $preise_anzeigen == 1 )
|
|
|
1054 |
{
|
|
|
1055 |
?>
|
|
|
1056 |
€
|
|
|
1057 |
<?php
|
|
|
1058 |
}
|
|
|
1059 |
?>
|
|
|
1060 |
</td>
|
|
|
1061 |
</tr>
|
|
|
1062 |
</table>
|
|
|
1063 |
</td>
|
|
|
1064 |
<td colspan=9 align="center"> </td>
|
|
|
1065 |
</tr>
|
|
|
1066 |
<?php
|
|
|
1067 |
}
|
|
|
1068 |
}
|
|
|
1069 |
|
|
|
1070 |
if ( !$Versand_Artikel )
|
|
|
1071 |
{
|
|
|
1072 |
$bufferLand = $BestellData[liefer_Land];
|
|
|
1073 |
if ( empty($bufferLand) )
|
|
|
1074 |
{
|
|
|
1075 |
$bufferLand = $BestellData[Land];
|
|
|
1076 |
}
|
|
|
1077 |
|
|
|
1078 |
$versandItems = getVersandItems( $BestellData[shops_ID], $_SESSION[shops][$BestellData["shops_ID"]]["Language"],
|
|
|
1079 |
$bufferLand );
|
|
|
1080 |
|
|
|
1081 |
if ( $versandItems != array() )
|
|
|
1082 |
{
|
|
|
1083 |
?>
|
|
|
1084 |
<tr class="<?php if ( $runner++ % 2 != 0 )
|
|
|
1085 |
{ ?>lightgray<?php }
|
|
|
1086 |
else
|
|
|
1087 |
{ ?>darkgray<?php } ?>">
|
|
|
1088 |
<td width="5%" valign="top"> </td>
|
|
|
1089 |
<td width="90%">
|
|
|
1090 |
<select name="versandItem">
|
|
|
1091 |
<option></option>
|
|
|
1092 |
<?php
|
|
|
1093 |
foreach ( $versandItems as $versandOption )
|
|
|
1094 |
{
|
|
|
1095 |
?><option value="<?= base64_encode( serialize($versandOption) ) ?>"><?php
|
|
|
1096 |
echo $versandOption[kurz];
|
|
|
1097 |
?></option><?php
|
|
|
1098 |
}
|
|
|
1099 |
?>
|
|
|
1100 |
</select><input type="submit" name="enterVersand" value="OK" />
|
|
|
1101 |
</td>
|
|
|
1102 |
<td colspan=9 align="center"> </td>
|
|
|
1103 |
</tr>
|
|
|
1104 |
<?php
|
|
|
1105 |
}
|
|
|
1106 |
}
|
|
|
1107 |
?>
|
|
|
1108 |
<tr>
|
|
|
1109 |
<td width="5%" valign="top"> </td>
|
|
|
1110 |
<td> </td>
|
|
|
1111 |
<td>
|
|
|
1112 |
<?php
|
|
|
1113 |
//if ($web_rechte[modul_name][tool_name]["massen_schalter"])
|
|
|
1114 |
|
|
|
1115 |
{
|
|
|
1116 |
?><table border="0" cellspacing="2" cellpadding="2"><tr><?php
|
|
|
1117 |
$my_buttons = $cmd_buttons;
|
|
|
1118 |
|
|
|
1119 |
foreach ( array("artikelStatus", "rechnungStatus", "garantieStatus") as
|
|
|
1120 |
$wr_index )
|
|
|
1121 |
{
|
|
|
1122 |
$wr = &$web_rechte[modul_name][tool_name][$wr_index];
|
|
|
1123 |
$wr = explode( ";", $wr );
|
|
|
1124 |
|
|
|
1125 |
foreach ( $wr as $wr_key => $wr_value )
|
|
|
1126 |
{
|
|
|
1127 |
$wr[$wr_key] = explode( "#", $wr[$wr_key] );
|
|
|
1128 |
}
|
|
|
1129 |
}
|
|
|
1130 |
|
|
|
1131 |
foreach ( $my_buttons as $my_buttons_index => $my_buttons_value )
|
|
|
1132 |
{
|
|
|
1133 |
if ( !isset($user_rechte[modul_name][tool_name][rechnungStatus]) )
|
|
|
1134 |
{
|
|
|
1135 |
if ( $my_buttons_value[3] == "rechnungStatus" )
|
|
|
1136 |
{
|
|
|
1137 |
$my_buttons[$my_buttons_index] = "";
|
|
|
1138 |
}
|
|
|
1139 |
}
|
|
|
1140 |
if ( !isset($user_rechte[modul_name][tool_name]["garantieStatus"]) )
|
|
|
1141 |
{
|
|
|
1142 |
if ( $my_buttons_value[3] == "garantieStatus" )
|
|
|
1143 |
{
|
|
|
1144 |
$my_buttons[$my_buttons_index] = "";
|
|
|
1145 |
}
|
|
|
1146 |
}
|
|
|
1147 |
}
|
|
|
1148 |
unset( $wr );
|
|
|
1149 |
|
|
|
1150 |
foreach ( $my_buttons as $my_button_index => $button )
|
|
|
1151 |
{
|
|
|
1152 |
echo "<td valign=top nowrap";
|
|
|
1153 |
if ( is_array($button) )
|
|
|
1154 |
{
|
|
|
1155 |
echo " class=darkgray>";
|
|
|
1156 |
echo "<a href=\"$self?Bestellung=$Bestellung";
|
|
|
1157 |
foreach ( $itemList as $id )
|
|
|
1158 |
{
|
|
|
1159 |
echo "&" . $button[3] . "[" . $id . "]=" . $button[0];
|
|
|
1160 |
}
|
|
|
1161 |
echo "&massenschalter=true\" style=\"text-decoration:none;\"";
|
|
|
1162 |
echo "class=" . $button[2];
|
|
|
1163 |
//echo " onClick=\"return confirm('Wollen Sie den Status: \'".$button[1]."\' für alle Artikel ändern ?');\" ";
|
|
|
1164 |
echo "> ";
|
|
|
1165 |
|
|
|
1166 |
if ( empty($my_output) )
|
|
|
1167 |
{
|
|
|
1168 |
echo "∑";
|
|
|
1169 |
}
|
|
|
1170 |
else
|
|
|
1171 |
{
|
|
|
1172 |
echo $my_output;
|
|
|
1173 |
}
|
|
|
1174 |
|
|
|
1175 |
echo " </a>";
|
|
|
1176 |
}
|
|
|
1177 |
else
|
|
|
1178 |
{
|
|
|
1179 |
echo ">" . $button;
|
|
|
1180 |
}
|
|
|
1181 |
echo "</td>";
|
|
|
1182 |
}
|
|
|
1183 |
?></tr></table>
|
|
|
1184 |
<?php
|
|
|
1185 |
}
|
|
|
1186 |
?>
|
|
|
1187 |
</td>
|
|
|
1188 |
</tr>
|
|
|
1189 |
<tr>
|
|
|
1190 |
<td width="5%" valign="top"> </td>
|
|
|
1191 |
<td align="right" class="rechts">
|
|
|
1192 |
<?php if ( $preise_anzeigen == 1 )
|
|
|
1193 |
{ ?>
|
|
|
1194 |
Bestellwert:
|
|
|
1195 |
<?php echo number_format( $summe, 2, ',', '.' ) ?>
|
|
|
1196 |
€
|
|
|
1197 |
<?php } ?>
|
|
|
1198 |
</td>
|
|
|
1199 |
<td colspan="9"><input type="button" name="manu" value="Neuen Artikel anlegen" onClick="fenster=window.open('bestellung_liste_manu.php?Bestellung=<?php echo
|
|
|
1200 |
$_SESSION['best_manu.php']['Kundendaten']['Bestellung']; ?>', 'fenster','toolbar=no,status=no,menubar=no,scrollbars=yes')" id="noprint"></td>
|
|
|
1201 |
</tr>
|
|
|
1202 |
<?php
|
|
|
1203 |
if ( $Versand_Artikel )
|
|
|
1204 |
{
|
|
|
1205 |
?>
|
|
|
1206 |
<tr>
|
|
|
1207 |
<td valign="top"> </td>
|
|
|
1208 |
<td nowrap class="rechts"> Versandstatus (O=offen; F=freigegeben; V=versand)</td>
|
|
|
1209 |
<td colspan=9 align="center" bgcolor="#FFFF00">
|
|
|
1210 |
<table border="0" cellspacing="2" cellpadding="2">
|
|
|
1211 |
<tr>
|
|
|
1212 |
<td align="center" valign="top" nowrap class=darkgray><a href="<?php echo
|
|
|
1213 |
$self ?>?Bestellung=<?php echo $Bestellung ?>&artikelStatus[<?php echo
|
|
|
1214 |
$Versand_Artikel[0] ?>]=O" <?php if ( $Versand_Artikel[1] == 'offen' )
|
|
|
1215 |
{ ?>class="status_red"<?php }
|
|
|
1216 |
else
|
|
|
1217 |
{ ?>class="status_off"<?php } ?> <?php if ( $Versand_Artikel[1] ==
|
|
|
1218 |
'offen' )
|
|
|
1219 |
{ ?>onClick="return confirm('Möchten Sie den Status des Versandartikels löschen ?');"<?php } ?>> O </a></td>
|
|
|
1220 |
<td align="center" valign="top" nowrap class=darkgray><a href="<?php echo
|
|
|
1221 |
$self ?>?Bestellung=<?php echo $Bestellung ?>&artikelStatus[<?php echo
|
|
|
1222 |
$Versand_Artikel[0] ?>]=F" <?php if ( $Versand_Artikel[1] == 'freigegeben' )
|
|
|
1223 |
{ ?>class="status_yellow"<?php }
|
|
|
1224 |
else
|
|
|
1225 |
{ ?>class="status_off"<?php } ?> <?php if ( $Versand_Artikel[1] ==
|
|
|
1226 |
'freigegeben' )
|
|
|
1227 |
{ ?>onClick="return confirm('Möchten Sie den Status des Versandartikels löschen ?');"<?php } ?>> F </a></td>
|
|
|
1228 |
<td align="center" valign="top" nowrap class=darkgray><a href="<?php echo
|
|
|
1229 |
$self ?>?Bestellung=<?php echo $Bestellung ?>&artikelStatus[<?php echo
|
|
|
1230 |
$Versand_Artikel[0] ?>]=V" <?php if ( $Versand_Artikel[1] == 'versand' )
|
|
|
1231 |
{ ?>class="status_green"<?php }
|
|
|
1232 |
else
|
|
|
1233 |
{ ?>class="status_off"<?php } ?> <?php if ( $Versand_Artikel[1] ==
|
|
|
1234 |
'versand' )
|
|
|
1235 |
{ ?>onClick="return confirm('Möchten Sie den Status des Versandartikels löschen ?');"<?php } ?>> V </a></td>
|
|
|
1236 |
</tr>
|
|
|
1237 |
</table>
|
|
|
1238 |
</td>
|
|
|
1239 |
</tr>
|
|
|
1240 |
<?php
|
|
|
1241 |
$kk_info = unserialize( $zeile["kk_info"] );
|
|
|
1242 |
if ( strtolower($Versand_Artikel["short_line_1"]) == "kreditkarte" &&
|
|
|
1243 |
strtolower($kk_info["status"]) == "offen" )
|
|
|
1244 |
{
|
|
|
1245 |
$kk = 1;
|
|
|
1246 |
}
|
|
|
1247 |
}
|
|
|
1248 |
?>
|
|
|
1249 |
</table>
|
|
|
1250 |
<table cellspacing=3 cellpadding=2 class=darkgray>
|
|
|
1251 |
<tr>
|
|
|
1252 |
<?php
|
|
|
1253 |
if ( $artikel_anz )
|
|
|
1254 |
{
|
|
|
1255 |
foreach ( $my_buttons as $my_button_index => $button )
|
|
|
1256 |
{
|
|
|
1257 |
if ( is_array($button) )
|
|
|
1258 |
{
|
|
|
1259 |
?><td align="center" nowrap class="<?= $button[2]; ?>" id="noprint" style="text-decoration:none;"><?php
|
|
|
1260 |
$my_output = &$web_rechte[modul_name][tool_name][$button[3]][$my_button_index -
|
|
|
1261 |
$button[4]][1];
|
|
|
1262 |
if ( empty($my_output) )
|
|
|
1263 |
{
|
|
|
1264 |
echo $button[1];
|
|
|
1265 |
}
|
|
|
1266 |
else
|
|
|
1267 |
{
|
|
|
1268 |
echo $my_output;
|
|
|
1269 |
}
|
|
|
1270 |
?></td><?php
|
|
|
1271 |
}
|
|
|
1272 |
else
|
|
|
1273 |
{
|
|
|
1274 |
echo
|
|
|
1275 |
"</tr></table><table cellspacing=3 cellpadding=2 class=darkgray><tr>";
|
|
|
1276 |
}
|
|
|
1277 |
}
|
|
|
1278 |
}
|
|
|
1279 |
?>
|
|
|
1280 |
</tr>
|
|
|
1281 |
</table>
|
|
|
1282 |
</td>
|
|
|
1283 |
</tr>
|
|
|
1284 |
<?php
|
|
|
1285 |
$Feld = "status1";
|
|
|
1286 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1287 |
{
|
|
|
1288 |
$fname_f = $web_rechte[modul_name][tool_name][$Feld];
|
|
|
1289 |
$pos = strpos( $fname_f, ";" );
|
|
|
1290 |
$fname = substr( $fname_f, 0, $pos );
|
|
|
1291 |
?>
|
|
|
1292 |
<tr>
|
|
|
1293 |
<td valign="top" class="links" id="noprint"><?= $fname; ?></td>
|
|
|
1294 |
<td class="rechts">
|
|
|
1295 |
<?php $kats = explode( ";", $web_rechte[modul_name][tool_name][$Feld] ); ?>
|
|
|
1296 |
<select name="<?php echo $Feld ?>">
|
|
|
1297 |
<?php echo $web_rechte[modul_name][tool_name][$Feld . "_EventHandler"]; ?>
|
|
|
1298 |
<?php
|
|
|
1299 |
$kats[0] = "";
|
|
|
1300 |
$kat_runner = 0;
|
|
|
1301 |
foreach ( $kats as $elem )
|
|
|
1302 |
{
|
|
|
1303 |
?>
|
|
|
1304 |
<option value="<? echo $elem ?>"<?php if ( $zeile[$Feld] ==
|
|
|
1305 |
$elem )
|
|
|
1306 |
{ ?> selected<?php } ?>>
|
|
|
1307 |
<?php echo $elem ?>
|
|
|
1308 |
</option>
|
|
|
1309 |
<?php
|
|
|
1310 |
$kat_runner++;
|
|
|
1311 |
}
|
|
|
1312 |
?>
|
|
|
1313 |
</select>
|
|
|
1314 |
</td>
|
|
|
1315 |
</tr>
|
|
|
1316 |
<?php
|
|
|
1317 |
}
|
|
|
1318 |
?>
|
|
|
1319 |
<?php
|
|
|
1320 |
$Feld = "shortline1";
|
|
|
1321 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1322 |
{
|
|
|
1323 |
$fname_f = $web_rechte[modul_name][tool_name][$Feld];
|
|
|
1324 |
$pos = strpos( $fname_f, ";" );
|
|
|
1325 |
$fname = substr( $fname_f, 0, $pos );
|
|
|
1326 |
$fsize = substr( $fname_f, $pos + 1 );
|
|
|
1327 |
?>
|
|
|
1328 |
<tr>
|
|
|
1329 |
<td valign="top" class="links" id="noprint"><?= $fname; ?></td>
|
|
|
1330 |
<td class="rechts"><input type="text" name="shortline1" value="<?= $zeile["shortline1"]; ?>" size="<?= $fsize; ?>" maxlength="<?= $fsize; ?>" /></td>
|
|
|
1331 |
</tr>
|
|
|
1332 |
<?php
|
|
|
1333 |
}
|
|
|
1334 |
?>
|
|
|
1335 |
<?php
|
|
|
1336 |
$Feld = "shortline2";
|
|
|
1337 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1338 |
{
|
|
|
1339 |
$fname_f = $web_rechte[modul_name][tool_name][$Feld];
|
|
|
1340 |
$pos = strpos( $fname_f, ";" );
|
|
|
1341 |
$fname = substr( $fname_f, 0, $pos );
|
|
|
1342 |
$fsize = substr( $fname_f, $pos + 1 );
|
|
|
1343 |
?>
|
|
|
1344 |
<tr>
|
|
|
1345 |
<td valign="top" class="links" id="noprint"><?= $fname; ?></td>
|
|
|
1346 |
<td class="rechts"><input type="text" name="shortline2" value="<?= $zeile["shortline2"]; ?>" size="<?= $fsize; ?>" maxlength="<?= $fsize; ?>" /></td>
|
|
|
1347 |
</tr>
|
|
|
1348 |
<?php
|
|
|
1349 |
}
|
|
|
1350 |
?>
|
|
|
1351 |
<tr>
|
|
|
1352 |
<td valign="top" class="links" id="noprint">Bemerkung:</td>
|
|
|
1353 |
<td class="rechts">
|
|
|
1354 |
<textarea name="Bemerkung" cols="70" rows="8"><?php echo $zeile[Bemerkung] ?></textarea>
|
|
|
1355 |
</td>
|
|
|
1356 |
</tr>
|
|
|
1357 |
<?php
|
|
|
1358 |
$Feld = "Bemerkung_extern";
|
|
|
1359 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1360 |
{
|
|
|
1361 |
?>
|
|
|
1362 |
<tr>
|
|
|
1363 |
<td valign="top" class="links" id="noprint">Bemerkung extern:</td>
|
|
|
1364 |
<td class="rechts">
|
|
|
1365 |
<textarea name="Bemerkung_extern" cols="70" rows="8"><?php echo $zeile["Bemerkung_extern"] ?></textarea>
|
|
|
1366 |
</td>
|
|
|
1367 |
</tr>
|
|
|
1368 |
<?php }
|
|
|
1369 |
?>
|
|
|
1370 |
|
|
|
1371 |
<?php
|
|
|
1372 |
// Modul dokumente
|
|
|
1373 |
$Feld = "dokument";
|
|
|
1374 |
|
|
|
1375 |
// Modconf => Bestellung
|
|
|
1376 |
$moduleTyp[tool_name] = array( "table_foreign" => "Bestellung",
|
|
|
1377 |
"row_foreign" => "ID", "data_foreign" => "ID" );
|
|
|
1378 |
|
|
|
1379 |
$interneModulRechte = array( 0 => "_read", 1 => "_delete", 2 => "_add" );
|
|
|
1380 |
|
|
|
1381 |
$dokPath = "http://www.$site/images/dokumente/";
|
|
|
1382 |
$uploadPath = $webs['verzeichnis'] . "/images/dokumente/";
|
|
|
1383 |
|
|
|
1384 |
if ( isset($user_rechte[modul_name][tool_name][$Feld . $interneModulRechte[0]]) )
|
|
|
1385 |
{
|
|
|
1386 |
$docCount = 1;
|
|
|
1387 |
$sql_d =
|
|
|
1388 |
"SELECT * FROM dokumente WHERE table_foreign = 'Bestellung' AND row_foreign = 'ID' AND data_foreign = '" .
|
|
|
1389 |
$zeile['ID'] . "' AND hidden=0 order by letzte_aenderung_am";
|
|
|
1390 |
$result_d = mysql_query_logged( $sql_d ) or die( mysql_errno() .
|
|
|
1391 |
": " . mysql_error() . "<hr>" . nl2br($sql_d) . "<hr>" );
|
|
|
1392 |
if ( mysql_num_rows($result_d) > 0 )
|
|
|
1393 |
{
|
|
|
1394 |
while ( $zeile_d = mysql_fetch_array($result_d) )
|
|
|
1395 |
{
|
|
|
1396 |
// Dateityp Icon definieren
|
|
|
1397 |
$fTmpName = $zeile_d['document'];
|
|
|
1398 |
$fName[$zeile_d['id']] = $fTmpName;
|
|
|
1399 |
$fType[$zeile_d['id']] = strtolower( substr($fTmpName,
|
|
|
1400 |
strrpos($fTmpName, ".") + 1, strlen($fTmpName)) );
|
|
|
1401 |
|
|
|
1402 |
$fTmpLinkIcon = "../dokumente/gfx/fileicons/" . $fType[$zeile_d['id']] .
|
|
|
1403 |
".gif";
|
|
|
1404 |
$fTmpIcon =
|
|
|
1405 |
"/web/apache/content-management/dokumente/gfx/fileicons/" .
|
|
|
1406 |
$fType[$zeile_d['id']] . ".gif";
|
|
|
1407 |
$fTmpSize = @filesize( $uploadPath . $fTmpName );
|
|
|
1408 |
|
|
|
1409 |
$fTmpSize = $fTmpSize > 1024 * 1024 ? round( $fTmpSize /
|
|
|
1410 |
1024 / 1024, 2 ) . " MB" : round( $fTmpSize / 1024, 2 ) .
|
|
|
1411 |
" KB";
|
|
|
1412 |
|
|
|
1413 |
echo "<!-- " . $fType[$zeile_d['id']] . "$fTmpIcon -->";
|
|
|
1414 |
|
|
|
1415 |
$fIcon[$zeile_d['id']] = file_exists( $fTmpIcon ) ? $fTmpLinkIcon :
|
|
|
1416 |
"../dokumente/gfx/fileicons/default.gif";
|
|
|
1417 |
?>
|
|
|
1418 |
<tr>
|
|
|
1419 |
<td bgcolor="#<?php echo $webs[bgcolor_links] ?>" valign="top" class="links" id="noprint">
|
|
|
1420 |
<?php
|
|
|
1421 |
|
|
|
1422 |
$Felddaten = @explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
|
|
|
1423 |
|
|
|
1424 |
// $onClick = "window.open('../Dokumente/index.php?mailto=".$zeile['E_Mail']."&subject=".$web_settings[$zeile[shops_ID]][$Felddaten[1]]."&body=".$web_settings[$zeile[shops_ID]][$Felddaten[2]]."&inTextField=".$web_settings[$zeile[shops_ID]][$Felddaten[3]]."', 'MailClient', 'status, menubar, height=600, width=900'); return false;";
|
|
|
1425 |
$onSubmit = "window.open('../dokumente/index" . ( $_SERVER['PHP_AUTH_USER'] ==
|
|
|
1426 |
'admin' ? '' : '' ) . ".php?table_foreign=" . $moduleTyp[tool_name]['table_foreign'] .
|
|
|
1427 |
"&row_foreign=" . $moduleTyp[tool_name]['row_foreign'] .
|
|
|
1428 |
"&data_foreign=" . $zeile[$moduleTyp[tool_name]['data_foreign']] .
|
|
|
1429 |
"#', 'DokumentUpload', 'status, menubar, height=110, width=500');";
|
|
|
1430 |
$onUnlink =
|
|
|
1431 |
"window.open('../dokumente/index.php?action=unlink&id=" .
|
|
|
1432 |
$zeile_d['id'] . "&table_foreign=" . $moduleTyp[tool_name]['table_foreign'] .
|
|
|
1433 |
"&row_foreign=" . $moduleTyp[tool_name]['row_foreign'] .
|
|
|
1434 |
"&data_foreign=" . $zeile[$moduleTyp[tool_name]['data_foreign']] .
|
|
|
1435 |
"#', 'DokumentUpload', 'status, menubar, height=110, width=500');";
|
|
|
1436 |
$onClick = $onSubmit;
|
|
|
1437 |
|
|
|
1438 |
// id table_foreign row_foreign id_foreign document
|
|
|
1439 |
|
|
|
1440 |
|
|
|
1441 |
// Upload Verzeichnis
|
|
|
1442 |
|
|
|
1443 |
|
|
|
1444 |
if ( !empty($Felddaten[0]) )
|
|
|
1445 |
{
|
|
|
1446 |
echo $Felddaten[0] . " Nr.$docCount";
|
|
|
1447 |
|
|
|
1448 |
}
|
|
|
1449 |
else
|
|
|
1450 |
{
|
|
|
1451 |
?>
|
|
|
1452 |
Dokument Nr.<?= $docCount ?>
|
|
|
1453 |
<?php
|
|
|
1454 |
}
|
|
|
1455 |
?>
|
|
|
1456 |
</td>
|
|
|
1457 |
|
|
|
1458 |
<td bgcolor="#<?php echo $webs[bgcolor_rechts] ?>" width="79%">
|
|
|
1459 |
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="rechts">
|
|
|
1460 |
<?php
|
|
|
1461 |
if ( $zeile_d['document'] )
|
|
|
1462 |
{
|
|
|
1463 |
?>
|
|
|
1464 |
<tr bgcolor="#<?php echo $webs[bgcolor_links] ?>">
|
|
|
1465 |
<td>
|
|
|
1466 |
<!-- link -->
|
|
|
1467 |
<img src="<?= $fIcon[$zeile_d['id']] ?>" border=0 align="absmiddle" alt="Dateityp: <?= $fType[$zeile_d['id']] ?>" />
|
|
|
1468 |
<a href="<?= $dokPath . $zeile_d['document'] ?>" target="_blank">
|
|
|
1469 |
<?php
|
|
|
1470 |
echo "$fTmpName ($fTmpSize)";
|
|
|
1471 |
?>
|
|
|
1472 |
</a>
|
|
|
1473 |
<!-- link ende -->
|
|
|
1474 |
</td>
|
|
|
1475 |
<?php
|
|
|
1476 |
if ( isset($user_rechte[modul_name][tool_name][$Feld . $interneModulRechte[1]]) )
|
|
|
1477 |
{
|
|
|
1478 |
?>
|
|
|
1479 |
<td width="3%" align="center">
|
|
|
1480 |
<?
|
|
|
1481 |
$start = substr( $zeile_d['document'], 0, 1 );
|
|
|
1482 |
$no_delete = array( "R", "L" );
|
|
|
1483 |
if ( !in_array($start, $no_delete) )
|
|
|
1484 |
{
|
|
|
1485 |
?>
|
|
|
1486 |
<a href="#" onClick="<?= $onUnlink ?>">
|
|
|
1487 |
<img src="../dokumente/gfx/delete_record.gif" border="0" align="absmiddle" />
|
|
|
1488 |
</a>
|
|
|
1489 |
<?
|
|
|
1490 |
}
|
|
|
1491 |
?>
|
|
|
1492 |
</td>
|
|
|
1493 |
<?php
|
|
|
1494 |
}
|
|
|
1495 |
?>
|
|
|
1496 |
<?php
|
|
|
1497 |
if ( isset($user_rechte[modul_name][tool_name][$Feld . $interneModulRechte[2]]) )
|
|
|
1498 |
{
|
|
|
1499 |
?>
|
|
|
1500 |
<td width="3%" align="center"><a href="#" onClick="<?= $onClick ?>"><img src="../dokumente/gfx/add.gif" border=0 align="absmiddle" /></a></td>
|
|
|
1501 |
<?php
|
|
|
1502 |
}
|
|
|
1503 |
?>
|
|
|
1504 |
<?php
|
|
|
1505 |
// Datumsangaben lesbar machen
|
|
|
1506 |
if ( strpos($zeile_d['letzte_aenderung_am'], " ") )
|
|
|
1507 |
{
|
|
|
1508 |
$letzte_Aenderung_am = datetime2human( $zeile_d['letzte_aenderung_am'] );
|
|
|
1509 |
}
|
|
|
1510 |
else
|
|
|
1511 |
{
|
|
|
1512 |
$letzte_Aenderung_am = timestamp2human( $zeile_d['letzte_aenderung_am'] );
|
|
|
1513 |
}
|
|
|
1514 |
?>
|
|
|
1515 |
<!-- Datumsausgabe -->
|
|
|
1516 |
<td width="23%"><?= $letzte_Aenderung_am['Datum'] ?> um: <?= $letzte_Aenderung_am['Zeit'] ?></td>
|
|
|
1517 |
<td width="13%">
|
|
|
1518 |
<?
|
|
|
1519 |
$pos = strpos( $zeile_d['letzte_aenderung_von'], "@" );
|
|
|
1520 |
if ( $pos === false )
|
|
|
1521 |
{
|
|
|
1522 |
$pos = strlen( $zeile_d['letzte_aenderung_von'] );
|
|
|
1523 |
}
|
|
|
1524 |
echo substr( $zeile_d['letzte_aenderung_von'], 0, $pos ) ?></td>
|
|
|
1525 |
<!-- Datumsausgabe -->
|
|
|
1526 |
</tr>
|
|
|
1527 |
|
|
|
1528 |
</table>
|
|
|
1529 |
<?php
|
|
|
1530 |
}
|
|
|
1531 |
else
|
|
|
1532 |
{
|
|
|
1533 |
// wenn Rechte vorhande
|
|
|
1534 |
if ( isset($user_rechte[modul_name][tool_name][$Feld . $interneModulRechte[2]]) )
|
|
|
1535 |
{
|
|
|
1536 |
?>
|
|
|
1537 |
<a href="#" onClick="<?= $onClick ?>"><img src="../dokumente/gfx/add.gif" border=0 align="absmiddle" /> Datei anhängen</a>
|
|
|
1538 |
<?php
|
|
|
1539 |
}
|
|
|
1540 |
}
|
|
|
1541 |
?>
|
|
|
1542 |
</td>
|
|
|
1543 |
</tr>
|
|
|
1544 |
<?php
|
|
|
1545 |
$docCount += 1;
|
|
|
1546 |
} // while
|
|
|
1547 |
} // numrows
|
|
|
1548 |
else
|
|
|
1549 |
{
|
|
|
1550 |
?>
|
|
|
1551 |
<tr>
|
|
|
1552 |
<td bgcolor="#<?php echo $webs[bgcolor_links] ?>" valign="top" class="links" id="noprint">
|
|
|
1553 |
<?php
|
|
|
1554 |
$Felddaten = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
|
|
|
1555 |
|
|
|
1556 |
// $onClick = "window.open('../Dokumente/index.php?mailto=".$zeile['E_Mail']."&subject=".$web_settings[$zeile[shops_ID]][$Felddaten[1]]."&body=".$web_settings[$zeile[shops_ID]][$Felddaten[2]]."&inTextField=".$web_settings[$zeile[shops_ID]][$Felddaten[3]]."', 'MailClient', 'status, menubar, height=600, width=900'); return false;";
|
|
|
1557 |
|
|
|
1558 |
$onSubmit = "window.open('../dokumente/index" . ( $_SERVER['PHP_AUTH_USER'] ==
|
|
|
1559 |
'admin' ? '' : '' ) . ".php?table_foreign=" . $moduleTyp[tool_name]['table_foreign'] .
|
|
|
1560 |
"&row_foreign=" . $moduleTyp[tool_name]['row_foreign'] .
|
|
|
1561 |
"&data_foreign=" . $zeile[$moduleTyp[tool_name]['data_foreign']] .
|
|
|
1562 |
"#', 'DokumentUpload', 'status, menubar, height=110, width=500');";
|
|
|
1563 |
$onClick = $onSubmit;
|
|
|
1564 |
|
|
|
1565 |
if ( !empty($Felddaten[0]) )
|
|
|
1566 |
{
|
|
|
1567 |
echo $Felddaten[0];
|
|
|
1568 |
|
|
|
1569 |
}
|
|
|
1570 |
else
|
|
|
1571 |
{
|
|
|
1572 |
?>
|
|
|
1573 |
Dokument
|
|
|
1574 |
<?php
|
|
|
1575 |
}
|
|
|
1576 |
?>
|
|
|
1577 |
</td>
|
|
|
1578 |
|
|
|
1579 |
<td bgcolor="#<?php echo $webs[bgcolor_rechts] ?>" width="79%">
|
|
|
1580 |
<?php
|
|
|
1581 |
if ( isset($user_rechte[modul_name][tool_name][$Feld . $interneModulRechte[1]]) )
|
|
|
1582 |
{
|
|
|
1583 |
?>
|
|
|
1584 |
<a href="#" onClick="<?= $onClick ?>"><img src="../dokumente/gfx/add.gif" border=0 align="absmiddle" /></a> <a href="#" onClick="<?= $onClick ?>">Datei anhängen</a>
|
|
|
1585 |
<?php
|
|
|
1586 |
}
|
|
|
1587 |
?>
|
|
|
1588 |
</td>
|
|
|
1589 |
</tr>
|
|
|
1590 |
<?php
|
|
|
1591 |
}
|
|
|
1592 |
} // modulerechte dokument ende
|
|
|
1593 |
|
|
|
1594 |
|
|
|
1595 |
|
|
|
1596 |
|
|
|
1597 |
|
|
|
1598 |
|
|
|
1599 |
|
|
|
1600 |
|
|
|
1601 |
|
|
|
1602 |
|
|
|
1603 |
|
|
|
1604 |
|
|
|
1605 |
|
|
|
1606 |
|
|
|
1607 |
?>
|
|
|
1608 |
|
|
|
1609 |
<tr>
|
|
|
1610 |
<td class="links" id="noprint">Bestellt: </td>
|
|
|
1611 |
<td class="rechts">am:
|
|
|
1612 |
<?php echo $erstellt_am[Datum] ?>
|
|
|
1613 |
um:
|
|
|
1614 |
<?php echo $erstellt_am[Zeit] ?>
|
|
|
1615 |
</td>
|
|
|
1616 |
</tr>
|
|
|
1617 |
<?php if ( $zeile[erstellt_von] )
|
|
|
1618 |
{ ?>
|
|
|
1619 |
<tr>
|
|
|
1620 |
<td nowrap class="links" id="noprint">Erstbearbeiter:</td>
|
|
|
1621 |
<td class="rechts">
|
|
|
1622 |
<?php echo $zeile[erstellt_von] ?>
|
|
|
1623 |
</td>
|
|
|
1624 |
</tr>
|
|
|
1625 |
<?php } ?>
|
|
|
1626 |
<tr>
|
|
|
1627 |
<td nowrap class="links" id="noprint">letzte Änderung: </td>
|
|
|
1628 |
<td class="rechts">am:
|
|
|
1629 |
<?php
|
|
|
1630 |
if ( strpos($zeile[letzte_Aenderung_am], " ") )
|
|
|
1631 |
{
|
|
|
1632 |
$letzte_Aenderung_am = datetime2human( $zeile[letzte_Aenderung_am] );
|
|
|
1633 |
}
|
|
|
1634 |
else
|
|
|
1635 |
{
|
|
|
1636 |
$letzte_Aenderung_am = timestamp2human( $zeile[letzte_Aenderung_am] );
|
|
|
1637 |
}
|
|
|
1638 |
?>
|
|
|
1639 |
<?php echo $letzte_Aenderung_am[Datum] ?>
|
|
|
1640 |
um:
|
|
|
1641 |
<?php echo $letzte_Aenderung_am[Zeit] ?>
|
|
|
1642 |
von:
|
|
|
1643 |
<?php echo $zeile[letzte_Aenderung_von] ?>
|
|
|
1644 |
</td>
|
|
|
1645 |
</tr>
|
|
|
1646 |
<tr>
|
|
|
1647 |
<td align="right" colspan="3" class="links" id="noprint">
|
|
|
1648 |
<?php
|
|
|
1649 |
for ( $i = 1; $i <= 15; $i++ )
|
|
|
1650 |
{
|
|
|
1651 |
$Felddaten = explode( ";", $web_rechte[modul_name][tool_name]["button" .
|
|
|
1652 |
$i] );
|
|
|
1653 |
|
|
|
1654 |
// ME: DEBUG
|
|
|
1655 |
if ( $_SERVER["REMOTE_ADDR"] == "89.245.130.99" )
|
|
|
1656 |
{
|
|
|
1657 |
//print_r($Felddaten);
|
|
|
1658 |
}
|
|
|
1659 |
|
|
|
1660 |
if ( isset($user_rechte[modul_name][tool_name]["button" . $i]) and ($web_settings[$zeile[shops_ID]][$Felddaten[1]]) )
|
|
|
1661 |
{
|
|
|
1662 |
// Mail Client dazuschalten (Markus 02.07.207)
|
|
|
1663 |
$buttonType = isset( $web_rechte["Warenwirtschaft"]["bestellung"]["mail_client"] ) ?
|
|
|
1664 |
"button" : "submit";
|
|
|
1665 |
if ( isset($web_rechte["Warenwirtschaft"]["bestellung"]["mail_client"]) )
|
|
|
1666 |
{
|
|
|
1667 |
$mailData[$zeile["ID"]][$i]['subject'] = $web_settings[$zeile["shops_ID"]][$Felddaten[1]];
|
|
|
1668 |
$mailData[$zeile["ID"]][$i]['body'] = $web_settings[$zeile["shops_ID"]][$Felddaten[2]];
|
|
|
1669 |
$mailData[$zeile["ID"]][$i]['inTextField'] = rawurldecode( $web_settings[$zeile["shops_ID"]][$Felddaten[3]] );
|
|
|
1670 |
$mailData[$zeile["ID"]][$i]['mailto'] = $zeile[E_Mail];
|
|
|
1671 |
$FelddatenII = explode( ";", $web_rechte["Warenwirtschaft"]["bestellung"]["mail_client"] );
|
|
|
1672 |
if ( $FelddatenII[0] == "websettingid" )
|
|
|
1673 |
{
|
|
|
1674 |
$mailData[$zeile["ID"]][$i]['mailfrom'] = $web_settings[$zeile["shops_ID"]][$FelddatenII[1]];
|
|
|
1675 |
}
|
|
|
1676 |
|
|
|
1677 |
$_SESSION['mailData'] = $mailData;
|
|
|
1678 |
|
|
|
1679 |
if ( $_SERVER["REMOTE_ADDR"] == "89.245.130.99" )
|
|
|
1680 |
{
|
|
|
1681 |
//print_r($web_settings[1]);
|
|
|
1682 |
}
|
|
|
1683 |
|
|
|
1684 |
/*$onClick = "window.open('MailClient/index.php?mailto=" . $zeile[E_Mail] .
|
|
|
1685 |
"&subject=" . $web_settings[$zeile[shops_ID]][$Felddaten[1]] . "&body=" . $web_settings[$zeile[shops_ID]][$Felddaten[2]] .
|
|
|
1686 |
"&inTextField=" . $web_settings[$zeile[shops_ID]][$Felddaten[3]] .
|
|
|
1687 |
"', 'MailClient', 'status, menubar, height=600, width=900');";*/
|
|
|
1688 |
$onSubmit = "window.open('MailClient/index.php?id=$i&Bestellung=" .
|
|
|
1689 |
$zeile["ID"] . "&shop=" . $zeile["shops_ID"] .
|
|
|
1690 |
"&button=" . $Felddaten[0] .
|
|
|
1691 |
"', 'MailClient', 'status, menubar, height=600, width=900, scrollbars=yes');";
|
|
|
1692 |
$onClick = $onSubmit;
|
|
|
1693 |
}
|
|
|
1694 |
else
|
|
|
1695 |
{
|
|
|
1696 |
$onClick = "MM_goToURL('parent','mailto:" . $zeile[E_Mail] .
|
|
|
1697 |
"?subject=" . $web_settings[$zeile[shops_ID]][$Felddaten[1]] .
|
|
|
1698 |
"&body=" . $web_settings[$zeile[shops_ID]][$Felddaten[2]] .
|
|
|
1699 |
"'); inTextfeld('" . rawurldecode( $web_settings[$zeile[shops_ID]][$Felddaten[3]] ) .
|
|
|
1700 |
"');";
|
|
|
1701 |
}
|
|
|
1702 |
?>
|
|
|
1703 |
<input
|
|
|
1704 |
name="update[list]"
|
|
|
1705 |
type="<?= $buttonType ?>"
|
|
|
1706 |
class="status_red"
|
|
|
1707 |
value="<?= $Felddaten[0]; ?>"
|
|
|
1708 |
onClick="<?= $onClick ?>"
|
|
|
1709 |
>
|
|
|
1710 |
<?php
|
|
|
1711 |
}
|
|
|
1712 |
}
|
|
|
1713 |
?>
|
|
|
1714 |
<p>
|
|
|
1715 |
<!--<input type="hidden" name="Bestellung" value="<?php echo $zeile[ID] ?>">-->
|
|
|
1716 |
<input type="hidden" name="Bestellung" value="<?php echo $_SESSION['best_manu.php']['Kundendaten']['Bestellung']; ?>">
|
|
|
1717 |
|
|
|
1718 |
<fieldset style="float:right; padding:0px; border:none;">
|
|
|
1719 |
<legend>Speichern und...</legend>
|
|
|
1720 |
<input type="submit" name="update[current]" value="...nur Speichern">
|
|
|
1721 |
<?php if ( !$kundensuche_filter )
|
|
|
1722 |
{ ?><input type="submit" name="update[prev]" value="...zurück"><?php } ?>
|
|
|
1723 |
<input type="submit" name="update[list]" value="...zur Übersicht">
|
|
|
1724 |
<?php
|
|
|
1725 |
if ( !$kundensuche_filter )
|
|
|
1726 |
{ ?>
|
|
|
1727 |
<input type="submit" name="update[next]" value="...weiter"><?php } ?>
|
|
|
1728 |
</fieldset>
|
|
|
1729 |
|
|
|
1730 |
<div style="clear:both;">
|
|
|
1731 |
<input type="reset" value="Zurücksetzen">
|
|
|
1732 |
</div>
|
|
|
1733 |
<?php
|
|
|
1734 |
// Termintaste
|
|
|
1735 |
$Feld = "termin";
|
|
|
1736 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1737 |
{
|
|
|
1738 |
?><input name="button" type="button" onClick="systemtermin('Bestellung <?php echo
|
|
|
1739 |
$zeile[ID] ?> vom <?php echo $erstellt_am[Datum] ?>')" value="Termin"><?php
|
|
|
1740 |
}
|
|
|
1741 |
?>
|
|
|
1742 |
<?php
|
|
|
1743 |
// Auftrag drucken Taste
|
|
|
1744 |
|
|
|
1745 |
if ( isset($user_rechte[modul_name]["best_manu"]["kundenauftrag_drucken"]) )
|
|
|
1746 |
{
|
|
|
1747 |
?><input name="button" type="button" onClick="kundenauftrag_drucken(<?= $zeile[ID]; ?>);" value="Auftrag drucken"><?php
|
|
|
1748 |
|
|
|
1749 |
}
|
|
|
1750 |
// Rechnungtaste
|
|
|
1751 |
$Feld = "rechnung";
|
|
|
1752 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1753 |
{
|
|
|
1754 |
?>
|
|
|
1755 |
</form>
|
|
|
1756 |
|
|
|
1757 |
<form method="post" action="rechnung.php" target="_blank" name="rechnung" enctype="multipart/form-data" style="display:inline">
|
|
|
1758 |
<input type="hidden" name="b_id" value="<?= $zeile["ID"]; ?>" />
|
|
|
1759 |
<? if ( isset($web_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1760 |
{
|
|
|
1761 |
$kats = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
|
|
|
1762 |
|
|
|
1763 |
foreach ( $kats as $elem )
|
|
|
1764 |
{ ?>
|
|
|
1765 |
<input type="hidden" name="<?= $elem; ?>" value="1" />
|
|
|
1766 |
<?
|
|
|
1767 |
$kat_runner++;
|
|
|
1768 |
}
|
|
|
1769 |
} ?>
|
|
|
1770 |
<input name="button" type="submit" value="Rechnung drucken"><?php
|
|
|
1771 |
}
|
|
|
1772 |
// Lieferscheintaste
|
|
|
1773 |
$Feld = "lieferschein";
|
|
|
1774 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1775 |
{
|
|
|
1776 |
?>
|
|
|
1777 |
</form>
|
|
|
1778 |
|
|
|
1779 |
<form method="post" action="lieferschein.php" target="_blank" name="lieferschein" enctype="multipart/form-data" style="display:inline">
|
|
|
1780 |
<input type="hidden" name="b_id" value="<?= $zeile["ID"]; ?>" />
|
|
|
1781 |
<? if ( isset($web_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1782 |
{
|
|
|
1783 |
$kats = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
|
|
|
1784 |
|
|
|
1785 |
foreach ( $kats as $elem )
|
|
|
1786 |
{ ?>
|
|
|
1787 |
<input type="hidden" name="<?= $elem; ?>" value="1" />
|
|
|
1788 |
<?
|
|
|
1789 |
$kat_runner++;
|
|
|
1790 |
}
|
|
|
1791 |
} ?>
|
|
|
1792 |
<input name="button" type="submit" value="Lieferschein drucken"><?php
|
|
|
1793 |
}
|
|
|
1794 |
// Lieferscheintaste
|
|
|
1795 |
$Feld = "drucken";
|
|
|
1796 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1797 |
{
|
|
|
1798 |
?>
|
|
|
1799 |
</form>
|
|
|
1800 |
|
|
|
1801 |
<form method="post" action="auftrag.php" target="_blank" name="Auftrag" enctype="multipart/form-data" style="display:inline">
|
|
|
1802 |
<input type="hidden" name="b_id" value="<?= $zeile["ID"]; ?>" />
|
|
|
1803 |
<? /* if ( isset($web_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1804 |
{
|
|
|
1805 |
$kats = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
|
|
|
1806 |
foreach ( $kats as $elem )
|
|
|
1807 |
{ ?>
|
|
|
1808 |
<!-- <input type="hidden" name="<?= $elem; ?>" value="1" />-->
|
|
|
1809 |
<?/*
|
|
|
1810 |
$kat_runner++;
|
|
|
1811 |
}
|
|
|
1812 |
}*/ ?>
|
|
|
1813 |
<input name="button" type="submit" value="Auftrag drucken">
|
|
|
1814 |
<?php
|
|
|
1815 |
}
|
|
|
1816 |
$Feld = "angebot";
|
|
|
1817 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1818 |
{
|
|
|
1819 |
?>
|
|
|
1820 |
</form>
|
|
|
1821 |
|
|
|
1822 |
<form method="post" action="angebot.php" target="_blank" name="Angebot" enctype="multipart/form-data" style="display:inline">
|
|
|
1823 |
<input type="hidden" name="b_id" value="<?= $zeile["ID"]; ?>" />
|
|
|
1824 |
<? /* if ( isset($web_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1825 |
{
|
|
|
1826 |
$kats = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
|
|
|
1827 |
foreach ( $kats as $elem )
|
|
|
1828 |
{ ?>
|
|
|
1829 |
<!-- <input type="hidden" name="<?= $elem; ?>" value="1" />-->
|
|
|
1830 |
<?/*
|
|
|
1831 |
$kat_runner++;
|
|
|
1832 |
}
|
|
|
1833 |
}*/ ?>
|
|
|
1834 |
<input name="button" type="submit" value="Angebot drucken">
|
|
|
1835 |
<?php
|
|
|
1836 |
}
|
|
|
1837 |
// Bestellungen zusammenfassen
|
|
|
1838 |
$Feld = "bestconect";
|
|
|
1839 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
|
|
|
1840 |
{
|
|
|
1841 |
?>
|
|
|
1842 |
</form>
|
|
|
1843 |
|
|
|
1844 |
<form name="MailClient_Dummy" >
|
|
|
1845 |
<input type="hidden" name="subject" value="<?= $mailData['subject'] ?>"/>
|
|
|
1846 |
<input type="hidden" name="body" value="<?= $mailData['body'] ?>"/>
|
|
|
1847 |
<input type="hidden" name="inTextField" value="<?= $mailData['inTextField'] ?>"/>
|
|
|
1848 |
<input type="hidden" name="mailto" value="<?= $mailData['mailto'] ?>"/>
|
|
|
1849 |
</form>
|
|
|
1850 |
|
|
|
1851 |
<form method="post" action="" enctype="multipart/form-data">
|
|
|
1852 |
<input type="hidden" name="b_id" value="<?= $zeile["ID"]; ?>" />
|
|
|
1853 |
<input type="text" name="b_id_neu" value="" />
|
|
|
1854 |
<input type="hidden" name="mode" value="combine" />
|
|
|
1855 |
<input name="button" type="submit" value="Bestellpositionen verschieben">
|
|
|
1856 |
|
|
|
1857 |
|
|
|
1858 |
|
|
|
1859 |
<?php } ?>
|
|
|
1860 |
|
|
|
1861 |
<?php if ( isset($user_rechte[modul_name][tool_name][loeschen2]) )
|
|
|
1862 |
{ ?>
|
|
|
1863 |
<br>
|
|
|
1864 |
</form>
|
|
|
1865 |
<form method="post" action="" enctype="multipart/form-data" style="display:inline">
|
|
|
1866 |
<input type="submit" name="delete2" value="Nur Bestellung löschen" onClick="return confirm('Wollen sie diese Bestellung wirklich löschen?')">
|
|
|
1867 |
<?php } ?>
|
|
|
1868 |
<?php if ( isset($user_rechte[modul_name][tool_name][loeschen]) )
|
|
|
1869 |
{ ?>
|
|
|
1870 |
</form>
|
|
|
1871 |
<form method="post" action="" enctype="multipart/form-data" style="display:inline">
|
|
|
1872 |
<input type="submit" name="delete" value="Bestellung + Kundendaten löschen" onClick="return confirm('Wollen sie diese Bestellung und die dazugehörigen Kundendaten wirklich löschen?')">
|
|
|
1873 |
<?php } ?>
|
|
|
1874 |
|
|
|
1875 |
<?php
|
|
|
1876 |
$Feld = "kk-zahlung";
|
|
|
1877 |
if ( isset($user_rechte[modul_name][tool_name][$Feld]) && $kk )
|
|
|
1878 |
{
|
|
|
1879 |
?>
|
|
|
1880 |
</form>
|
|
|
1881 |
|
|
|
1882 |
<form name="MailClient_Dummy" >
|
|
|
1883 |
<input type="hidden" name="subject" value="<?= $mailData['subject'] ?>"/>
|
|
|
1884 |
<input type="hidden" name="body" value="<?= $mailData['body'] ?>"/>
|
|
|
1885 |
<input type="hidden" name="inTextField" value="<?= $mailData['inTextField'] ?>"/>
|
|
|
1886 |
<input type="hidden" name="mailto" value="<?= $mailData['mailto'] ?>"/>
|
|
|
1887 |
</form>
|
|
|
1888 |
|
|
|
1889 |
<?php
|
|
|
1890 |
$kk_typ = $web_settings[$zeile["shops_ID"]][119];
|
|
|
1891 |
if ( !is_null($kk_typ) )
|
|
|
1892 |
{
|
|
|
1893 |
if ( $kk_typ == "saferpay" )
|
|
|
1894 |
{
|
|
|
1895 |
?>
|
|
|
1896 |
<form method="post" action="" enctype="multipart/form-data">
|
|
|
1897 |
<input type="hidden" name="orderid" value="<?= $zeile["ID"]; ?>" />
|
|
|
1898 |
<input type="hidden" name="kk_info" value="<?= $kk_info["code"]; ?>" />
|
|
|
1899 |
<input type="hidden" name="shops_ID" value="<?= $zeile["shops_ID"]; ?>" />
|
|
|
1900 |
<input type="hidden" name="operation" value="SAS" />
|
|
|
1901 |
<?php
|
|
|
1902 |
} elseif ( $kk_typ == "acceptance" )
|
|
|
1903 |
{
|
|
|
1904 |
?>
|
|
|
1905 |
<form method="post" action="" enctype="multipart/form-data">
|
|
|
1906 |
<input type="hidden" name="orderid" value="<?= $zeile["ID"]; ?>" />
|
|
|
1907 |
<input type="hidden" name="amount" value="<?= $summe * 100; ?>" />
|
|
|
1908 |
<input type="hidden" name="operation" value="SAS" />
|
|
|
1909 |
<INPUT type="hidden" NAME="currency" VALUE="EUR">
|
|
|
1910 |
<INPUT type="hidden" NAME="language" VALUE="de_DE">
|
|
|
1911 |
<input type="hidden" name="shops_ID" value="<?= $zeile["shops_ID"]; ?>" />
|
|
|
1912 |
<?php
|
|
|
1913 |
}
|
|
|
1914 |
?>
|
|
|
1915 |
<input name="button" type="submit" value="Zahlung anfordern">
|
|
|
1916 |
<?php
|
|
|
1917 |
}
|
|
|
1918 |
$time2 = microtime_float();
|
|
|
1919 |
}
|
|
|
1920 |
?>
|
|
|
1921 |
</p>
|
|
|
1922 |
</td>
|
|
|
1923 |
</tr>
|
|
|
1924 |
</table>
|
|
|
1925 |
|
|
|
1926 |
<?php
|
|
|
1927 |
// type = 0 normaler E-Mail Text mit \n
|
|
|
1928 |
// type = 1 Ausgabetext für RS (Bestellung) mit <br> statt \n
|
|
|
1929 |
function buildCustomTextEmail( $get, $type = 0 )
|
|
|
1930 |
{
|
|
|
1931 |
if ( $type == 1 )
|
|
|
1932 |
{
|
|
|
1933 |
$cont = "<br>Details:";
|
|
|
1934 |
}
|
|
|
1935 |
else
|
|
|
1936 |
{
|
|
|
1937 |
$cont = "\nDetails:";
|
|
|
1938 |
}
|
|
|
1939 |
for ( $i = 0; $i < $get['ct_zeilen']; $i++ )
|
|
|
1940 |
{
|
|
|
1941 |
$opt = array();
|
|
|
1942 |
$align = "zentriert";
|
|
|
1943 |
$bold = "";
|
|
|
1944 |
$italic = "";
|
|
|
1945 |
$underline = "";
|
|
|
1946 |
$file = "";
|
|
|
1947 |
if ( $get['ct_left_' . $i . ''] == "left" )
|
|
|
1948 |
$align = "linksbündig";
|
|
|
1949 |
if ( $get['ct_center_' . $i . ''] == "center" )
|
|
|
1950 |
$align = "zentriert";
|
|
|
1951 |
if ( $get['ct_right_' . $i . ''] == "right" )
|
|
|
1952 |
$align = "rechtsbündig";
|
|
|
1953 |
if ( $get['ct_bold_' . $i . ''] == "on" )
|
|
|
1954 |
$bold = "fett";
|
|
|
1955 |
if ( $get['ct_italic_' . $i . ''] == "on" )
|
|
|
1956 |
$italic = "kursiv";
|
|
|
1957 |
if ( $get['ct_underline_' . $i . ''] == "on" )
|
|
|
1958 |
$underline = "unterstrichen";
|
|
|
1959 |
if ( $get['ct_font_' . $i] . '' )
|
|
|
1960 |
$font = $get['ct_font_' . $i . ''];
|
|
|
1961 |
if ( $get['ct_file'] )
|
|
|
1962 |
$file = "Bilddatei: " . $get['ct_file'];
|
|
|
1963 |
if ( $font )
|
|
|
1964 |
$opt[] = $font;
|
|
|
1965 |
if ( $align )
|
|
|
1966 |
$opt[] = $align;
|
|
|
1967 |
if ( $bold )
|
|
|
1968 |
$opt[] = $bold;
|
|
|
1969 |
if ( $italic )
|
|
|
1970 |
$opt[] = $italic;
|
|
|
1971 |
if ( $underline )
|
|
|
1972 |
$opt[] = $underline;
|
|
|
1973 |
if ( $file )
|
|
|
1974 |
$opt[] = $file;
|
|
|
1975 |
|
|
|
1976 |
if ( $type == 1 )
|
|
|
1977 |
{
|
|
|
1978 |
$cont .= "<br> " . ( $i + 1 ) . ". Zeile: " . $get['ct_text_' .
|
|
|
1979 |
$i . ''] . " (" . $get['ct_fontsize_' . $i . ''] . ", " .
|
|
|
1980 |
implode( ", ", $opt ) . ")";
|
|
|
1981 |
}
|
|
|
1982 |
else
|
|
|
1983 |
{
|
|
|
1984 |
$cont .= "\n" . ( $i + 1 ) . ". Zeile: " . $get['ct_text_' .
|
|
|
1985 |
$i . ''] . " (" . $get['ct_fontsize_' . $i . ''] . ", " .
|
|
|
1986 |
implode( ", ", $opt ) . ")";
|
|
|
1987 |
}
|
|
|
1988 |
}
|
|
|
1989 |
return $cont;
|
|
|
1990 |
}
|
|
|
1991 |
|
|
|
1992 |
?>
|