forked from purplapp/purplapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pca.php
302 lines (223 loc) Β· 6 KB
/
pca.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE html>
<html>
<head>
<?php
$c=$_GET[cd];
$c++;
$id=$_GET["id"];
if(!$id){ $id="@charl";}elseif($id==""){echo "";
$id="@charl";
}
if ($id[0]!="@"){ $id="@".$id;}
?>
<title>PCA Information for <? echo $id; ?></title>
<meta name="description" content="Purplapp is an app.net app for stats. Here is the page for post count stats.">
<meta name="keywords" content="appdotnet,ADN,app.net,app,pca,clubs">
<meta name="author" content="Charl Dunois">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
//require config.php
require('config.php');
//Use the access token
$json = file_get_contents('https://alpha-api.app.net/stream/0/users/'.$id.'?access_token='.ACCESS_TOKEN.'&include_user_annotations=1?callback=awesome?jsonp=parseResponse');
$obj = json_decode($json);
$posts=$obj->data->counts->posts;
$userID=$obj->data->username;
?>
<link rel="stylesheet" type="text/css" href="css/pca.css" />
</head>
<body>
<div id="divMain">
<h1>
<span id="myData">
<?php
echo $obj->data->name;
?>
</span>
</h1>
<!--Avatar Image-->
<img class="avatar" src="<?php echo $obj->data->avatar_image->url; ?>" alt="avatar" width="180" height="180"/>
<!--Cover Image-->
<img class="cover" src="<?php echo $obj->data->cover_image->url; ?>" alt="cover" height="180" />
<!--Follow Icon-->
<div id="follow">
<div class="sub"></div>
<iframe src="http://adnbtns.com/adn-btn.html?user=<?php echo $obj->data->username; ?>&size=large&align=center" allowtransparency="true" frameborder="0" scrolling="0" width="280" height="30" ></iframe>
<br>
</div>
<!--Search Box-->
<form name="form1" method="GET" action="">
<p>
<input name="id" type="text" id="id" value="<?php echo $id ?>">
<input type="submit" name="send" id="send" value="Check">
</p>
</form>
<!--Post Count Achievements-->
<p class="pca">
<a class="pca" href="http://appdotnetwiki.net/w/index.php?title=Post_Count_Achievements">PCA Clubs:</a>
<br><br>
<?php
if ($c > 80211) { $posts=$c;}
$type = $obj->data->type;
if ($posts == 0) {
echo "No Posts";
}
if ($posts < 500 AND $posts > 0) {
echo "No Clubs! Next Club: π ";
}
if ($posts > 500) {
echo "π ";}else{ echo "";
}
if ($posts > 1000) {
echo "π° ";}else{ echo "";
}
if ($posts > 2000) {
echo "π₯ ";}else{ echo "";
}
if ($posts > 2600) {
echo "βοΈ ";}else{ echo "";
}
if ($posts > 3000) {
echo "π ";}else{ echo "";
}
if ($posts > 5000) {
echo "π ";}else{ echo "";
}
if ($posts > 8088) {
echo "π» ";}else{ echo "";
}
if ($posts > 10000) {
echo "πͺ ";}else{ echo "";
}
if ($posts > 11000) {
echo "π ";}else{ echo "";
}
if ($posts > 20000) {
echo "π³ ";}else{ echo "";
}
if ($posts > 24000) {
echo "π ";}else{ echo "";
}
if ($posts > 25000) {
echo "π ";}else{ echo "";
}
if ($posts > 30000) {
echo "βοΈ ";}else{ echo "";
}
if ($posts > 31416) {
echo "β ";}else{ echo "";
}
if ($posts > 42000) {
echo "π³ ";}else{ echo "";
}
if ($posts > 50000) {
echo "π· ";}else{ echo "";
}
if ($posts > 57000) {
echo "π ";}else{ echo "";
}
if ($posts > 64000) {
echo "π± ";}else{ echo "";
}
if ($posts > 76000) {
echo "πΆ ";}else{ echo "";
}
if ($posts > 80211) {
echo "πΆ ";}else{ echo "";
}
if ($posts > 90000) {
echo "π· ";}else{ echo "";
}
if ($posts > 100000) {
echo "πΌ ";}else{ echo "";
}
if ($posts > 500) {
echo "<hr>";
}
echo "</a>";
?>
<p class="pca">
The Main PCA Clubs:
<br><br>
<?php
if ($c > 80211) { $posts=$c;}
$type = $obj->data->type;
if ($posts == 0) {
echo "No Posts";
}
if ($posts > 10000) {
echo "πͺ ";}else{ echo "";
}
if ($posts > 11000) {
echo "π ";}else{ echo "";
}
if ($posts > 20000) {
echo "π³ ";}else{ echo "";
}
if ($posts > 24000) {
echo "π ";}else{ echo "";
}
if ($posts > 25000) {
echo "π ";}else{ echo "";
}
if ($posts > 30000) {
echo "βοΈ ";}else{ echo "";
}
if ($posts > 31416) {
echo "β ";}else{ echo "";
}
if ($posts > 42000) {
echo "π³ ";}else{ echo "";
}
if ($posts > 50000) {
echo "π· ";}else{ echo "";
}
if ($posts > 57000) {
echo "π ";}else{ echo "";
}
if ($posts > 64000) {
echo "π± ";}else{ echo "";
}
if ($posts > 76000) {
echo "πΆ ";}else{ echo "";
}
if ($posts > 80211) {
echo "πΆ ";}else{ echo "";
}
if ($posts > 90000) {
echo "π· ";}else{ echo "";
}
if ($posts > 100000) {
echo "πΌ ";}else{ echo "";
}
if ($posts > 500) {
echo "<hr>";
}
echo "</a>";
?>
<p class="credits">
Built by <a href="https://app.net/charl">@charl<a/>.
<br>
Hosted by <a href="http://jvimedia.org">jvimedia.org</a>.
<br>
If you want to see more info, check out <a href="/posts.php?u=<?php echo $userID?>">posts.php</a> instead.
</p>
</div>
</body>
</html>
<?php
function percentage($val1, $val2, $precision)
{
$division = $val1 / $val2;
$res = $division * 100;
$res = round($res, $precision);
return $res;
}
function echo_img($url) {
echo "<img src=\"$url\" alt=\"
\"/>";
}
function linker($at,$id) {
echo "<a href=\"./posts?id=".$id."&".$at."\">";
}
?>