Commit 27046452384c6ab20adf1fe62ad59298834a7b9e
1 parent
7531d8a7
Exists in
mysqli
Classe DB
Showing
1 changed file
with
15 additions
and
14 deletions
Show diff stats
restrito/lda_solicitacao/cadastro.php
... | ... | @@ -10,6 +10,7 @@ |
10 | 10 | |
11 | 11 | include("manutencao.php"); |
12 | 12 | include("../inc/topo.php"); |
13 | + include_once(DIR_CLASSES_LEIACESSO."/db.class.php"); | |
13 | 14 | ?> |
14 | 15 | |
15 | 16 | <script language="JavaScript" src="../js/XmlHttpLookup.js"></script> |
... | ... | @@ -113,8 +114,8 @@ |
113 | 114 | <td align="left" width="100%"> |
114 | 115 | <select name="idsecretaria" id="idsecretaria" onchange="preencheCombo('idcategoriaproblema','imgCarregandoCategoria','buscacategoriaproblema',this.value);"> |
115 | 116 | <option value="">-- selecione --</option> |
116 | - <?php $rsCat = execQuery("select * from sis_secretaria order by nome"); ?> | |
117 | - <?php while($row=mysql_fetch_array($rsCat)){?> | |
117 | + <?php $rsCat = DB::execQuery("select * from sis_secretaria order by nome"); ?> | |
118 | + <?php while($row=mysqli_fetch_array($rsCat)){?> | |
118 | 119 | <option value="<?php echo $row['idsecretaria'];?>" <?php echo $row['idsecretaria']==$idsecretaria?"selected":""; ?>><?php echo $row['nome'];?></option> |
119 | 120 | <?php }?> |
120 | 121 | </select> |
... | ... | @@ -125,8 +126,8 @@ |
125 | 126 | <td align="left" width="100%"> |
126 | 127 | <select name="idcategoriaproblema" id="idcategoriaproblema" onchange="preencheCombo('idproblema','imgCarregandoProblema','buscaproblema',this.value);"> |
127 | 128 | <option value="">-- selecione --</option> |
128 | - <?php $rsCat = execQuery("select * from ouv_categoriaproblema where status = 1 and idsecretaria = '$idsecretaria' order by descricao"); ?> | |
129 | - <?php while($row=mysql_fetch_array($rsCat)){?> | |
129 | + <?php $rsCat = DB::execQuery("select * from ouv_categoriaproblema where status = 1 and idsecretaria = '".DB::esc($idsecretaria)."' order by descricao"); ?> | |
130 | + <?php while($row=mysqli_fetch_array($rsCat)){?> | |
130 | 131 | <option value="<?php echo $row['idcategoriaproblema'];?>" <?php echo $row['idcategoriaproblema']==$idcategoriaproblema?"selected":""; ?>><?php echo $row['descricao'];?></option> |
131 | 132 | <?php }?> |
132 | 133 | </select> |
... | ... | @@ -138,8 +139,8 @@ |
138 | 139 | <td align="left" width="100%"> |
139 | 140 | <select name="idproblema" id="idproblema"> |
140 | 141 | <option value="">-- selecione --</option> |
141 | - <?php $rsCat = execQuery("select * from ouv_problema where statusproblema = 1 and idcategoria = '$idcategoriaproblema' order by tituloproblema"); ?> | |
142 | - <?php while($row=mysql_fetch_array($rsCat)){?> | |
142 | + <?php $rsCat = DB::execQuery("select * from ouv_problema where statusproblema = 1 and idcategoria = '".DB::esc($idcategoriaproblema)."' order by tituloproblema"); ?> | |
143 | + <?php while($row=mysqli_fetch_array($rsCat)){?> | |
143 | 144 | <option value="<?php echo $row['idproblema'];?>" <?php echo $row['idproblema']==$idproblema?"selected":""; ?>><?php echo $row['tituloproblema'];?></option> |
144 | 145 | <?php }?> |
145 | 146 | </select> |
... | ... | @@ -163,8 +164,8 @@ |
163 | 164 | <td align="left"> |
164 | 165 | <select name="idbairroservico" id="idbairroservico" onchange="preencheCombo('idcomunidadeservico','imgCarregando','buscacomunidade',this.value);"> |
165 | 166 | <option value="">- Bairro -</option> |
166 | - <?php $rsBai = execQuery("select * from gen_bairros where municipio_id = 7221 order by nome"); ?> | |
167 | - <?php while($row=mysql_fetch_array($rsBai)){?> | |
167 | + <?php $rsBai = DB::execQuery("select * from gen_bairros where municipio_id = 7221 order by nome"); ?> | |
168 | + <?php while($row=mysqli_fetch_array($rsBai)){?> | |
168 | 169 | <option value="<?php echo $row['id'];?>" <?php echo $row['id']==$idbairroservico?"selected":""; ?>><?php echo $row['nome'];?></option> |
169 | 170 | <?php }?> |
170 | 171 | </select> |
... | ... | @@ -175,8 +176,8 @@ |
175 | 176 | <td align="left"> |
176 | 177 | <select name="idcomunidadeservico" id="idcomunidadeservico" > |
177 | 178 | <option value="">- Comunidade -</option> |
178 | - <?php $rsCom = execQuery("select * from gen_conjuntohabitacional where idbairro = $idbairroservico order by descricaoconjuntohabitacional"); ?> | |
179 | - <?php while($row=mysql_fetch_array($rsCom)){?> | |
179 | + <?php $rsCom = DB::execQuery("select * from gen_conjuntohabitacional where idbairro = ".DB::esc($idbairroservico)." order by descricaoconjuntohabitacional"); ?> | |
180 | + <?php while($row=mysqli_fetch_array($rsCom)){?> | |
180 | 181 | <option value="<?php echo $row['idconjuntohabitacional'];?>" <?php echo $row['idconjuntohabitacional']==$idcomunidadeservico?"selected":""; ?>><?php echo $row['descricaoconjuntohabitacional'];?></option> |
181 | 182 | <?php }?> |
182 | 183 | </select> |
... | ... | @@ -229,9 +230,9 @@ |
229 | 230 | <table align="center" width="100%" cellpadding="0" cellspacing="1"> |
230 | 231 | <tr><th>Arquivos enviados</th></tr> |
231 | 232 | <?php |
232 | - $rsAnexo = execQuery("select * from ouv_demandaanexo where iddemanda=$iddemanda order by idanexodemanda"); | |
233 | + $rsAnexo = DB::execQuery("select * from ouv_demandaanexo where iddemanda=".DB::esc($iddemanda)." order by idanexodemanda"); | |
233 | 234 | $i=0; |
234 | - while($row = mysql_fetch_array($rsAnexo)){ | |
235 | + while($row = mysqli_fetch_array($rsAnexo)){ | |
235 | 236 | $i++; |
236 | 237 | ?> |
237 | 238 | <tr> |
... | ... | @@ -299,8 +300,8 @@ |
299 | 300 | <input type="text" name="cidadesolicitante" onmouseover="this.title=this.value" id="cidade" value="<?php echo $cidadesolicitante;?>" maxlength="255" size="38"> |
300 | 301 | <select name="estadosolicitante" id="uf"> |
301 | 302 | <option value="">- UF -</option> |
302 | - <?php $rsuf = execQuery("select * from gen_estados order by sigla"); ?> | |
303 | - <?php while($row=mysql_fetch_array($rsuf)){?> | |
303 | + <?php $rsuf = DB::execQuery("select * from gen_estados order by sigla"); ?> | |
304 | + <?php while($row=mysqli_fetch_array($rsuf)){?> | |
304 | 305 | <option value="<?php echo $row['sigla'];?>" <?php echo $row['sigla']==$estadosolicitante?"selected":""; ?>><?php echo $row['sigla'];?></option> |
305 | 306 | <?php }?> |
306 | 307 | </select> | ... | ... |