Changeset 215 for trunk/admin
- Timestamp:
- May 22, 2014, 6:26:43 PM (10 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_voti.php
r211 r215 157 157 } 158 158 } 159 $res4= mysql_query("SELECT t1.preferenze,t1.id_fascia,t2.limite FROM ".$prefix."_ele_cons_comune as t1 left join ".$prefix."_ele_conf on t1.id_conf=t2.id_conf where t1.id_cons='$id_cons'", $dbi); 160 if($res4) list($testpref,$fascia,$limite)=mysql_fetch_row($res4); else {$testpref=0;$fascia=0;$limite=0;} 161 159 162 #controllo congruenza voti di lista 160 163 $res3= mysql_query("SELECT sum(voti) FROM ".$prefix."_ele_voti_lista where id_cons='$id_cons'", $dbi); … … 184 187 else {return 3;} 185 188 } #else return 0; 189 }elseif($genere==5 and $fascia<=$limite){ 190 $testcand=0; 191 $query="SELECT id_lista,id_gruppo FROM ".$prefix."_ele_lista where id_cons='$id_cons'"; 192 $res3 = mysql_query("$query", $dbi); 193 $tutte=1; 194 while(list($testlista,$testgruppo)=mysql_fetch_row($res3)){ 195 $res4= mysql_query("SELECT sum(voti) FROM ".$prefix."_ele_voti_gruppo where id_cons='$id_cons' and id_sez='$id_sez' and id_gruppo='$testgruppo'", $dbi); 196 if($res4) list($testvotit)=mysql_fetch_row($res4); else $testvotit=0; 197 $res4= 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_cons='$id_cons' and t1.id_sez='$id_sez' and t2.id_lista='$testlista'", $dbi); 198 if($res4) list($testvotic)=mysql_fetch_row($res4); else $testvotic=0; 199 $res4= mysql_query("SELECT count(0) FROM ".$prefix."_ele_voti_candidati as t1 left join ".$prefix."_ele_candidati as t2 on t1.id_cand=t2.id_cand where t1.id_cons='$id_cons' and t1.id_sez='$id_sez' and t2.id_lista='$testlista'", $dbi); 200 list($contains)=mysql_fetch_row($res4); 201 if($contains==0) $tutte=0; 202 203 204 if(($testvotit*$testpref)<$testvotic) {$testcand=1;break;} 205 } 206 if($testcand==0) 207 {$status=$tutte;$ops=-3;} 208 else {return 3;} 186 209 } 187 210 }elseif($ops==-3){ $ops=-4;} … … 561 584 while(list($id_rif,$descrizione,$num_lis) = mysql_fetch_row($res_lis)) { 562 585 $segna=''; 586 $result = mysql_query("SELECT count(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); 587 list($ctrvoticand)=mysql_fetch_row($result); 563 588 $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); 589 $ctrvoticand=mysql_num_rows($result); 564 590 list($votisezcand)=mysql_fetch_row($result); 565 591 if(($fascia>$limite or !$id_conf) or $genere==4) … … 574 600 if($votisezcand>($votisezlis*$numprefs)) 575 601 $segna="style=\"background-color: #dd0000;\""; 576 602 elseif($ctrvoticand) 603 $segna="style=\"background-color: #99CC33;\""; 577 604 578 605 … … 725 752 } 726 753 ######modifica del 16-04-2009 per visualizzare i voti al solo sindaco nei comuni con meno di 15000 abitanti 727 elseif(($genere==3 OR $genere==5) and ($id_lista) and ($fascia<=$limite or !$id_conf) ) {754 elseif(($genere==3 OR $genere==5) and ($id_lista) and ($fascia<=$limite or !$id_conf) and $numprefs==1) { 728 755 $resvg = mysql_query("SELECT id_gruppo FROM ".$prefix."_ele_lista where id_lista='$id_lista'", $dbi); 729 756 list($id_gruppo) = mysql_fetch_row($resvg); -
trunk/admin/versione.php
r214 r215 1 1 <?php 2 $versione="2.0 rev 21 4";2 $versione="2.0 rev 215"; 3 3 ?>
Note:
See TracChangeset
for help on using the changeset viewer.