-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexport_page.php
127 lines (118 loc) · 2.94 KB
/
export_page.php
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
session_start();
if(!isset($_SESSION['logado'])){
header("location: login.php");
}
if($_SESSION['permissao']==1){
header("location: redirect.php");
}
require 'connect.php';
?>
<!------BY BRUNO VASCONCELLOS - VIP DESENVOLVIMENTO------->
<!DOCTYPE html>
<!------BY BRUNO VASCONCELLOS - VIP DESENVOLVIMENTO------->
<html>
<head>
<title>Exportar</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="icon" type="icon" href="img/favicon.png">
<script src="js/jquery-3.2.1.slim.min.js"></script>
<script src="js/bootstrap.js"></script>
<style>
.del{
border-radius: 100%;
background-color: #ff0000a8;
padding-top: 3px;
color: white;
font-weight: bold;
font-family: Arial;
width: 30px;
}
.del:hover{
background-color: red;
}
</style>
</head>
<body>
<table align="center" width="100%" style="background-color: #150a50" border="0">
<tr>
<td align="right" style="width: 46%">
<a href="index2.php">
<img src="img/vip-white.png" width="100%" style="max-width: 200px">
</a>
</td>
<td>
<font style="font-weight: bold; font-size: 24px; font-family: Verdana; color: white">Exportar</font>
</td>
</tr>
</table>
<div style="position: absolute; right: 2px; top: 2px;" onclick="sair()">
<img src="img/sairr.png" width="60px" title='Sair'>
</div>
<script>
function sair(){
var op = confirm("Deseja realmente sair?");
if(op){
location.href = 'logout.php';
}
}
</script>
<div class="container" style="padding-top: 50px">
<center>
<h3>Exportar para CSV</h3>
</center>
<form action="cvs_down.php" method="GET">
<table align="center" class="table" style="width: 400px">
<tr>
<td>
<label>Tipo:</label>
</td>
<td>
<select name="tipo" class="form-control" id='tipo' required>
<option value=''>------</option>
<option value='casa'>Casa</option>
<option value='predio'>Predio</option>
</select>
</td>
</tr>
<tr>
<td>
<label>Cidade:</label>
</td>
<td>
<select name="cidade" class="form-control" id="cidade" required>
<option value="">Selecione um tipo</option>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<button type="submit" class="btn btn-success">Exportar</button>
</td>
</tr>
</table>
</form>
</div>
<?php
if(isset($_SESSION['alert'])){
if($_SESSION['alert']==1){
$_SESSION['alert']=0;
$msg = $_SESSION['msg'];
$tipo = $_SESSION['classe'];
echo '
<div class="alert bg-'.$tipo.' text-white" role="alert" style="position: fixed; bottom: 20px; left: 20px">
'.$msg.'
</div>';
}
}
?>
<script src="js/jquery.js"></script>
<script>
$(document).ready(function(){
$('#tipo').change(function(){
$('#cidade').load('cidade.php?cidade='+$('#tipo').val() );
});
});
</script>
</body>
</html>