1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
Daniel Neto 2023-07-03 16:54:37 -03:00
parent fcf782cbb5
commit 8c9c5d239e
3 changed files with 44 additions and 47 deletions

View file

@ -25,55 +25,50 @@ foreach ($rows as $key => $value) {
$chartDataCount[] = $value['count'];
}
?>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="panel">
<div class="panel-body">
<canvas id="rewardChart" style="width:100%; height:400px;"></canvas>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading" style="height: 70px;">
<h1><?php echo __('Reward'); ?></h1>
</div>
<div class="col-md-12">
<div class="panel">
<div class="panel-body">
<table class="table table-striped">
<thead>
<tr>
<th>Watched Date</th>
<th>Reward</th>
<th>Views</th>
<th>Videos</th>
</tr>
</thead>
<tbody>
<?php
$reversedRows = array_reverse($rows);
<div class="panel">
<div class="panel-body">
<canvas id="rewardChart" style="width:100%; height:400px;"></canvas>
</div>
<div class="panel-footer">
<table class="table table-striped">
<thead>
<tr>
<th>Watched Date</th>
<th>Reward</th>
<th>Views</th>
<th>Videos</th>
</tr>
</thead>
<tbody>
<?php
$reversedRows = array_reverse($rows);
foreach ($reversedRows as $row) {
echo '<tr>';
echo '<td>' . $row['date_hour'] . '</td>';
echo '<td>' . YPTWallet::formatCurrency($row['reward']) . '</td>';
echo '<td>' . $row['count'] . '</td>';
echo '<td>';
$records = array();
foreach ($row['data'] as $key => $recordData) {
$link = Video::getLinkToVideo($recordData['videos_id']);
$records[] = "".($key+1)." - <a href=\"{$link}\" target=\"_blank\">[{$recordData['record_created']}] ".strip_tags($recordData['title'])."</a>";
}
echo implode('<br>', $records);
echo '</td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
foreach ($reversedRows as $row) {
echo '<tr>';
echo '<td>' . $row['date_hour'] . '</td>';
echo '<td>' . YPTWallet::formatCurrency($row['reward']) . '</td>';
echo '<td>' . $row['count'] . '</td>';
echo '<td>';
$records = array();
foreach ($row['data'] as $key => $recordData) {
$link = Video::getLinkToVideo($recordData['videos_id']);
$records[] = "" . ($key + 1) . " - <a href=\"{$link}\" target=\"_blank\">[{$recordData['record_created']}] " . strip_tags($recordData['title']) . "</a>";
}
echo implode('<br>', $records);
echo '</td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="<?php echo getURL('node_modules/chart.js/dist/chart.umd.js'); ?>" type="text/javascript"></script>

View file

@ -285,10 +285,8 @@ class VideosStatistics extends PluginAbstract {
$obj->totalLikes += $video->total_likes;
$obj->totalDislikes += $video->total_dislikes;
}
} else {
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
}
if (!empty($obj->videos)) {
usort(
$obj->videos,

View file

@ -52,6 +52,10 @@ if (!empty($_GET['users_id'])) {
</div>
<?php
if(AVideoPlugin::isEnabledByName('MonetizeUsers')){
include $global['systemRootPath'] . 'plugin/MonetizeUsers/View/report.php';
}
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>