hajime/public/yuuno_members.php

103 lines
3.1 KiB
PHP
Raw Permalink Normal View History

2023-08-11 22:16:32 +00:00
<?php
// Print header
print desHeader($flashii->loggedIn() ? ($rank ? $name : 'Flashii Members') : 'Login to view');
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="padding: 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; color: #';
print $groupData['colour'];
print ';">';
print $groupData['mname'];
print '</div>';
print '</a>';
}
/*
print '<div class="dropDown">';
print '<a href="/members/">';
print '<div class="groupBox" id="am"';
print $rank ? ' class="dropDownSelected"' : null;
print '>';
print $rank;
print 'All members';
print '</div>';
print '</a>';
foreach($groupArray as $groupData) {
print '<a href="/members/';
print $groupData['gid'];
print '"';
print $groupData['gid'] == $rank ? ' class="dropDownSelected"' : null;
print '>';
print '<div class="groupBox" id="g';
print $groupData['gid'];
print '"';
print empty($groupData['colour']) ? null : ' style="color: #'. $groupData['colour'] .'"';
print '>';
print $groupData['mname'];
print '</div>';
print '</a>';
}
print '</div>';*/
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 class="content standalone" style="padding: 20px;">
<h1>Login to view this page!</h1>
If you actually are logged in something went wrong and you should report this to <a href="/u/2" target="_blank" class="default">Flashwave</a>.<br />
If you aren't logged in please log in or create an account if you don't have one.
</div>
<?php
}
// Print footer
print desFooter();