loggedIn()) { ?>
Hi, =$_SESSION['user'];?>!
checkRank($fwSettings['sitemodRanks'])) { ?>
Manage
Welcome!
Welcome to Flashii! This is a site for a bunch of friends to hang out, nothing special. Anyone is pretty much welcome to register so why not have a go?
Register!
Login
Stats
query("SELECT * FROM `flashii_users` WHERE `userrole`!='0' ORDER BY `id`");
$countUsers = $getUsers->num_rows;
$getNewestUser = @end($getUsers->fetch_all(MYSQLI_ASSOC));
$getChatUsers = $database->query("SELECT * FROM `flashii_chat_online_users`")->num_rows;
$lastUserRegister = date_diff(date_create(date('Y-m-d',$getNewestUser['join_date'])), date_create(date('Y-m-d')))->format('%a');
?>
We have
=$countUsers;?> =($countUsers == '1' ? 'user' : 'users');?>,
=$getNewestUser['username'];?> is the newest user,
it has been
=$lastUserRegister;?> =($lastUserRegister == '1' ? 'day' : 'days');?> since the last user registered and
there are
=$getChatUsers;?> =($getChatUsers == '1' ? 'user' : 'users');?> in chat right now.
loggedIn()) {
$getBirthdays = $database->query("SELECT * FROM `flashii_users` WHERE `userrole` != '0' ORDER BY `id`");
$getBirthdays = $getBirthdays->fetch_all(MYSQLI_ASSOC);
$birthdayCount = 0;
$birthdays = array();
foreach($getBirthdays as $userData) {
if(!empty($userData['birthdate'])) {
if(date('m-d') == substr(date('Y-m-d', $userData['birthdate']), 5, 5) || (date('y')%4 <> 0 && substr(date('Y-m-d', $userData['birthdate']), 5, 5) == '02-29' && date('m-d') == '02-28')) {
++$birthdayCount;
$birthdays[$birthdayCount] = array();
$birthdays[$birthdayCount]['id'] = $birthdayCount;
$birthdays[$birthdayCount]['uid'] = $userData['id'];
$birthdays[$birthdayCount]['uname'] = $userData['username'];
}
}
}
if($birthdayCount) {
print '
Birthdays
';
print 'Congratulations to ';
foreach($birthdays as $userData) {
print '
';
print $userData['uname'];
print '';
if($userData['id'] + 1 === count($birthdays))
print ' and ';
elseif($userData['id'] === count($birthdays))
print '!';
else
print ', ';
}
}
$getOnlineUsers = $database->query("SELECT DISTINCT `uid` FROM `flashii_sessions` WHERE `time` > '". (time() - 3600) ."' AND `uid` != '212';")->fetch_all(MYSQLI_ASSOC);
$getOnlineCount = count($getOnlineUsers);
if($getOnlineCount) {
print '
Online users
';
print 'These users were active on the site in the last hour:
';
foreach($getOnlineUsers as $okCountThisFuckingShit => $userData) {
$userData = $flashii->getUserdata($userData['uid']);
print '
';
print $userData['username'];
print '';
if($okCountThisFuckingShit + 2 === $getOnlineCount)
print ' and ';
elseif($okCountThisFuckingShit + 1 === $getOnlineCount)
print '.';
else
print ', ';
}
}
}
?>
News
query("SELECT * FROM `flashii_news` ORDER BY `id` DESC LIMIT 3");
$getNews = $getNews->fetch_all(MYSQLI_ASSOC);
foreach($getNews as $newsPost) {
print '
'.$newsPost['title'].'';
print '
';
print '
';
print '
Posted on ';
print date($fwSettings['dateFormat'], $newsPost['date']);
print isset($_GET['id']) ? null : '
View comments';
print '
';
}
?>