@@ 100-118 (lines=19) @@ | ||
97 | $maToday = $admin->mostactiveusers_today(); |
|
98 | $count = !empty($maToday) ? count($maToday['cnt']) : 0; |
|
99 | $mat_cnt = 0; |
|
100 | if (0 !== $count) { |
|
101 | $mat_cnt = 1; |
|
102 | $mat = "<table class='smallworldadmin'><tr>\n" |
|
103 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_POS . "</td>\n" |
|
104 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_IMG . "</td>\n" |
|
105 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_AMOUNT . "</td>\n" |
|
106 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_NAME . "</td></tr>\n"; |
|
107 | $i = 1; |
|
108 | while ($i <= $count) { |
|
109 | $mat .= vsprintf('<tr><td>%s</td>', [$maToday['counter'][$i]]); |
|
110 | $mat .= vsprintf('<td>%s</td>', [$maToday['img'][$i]]); |
|
111 | $mat .= vsprintf('<td>%s</td>', [$maToday['cnt'][$i]]); |
|
112 | $mat .= vsprintf('<td>%s</td></tr>', [$maToday['from'][$i]]); |
|
113 | ++$i; |
|
114 | } |
|
115 | $mat .= "</tr></table>\n"; |
|
116 | } else { |
|
117 | $mat = 0; |
|
118 | } |
|
119 | // FInd list of best rated users overall |
|
120 | $topusers = $admin->topratedusers('up'); |
|
121 | $count = !empty($topusers) ? count($topusers['cnt']) : 0; |
|
@@ 123-141 (lines=19) @@ | ||
120 | $topusers = $admin->topratedusers('up'); |
|
121 | $count = !empty($topusers) ? count($topusers['cnt']) : 0; |
|
122 | $top_cnt = 0; |
|
123 | if (0 !== $count) { |
|
124 | $top_cnt = 1; |
|
125 | $top = "<table class='smallworldadmin'><tr>\n" |
|
126 | . " <td class='bold'>" . _AM_SMALLWORLD_STATS_POS . "</td>\n" |
|
127 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_IMG . "</td>\n" |
|
128 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_AMOUNT . "</td>\n" |
|
129 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_NAME . "</td></tr>\n"; |
|
130 | $i = 1; |
|
131 | while ($i <= $count) { |
|
132 | $top .= vsprintf('<tr><td>%s</td>', [$topusers['counter'][$i]]); |
|
133 | $top .= vsprintf('<td>%s</td>', [$topusers['img'][$i]]); |
|
134 | $top .= vsprintf('<td>%s</td>', [$topusers['cnt'][$i]]); |
|
135 | $top .= vsprintf('<td>%s</td></tr>', [$topusers['user'][$i]]); |
|
136 | ++$i; |
|
137 | } |
|
138 | $top .= "</tr></table>\n"; |
|
139 | } else { |
|
140 | $top = 0; |
|
141 | } |
|
142 | ||
143 | // FInd list of worst rated users overall |
|
144 | $lowusers = $admin->topratedusers('down'); |
|
@@ 147-165 (lines=19) @@ | ||
144 | $lowusers = $admin->topratedusers('down'); |
|
145 | $low_cnt = 0; |
|
146 | $count = !empty($lowusers) ? count($lowusers['cnt']) : 0; |
|
147 | if (0 !== $count) { |
|
148 | $low_cnt = 1; |
|
149 | $low = "<table class='smallworldadmin'><tr>\n" |
|
150 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_POS . "</td>\n" |
|
151 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_IMG . "</td>\n" |
|
152 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_AMOUNT . "</td>\n" |
|
153 | . "<td class='bold'>" . _AM_SMALLWORLD_STATS_NAME . "</td></tr>\n"; |
|
154 | $i = 1; |
|
155 | while ($i <= $count) { |
|
156 | $low .= vsprintf('<tr><td>%s</td>', [$lowusers['counter'][$i]]); |
|
157 | $low .= vsprintf('<td>%s</td>', [$lowusers['img'][$i]]); |
|
158 | $low .= vsprintf('<td>%s</td>', [$lowusers['cnt'][$i]]); |
|
159 | $low .= vsprintf('<td>%s</td></tr>', [$lowusers['user'][$i]]); |
|
160 | ++$i; |
|
161 | } |
|
162 | $low .= "</tr></table>\n"; |
|
163 | } else { |
|
164 | $low = 0; |
|
165 | } |
|
166 | ||
167 | //----------------------- |
|
168 |