forked from gemini-admin/sample-app
/
index.php
84 lines (77 loc) · 2.6 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
include_once('cgi/config.php');
include_once('cgi/common.php');
db_init();
$samples = get_rows('samples');
?>
<html lang="en">
<head>
<title>Data Generator App!</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet" >
<link href="css/themes/<?php echo $theme ?>.css" rel="stylesheet" >
</head>
<body>
<div class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a href="/" class="navbar-brand">Data Generator App!!!</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse" id="navbar-main">
<ul class="nav navbar-nav">
<li>
<a href="#">Home</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Build <?php include "info.txt" ?></a></li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="page-header">
<h1>Sample App!</h1>
<p class="lead">Data Generator App Demo for DevOps</p>
</div>
<h3>Sample Data</h3>
<p>To create random samples, specify sample size and click on Run!</p>
<div class="row">
<div class="col-md-6">
<form action="/cgi/run.php" method="post" class="form-inline">
<label for="size">Sample Size:</label>
<input id="size" class="form-control" type="text" size="20" name="size" required="" />
<input type="submit" value="Run" class="form-control btn btn-primary"/>
</form>
</div>
<div class="col-md-6"></div>
</div>
<table class="table table-hover">
<caption>Total samples (so far): <b><?php print count($samples); ?></b></caption>
<thead>
<tr>
<th>ID</th>
<th>Value</th>
<th>Created At</th>
</tr>
</thead>
<tbody>
<?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; ?>
<tbody>
</table>
</div>
</body>
</html>