Changeset 328 for trunk/admin
- Timestamp:
- Feb 16, 2020, 11:20:46 PM (5 years ago)
- Location:
- trunk/admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_colora_sez.php
r264 r328 43 43 if($genere) 44 44 $sql="SELECT id_gruppo FROM ".$prefix."_ele_voti_gruppo where id_sez='$id_sez'"; 45 else 45 else{ 46 $sql="SELECT id_gruppo FROM ".$prefix."_ele_gruppo where id_cons='$id_cons'"; 47 $res = $dbi->prepare("$sql"); 48 $res->execute(); 49 $righeref=$res->rowCount(); 46 50 $sql="SELECT id_gruppo FROM ".$prefix."_ele_voti_ref where id_sez='$id_sez'"; 47 51 } 48 52 $res = $dbi->prepare("$sql"); 49 53 $res->execute(); … … 52 56 if($righe){ 53 57 $sezstat=4; 54 $sql="UPDATE ".$prefix."_ele_sezioni set colore='#B0C4DE' where id_cons='$id_cons' and id_sez='$id_sez'"; #"LIGHTSTEELBLUE" 58 if($genere==0 and $righe==$righeref) 59 $sql="UPDATE ".$prefix."_ele_sezioni set colore='#99CC33' where id_cons='$id_cons' and id_sez='$id_sez'"; #VERDE 60 else $sql="UPDATE ".$prefix."_ele_sezioni set colore='#B0C4DE' where id_cons='$id_cons' and id_sez='$id_sez'"; #"LIGHTSTEELBLUE" 55 61 $res = $dbi->prepare("$sql"); 56 62 $res->execute(); -
trunk/admin/modules/Elezioni/ele_controlli.php
r326 r328 79 79 $rifscru++; 80 80 list($si,$no,$validi,$nulli,$bianchi,$contestati)=$res2->fetch(PDO::FETCH_NUM); 81 if( ($si+$no==$validi) and ($validi+$nulli+$bianchi+$contestati==$voti))81 if($validi and ($si+$no==$validi) and ($validi+$nulli+$bianchi+$contestati==$voti)) 82 82 continue; 83 83 else {$err=1; break;} … … 207 207 $rifscru++; 208 208 list($si,$no,$validi,$nulli,$bianchi,$contestati)=$res2->fetch(PDO::FETCH_NUM); 209 if( ($si+$no==$validi) and ($validi+$nulli+$bianchi+$contestati==$voti))209 if(!$validi or (($si+$no==$validi) and ($validi+$nulli+$bianchi+$contestati==$voti))) 210 210 continue; 211 211 else {$err=1; $idrg=$idrefgruppo; break;} -
trunk/admin/modules/Elezioni/ele_riepilogo.php
r315 r328 84 84 $resref = $dbi->prepare("$sql"); 85 85 $resref->execute(); 86 list($numgruppo,$descrizione) = mysql_fetch_row($resref);86 list($numgruppo,$descrizione) = $resref->fetch(PDO::FETCH_NUM); 87 87 echo "<fieldset><legend>"._GRUPPO."N. $numgruppo - $descrizione</legend>"; 88 88 echo "<table border=\"1\" width=\"100%\"><tr><th><b> "._SI." </b></th><th><b>"._NO."</b></th><th><b>"._VALIDI."</b></th><th>"._NULLI."</th><th>"._BIANCHI."</th><th>"._CONTESTATI."</th><th>"._TOTNON."</th></TR>"; -
trunk/admin/modules/Elezioni/ele_voti.php
r324 r328 1454 1454 echo "<td align=\"center\"><input type=\"hidden\" name=\"id_gruppo$i\" value=\"$id_gruppo\"><b>$num_gruppo</b>" 1455 1455 ."</td><td align=\"left\" width=\"50%\"><b> $descr[0] </b>"; 1456 $pro['si']=(isset($pro['si']) and $pro['si']>=0) ? $pro['si']:'0'; 1457 $pro['no']=(isset($pro['no']) and $pro['no']>=0) ? $pro['no']:'0'; 1458 $pro['validi']=(isset($pro['validi']) and $pro['validi']>=0) ? $pro['validi']:'0'; 1459 $pro['bianchi']=(isset($pro['bianchi']) and $pro['bianchi']>=0) ? $pro['bianchi']:'0'; 1460 $pro['contestati']=(isset($pro['contestati']) and $pro['contestati']>=0) ? $pro['contestati']:'0'; 1461 $pro['nulli']=(isset($pro['nulli']) and $pro['nulli']>=0) ? $pro['nulli']:'0'; 1462 $tot_nulli=$pro['nulli']+$pro['bianchi']+$pro['contestati']; 1463 $tot_voti=$pro['validi']+$tot_nulli; 1456 $pro['si']=(isset($pro['si']) and $pro['si']>=0) ? $pro['si']:''; 1457 $pro['no']=(isset($pro['no']) and $pro['no']>=0) ? $pro['no']:''; 1458 $pro['validi']=(isset($pro['validi']) and $pro['validi']>=0) ? $pro['validi']:''; 1459 $pro['bianchi']=(isset($pro['bianchi']) and $pro['bianchi']>=0) ? $pro['bianchi']:''; 1460 $pro['contestati']=(isset($pro['contestati']) and $pro['contestati']>=0) ? $pro['contestati']:''; 1461 $pro['nulli']=(isset($pro['nulli']) and $pro['nulli']>=0) ? $pro['nulli']:''; 1462 if($pro['validi']=='' or $pro['nulli']=='' or $pro['bianchi']=='' or $pro['contestati']==''){ 1463 $tot_nulli=0; 1464 $tot_voti=0; 1465 }else{ 1466 $tot_nulli=$pro['nulli']+$pro['bianchi']+$pro['contestati']; 1467 $tot_voti=$pro['validi']+$tot_nulli; 1468 } 1464 1469 echo "</td><td align=\"right\" width=\"3%\"><input name=\"si$i\" value=\"".$pro['si']."\" size=\"7\" style=\"text-align:right\"></td>"; 1465 1470 echo "</td><td align=\"right\" width=\"3%\"><input name=\"no$i\" value=\"".$pro['no']."\" size=\"7\" style=\"text-align:right\"></td>"; -
trunk/admin/modules/Elezioni/salva_ref.php
r327 r328 56 56 $res = $dbi->prepare("$sql"); 57 57 $res->execute(); 58 $sql="delete from ".$prefix."_ele_controlli where id_cons='$id_cons' and id_sez=$id_sez"; 59 $res = $dbi->prepare("$sql"); 60 $res->execute(); 58 61 }else{ 59 62 while(list($i,$idgruppo)=$resultg->fetch(PDO::FETCH_BOTH)) { … … 74 77 $res = $dbi->prepare("$sql"); 75 78 $res->execute(); 76 }else {79 }elseif($val[$i]!=''){ 77 80 $sql="insert into ".$prefix."_ele_voti_ref values('$id_cons','$idgruppo','$id_sez','$i','".$si[$i]."','".$no[$i]."','".$val[$i]."','".$nul[$i]."','".$bia[$i]."','".$con[$i]."')"; 78 81 $res = $dbi->prepare("$sql"); … … 81 84 } 82 85 } 83 } 86 include("ele_controlli.php"); 87 controllo_votir($id_cons,$id_sez); 88 } 84 89 85 90 86 include("ele_controlli.php"); 87 controllo_votir($id_cons,$id_sez); 91 88 92 include("ele_colora_sez.php"); 89 93 if ($fileout) fclose($fp); -
trunk/admin/versione.php
r324 r328 1 1 <?php 2 2 3 $versione = "3.0 rev 32 4";3 $versione = "3.0 rev 328"; 4 4 $version_number = $versione; 5 $version = "Eleonline $version_number (<i>Data Release: 1 7 giugno 2019</i>)";5 $version = "Eleonline $version_number (<i>Data Release: 16 febbraio 2020</i>)"; 6 6 7 7 ?>
Note:
See TracChangeset
for help on using the changeset viewer.