Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?
2
    require_once  "/web/apache/content-management/Online-Shop/connect2.php";
3
 
4
    if ( $_POST["zusatzInfo"] )
5
    {
6
        $zusatzInfo = serialize( $_POST["zusatzInfo"] );
7
        $result = mysql_query( "
8
				update Bestellung
9
				set zusatzInfo = '$zusatzInfo'
10
				where
11
					Bestellung.ID = '" . $_GET[ID] . "'
12
				" );
13
    }
14
 
15
    $result = mysql_query( "
16
			select
17
				Logins.*,
18
				shops.Name as shopName,
19
				Bestellung.*,
20
				date_format(Bestellung.erstellt_am, '%d.%m.%Y') as erstellt_am,
21
				left(Bestellung.erstellt_von,locate('@',Bestellung.erstellt_von)-1) as erstellt_von
22
			from
23
				Bestellung,
24
				Logins,
25
				shops
26
			where
27
				Bestellung.ID = '" . $_GET[ID] . "'
28
			and
29
				Bestellung.Login = Logins.ID
30
			and
31
				Bestellung.shops_ID = shops.ID
32
			" );
33
    $Bestellung = mysql_fetch_assoc( $result );
34
    $zusatzInfo = unserialize( $Bestellung["zusatzInfo"] );
35
    //$zusatzInfo = $_POST["zusatzInfo"];
36
 
37
?>
38
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
39
<html xmlns="http://www.w3.org/1999/xhtml">
40
<head>
41
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
42
<title>Unbenanntes Dokument</title>
43
<style type="text/css">
44
<!--
45
body {
46
	font-family:Arial, Helvetica, sans-serif;
47
}
48
.break {
49
	clear:both;
50
	float:none;
51
}
52
.footer {
53
	clear:both;
54
	float:none;
55
}
56
.bottom {
57
	padding-top:20px;
58
}
59
#Personendaten {
60
	float:left;
61
	left:0px;
62
	top:40px;
63
	width:49%;
64
	height:auto;
65
	z-index:1;
66
    padding-right:5px;
67
}
68
#Fahrzeugdaten {
69
	float:left;
70
	width:49%;
71
	height:auto;
72
	z-index:2;
73
    padding-bottom:5px;
74
}
75
#items {
76
 
77
	left:0px;
78
	width:650px;
79
	top:325px;
80
	height:auto;
81
	z-index:3;
82
}
83
#disclaimer {
84
	padding-top:10px;
85
	left:0px;
86
	bottom:-105px;
87
	width:650px;
88
	height:auto;
89
	font-size:10px;
90
	z-index:4
91
}
92
#Logo {
93
	float:left;
94
	left:0px;
95
 
96
	width:50px;
97
	height:61px;
98
	z-index:5;
99
	padding-top:20px;
100
}
101
#Adresse {
102
	float:left;
103
	padding-left:10px;
104
	left:60px;
105
	top:-40px;
106
	width:257px;
107
	height:58px;
108
	z-index:6
109
}
110
#Unterschrift {
111
 
112
	left:321px;
113
	padding-top:30px;
114
	width:330px;
115
	height:40px;
116
	text-align:center;
117
	z-index:7
118
}
119
#headline {
120
 
121
	left:0px;
122
	top:0px;
123
	width:650px;
124
	height:auto;
125
	text-align:center;
126
	z-index:8
127
}
128
#shopInfo {
129
 
130
	left:0px;
131
	top:244px;
132
	width:324px;
133
	height:49px;
134
	z-index:9;
135
}
136
table {
137
	border-color:#000000;
138
}
139
td, th, th.big {
140
	white-space:nowrap;
141
	text-align:left;
142
	font-size:12px;
143
	height:30px;
144
	border-color:#000000;
145
}
146
th.big {
147
	font-size:18px;
148
}
149
#items * td {
150
	height:15px;
151
	border-style:solid;
152
	border-width: 0px 1px 0px 1px;
153
	border-color:#000000;
154
	vertical-align:top;
155
}
156
td.borderTop {
157
	border-top:1px solid #000000;
158
}
159
 
160
@media print {
161
	input {
162
		display:none;
163
	}
164
}
165
 
