123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <html>
- <?php include("header.php") ?>
- <style type="text/css">
- </style>
- <div id="message-center"></div>
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.bundle.min.js"></script>
- <div style="width: 70%; margin-left: auto; margin-right: auto;">
- <canvas id="canvas"></canvas>
- </div>
- <div style="clear: both;">
- <table style="margin: auto; width: 70%;">
- <?php foreach($activity_log as $record) : ?>
- <tr>
- <td>
- <?=$record['message']?> on <?=$record['recordtime']?>
- </td>
- </tr>
- <?php endforeach; ?>
- </table>
- </div>
- <script>
- window.chartColors = {
- red: 'rgb(255, 99, 132)',
- orange: 'rgb(255, 159, 64)',
- yellow: 'rgb(255, 205, 86)',
- green: 'rgb(75, 192, 192)',
- blue: 'rgb(54, 162, 235)',
- purple: 'rgb(153, 102, 255)',
- grey: 'rgb(201, 203, 207)'
- };
- var config = {
- type: 'line',
- data: {
- labels: ["<?=implode("\", \"", $last_seven_days)?>"],
- datasets: [
- /*{
- label: "Admin Logins",
- backgroundColor: window.chartColors.blue,
- borderColor: window.chartColors.blue,
- data: [<?=implode(", ", $admin_logins)?>],
- fill: false,
- }, {
- label: "Client Logins",
- fill: false,
- backgroundColor: window.chartColors.green,
- borderColor: window.chartColors.green,
- data: [<?=implode(", ", $client_logins)?>],
- },*/
- {
- label: "User Logins",
- fill: false,
- backgroundColor: window.chartColors.blue,
- borderColor: window.chartColors.blue,
- data: [<?=implode(", ", $user_logins)?>],
- },
- {
- label: "Failed Logins",
- fill: false,
- backgroundColor: window.chartColors.red,
- borderColor: window.chartColors.red,
- data: [<?=implode(", ", $failed_logins)?>],
- }]
- },
- options: {
- responsive: true,
- title:{
- display:true,
- text:'User Activity'
- },
- tooltips: {
- mode: 'index',
- intersect: false,
- },
- hover: {
- mode: 'nearest',
- intersect: true
- },
- scales: {
- xAxes: [{
- display: true,
- scaleLabel: {
- display: true,
- labelString: 'Last Week'
- }
- }],
- yAxes: [{
- display: true,
- scaleLabel: {
- display: true,
- labelString: 'Logins'
- },
- ticks: {
- beginAtZero: true
- }
- }]
- }
- }
- };
- window.onload = function() {
- var ctx = document.getElementById("canvas").getContext("2d");
- window.myLine = new Chart(ctx, config);
- };
- var colorNames = Object.keys(window.chartColors);
- </script>
- <script type="text/javascript">
- document.addEventListener("DOMContentLoaded", function() {
- <?php foreach($abandoned_uploads as $upload): ?>
- showUnfinishedUploadDialog(<?=$upload['project_id']?>, "<?=$upload['project_name']?>", "<?=$upload['upload_timestamp']?>", <?=$upload['count']?>);
- <?php endforeach; ?>
- <?php if($superadmin): ?>
- superadminNotice();
- <?php endif; ?>
- });
- </script>
- </body>
- </html>
|