Changeset 394 for trunk/admin
- Timestamp:
- May 21, 2023, 1:46:40 AM (18 months ago)
- Location:
- trunk/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_colora_sez.php
r342 r394 20 20 $res->execute(); 21 21 }else{ #candidati 22 $sql="SELECT t 2.id_listaFROM ".$prefix."_ele_voti_candidati as t1 left join ".$prefix."_ele_candidati as t2 on t1.id_cand=t2.id_cand where t1.id_cons='$id_cons' and t1.id_sez='$id_sez' group by t2.id_lista";22 $sql="SELECT t1.num_cand FROM ".$prefix."_ele_voti_candidati as t1 left join ".$prefix."_ele_candidati as t2 on t1.id_cand=t2.id_cand where t1.id_cons='$id_cons' and t1.id_sez='$id_sez' group by t2.id_lista"; 23 23 $res = $dbi->prepare("$sql"); 24 24 $res->execute(); 25 25 $liste=$res->rowCount(); 26 26 list($listescru)=$res->fetch(PDO::FETCH_NUM); 27 if($res->rowCount() and $listescru==0) {$listescru=1;$liste=0;} 27 28 $sql="SELECT count(id_lista) FROM ".$prefix."_ele_lista where id_cons='$id_cons' $iscirco"; 28 29 $res = $dbi->prepare("$sql"); 29 30 $res->execute(); 30 31 list($ltot)=$res->fetch(PDO::FETCH_NUM); 31 if( $liste && $liste==$ltot){32 if(($liste && $liste==$ltot) or $listescru){ 32 33 $sezstat=2; 33 $sql="UPDATE ".$prefix."_ele_sezioni set colore='#99CC33' where id_cons='$id_cons' and id_sez='$id_sez'"; #VERDE34 $sql="UPDATE ".$prefix."_ele_sezioni set colore='#99CC33' where id_cons='$id_cons' and id_sez='$id_sez'"; ;#VERDE 34 35 $res = $dbi->prepare("$sql"); 35 36 $res->execute(); -
trunk/admin/modules/Elezioni/ele_spoglio.php
r392 r394 670 670 671 671 function finale($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops){ 672 global $aid, $prefix, $dbi,$id_cons_gen,$genere,$votog,$fascia,$limite ;672 global $aid, $prefix, $dbi,$id_cons_gen,$genere,$votog,$fascia,$limite,$scrtest; 673 673 //////////////////////////////////////////// 674 674 // da qua va la sezione per i voti finali … … 676 676 $bgcolor1="#7777ff"; 677 677 $bgcolor2=$_SESSION['bgcolor2']; 678 679 680 681 echo "<form name=\"spogliovoti\" data-ajax=\"false\" action=\"modules/Elezioni/salva_voti.php\">" 682 ."<input type=\"hidden\" name=\"op\" value=\"rec_finale\">"; 683 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">" 684 ."<input type=\"hidden\" name=\"id_cons\" value=\"$id_cons\">" 685 ."<input type=\"hidden\" name=\"id_sez\" value=\"$id_sez\">" 686 ."<input type=\"hidden\" name=\"id_circ\" value=\"$id_circ\">" 687 ."<input type=\"hidden\" name=\"id_sede\" value=\"$id_sede\">"; 678 echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n" 679 ."//-->\n"; 680 echo "function setsez() {\n"; 681 echo "document.getElementById('spogliovoti').submit(); }\n"; 682 echo "</script>\n"; 683 684 $sql="select * from ".$prefix."_ele_voti_lista where id_cons=$id_cons and id_sez=$id_sez and id_lista=0"; 685 $res = $dbi->prepare("$sql"); 686 $res->execute(); 687 $stato=$res->rowCount(); 688 if($stato) $stato='checked'; else $stato=''; 689 echo "<form name=\"spogliovoti\" id=\"spogliovoti\" data-ajax=\"false\" action=\"modules/Elezioni/salva_voti.php\">" 690 ."<input type=\"hidden\" name=\"op\" value=\"rec_finale\">"; 691 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">" 692 ."<input type=\"hidden\" name=\"id_cons\" value=\"$id_cons\">" 693 ."<input type=\"hidden\" name=\"id_sez\" value=\"$id_sez\">" 694 ."<input type=\"hidden\" name=\"id_circ\" value=\"$id_circ\">" 695 ."<input type=\"hidden\" name=\"id_sede\" value=\"$id_sede\">"; 696 if($scrtest) 697 echo "<div style=\"text-align:right;\">Considerare la sezione come scrutinata? <input type=\"checkbox\" name=\"scrutinata\" id=\"scrutinata\" value=\"true\" $stato onclick=\"setsez()\";> <br></div>"; 688 698 689 699 echo "<table border=\"0\" width=\"100%\" align=\"center\"><tr bgcolor=\"$bgcolor1\" align=\"center\">"; … … 750 760 751 761 function preferenze_gruppi($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops){ 752 global $aid, $prefix, $dbi, $tipo_cons, $genere,$id_cons_gen,$sezi,$circo,$dettnulli ;762 global $aid, $prefix, $dbi, $tipo_cons, $genere,$id_cons_gen,$sezi,$circo,$dettnulli,$scrtest; 753 763 //////////////////////////////////////////// 754 764 // da qua va la sezione per le preferenze ai gruppi … … 938 948 ."<td colspan=\"2\"><b>"._VOTANTI."</b></td></tr>"; 939 949 }else{ 940 echo "<br><br> 950 echo "<br><br><table class=\"table-menu\" style=\"width: 100%; color: black\"><tr align=\"center\" bgcolor=\"$bgcolor1\">" 941 951 ."<td width=\"3%\"><b>"._NUM."</b></td>" 942 952 ."<td width=\"50%\"><b>"._GRUPPO."</b></td>"; … … 956 966 $tot_pref=0; 957 967 $totsg=0; 958 $pro=array();959 $pro['voti']='';960 $pro['solo_gruppo']='';961 968 while(list($id_cons2,$id_gruppo,$num_gruppo, $descr_gruppo, $simbolo) = $result->fetch(PDO::FETCH_NUM)){ 962 969 echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n" … … 1012 1019 $res = $dbi->prepare("$sql"); 1013 1020 $res->execute(); 1014 if($res->rowCount())1015 $pro= $res->fetch(PDO::FETCH_BOTH);1021 $pro= $res->fetch(PDO::FETCH_BOTH); 1022 if(!$res->rowCount()) {$pro['voti']=''; $pro['solo_gruppo']='';} 1016 1023 $errcolor=''; 1017 1024 if(isset($errgrulis[$id_gruppo])) {$errcolor="style=\"background-color: rgb(255, 0, 0);\"";} … … 1046 1053 } 1047 1054 echo "</td></tr></table></center>"; 1048 } 1055 $scrtest=0; 1056 }else{$scrtest=1;} 1049 1057 if ($genere!=0){ 1050 1058 finale($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops); -
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')"; -
trunk/admin/versione.php
r393 r394 1 1 <?php 2 2 3 $versione = "3.0 rev 39 3";3 $versione = "3.0 rev 394"; 4 4 $version_number = $versione; 5 $datarel = " 05 marzo 2023";5 $datarel = "21 maggio 2023"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7
Note:
See TracChangeset
for help on using the changeset viewer.