Changeset 347 for trunk/client/modules/Elezioni/gruppo.php
- Timestamp:
- May 14, 2021, 2:00:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/gruppo.php
r346 r347 463 463 $datipdf="<b>"._COMUNE." $descr_comune</b> - "._RISULTATI.": $descr_cons<br/><b>$pagina</b><br/><br/> $list1 $list2 $list3 "; 464 464 # verificare la stampa sulle circoscrizioni 465 echo "<div style=\"text-align:right;width: 40%;margin-left:10px;margin-right:0px;font-size:12px; \">";466 echo "<table style=\"text-align:center;margin-right:0px;border-top : 1px solid Blue;width: 140px;\"><tr style=\" background:#eceff5;\"><td>"._ESPORTA."<br />";465 echo "<div style=\"text-align:right;width:65%;margin-left:10px;margin-right:0px;font-size:12px; \">"; 466 echo "<table style=\"text-align:center;margin-right:0px;border-top : 1px solid Blue;width: 280px;\"><tr style=\" background:#eceff5;\"><td>"._ESPORTA."<br />"; 467 467 if($circo){ echo "<a href=\"modules.php?name=Elezioni&op=$op&id_cons_gen=$id_cons_gen&id_comune=$id_comune&csv=1&orvert=$orvert&min=$min&offset=$offset&minsez=$minsez&offsetsez=$offsetsez&perc=$perc&id_lista=$id_lista&id_circ=$id_circ&datipdf=$datipdf\" ><img class=\"image\" src=\"modules/Elezioni/images/printer.gif\" alt=\"Stampa\" /></a>"; 468 468 }else{ … … 470 470 echo "<a href=\"modules.php?name=Elezioni&op=$op&id_cons_gen=$id_cons_gen&id_comune=$id_comune&csv=1&orvert=$orvert&min=$min&offset=$offset&minsez=$minsez&offsetsez=$offsetsez&perc=$perc&id_lista=$id_lista&xls=1&datipdf=$datipdf\" ><img class=\"image\" src=\"modules/Elezioni/images/csv.gif\" alt=\"Export Csv\" /></a>"; 471 471 echo "<img class=\"image\" src=\"modules/Elezioni/images/rss.png\" alt=\"Export rss\" />"; 472 echo " </td> </tr>";472 echo " </td>"; 473 473 # stampa pdf 474 echo "<td>"; 474 475 echo "<form id=\"pdf\" method=\"post\" action=\"modules.php\">"; 475 476 echo "<input type=\"hidden\" name=\"id_circ\" value=\"$id_circ\"></input>"; … … 489 490 # echo "<input type=\"hidden\" name=\"name\" value=\"$elezioni\"></input>"; 490 491 echo "<input type=\"hidden\" name=\"name\" value=\"Elezioni\"></input>"; 491 echo "<tr><td>";492 492 echo "<input type=\"image\" name=\"submit\" src=\"modules/Elezioni/images/pdf.gif\" align=\"left\">"; 493 493 echo " L <input type=\"radio\" name=\"orienta\" $land value=\"L\"></input>P <input … … 495 495 echo " A3<input type=\"radio\" name=\"formato\" $A3 value=\"A3\"></input>A4<input 496 496 type=\"radio\" name=\"formato\" $A4 value=\"A4\"></input>"; 497 echo " </ td></tr></table></form> ";497 echo " </form></td></tr></table> "; 498 498 } 499 499 echo "</div></br />"; … … 574 574 $maxpos=max($pos); 575 575 //////////////////////////////////////////////////////////////////// 576 if ($tab=="gruppo" or $genere==4 or ($genere==5 and $votog)) 577 $sqlvoti2="select $tab3, sum(t3.validi),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati),sum(t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t5, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t5.id_cons=$id_cons and t5.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by $tab3"; 578 else 579 if ($votog) $sqlvoti2="select t1.num_circ, (t3.validi_lista),(t3.nulli),(t3.bianchi),(t3.contestati),(t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t1, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t1.id_cons=$id_cons and t1.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by t1.num_circ"; 576 580 581 else $sqlvoti2="select t1.num_circ, sum(t3.validi_lista),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati_lista),sum(t3.voti_nulli_lista+t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t1, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t1.id_cons=$id_cons and t1.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by t1.num_circ"; 582 583 $res_voti = $dbi->prepare("$sqlvoti2"); 584 $res_voti->execute(); 585 586 /////////////////////////// 577 587 if ($res_voti->rowCount()) 578 while (list($num_circ,$ desc_circ,$num_cand,$nome,$voti,$sevalidi,$senulli,$sebianchi,$secontestati,$sevonulli) = $res_voti->fetch(PDO::FETCH_NUM)){588 while (list($num_circ,$sevalidi,$senulli,$sebianchi,$secontestati,$sevonulli) = $res_voti->fetch(PDO::FETCH_NUM)){ 579 589 # if($genere==4) $sevalidi=$voti; 580 590 $z=array_search($num_circ, $pos); … … 587 597 if($sevonulli) $sevnutot+=$sevonulli; 588 598 } 589 $votitot[($z)]+=$voti;590 if(!isset($valsez[$z])) $valsez[$z]=0;599 # $votitot[($z)]+=$voti; 600 # if(!isset($valsez[$z])) $valsez[$z]=0; 591 601 $valsez[$z]=$sevalidi; 592 $voticompl+=$voti; 602 $nulsez[$z]=$senulli; 603 $biasez[$z]=$sebianchi; 604 $consez[$z]=$secontestati; 605 $vonsez[$z]=$sevonulli; 606 # $voticompl+=$voti; 593 607 } 594 608 if ($voticompl) { … … 667 681 //$posvoti++; 668 682 $ar[($z)][$posvoti+1]="<b>$valsez[$z]</b>"; 669 $ar[($z)][$posvoti+2]="<b>$ senulli</b>";670 $ar[($z)][$posvoti+3]="<b>$ sebianchi</b>";671 $ar[($z)][$posvoti+4]="<b>$ secontestati</b>";672 $ar[($z)][$posvoti+5]="<b>$ sevonulli</b>";683 $ar[($z)][$posvoti+2]="<b>$nulsez[$z]</b>"; 684 $ar[($z)][$posvoti+3]="<b>$biasez[$z]</b>"; 685 $ar[($z)][$posvoti+4]="<b>$consez[$z]</b>"; 686 $ar[($z)][$posvoti+5]="<b>$vonsez[$z]</b>"; 673 687 } 674 688 }
Note:
See TracChangeset
for help on using the changeset viewer.