Changeset 216 for trunk/admin/modules/Elezioni
- Timestamp:
- May 22, 2014, 6:46:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_voti.php
r215 r216 173 173 $res3 = mysql_query("$query", $dbi); 174 174 $testcand=0; 175 $tutte=1; 175 176 while(list($testlista)=mysql_fetch_row($res3)){ 176 177 $res4= mysql_query("SELECT sum(voti) FROM ".$prefix."_ele_voti_lista where id_cons='$id_cons' and id_sez='$id_sez' and id_lista='$testlista'", $dbi); … … 180 181 $res4= mysql_query("SELECT preferenze FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons'", $dbi); 181 182 if($res4) list($testpref)=mysql_fetch_row($res4); else $testpref=0; 183 $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); 184 list($contains)=mysql_fetch_row($res4); 185 if($contains==0) $tutte=0; 186 182 187 if(($testvotil*$testpref)<$testvotic) { $testcand=1;break;} 183 188 } 184 189 if($genere==4 or $votog) $contestatilista=0; 185 190 if (($votils+$sologruppo+$contestatilista+$votinullilista)==($validi+$sololista) and $validilista==$votils and $testcand==0) 186 {$status= 1;$ops=-3;}191 {$status=$tutte;$ops=-3;} 187 192 else {return 3;} 188 193 } #else return 0; … … 587 592 list($ctrvoticand)=mysql_fetch_row($result); 588 593 $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);590 594 list($votisezcand)=mysql_fetch_row($result); 591 595 if(($fascia>$limite or !$id_conf) or $genere==4)
Note:
See TracChangeset
for help on using the changeset viewer.