Current Path : /data/web/virtuals/51568/virtual/www/www/letniskola/ |
Current File : /data/web/virtuals/51568/virtual/www/www/letniskola/prihlaskytisk.php |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Letní škola s Kolumbem - tisk</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <style type="text/css" media="print"> /* @page {size:landscape} */ @media print { @page { size: A4 landscape; max-height: 100%; max-width: 100%; } header, footer { display: none; } /* body { width: 100%; height: 100%; -webkit-transform: rotate(-90deg) scale(.68, .68); -moz-transform: rotate(-90deg) scale(.58, .58) } */ } </style> </head> <body onload="print()"> <?php if (!isset($pdo)){ if (file_exists("class/pdoDB.class.php")) {require "class/pdoDB.class.php";} else {require "../../class/pdoDB.class.php"; } } echo prihlasky(); function prihlasky(){ $pdo = new pdoDB(); $sql = "SELECT `id`, `prijmeni`, `jmeno`, `trida`, `vlozeno`, `potvrzeno`, `emailzz`, `telefon` FROM `letniskola` WHERE `potvrzeno` > '1' ORDER BY `prijmeni`, `trida`"; $seznam = $pdo->queryAll($sql, Array()); $html = <<<HTML <div class="d-flex justify-content-center flex-column"> <div class="d-flex mb-2" style="max-height: 50px"> <h4 class="">Letní škola s Kolumbem</h4> </div> <table class="table-bordered table-sm"> <thead class=""> <th class="text-center">#</th> <th class="text-left">žák</th> <th class="text-left">třída</th> <th class="text-left">e-mail rodič</th> <th class="text-left">telefon</th> <th class="text-left">potvrzeno</th> <th style="width: 23%;">poznámka</th> </thead> HTML; $pocet = 0; foreach($seznam as $zak){ $pocet++; list($datum, $cas) = explode(' ', $zak->potvrzeno); list($rok, $mesic, $den) = explode('-', $datum); $okamzik = $den.'.'.$mesic.'.'.$rok.' '.$cas; $html .= <<<HTML <tr id="prihlasky-radek$zak->id"> <td class="text-right">$pocet</td> <td id="zak$zak->id">$zak->prijmeni $zak->jmeno</td> <td class="text-center">$zak->trida</td> <td>$zak->emailzz</td> <td>$zak->telefon</td> <td class="text-right">$okamzik</td> <td></td> </tr> HTML; } $html .= <<<HTML </table> </div> HTML; return $html; } ?> </body> </html>