-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
38 lines (35 loc) · 1.77 KB
/
index.php
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
33
34
35
36
37
38
<?php
if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"):
$redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $redirect);
exit();
endif;
$kviz = file_get_contents("./kviz.include");
?>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="expires" content="mon, 27 sep 2010 14:30:00 GMT" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Kvíz <?php echo str_replace("_", " ", ucfirst($kviz)) ?> - úvod</title>
</head>
<body>
<h1>Zadaj meno a e-mail a ťukni na tlačidlo HRAŤ.</h1>
<div class="centrovane">
<form action="hrac.php" method="get" autocomplete="on">
<input type="text" name="meno" size="20" maxlength="20" placeholder="Meno hráča kvízu <?php echo str_replace("_", " ", ucfirst($kviz)) ?>" required />
<input type="email" name="email" size="20" placeholder="E-mail hráča kvízu <?php echo str_replace("_", " ", ucfirst($kviz)) ?>" required />
<input type="hidden" name="otazka" value="1" />
<input type="submit" value="HRAŤ" />
</form>
</div>
<p class="centrovane"><?php include('phpqrcode.php'); QRcode::png('https://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER['PHP_SELF']), 'url.png', QR_ECLEVEL_L, 10); ?><img src="url.png" alt="URL"></p>
<p class="centrovane"><?php echo $_SERVER["HTTP_HOST"] . dirname($_SERVER['PHP_SELF']) ?></p>
<p class="centrovane"><?php echo "(".str_replace("_", " ", ucfirst($kviz)).")" ?></p>
</body>
</html>