Changeset 71 for trunk/client/modules/Elezioni
- Timestamp:
- Apr 1, 2010, 5:32:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/affluenze.php
r64 r71 184 184 185 185 186 $ressomma = mysql_query("select t3.data,t3.orario,sum(t3.voti_complessivi),sum(t3.voti_uomini),sum(t3.voti_donne) from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.data,t3.orario,t3.id_gruppo ",$dbi);186 $ressomma = mysql_query("select t3.data,t3.orario,sum(t3.voti_complessivi),sum(t3.voti_uomini),sum(t3.voti_donne) from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.data,t3.orario,t3.id_gruppo order by t3.data,t3.orario",$dbi); 187 187 #die("select t3.data,t3.orario,sum(t3.voti_complessivi),sum(t3.voti_uomini),sum(t3.voti_donne) from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.data,t3.orario,t3.id_gruppo "); 188 $perc_u=array(); $perc_d=array(); $perc_c=array(); 188 189 while (list($data,$ora,$somma,$votiu,$votid) = mysql_fetch_row($ressomma)) { 189 # if($votiu or $votid) 190 if(($data==$ultdata) and ($ora==$ultora)) 190 $perc_u[$data.$ora]=0; 191 $perc_d[$data.$ora]=0; 192 $perc_c[$data.$ora]=0; 193 if($votiu or $votid) 194 # if(($data==$ultdata) and ($ora==$ultora)) 191 195 { 192 196 $tot[$data.$ora]="<table class=\"td-89\" width=\"100%\"><tr class=\"bggray2\"><td class=\"td-30\"> … … 195 199 <b>".number_format($somma,0,',','.')."</b></td> 196 200 </tr></table>"; 197 $perc_u =number_format($votiu*100/$tot_u,2);198 $perc_d =number_format($votid*100/$tot_d,2);199 $perc_c =number_format($somma*100/$tot_compl,2);201 $perc_u[$data.$ora]=number_format($votiu*100/$tot_u,2); 202 $perc_d[$data.$ora]=number_format($votid*100/$tot_d,2); 203 $perc_c[$data.$ora]=number_format($somma*100/$tot_compl,2); 200 204 } 201 205 else … … 209 213 $ora_ril=$hour.":".$minute; 210 214 $html .= "<td"; 211 if ($ud==$num_ril and ($perc_u or $perc_d)) {$ora_rif="$data1.$ora1";}215 if ($ud==$num_ril and ($perc_u[$data1.$ora1] or $perc_d[$data1.$ora1])) {$ora_rif="$data1.$ora1";} 212 216 $html .= ">"; 213 217 $data_a=form_data($data1); … … 216 220 list($num_scr) = mysql_fetch_row($resaff); //numero delle sezioni inserite 217 221 $html .= "<br />"._SEZIONI." $num_scr "._SU." $num_sez"; 218 if ($ud==$num_ril and ($perc_u or $perc_d)) $html .= "<br /> 222 ## if ($ud==$num_ril and ($perc_u or $perc_d)) $html .= "<br /> 223 if (($perc_u[$data1.$ora1] or $perc_d[$data1.$ora1])) $html .= "<br /> 219 224 220 225 <table class=\"td-vuoto\" width=\"100%\"><tr class=\"bggray\"> … … 227 232 228 233 if (isset($tot[$data1.$ora1])){ 229 if ($ora_rif=="$data1.$ora1")230 {234 ## if ($ora_rif=="$data1.$ora1") 235 if (($perc_u[$data1.$ora1] or $perc_d[$data1.$ora1])) { 231 236 $ar['perc'][$data1.$ora1]="<table class=\"td-vuoto\" width=\"100%\"><tr class=\"bggray2\"> 232 <td class=\"td-30\"><b><i><span class=\"red\"> $perc_u%</span></i></b></td>233 <td class=\"td-30\"><b><i><span class=\"red\"> $perc_d%</span></i></b></td>234 <td ><span class=\"red\"><b><i> $perc_c%</i></b></span></td>237 <td class=\"td-30\"><b><i><span class=\"red\">".$perc_u[$data1.$ora1]."%</span></i></b></td> 238 <td class=\"td-30\"><b><i><span class=\"red\">".$perc_d[$data1.$ora1]."%</span></i></b></td> 239 <td ><span class=\"red\"><b><i>".$perc_c[$data1.$ora1]."%</i></b></span></td> 235 240 </tr></table>"; 236 241 $ar[0][$data1.$ora1]=$tot[$data1.$ora1]; … … 257 262 #die("select t3.data,t3.orario,t1.num_sez,voti_uomini, voti_donne, voti_complessivi from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos $cond order by data,orario,t2.num_sez "); 258 263 while (list($data,$ora,$numsez,$uomini,$donne,$complessivi) = mysql_fetch_row($resvoti)) { 259 if ($ora_rif=="$data.$ora") 264 # if ($ora_rif=="$data.$ora") 265 if(($uomini+$donne)>0) 260 266 $ar[$numsez][$data.$ora]="<table class=\"td-vuoto\" width=\"100%\"><tr class=\"bggray2\"> 261 267 <td class=\"td-30\" width=\"33%\">$uomini</td>
Note:
See TracChangeset
for help on using the changeset viewer.