166
@media screen {
167
	input {
168
		border:none;
169
		width:95%;
170
		height:100%;
171
		background-color:#FFFFFF;
172
	}
173
	span.wert {
174
		display:none;
175
	}
176
	input.radio {
177
		border:none;
178
		width:20px;
179
		height:20px;
180
	}
181
}
182
-->
183
</style>
184
</head>
185
 
186
<body onload="window.print();">
187
<form method="post" action="">
188
<div id="headline">
189
	<h2>Werkstattauftrag / Bestellung Nr. <?= $_GET[ID]; ?> - <?= $Bestellung[erstellt_am]; ?></h2>
190
</div>
191
<div id="Personendaten">
192
	<table border="1" cellspacing="0" cellpadding="4" width="100%">
193
	    <tr>
194
	      <th colspan="2" class="big">Kundendaten</th>
195
	    </tr>
196
		<tr>
197
			<th>Firma</th>
198
			<td><?= ( $Bestellung[Name2] ) ? $Bestellung[Name2] : "&nbsp;"; ?></td>
199
		</tr>
200
	    <tr>
201
	      <th width="20%">Name, Vorname </th>
202
	      <td width="80%"><?= $Bestellung[Anrede]; ?> <?= $Bestellung[Vorname]; ?> <?= $Bestellung[Name1]; ?></td>
203
	    </tr>
204
	    <tr>
205
	      <th>Strasse, HausNr. </th>
206
	      <td><?= $Bestellung[Strasse]; ?> <?= $Bestellung[Hausnummer]; ?></td>
207
	    </tr>
208
	    <tr>
209
	      <th>PLZ, Ort</th>
210
	      <td><?= $Bestellung[PLZ]; ?> <?= $Bestellung[ORT]; ?></td>
211
	    </tr>
212
	    <tr>
213
	      <th>Telefon / Fax </th>
214
	      <td><?= $Bestellung[Telefon]; ?> / <?= $Bestellung[Fax]; ?></td>
215
	    </tr>
216
	    <tr>
217
	      <th colspan="2" class="big"><?= $Bestellung[shopName]; ?></th>
218
	    </tr>
219
	</table>
220
</div>
221
<div id="Fahrzeugdaten">
222
  <table border="1" cellspacing="0" cellpadding="4" width="100%">
223
    <tr>
224
      <th colspan="4" class="big">Fahrzeugdaten</th>
225
    </tr>
226
    <tr>
227
      <th width="18%">Fahrgestell-Nr:</th>
228
      <td colspan="3">
229
        <input type="text" name="zusatzInfo[fahrgestellNr]" value="<?= $zusatzInfo[fahrgestellNr]; ?>" />
230
		<span class="wert"><?= $zusatzInfo[fahrgestellNr]; ?></span>
231
      </td>
232
    </tr>
233
    <tr>
234
      <th>Fahrzeugtyp:</th>
235
      <td width="32%"><input type="text" name="zusatzInfo[fahrzeugTyp]" value="<?= $zusatzInfo[fahrzeugTyp]; ?>" />
236
	  <span class="wert"><?= $zusatzInfo[fahrzeugTyp]; ?></span>
237
	  </td>
238
      <th width="15%">km-Stand:</th>
239
      <td width="35%"><input type="text" name="zusatzInfo[km]" value="<?= $zusatzInfo[km]; ?>" />
240
	  <span class="wert"><?= $zusatzInfo[km]; ?></span>
241
	  </td>
242
    </tr>
243
    <tr>
244
      <th>Kennzeichen:</th>
245
      <td><input type="text" name="zusatzInfo[kennzeichen]" value="<?= $zusatzInfo[kennzeichen]; ?>" />
246
	  <span class="wert"><?= $zusatzInfo[kennzeichen]; ?></span></td>
247
      <th>Zulassung:</th>
248
      <td><input type="text" name="zusatzInfo[zulassung]" value="<?= $zusatzInfo[zulassung]; ?>" />
249
	  <span class="wert"><?= $zusatzInfo[zulassung]; ?></span></td>
250
    </tr>
251
    <tr>
252
      <th>KW/PS:</th>
253
      <td><input type="text" name="zusatzInfo[kw_ps]" value="<?= $zusatzInfo[kw_ps]; ?>" />
