Changeset 424 for trunk/client/modules
- Timestamp:
- Jun 13, 2024, 7:18:22 PM (5 months ago)
- Location:
- trunk/client/modules/Elezioni
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/candidato.php
r400 r424 12 12 /*****************************************************/ 13 13 function candidato() { 14 global $tipo_cons, $prefix, $dbi, $offset, $min, $id_cons_gen, $id_cons,$file,$genere,$prev,$next,$lettera,$ltr,$ordine,$id_comune,$id_circ,$id_lista,$votog,$circo,$num ;14 global $tipo_cons, $prefix, $dbi, $offset, $min, $id_cons_gen, $id_cons,$file,$genere,$prev,$next,$lettera,$ltr,$ordine,$id_comune,$id_circ,$id_lista,$votog,$circo,$num,$datigenvis; 15 15 16 16 17 17 18 $offset= 15;18 $offset=$datigenvis; 19 19 if ($circo==1) $offset=1000; 20 20 if (!isset($min)) $min=0; -
trunk/client/modules/Elezioni/consiglieri.php
r420 r424 132 132 elseif ($numgruppo>0){ 133 133 $sqllis = "SELECT t1.id_lista,t1.num_lista,t1.descrizione,t1.id_gruppo from ".$prefix."_ele_lista as t1, ".$prefix."_ele_gruppo as t2 where t1.id_cons='$id_cons' and t1.id_gruppo=t2.id_gruppo and t2.num_gruppo not in (".$_SESSION['ballo1'].",".$_SESSION['ballo2'].")"; 134 $res_lis = $dbi->prepare("$sqllis"); 135 $res_lis->execute(); 136 134 $res_lis = $dbi->prepare("$sqllis"); 135 $res_lis->execute(); 137 136 $yy=$res_lis->rowCount(); 138 $sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_cons='$id_cons'"; 139 $res_voti = $dbi->prepare("$sql"); 140 $res_voti->execute(); 141 142 list($validilista) = $res_voti->fetch(PDO::FETCH_NUM); 137 $sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_cons='$id_cons'"; 138 $res_voti = $dbi->prepare("$sql"); 139 $res_voti->execute(); 140 list($validilista) = $res_voti->fetch(PDO::FETCH_NUM); 143 141 if ($yy){ 144 while(list($id_lista,$num_lista,$descr,$pgrup) = $res_lis->fetch(PDO::FETCH_NUM)) { 145 $sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_lista='$id_lista'"; 146 $res_voti = $dbi->prepare("$sql"); 147 $res_voti->execute(); 148 149 list($votilista) = $res_voti->fetch(PDO::FETCH_NUM); 150 if(!isset($voti[$pgrup])) $voti[$pgrup]=0; 151 $voti[$pgrup]+=$votilista; 152 } 153 foreach ($voti as $key=>$val){if($val<($validilista*3/100)) unset($voti[$key]);} ################################################## 142 while(list($id_lista,$num_lista,$descr,$pgrup) = $res_lis->fetch(PDO::FETCH_NUM)) { 143 $sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_lista='$id_lista'"; 144 $res_voti = $dbi->prepare("$sql"); 145 $res_voti->execute(); 146 list($votilista) = $res_voti->fetch(PDO::FETCH_NUM); 147 if(!isset($voti[$pgrup])) $voti[$pgrup]=0; 148 $voti[$pgrup]+=$votilista; 149 } 150 $togli=array(); 151 foreach ($voti as $key=>$val){ 152 if($val<($validilista*3/100)) 153 $togli[]=$key; 154 } 155 foreach($togli as $key=>$val) 156 unset($voti[$val]); ################################################## 154 157 $res_lis = $dbi->prepare("$sqllis"); 155 158 $res_lis->execute(); … … 161 164 echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"/></td>"; 162 165 163 echo "<td><b>".$_SESSION['grp1']."</b></td>";166 echo "<td><b>".$_SESSION['grp1']."</b></td>"; 164 167 echo "<td><b>".$_SESSION['grp2']."</b></td>"; 165 168 echo "<td><b>"._NONCOLLE."</b></td></tr>"; -
trunk/client/modules/Elezioni/gruppo.php
r392 r424 91 91 global $prefix, $dbi, $descr_cons, $id_cons, $id_cons_gen,$tipo_cons,$votog,$votol,$votoc,$circo, $genere,$id_gruppo,$id_lista,$bgcolor1,$bgcolor2,$id_comune,$descr_comune,$id_circ; 92 92 global $id_comune,$id_cons_gen,$op,$minsez,$id_lista,$id_circ,$csv,$min,$orienta,$formato,$dettnulli,$disgiunto, 93 $orvert,$grupposg,$offset,$offsetsez,$perc,$info,$files,$nomefile ;93 $orvert,$grupposg,$offset,$offsetsez,$perc,$info,$files,$nomefile,$numcandvis,$numsezvis; 94 94 $nomefile=""; 95 95 #Denominazione pagine … … 158 158 159 159 $voticompl=0; 160 if (!($offset)) $offset= 25;160 if (!($offset)) $offset=$numcandvis; 161 161 if (!($min)) $min=1; 162 if (!($offsetsez)) $offsetsez= 22;162 if (!($offsetsez)) $offsetsez=$numsezvis; 163 163 if (!($minsez)) $minsez=1; 164 164 if ($min>$offset) { -
trunk/client/modules/Elezioni/index.php
r418 r424 200 200 *************************/ 201 201 function menu() { 202 global $hondt,$lang,$multicomune, $tema, $op, $prefix, $dbi, $offset, $min,$descr_cons,$info,$dati, $votog,$votol,$votoc,$circo, $id_cons,$tipo_cons,$genere,$ descr_cons,$id_cons_gen,$id_comune,$id_circ,$minsez,$offsetsez, $limite,$hondt,$tema_on,$js,$visgralista;202 global $hondt,$lang,$multicomune, $tema, $op, $prefix, $dbi, $offset, $min,$descr_cons,$info,$dati, $votog,$votol,$votoc,$circo, $id_cons,$tipo_cons,$genere,$id_cons_gen,$id_comune,$id_circ,$minsez,$offsetsez, $limite,$tema_on,$js,$visgralista; 203 203 204 204 $tema=htmlentities($tema); //xss … … 453 453 function sezione() { 454 454 global $admin, $prefix, $dbi, $offset, $min,$votog,$circo, $id_cons_gen,$id_circ,$descr_circ,$id_cons,$file,$prev,$next,$id_comune,$googlemaps; 455 global $descr_com,$cap ;455 global $descr_com,$cap,$datigenvis; 456 456 if(!isset($_GET['id_circ'])) unset($id_circ); 457 457 dati(); … … 475 475 } 476 476 477 $offset= 15;477 $offset=$datigenvis; 478 478 if (!isset($min)) $min=0; 479 479 if (!isset($id_circ)) $id_circ=0; … … 610 610 611 611 function gruppo() { 612 global $fascia, $limite, $admin, $prefix, $dbi, $offset, $min, $id_cons_gen,$genere, $id_cons,$tipo_cons,$file,$prev,$next,$id_circ,$id_comune,$descr_circ,$id_sez,$votog,$votol,$circo,$limite ;612 global $fascia, $limite, $admin, $prefix, $dbi, $offset, $min, $id_cons_gen,$genere, $id_cons,$tipo_cons,$file,$prev,$next,$id_circ,$id_comune,$descr_circ,$id_sez,$votog,$votol,$circo,$limite,$datigenvis; 613 613 //dati(); 614 614 // definizione variabile per button 'ok' nei form … … 704 704 705 705 706 $offset= 15;706 $offset=$datigenvis; 707 707 if (!isset($min)) $min=0; 708 708 $go="gruppo";
Note:
See TracChangeset
for help on using the changeset viewer.