-
Notifications
You must be signed in to change notification settings - Fork 1
/
RDS.html
71 lines (70 loc) · 3.45 KB
/
RDS.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="rds.css"/>
<title>RDS Parser</title>
<script type="text/javascript">
function setcountry(country)
{
var data = JSON.parse(country);
document.getElementById("cid").value = data.cid;
document.getElementById("tabcd").value = data.tabcd;
}
function setinput(type)
{
document.getElementById("field_text").style.display = (type == "text" ? "block" : "none");
document.getElementById("field_url").style.display = (type == "url" ? "block" : "none");
document.getElementById("field_file").style.display = (type == "file" ? "block" : "none");
document.getElementById("text").disabled = (type == "text" ? "" : "disabled");
document.getElementById("url").disabled = (type == "url" ? "" : "disabled");
document.getElementById("file").disabled = (type == "file" ? "" : "disabled");
}
</script>
</head>
<body>
<h1>RDS Parser</h1>
<form method="POST" action="rdsparse.php" enctype="multipart/form-data">
<fieldset>
<legend>TMC location table to use</legend>
<select name="country" id="country" onchange="setcountry(this.options[this.selectedIndex].value)">
<option value='{"cid":6, "tabcd":1}'>Belgium</option>
<option value='{"cid":15, "tabcd":17}'>Finland</option>
<option value='{"cid":16, "tabcd":32}'>France</option>
<option value='{"cid":58, "tabcd":1}' selected="selected">Germany</option>
<option value='{"cid":25, "tabcd":1}'>Italy</option>
<option value='{"cid":40, "tabcd":49}'>Norway</option>
<option value='{"cid":49, "tabcd":17}'>Spain</option>
<option value='{"cid":50, "tabcd":33}'>Sweden</option>
</select>
<input type="hidden" name="cid" id="cid" value="58"/>
<input type="hidden" name="tabcd" id="tabcd" value="1"/>
</fieldset>
<fieldset>
<legend>Input format</legend>
<input type="radio" name="format" id="format_hex" value="hex" checked="checked"/><label for="format_hex">Hex (one group / four 16-bit blocks / 8 bytes per line)</label><br/>
<input type="radio" name="format" id="format_bit" value="bit"/><label for="format_bit">ASCII bit stream (sequence of ASCII 0 and 1)</label><br/>
<input type="radio" name="format" id="format_byte" value="byte"/><label for="format_byte">Binary bit stream (sequence of bits in packed form)</label>
</fieldset>
<fieldset>
<legend>Input type</legend>
<input type="radio" name="input" id="input_text" value="text" checked="checked" onclick="setinput('text')"/><label for="input_text">Direct text input</label><br/>
<input type="radio" name="input" id="input_url" value="url" onclick="setinput('url')"/><label for="input_url">Load from URL</label><br/>
<input type="radio" name="input" id="input_file" value="file" onclick="setinput('file')"/><label for="input_file">Upload file</label>
</fieldset>
<fieldset id="field_text" style="display:block">
<legend>Text input</legend>
<textarea name="text" id="text" cols="50" rows="10"></textarea>
</fieldset>
<fieldset id="field_url" style="display:none">
<legend>Load from URL</legend>
<input type="url" name="url" id="url" size="50" disabled="disabled"/>
</fieldset>
<fieldset id="field_file" style="display:none">
<legend>Upload file</legend>
<input type="file" name="file" id="file" disabled="disabled"/>
</fieldset>
<input type="submit" value="Parse"/>
</form>
</body>
</html>