-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathaidof_grafica.php
More file actions
executable file
·157 lines (139 loc) · 5.77 KB
/
aidof_grafica.php
File metadata and controls
executable file
·157 lines (139 loc) · 5.77 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?
/*
* E-cidade Software Publico para Gestao Municipal
* Copyright (C) 2009 DBselller Servicos de Informatica
* www.dbseller.com.br
* e-cidade@dbseller.com.br
*
* Este programa e software livre; voce pode redistribui-lo e/ou
* modifica-lo sob os termos da Licenca Publica Geral GNU, conforme
* publicada pela Free Software Foundation; tanto a versao 2 da
* Licenca como (a seu criterio) qualquer versao mais nova.
*
* Este programa e distribuido na expectativa de ser util, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implicita de
* COMERCIALIZACAO ou de ADEQUACAO A QUALQUER PROPOSITO EM
* PARTICULAR. Consulte a Licenca Publica Geral GNU para obter mais
* detalhes.
*
* Voce deve ter recebido uma copia da Licenca Publica Geral GNU
* junto com este programa; se nao, escreva para a Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*
* Copia da licenca no diretorio licenca/licenca_en.txt
* licenca/licenca_pt.txt
*/
session_start();
include("libs/db_conecta.php");
include("libs/db_stdlib.php");
parse_str($HTTP_SERVER_VARS["QUERY_STRING"]);
postmemory($HTTP_POST_VARS);
if(isset($pesq)){
if ($cod!=""){
$sql="select y08_codigo, y08_nota,y08_dtlanc,y08_quantlib,y08_notain,y08_notafi,y08_inscr,z01_nome,q09_descr
from aidof
inner join issbase on y08_inscr= q02_inscr
inner join cgm on q02_numcgm=z01_numcgm
inner join notasiss on q09_codigo= y08_nota
where y08_numcgm=$cgm and y08_codigo=$cod and (y08_quantlib is not null or y08_quantlib!=0) and (y08_cancel ='f' or y08_cancel is null ) order by z01_nome";
}elseif($inscr!=""){
$sql="select y08_codigo, y08_nota,y08_dtlanc,y08_quantlib,y08_notain,y08_notafi,y08_inscr,z01_nome,q09_descr
from aidof
inner join issbase on y08_inscr= q02_inscr
inner join cgm on q02_numcgm=z01_numcgm
inner join notasiss on q09_codigo= y08_nota
where y08_numcgm=$cgm and y08_inscr=$inscr and (y08_quantlib is not null or y08_quantlib!=0) and (y08_cancel ='f' or y08_cancel is null ) order by z01_nome";
}else{
$sql="select y08_codigo, y08_nota,y08_dtlanc,y08_quantlib,y08_notain,y08_notafi,y08_inscr,z01_nome,q09_descr
from aidof
inner join issbase on y08_inscr= q02_inscr
inner join cgm on q02_numcgm=z01_numcgm
inner join notasiss on q09_codigo= y08_nota
where y08_numcgm=$cgm and (y08_quantlib is not null or y08_quantlib!=0) and (y08_cancel ='f' or y08_cancel is null ) order by z01_nome";
}
}else{
$sql="select y08_codigo, y08_nota,y08_dtlanc,y08_quantlib,y08_notain,y08_notafi,y08_inscr,z01_nome,q09_descr
from aidof
inner join issbase on y08_inscr= q02_inscr
inner join cgm on q02_numcgm=z01_numcgm
inner join notasiss on q09_codigo= y08_nota
where y08_numcgm=$cgm and (y08_quantlib is not null or y08_quantlib!=0) and (y08_cancel ='f' or y08_cancel is null ) order by z01_nome";
}
//die($sql);
//$sql = "select * from aidof where y08_numcgm=$cgm and (y08_quantlib is not null or y08_quantlib!=0) and y08_cancel !=true";
$result=pg_query($sql);
$linha=pg_num_rows($result);
if($linha==0){
msgbox("Nenhum registro encontrado");
}
if(isset($verifica)){
$sqlver= "select * from aidofautenticidade where y01_codautenticidade ='$autent'";
//die($sqlver);
$resultver=pg_query($sqlver);
$linhasver = pg_num_rows($resultver);
if($linhasver>0){
msgbox("Codigo de autenticação correto");
}else{
msgbox("Codigo de autenticação incorreto");
}
}
?>
<html>
<head>
<title><?=$w01_titulo?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="scripts/db_script.js"></script>
<style type="text/css">
<?
db_estilosite();
?>
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<form name="form1" method="post" action="" >
<br><br>
<div align="center" class="titulo">Verificar autenticidade<br></div><br>
<div align="center" class="texto">Digite o número que se encontra acima do código de barras da certidão impressa</div><br>
<div align="center" class="texto" >
Código de autenticidade<input name="autent" type="text" size="40" value=""> <input name="verifica" type="submit" value="Verificar" class="botao">
</div><br><br>
<div><hr></div>
<br>
<div align="center" class="titulo">Consulta Aidofs liberadas<br></div><br>
<div align="center" class="texto" >
Código<input name="cod" type="text" value""> <b> OU </b>
Inscrição <input name="inscr" type="text" value"">
<input name="pesq" type="submit" value="Pesquisar" class="botao">
</div>
<br>
<table class="tab" align="center" width="80%">
<tr>
<th align="center">Código</th>
<th align="center">Tipo de nota</th>
<th align="center">Data</th>
<th align="center">Quant. liberada</th>
<th align="center">Numeração</th>
<th align="center">Inscrição</th>
<th align="center">Cliente</th>
</tr>
<?
for($i = 0;$i < $linha; $i++){
db_fieldsmemory($result,$i);
echo"
<tr>
<td align='center'>$y08_codigo</td>
<td align='center'>$q09_descr</td>
<td align='center'>".db_formatar($y08_dtlanc,'d')."</td>
<td align='center'>$y08_quantlib</td>
<td align='center'>$y08_notain a $y08_notafi</td>
<td align='center'>$y08_inscr</td>
<td align='left'>$z01_nome</td>
</tr>
";
}
?>
</table>
</form>
</body>
</html>