-
Notifications
You must be signed in to change notification settings - Fork 2
/
favor.php
executable file
·50 lines (37 loc) · 968 Bytes
/
favor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
include ('lib/twitese.php');
$title = "我的收藏";
include ('inc/header.php');
if (!isLogin()) header('location: login.php');
?>
<script type="text/javascript" src="js/favor.js"></script>
<div id="statuses">
<?php include('inc/sentForm.php')?>
<?php
$t = getTwitter();
$p = 1;
if (isset($_GET['p'])) {
$p = (int) $_GET['p'];
if ($p <= 0) $p = 1;
}
$statuses = $t->getFavorites($p);
testResult($statuses);
$empty = count($statuses) == 0? true: false;
if ($empty) {
tpEmpty();
} else {
tpTimeline($statuses, array('show_del'=>true, 'hide_favor' => true));
$output = "<div id=\"pagination\">";
if ($p >1) $output .= "<a href=\"favor.php?p=" . ($p-1) . "\">上一页</a>";
if (!$empty) $output .= "<a href=\"favor.php?p=" . ($p+1) . "\">下一页</a>";
$output .= "</div>";
echo $output;
}
?>
</div>
<?php
include ('inc/sidebar.php');
?>
<?php
include ('inc/footer.php');
?>