OSDN Git Service

3e86cf32a282f79a476b24d7ef76891d72755114
[embrj/master.git] / retweets.php
1 <?php\r
2         include_once('lib/twitese.php');\r
3         $title = "Retweets";\r
4         include_once('inc/header.php');\r
5         include_once('lib/timeline_format.php');\r
6         if (!loginStatus()) header('location: login.php');\r
7 \r
8         $type = 'retweets';\r
9         $page = isset($_GET['p']) ? $_GET['p'] : 1;\r
10         $count = isset($_GET['count']) ? $_GET['count'] : 20;\r
11         $since_id = isset($_GET['since']) ? $_GET['since'] : false;\r
12         $max_id = isset($_GET['maxid']) ? $_GET['maxid'] : false;\r
13 \r
14         $t = getTwitter();\r
15         $retweets = $t->retweets_of_me($page, $count, $since_id, $max_id);\r
16         echo '<div id="statuses" class="column round-left">';\r
17         include_once('inc/sentForm.php');\r
18         $html = '<script src="js/btns.js"></script>\r
19         <style>\r
20         .big-retweet-icon{display:none}\r
21         </style>';\r
22         $html .='<div class="clear"></div>';\r
23         $empty = count($retweets) == 0? true: false;\r
24         if ($empty) {\r
25                 $html .= "<div id=\"empty\">No retweets to display.</div>";\r
26         } else {\r
27                 $html .= '<ol class="timeline" id="allTimeline">';\r
28                 foreach($retweets as $retweet){\r
29                         $html .= format_retweet_of_me($retweet);\r
30                 }\r
31                 $html .= '</ol><div id="pagination">';\r
32                         if ($page >1) $html .= "<a id=\"more\" class=\"round more\" style=\"float: left;\" href=\"retweets.php?p=" . ($page-1) . "\">Back</a>";\r
33                         if (!$empty) $html .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"retweets.php?p=" . ($page+1) . "\">Next</a>";\r
34                 $html .= "</div>";\r
35         }\r
36         echo $html;\r
37         include_once('inc/sidebar.php');\r
38         include_once('inc/footer.php');\r
39 ?>\r