| Title | Added | Expires | ID | Actions | '; 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 '
|---|---|---|---|---|
| ' . $title . ' | '; echo '' . $created . ' | '; echo '' . $expire . ' | '; echo '' . htmlspecialchars($row["uid"], ENT_QUOTES, 'UTF-8') . ' | '; echo ''; echo ''; echo ''; echo ' |