-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·92 lines (69 loc) · 2.85 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html>
<head>
<title>LBFS</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css"
integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"
integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script>
</head>
<body>
<header>
<h1>Location Based File Sharing</h1>
</header>
<main>
<div class="left-box">
<!-- This is the controls and display for grabbing user location -->
<div class="location-container">
<button class="button-enter" onclick="getLocation()">Get Location</button>
<div class="location" id="location"></div>
</div>
<!-- The map display -->
<!-- html code modified from OpenStreetMap share button, -->
<!-- suggested by https://wiki.openstreetmap.org/wiki/Export#Embeddable_HTML -->
<div class="map" id="map"></div>
<small><a id="osm-link" href="https://www.openstreetmap.org/#map=18/39.17294/-86.52328">View Larger
Map</a></small>
</div>
<!-- Everything inside right-box is still barely developed, go ahead and modify -->
<div class="right-box">
<button onclick="addEntry()">Add Entry</button>
<div id="entry-container">
<!-- File entries are added here -->
</div>
</div>
</main>
<!-- This template is used by the addEntry() function -->
<template id="entry-template">
<!-- The entry is intended to have a toggleable dropdown menu when clicked (but looks jank rn) -->
<div class="entry">
<div class="file-container">
<!-- Entry content here -->
<span class="name">Enter File</span>
<form class="menu.active" action="action_page.php" method="POST" enctype="multipart/form-data">
<div class="file-upload-container">
<input type="file" id="file-upload" name="file" onchange="updateFileName(event)">
<label for="file-upload">Choose a file</label>
</div>
<input type="text" name="input_radius" placeholder="Enter Radius in meters" id="input_radius"
oninput="inputRadius(event)"><br><br>
<div>
<button type="submit" class="button-enter" name="submit">UPLOAD</button>
<button class="button-delete" onclick="deleteEntry(this)">Delete</button>
</div>
</form>
</div>
</div>
</template>
<!-- Temporary way to view at the uploaded files -->
<form action="readfiles.php" method="POST" enctype="multipart/form-data">
<button type="submit" name="DBsubmit">VIEW DATABASE</button>
</form>
<!-- Location spoofer, click this, then click map to drop pin -->
<div>
<button id="spoof-pin" onclick="toggleSpoofMode()">Set Location</button>
</div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>