You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
4.2 KiB
131 lines
4.2 KiB
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
<title>Admin</title>
|
|
<link rel="icon" type="image/png" href="/img/favicon.png">
|
|
<link rel="stylesheet" href="/css/admin.css">
|
|
<link href='//fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
|
|
<script type="text/javascript" src="/js/jquery-2.1.1.min.js"></script>
|
|
<script type="text/javascript" src="/js/my.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="warning">
|
|
<b>Expiration :</b> <?= $infos['expires']->format('d/m/Y') ?> (<?= $restant ?>)<br>
|
|
<b>Traffic Restant :</b> <?= intval($infos['trafficleft_gigabytes']) ?>Go (<?= intval($infos['fairuse_left'] * 100) ?>%)<br>
|
|
</div>
|
|
<div class="addMulti">
|
|
<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>
|
|
</div>
|
|
<div class="list">
|
|
<div class="">
|
|
<table>
|
|
<tr>
|
|
<td class="added">Ajouté</td>
|
|
<td class="downloading">En cours</td>
|
|
<td class="downloaded">Fini</td>
|
|
<td class="dupp">Duppliqué</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<table class="listdl">
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Filename</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
foreach([ 'added' => $listAdded, 'downlading' => $listDownloading, 'downloaded' => $listDownloaded, 'dupp' => $listDupp ] as $catName => $cat) {
|
|
foreach($cat as $element) {
|
|
if ($element['href']) {
|
|
$nameLink = '<a href="/downloaded/'.$element['filename'].'">'.$element['filename'].'</a>';
|
|
} else {
|
|
$nameLink = $element['filename'];
|
|
}
|
|
?>
|
|
<tr class="<?= $element['cstate']; ?>">
|
|
<td><?= $element['time']->format('d/m/Y'); ?></td>
|
|
<td><?= $nameLink; ?></td>
|
|
<td>
|
|
<img src="/img/ip.png" height=16 width=16 title="<?= $element['event'][0]['ip']; ?>" alt="<?= $element['event'][0]['ip']; ?>">
|
|
<a href="<?= $element['url']; ?>"><img src="/img/link.png" height=16 width=16></a>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<?php
|
|
if (!empty($streamBegin)) {
|
|
?>
|
|
<div class="$streamBegin">
|
|
Stream en cours ou non fini : <br>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Filename</th>
|
|
<th>IP</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
foreach ($streamBegin as $result) {
|
|
?>
|
|
<tr>
|
|
<td><?= $result['time']->format('d/m/Y'); ?></td>
|
|
<td><?= $result['filename']; ?></td>
|
|
<td><?= $result['ip']; ?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<input type="button" value="Wipe" onClick="javascript:wipe('stream', 'begin');">
|
|
</div>
|
|
<?php
|
|
}
|
|
|
|
if (!empty($streamFinished)) {
|
|
?>
|
|
<div class="streamFinished">
|
|
Stream fini : <br>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Filename</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
foreach ($streamFinished as $result) {
|
|
# TODO : dans l'IP, ajouter le resolv
|
|
?>
|
|
<tr>
|
|
<td><?= $result['time']->format('d/m/Y'); ?></td>
|
|
<td>
|
|
<img src="/img/ip.png" height=16 width=16 title="<?= $result['ip']; ?>" alt="<?= $result['ip']; ?>">
|
|
<a href="<?= $result['url']; ?>"><img src="/img/link.png" height=16 width=16></a>
|
|
<?= $result['filename']; ?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<input type="button" value="Wipe" onClick="javascript:wipe('stream', 'finished');">
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
</body>
|
|
</html>
|