-
Notifications
You must be signed in to change notification settings - Fork 0
/
seeall.php
82 lines (81 loc) · 2.41 KB
/
seeall.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<doctype! html>
<html>
<head>
<title> See all your followers & followees </title>
<meta charset="UTF-8">
<style>
body {
background: url(wooter.png), url(blue.jpg);
background-repeat: repeat-y, no-repeat;
text-align: center;
background-position: right, bottom -100px left -70px;
background-attachment: fixed;
}
.fleft { float: left; }
.fright { float: right; }
.tcenter { text-align: center; }
.tleft { text-align: left; }
.tcolor { background: rgba(255,255,255,0.8); }
.tbcolor { background: rgba(0,255,255,0.8); }
.button:hover { background: cyan; cursor: pointer; }
</style>
</head>
<body>
</body>
<?php
include "user_mgmt.php";
session_start();
$home_user=$_SESSION['user_obj'];
$other_user=$_SESSION['other_user'];
echo "<p class=\"tcenter\">Viewing All:</p>";
echo "<table width=\"100%\" id=\"entire_page\" class=\"tcenter tcolor\" align=\"center\"><tr><td>";
if(!isset($_POST['woots'])){
if(isset($_POST['followers'])){
if(!isset($_SESSION['user'])){
$id_list=load_following($home_user, "followers", $home_user->followers);
$limit=$home_user->followers;
}
else {
$id_list=load_following($other_user, "followers", $other_user->followers);
$limit=$other_user->followers;
}
echo "$limit in total:<br>";
$cult=array();
for($index=0; $index<$limit;$index++){
$temp_usr=read_id($id_list[$index]);
array_push($cult, $temp_usr);
}
}
else if(isset($_POST['followees'])){
if(!isset($_SESSION['user'])){
$id_list=load_following($home_user, "followees", $home_user->followees);
$limit=$home_user->followees;
}
else {
$id_list=load_following($other_user, "followees", $other_user->followees);
$limit=$other_user->followees;
}
echo "$limit in total:<br>";
$cult=array();
for($index=0; $index<$limit;$index++){
$temp_usr=read_id($id_list[$index]);
array_push($cult, $temp_usr);
}
}
foreach($cult as &$user){
echo "<a href='home.php?user=".$user->username."'>".$user->username."</a></td></tr><tr><td>";
}
}
else {
$woot_list=array();
if(!isset($_SESSION['user'])){ $woot_list=load_woots($home_user, $home_user->num_woots); }
else { $woot_list=load_woots($other_user, $other_user->num_woots); }
foreach($woot_list as &$woot_obj){
echo $woot_obj->message."</td><td>".$woot_obj->timestamp."</td></tr><tr><td>";
}
}
echo "<p>Please click here to <a href=\"#\" onclick=\"history.go(-1)\">go back</a>.";
echo "</td></tr></table>";
?>
</body>
</html>