-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48df3e6
commit 8b4caec
Showing
41 changed files
with
307 additions
and
914 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"title": "Рейтинг активности за сутки", | ||
"description": "Страница с рейтингом активности пользователей Serey за сутки", | ||
"in_menu": "Активность", | ||
"category": "reytings" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php if (!defined('NOTLOAD')) exit('No direct script access allowed'); | ||
global $conf; | ||
$html = file_get_contents('http://178.20.43.121:3179/serey-api?service=activity_stats'); | ||
$table = json_decode($html, true); | ||
$content = '<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css"> | ||
<script type="text/javascript" src="//cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script> | ||
<p>Все данные удаляются в полночь по Москве. Иногда возможно будет пропускать, но чаще всего нет.</p> | ||
<table id="table"><thead><tr><th>Логин</th><th>Постов и комментариев</th><th>Количество флагов</th><th>Количество апвоутов</th><th>Средний процент флага</th><th>Средний процент апа</th></tr></thead><tbody id="target">'; | ||
if ($table) { | ||
foreach ($table as $user) { | ||
if ($user['flags'] > 0) { | ||
$average_flags_weight = $user['all_flags_weight'] / $user['flags']; | ||
$average_flags_weight /= 100; | ||
} else { | ||
$average_flags_weight = 0; | ||
} | ||
if ($user['upvotes'] > 0) { | ||
$average_upvotes_weight = $user['all_upvotes_weight'] / $user['upvotes']; | ||
$average_upvotes_weight /= 100; | ||
} else { | ||
$average_upvotes_weight = 0; | ||
} | ||
$content .= '<tr align="right"><td align="left"><a href="'.$conf['siteUrl'].'serey/profiles/'.$user['login'].'" target="_blank">'.$user['login'].'</a></td> | ||
<td>'.$user['content'].'</td> | ||
<td>'.$user['flags'].'</td> | ||
<td>'.$user['upvotes'].'</td> | ||
<td>'.$average_flags_weight.'</td> | ||
<td>'.$average_upvotes_weight.'</td></tr>'; | ||
} | ||
} | ||
$content .= '</tbody></table> | ||
<script src="'.$conf['siteUrl'].'blockchains/serey/apps/activities/sort.js"></script>'; | ||
return $content; | ||
?> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$(document).ready(function() { | ||
$('#table').DataTable( { | ||
"language": { | ||
"decimal": ",", | ||
"thousands": ".", | ||
"url": "//cdn.datatables.net/plug-ins/1.10.20/i18n/Russian.json" | ||
}, | ||
"iDisplayLength": 50, | ||
"order": [[ 1, "desc" ], [ 2, "desc" ], [ 3, "desc" ], [ 4, "desc" ], [ 5, "desc" ]], | ||
"aoColumns": [ | ||
null, | ||
{ "orderSequence": [ "desc" ] }, | ||
{ "orderSequence": [ "desc" ] }, | ||
{ "orderSequence": [ "desc" ] }, | ||
{ "orderSequence": [ "desc" ] }, | ||
{ "orderSequence": [ "desc" ] } | ||
], | ||
"aoColumnDefs": [ | ||
{ 'bSortable': false, 'aTargets': [ 0 ] } | ||
], | ||
} ); | ||
}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.