254
	  <span class="wert"><?= $zusatzInfo[kw_ps]; ?></span></td>
255
      <th>Hubraum</th>
256
      <td><input type="text" name="zusatzInfo[hubraum]" value="<?= $zusatzInfo[hubraum]; ?>" />
257
	  <span class="wert"><?= $zusatzInfo[hubraum]; ?></span></td>
258
    </tr>
259
    <tr>
260
      <th>T&Uuml;V:</th>
261
      <td><input type="text" name="zusatzInfo[tuev]" value="<?= $zusatzInfo[tuev]; ?>" />
262
	  <span class="wert"><?= $zusatzInfo[tuev]; ?></span></td>
263
      <th>AU:</th>
264
      <td><span class="wert"><?= $zusatzInfo[au]; ?></span></td>
265
    </tr>
266
    <tr>
267
      <th colspan="4">angenommen durch: <?= $Bestellung[erstellt_von]; ?><input style="display:none" type="submit" value="OK" /></th>
268
    </tr>
269
  </table>
270
</div>
271
<div id="items">
272
  <table border="1" cellpadding="4" cellspacing="0">
273
    <tr>
274
      <th style="height:40px;" colspan="4" class="big">Arbeiten / verwendete Ersatzteile</th>
275
    </tr>
276
    <tr>
277
      <th width="26" style="height:50px;">Menge</th>
278
      <th width="494" style="height:50px;">Bezeichnung</th>
279
      <th width="65" style="height:50px;">Einzelpreis</th>
280
      <th width="65" style="height:50px;">Gesamtpreis</th>
281
    </tr>
282
<?
283
    $query_art = "SELECT * FROM artikel_to_Bestellung WHERE Bestellung= '" .
284
        $_GET[ID] . "' AND status != 'storniert' ORDER BY Rang";
285
    $result = mysql_query( $query_art );
286
    if ( !$result )
287
        echo mysql_error() . "<br>" . $query_art;
288
    while ( $artikel = mysql_fetch_assoc( $result ) )
289
    {
290
        if ( $artikel["artikel"] != 999999 )
291
        {
292
            $sql_a = "SELECT * from artikel WHERE ID=" . $artikel["artikel"];
293
            $res_a = mysql_query( $sql_a );
294
 
295
            if ( !$res_a )
296
            {
297
                //$errString = mysql_error()."<br>$sql_q";
298
                echo "<tr><td colspan=4>" . mysql_error() . "<br>$sql_q</td></tr>";
299
            }
300
            $row_a = mysql_fetch_assoc( $res_a );
301
 
302
            $kennung = $row_a["kennung"];
303
            if ( $row_a["Father"] == -3 )
304
            {
305
                $artikel["Menge"] = "&nbsp;";
306
                $sum = number_format( $artikel[Preis_pro_Stueck], 2, '.', '' );
307
            }
308
            else
309
            {
310
                $sum = number_format( $artikel[Preis_pro_Stueck] * $artikel[Menge],
311
                    2, '.', '' );
312
            }
313
        }
314
        else
315
        {
316
            $sum = number_format( $artikel[Preis_pro_Stueck] * $artikel[Menge],
317
                2, '.', '' );
318
        }
319
?>
320
    <tr>
321
      <td width="26"><?= $artikel[Menge]; ?></td>
322
      <td width="494"><?= $artikel[Bezeichnung]; ?></td>
323
      <td width="65" style="text-align: right;"><? $pps = $artikel[Preis_pro_Stueck];
324
        if ( $pps > 0 )
325
        {
326
            echo $pps;
327
        }
328
        else
329
        {
330
            echo "&nbsp;";
331
        } ?></td>
332
      <td width="65" style="text-align: right;"><? if ( $sum > 0 )
333
        {
334
            echo $sum;
335
        }
336
        else
337
        {
338
            echo "&nbsp;";
339
        } ?></td>
340
    </tr>
341
<?
342
        $total += $sum;
343
    }
344
    $total = number_format( $total, 2, '.', '' );
345
?>
346
    <tr style="border-top:1px solid #000000;">
347
      <td colspan="3" style="border-top:1px solid #000000;">&nbsp;</td>
