Changeset 329 for trunk


Ignore:
Timestamp:
Jun 18, 2020, 11:15:50 PM (4 years ago)
Author:
roby
Message:
 
File:
1 edited

Legend:

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

    r328 r329  
    118118function numeri_sezione($nums) {
    119119// tabella visualizzazione sezioni per numero
    120 global $aid,$bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min, $tipo_cons, $genere,$id_cons_gen,$id_cons,$id_lista,$ops, $perms,$id_sez,$num_ril,$status,$idrefgruppo,$votog,$votol,$votoc,$ops;
     120global $aid,$bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min, $tipo_cons, $genere,$id_cons_gen,$id_cons,$id_lista,$ops, $perms,$id_sez,$num_ril,$status,$idrefgruppo,$votog,$votol,$votoc;
    121121$idrefgruppo='';
    122122        $solosede='';
     
    14291429 
    14301430      //echo "test: $id_cons2,$id_gruppo,$num_gruppo, $descr_gruppo, $simbolo";
    1431      
     1431                echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n"
     1432               
     1433                ."//-->\n";
     1434                echo "function controlloref$i() {\n";
     1435                echo "var a=Number(window.document.sezioni.si$i.value); var b=Number(window.document.sezioni.no$i.value); if(a=='NaN') {a=0} if(b=='NaN') {b=0} var c=a + b; window.document.sezioni.val$i.value=c\n";
     1436                echo "}\n";
     1437                echo "</script>\n";   
    14321438
    14331439     if ($num_gruppo != ''){
     
    14601466        $pro['contestati']=(isset($pro['contestati']) and $pro['contestati']>=0) ? $pro['contestati']:'';
    14611467        $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                 }
    1469                 echo "</td><td align=\"right\" width=\"3%\"><input  name=\"si$i\" value=\"".$pro['si']."\" size=\"7\"  style=\"text-align:right\"></td>";
    1470                 echo "</td><td align=\"right\" width=\"3%\"><input  name=\"no$i\" value=\"".$pro['no']."\" size=\"7\"  style=\"text-align:right\"></td>";
     1468                $tot_nulli=intval($pro['nulli'])+intval($pro['bianchi'])+intval($pro['contestati']);
     1469                $tot_voti=intval($pro['validi'])+$tot_nulli;
     1470                echo "</td><td align=\"right\" width=\"3%\"><input  name=\"si$i\" value=\"".$pro['si']."\" size=\"7\"  style=\"text-align:right\" onchange=controlloref$i()></td>";
     1471                echo "</td><td align=\"right\" width=\"3%\"><input  name=\"no$i\" value=\"".$pro['no']."\" size=\"7\"  style=\"text-align:right\" onchange=controlloref$i()></td>";
    14711472                echo "</td><td align=\"right\" width=\"3%\"><input  name=\"val$i\" value=\"".$pro['validi']."\" size=\"7\" style=\"text-align:right\" ></td>";
    14721473                echo "</td><td align=\"right\"><input  name=\"bia$i\" value=\"".$pro['bianchi']."\" size=\"7\"  style=\"text-align:right\"></td>";
Note: See TracChangeset for help on using the changeset viewer.