forked from Worzaii/Mafiaspill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfamilie2.php
44 lines (42 loc) · 1.27 KB
/
familie2.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
<?php
include("core.php");
if(r1() || r2()){
/*
Det første man skal se når man kommer inn på "familie" er familielistene
*/
startpage("Familier i spillet");
$q = $db->query("SELECT * FROM `familie` WHERE `active` = '1' ORDER BY `date` DESC")or die(mysqli_error($db->connection_id));
if($db->num_rows() == 0){
/*Ingen familier aktive*/
$familier='<tr><td colspan="6" style="font-style:italic;">Det er ingen familier!</td></tr>';
}
else{
while($r = mysqli_fetch_object($q)){
$open = ($r->open == 1) ? '<span style="color:#0f0;">Åpen</span>' : '<span style="color:#0f0;">Lukket</span>';
$familier='<tr><td>'.$r->name.'</td><td>'.user($r->boss).'</td><td>'.user($r->uboss).'</td><td>'.date("H:i:s d.m.y",$r->date).'</td><td>'.$open.'</td><td>'.$r->kills.'</td></tr>';
}
}
echo '<h1>Familier i spillet</h1>
<p>Werzaire jobber med dette scriptet.</p>
<table class="table">
<thead>
<tr>
<th colspan="6">Familier:</th>
</tr>
<tr>
<th>Navn</th><th>Boss</th><th>Underboss</th><th>Dato Opprettet</th><th>Godtar Søknader?</th><th>Antall drap</th>
</tr>
</thead>
<tbody>
'.$familier.'
</tbody>
</table>
';
}
else{
startpage();
echo '<h1>Siden jobbes med, kom igjen senere.</h1><p class="feil">Ingen tilgang, siden jobbes med.</p>';
/*Lister opp familier*/
}
endpage();
?>