Changeset 368 for trunk/admin/modules/Elezioni/ele_voti.php
- Timestamp:
- May 17, 2022, 10:59:01 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.