-
Notifications
You must be signed in to change notification settings - Fork 1
/
group.php
136 lines (116 loc) · 4.1 KB
/
group.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
include 'includes/config.php';
include 'includes/header.php';
checkForLogin();
if(isset($_GET['id']))
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=../pages/index.php">';
exit;
}
if(isset($_GET['groupid']))
{
$getGroupId = $_GET['groupid'];
$query = $con->prepare("SELECT * from groups g INNER JOIN group_ranks r ON (g.group_id = r.group_id) WHERE g.group_id = $getGroupId");
$query->execute();
$gData = $query->fetch();
}
$bquery = $con->prepare("SELECT * FROM group_members WHERE groupid = $getGroupId");
$bquery->execute();
$cquery = $con->prepare("SELECT veh_id FROM vehicles WHERE v_type = 2 AND v_group = $getGroupId");
$cquery->execute();
?>
<div class="ui container">
<div class="ui padded grid">
<div class="wide column">
<div class="ui segment">
<div class="ui header">
<?php echo $gData['name']; ?>
<div class="ui grey tiny basic horizontal label"><?php echo 'id: '.$gData['group_id']; ?></div>
<?php
switch($gData['type'])
{
case 1:
case 6:
case 9:
echo '<div class="ui blue tiny basic horizontal label">Government</div>';
break;
case 13:
case 7:
echo '<div class="ui grey tiny basic horizontal label">Business</div>';
break;
case 2:
case 3:
case 4:
case 5:
case 8:
case 12:
echo'<div class="ui grey tiny basic horizontal label">Criminal</div>';
break;
}
?>
</div>
<div class="ui horizontal section divider">
GROUP INFORMATION
</div>
<div class="ui segment">
<div class="ui tiny four statistics">
<div class="ui statistic">
<div class="value"><i aria-hidden="true" class="user icon"></i> <?php echo intval($bquery->rowCount()) ?></div>
<div class="label"><small>Group Members</small></div>
</div>
<div class="ui statistic">
<div class="value"><i aria-hidden="true" class="tag icon"></i> <?php echo $gData['prefix']; ?></div>
<div class="label"><small>Group Tag</small></div>
</div>
<div class="ui statistic">
<div class="value"><i aria-hidden="true" class="car icon"></i> <?php echo intval($cquery->rowCount()) ."/". $gData['maxvehslots'] ?></div>
<div class="label"><small>Group Vehicles</small></div>
</div>
<div class="ui statistic">
<div class="value"><i aria-hidden="true" class="crosshairs icon"></i> <?php echo $gData['points']; ?></div>
<div class="label"><small>Group Points</small></div>
</div>
</div>
</div>
<div class="ui horizontal section divider">
GROUP MEMBERS
</div>
<table class="ui table">
<thead class="">
<tr class="">
<th class="">Player</th>
<th class="">Rank</th>
<th class="">Level</th>
</tr>
</thead>
<tbody class="">
<?php
while($row = $bquery -> fetch())
{
$playername = $con->prepare("SELECT user_name FROM users WHERE user_id = {$row['user_id']}");
$playername->execute();
$getplayername = $playername->fetch();
$rankname = $con->prepare("SELECT rank_name, rank_level FROM group_ranks WHERE rank_level = {$row['user_rank']} AND group_id = $getGroupId");
$rankname->execute();
$getrankname = $rankname->fetch();
echo '<td class="five wide">
<h4 class="ui header">
<div class="content"><a href="player.php?searchuser='.$getplayername['user_name'].'">'.$getplayername['user_name'].'</a>
</div>
</h4>
</td>
<td class="">'.$getrankname['rank_name'].'</td>
</td>
<td class="">'.$getrankname['rank_level'].'</td>
</tr>';
}
?>
</tbody>
</table>
</div>
<div class="ui hidden divider"></div>
<div class="ui divider"></div>
<footer>Axiania RPG</footer>
<?php
include 'includes/footer.php';
?>