fix display issues on big TV and display edookit responses

This commit is contained in:
Karel Košnar 2025-01-13 14:06:38 +01:00
parent 7fe566156e
commit c37454b8af
3 changed files with 45 additions and 10 deletions

View file

@ -3,6 +3,12 @@
<head>
<script src="https://unpkg.com/html5-qrcode"></script>
<meta charset="UTF-8">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DynaPuff:wght@400..700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=DynaPuff:wght@400..700&family=Quicksand:wght@300..700&display=swap" rel="stylesheet">
</head>
<style>
#reader {
@ -11,7 +17,7 @@
#qr-reader {
position: absolute;
width:800px;
width:44vh;
left: 0px;
top: 0px;
}
@ -21,18 +27,42 @@
left: 0px;
top: 0px;
visibility: hidden;
width:800px;
height: 640px;
width:44vh;
height: 33vh;
background-color: #cccccc;
background-image: url('wave.gif');
background-repeat: no-repeat;
background-size: auto;
background-position: center;
}
.myframe {
position: absolute;
left: 46vh;
top: 2.5vh;
width: 133vh;
height: 95vh;
background-color: #cccccc;
border: none;
}
p {
font-family:Quicksand, sans;
}
h2 {
font-family: DynaPuff;
}
h3 {
font-family: DynaPuff;
}
ul {
display: grid;
grid-template-columns: repeat(2,auto);
width: 44vh;
}
</style>
<body>
<H1>Osvobozená základní škola - Docházka</H1>
<iframe class="myframe" src="https://script.google.com/macros/s/AKfycbweNa1afrjRPhDOM_S-1SWxWwXZcsle_rqJ9SEYLs4hh8LVI43vgbAmtzFMfg2doDX4/exec?embbeded=true" width="1330px" height="1000vh" border=0 ></iframe>
<H2>Ukaž svoji školní průkazku</H2>
<div id="reader">
<div id="qr-reader" ></div>

View file

@ -1,8 +1,8 @@
<?php
include 'osvobdoch_vars.php';
include 'osvobdoch_local_vars.php';
$fileaccess = fileatime('at_school.txt');
clearstatcache();
$fileaccess = filemtime('at_school.txt');
//check if file is accessed today
if (date('Y-m-d', $fileaccess) != date('Y-m-d')) {
$at_school = array();
@ -71,6 +71,11 @@ curl_setopt($ch, CURLOPT_HTTPHEADER, array(
));
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$result = curl_exec($ch);
echo $result;
$info = curl_getinfo($ch);
file_put_contents('at_school.txt', '<?php return ' . var_export($at_school, true) . ';');
if ($info["http_code"] == 201) {
echo " (Edookit OK)";
} else {
echo " (Edookit chyba". $info["http_code"].")";
}
?>

View file

@ -1,8 +1,8 @@
<?php
include 'osvobdoch_vars.php';
include 'osvobdoch_local_vars.php';
$fileaccess = fileatime('at_school.txt');
clearstatcache();
$fileaccess = filemtime('at_school.txt');
//check if file is accessed today
if (date('Y-m-d', $fileaccess) != date('Y-m-d')) {
$at_school = array();