formulario.php
2.21 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
<?php
/**********************************************************************************
Sistema e-SIC Livre: sistema de acesso a informação baseado na lei de acesso.
Copyright (C) 2014 Prefeitura Municipal do Natal
Este programa é software livre; você pode redistribuí-lo e/ou
modificá-lo sob os termos da Licença GPL2.
***********************************************************************************/
//retorna erro de uma ação se houver (em alert do javascript)
getErro($erro);
?>
<script>
function edita(sistema, diretorioarquivos, urlarquivos){
document.getElementById("sistema").value = sistema;
document.getElementById("diretorioarquivos").value = diretorioarquivos;
document.getElementById("urlarquivos").value = urlarquivos;
document.getElementById("acao").value = "Alterar";
document.getElementById("sistema").focus();
document.getElementById("sistema").readOnly = true;
}
function limpaCampos()
{
document.getElementById("sistema").value = "";
document.getElementById("diretorioarquivos").value = "";
document.getElementById("urlarquivos").value = "";
document.getElementById("acao").value = "Incluir";
document.getElementById("sistema").readOnly = false;
document.getElementById("sistema").focus();
}
</script>
<form method="post">
<!--input type="hidden" name="sistema" value="<?php echo $sistema;?>" id="sistema"-->
<table class="lista">
<tr>
<td>Sistema:</td>
<td>
<input type="text" name="sistema" value="<?php echo $sistema;?>" maxlength="8" size="10" id="sistema" />
</td>
</tr>
<tr>
<td>Diretório Arquivos:</td>
<td>
<input type="text" name="diretorioarquivos" value="<?php echo $diretorioarquivos;?>" maxlength="100" size="50" id="diretorioarquivos" />
</td>
</tr>
<tr>
<td>URL Arquivos:</td>
<td>
<input type="text" name="urlarquivos" value="<?php echo $urlarquivos;?>" maxlength="100" size="50" id="urlarquivos" />
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="<?php echo $acao;?>" name="acao" id="acao" />
<input type="button" value="Limpar" onClick="limpaCampos()" name="limpar" id="limpar" /></td>
</tr>
</table>
</form>
<script>
//seta o foco
document.getElementById("sistema").focus();
</script>