-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
57 lines (51 loc) · 1.64 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
require 'functions.php';
session_start();
?><!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Scan</title>
</head>
<body>
<form id="form" action="start.php" method="post">
<p>
<label>
Format:
<select name="format">
<?php foreach ($formats as $format => $values): ?>
<option><?php echo $format; ?></option>
<?php endforeach ?>
</select>
</label>
</p>
<p>
<label>
Resolution:
<select name="resolution">
<option>100</option>
<option selected>200</option>
<option>400</option>
<option>600</option>
<option>1200</option>
</select>
</label>
</p>
<input type="submit" name="scan" value="Scan">
</form>
<p>Status: <span id="status-step">Idle</span></p>
<p id="progress" style="transition: 0.5s all linear; box-sizing: border-box; padding: 5px; color: white; background: green; display: none"></p>
<a target="_blank" id="url" style="display:none">Download</a>
<table>
<caption>Past jobs</caption>
<tr>
<?php foreach($_SESSION['ids'] as $id): if (!($status = get_status($id))) continue; ?>
<td><a <?php if (isset($status['url'])) echo 'href="'.$status['url'].'"'; ?>><?php echo $id ?></a></td>
<td><?php echo $status['step']; ?></td>
</tr>
<?php endforeach ?>
</table>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="script.js"></script>
</body>
</html>