'[ProbablyAutistic] Have more than Fifty pastes',
25 => '[Writefag] Have Twenty Five or more pastes',
5 => '[NewWritefag] Have Five or more pastes',
0 => '[NewFriend] Have less than Five pastes',
];
$unlisted_paste_badges = [
10 => '',
5 => ''
];
$paste_view_badges = [
50000 => '[HorseAyylmao] Have more than 50,000 total views',
10000 => '[HorseIlluminatii] Have more than 10,000 total views',
5000 => '[HorseMaster] Have more than 5000 total views',
3000 => '[Horseidol] Have more than 3000 total views',
2000 => '[HorseFamous] Have more than 2000 total views',
1000 => '[HorseWriter] Have more than 1000 total views'
];
function outputBadges(array $badgeCandidates, int $actualValue, string $imagePrefix) {
foreach ($badgeCandidates as $threshold => $badgeTitle) {
if ($actualValue >= $threshold) {
echo "
";
break;
}
}
}
?>
= pp_html_escape($profile_username) ?>'s Pastes
joined: = $profile_join_date; ?>
Badges
';
} elseif (strtotime($profile_join_date) <= 1608422400) {
echo '
![[EarlyPioneer] Joined during the Second wave](/img/badges/pioneer.png)
';
} elseif (strtotime($profile_join_date) <= 1609459200) {
echo '
![[EarlyStraggeler] Joined after the Second wave](/img/badges/strag.png)
';
}
if (!str_contains($profile_badge, '0')) {
echo $profile_badge;
}
outputBadges($public_paste_badges, $profile_total_public, 'total_pastes');
outputBadges($paste_view_badges, $profile_total_paste_views, 'total_views');
if (($profile_total_unlisted >= 5) && ($profile_total_unlisted <= 9)) {
echo '
![[ShadowWriter] Have more than Five unlisted pastes](/img/badges/pastehidden.png)
';
} elseif ($profile_total_unlisted >= 10) {
echo '
![[Ghostwriter] Have more than Ten unlisted pastes](/img/badges/pastehidden.png)
';
}
?>
' . pp_html_escape($success) . '
';
}
foreach ($flashes['error'] as $error) {
echo '
' . pp_html_escape($error) . '
';
}
?>
username === $profile_username): ?>
Some of your statistics:
Total pastes: = $profile_total_pastes ?> —
Total public pastes: = $profile_total_public ?> —
Total unlisted pastes: = $profile_total_unlisted ?> —
Total private pastes: = $profile_total_private ?> —
Total views of all your pastes: = $profile_total_paste_views ?>
Total favourites of all your pastes: = $total_pfav ?> —
Total favorites you have given: = $total_yfav ?>
Title |
Paste Time |
Visibility";
} ?>
Views |
Tags |
Delete";
} ?>
format("d F Y");
$p_views = Trim($row['views']);
$p_visible = intval($row['visible']);
$tagArray = array_map(function ($tag) {
return $tag['name'];
}, getPasteTags($conn, $p_id));
$p_tags = implode(',', $tagArray);
$p_visible = match ($p_visible) {
0 => 'Public',
1 => 'Unlisted',
2 => 'Private'
};
$p_link = urlForPaste($p_id);
$p_delete_message = "'Are you sure you want to delete this paste?'";
$p_delete_link = (PP_MOD_REWRITE) ? "user.php?del&user=$profile_username&id=$p_id" : "user.php?del&user=$profile_username&id=$p_id";
$p_tag_link = (PP_MOD_REWRITE) ? "user.php?user=$profile_username&q=$p_tags" : "user.php?user=$profile_username&q=$tags";
$title = truncate($title, 20, 50);
// Guests only see public pastes
if (!$is_current_user) {
if ($row['visible'] == 0) {
echo '
' . ($title) . '
|
' . $p_dateui . '
|
' . $p_views . '
|
';
if (strlen($p_tags) > 0) {
echo tagsToHtmlUser($p_tags,$profile_username);
} else {
echo ' No tags';
}
echo ' |
';
}
} else { ?>
= $title ?>
|
= $p_dateui ?>
|
= $p_visible ?>
|
= $p_views ?>
|
= strtoupper($p_code) ?>
|
|
Title |
Paste Time |
Visibility";
} ?>
Views |
Tags |
Delete";
} ?>
Title |
Date Favourited |
Status |
Tags |
Delete";
//} ?>
format("d F Y");
$Recent_update = new DateTime($row['updated_at']);
$Recent_update_u = date_format($Recent_update, 'U');
$tagArray2 = array_map(function ($tag) {
return $tag['name'];
}, getPasteTags($conn, $f_id));
$f_tags = implode(',', $tagArray2);
//$p_link = ($mod_rewrite == '1') ? "$f_id" : "paste.php?favdel=$fu_id";
//$f_delete_link = ($mod_rewrite == '1') ? "user.php?favdel&user=$profile_username&fid=$f_id" : "user.php?favdel&user=$profile_username&fid=$f_id";
$title = truncate($title, 20, 50);
$current_time = time();
$past = strtotime('-2 day', $current_time);
if ($past <= $Recent_update_u && $Recent_update_u <= $current_time) {
$updatenote = "";
} else {
$updatenote = "";
}
echo '
' . ($ftitle) . '
|
' . $f_dateui . '
|
' . $updatenote . '
|
';
if (strlen($f_tags) > 0) {
echo tagsToHtmlUser($f_tags,$profile_username);
} else {
echo ' No tags';
}
echo ' |
';
}
}
?>