Changeset 207 for trunk


Ignore:
Timestamp:
May 9, 2014, 2:45:34 PM (10 years ago)
Author:
roby
Message:

patch parziale per

  • admin: ulteriori correzioni su fasce
  • client: visualizzazione dati generali
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/modules/Elezioni/ele_voti.php

    r204 r207  
    516516$bgcolor2=$_SESSION['bgcolor2'];
    517517    //controlla se sono stati inseriti i votanti
    518 $result = mysql_query("SELECT preferenze, id_fascia from ".$prefix."_ele_cons_comune where id_cons='$id_cons'",$dbi);
    519 list($numprefs,$fascia)=mysql_fetch_row($result);
     518$result = mysql_query("SELECT preferenze, id_fascia, id_conf from ".$prefix."_ele_cons_comune where id_cons='$id_cons'",$dbi);
     519list($numprefs,$fascia,$id_conf)=mysql_fetch_row($result);
    520520   
    521521if(!$votog and ($genere==3 or $genere==5))
     
    531531                $ele_lista='';
    532532                if (($genere==4 or $genere==5) and !$votoc) { //liste a piu' candidati
    533                         if(($genere==5 and $fascia<=$limite) and !$id_lista) { //esclude il voto di lista per le comunali nei comuni sotto fascia limite
     533                        if(($genere==5 and $fascia<=$limite and $id_conf) and !$id_lista) { //esclude il voto di lista per le comunali nei comuni sotto fascia limite
    534534                                $result = mysql_query("SELECT id_lista from ".$prefix."_ele_lista where id_cons=$id_cons limit 0,1",$dbi);
    535535                                list($id_lista)=mysql_fetch_row($result);
     
    552552                        $result = mysql_query("SELECT sum(t1.voti) from ".$prefix."_ele_voti_candidati as t1 left join ".$prefix."_ele_candidati as t2 on (t1.id_cand=t2.id_cand) where t1.id_sez=$id_sez and t2.id_lista=$id_rif",$dbi);
    553553                        list($votisezcand)=mysql_fetch_row($result);
    554                         if($fascia>$limite or $genere==4)
     554                        if(($fascia>$limite or !$id_conf) or $genere==4)
    555555                                $result = mysql_query("SELECT sum(voti) from ".$prefix."_ele_voti_lista where id_sez='$id_sez' and id_lista='$id_rif'", $dbi);
    556556                        else{
     
    601601                        $result = mysql_query("SELECT sum(t1.voti) from ".$prefix."_ele_voti_candidati as t1 left join ".$prefix."_ele_candidati as t2 on (t1.id_cand=t2.id_cand) where t1.id_sez=$id_sez and t2.id_lista=$id_lista",$dbi);
    602602                        list($votisezcand)=mysql_fetch_row($result);
    603                         if($fascia>$limite)
     603                        if($fascia>$limite or !$id_conf)
    604604                                $result = mysql_query("SELECT sum(voti) from ".$prefix."_ele_voti_lista where id_sez='$id_sez' and id_lista='$id_lista'", $dbi);
    605605                        else{
     
    703703                // toglie ai candidati la visual... del solo_gruppo
    704704                if(!$votog) {
    705                    if (($genere==3 OR $genere==5) and (!$id_lista) and ($fascia>$limite)) { //gruppo e liste
     705                   if (($genere==3 OR $genere==5) and (!$id_lista) and ($fascia>$limite or !$id_conf)) { //gruppo e liste
    706706                        echo "<tr bgcolor=\"$bgcolor2\"><td></td><td><b>"._VALIDI_LISTA."</b></td><td align=\"center\"><input type=\"hidden\" name=\"id_sez\" value=\"$id_sez\"><input name=\"valista\" value=\"$valista\" size=\"5\" style=\"text-align:right\"></td></tr>";
    707707                        echo "<tr bgcolor=\"$bgcolor2\"><td></td><td><b>"._SOLO_GRUPPO."</b></td><td align=\"center\"><input name=\"sg\" value=\"$sg\" size=\"5\" style=\"text-align:right\"></td></tr>";
     
    709709        ."</td></tr><tr bgcolor=\"$bgcolor2\"><td></td><td><b>"._CONTESTATI_LISTE."</b></td><td align=\"center\"><input  name=\"contestati\" value=\"$contestati\" size=\"5\" style=\"text-align:right\"></td></tr>";
    710710                       
    711                    }elseif (($genere==3 OR $genere==5) and !$votoc and $fascia>$limite){ //}elseif ($tipo_cons!=10 and $tipo_cons!=11){
     711                   }elseif (($genere==3 OR $genere==5) and !$votoc and ($fascia>$limite or !$id_conf)){ //}elseif ($tipo_cons!=10 and $tipo_cons!=11){
    712712                        echo "<tr bgcolor=\"$bgcolor1\"><td></td><td><b>"._SOLO_GRUPPO."</b></td><td align=\"center\">$sg</td></tr>";
    713713                   }
    714714######modifica del 16-04-2009 per visualizzare i voti al solo sindaco nei comuni con meno di 15000 abitanti
    715 elseif(($genere==3 OR $genere==5) and ($id_lista) and ($fascia<=$limite)) {
     715elseif(($genere==3 OR $genere==5) and ($id_lista) and ($fascia<=$limite or !$id_conf)) {
    716716$resvg = mysql_query("SELECT id_gruppo FROM ".$prefix."_ele_lista where id_lista='$id_lista'", $dbi);
    717717list($id_gruppo) = mysql_fetch_row($resvg);
     
    751751function rec_voti() {
    752752        global $prefix, $dbi,$aid,$id_cons,$ops,$genere,$votog,$fileout,$id_comune,$limite,$update;
    753         $sqlcomu="select id_fascia from ".$prefix."_ele_cons_comune where id_cons='$id_cons'";
     753        $sqlcomu="select id_fascia,id_conf from ".$prefix."_ele_cons_comune where id_cons='$id_cons'";
    754754        $res = mysql_query($sqlcomu);
    755755        if($res)
    756                 list($fascia)=mysql_fetch_row($res);
    757         else $fascia=0;
     756                list($fascia,$id_conf)=mysql_fetch_row($res);
     757        else {$fascia=0; $id_conf=0;}
    758758        if ($fileout) while (!$fp = fopen($fileout,"a"));
    759759        $username=$aid;
     
    775775                $condizione="id_lista";
    776776        }
    777         if ((($genere==3) OR ($genere==5)) and !$id_lista and !$votog and ($fascia>$limite)) $y = (count($arg)-4);
     777        if ((($genere==3) OR ($genere==5)) and !$id_lista and !$votog and ($fascia>$limite or !$id_conf)) $y = (count($arg)-4);
    778778        else $y=count($arg);
    779779        if($do==1) {
  • trunk/client/modules/Elezioni/index.php

    r206 r207  
    287287        ."</td><td><b>$gruppo</b>";
    288288
    289         if ($genere>2 && !$votog) echo"</td><td><b>$candi</b>";
     289        if ($genere>2 && !$votoc) echo"</td><td><b>$candi</b>";
    290290       
    291291//        if ($tipo_cons >9) echo"</td><td><b>$liste</b>";
Note: See TracChangeset for help on using the changeset viewer.