-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebinterface_template.html
executable file
·78 lines (73 loc) · 1.88 KB
/
webinterface_template.html
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
<html>
<style>
table, th, td {
border: 1px solid black;
padding: 5px;
}
th, td {
text-align: center;
}
html, body {
height: 100%;
}
html {
display: table;
margin: auto;
}
body {
display: table-cell;
vertical-align: middle;
}
</style>
<body>
<iframe name="dummyframe" id="dummyframe" style="display: none;"></iframe>
<h2>Weapons</h2>
<form action="/weapon" method="GET" target="dummyframe">
<table>
<tr>
<th>Weapon</th>
<th>Ammo</th>
<th>Click to Get</th>
</tr>
<tr>
<td>
<select name="weaponid">
{{ range .Weapons }}
<option value="{{ .AsInt }}">{{ .String }}</option>
{{ end }}
</select>
</td>
<td><input type="number" name="ammo" min="1" max="9999" value="1000"/></td>
<td><input type="submit" value="Get"/></td>
</tr>
</table>
</form>
<h2>Vehicle Spawner</h2>
<form action="/spawn" method="GET" target="dummyframe">
<table>
<tr>
<th>Vehicle ID</th>
<th>Vehicle Name</th>
<th>Click to Spawn</th>
</tr>
<tr>
<td>
<select id="veh1" onchange="veh2.value=this.value;" name="vehicleid">
{{ range .Vehicles }}
<option value="{{ .AsInt }}">{{ .AsInt }}</option>
{{ end }}
</select>
</td>
<td>
<select id="veh2" onchange="veh1.value=this.value;">
{{ range .Vehicles }}
<option value="{{ .AsInt }}">{{ .String }}</option>
{{ end }}
</select>
</td>
<td><input type="submit" value="Spawn"/></td>
</tr>
</table>
</form>
</body>
</html>