-
Notifications
You must be signed in to change notification settings - Fork 1
/
mostraTabelas.php
55 lines (52 loc) · 1.65 KB
/
mostraTabelas.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
<?php
include("classes/Gerador.php");
$gerador = new Gerador();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Instalação - Trady</title>
<link href="materialize/css/tabela.css" rel="stylesheet">
</head>
<script language="javascript">
// função para selecionar todas as tabelas
function check(count) {
var elem = document.formTabelas.elements;
if(count == 0) {
for(i=0;i<elem.length;i++) {
var x = elem[i];
if(x.name == "tabelas[]") {
x.checked = true;
}
}
} else {
for(i=0;i<elem.length;i++) {
var x = elem[i];
if(x.name == "tabelas[]") {
x.checked = false;
}
}
}
}
</script>
<body>
<form id="formTabelas" name="formTabelas" method="post" action="gerarClasses.php">
<p class="center">Seleccione as tabela a serem mapeadas</p>
<div class="up">
<a href="#" onclick="check(0)">Marcar Tudo</a>
<a href="#" onclick="check(1)">Desmarcar</a>
</div>
<?php foreach($gerador->selecionaTBLs() as $tabela) {?>
<div class="row">
<input type="checkbox" value="<?php echo $tabela->getTabela();?>" name="tabelas[]" id="tabelas[]" />
<?php echo $tabela->getTabela();?>
</div>
<?php }?>
<input name="banco" type="hidden" id="banco" value="<?php echo $_POST['banco'];?>" />
<input name="Submit" type="submit" class="formButton" id="button" value="Gerar Classes" />
</form>
<?php echo $gerador->getCopyright();?></td>
</body>
</html>