2 include ('lib/twitese.php');
4 include ('inc/header.php');
5 if (!loginStatus()) header('location: login.php');
8 <script src="js/btns.js"></script>
10 <div id="statuses" class="column round-left">
12 include('inc/sentForm.php');
13 include('lib/timeline_format.php');
15 $since_id = isset($_GET['since_id']) ? $_GET['since_id'] : false;
16 $max_id = isset($_GET['max_id']) ? $_GET['max_id'] : false;
18 $statuses = $t->replies($since_id, $max_id);
19 if ($statuses === false) {
20 header('location: error.php');exit();
23 $count_t = count($statuses);
25 $empty = 0; // 0 for not empty
26 } else if ($count_t < 1) {
27 $empty = 1; // 1 for no tweets to display
29 $empty = $t->http_code == 429 ? 2 : 0; // 2 for API outage
32 echo "<div id=\"empty\">No tweet to display.</div>";
33 } else if ($empty == 2) {
34 echo "<div id=\"empty\">API quota is used out, please wait for a moment before next refresh.</div>";
36 $output = '<ol class="timeline" id="allTimeline">';
40 foreach ($statuses as $status) {
41 if (!$firstid) $firstid = $status->id_str;
42 $lastid = $status->id_str;
43 $output .= format_timeline($status,$t->username);
45 $lastid = bcsub($lastid, "1");
47 $output .= "</ol><div id=\"pagination\">";
49 $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"replies.php?since_id=" . $firstid . "\">Back</a>";
50 $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"replies.php?max_id=" . $lastid . "\">Next</a>";
60 include ('inc/sidebar.php');
61 include ('inc/footer.php');