Commit | Line | Data |
---|---|---|
696f20d5 MS |
1 | <? |
2 | include("../../../manager/app.php"); | |
3 | include("../../../manager/inc/inc.restrict.php"); | |
4 | ||
5 | $output->ajaxHeader(); | |
6 | ||
7 | $sis_table = "sis_orgao"; | |
8 | $sis_table_rel = "sis_imagem_orgao"; | |
9 | ||
10 | $sql = "SELECT id, nome FROM sis_sistema ORDER BY nome ASC"; | |
11 | $rowsSistema = $db->execute($sql); | |
12 | ?> | |
13 | <style> | |
14 | table { | |
15 | color:#999999; | |
16 | font-family:Tahoma; | |
17 | font-size:10px; | |
18 | } | |
19 | input, select, textarea{ | |
20 | background:#FCFCFC none repeat scroll 0 0; | |
21 | border-color:#909090 #C0C0C0 #C0C0C0 #909090; | |
22 | border-style:solid; | |
23 | border-width:1px; | |
24 | color:#999999; | |
25 | font-family:Tahoma; | |
26 | font-size:10px; | |
27 | height:18px; | |
28 | padding:2px; | |
29 | width:150px; | |
30 | } | |
31 | .input { | |
32 | padding:3px; | |
33 | width:75%; | |
34 | } | |
35 | .tit { | |
36 | background:#F5F5F5 none repeat scroll 0 0; | |
37 | padding:5px; | |
38 | font-weight:bold; | |
39 | } | |
40 | .label { | |
41 | width:25%; | |
42 | text-align:right; | |
43 | } | |
44 | </style> | |
45 | <script src="../../../_system/js/default.js" type="text/javascript"></script> | |
46 | <script src="../../../_system/js/ajax.js" type="text/javascript"></script> | |
47 | <script type="text/javascript"> | |
48 | function busca(){ | |
49 | tmp_url = "../../../_config/exeptions/routines/routines_orgao.php?routine=busca_orgao"; | |
50 | ||
51 | var nome = document.getElementById("Nome"); | |
52 | var codigo = document.getElementById("Codigo"); | |
53 | var sistema = document.getElementById("Sistema"); | |
54 | ||
55 | var a = new Ajax(); | |
56 | a.onLoad = function() { | |
57 | parent.returnFromSearch(this.html); | |
58 | } | |
59 | a.get(tmp_url+"&nome="+nome.value+"&codigo="+codigo.value+"&sistema="+sistema.value); | |
60 | } | |
61 | function limpar(){ | |
62 | parent.clearSearch("td_result"); | |
63 | } | |
64 | </script> | |
65 | <table cellspacing="3" cellpadding="0" border="0" width="100%"> | |
66 | <tr> | |
67 | <td width="50%"> | |
68 | <table cellspacing="0" cellpadding="0" width="100%" border="0"> | |
69 | <tr> | |
70 | <td> | |
71 | <form id="frmBusca" name="frmBusca" method="post" target="iframeAux" action="" onsubmit="return false;"> | |
72 | <table cellspacing="3" cellpadding="0" width="220"> | |
73 | <tr> | |
74 | <td class="label"> | |
75 | Nome: | |
76 | </td> | |
77 | <td class="input"> | |
78 | <input type="text" id="Nome" name="nome"/> | |
79 | </td> | |
80 | </tr> | |
81 | <tr> | |
82 | <td class="label"> | |
83 | Código: | |
84 | </td> | |
85 | <td class="input"> | |
86 | <input type="text" id="Codigo" name="codigo"/> | |
87 | </td> | |
88 | </tr> | |
89 | <tr> | |
90 | <td class="label"> | |
91 | Sistema: | |
92 | </td> | |
93 | <td class="input"> | |
94 | <select id="Sistema" name="sistema"> | |
95 | <option value="">Selecione</option> | |
96 | <option value="">------</option> | |
97 | <? while(!$rowsSistema->EOF){?> | |
98 | <option value="<?=$rowsSistema->fields("id");?>"><?=$rowsSistema->fields("nome");?></option> | |
99 | <? $rowsSistema->moveNext(); | |
100 | }?> | |
101 | </select> | |
102 | </td> | |
103 | </tr> | |
104 | <tr> | |
105 | <td> | |
106 | </td> | |
107 | <td> | |
108 | <div style="width:150px;"> | |
109 | <div style="float:left;"> | |
110 | <a href="javascript: busca();">Buscar</a> | |
111 | </div> | |
112 | <div style="float:right;"> | |
113 | <a href="javascript: limpar();">Limpar</a> | |
114 | </div> | |
115 | </div> | |
116 | </td> | |
117 | </tr> | |
118 | </table> | |
119 | </form> | |
120 | </td> | |
121 | <td align="right"> | |
122 | <div style="width:110px;"> | |
123 | Atenção, a busca é automaticamente limitada em apenas 50 resultados, por favor, para um melhor resultado, seja específico em suas buscas. | |
124 | </div> | |
125 | </td> | |
126 | </tr> | |
127 | </table> | |
128 | </td> | |
129 | </tr> | |
130 | </table> |