-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
76 lines (66 loc) · 2.92 KB
/
main.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
<?php
if (!defined("CONFIG"))
exit();
require_once("functions.php"); // import mysql function
$link = mysqlconnect(); // call mysql function to get the link to the database
/* change character set to utf8 */
$link->set_charset("utf8");
?>
<!-- Main page content-->
<!--Events-->
<!-- Füe events benötige link zum bild, dann link zum event -->
<?php
$event ="SELECT `id`, `name`, `image`, `groups`, `sign_up`, `game`,`platform`, `event_link` FROM events ORDER BY `id` ASC";
$result =mysqli_query($link, $event);
if(!$result) {
show_error("MySQL Error: ".mysqli_error($link)."\n");
return;
}
?>
<div> </div>
<div class="container">
<div class="card">
<div class="card-header"><b>Veranstaltungen</b></div>
<div class="row">
<?php
while($evitem =mysqli_fetch_array($result)) {
$image = $evitem['image'];
$name = $evitem['name'];
$group = $evitem['groups'];
$status = $evitem['sign_up'];
$game = $evitem['game'];
$platform = $evitem['platform'];
$event_link = $evitem['event_link'];
?>
<div class="col-lg-4 text-center">
<div class="card mt-3 bg-light">
<div class="card-header"><h3 class=""><?php echo $name ?></b></h3></div>
<a href="<?php echo $event_link ?>" class="card h-10">
<img class="card" src="<?php echo $image ?>" alt="<?php echo $name ?>" title="<?php echo $name ?>" width="100%" height="150px"></a>
<!-- <div class="carousel-caption">
<h3><?php echo $name ?><br><?php echo $group; ?></h3>
</div> -->
<div class="card">
<div class="light">
<?php if($status=="online")
echo "<div class=\"btn btn-success\">
<a class=\"text-white\" href=\"https://www.dein link zum Forum oder AnmeldeSeite\" target=\"_blanc\" alt=\"Anmeldung im Forum\" title=\"Anmeldung im Forum\">Anmeldungen offen</a></div>" ;
if($status=="offline")
echo "<div class=\"btn btn-danger\">Anmeldung geschlossen </div>";
if($status=="planung")
echo "<div class=\"btn btn-warning\">In Planung </div>";
?>
</div>
</div>
<div class="card"><b><?php echo $group; ?></b></div>
<div class="card-footer"><img src="<?php echo $game ?>" width="100px">
<img src="<?php echo $platform ?>" width="20">
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>