primeiro commit

Esse commit está contido em:
root
2020-08-05 09:31:43 -03:00
commit 4fea166144
40 arquivos alterados com 57975 adições e 0 exclusões
Arquivo executável
+13
Ver Arquivo
@@ -0,0 +1,13 @@
<?php
$c = mysqli_connect("localhost", "ricardo", "123", "atlas");
$nome = $_POST['nome'];
$telefone = $_POST['telefone'];
$email = $_POST['email'];
$senha = $_POST['senha'];
mysqli_query($c, "insert into usuarios (nome, telefone, email, senha) Values ('$nome','$telefone','$email','$senha')");
Arquivo executável
+115
Ver Arquivo
@@ -0,0 +1,115 @@
<?php
Class Usuario
{
private $pdo;
private $msgErro = "";
public function conectar($nome, $host, $usuario, $senha){
global $pdo;
global $msgErro;
try {
$pdo = new PDO("mysql:dbname=".$nome.";host=".$host,$usuario,$senha);
} catch (PDOException $e) {
$msgErro = $e->getMessage();
}
}
public function cadastrar($nome, $telefone, $email, $senha){
global $pdo;
// verificar se email já existe
$sql = $pdo->prepare("SELECT id_usuario FROM usuarios WHERE email = :e");
$sql->bindValue(":e", $email);
$sql->execute();
if($sql->rowCount() > 0)
{
return false; // já cadastrado
}else{
//caso não exista, cadastro
$sql = $pdo->prepare("INSERT INTO usuarios (nome, telefone, email, senha) VALUES (:n, :t, :e, :s)");
$sql->bindValue(":n", $nome);
$sql->bindValue(":t", $telefone);
$sql->bindValue(":e", $email);
$sql->bindValue(":s", md5($senha));
$sql->execute();
return true;
}
}
/*public function imagem($codigo){
global $pdo;
$sql = $pdo->prepare("SELECT * FROM mapas");
$sql->bindValue
}*/
//upload de arquivo
public function upload($arquivo, $nome){
global $pdo;
$sql = $pdo->prepare("INSERT INTO mapas (arquivo, data, nome) VALUES (:a, NOW(), :n)");
$sql->bindValue(":a", $arquivo);
$sql->bindValue(":n", $nome);
$sql->execute();
return true;
}
// Excluir dados do banco
public function excluirBanco($codigo){
global $pdo;
$sql = $pdo->prepare("DELETE FROM mapas WHERE codigo = :codigo");
$sql->bindValue(":codigo",$codigo);
$sql->execute();
}
//buscar dados do banco
public function buscarDadosMapa($codigo){
global $pdo;
$sql = $pdo->prepare("SELECT * FROM mapas WHERE codigo = :codigo");
$sql->bindValue(":codigo",$codigo);
$sql->execute();
$resultado = $sql->fetch();
return $resultado;
}
// ATUALIZAR DADOS BANCO
public function atualizarMapas(){
}
public function logar($email, $senha){
global $pdo;
//verificação de email e senha se estão cadastrados
$sql = $pdo->prepare("SELECT id_usuario FROM usuarios WHERE email = :e AND senha = :s");
$sql->bindValue(":e", $email);
$sql->bindValue(":s", md5($senha));
$sql->execute();
if($sql->rowCount() > 0){
// usuário pode acessar o sistema
$dado = $sql->fetch();
session_start();
$_SESSION['id_usuario'] = $dado['id_usuario'];
return true; // logado com sucesso
}else{
return false; // não foi possível logar
}
}
}
?>
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
+5084
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
externo Arquivo executável
+260
Ver Arquivo
@@ -0,0 +1,260 @@
/*! nouislider - 10.0.0 - 2017-05-28 14:52:48 */
/* Functional styling;
* These styles are required for noUiSlider to function.
* You don't need to change these rules to apply your design.
*/
.noUi-target,
.noUi-target * {
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-user-select: none;
-ms-touch-action: none;
touch-action: none;
-ms-user-select: none;
-moz-user-select: none;
user-select: none;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.noUi-target {
position: relative;
direction: ltr;
}
.noUi-base {
width: 100%;
height: 100%;
position: relative;
z-index: 1;
/* Fix 401 */
}
.noUi-connect {
position: absolute;
right: 0;
top: 0;
left: 0;
bottom: 0;
}
.noUi-origin {
position: absolute;
height: 0;
width: 0;
}
.noUi-handle {
position: relative;
z-index: 1;
}
.noUi-state-tap .noUi-connect,
.noUi-state-tap .noUi-origin {
-webkit-transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s;
transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s;
}
.noUi-state-drag * {
cursor: inherit !important;
}
/* Painting and performance;
* Browsers can paint handles in their own layer.
*/
.noUi-base,
.noUi-handle {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/* Slider size and handle placement;
*/
.noUi-horizontal {
height: 18px;
}
.noUi-horizontal .noUi-handle {
width: 34px;
height: 28px;
left: -17px;
top: -6px;
}
.noUi-vertical {
width: 18px;
}
.noUi-vertical .noUi-handle {
width: 28px;
height: 34px;
left: -6px;
top: -17px;
}
/* Styling;
*/
.noUi-target {
background: #FAFAFA;
border-radius: 4px;
border: 1px solid #D3D3D3;
box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB;
}
.noUi-connect {
background: #3FB8AF;
border-radius: 4px;
box-shadow: inset 0 0 3px rgba(51, 51, 51, 0.45);
-webkit-transition: background 450ms;
transition: background 450ms;
}
/* Handles and cursors;
*/
.noUi-draggable {
cursor: ew-resize;
}
.noUi-vertical .noUi-draggable {
cursor: ns-resize;
}
.noUi-handle {
border: 1px solid #D9D9D9;
border-radius: 3px;
background: #FFF;
cursor: default;
box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #EBEBEB, 0 3px 6px -3px #BBB;
}
.noUi-active {
box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #DDD, 0 3px 6px -3px #BBB;
}
/* Handle stripes;
*/
.noUi-handle:before,
.noUi-handle:after {
content: "";
display: block;
position: absolute;
height: 14px;
width: 1px;
background: #E8E7E6;
left: 14px;
top: 6px;
}
.noUi-handle:after {
left: 17px;
}
.noUi-vertical .noUi-handle:before,
.noUi-vertical .noUi-handle:after {
width: 14px;
height: 1px;
left: 6px;
top: 14px;
}
.noUi-vertical .noUi-handle:after {
top: 17px;
}
/* Disabled state;
*/
[disabled] .noUi-connect {
background: #B8B8B8;
}
[disabled].noUi-target,
[disabled].noUi-handle,
[disabled] .noUi-handle {
cursor: not-allowed;
}
/* Base;
*
*/
.noUi-pips,
.noUi-pips * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.noUi-pips {
position: absolute;
color: #999;
}
/* Values;
*
*/
.noUi-value {
position: absolute;
white-space: nowrap;
text-align: center;
}
.noUi-value-sub {
color: #ccc;
font-size: 10px;
}
/* Markings;
*
*/
.noUi-marker {
position: absolute;
background: #CCC;
}
.noUi-marker-sub {
background: #AAA;
}
.noUi-marker-large {
background: #AAA;
}
/* Horizontal layout;
*
*/
.noUi-pips-horizontal {
padding: 10px 0;
height: 80px;
top: 100%;
left: 0;
width: 100%;
}
.noUi-value-horizontal {
-webkit-transform: translate3d(-50%, 50%, 0);
transform: translate3d(-50%, 50%, 0);
}
.noUi-marker-horizontal.noUi-marker {
margin-left: -1px;
width: 2px;
height: 5px;
}
.noUi-marker-horizontal.noUi-marker-sub {
height: 10px;
}
.noUi-marker-horizontal.noUi-marker-large {
height: 15px;
}
/* Vertical layout;
*
*/
.noUi-pips-vertical {
padding: 0 10px;
height: 100%;
top: 0;
left: 100%;
}
.noUi-value-vertical {
-webkit-transform: translate3d(0, 50%, 0);
transform: translate3d(0, 50%, 0);
padding-left: 25px;
}
.noUi-marker-vertical.noUi-marker {
width: 5px;
height: 2px;
margin-top: -1px;
}
.noUi-marker-vertical.noUi-marker-sub {
width: 10px;
}
.noUi-marker-vertical.noUi-marker-large {
width: 15px;
}
.noUi-tooltip {
display: block;
position: absolute;
border: 1px solid #D9D9D9;
border-radius: 3px;
background: #fff;
color: #000;
padding: 5px;
text-align: center;
white-space: nowrap;
}
.noUi-horizontal .noUi-tooltip {
-webkit-transform: translate(-50%, 0);
transform: translate(-50%, 0);
left: 50%;
bottom: 120%;
}
.noUi-vertical .noUi-tooltip {
-webkit-transform: translate(0, -50%);
transform: translate(0, -50%);
top: 50%;
right: 120%;
}
externo Arquivo executável
+2256
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
externo Arquivo executável
+261
Ver Arquivo
@@ -0,0 +1,261 @@
.ol-box {
box-sizing: border-box;
border-radius: 2px;
border: 2px solid blue;
}
.ol-mouse-position {
top: 8px;
right: 8px;
position: absolute;
}
.ol-scale-line {
background: rgba(0,60,136,0.3);
border-radius: 4px;
bottom: 8px;
left: 8px;
padding: 2px;
position: absolute;
}
.ol-scale-line-inner {
border: 1px solid #eee;
border-top: none;
color: #eee;
font-size: 10px;
text-align: center;
margin: 1px;
will-change: contents, width;
}
.ol-overlay-container {
will-change: left,right,top,bottom;
}
.ol-unsupported {
display: none;
}
.ol-viewport, .ol-unselectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.ol-selectable {
-webkit-touch-callout: default;
-webkit-user-select: auto;
-moz-user-select: auto;
-ms-user-select: auto;
user-select: auto;
}
.ol-grabbing {
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing;
}
.ol-grab {
cursor: move;
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
.ol-control {
position: absolute;
background-color: rgba(255,255,255,0.4);
border-radius: 4px;
padding: 2px;
}
.ol-control:hover {
background-color: rgba(255,255,255,0.6);
}
.ol-zoom {
top: .5em;
left: .5em;
}
.ol-rotate {
top: .5em;
right: .5em;
transition: opacity .25s linear, visibility 0s linear;
}
.ol-rotate.ol-hidden {
opacity: 0;
visibility: hidden;
transition: opacity .25s linear, visibility 0s linear .25s;
}
.ol-zoom-extent {
top: 4.643em;
left: .5em;
}
.ol-full-screen {
right: .5em;
top: .5em;
}
@media print {
.ol-control {
display: none;
}
}
.ol-control button {
display: block;
margin: 1px;
padding: 0;
color: white;
font-size: 1.14em;
font-weight: bold;
text-decoration: none;
text-align: center;
height: 1.375em;
width: 1.375em;
line-height: .4em;
background-color: rgba(0,60,136,0.5);
border: none;
border-radius: 2px;
}
.ol-control button::-moz-focus-inner {
border: none;
padding: 0;
}
.ol-zoom-extent button {
line-height: 1.4em;
}
.ol-compass {
display: block;
font-weight: normal;
font-size: 1.2em;
will-change: transform;
}
.ol-touch .ol-control button {
font-size: 1.5em;
}
.ol-touch .ol-zoom-extent {
top: 5.5em;
}
.ol-control button:hover,
.ol-control button:focus {
text-decoration: none;
background-color: rgba(0,60,136,0.7);
}
.ol-zoom .ol-zoom-in {
border-radius: 2px 2px 0 0;
}
.ol-zoom .ol-zoom-out {
border-radius: 0 0 2px 2px;
}
.ol-attribution {
text-align: right;
bottom: .5em;
right: .5em;
max-width: calc(100% - 1.3em);
}
.ol-attribution ul {
margin: 0;
padding: 0 .5em;
font-size: .7rem;
line-height: 1.375em;
color: #000;
text-shadow: 0 0 2px #fff;
}
.ol-attribution li {
display: inline;
list-style: none;
line-height: inherit;
}
.ol-attribution li:not(:last-child):after {
content: " ";
}
.ol-attribution img {
max-height: 2em;
max-width: inherit;
vertical-align: middle;
}
.ol-attribution ul, .ol-attribution button {
display: inline-block;
}
.ol-attribution.ol-collapsed ul {
display: none;
}
.ol-attribution.ol-logo-only ul {
display: block;
}
.ol-attribution:not(.ol-collapsed) {
background: rgba(255,255,255,0.8);
}
.ol-attribution.ol-uncollapsible {
bottom: 0;
right: 0;
border-radius: 4px 0 0;
height: 1.1em;
line-height: 1em;
}
.ol-attribution.ol-logo-only {
background: transparent;
bottom: .4em;
height: 1.1em;
line-height: 1em;
}
.ol-attribution.ol-uncollapsible img {
margin-top: -.2em;
max-height: 1.6em;
}
.ol-attribution.ol-logo-only button,
.ol-attribution.ol-uncollapsible button {
display: none;
}
.ol-zoomslider {
top: 4.5em;
left: .5em;
height: 200px;
}
.ol-zoomslider button {
position: relative;
height: 10px;
}
.ol-touch .ol-zoomslider {
top: 5.5em;
}
.ol-overviewmap {
left: 0.5em;
bottom: 0.5em;
}
.ol-overviewmap.ol-uncollapsible {
bottom: 0;
left: 0;
border-radius: 0 4px 0 0;
}
.ol-overviewmap .ol-overviewmap-map,
.ol-overviewmap button {
display: inline-block;
}
.ol-overviewmap .ol-overviewmap-map {
border: 1px solid #7b98bc;
height: 150px;
margin: 2px;
width: 150px;
}
.ol-overviewmap:not(.ol-collapsed) button{
bottom: 1px;
left: 2px;
position: absolute;
}
.ol-overviewmap.ol-collapsed .ol-overviewmap-map,
.ol-overviewmap.ol-uncollapsible button {
display: none;
}
.ol-overviewmap:not(.ol-collapsed) {
background: rgba(255,255,255,0.8);
}
.ol-overviewmap-box {
border: 2px dotted rgba(0,60,136,0.7);
}
.ol-overviewmap .ol-overviewmap-box:hover {
cursor: move;
}
externo Arquivo executável
+48345
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
externo Arquivo executável
+2
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
BIN
Ver Arquivo
Arquivo binário não exibido.
+212
Ver Arquivo
@@ -0,0 +1,212 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>plottygeotiff</title>
<script src="dist/plotty.min.js"></script>
<script src="dist/nouislider.js"></script>
<script src="dist/geotiffjs/geotiff.browserify.js"></script>
<script src="dist/ol-debug.js"></script>
<script src="olGeoTiff_07.js"></script>
<!-- jquery is NOT required and only used for handling the user input... just lazyness :) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="dist/nouislider.css" type="text/css">
<link rel="stylesheet" href="dist/ol-debug.css" type="text/css">
<style>
.slider { width: 100%; margin-top: 50px; }
.map { width: 100%; height: 600px; margin-top: 20px; }
select { margin-top: 15px; }
.mapcontainer { padding: 0 100px; text-align: center; }
.slidercontainer { padding: 0 100px; }
</style>
</head>
<body>
<div class="mapcontainer">
<div id="s2map" class="map"></div>
<div class="slidercontainer">
<div class="slider domainslider"></div>
<div class="slider opacityslider"></div>
</div>
<select class="palette">
<option>viridis</option>
<option>inferno</option>
<option>rainbow</option>
<option>jet</option>
<option>hsv</option>
<option>hot</option>
<option>cool</option>
<option>spring</option>
<option>summer</option>
<option>autumn</option>
<option>winter</option>
<option>bone</option>
<option>copper</option>
<option>greys</option>
<option>yignbu</option>
<option>greens</option>
<option>yiorrd</option>
<option>bluered</option>
<option>rdbu</option>
<option>picnic</option>
<option>portland</option>
<option selected>blackbody</option>
<option>earth</option>
<option>electric</option>
<option>magma</option>
<option>plasma</option>
</select>
<select class="datafunction">
<option selected>NDVI</option>
<option>NDI45</option>
</select>
</div>
<script>
// set variables
const projection = ol.proj.get('https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js');
const projectionExtent = projection.getExtent();
const size = ol.extent.getWidth(projectionExtent) / 256;
const resolutions = new Array(18);
const matrixIds = new Array(18);
// create matrix
for (let z = 0; z < 18; ++z) {
// generate resolutions and matrixIds arrays for this WMTS
// eslint-disable-next-line no-restricted-properties
resolutions[z] = size / Math.pow(2, (z + 1));
matrixIds[z] = z;
}
// define the wms layer
var wmslayer_s2 = new ol.layer.Tile({
source: new ol.source.WMTS({
src: '1992dsm_Malakoff_Diggins_SHP_California.tif',
projection,
tileGrid: new ol.tilegrid.WMTS({
origin: ol.extent.getTopLeft(projectionExtent),
resolutions,
matrixIds,
}),
requestEncoding: 'REST',
transition: 0,
})
});
// eox baselayer
var tile_grid = new ol.tilegrid.WMTS({origin:ol.extent.getTopLeft(projectionExtent),resolutions:resolutions,matrixIds:matrixIds});
var s2maps = new ol.layer.Tile({
source: new ol.source.WMTS({
layer:'s2cloudless',
attributions:[new ol.Attribution({html:'<a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2016 &amp; 2017)'})],
matrixSet:'WGS84',
format:'image/jpeg',
projection:projection,
tileGrid:tile_grid,
style:'default',
wrapX:!0,
urls:[
"//a.s2maps-tiles.eu/wmts/",
"//b.s2maps-tiles.eu/wmts/",
"//c.s2maps-tiles.eu/wmts/",
"//d.s2maps-tiles.eu/wmts/",
"//e.s2maps-tiles.eu/wmts/"
]
})
});
// define the map
var map_result_s2 = new ol.Map({
target: 's2map',
layers: [
s2maps,
wmslayer_s2,
],
view: new ol.View({
projection,
center: [16.411407470703125, 48.27875518798828],
zoom: 12,
maxZoom: 14,
minZoom: 3
}),
controls: ol.control.defaults({
attributionOptions: {
collapsible: false
}
}),
});
// setup datafunctions
var datafunctions = {};
datafunctions['NDVI'] = function(b) {
if(b[1]+b[2]+b[3]+b[4]==0) return 10; // return 10 as nodata value
return ( b[4] - b[3] ) / ( b[4] + b[3] ); // otherwise return NDVI
};
datafunctions['NDI45'] = function(b) {
if(b[1]+b[2]+b[3]+b[4]==0) return 10; // return 10 as nodata value
return ( b[4] - b[1] ) / ( b[4] + b[1] ); // otherwise return NDVI
};
// olGeoTiff setup
var olgt_s2map = new olGeoTiff(wmslayer_s2);
olgt_s2map.plotOptions.domain = [-0.2, 0.2];
olgt_s2map.plotOptions.noDataValue = 10;
olgt_s2map.plotOptions.palette = 'blackbody';
olgt_s2map.plotOptions.dataFunction = datafunctions['NDVI'];
// handle user input
$(document).ready(function() {
var $container = $('#s2map').parent();
// slider1 (domain)
var slider = $container.find('.domainslider')[0];
noUiSlider.create(slider, {
start: olgt_s2map.plotOptions.domain,
connect: true,
range: { 'min': -1, 'max': 1 },
tooltips: true,
});
slider.noUiSlider.on('change', function(values) {
olgt_s2map.plotOptions.domain = [values[0], values[1]];
olgt_s2map.redraw();
});
// slider2 (opacity)
var slider2 = $container.find('.opacityslider')[0];
var opacity = 1;
noUiSlider.create(slider2, {
start: opacity,
connect: true,
range: { 'min': 0, 'max': 1 },
tooltips: true,
});
wmslayer_s2.setOpacity(opacity);
slider2.noUiSlider.on('slide', function(values) {
wmslayer_s2.setOpacity(values[0]*1);
});
// palette
$container.find('.palette').on("change", function() {
var palette = this.options[this.selectedIndex].text;
olgt_s2map.plotOptions.palette = palette;
olgt_s2map.redraw();
});
// datafunctions
$container.find('.datafunction').on("change", function() {
var func = this.options[this.selectedIndex].text;
olgt_s2map.plotOptions.dataFunction = datafunctions[func];
olgt_s2map.redraw();
});
});
</script>
</body>
</html>
+73
Ver Arquivo
@@ -0,0 +1,73 @@
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css" type="text/css">
<style>
.map {
height: 400px;
width: 100%;
}
</style>
<script src="http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.6/proj4.js" type="text/javascript"></script>
<script src="http://epsg.io/21781-1753.js" type="text/javascript"></script>
<script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js"></script>
<title>OpenLayers example</title>
</head>
<body>
<h2>My Map</h2>
<div id="map" class="map"></div>
<script type="text/javascript">
var style = (function() {
var stroke = new ol.style.Stroke({
//color: '#666'
});
var textStroke = new ol.style.Stroke({
//color: '#fff',
width: 3
});
var textFill = new ol.style.Fill({
// color: '#000'
});
return function(feature, resolution) {
return [new ol.style.Style({
stroke: stroke,
text: new ol.style.Text({
font: '12px Calibri,sans-serif',
text: feature.get('key'),
fill: textFill,
stroke: textStroke
})
})];
};
})();
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
//map = new map.addLayer(Openlayers.Layer.OSM('beltrao.tif'));
// map.addLayer(Openlayers.Layer.OSM('beltrao.tif'));
}),
new ol.layer.Vector({
title: 'Buildings',
source: new ol.source.Vector({
url: 'mapas/ttt.kml',
format: new ol.format.KML({
extractStyles: false
})
}),
style: style
}),
],
view: new ol.View({
center: ol.proj.fromLonLat([-53.0524, -26.0759]),
zoom: 10.7
})
});
</script>
</body>
</html>
+18
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+31
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+18
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+109
Ver Arquivo
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>srtmtif</name>
<Style>
<ListStyle>
<listItemType>checkHideChildren</listItemType>
<bgColor>00ffffff</bgColor>
<maxSnippetLines>2</maxSnippetLines>
</ListStyle>
</Style>
<Folder>
<name>kml_image_srtmtif_L1_0_0</name>
<Region>
<LatLonAltBox>
<north>-26.40525989458669</north>
<south>-26.64920074627508</south>
<east>-51.40858648132068</east>
<west>-51.77340247946083</west>
<minAltitude>0</minAltitude>
<maxAltitude>0</maxAltitude>
</LatLonAltBox>
<Lod>
<minLodPixels>35</minLodPixels>
<maxLodPixels>2049</maxLodPixels>
<minFadeExtent>0</minFadeExtent>
<maxFadeExtent>0</maxFadeExtent>
</Lod>
</Region>
<GroundOverlay>
<drawOrder>1</drawOrder>
<Icon>
<href>/Users/fernandomanosso/Library/Application Support/Google Earth/kml_image_srtmtif_L1_0_0_0.tif</href>
</Icon>
<gx:altitudeMode>clampToSeaFloor</gx:altitudeMode>
<LatLonBox>
<north>-26.40525989458669</north>
<south>-26.64920074627508</south>
<east>-51.40858648132068</east>
<west>-51.77340247946083</west>
</LatLonBox>
</GroundOverlay>
<Folder>
<name>kml_image_srtmtif_L2_0_0</name>
<Region>
<LatLonAltBox>
<north>-26.40525989458669</north>
<south>-26.64920074627508</south>
<east>-51.48888489979936</east>
<west>-51.77340247946083</west>
<minAltitude>0</minAltitude>
<maxAltitude>0</maxAltitude>
</LatLonAltBox>
<Lod>
<minLodPixels>500</minLodPixels>
<maxLodPixels>-1</maxLodPixels>
<minFadeExtent>0</minFadeExtent>
<maxFadeExtent>0</maxFadeExtent>
</Lod>
</Region>
<GroundOverlay>
<drawOrder>2</drawOrder>
<Icon>
<href>/Users/fernandomanosso/Library/Application Support/Google Earth/kml_image_srtmtif_L2_0_0_0.tif</href>
</Icon>
<gx:altitudeMode>clampToSeaFloor</gx:altitudeMode>
<LatLonBox>
<north>-26.40525989458669</north>
<south>-26.64920074627508</south>
<east>-51.48888489979936</east>
<west>-51.77340247946083</west>
</LatLonBox>
</GroundOverlay>
</Folder>
<Folder>
<name>kml_image_srtmtif_L2_0_1</name>
<Region>
<LatLonAltBox>
<north>-26.40525989458669</north>
<south>-26.64920074627508</south>
<east>-51.40858648132068</east>
<west>-51.48888489979936</west>
<minAltitude>0</minAltitude>
<maxAltitude>0</maxAltitude>
</LatLonAltBox>
<Lod>
<minLodPixels>266</minLodPixels>
<maxLodPixels>-1</maxLodPixels>
<minFadeExtent>0</minFadeExtent>
<maxFadeExtent>0</maxFadeExtent>
</Lod>
</Region>
<GroundOverlay>
<drawOrder>2</drawOrder>
<Icon>
<href>/Users/fernandomanosso/Library/Application Support/Google Earth/kml_image_srtmtif_L2_0_1_0.tif</href>
</Icon>
<gx:altitudeMode>clampToSeaFloor</gx:altitudeMode>
<LatLonBox>
<north>-26.40525989458669</north>
<south>-26.64920074627508</south>
<east>-51.40858648132068</east>
<west>-51.48888489979936</west>
</LatLonBox>
</GroundOverlay>
</Folder>
</Folder>
</Document>
</kml>
+31
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+31
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+189
Ver Arquivo
@@ -0,0 +1,189 @@
// olGeoTiff class
/**
* base class for openlayers geotiff support
* @param {*} layer
*/
function olGeoTiff(layer) {
// layer of the OL map that holds the tiff tiles
this.layer = layer;
// options object for plotty plot
this.plotOptions = {
domain: [-1, 1],
width: 256,
height: 256,
noDataValue: false,
palette: null,
/**
* data array
* @param rasters parsed geotiff multiband data
* @returns array of float values calculated by dataFunction()
*/
data: function(rasters) {
var data = [];
// loop every single datapoint
for(var i = 0; i<rasters[0].length; i++) {
// first value is always null so you can index all bands
// by positive numbers (band1 = b[1])
var bands = [null];
// add all other available bands to this array
for(var b = 0; b<rasters.length; b++) bands.push(rasters[b][i]);
// calculate single float value for this multiband array
// push float value to the data array and continue with next datapoint
data.push( this.dataFunction(bands) );
}
// return the data array
return data;
},
/**
* data function
* @param b array single arrayitem of parsed geotiff multiband data
* @return float calculated value (by default returns the first band)
*/
dataFunction: function(b) {
return b[1];
},
};
// object that holds all rastered tiffs identified by their url
this.urlToTiff = {};
// plotty instance for this layer
this.plot = new plotty.plot({});
// this sets the custom tile load function on init of this class
this.layer.getSource().setTileLoadFunction(this.tileLoadFunction.bind(this));
}
/**
* fetch tiff and set callbacks
* @param {*} url url of the geotiff file
* @param {*} listener callback on ajax success
* @param {*} errorListener callback on ajax error
*/
olGeoTiff.prototype.fetchTiff = function(url, listener, errorListener) {
var urlToTiff = this.urlToTiff;
if (urlToTiff[url]) {
// in this case the tiff is already received and parsed
if (urlToTiff[url].rasters) {
listener(urlToTiff[url]);
}
else if (urlToTiff[url].error) {
errorListener(urlToTiff[url].error);
}
// in this case the tiff was already requested
else {
urlToTiff[url].listeners.push(listener);
urlToTiff[url].errorListeners.push(errorListener);
}
}
// in this case the tiff was not yet requested
else {
urlToTiff[url] = {
rasters: null,
error: null,
listeners: [listener],
errorListeners: [errorListener]
};
// send new request
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'arraybuffer';
var that = this;
// setup the async function that is executed AFTER the tile was loaded
xhr.onloadend = function(e) {
if (xhr.status == 200) {
// save rasters of parsed tiff
var parsed = GeoTIFF.parse(this.response);
urlToTiff[url].rasters = parsed.getImage().readRasters();
var listeners = urlToTiff[url].listeners;
for (var i = 0; i < listeners.length; ++i) listeners[i](urlToTiff[url]);
urlToTiff[url].listeners = [];
}
else {
urlToTiff[url].error = e;
var errorListeners = urlToTiff[url].errorListeners;
for (var i = 0; i < errorListeners.length; ++i) errorListeners[i](e);
urlToTiff[url].errorListeners = [];
}
}
// send ajax request
xhr.send();
}
}
/**
* custom tile load function
* @param {*} imageTile
* @param {*} src
*/
olGeoTiff.prototype.tileLoadFunction = function(imageTile, src) {
// replace the imageTile with a canvas
var imageCanvas = document.createElement('canvas');
imageCanvas.naturalWidth = this.plotOptions.width;
imageCanvas.naturalHeight = this.plotOptions.height;
imageCanvas.width = this.plotOptions.width;
imageCanvas.height = this.plotOptions.height;
imageTile.unlistenImage_();
imageTile.image_ = imageCanvas;
imageTile.imageListenerKeys_ = [
ol.events.listenOnce(imageTile.image_, ol.events.EventType.ERROR,
imageTile.handleImageError_, imageTile),
ol.events.listenOnce(imageTile.image_, ol.events.EventType.LOAD,
imageTile.handleImageLoad_, imageTile)
];
// fetch data of this tile
this.fetchTiff(
// url of tile
src,
// callback function that executes when the tiff is parsed and ready
function(urlToTiff) {
// get plotty instance
var plot = this.plot;
// set plotty settings
plot.setDomain(this.plotOptions.domain);
plot.setData(
this.plotOptions.data(urlToTiff.rasters),
this.plotOptions.width,
this.plotOptions.height
);
if(this.plotOptions.palette)
plot.setColorScale(this.plotOptions.palette);
if(this.plotOptions.noDataValue !== false)
plot.setNoDataValue(this.plotOptions.noDataValue);
// render plot and trigger load event
plot.render();
imageCanvas.getContext('2d').drawImage(plot.getCanvas(), 0, 0);
imageCanvas.dispatchEvent(new Event('load'));
}.bind(this),
// callback function in case of AJAX error
function(error) {
// trigger error event
imageCanvas.dispatchEvent(new Event('error'));
}
);
};
/**
* redraw the given layer
*/
olGeoTiff.prototype.redraw = function() {
this.layer.getSource().refresh();
}
Arquivo executável
+10
Ver Arquivo
@@ -0,0 +1,10 @@
<?php
session_start();
if(!isset($_SESSION['id_usuario'])){
header("location: index.php");
exit;
}
?>
Seja bem vindo!!!!!!
<a href="sair.php">Sair</a>
Arquivo executável
+58
Ver Arquivo
@@ -0,0 +1,58 @@
<?php
require_once ("CLASSES/usuario.php");
include_once 'CLASSES/usuario.php';
require_once 'CLASSES/usuario.php';
$u = new Usuario;
$u->conectar("atlas","localhost","ricardo","123");
$sql = "SELECT * from mapas";
$consulta = $pdo->query($sql);
While($linha = $consulta->fetch(PDO::FETCH_ASSOC)){
$album[] = $linha;
# code...
}
?>
<!DOCTYPE>
<html>
<header>
<title>Atlas</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
</header>
<body id="atlas">
<div id="mapas">
<?php
foreach ($album as $foto) {
# code...
?>
<!-- <table> -->
<center>
<!-- <tr> -->
<!-- <center> -->
<!-- <td> -->
<img src="<?php echo "./upload/".$foto["arquivo"]?> " width="260" height="200"/>
<!-- </td> -->
<!-- </center> -->
<!-- </tr> -->
</center>
<!-- </table> -->
<?php
}
?><br>
</div>
</body>
</html>
Arquivo executável
+213
Ver Arquivo
@@ -0,0 +1,213 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>plottygeotiff</title>
<script src="dist/plotty.min.js"></script>
<script src="dist/nouislider.js"></script>
<script src="dist/geotiffjs/geotiff.browserify.js"></script>
<script src="dist/ol-debug.js"></script>
<script src="olGeoTiff_07.js"></script>
<!-- jquery is NOT required and only used for handling the user input... just lazyness :) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="dist/nouislider.css" type="text/css">
<link rel="stylesheet" href="dist/ol-debug.css" type="text/css">
<style>
.slider { width: 100%; margin-top: 50px; }
.map { width: 100%; height: 600px; margin-top: 20px; }
select { margin-top: 15px; }
.mapcontainer { padding: 0 100px; text-align: center; }
.slidercontainer { padding: 0 100px; }
</style>
</head>
<body>
<div class="mapcontainer">
<div id="s2map" class="map"></div>
<div class="slidercontainer">
<div class="slider domainslider"></div>
<div class="slider opacityslider"></div>
</div>
<select class="palette">
<option>viridis</option>
<option>inferno</option>
<option>rainbow</option>
<option>jet</option>
<option>hsv</option>
<option>hot</option>
<option>cool</option>
<option>spring</option>
<option>summer</option>
<option>autumn</option>
<option>winter</option>
<option>bone</option>
<option>copper</option>
<option>greys</option>
<option>yignbu</option>
<option>greens</option>
<option>yiorrd</option>
<option>bluered</option>
<option>rdbu</option>
<option>picnic</option>
<option>portland</option>
<option selected>blackbody</option>
<option>earth</option>
<option>electric</option>
<option>magma</option>
<option>plasma</option>
</select>
<select class="datafunction">
<option selected>NDVI</option>
<option>NDI45</option>
</select>
</div>
<script>
// set variables
const projection = ol.proj.get('EPSG:4326');
const projectionExtent = projection.getExtent();
const size = ol.extent.getWidth(projectionExtent) / 256;
const resolutions = new Array(18);
const matrixIds = new Array(18);
// create matrix
for (let z = 0; z < 18; ++z) {
// generate resolutions and matrixIds arrays for this WMTS
// eslint-disable-next-line no-restricted-properties
resolutions[z] = size / Math.pow(2, (z + 1));
matrixIds[z] = z;
}
// define the wms layer
var wmslayer_s2 = new ol.layer.Tile({
source: new ol.source.WMTS({
url: 'https://data.eox.at/geotiff.js-blog/wmts_simple/s2/{TileMatrix}/{TileRow}/{TileCol}.tif',
projection,
tileGrid: new ol.tilegrid.WMTS({
origin: ol.extent.getTopLeft(projectionExtent),
resolutions,
matrixIds,
}),
requestEncoding: 'REST',
transition: 0,
})
});
// eox baselayer
var tile_grid = new ol.tilegrid.WMTS({origin:ol.extent.getTopLeft(projectionExtent),resolutions:resolutions,matrixIds:matrixIds});
var s2maps = new ol.layer.Tile({
source: new ol.source.WMTS({
layer:'s2cloudless',
attributions:[new ol.Attribution({html:'<a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2016 &amp; 2017)'})],
matrixSet:'WGS84',
format:'image/jpeg',
projection:projection,
tileGrid:tile_grid,
style:'default',
wrapX:!0,
urls:[
"//a.s2maps-tiles.eu/wmts/",
"//b.s2maps-tiles.eu/wmts/",
"//c.s2maps-tiles.eu/wmts/",
"//d.s2maps-tiles.eu/wmts/",
"//e.s2maps-tiles.eu/wmts/"
]
})
});
// define the map
var map_result_s2 = new ol.Map({
target: 's2map',
layers: [
s2maps,
wmslayer_s2,
],
view: new ol.View({
projection,
center: [16.411407470703125, 48.27875518798828],
zoom: 12,
maxZoom: 14,
minZoom: 3
}),
controls: ol.control.defaults({
attributionOptions: {
collapsible: false
}
}),
});
// setup datafunctions
var datafunctions = {};
datafunctions['NDVI'] = function(b) {
if(b[1]+b[2]+b[3]+b[4]==0) return 10; // return 10 as nodata value
return ( b[4] - b[3] ) / ( b[4] + b[3] ); // otherwise return NDVI
};
datafunctions['NDI45'] = function(b) {
if(b[1]+b[2]+b[3]+b[4]==0) return 10; // return 10 as nodata value
return ( b[4] - b[1] ) / ( b[4] + b[1] ); // otherwise return NDVI
};
// olGeoTiff setup
var olgt_s2map = new olGeoTiff(wmslayer_s2);
olgt_s2map.plotOptions.domain = [-0.2, 0.2];
olgt_s2map.plotOptions.noDataValue = 10;
olgt_s2map.plotOptions.palette = 'blackbody';
olgt_s2map.plotOptions.dataFunction = datafunctions['NDVI'];
// handle user input
$(document).ready(function() {
var $container = $('target').parent();
// slider1 (domain)
var slider = $container.find('.domainslider')[0];
noUiSlider.create(slider, {
start: olgt_s2map.plotOptions.domain,
connect: true,
range: { 'min': -1, 'max': 1 },
tooltips: true,
});
slider.noUiSlider.on('change', function(values) {
olgt_s2map.plotOptions.domain = [values[0], values[1]];
olgt_s2map.redraw();
});
// slider2 (opacity)
var slider2 = $container.find('.opacityslider')[0];
var opacity = 1;
noUiSlider.create(slider2, {
start: opacity,
connect: true,
range: { 'min': 0, 'max': 1 },
tooltips: true,
});
wmslayer_s2.setOpacity(opacity);
slider2.noUiSlider.on('slide', function(values) {
wmslayer_s2.setOpacity(values[0]*1);
});
// palette
$container.find('.palette').on("change", function() {
var palette = this.options[this.selectedIndex].text;
olgt_s2map.plotOptions.palette = palette;
olgt_s2map.redraw();
});
// datafunctions
$container.find('.datafunction').on("change", function() {
var func = this.options[this.selectedIndex].text;
olgt_s2map.plotOptions.dataFunction = datafunctions[func];
olgt_s2map.redraw();
});
});
</script>
</body>
</html>
Arquivo executável
+108
Ver Arquivo
@@ -0,0 +1,108 @@
<?php
require_once ("CLASSES/usuario.php");
include_once 'CLASSES/usuario.php';
require_once 'CLASSES/usuario.php';
$u = new Usuario;
?>
<!DOCTYPE>
<html>
<header>
<title>Cadastro</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
</header>
<body id="login">
<div id="corpo-cadastro">
<center>
<h1>Cadastrar</h1>
<form method="post">
<input type="text" name="nome" placeholder="Nome Completo" maxlength="80">
<input type="text" name="telefone" placeholder="Telefone" maxlength="30">
<input type="email" name="email" placeholder="Email" maxlength="40">
<input type="password" name="senha" placeholder="Senha" maxlength="15">
<input type="password" name="confSenha" placeholder="Confirmar Senha" maxlength="15">
<input type="submit" value="CADASTRAR">
</form>
</center>
</div>
<?php
// verificar a uma cadstro
if(isset($_POST['nome']))
{
$nome = $_POST['nome'];
$telefone = $_POST['telefone'];
$email = $_POST['email'];
$senha = $_POST['senha'];
$confirmarSenha = $_POST['confSenha'];
//verificar se todos os campos foram preenchidos
if(!empty($nome) && !empty($telefone) && !empty($email) && !empty($senha) && !empty($confirmarSenha)){
$u->conectar("atlas","localhost","ricardo","123");
if($u->mgsErro == ""){
if ($senha == $confirmarSenha) {
if($u->cadastrar($nome, $telefone, $email, $senha)){
?>
<center>
<div id="msg_certo">
Cadastrado com sucesso!
<a href="login.php"><strong>Logar</strong></a>
</div>
</center>
<?php
}else{
?>
<center>
<div class="msg_erro">
Email já cadastrado!
</div>
</center>
<?php
}
}else{
?>
<center>
<div class="msg_erro">
Senha e confirmar senha não são a mesma!
</div>
</center>
<?php
}
}else{
?>
<center>
<div class="msg_erro">
<?php echo "Erro: ".$u->msgErro; ?>
</div>
</center>
<?php
}
}else{
?>
<center>
<div class="msg_erro">
Preencha todos os campos!
</div>
</center>
<?php
// parte 4 15:13 minutos continuar
}
}
?>
</body>
</html>
Arquivo executável
+127
Ver Arquivo
@@ -0,0 +1,127 @@
*{
/margin: 0;
padding: 0;
}
/* Configuração página de index.html*/
body{
margin: 0;
}
#menuu ul{
margin: 0;
list-style: none;
margin-left: 47%;
margin-top: -6%;
}
#menuu ul li{
display: inline;
}
#menuu ul li a{
padding: 10px 20px;
display: inline-block;
font-size: 16pt;
color: black;
text-decoration: none;
}
#menuu ul li a:hover{
color: blue;
}
#logo{
height: 85px;
width: 125px;
display: inline;
}
#conta{
background-color: #99ff99;
}
#entrar{
background-color: #99ff99;
}
#centro{
margin-top: 7%;
}
/* Configuração página de Login*/
input{
display: block;
height: 10%;
width: 30%;
margin: 1%;
border-radius: 30px;
border: solid 2px black;
font-size: 16pt;
padding: 8px 16px;
outline: none;
background-color: rgb(255,255,255,0.4);
}
div#corpo-form{
margin-top: 9%;
}
body#login{
background-color: #609e86;
font-family: arial;
}
div#corpo-form h1{
padding: 2%;
}
div#corpo-form a{
color: rgb(19, 61, 69);
text-decoration: none;
}
div#corpo-form a:hover{
text-decoration: underline;
}
input[type=submit]{
background-color: #044447;
border: none;
cursor: pointer;
}
/*Página de Cadastro*/
div#corpo-cadastro{
margin-top: 4%;
}
div#msg_certo{
width: 400px;
margin: 10px auto;
padding: 10px;
background-color: #AAFF82/*rgba(50,205,50,.3)*/;
border: 1px solid rgb(34,139,34);
}
div.msg_erro{
width: 400px;
margin: 10px auto;
padding: 10px;
background-color: #FF622D/*rgba(250,128,114,.3)*/;
border: 1px solid rgb(165,42,42);
}
/*cofigurações de uma tabela*/
td{
padding: .7em;
margin: 0;
/*border: 1px solid #ccc;*/
text-align: center;
}
/* estilização cavas arquivo mapa.php*/
/*canvas{
border: solid 1px;
}*/
Arquivo executável
BIN
Ver Arquivo
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 38 KiB

