-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathloadmore.php
More file actions
89 lines (77 loc) · 2.37 KB
/
Copy pathloadmore.php
File metadata and controls
89 lines (77 loc) · 2.37 KB
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
<?php
include "inc.default.php"; // should be included in EVERY file
$oSecurity = new security(TRUE);
$strTemplate = $_POST["template"];
$bHasNext = FALSE;
switch($_POST["list"]) {
case "friends":
$oUser = user($_POST["user"]);
$iCurrent = 1;
$iStart = intval($_POST["start"]);
$iStop = intval($_POST["start"]) + intval($_POST["count"]);
foreach ($oUser->friends() as $oFriend) {
if ($iCurrent >= $iStart && $iCurrent < $iStop) {
echo $oFriend->html($strTemplate);
}
if ($iCurrent >= $iStop) $bHasNext = TRUE;
$iCurrent ++;
}
break;
case "payments":
$oUser = user($_POST["user"]);
$iCurrent = 1;
$iStart = intval($_POST["start"]);
$iStop = intval($_POST["start"]) + intval($_POST["count"]);
foreach ($oUser->payments("all") as $oPayment) {
if ($iCurrent >= $iStart && $iCurrent < $iStop) {
echo $oPayment->html($strTemplate);
}
if ($iCurrent >= $iStop) $bHasNext = TRUE;
$iCurrent ++;
}
break;
case "activities":
$iCurrent = 1;
$iStart = intval($_POST["start"]);
$iStop = intval($_POST["start"]) + intval($_POST["count"]);
$oList = new owaeslist();
$oList->filterByUser($_POST["user"]);
foreach ($oList->getList() as $oActivity) {
if ($iCurrent >= $iStart && $iCurrent < $iStop) {
echo $oActivity->html($strTemplate);
}
if ($iCurrent >= $iStop) $bHasNext = TRUE;
$iCurrent ++;
}
break;
case "market":
$iCurrent = 1;
$iStart = intval($_POST["start"]);
$iStop = intval($_POST["start"]) + intval($_POST["count"]);
$oList = new owaeslist();
$oList->filterByGroup($_POST["group"]);
foreach ($oList->getList() as $oActivity) {
if ($iCurrent >= $iStart && $iCurrent < $iStop) {
echo $oActivity->html($strTemplate);
}
if ($iCurrent >= $iStop) $bHasNext = TRUE;
$iCurrent ++;
}
break;
case "members":
$iCurrent = 1;
$iStart = intval($_POST["start"]);
$iStop = intval($_POST["start"]) + intval($_POST["count"]);
$oGroup = group($_POST["group"]);
foreach ($oGroup->users() as $oUser) {
if ($iCurrent >= $iStart && $iCurrent < $iStop) {
echo $oUser->html($strTemplate);
}
if ($iCurrent >= $iStop) $bHasNext = TRUE;
$iCurrent ++;
}
break;
default:
}
if (!$bHasNext) echo ("<!-- EOL -->");
?>