1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
// Config lesen
$conf_str = file_get_contents ( "./autoyml/mainlager.yml" );
// Config nach array parsen
$conf = syck_load ( $conf_str );
// DEBUG: Config als array anzeigen
//print_r ( $conf );
echo "<html>";
echo '<table border="1" cellspacing="10" cellpadding="10">';
$header = '<tr><th>Artikel</th>';
foreach ( $conf['Lager'] as $lagername => $lager) {
$header .= '<th>'.$lagername.'/'.$lager['Person'].'</th>';
}
$header .= '</tr>';
echo $header;
foreach ( $conf['Artikel'] as $artikelname => $artikel ) {
$row = '<tr><td>'.$artikelname.'</td>';
foreach ( $artikel as $person => $menge) {
$row .= '<td>'.$menge.'</td>';
}
$row .= '</tr>';
echo $row;
}
echo '</table>';
echo "</html>";
?>
|