studidcard/idcard.php
Raphael Dannecker 48a5360d0d Initial commit
2025-02-25 16:10:55 +01:00

192 lines
5.5 KiB
PHP

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Schülerausweis</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #ffffff;
font-family: Arial, sans-serif;
}
.card {
width: 600px;
height: 350px;
border: 1px solid #cccccc;
border-radius: 10px;
padding: 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background: url('img/fvs-background.<?php echo (isset($pdf) ? 'png' : 'svg') ?>') bottom left no-repeat;
}
.left-section {
margin-top: 5%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.right-section {
text-align: left;
}
.title {
margin-top: 14%;
font-size: 24px;
font-weight: bold;
color: #333333;
}
.subtitle {
font-size: 14px;
color: #666666;
margin-bottom: 20px;
}
.info {
margin-bottom: 10px;
}
.info strong {
display: block;
font-size: 18px;
color: #333333;
}
.info span {
font-size: 12px;
color: #666666;
}
.logo {
margin-bottom: 10px;
}
.logo img {
width: 100%;
height: auto;
}
.contact {
font-size: 14px;
color: #333333;
text-align: left;
}
.contact a {
color: #333333;
text-decoration: none;
}
.qr-code {
margin-top: 10px;
}
.qr-code img {
width: 120px;
height: 120px;
}
.timestamp {
font-size: 12px;
color: #666666;
margin-top: 10px;
}
.curve {
position: absolute;
width: 400px;
height: 200px;
background: #e5f2f8;
border-radius: 200px / 100px;
transform: rotate(20deg);
top: 50px;
left: -100px;
z-index: -1;
}
</style>
</head>
<body>
<div class="card">
<div style="display: grid; grid-template-columns: 45% 55%;">
<div style="align-self: flex-end">
<div class="title"><?php if ($data['role']==='teacher') { echo 'Lehrerausweis'; } else { echo 'Schülerausweis'; } ?></div>
<div class="subtitle"><?php if ($data['role']==='teacher') { echo 'Teacher'; } else { echo 'Student'; } ?> Identity Card</div>
</div>
<div class="logo">
<img src="img/logo-fvs.<?php echo (isset($pdf) ? 'png' : 'svg') ?>" alt="Logo Steinbeis-Schule Reutlingen">
</div>
</div>
<div style="display: grid; grid-template-columns: 66% 34%;">
<div class="left-section">
<div class="info">
<strong><?php echo $data['firstname']; ?> <?php echo $data['lastname']; ?></strong>
<span>Name</span>
</div>
<div class="info">
<strong><?php echo $data['birthdate']; ?></strong>
<span>Date of Birth</span>
</div>
<div class="info">
<strong><?php echo $data['doe']; ?></strong>
<span>Date of Expiry</span>
</div>
<div class="subtitle" style="margin-bottom: 0px">Nur gültig mit amtlichem Lichtbildausweis<br>Only valid with official photo Identity Card</div>
</div>
<div class="right-section">
<div class="contact">
Gewerbliche Schule I<br>
Karlstraße 40<br>
D-72764 Reutlingen<br>
<a href="http://www.steinbeis.schule">www.<strong>steinbeis</strong>.schule</a><br>
<a href="mailto:info@steinbeis.schule">info@steinbeis.schule</a><br>
<a href="tel:+497121485111">+49 7121 485 111</a>
</div>
<div style="display:grid; grid-template-columns: 2fr 1fr;">
<div class="qr-code">
<?php if ($verified) {
if (isset($valid) && $valid) {
echo '<img src="img/checked.svg" alt="gültig">';
} elseif (isset($valid) && !$valid) {
echo '<img src="img/expired.svg" alt="ungültig">';
} elseif (isset($pdf)) {
echo '<qrcode value="' . $url .'" style="width: 50mm; background-color: white; color: black;"></qrcode>';
} else {
echo '<img src="qrcode.php" alt="QR Code">';
}
} else {
echo '<img src="img/signature_invalid.svg" alt="Signatur ist ungültig">';
} ?>
</div>
<div style="align-content:end">
<div class="subtitle">
<?php if ($verified) {
if (isset($valid) && $valid) {
echo 'valid';
} elseif (isset($valid) && !$valid) {
echo 'expired';
} elseif (!isset($pdf)) {
echo '<A href="card.php?pdf=1"><img src="img/pdf.svg" width="40px"></A><br>';
echo '<A href="' . $url . '">verify</A>';
} else {
}
} else {
echo 'Die Signatur ist ungültig';
} ?>
</div>
<div class="timestamp">
<?php echo date('d.m.Y') . "<br>" . date('H:i:s'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>