You must be logged in to see your pastes!'; echo '
'; die(); } $own = GetUsersIDBySession($_COOKIE["pp_sid"], $_COOKIE["pp_skey"]); $pastes = $pasteRepo->getPastesByOwner($own, true); if (!empty($pastes)) { echo ''; echo ''; echo ''; foreach ($pastes as $row) { $title = htmlspecialchars($row['title'], ENT_QUOTES, 'UTF-8'); $created = date('Y-m-d', $row["created"]); if ($row["expire"] == 0) { $expire = 'Never'; } else { $expireInSeconds = $row["expire"] - time(); if ($expireInSeconds > 24 * 3600) { $expire = round($expireInSeconds / (24 * 3600)) . ' days from now'; } elseif ($expireInSeconds >= 3600) { $expire = round($expireInSeconds / 3600) . ' hours from now'; } else { $expire = round($expireInSeconds / 60) . ' minutes from now'; } } echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
Title Added Expires ID Actions
' . $title . '' . $created . '' . $expire . '' . htmlspecialchars($row["uid"], ENT_QUOTES, 'UTF-8') . ''; echo ''; echo ''; echo '
'; } else { echo '

You haven\'t made any pastes yet!

'; } ?>