osamc.de/organigramm.php

68 lines
1.2 KiB
PHP

<?php
$css = '<html>
<head>
<style>
h2 {
text-align: center;
padding: 20px 0;
}
.styled-table {
border-collapse: collapse;
margin-left:auto;
margin-right:auto;
font-size: 0.9em;
font-family: sans-serif;
min-width: 400px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
.styled-table thead tr {
background-color: #009879;
color: #ffffff;
text-align: left;
}
.styled-table th,
.styled-table td {
padding: 12px 15px;
}
.styled-table tbody tr {
border-bottom: 1px solid #dddddd;
}
.styled-table tbody tr:nth-of-type(even) {
background-color: #f3f3f3;
}
.styled-table tbody tr:last-of-type {
border-bottom: 2px solid #009879;
}
</style>
</head>
<body>
<h2>OSAMC Organigramm</h2>
<table class="styled-table">
';
echo $css;
$f = fopen("organigramm.csv", "r");
while (($line = fgetcsv($f)) !== false) {
echo "<tr>";
foreach ($line as $cell) {
echo "<td>" . htmlspecialchars($cell) . "</td>";
}
echo "</tr>\n";
}
fclose($f);
echo "\n</table></body></html>"
?>