-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
84 lines (84 loc) · 2.52 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
session_start ();
include_once 'database/database_infos.php';
include_once 'database/Database.php';
?>
<!DOCTYPE html>
<html>
<head>
<?php include_once 'includes/head.php'; ?>
</head>
<body>
<?php include_once 'resources/form_controller.php';
include_once 'resources/navigation.php';
?>
<div class="container">
<div class="col-md-10">
<div class="row">
<div class="hidden-xs hidden-sm col-md-4">
<img class="img-responsive" alt="Test" src="img/title_large.jpg">
</div>
<div class="hidden-md hidden-lg col-md-4">
<img class="img-responsive" alt="Test" src="img/title_small.png">
</div>
<div class="col-md-8">
<h1>Herzlich willkommen auf Quizmasters.ch</h1>
<p>Quizmasters ist eine Seite auf der du dein Wissen testen kannst,
wir bieten verschiedene Quiz zu verschiedenen Themen, wie
Fussball, Games oder Tiere an. Zeige dein Können und steige
in der Rangliste bis ganz nach oben.</p>
<h3>
Viel Spass! <br> dein Quizmasters Team
</h3>
</div>
</div>
<hr />
<?php $count_cat = count($categories)-1;
$rand1 = 0;
$rand2 = 0;
while($rand1 == $rand2){
$rand1 = rand(0, $count_cat);
$rand2 = rand(0, $count_cat);
if($rand1 != $rand2){?>
<div class="row">
<a href = <?php echo "quiz.php?id=" . $categories[$rand1]->__get('categoryID');?>>
<div class="col-xs-6 col-sm-3">
<img class="img-responsive" alt="Image Category"
src="<?php echo $categories[$rand1]->__get('img_path') . "large.png";?>">
</div>
<div class="col-xs-6 col-sm-3">
<h3>
<?php echo $categories[$rand1]->__get('category')?>
</h3>
<p>
<?php echo $categories[$rand1]->__get('description');?>
</p>
</div>
<div class="clearfix visible-xs"></div>
<div class="col-xs-6 col-sm-3">
<img class="img-responsive" alt="Image Category"
src="<?php echo $categories[$rand2]->__get('img_path') . "large.png";?>">
</div>
</a>
<a href = <?php echo "quiz.php?id=" . $categories[$rand2]->__get('categoryID');?>>
<div class="col-xs-6 col-sm-3">
<h3>
<?php echo $categories[$rand2]->__get('category')?>
</h3>
<p>
<?php echo $categories[$rand2]->__get('description');?>
</p>
</div>
</a>
</div>
<?php }
}?>
</div>
<div class="col-md-2">
<img src="img/ad1.png" alt="Werbung" class="img-responsive">
</div>
</div>
<hr />
<?php include_once 'resources/footer.php';?>
</body>
</html>