Ignore:
Timestamp:
Nov 18, 2020, 11:05:49 PM (3 years ago)
Author:
roby
Message:

Ulteriori adeguamenti per la rev 338

File:
1 edited

Legend:

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

    r340 r342  
    298298        // Menu spoglio
    299299        //************************************
    300                 $sql="select id_cons,id_sez,id_sede,num_sez, maschi, femmine  from ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sez='$id_sez'";
    301 $result = $dbi->prepare("$sql");
    302 $result->execute();
    303 
    304 
    305                 list($id_cons2,$id_sez2,$id_sede,$num_sez, $maschi, $femmine) = $result->fetch(PDO::FETCH_NUM);
    306 
    307                 echo "<hr><table><tr><td  width=\"200\"><font size =\"4\" color=\"black\" align=\"left\"><b>Sezione N. $num_sez</b></font></td><td><table><tr>";
    308                 echo "\n<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=1\">"._AFFLUENZE."</a></b></p></td>\n";
    309                 if(!($genere==4) and !($votog)){ //if(!($genere==4) and !($tipo_cons==10 or $tipo_cons==11)){
    310                         echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=4\">"._GRUPPO."</a></b></p></td>\n";
    311                 }
    312                 if(($genere>2 or $votog)){ //if(($genere>2 or $tipo_cons==10 or $tipo_cons==11)){
    313                         echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=3\">"._LISTA."</a></b></p></td>\n";
    314                 }
    315                 echo "</tr></table></td></tr></table><hr>\n";
     300    $sql="select id_cons,id_sez,id_sede,num_sez, maschi, femmine  from ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sez='$id_sez'";
     301        $result = $dbi->prepare("$sql");
     302        $result->execute();
     303        list($id_cons2,$id_sez2,$id_sede,$num_sez, $maschi, $femmine) = $result->fetch(PDO::FETCH_NUM);
     304        echo "<hr><table><tr><td  width=\"200\"><font size =\"4\" color=\"black\" align=\"left\"><b>Sezione N. $num_sez</b></font></td><td><table><tr>";
     305        echo "\n<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=1\">"._AFFLUENZE."</a></b></p></td>\n";
     306        if(!($genere==4) and !($votog)){ //if(!($genere==4) and !($tipo_cons==10 or $tipo_cons==11)){
     307                        echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=4\">"._GRUPPO."</a></b></p></td>\n";
     308        }
     309        if($genere==2 and $votog)
     310                echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=4\">"._GRUPPO."</a></b></p></td>\n";
     311        elseif(($genere>2 or $votog)){ //if(($genere>2 or $tipo_cons==10 or $tipo_cons==11)){
     312                echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=3\">"._LISTA."</a></b></p></td>\n";
     313        }
     314        echo "</tr></table></td></tr></table><hr>\n";
    316315
    317316#############
     
    322321        } else{
    323322                $sql="SELECT data, orario from ".$prefix."_ele_rilaff where id_cons_gen=$id_cons_gen order by data desc,orario desc limit 0,1";
    324 $res = $dbi->prepare("$sql");
    325 $res->execute();
    326 
    327 
     323                $res = $dbi->prepare("$sql");
     324                $res->execute();
    328325                list($data,$orario)=$res->fetch(PDO::FETCH_NUM);
    329326                $sql="SELECT voti_complessivi from ".$prefix."_ele_voti_parziale where id_sez='$id_sez' and orario='$orario' and data='$data'";
    330 $res = $dbi->prepare("$sql");
    331 $res->execute();
    332 
    333 
     327                $res = $dbi->prepare("$sql");
     328                $res->execute();
    334329        list($voti) = $res->fetch(PDO::FETCH_NUM);
    335330                if (!$voti) $ops=1;
     
    337332                        if($genere<4){
    338333                                $sql="SELECT sum(voti) from ".$prefix."_ele_voti_gruppo where id_sez='$id_sez'";
    339 $res = $dbi->prepare("$sql");
    340 $res->execute();
    341 
    342 
     334                                $res = $dbi->prepare("$sql");
     335                                $res->execute();
    343336                        list($voti) = $res->fetch(PDO::FETCH_NUM);
    344337                                if ($voti==0 or $genere<3) $ops=4;
Note: See TracChangeset for help on using the changeset viewer.