2 include ('lib/twitese.php');
4 include ('inc/header.php');
6 if (!loginStatus()) header('location: login.php');
9 <script src="js/lists.js"></script>
16 if (isset($_GET['id'])) {
22 $type = isset($_GET['t'])? $_GET['t'] : 1;
23 $c = isset($_GET['c'])? $_GET['c'] : -1; // cursor
26 $lists = $t->followedLists($id, $c);
29 $lists = $t->myLists($id);
32 $lists = $t->beAddedLists($id, $c);
37 $nextlist = $lists->next_cursor;
38 $prelist = $lists->previous_cursor;
39 $lists = $lists->lists;
40 if ($lists === false) {
41 header('location: error.php');exit();
49 <span class="subnavNormal">Lists you follow</span><span class="subnavLink"><a href="lists.php?t=1">Lists you created</a></span><span class="subnavLink"><a href="lists.php?t=2">Lists following you</a></span>
50 <?php } else if ($type == 1) {?>
51 <span class="subnavLink"><a href="lists.php?t=0">Lists you follow</a></span><span class="subnavNormal">Lists you created</span><span class="subnavLink"><a href="lists.php?t=2">Lists following you</a></span>
53 <span class="subnavLink"><a href="lists.php?t=0">Lists you follow</a></span><span class="subnavLink"><a href="lists.php?t=1">All your lists</a></span><span class="subnavNormal">Lists following you</span>
57 <span class="subnavNormal">Following Lists</span><span class="subnavLink"><a href="lists.php?id=<?php echo $id?>&t=1">All Lists</a></span><span class="subnavLink"><a href="lists.php?id=<?php echo $id?>&t=2">Lists Following @<?php echo $id?></a></span>
58 <?php } else if ($type == 1) {?>
59 <span class="subnavLink"><a href="lists.php?t=0&id=<?php echo $id?>">Following Lists</a></span><span class="subnavNormal">All Lists</span><span class="subnavLink"><a href="lists.php?id=<?php echo $id?>&t=2">Lists Following @<?php echo $id?></a></span>
61 <span class="subnavLink"><a href="lists.php?t=0&id=<?php echo $id?>">Following Lists</a></span><span class="subnavLink"><a href="lists.php?id=<?php echo $id?>&t=1">All Lists</a></span><span class="subnavNormal">Lists Following @<?php echo $id?></span>
68 $empty = count($lists) == 0? true: false;
70 echo "<div id=\"empty\">No Tweet To Display</div>";
72 $output = '<ol class="rank_list">';
73 foreach ($lists as $list) {
75 $listurl = substr($list->uri,1);
77 $listname = explode('/',$list->full_name);
78 $mode = $list->mode == 'private' ? "Private" : "Public";
82 <span class=\"rank_img\"><img src=\"".getAvatar($user->profile_image_url)."\" /></span>
83 <div class=\"rank_content\" id=\"list{$list->id_str}\">
84 <span class=\"rank_num\"><span class=\"rank_name\"><a href=\"list.php?id=$listurl\"><em>$listname[0]/</em>$listname[1]</a></span></span>
85 <span class=\"rank_count\">Followers: {$list->subscriber_count} Members: {$list->member_count} $mode</span>
87 if ($list->description != '') $output .= "<span class=\"rank_description\">Description: $list->description</span>";
88 if ($type == 0) $output .= "<span id=\"list_action\"><a id=\"btn\" href=\"javascript:void()\" class=\"unfollow_list\">Unfollow</a></span>";
89 if ($type == 1 && $isSelf) $output .= "<span id=\"list_action\"><a id=\"btn\" href=\"javascript:void()\" class=\"edit_list\">Edit</a> <a id=\"btn\" href=\"javascript:void()\" class=\"delete_list\">Delete</a> <a id=\"btn\" href=\"javascript:void()\" class=\"add_member\">Add Members</a></span>";
103 <?php if ($isSelf && $type == 1) {?>
104 <a href="#" class="more round" id="list_create_btn" style="margin: 20px auto;">Create a new list</a>
105 <form method="POST" action="./lists.php?t=1" id="list_form">
106 <input type="hidden" name="list_spanid" value="" id="list_spanid" />
107 <input type="hidden" name="pre_list_name" value="" id="pre_list_name" />
108 <input type="hidden" name="is_edit" value="0" id="is_edit" />
109 <span><label for="list_name">List name</label><input type="text" name="list_name" id="list_name" /></span>
110 <span><label for="list_description">Description</label><textarea type="text" name="list_description" id="list_description"></textarea></span>
111 <span><label for="list_protect">Private</label><input type="checkbox" name="list_protect" id="list_protect" />
112 <a style="background: transparent url(img/sprite-icons.png) no-repeat scroll -272px -16px; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; text-decoration: none; height: 10px; float: right; position: relative; width: 9px; left: 3px; top: -160px;" title="Close" onclick="$('#list_form').slideToggle(300)" href="#"></a>
113 <input type="submit" class="btn" id="list_submit" value="" />
122 <div id="pagination">
124 if ($type == 0 || $type == 2) {
126 if ($prelist != 0) echo "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"lists.php?t=$type&c=$prelist\">Back</a>";
127 if ($nextlist != 0) echo "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"lists.php?t=$type&c=$nextlist\">Next</a>";
129 if ($prelist != 0) echo "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"lists.php?id=$id&t=$type&c=$prelist\">Back</a>";
130 if ($nextlist != 0) echo "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"lists.php?id=$id&t=$type&c=$nextlist\">Next</a>";
138 include ('inc/sidebar.php');
139 include ('inc/footer.php');