348
      <td style="border-top:1px solid #000000;text-align:right;"><u><?= $total; ?></u></td>
349
    </tr>
350
    <tr>
351
      <td colspan="4" style="border-top:1px solid #000000;font-weight:bold;"><?= nl2br( $Bestellung["Bemerkung_extern"] ); ?></td>
352
    </tr>
353
    <tr>
354
      <td colspan="4" style="border-top:1px solid #000000;"><p>Die ersetzten Teile sollen ausgeliefert
355
          werden:
356
			<input type="radio" class="radio" name="zusatzInfo[teileAusliefern]" value="Ja" <? if ( $zusatzInfo["teileAusliefern"] ==
357
"Ja" )
358
    {
359
        echo "checked ";
360
    } ?>/><span class="wert">(&nbsp;<? if ( $zusatzInfo[teileAusliefern] !=
361
"Ja" )
362
    {
363
        echo "&nbsp;";
364
    }
365
    else
366
    {
367
        echo "X";
368
    } ?>&nbsp;)</span> Ja
369
			&nbsp;&nbsp;&nbsp;
370
			<input type="radio" class="radio" name="zusatzInfo[teileAusliefern]" value="Nein" <? if ( $zusatzInfo["teileAusliefern"] ==
371
"Nein" )
372
    {
373
        echo "checked ";
374
    } ?>/><span class="wert">(&nbsp;<? if ( $zusatzInfo[teileAusliefern] !=
375
"Nein" )
376
    {
377
        echo "&nbsp;";
378
    }
379
    else
380
    {
381
        echo "X";
382
    } ?>&nbsp;)</span> Nein
383
        </p>      </td>
384
    </tr>
385
    <tr>
386
      <td colspan="4">Erforderliche Mehrarbeiten ausf&uuml;hren? Ggf.
387
        bis &euro; <input type="text" name="zusatzInfo[mehrarbeitMaxKosten]" value="<?= $zusatzInfo["mehrarbeitMaxKosten"] ?>" style="width:50px; border-bottom:1px solid #000000;" />
388
		<span class="wert"><?= $zusatzInfo["mehrarbeitMaxKosten"]; ?></span>		</td>
389
    </tr>
390
</table>
391
</div>
392
<div class="break"></div>
393
<div class="footer">
394
	<div id="disclaimer">
395
		<p>Der Auftrag wird unter ausdr&uuml;cklicher Anerkennung der mir ausgeh&auml;ndigten &quot;Bedingungen
396
	  	f&uuml;r die Ausf&uuml;hrung von Arbeiten an Kraftfahrzeugen, Anh&auml;ngern, Aggregaten und
397
	  	deren Teilen und f&uuml;r Kostenvoranschl&auml;ge&quot; erteilt. Die Aufbewahrungsfrist für Reparaturen, Motoren,			   Trolly`s etc. beträgt sechs Wochen bei Nichtabholung behalten wir uns vor die reparierten Teile der Verschrottung zu	 		  zuführen und auch diese Kosten in Rechnung zu stellen.
398
		</p>
399
		<p>
400
			<strong style="font-size: 1.2em;">Bitte beachten Sie, dass bei einer Bezahlung vor Ort mit Kreditkarte oder EC-Karte Ihr Tageslimit nicht überschritten wird! Wie hoch Ihr Tageslimit eingestellt ist erfahren Sie bei Ihrer Bank.</strong>
401
		</p>
402
	</div>
403
 
404
	<div class="bottom">
405
		<div id="Logo">
406
			<img src="../../../../images/Domain-Logos/17.gif" width="50" height="61" alt="" />
407
		</div>
408
 
409
		<div id="Adresse">
410
			PIEPER Technik GmbH<br />
411
	    	Sandstrasse 14-18<br />
412
	    	D-45964 Gladbeck<br />
413
	    	Tel. (0 20 43) 6 99 10
414
	    </div>
415
 
416
		<div id="Unterschrift">
417
			____________________________________<br />Unterschrift des Kunden
418
		</div>
419
	</div>
420
	<div class="break"></div>
421
</div>
422
</form>
423
<input type="text" name="zusatzInfo[au]" value="<?= $zusatzInfo[au]; ?>" />
424
+
425
</body>
426
</html>