index.php
4.34 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
<?
/*
Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil
Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais
O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como
publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opnião) qualquer versão.
Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer
MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes.
Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software
Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
session_start();
if ($_POST['submit']) {
header ("Location: incluir_software.php");
}
include_once "../../include/library.php";
// Comentado temporariamente - AntiSpy();
Conecta_bd_cacic();
$query = 'SELECT *
FROM softwares s
ORDER BY nm_software';
$result = mysql_query($query);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../../include/cacic.css">
<title>Cadastro de Softwares</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body background="../../imgs/linha_v.gif">
<script language="JavaScript" type="text/javascript" src="../../include/cacic.js"></script>
<form name="form1" method="post" action="">
<table width="90%" border="0" align="center">
<tr>
<td class="cabecalho">Cadastro de Softwares</td>
</tr>
<tr>
<td class="descricao">Neste módulo deverão ser cadastrados
os softwares avulsos, manipulados pelo sistema.</td>
</tr>
</table>
<br><table border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><div align="center">
<input name="submit" type="submit" id="submit" value="Incluir Novo Software" <? echo ($_SESSION['cs_nivel_administracao']<>1?'disabled':'')?>>
</div></td>
</tr>
<tr>
<td height="10"> </td>
</tr>
<tr>
<td height="10"><? echo $msg;?></td>
</tr>
<tr>
<td> <table border="0" cellpadding="2" cellspacing="0" bordercolor="#333333" align="center">
<tr>
<td height="1" bgcolor="#333333" colspan="5"></td>
</tr>
<tr bgcolor="#E1E1E1" nowrap>
<td align="center" nowrap> </td>
<td align="center" nowrap><div align="left"></div></td>
<td align="center" nowrap> </td>
<td nowrap class="cabecalho_tabela"><div align="left">Nome do Software</div></td>
<td nowrap > </td>
</tr>
<tr>
<td height="1" bgcolor="#333333" colspan="5"></td>
</tr>
<?
if(mysql_num_rows($result)==0)
{
$msg = '<div align="center">
<font color="red" size="1" face="Verdana, Arial, Helvetica, sans-serif">
Nenhum software cadastrado
</font><br><br></div>';
}
else
{
$Cor = 0;
$NumRegistro = 1;
while($row = mysql_fetch_array($result))
{
?>
<tr
<? if ($Cor)
echo 'bgcolor="#E1E1E1"';
?>>
<td nowrap> </td>
<td nowrap class="opcao_tabela"><div align="left"><? echo $NumRegistro; ?></div></td>
<td nowrap> </td>
<td nowrap class="opcao_tabela"><div align="left"><a href="detalhes_software.php?id_software=<? echo $row['id_software'];?>"><? echo $row['nm_software']; ?></a></div></td>
<td nowrap> </td>
<?
$Cor=!$Cor;
$NumRegistro++;
}
}
?>
<tr>
<td height="1" bgcolor="#333333" colspan="5"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10"> </td>
</tr>
<tr>
<td height="10"><? echo $msg;?></td>
</tr>
<tr>
<td><div align="center">
<input name="submit" type="submit" id="submit" value="Incluir Novo Software" <? echo ($_SESSION['cs_nivel_administracao']<>1?'disabled':'')?>>
</div></td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>