forked from vlak/sample-app
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.php
More file actions
51 lines (43 loc) · 966 Bytes
/
index.php
File metadata and controls
51 lines (43 loc) · 966 Bytes
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
<?php
include_once('cgi/config.php');
include_once('cgi/common.php');
db_init();
$samples = get_rows('samples');
?>
<html>
<head>
<title>Sample App!</title>
</head>
<body>
<h1>Welcome to Sample App!</h1>
<form action="/cgi/run.php" method="post">
<div>To create random samples, specify sample size below and click on Run!</div>
<div>
<label>Sample Size:</label>
<input type="text" size="20" name="size"/>
</div>
<div>
<input type="submit" value="Run"/>
</div>
</form>
<br/>
<div>Total samples (so far): <b><?php print count($samples); ?></b></div>
<br/>
<div style="overflow-y: auto;height: 400px;">
<table border="1">
<tr>
<th>ID</th>
<th>Value</th>
<th>Created At</th>
</tr>
<?php foreach ($samples as $sample): ?>
<tr>
<td><?php print $sample['id']; ?></td>
<td><?php print $sample['value']; ?></td>
<td><?php print $sample['created_at']; ?></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</body>
</html>