Changeset 394 for trunk/admin/modules/Elezioni/salva_voti.php
- Timestamp:
- May 21, 2023, 1:46:40 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/salva_voti.php
r352 r394 39 39 if (isset($_GET['ops'])) $ops=intval($_GET['ops']); else $ops=''; 40 40 if (isset($_GET['delete'])) $delete=intval($_GET['delete']); else $delete=''; 41 41 if (isset($_GET['scrutinata'])) {$scrutinata=$_GET['scrutinata']==false ? false : true;}else $scrutinata=false; 42 #$_SESSION['scrutinata']=$scrutinata; 43 #if(isset($_SESSION['scrutinata'])) $scrutinata=$_SESSION['scrutinata']; #else $scrutinata=false; 42 44 global $prefix,$id_parz,$genere,$fileout,$id_cons; 43 45 if (!isset($fileout)) $fileout=''; … … 69 71 $res->execute(); 70 72 if ($fileout) fwrite($fp,"$sql;\n"); 73 ###### 74 #include($sql."TEST: scru=$scrutinata"); 75 if(isset($scrutinata)) 76 { 77 $sql="delete from ".$prefix."_ele_voti_gruppo where id_cons='$id_cons' and id_sez='$id_sez' and num_gruppo=0"; 78 $res = $dbi->prepare("$sql"); 79 $res->execute(); 80 $sql="delete from ".$prefix."_ele_voti_lista where id_cons='$id_cons' and id_sez='$id_sez' and num_lista=0"; 81 $res = $dbi->prepare("$sql"); 82 $res->execute(); 83 $sql="delete from ".$prefix."_ele_voti_candidati where id_cons='$id_cons' and id_sez='$id_sez' and num_cand=0"; 84 $res = $dbi->prepare("$sql"); 85 $res->execute(); 86 if($scrutinata==true) 87 { 88 # provare insert dei soli id_cons e id_sez 89 $sql="insert into ".$prefix."_ele_voti_gruppo (id_cons,id_sez,num_gruppo) values('$id_cons','$id_sez',0)"; 90 $res = $dbi->prepare("$sql"); 91 $res->execute(); 92 $sql="insert into ".$prefix."_ele_voti_lista (id_cons,id_sez) values('$id_cons','$id_sez')"; 93 $res = $dbi->prepare("$sql"); 94 $res->execute(); 95 $sql="insert into ".$prefix."_ele_voti_candidati (id_cons,id_sez,num_cand) values('$id_cons','$id_sez',0)"; 96 $res = $dbi->prepare("$sql"); 97 $res->execute(); 98 # 99 } 100 } 71 101 /*}else{ 72 102 $sql="insert into ".$prefix."_ele_log values('$id_cons','$id_sez','$aid','','','validi:$ar[6] nulli:$ar[7] bianchi:$ar[8] contestati:$ar[9] voti_nulli:$ar[13]','validi=$validi, nulli=$nulli,bianchi=$bianchi,contestati=$contestati, voti_nulli=$votinulli','_ele_sezioni')";
Note:
See TracChangeset
for help on using the changeset viewer.