Browse Source

infos sur les dl a faire/fait

master
Cabillot Julien 6 years ago
parent
commit
64acfdd65d
2 changed files with 85 additions and 4 deletions
  1. 11
      controller/status.php
  2. 78
      templates/status.php

11
controller/status.php

@ -2,6 +2,17 @@
function getStatus()
{
$db = DbMongo::get();
$coll = $db->download;
$listAdded = $coll->find(
['cstate' => 'added']
);
$listDownloading = $coll->find(
['cstate' => 'downloading']
);
$listDownloaded = $coll->find(
['cstate' => 'downloaded']
);
$infos = PremiumizeMe::getStatus();
include dirname(__FILE__).'/../templates/status.php';
}

78
templates/status.php

@ -6,9 +6,79 @@
</script>
</head>
<body>
Expiration : <?= $infos['expires']->format('H:i d.m.Y') ?><br>
Traffic Restant : <?= intval($infos['trafficleft_gigabytes']) ?>Go (<?= intval($infos['fairuse_left'] * 100) ?>%)<br>
<textarea id="urls" name="urls" style="margin: 0px; width: 985px; height: 401px;"></textarea><br>
<input type="button" id="sub" name="sub" value="submit" onclick="javascript:subURL();">
Expiration : <?= $infos['expires']->format('H:i d.m.Y') ?><br>
Traffic Restant : <?= intval($infos['trafficleft_gigabytes']) ?>Go (<?= intval($infos['fairuse_left'] * 100) ?>%)<br>
<textarea id="urls" name="urls" style="margin: 0px; width: 985px; height: 401px;"></textarea><br>
<input type="button" id="sub" name="sub" value="submit" onclick="javascript:subURL();"><br>
Liste des fichiers a traiter :<br>
<table>
<thead>
<tr>
<th>Date</td>
<th>Filename</td>
<th>IP</td>
</tr>
</thead>
<tbody>
<?php
foreach ($listAdded as $result) {
?>
<tr>
<td><?= $result['timestamp']; ?></td>
<td><?= $result['filename']; ?></td>
<td><?= $result['event'][0]['ip']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
Liste des fichiers en cours :<br>
<table>
<thead>
<tr>
<th>Date</td>
<th>Filename</td>
<th>IP</td>
</tr>
</thead>
<tbody>
<?php
foreach ($listDownloading as $result) {
?>
<tr>
<td><?= $result['timestamp']; ?></td>
<td><?= $result['filename']; ?></td>
<td><?= $result['event'][0]['ip']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
Liste des fichiers termin&eacute;s :<br>
<table>
<thead>
<tr>
<th>Date</td>
<th>Filename</td>
<th>IP</td>
</tr>
</thead>
<tbody>
<?php
foreach ($listDownloaded as $result) {
?>
<tr>
<td><?= $result['timestamp']; ?></td>
<td><?= $result['filename']; ?></td>
<td><?= $result['event'][0]['ip']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</body>
</html>
Loading…
Cancel
Save