-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5482e29
Showing
30 changed files
with
1,126 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.sidenav { | ||
height: 100%; | ||
width: 0; | ||
position: fixed; | ||
z-index: 999999999999; | ||
top: 30px; | ||
right: 0; | ||
background-color: #FFFFFF; | ||
overflow-x: hidden; | ||
transition: 0.5s; | ||
padding-top: 80px; | ||
} | ||
|
||
#header { | ||
font-size: 15px; | ||
right: 0px; | ||
padding: 10px; | ||
height: 30px; | ||
float: right; | ||
} | ||
|
||
#footer { | ||
height: 30px; | ||
} | ||
|
||
.sidenav a { | ||
padding: 8px 8px 8px 32px; | ||
text-decoration: none; | ||
font-size: 15px; | ||
color: #818181; | ||
display: block; | ||
transition: 0.3s; | ||
} | ||
|
||
.sidenav a:hover { | ||
color: #f1f1f1; | ||
} | ||
|
||
|
||
#openbtn{ | ||
font-size: 15px; | ||
right: 5px; | ||
top: 5px; | ||
height: 29px; | ||
cursor:pointer; | ||
float: right; | ||
display: block; | ||
} | ||
|
||
#closebtn { | ||
font-size: 15px; | ||
right: 5px; | ||
top: 5px; | ||
height: 29px; | ||
cursor:pointer; | ||
float: right; | ||
display: none; | ||
} | ||
|
||
@media screen and (max-height: 450px) { | ||
.sidenav {padding-top: 15px;} | ||
.sidenav a {font-size: 18px;} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
html, body, #mapid { | ||
height: 96%; | ||
width: 100vw; | ||
} | ||
|
||
.accordion { | ||
background-color: #eee; | ||
color: #444; | ||
cursor: pointer; | ||
padding: 18px; | ||
width: 100%; | ||
border: none; | ||
text-align: left; | ||
outline: none; | ||
font-size: 15px; | ||
transition: 0.4s; | ||
} | ||
|
||
.active, .accordion:hover { | ||
background-color: #ccc; | ||
} | ||
|
||
.panel { | ||
padding: 0 18px; | ||
display: none; | ||
background-color: white; | ||
overflow: hidden; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
require_once("dbcontroller.php"); | ||
$db_handle = new DBController(); | ||
|
||
if(!empty($_POST["lng"])) { | ||
|
||
$sql = "INSERT INTO poi (lat,lng,description) VALUES ('" .$_POST["lat"] . "','" . $_POST["lng"] ."','" . $_POST["description"] . "')"; | ||
$poi = $db_handle->executeInsert($sql); | ||
|
||
echo $poi; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
class DBController { | ||
private $conn = ""; | ||
private $host = "89.46.111.49"; | ||
private $user = "Sql1127014"; | ||
private $password = "827r224040"; | ||
private $database = "Sql1127014_5"; | ||
|
||
function __construct() { | ||
$conn = $this->connectDB(); | ||
if(!empty($conn)) { | ||
$this->conn = $conn; | ||
} | ||
} | ||
|
||
function connectDB() { | ||
$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database); | ||
return $conn; | ||
} | ||
|
||
function runSelectQuery($query) { | ||
$result = mysqli_query($this->conn,$query); | ||
while($row=mysqli_fetch_assoc($result)) { | ||
$resultset[] = $row; | ||
} | ||
if(!empty($resultset)) | ||
return $resultset; | ||
} | ||
|
||
function executeInsert($query) { | ||
$result = mysqli_query($this->conn,$query); | ||
$insert_id = mysqli_insert_id($this->conn); | ||
return $insert_id; | ||
|
||
} | ||
function executeUpdate($query) { | ||
$result = mysqli_query($this->conn,$query); | ||
return $result; | ||
|
||
} | ||
|
||
function executeQuery($sql) { | ||
$result = mysqli_query($this->conn,$sql); | ||
return $result; | ||
|
||
} | ||
|
||
function numRows($query) { | ||
$result = mysqli_query($this->conn,$query); | ||
$rowcount = mysqli_num_rows($result); | ||
return $rowcount; | ||
} | ||
|
||
function stringEscape($s) { | ||
return mysqli_real_escape_string($this->conn,$s); | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/* | ||
* Author: | ||
* File: | ||
* Last update: | ||
* Todo: | ||
* | ||
* | ||
*/ | ||
|
||
require_once("dbcontroller.php"); | ||
$db_handle = new DBController(); | ||
|
||
|
||
$sql = "SELECT * from poi"; | ||
$poi = $db_handle->runSelectQuery($sql); | ||
|
||
$fd = fopen("log.txt","w"); | ||
fwrite($fd,json_encode($poi)); | ||
fclose($fd); | ||
|
||
echo json_encode($poi); | ||
|
||
// TODO Check for error | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
null |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
|
||
<title>static map example - luigigrillo.com </title> | ||
|
||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" /> | ||
|
||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-GffPMF3RvMeYyc1LWMHtK8EbPv0iNZ8/oTtHPx9/cc2ILxQ+u905qIwdpULaqDkyBKgOaB57QTMg7ztg8Jm2Og==" crossorigin=""></script> | ||
|
||
|
||
<style> | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
html, body, #map { | ||
height: 98%; | ||
width: 100vw; | ||
} | ||
</style> | ||
|
||
|
||
</head> | ||
<body> | ||
|
||
<div id='map'></div> | ||
|
||
<script> | ||
|
||
var map = L.map('map', { | ||
crs: L.CRS.Simple, | ||
minZoom: -7 | ||
}); | ||
|
||
var yx = L.latLng; | ||
|
||
var xy = function(x, y) { | ||
if (L.Util.isArray(x)) { // When doing xy([x, y]); | ||
return yx(x[1], x[0]); | ||
} | ||
return yx(y, x); // When doing xy(x, y); | ||
}; | ||
|
||
var bounds = [xy(-25, -26.5), xy(1023, 1021.5)]; | ||
var image = L.imageOverlay('maps/Cartina-della-Sicilia-1024x792.jpg', bounds).addTo(map); | ||
|
||
var ct = xy(875.007315, 468.999245 ); | ||
var me = xy(973.007975, 793.000643); | ||
var pa = xy(384.004008, 766.000527); | ||
var sr = xy(916.007591, 285.998455); | ||
|
||
L.marker(ct).addTo(map).bindPopup('Catania'); | ||
L.marker(me).addTo(map).bindPopup('Messina'); | ||
L.marker(pa).addTo(map).bindPopup('Palermo'); | ||
L.marker(sr).addTo(map).bindPopup('Siracusa'); | ||
|
||
var travel = L.polyline([ct, me]).addTo(map); | ||
|
||
var popup = L.popup(); | ||
|
||
|
||
function onMapClick(e) { | ||
var html = "<form action=index.php method=GET> \ | ||
<table> \ | ||
<tr><td>Title </td><td><input type=textarea name=title> </td></tr> \ | ||
<tr><td>Author </td><td><input type=textarea name=author></td></tr> \ | ||
<tr><td><input type=submit></td><td></td></tr> \ | ||
</table> \ | ||
</form>"; | ||
|
||
popup | ||
.setLatLng(e.latlng) | ||
.setContent("I can look for books concerning this location: " + e.latlng.toString() + "<br> Great! Isn't it??" + html) | ||
.openOn(map); | ||
} | ||
|
||
map.on('click', onMapClick); | ||
|
||
map.setView(xy(542.832833, 570.360558), 0); | ||
|
||
|
||
|
||
</script> | ||
|
||
|
||
|
||
</body> | ||
</html> |
Oops, something went wrong.