Changeset 326 for trunk/admin/modules/Elezioni/ele_controlli.php
- Timestamp:
- Feb 8, 2020, 2:46:19 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_controlli.php
r324 r326 191 191 global $prefix,$dbi,$id_sede,$id_cons_gen,$genere; 192 192 ############################## 193 $err=0; $err2=0; 193 $err=0; $err2=0; $idrg=0; 194 194 $sql="SELECT id_gruppo FROM ".$prefix."_ele_gruppo where id_cons='$id_cons'"; 195 195 $resref = $dbi->prepare("$sql"); … … 209 209 if(($si+$no==$validi) and ($validi+$nulli+$bianchi+$contestati==$voti)) 210 210 continue; 211 else {$err=1; break;}212 213 211 else {$err=1; $idrg=$idrefgruppo; break;} 212 213 } 214 214 215 215 ############# 216 216 $tipo='referendum'; 217 $sql="select id from ".$prefix."_ele_controlli where tipo='$tipo' and id_sez='$id_sez' and id='$idrefgruppo'";217 $sql="select id from ".$prefix."_ele_controlli where tipo='$tipo' and id_sez='$id_sez'"; 218 218 $res = $dbi->prepare("$sql"); 219 219 $res->execute(); 220 220 $righe=$res->rowCount(); 221 221 if($righe){ 222 if(!$err){ 223 $sql="delete from ".$prefix."_ele_controlli where tipo='$tipo' and id ='$id_sez' ";222 if(!$err){ 223 $sql="delete from ".$prefix."_ele_controlli where tipo='$tipo' and id_sez='$id_sez' "; 224 224 $res = $dbi->prepare("$sql"); 225 225 $res->execute(); … … 228 228 } 229 229 if($err){ 230 $sql="insert into ".$prefix."_ele_controlli value('$id_cons','$id_sez','$tipo','$id _sez')";230 $sql="insert into ".$prefix."_ele_controlli value('$id_cons','$id_sez','$tipo','$idrg')"; 231 231 $res = $dbi->prepare("$sql"); 232 232 $res->execute(); 233 233 } 234 234 ############# 235 }236 235 237 236 }
Note:
See TracChangeset
for help on using the changeset viewer.