-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (61 loc) · 2.12 KB
/
index.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
<html>
<head>
<style type="text/css">
body {margin-left: 5% ; margin-right: 5%; margin-top: 0.5in;
font-family: verdana, arial,"trebuchet ms", helvetica, sans-serif;}
ul {list-style: disc;}
</style>
<title>App Inventor Database</title>
</head>
<body>
<h2>App Inventor (TinyWebDB) Web Database Service</h2>
<table border=0>
<tr valign="top">
<td><image src="/images/customLogo.gif" width="200" hspace="10"></td>
<td>
<p>
This web service stores and retrieves values for an <a
href="http://appinventor.googlelabs.com">App Inventor
for Android</a> app. App Inventor apps can access this service using the TinyWebDB component and setting the ServiceURL to the URL of this site. </p>
</td> </tr>
</table>
<h3> Search database for a tag</h3>
<form action="/getvalue" method="post"
enctype=application/x-www-form-urlencoded>
<p>Tag:<input type="text" name="tag" /></p>
<input type="hidden" name="fmt" value="html">
<input type="submit" value="Get value">
</form>
Returned as value to TinyWebDB component:
<b>{{result}}</b>
<br/>
<h3>Store a tag-value pair in the databse</h3>
<form action="/storeavalue" method="post"
enctype=application/x-www-form-urlencoded>
<p>Tag: <input type="text" name="tag" size="30"/></p>
<p>Value: <input type="text" name="value" size="30"/></p>
<input type="hidden" name="fmt" value="html">
<input type="submit" value="Store a value">
</form>
<br/>
<table border=1>
<tr>
<th>Key</th>
<th>Value</th>
<th>Created (GMT)</th>
</tr>
{% for entry in entryList %}
<tr>
<td>{{entry.tag}}</td>
<td>{{entry.value}}</td>
<td><font size="-1">{{entry.date}}</font></td>
<td><form action="/deleteentry" method="post"
enctype=application/x-www-form-urlencoded>
<input type="hidden" name="entry_key_string" value="{{entry.key}}">
<input type="hidden" name="tag" value="{{entry.tag}}">
<input type="hidden" name="fmt" value="html">
<input type="submit" style="background-color: red" value="Delete"></form></td>
</tr>
{% endfor %}
</table>
</body></html>