Changeset 326 for trunk/admin
- Timestamp:
- Feb 8, 2020, 2:46:19 PM (5 years ago)
- Location:
- trunk/admin/modules/Elezioni
- Files:
-
- 2 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 } -
trunk/admin/modules/Elezioni/salva_ref.php
r262 r326 38 38 if (isset($_GET['votinulli'])) $votinulli=intval($_GET['votinulli']); else $votinulli='0'; 39 39 if (isset($_GET['id_comune'])) $id_comune=intval($_GET['id_comune']); else $id_comune='0'; 40 if (isset($_GET['ops'])) $ops=intval($_GET['ops']); else $ops=' 0';40 if (isset($_GET['ops'])) $ops=intval($_GET['ops']); else $ops='4'; 41 41 if (isset($_GET['delete'])) $delete=intval($_GET['delete']); else $delete=''; 42 42 if (isset($_GET['circo'])) get_magic_quotes_gpc() ? $circo=$_GET['circo']:$circo=addslashes($_GET['circo']); else $circo=''; … … 64 64 ################## 65 65 if($do==1) { 66 $sql="delete from ".$prefix."_ele_ voti_ref where id_cons='$id_cons' and id_sez='$id_sez'";66 $sql="delete from ".$prefix."_ele_gruppo where id_cons='$id_cons'"; 67 67 $res = $dbi->prepare("$sql"); 68 68 $res->execute(); 69 69 }else{ 70 70 71 $sql="select num_gruppo from ".$prefix."_ele_ voti_ref where id_cons='$id_cons' and id_sez='$id_sez'";71 $sql="select num_gruppo from ".$prefix."_ele_gruppo where id_cons='$id_cons'"; 72 72 $result = $dbi->prepare("$sql"); 73 73 $result->execute();
Note:
See TracChangeset
for help on using the changeset viewer.