Arquivo executável
BIN
Ver Arquivo
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 916 KiB

Arquivo executável
+33
Ver Arquivo
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>Atlas FB</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
</head>
<body>
<img id="logo" src="imagens/logo.jpg"/>
<div id="menuu">
<ul>
<li><a id="recurso" href="Teste_Mapa_Funcional/mapa.html" onclick="curSec(this.id)">Mapas</a></li>
<li><a id="ajuda" href="#ajuda" onclick="curSec(this.id)">Ajuda</a></li>
<li><a id="colab" href="#colab" onclick="curSec(this.id)">Colaboradores</a></li>
<li><a id="conta" href="login.php" onclick="">Fazer login</a></li>
<li><a id="entrar" href="cadastrar.php" onclick="">Cadastre-se</a></li>
</ul>
<center>
<img id="centro" src="imagens/logo.jpg"/>
</center>
</div>
</body>
</html>
Arquivo executável
+19
Ver Arquivo
@@ -0,0 +1,19 @@
var canvas = document.querySelector("canvas");
var contexto = canvas.getContext("2d");
var x = 0;
var y = 0;
var tamanhoImg = 400;
// function render(){
// contexto.clearRect(0,0,canvas.width,canvas.heigth);
// contexto.drawImage(mapa,x,y,tamanhoImg,tamanhoImg,0,0,canvas.width,canvas.heigth);
//}
function upadete{
}
function looping{
}
Arquivo executável
+85
Ver Arquivo
@@ -0,0 +1,85 @@
<?php
require_once ("CLASSES/usuario.php");
include_once 'CLASSES/usuario.php';
require_once 'CLASSES/usuario.php';
$u = new Usuario;
?>
<!DOCTYPE>
<html>
<header>
<title>Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
</header>
<body id="login">
<div id="corpo-form">
<center>
<h1>Entrar</h1>
<form method="POST">
<input type="email" name="email" placeholder="Email de Usuário">
<input type="password" name="senha" placeholder="Senha">
<input type="submit" value="ACESSAR" id="botaol">
<a href="cadastrar.php">Ainda ná é inscrito?<strong>Cadastre-se!</strong>
</a>
</form>
</center>
</div>
<?php
if(isset($_POST['email']))
{
$email = $_POST['email'];
$senha = $_POST['senha'];
//verificar se todos os campos foram preenchidos
if(!empty($email) && !empty($senha)){
$u->conectar("atlas","localhost","ricardo","123");
if($u->mgsErro == ""){
if($u->logar($email,$senha)){
header("location: upload.php");
}else{
?>
<center>
<div class="msg_erro">
Email ou senha incorretos!
</div>
</center>
<?php
}
}else{
?>
<center>
<div class="msg_erro">
<?php "Erro: ".$u->mgsErro; ?>
</div>
</center>
<?php
}
}else{
?>
<center>
<div class="msg_erro">
Prencha todos os campos!
</div>
</center>
<?php
}
}
?>
</body>
</html>
Arquivo executável
+121
Ver Arquivo
@@ -0,0 +1,121 @@
<?php
?>
<!DOCTYPE html>
<html>
<head>
<title>Mapa</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
<script language="javascript" src="javascript/funcoes.js"></script>
</head>
<body>
<center> <canvas width="1100" height="650"></canvas> </center>
</body>
<script type="text/javascript">
var LEFT = 37, UP = 38, RIGHT = 39, DOWN = 40, PGUP = 33, PGDOWN = 34;
var mvLeft = false, mvRight = false, mvUp = false, mvDown = false, zoomIn = false, zoomOut = false;
var cnv = document.querySelector("canvas");
var ctx = cnv.getContext("2d");
var X = 0;
var Y = 0;
var size = 400;
var speed = 2;
var map = new Image();
map.src = "upload/mapatemp.png";
map.onload = looping();
window.addEventListener("keydown",keydownHandler,false);
window.addEventListener("keyup",keyupHandler,false);
function keydownHandler(e){//função disparada quando uma tecla é pressionada
var key = e.keyCode;
switch(key){
case LEFT:
mvLeft = true;
break;
case RIGHT:
mvRight = true;
break;
case UP:
mvUp = true;
break;
case DOWN:
mvDown = true;
break;
case PGDOWN:
zoomOut = true;
break;
case PGUP:
zoomIn = true;
break;
}
}
function keyupHandler(e){//função disparada quando uma tecla é liberada
var key = e.keyCode;
switch(key){
case LEFT:
mvLeft = false;
break;
case RIGHT:
mvRight = false;
break;
case UP:
mvUp = false;
break;
case DOWN:
mvDown = false;
break;
case PGDOWN:
zoomOut = false;
break;
case PGUP:
zoomIn = false;
break;
}
}
function render(){
ctx.clearRect(0,0,cnv.width,cnv.height);
ctx.drawImage(map,X,Y,size,size,0,0,cnv.width,cnv.height);
}
function update(){
if(mvLeft){
if(X > speed){
X -= speed;
}
}
if(mvRight){
if(X + size < map.width - speed){
X += speed;
}
}
if(mvUp){
if(Y > speed){
Y -= speed;
}
}
if(mvDown){
if(Y + size < map.height - speed){
Y += speed;
}
}
if(zoomIn){
size -= speed;
}
if(zoomOut){
size += speed;
}
}
function looping(){//função que se repete 60x por segundo
requestAnimationFrame(looping,cnv);
update();//processa a interação
render();//desenha o mapa atualizado na tela
}
</script>
</html>
Arquivo executável
Ver Arquivo
Arquivo executável
Ver Arquivo
Arquivo executável
+7
Ver Arquivo
@@ -0,0 +1,7 @@
<?php
session_start();
unset($_SESSION['id_usuario']);
header("location: index.php");
?>
Arquivo executável
+16
Ver Arquivo
@@ -0,0 +1,16 @@
<!DOCTYPE>
<html>
<head>
<title>Imagens SVG</title>
<style>
.colorir{
fill : #CCCCCC;
}
</style>
</head>
<body>
<img src="imagens/logo.jpg" style="width: 132px;" class="colorir"/>
</body>
</html>
Arquivo executável
+112
Ver Arquivo
@@ -0,0 +1,112 @@
<?php
require_once ("CLASSES/usuario.php");
include_once 'CLASSES/usuario.php';
require_once 'CLASSES/usuario.php';
$u = new Usuario;
$msg = false;
if (isset($_FILES['arquivo'])) {
$u->conectar("atlas","localhost","ricardo","123");
$extensao = strtolower(substr($_FILES['arquivo']['name'], -5));
$novo_name = md5(time()) . $extensao;
$diretorio = "upload/";
$nome = $_POST['nome'];
//$t = imagejpeg($novo_name, null, 70);
move_uploaded_file($_FILES['arquivo']['tmp_name'], $diretorio.$novo_name);
$u->upload($novo_name, $nome);
}
$u->conectar("atlas","localhost","ricardo","123");
$sql = "SELECT * from mapas";
$consulta = $pdo->query($sql);
While($linha = $consulta->fetch(PDO::FETCH_ASSOC)){
$album[] = $linha;
# code...
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Upload Arquivo</title>
<meta charset="utf-8">
</head>
<body>
<h1>Upload de Arquivos</h1>
<?php
if (isset($_GET['id_atualizar'])) {
$codigo = $_GET['id_atualizar'];
$resposta = $u->buscarDadosMapa($codigo);
}
?>
<form action="upload.php" method="POST" enctype="multipart/form-data">
Nome do Mapa: <input type="text" name="nome" size="50" maxlength="50" id="s_nome" value="<?php if(isset($resposta)){echo $resposta['nome'];} ?>">
<br><br><br>
Arquivo: <input type="file" required name="arquivo" id="s_arquivo">
<input type="submit" value="<?php if(isset($resposta)){echo "Atualizar";}else{
echo "Cadastrar";} ?>">
<br><br><br>
<div>
<table border="1">
<tr>
<td>Nº Banco</td>
<td>Nome</td>
<td>Arquivo</td>
<td>Data/horário</td>
<td>Editar</td>
<td>Excluir</td>
</tr>
<?php
foreach ($album as $dado) {
$a = $a+1;
?>
<tr>
<td><?php echo $a; ?></td>
<td><?php echo $dado['nome']; ?></td>
<td><?php echo $dado['arquivo']; ?></td>
<td><?php echo $dado['data']; ?></td>
<td><a href="upload.php?id_atualizar=<?php echo $dado['codigo']; ?>">Editar</a></td>
<td><a href="upload.php?id_excluir=<?php echo $dado['codigo']; ?>">Excluir</a></td>
</tr>
<?php
}
if (isset($_GET['id_excluir'])) {
$id_mapa = addslashes($_GET['id_excluir']);
$u->excluirBanco($id_mapa);
header("location: upload.php");
}
?>
</table>
</div>
</form>
</body>
</html>
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 4.9 MiB