-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathresultado.php
131 lines (115 loc) · 3.77 KB
/
resultado.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
128
129
130
131
<?php
/**
* Arquivo responsável pela tela de resultado da comparação
*
* @package Base
* @subpackage Resultado
* @name BaseResultado
* @version 1.0
* @copyright Webart
* @author William Costa
*
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Resultado > Comparador de banco de dados</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="format-detection" http-equiv="Content-Type" content="text/html; charset=utf-8; telephone=no" />
<style>
html,body{
font-family:arial;
}
fieldset{
width:400px;
}
.bancoA{
color:#27ae60;
}
.bancoB{
color:#c0392b;
}
</style>
</head>
<body>
<h1>Comparador de banco de dados | resultado</h1>
Banco A: <strong><?=$_POST['bd']['banco'].'</strong> ('.$_POST['bd']['servidor'].')'?><br>
Banco B: <strong><?=$_POST['bd2']['banco'].'</strong> ('.$_POST['bd2']['servidor'].')'?><br><br>
<fieldset>
<legend>Tabelas únicas em Banco A</legend>
<ul class="bancoA">
<?php
foreach($analise['analiseTabelasAB'] as $key=>$value){
echo '<li><strong>'.$value.'</strong></li>';
}
?>
</ul>
</fieldset>
<br><br>
<fieldset>
<legend>Tabelas únicas em Banco B</legend>
<ul class="bancoB">
<?php
foreach($analise['analiseTabelasBA'] as $key=>$value){
echo '<li><strong>'.$value.'</strong></li>';
}
?>
</ul>
</fieldset>
<br><br>
<fieldset>
<legend>Alteração de colunas</legend>
<ul>
<?php
if(empty($analise['analiseColunasAB'])){
echo '<li class="bancoA"><strong>Não há alterações de colunas</strong></li>';
}else
foreach($analise['analiseColunasAB'] as $key=>$value){
echo '<li><strong>'.$key.'</strong><ul>';
echo '<li class="bancoA">Colunas únicas em <strong>Banco A</strong><ul>';
if(empty($value['a'])){
echo '<li><strong>Não há colunas únicas nesta tabela do Banco A</strong></li>';
}else
foreach($value['a'] as $key2=>$value2){
echo '<li><strong>'.$key2.'</strong></li>';
}
echo '</ul></li>';
echo '<li class="bancoB">Colunas únicas em <strong>Banco B</strong><ul>';
if(empty($value['b'])){
echo '<li><strong>Não há colunas únicas nesta tabela do Banco B</strong></li>';
}else
foreach($value['b'] as $key2=>$value2){
echo '<li><strong>'.$key2.'</strong></li>';
}
echo '</ul></li>';
echo '<li>Colunas alteradas<ul>';
if(empty($value['dif'])){
echo '<li><strong>Não há colunas alteradas nesta tabela</strong></li>';
}else
foreach($value['dif'] as $key2=>$value2){
echo '<li><strong>'.$key2.'</strong><ul>';
echo '<li class="bancoA"><strong>Banco A</strong><ul>';
foreach($value2['a'] as $key3=>$value3){
echo '<li>'.$key3.' = <strong>'.$value3.'</strong></li>';
}
echo '</ul></li>';
echo '<li class="bancoB"><strong>Banco B</strong><ul>';
foreach($value2['b'] as $key3=>$value3){
echo '<li>'.$key3.' = <strong>'.$value3.'</strong></li>';
}
echo '</ul></li>';
echo '</ul></li>';
}
echo '</ul></li>';
echo '</ul></li>';
}
?>
</ul>
</fieldset>
<br><br>
<fieldset>
<legend>Resultado</legend>
<h2><?=$analise['resultado']?></h2>
</fieldset>
</body>