corection zone dans latng & correction slide
0
config.json.sample
Normal file → Executable file
0
controllers/login-controller.js
Normal file → Executable file
0
controllers/register-controller.js
Normal file → Executable file
0
controllers/securepw.js
Normal file → Executable file
36
fonction.js
Normal file → Executable file
@@ -1,22 +1,24 @@
|
|||||||
exports.choixZone = function(zones){
|
exports.choixZone = function(zones){
|
||||||
var zone = zones[0];
|
var zone = zones[0];
|
||||||
var aireMin = (zones[0].Nord-zones[0].Sud)*(zones[0].Est-zones[0].Ouest)
|
var aireMin = (zones[0].Nord-zones[0].Sud)*(zones[0].Est-zones[0].Ouest)
|
||||||
for(var i = 1;i<zones.length;i++)
|
for(var i = 1;i<zones.length;i++)
|
||||||
{
|
{
|
||||||
var aire = (zones[i].Nord-zones[i].Sud)*(zones[i].Est-zones[i].Ouest)
|
var aire = (zones[i].Nord-zones[i].Sud)*(zones[i].Est-zones[i].Ouest)
|
||||||
if(aire<aireMin){
|
if(aire<aireMin){
|
||||||
zone = zones[i];
|
zone = zones[i];
|
||||||
aireMin = aire;
|
aireMin = aire;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return zone;
|
return zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.listPubDansZone = function(zone, callback){
|
exports.listPubDansZone = function(zone, callback){
|
||||||
var con = require('./bdd.js')
|
var con = require('./bdd.js')
|
||||||
con.query("SELECT * FROM com_active INNER JOIN zone ON com_active.ID_Zone = zone.ID_Zone INNER JOIN communication ON com_active.ID_Com = communication.ID_Com WHERE zone.ID_Zone = ? ", [zone], function(err, result){
|
con.query("SELECT * FROM com_active INNER JOIN zone ON com_active.ID_Zone = zone.ID_Zone INNER JOIN communication ON com_active.ID_Com = communication.ID_Com WHERE zone.ID_Zone = ? ", [zone], function(err, result){
|
||||||
var data = JSON.stringify(result);
|
var data = JSON.stringify(result);
|
||||||
data = JSON.parse(data);
|
console.log(data);
|
||||||
callback(err, data)
|
data = JSON.parse(data);
|
||||||
});
|
callback(err, data)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
0
static/Icons/H1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
0
static/Icons/h0.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
0
static/Js/index.js
Normal file → Executable file
0
static/Js/map.js
Normal file → Executable file
0
static/Shapes/circle-shape.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 276 B |
0
static/Shapes/circles-shape.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 828 B After Width: | Height: | Size: 828 B |
0
static/Shapes/curve1-shape.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 422 B |
0
static/Shapes/curve2-shape.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
0
static/Shapes/triangle-shape.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 252 B |
0
static/Shapes/water-shape.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |