Ignore:
Timestamp:
May 31, 2015, 1:59:14 AM (9 years ago)
Author:
roby
Message:

admin: Gestione dei voti al solo gruppo (divisi per voti senza espressione del voto di lista e con voto di lista nullo) dettagliato per singolo gruppo

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin

    • Property svn:ignore set to
      config.php
  • trunk/admin/modules/Elezioni/ele_riepilogo.php

    r208 r235  
    5858        ECHO "<TR><TH>".number_format($totel,0,',','.')."</TH><TH>".number_format($totm,0,',','.')."</TH><TH>".number_format($totf,0,',','.')."</TH><TH>".number_format($votm,0,',','.')."</TH><TH>".number_format($votf,0,',','.')."</TH><TH>".number_format($votc,0,',','.')."</TH></TR></table><br/>";
    5959        ECHO "</fieldset><br/><br/><br/>";
     60       
     61       
    6062        $totnulli=$nulli+$bianchi+$contestati+$votinulli;
    6163        if ($votog) echo "<fieldset><legend>"._VOTI_LISTA."</legend>";
     
    6466        ECHO "<TR><TH>".number_format($validi,0,',','.')."</TH><TH>".number_format($nulli,0,',','.')."</TH><TH>".number_format($bianchi,0,',','.')."</TH><TH>".number_format($contestati,0,',','.')."</TH><TH>".number_format($votinulli,0,',','.')."</TH><TH>".number_format($totnulli,0,',','.')."</TH></TR></table><br/>";
    6567        ECHO "</fieldset><br/><br/><br/>";
     68       
     69       
    6670        if ($genere==5 and !$votog) {
    6771        $totnullil=$nullilista+$contestatilista;
    6872        $id_conf=0;
    69         $res = mysql_query("SELECT t1.id_conf,t1.id_fascia, t2.limite from ".$prefix."_ele_cons_comune as t1 left join ".$prefix."_ele_conf as t2 on t1.id_conf=t2.id_conf where t1.id_cons='$id_cons'", $dbi);
    70         if($res) list($id_conf,$fascia,$limite) = mysql_fetch_row($res);
     73        $res = mysql_query("SELECT t1.id_conf,t1.id_fascia, t2.limite, t1.solo_gruppo from ".$prefix."_ele_cons_comune as t1 left join ".$prefix."_ele_conf as t2 on t1.id_conf=t2.id_conf where t1.id_cons='$id_cons'", $dbi);
     74        if($res) list($id_conf,$fascia,$limite,$dettnulli) = mysql_fetch_row($res);
    7175        if ($id_conf and $fascia<=$limite) {
    7276        echo "<fieldset><legend>"._VOTI_LISTA."</legend>";
     
    7478        ECHO "<TR><TH>".number_format($validi,0,',','.')."</TH><TH>".number_format($nulli,0,',','.')."</TH><TH>".number_format($bianchi,0,',','.')."</TH><TH>".number_format($contestati,0,',','.')."</TH><TH>".number_format($votinulli,0,',','.')."</TH><TH>".number_format($totnulli,0,',','.')."</TH></TR></table><br/>";
    7579        ECHO "</fieldset><br/><br/><br/>";
     80       
    7681        }else{
    77                 echo "<fieldset><legend>"._VOTI_LISTA."</legend>";
     82        if ($dettnulli){
     83                        $res = mysql_query("SELECT id_gruppo,num_gruppo,descrizione from ".$prefix."_ele_gruppo where id_cons='$id_cons' order by num_gruppo", $dbi);
     84
     85        echo "<fieldset><legend>"._GRUPPO."</legend>";
     86        echo "<table border=\"1\" width=\"100%\"><tr><th colspan=\"2\" rowspan=\"2\" ALIGN=\"CENTER\"><b>Candidato</b></th><th rowspan=\"2\" ALIGN=\"CENTER\">"._VALIDI."</th><th colspan=\"2\" ALIGN=\"CENTER\">"._SOLO_GRUPPO."</th></tr><tr><th ALIGN=\"CENTER\">Senza indicazione di lista</th><th>"._VOTINULLI." di Lista</th></TR>";
     87        while(list($id_gruppo,$num_gruppo,$desc) = mysql_fetch_row($res)){
     88                $resv = mysql_query("SELECT sum(voti),sum(solo_gruppo) from ".$prefix."_ele_voti_gruppo where id_gruppo='$id_gruppo'", $dbi);
     89                list($voti,$solo_gruppo)=mysql_fetch_row($resv);
     90                $resv = mysql_query("SELECT sum(t1.nulli_lista) from ".$prefix."_ele_voti_lista as t1 left join ".$prefix."_ele_lista as t2 on t1.id_lista=t2.id_lista where t2.id_gruppo='$id_gruppo'", $dbi);
     91                list($nulli_lista)=mysql_fetch_row($resv);
     92                       
     93                ECHO "<TR><TD>".$num_gruppo."</TD><TD>".$desc."</TD><TD ALIGN=\"RIGHT\">".number_format($voti,0,',','.')."</TD><TD ALIGN=\"RIGHT\">".number_format($solo_gruppo,0,',','.')."</TD><TD ALIGN=\"RIGHT\">".number_format($nulli_lista,0,',','.')."</TD></TD></TR>";
     94        }
     95        ECHO "</table><br/></fieldset><br/><br/><br/>";
     96
     97        }
     98        echo "<fieldset><legend>"._VOTI_LISTA."</legend>";
    7899        echo "<table border=\"1\" width=\"100%\"><tr><th>"._VALIDI."</th><th>"._VOTINULLI."</th><th>"._CONTESTATI."</th>";
    79100        // if ($genere==5 and !$votog)
Note: See TracChangeset for help on using the changeset viewer.