105 lines
3.9 KiB
PHP
105 lines
3.9 KiB
PHP
|
<!DOCTYPE html>
|
||
|
<html lang="en-gb">
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<title><?=($flashii->loggedIn() ? ($rank ? $name : 'Flashii - Members') : 'Login to view');?></title>
|
||
|
<link rel="stylesheet" type="text/css" href="/assets/global.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="/assets/css/mio.css" />
|
||
|
<script type="text/javascript" src="/assets/jquery.js"></script>
|
||
|
<script type="text/javascript" src="/assets/js/flashii.js"></script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<?php include(FII_SRC_DIR . '/mio_bar.php'); ?>
|
||
|
<a href="/">
|
||
|
<img class="logo" src="/assets/pixel.png" alt="Flashii" />
|
||
|
</a>
|
||
|
<br />
|
||
|
<?php
|
||
|
if($flashii->loggedIn()) {
|
||
|
|
||
|
// Get data from URL and Database
|
||
|
$userQuery = $database->query("SELECT * FROM `flashii_users` ".($rank ? "WHERE `userrole` = '".$rank."'" : "WHERE `userrole` != '0'"));
|
||
|
$userArray = $userQuery->fetch_all(MYSQLI_ASSOC);
|
||
|
$groupQuery = $database->query("SELECT * FROM `flashii_groups` WHERE `gid` != '0'");
|
||
|
$groupArray = $groupQuery->fetch_all(MYSQLI_ASSOC);
|
||
|
|
||
|
print '<div class="membersPage">';
|
||
|
print '<h1 style="margin: 0px 0px 10px; text-shadow: 0px 0px 7px #888;color:'.$colour.'">'.$name.'</h1>';
|
||
|
|
||
|
print '<a href="/members/">';
|
||
|
print '<div class="groupBox" id="am">';
|
||
|
print 'All members';
|
||
|
print '</div>';
|
||
|
print '</a>';
|
||
|
|
||
|
foreach($groupArray as $groupData) {
|
||
|
print '<a href="/members/';
|
||
|
print $groupData['gid'];
|
||
|
print '">';
|
||
|
print '<div class="groupBox" id="g';
|
||
|
print $groupData['gid'];
|
||
|
print '" style="text-shadow: 0px 0px 1em #888;';
|
||
|
print $groupData['style'];
|
||
|
print '">';
|
||
|
print $groupData['mname'];
|
||
|
print '</div>';
|
||
|
print '</a>';
|
||
|
}
|
||
|
|
||
|
print '<br />';
|
||
|
|
||
|
foreach($userArray as $userData) {
|
||
|
$avatar = '/a/' . $userData['id'];
|
||
|
|
||
|
print '<a href="/u/';
|
||
|
print $userData['id'];
|
||
|
print '">';
|
||
|
print '<div class="userBox" id="u';
|
||
|
print $userData['id'];
|
||
|
print '">';
|
||
|
print '<img src="/assets/pixel.png" alt="';
|
||
|
print $userData['username'];
|
||
|
print '" style="background: url(\'';
|
||
|
print $avatar;
|
||
|
print '\') no-repeat center / contain;';
|
||
|
print '" />';
|
||
|
print '<span class="userBoxUserName">';
|
||
|
print $userData['username'];
|
||
|
print '</span>';
|
||
|
print '</div>';
|
||
|
print '</a>';
|
||
|
}
|
||
|
|
||
|
print '</div>';
|
||
|
} else {
|
||
|
?>
|
||
|
<div id="flashii-login">
|
||
|
<h3>You must be logged in to view this page!</h3>
|
||
|
<form method="post" action="/sys/login">
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td>Username</td>
|
||
|
<td><input type="text" name="username" /></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Password</td>
|
||
|
<td><input type="password" name="password" /></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td colspan="2">
|
||
|
<input type="submit" name="submit" value="Login" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</form>
|
||
|
</div>
|
||
|
<?php
|
||
|
}
|
||
|
?>
|
||
|
<div class="navbar">
|
||
|
<?php include(FII_SRC_DIR . '/mio_menu.php'); ?>
|
||
|
</div>
|
||
|
<?php include(FII_SRC_DIR . '/mio_copyright.php'); ?>
|
||
|
</body>
|
||
|
</html>
|