Changeset 368 for trunk/admin/modules
- Timestamp:
- May 17, 2022, 10:59:01 AM (3 years ago)
- Location:
- trunk/admin/modules/Elezioni
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_permessi.php
r367 r368 205 205 $res->execute(); 206 206 list ($num_sez)=$res->fetch(PDO::FETCH_NUM); 207 }elseif($id_sede) { 208 $sql="select indirizzo from ".$prefix."_ele_sede where id_sede='$id_sede'"; 209 $res = $dbi->prepare("$sql"); 210 $res->execute(); 211 list ($indsede)=$res->fetch(PDO::FETCH_NUM); 207 212 } 208 213 $sql="select data_inizio from ".$prefix."_ele_consultazione where id_cons_gen='$id_cons_gen'"; … … 220 225 if(!$res->rowCount()) continue; 221 226 list ($id_sez,$id_sede)=$res->fetch(PDO::FETCH_NUM); 227 }elseif($id_sede) { 228 $sql="select id_sede from ".$prefix."_ele_sede where id_cons='$id_cons' and indirizzo='$indsede'"; 229 $res = $dbi->prepare("$sql"); 230 $res->execute(); 231 if(!$res->rowCount()) continue; 232 list ($id_sede)=$res->fetch(PDO::FETCH_NUM); 222 233 } 223 234 $sql="select aid from ".$prefix."_ele_operatori where id_cons='$id_cons' and aid='$aid2'"; -
trunk/admin/modules/Elezioni/ele_voti.php
r365 r368 193 193 // Circoscrizione : scelta 194 194 /////////////////////// 195 196 $sql="SELECT t1.id_sede,t2.id_circ FROM ".$prefix."_ele_operatori as t1,195 # if($id_sez) $consez=" and id_sez 196 $sql="SELECT t1.id_sede,t2.id_circ,t1.id_sez FROM ".$prefix."_ele_operatori as t1, 197 197 ".$prefix."_ele_sede as t2 198 198 where t1.id_cons='$id_cons' AND t1.id_sede=t2.id_sede and t1.aid='$aid'"; … … 201 201 202 202 203 list($id_sede2,$id_circ2) = $resoper->fetch(PDO::FETCH_NUM); 203 list($id_sede2,$id_circ2,$id_sez2) = $resoper->fetch(PDO::FETCH_NUM); 204 if($id_sez2) $id_sez=$id_sez2; 204 205 if ($id_sede2 and !($id_sede==$id_sede2)) { 205 206 $id_sede=$id_sede2; 206 207 $id_circ=$id_circ2; 207 208 $do="spoglio"; 208 $sql="SELECT id_sez FROM ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sede=$id_sede order by num_sez limit 0,1"; 209 $res = $dbi->prepare("$sql"); 210 $res->execute(); 211 212 213 list($id_sez) = $res->fetch(PDO::FETCH_NUM); 209 $sql="SELECT id_sez FROM ".$prefix."_ele_sezioni where id_sez='$id_sez'"; 210 $res = $dbi->prepare("$sql"); 211 $res->execute(); 212 if(!$res->rowCount()) { 213 $sql="SELECT id_sez FROM ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sede=$id_sede order by num_sez limit 0,1"; 214 $res = $dbi->prepare("$sql"); 215 $res->execute(); 216 list($id_sez) = $res->fetch(PDO::FETCH_NUM); 217 } 214 218 } 215 219 if ($do == "circo") {
Note:
See TracChangeset
for help on using the changeset viewer.