hajime/public/yuuno_profile.php
2023-08-12 00:16:32 +02:00

101 lines
4.9 KiB
PHP

<?php
// Print header
print desHeader($userVar['title'], ['meta' => [$userVar['profileBg']]]);
// Print page contents
if($userExists) {
?>
<div class="content profile">
<div class="<?=$userPage ? 'content-right ' : null;?>content-column">
<div style="text-align:center;">
<img src="<?=$userVar['avatar'];?>" alt="<?=$userArray['username'];?>'s Avatar" class="default-avatar-setting" />
<br /><?=$userVar['uTitle'];?>
<h1 style="<?=$groupArray['style'];?>text-shadow:0px 0px 7px #888;padding:0px 0px 10px;"><?=$userArray['username'];?></h1>
<?php
if($flashii->loggedIn()) {
if($_SESSION['uid'] == $userArray['id']) {
?>
<a href="/settings/profile" class="clean">
<div class="button profileOption">Edit Profile</div>
</a>
<?php
} elseif($flashii->checkRank($fwSettings['develRanks'])) {
?>
<a href="/sys/friend?u=<?=$userArray['id'];?>&a=add&s=<?=$_SESSION['php_sid'];?>" class="clean">
<div class="button profileOption">Add Friend</div>
</a>
<a href="/report/<?=$userArray['id'];?>" class="clean">
<div class="button profileOption">Report</div>
</a>
<?php
}
}
?>
<hr class="default" />
<b>Joined</b> <?=date('l Y-m-d H:i', $userArray['join_date']);?><br />
<b>Last Seen on</b> <?=$userArray['last_seen'] ? date('l Y-m-d H:i', $userArray['last_seen']) : 'Hasn\'t logged in yet.';?>
<?php
if(strlen($userVar['sideBar'])) {
print '<hr class="default" />';
print '<table style="width: 100%;">';
print $userVar['sideBar'];
print '</table>';
}
?>
<hr class="default" />
<b>Account Standing</b>
<?php
if($flashii->checkBan($userArray['id'])) {
print '<h2 style="color: black;text-shadow:0px 0px 7px #888;margin-top:0px;">Banned</h2>';
} elseif($standing) {
print '<h2 style="color: red;text-shadow:0px 0px 7px #888;margin-top:0px;">Bad</h2>';
if($flashii->loggedIn()) {
print '<span style="font-size: 10px; line-height: 10px;">';
print 'User has <b>';
print count($warnArray);
print ' warnings</b>.<br />';
print 'After 5 to 10 more warnings (depending on what they are for) this user may be permanently banned.';
print '</span>';
}
} elseif($userArray['id'] == 2) {
print '<h2 style="color: purple;text-shadow:0px 0px 7px #888;margin-top:0px;">Mewow</h2>';
} elseif($userArray['id'] == 6) {
print '<h2 style="color: blue;text-shadow:0px 0px 7px #888;margin-top:0px;">Drowned</h2>';
} elseif($userArray['id'] == 8) {
print '<br /><img src="/assets/img/emoticons/congrats.png" alt="ok" />';
} elseif($userArray['id'] == 21) {
print '<h2 style="color: red;text-shadow:0px 0px 7px #888;margin-top:0px;">ULTREMELY BAD</h2>';
} elseif($userArray['id'] == 303) {
print '<h2 style="color: black;text-shadow:0px 0px 7px #888;margin-top:0px;">Banned Forever</h2>';
} elseif($userArray['id'] == 212) {
print '<h2 style="color: black;text-shadow:0px 0px 7px #888;margin-top:0px;">Banned</h2>';
} else {
print '<h2 style="color: green;text-shadow:0px 0px 7px #888;margin-top:0px;">Good</h2>';
}
?>
</div>
</div>
<div class="content-left content-column markdown<?=$userPage ? null : ' hidden';?>">
<?=$mdparser->text(strip_tags($userArray['profilemarkdown']));?>
</div>
<div class="clear"></div>
</div>
<?php
} else {
?>
<div class="content standalone" style="padding: 20px;">
<h1>The requested user does not exist!</h1>
There are a few possible reasons for this:
<ul>
<li>They changed their username.</li>
<li>They may have been deactivated.</li>
<li>You made a typo.</li>
<li>They never existed.</li>
</ul>
</div>
<?php
}
// Print footer
print desFooter();