Browse Source

correct indent

master
Cabillot Julien 5 years ago
parent
commit
ed72926ac8
2 changed files with 79 additions and 140 deletions
  1. 63
      root/css/admin.css
  2. 156
      templates/status.php

63
root/css/admin.css

@ -14,7 +14,7 @@ h1 {
font-size: 22px;
}
div.warning {
div.account {
background: #DA4336;
color: #FEFCFC;
padding: 0.5em;
@ -27,68 +27,7 @@ div.warning {
height: 3em;
}
div.contenu {
margin-left: 1em;
margin-top: 5em;
}
div.cont1 {
display: inline-block;
width: 100%;
height: 80px;
}
div.extension {
background: white;
float: left;
text-align: center;
padding-top: 0.8em;
padding-bottom: 0.8em;
padding-left: 2em;
padding-right: 2em;
margin-left: 3%;
border: 1px solid rgb(230, 230, 230);
height: inherit;
}
div.extension img {
margin-left: 1em;
margin-right: 1em;
margin-top: 0.5em;
}
div.script {
background: white;
float: left;
text-align: center;
padding-top: 0.8em;
padding-bottom: 0.8em;
padding-left: 2em;
padding-right: 2em;
margin-left: 5%;
border: 1px solid rgb(230, 230, 230);
height: inherit;
}
div.mybtn {
margin-top: 1.2em;
}
a.btn {
box-shadow: 1px 1px 1px rgba(102, 102, 102, 0.25);
color: rgb(254, 254, 254);
background: #fa963f;
padding: 10px 20px 10px 20px;
}
/* Page d'admin */
div.account {
background-color: #ffa726;
text-align: center;
margin-bottom: 1em;
color: #FEFCFC;
}
div.addMulti {
margin-bottom: 1em;
text-align: center;

156
templates/status.php

@ -10,33 +10,33 @@
<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 class="account">
<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="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&eacute;</td>
</tr>
</table>
</div>
<table class="listdl">
<thead>
<tr>
<th>Date</th>
<th>Filename</th>
</tr>
</thead>
<tbody>
<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&eacute;</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) {
@ -46,83 +46,83 @@ foreach([ 'added' => $listAdded, 'downlading' => $listDownloading, 'downloaded'
$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>
<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>
</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>
<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>
<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>
</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>
<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>
<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>
</tbody>
</table>
<input type="button" value="Wipe" onClick="javascript:wipe('stream', 'finished');">
</div>
<?php
}
?>

Loading…
Cancel
Save