- Timestamp:
- May 24, 2017, 8:20:11 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_voti.php
r259 r260 43 43 include("modules/Elezioni/funzionidata.php"); 44 44 include("modules/Elezioni/ele.php"); 45 global $votolista, $limite, $dettnulli ;45 global $votolista, $limite, $dettnulli,$disgiunto; 46 46 if(!isset($votolista)) $votolista=0; 47 47 $res = mysql_query("SELECT tipo_cons FROM ".$prefix."_ele_consultazione where id_cons_gen='$id_cons_gen'" , $dbi); … … 50 50 $res = mysql_query("SELECT count(id_circ) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ", $dbi); 51 51 list($num_circ)=mysql_fetch_row($res); 52 $res = mysql_query("SELECT solo_gruppo FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons' ", $dbi);53 list($dettnulli )=mysql_fetch_row($res);52 $res = mysql_query("SELECT solo_gruppo,disgiunto FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons' ", $dbi); 53 list($dettnulli,$disgiunto)=mysql_fetch_row($res); 54 54 if ($conscirc){ // or $num_circ==1 55 55 if (!$id_circ){ … … 80 80 81 81 function stato_rilevazione($id_sez,$solosede){ 82 global $id_cons, $prefix, $dbi, $id_cons_gen,$status,$genere,$votol, $votog, $votoc,$idrefgruppo,$num_ril,$circo ;82 global $id_cons, $prefix, $dbi, $id_cons_gen,$status,$genere,$votol, $votog, $votoc,$idrefgruppo,$num_ril,$circo,$dettnulli; 83 83 84 84 if($idrefgruppo and $genere==0) $perref= "and id_gruppo='$idrefgruppo'"; … … 187 187 # list($votigs)=mysql_fetch_row($res4); 188 188 if($votigs>0||$sololista==$validi) { 189 if (($votigs+$sololista)==$validi && $votisolog==$sologruppo)189 if (($votigs+$sololista)==$validi && (!$votisolog || $votisolog==$sologruppo)) 190 190 {$status=3;$ops=-3;$gru=1;} 191 191 else {$gru=-1; $stret=4;} … … 231 231 if($res4) list($testpref)=mysql_fetch_row($res4); else $testpref=0; 232 232 while(list($testlista)=mysql_fetch_row($res3)){ 233 if($fascia<=$limite )233 if($fascia<=$limite or $disgiunto or $dettnulli) 234 234 { 235 235 $res4= mysql_query("SELECT id_gruppo FROM ".$prefix."_ele_lista where id_cons='$id_cons' and id_lista='$testlista'", $dbi); … … 540 540 function preferenze($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops){ 541 541 global $aid, $prefix, $dbi, $id_lista,$genere,$id_cons_gen,$id_gruppo,$sezi,$circo,$votog,$votol,$votoc,$conscirc; 542 global $tipo_cons,$limite ; #,$dettnulli;543 $dettnulli=0; 542 global $tipo_cons,$limite,$dettnulli,$disgiunto; 543 544 544 $bgcolor1="#7777ff"; 545 545 $bgcolor2=$_SESSION['bgcolor2']; … … 676 676 echo "<td bgcolor=\"$bgcolor1\" align=\"left\"><b>"._DESCR."</b></td>" 677 677 ."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._VOTI."</b></td>"; 678 if($dettnulli){ 678 if($dettnulli && !$disgiunto) 679 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._NULLI_LISTE."</b></td>"; 680 if($disgiunto){ 679 681 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._SOLOLIS."</b></td>"; 680 682 } … … 716 718 } 717 719 }else { 718 $result1 = mysql_query("select t2.voti,t1.id_lista, descrizione,simbolo,num_lista,t2. solo_lista720 $result1 = mysql_query("select t2.voti,t1.id_lista, descrizione,simbolo,num_lista,t2.nulli_lista,t2.solo_lista 719 721 from ".$prefix."_ele_lista as t1, ".$prefix."_ele_voti_lista as t2 720 722 where t1.id_cons='$id_cons' … … 724 726 $num_lista=mysql_num_rows($result1); 725 727 if (!$num_lista){ 726 $result1 = mysql_query("select '',t1.id_lista, descrizione,simbolo,num_lista 728 $result1 = mysql_query("select '',t1.id_lista, descrizione,simbolo,num_lista,'','' 727 729 from ".$prefix."_ele_lista as t1 where t1.id_cons='$id_cons' $circo 728 730 order by t1.num_lista", $dbi); 729 731 } 730 while (list($pro['voti'],$id_lista3,$descr_lista,$simb_lista,$num_lista,$vnpl )=mysql_fetch_row($result1)){732 while (list($pro['voti'],$id_lista3,$descr_lista,$simb_lista,$num_lista,$vnpl,$slpl)=mysql_fetch_row($result1)){ 731 733 echo "<tr bgcolor=\"$bgcolor2\">"; 732 734 // if ($genere<4 or $votoc){ … … 737 739 $cond_sele="and id_lista=$id_lista3"; 738 740 echo "<td align=\"right\"><input name=\"voti$i\" value=\"".$pro['voti']."\" size=\"7\" style=\"text-align:right\">"; 739 740 if($d ettnulli) echo "</td><td align=\"right\"><input name=\"vnpl$i\" value=\"".$vnpl."\" size=\"7\" style=\"text-align:right\"><input type=\"hidden\" name=\"id_lista$i\" value=\"$id_lista3\"></td>";741 e lse echo "<input type=\"hidden\" name=\"id_lista$i\" value=\"$id_lista3\"></td>";741 if($dettnulli && !$disgiunto) echo "</td><td align=\"right\"><input name=\"vnpl$i\" value=\"".$vnpl."\" size=\"7\" style=\"text-align:right\">"; 742 if($disgiunto) echo "</td><td align=\"right\"><input name=\"slpl$i\" value=\"".$slpl."\" size=\"7\" style=\"text-align:right\">"; 743 echo "<input type=\"hidden\" name=\"id_lista$i\" value=\"$id_lista3\"></td>"; 742 744 // echo "<td align=\"right\">$sgpl"; 743 745 echo "</tr>\n"; … … 797 799 798 800 function rec_voti() { 799 global $prefix, $dbi,$aid,$id_cons,$ops,$genere,$votog,$fileout,$id_comune,$limite,$update,$dettnulli ;801 global $prefix, $dbi,$aid,$id_cons,$ops,$genere,$votog,$fileout,$id_comune,$limite,$update,$dettnulli,$disgiunto; 800 802 801 803 $sqlcomu="select id_fascia,id_conf from ".$prefix."_ele_cons_comune where id_cons='$id_cons'"; … … 821 823 $condizione="id_cand"; 822 824 }else{ 823 $condizione="id_lista"; $dettnulli=0;825 $condizione="id_lista"; 824 826 } 825 827 if ((($genere==3) OR ($genere==5)) and !$id_lista and !$votog and (($disgiunto or $fascia>$limite) or !$id_conf)) $y = (count($arg)-4); … … 835 837 for($i=8,$y--;$i< $y;$i++) { 836 838 $voti = intval($arg[$i++]); 837 if($dettnulli and $condizione!="id_cand") {$vnpl = intval($arg[$i++]); $vnriga=",solo_lista='$vnpl'"; $vnrigains=",'0','".$vnpl."'";} else {$vnriga=''; if ($condizione=="id_lista") $vnrigains=",'0','0'"; else $vnrigains="";} 839 $vnrigains=",'0'"; 840 $vnriga=''; 841 if($dettnulli && !$disgiunto and $condizione!="id_cand") {$vnpl = intval($arg[$i++]); $vnriga=",nulli_lista='$vnpl'"; $vnrigains=",'".$vnpl."'";} else {if (!($condizione=="id_lista")) $vnrigains="";} 842 if($disgiunto and $condizione!="id_cand") {$slpl = intval($arg[$i++]); $vnriga.=",solo_lista='$slpl'"; $vnrigains.=",'".$slpl."'";} else {$vnriga.=''; if ($condizione=="id_lista") $vnrigains.=",'0'"; else $vnrigains="";} 838 843 $id_cand = intval($arg[$i]); 839 844 $result = mysql_query("select * from ".$prefix."$tab where id_cons='$id_cons' and id_sez='$id_sez' and $condizione='$id_cand'", $dbi); … … 841 846 842 847 if ($ar){ 843 if ($ar['voti']!=$voti or (isset($vnpl) and $ar['solo_lista']!=$vnpl)) { 848 #die("T1:$dettnulli -- T2:$disgiunto -- update ".$prefix."$tab set voti='$voti'$vnriga where id_cons='$id_cons' and id_sez='$id_sez' and $condizione='$id_cand'"); 849 if ($ar['voti']!=$voti or (isset($vnpl) and $ar['nulli_lista']!=$vnpl) or (isset($slpl) and $ar['solo_lista']!=$slpl)) { 844 850 mysql_query("update ".$prefix."$tab set voti='$voti'$vnriga where id_cons='$id_cons' and id_sez='$id_sez' and $condizione='$id_cand'", $dbi); 845 851 if ($fileout) fwrite($fp,"update ".$prefix."$tab set voti='$voti' where id_cons='$id_cons' and id_sez='$id_sez' and $condizione='$id_cand';\n"); -
trunk/admin/versione.php
r259 r260 1 1 <?php 2 2 3 $versione = "2.0 rev 2 59";3 $versione = "2.0 rev 260"; 4 4 $version_number = $versione; 5 $version = "Eleonline $version_number (<i>Data Release: 04 maggio 2017</i>)";5 $version = "Eleonline $version_number (<i>Data Release: 24 maggio 2017</i>)"; 6 6 7 7 ?> -
trunk/client/modules/Elezioni/foto.php
r171 r260 22 22 23 23 if ($id_lista){ 24 $sql = "select *from ".$prefix."_ele_lista where id_lista='$id_lista'";24 $sql = "select stemma from ".$prefix."_ele_lista where id_lista='$id_lista'"; 25 25 $res = mysql_query($sql,$dbi); 26 $dati = mysql_fetch_array($res); 27 $stemma = $dati['stemma']; 26 list($stemma) = mysql_fetch_row($res); 28 27 }elseif ($id_gruppo){ 29 $sql = "select *from ".$prefix."_ele_gruppo where id_gruppo='$id_gruppo'";28 $sql = "select programma,stemma from ".$prefix."_ele_gruppo where id_gruppo='$id_gruppo'"; 30 29 $res = mysql_query($sql,$dbi); 31 $dati = mysql_fetch_array($res); 32 if(isset($pdf)) $stemma = $dati['programma']; 33 else $stemma = $dati['stemma']; 30 list($programma,$stemma) = mysql_fetch_row($res); 31 if(isset($pdf)) $stemma = $programma; 34 32 }elseif ($id_sede){ 35 $sql = "select *from ".$prefix."_ele_sede where id_sede='$id_sede'";33 $sql = "select mappa from ".$prefix."_ele_sede where id_sede='$id_sede'"; 36 34 $res = mysql_query($sql,$dbi); 37 $dati = mysql_fetch_array($res); 38 $stemma = $dati['mappa']; 35 list($stemma) = mysql_fetch_row($res); 39 36 }elseif ($id_comune){ 40 $sql = "select *from ".$prefix."_ele_comuni where id_comune='$id_comune'";37 $sql = "select stemma from ".$prefix."_ele_comuni where id_comune='$id_comune'"; 41 38 $res = mysql_query($sql,$dbi); 42 $dati = mysql_fetch_array($res); 43 $stemma = $dati['stemma']; #die("qui: $sql $stemma"); 39 list($stemma) = mysql_fetch_row($res); 44 40 }else{ 45 41 die(); -
trunk/client/versione.php
r259 r260 1 1 <?php 2 2 3 $versione = "2.0 rev 2 59";3 $versione = "2.0 rev 260"; 4 4 $version_number = $versione; 5 $version = "Eleonline $version_number (<i>Data Release: 04 maggio 2017</i>)";5 $version = "Eleonline $version_number (<i>Data Release: 24 maggio 2017</i>)"; 6 6 7 7 -
trunk/install/sql/eleonline.sql
r258 r260 964 964 `id_sez` int(11) NOT NULL default '0', 965 965 `voti` int(7) NOT NULL default '0', 966 `nulli_lista` INT( 7 ) NOT NULL DEFAULT '0', 966 967 `solo_lista` INT( 7 ) NOT NULL DEFAULT '0', 967 968 KEY `cons` (`id_cons`), -
trunk/sql/aggiornamento-2.0_2017-04-28.sql
r258 r260 1 alter table `soraldo_ele_voti_lista` add column solo_listaint(7) default 0;1 alter table `soraldo_ele_voti_lista` add column `solo_lista` int(7) default 0; 2 2 ALTER TABLE `soraldo_ele_cons_comune` ADD COLUMN `disgiunto` enum('0', '1') NOT NULL default '0'; 3 alter table `soraldo_ele_voti_lista` add column `nulli_lista` int(7) default 0 after `voti`;
Note:
See TracChangeset
for help on using the changeset viewer.