Changeset 364 for trunk/client
- Timestamp:
- Mar 30, 2022, 2:56:01 PM (3 years ago)
- Location:
- trunk/client
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/consiglieri.php
r362 r364 181 181 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"/>"; 182 182 echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"/>"; 183 $sql = "SELECT t1.id_gruppo,t1.num_gruppo,t1.descrizione, sum(t2.voti) as pref FROM ".$prefix."_ele_gruppo as t1, ".$prefix."_ele_voti_gruppo as t2 where t1.id_gruppo=t2.id_gruppo and t1.id_cons='$id_cons' group by t1. num_gruppo,t1.descrizione order by pref desc limit 0,2";183 $sql = "SELECT t1.id_gruppo,t1.num_gruppo,t1.descrizione, sum(t2.voti) as pref FROM ".$prefix."_ele_gruppo as t1, ".$prefix."_ele_voti_gruppo as t2 where t1.id_gruppo=t2.id_gruppo and t1.id_cons='$id_cons' group by t1.id_gruppo,t1.num_gruppo,t1.descrizione order by pref desc limit 0,2"; 184 184 $res = $dbi->prepare("$sql"); 185 185 $res->execute(); … … 297 297 foreach ($listagruppo as $lista=>$val){ 298 298 $id_lista=$idlst[$lista]; 299 $sql = "SELECT concat(substring(concat('0',t1.num_cand),-2),') ',t1.cognome,' ',substring(t1.nome from 1 for 1),'.') as descr,sum(t2.voti) as voti from ".$prefix."_ele_candidati as t1, ".$prefix."_ele_voti_candidati as t2 where t1.id_lista='$id_lista' and t1.id_cand=t2.id_cand GROUP BY descr order by voti desc, t1.num_cand";299 $sql = "SELECT concat(substring(concat('0',t1.num_cand),-2),') ',t1.cognome,' ',substring(t1.nome from 1 for 1),'.') as descr,sum(t2.voti) as voti from ".$prefix."_ele_candidati as t1, ".$prefix."_ele_voti_candidati as t2 where t1.id_lista='$id_lista' and t1.id_cand=t2.id_cand GROUP BY descr order by voti desc,descr"; 300 300 $res_can = $dbi->prepare("$sql"); 301 301 $res_can->execute(); … … 499 499 500 500 $sbarra=($validi*$supsbarramento)/100; 501 $sql = "SELECT t1.descrizione,t1.num_gruppo,t2.id_lista,t2.num_lista,t2.descrizione,sum(t3.voti) as voti from ".$prefix."_ele_gruppo as t1, ".$prefix."_ele_lista as t2, ".$prefix."_ele_voti_lista as t3 where t1.id_cons='$id_cons' and t1.id_gruppo=t2.id_gruppo and t2.id_lista=t3.id_lista group by t1.descrizione,t1.num_gruppo,t2. num_lista,t2.descrizione order by voti desc";501 $sql = "SELECT t1.descrizione,t1.num_gruppo,t2.id_lista,t2.num_lista,t2.descrizione,sum(t3.voti) as voti from ".$prefix."_ele_gruppo as t1, ".$prefix."_ele_lista as t2, ".$prefix."_ele_voti_lista as t3 where t1.id_cons='$id_cons' and t1.id_gruppo=t2.id_gruppo and t2.id_lista=t3.id_lista group by t1.descrizione,t1.num_gruppo,t2.id_lista,t2.num_lista,t2.descrizione order by voti desc"; 502 502 $res_per = $dbi->prepare("$sql"); 503 503 $res_per->execute(); -
trunk/client/modules/Elezioni/grafici.php
r352 r364 393 393 function graf_gruppo($visgralista){ 394 394 global $admin, $bgcolor1, $bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons,$genere,$votog,$votol,$votoc,$circo, $id_cons,$id_cons_gen,$id_comune,$id_circ,$tipo_cons,$w,$l,$op,$siteistat,$flash,$tema,$copy; 395 if ($siteistat==$id_comune) $logo=$siteistat; else $logo=''; // logo per il comune396 $logo=verificasimbolo(); // carica_logo da funzioni.php395 if ($siteistat==$id_comune) $logo=$siteistat; else $logo=''; // logo per il comune 396 $logo=verificasimbolo(); // carica_logo da funzioni.php 397 397 if (!$id_circ and $circo){ 398 398 $sql="SELECT id_circ from ".$prefix."_ele_circoscrizione where id_cons=$id_cons order by num_circ limit 0,1"; 399 $res_sez = $dbi->prepare("$sql");400 $res_sez->execute();399 $res_sez = $dbi->prepare("$sql"); 400 $res_sez->execute(); 401 401 402 402 list($id_circ)=$res_sez->fetch(PDO::FETCH_NUM); … … 406 406 if ($genere==4 or $visgralista){$tab="lista";} 407 407 if ($votog){$tab="lista";} 408 $sql="select *from ".$prefix."_ele_voti_$tab where id_cons='$id_cons' group by id_sez ";408 $sql="select id_sez from ".$prefix."_ele_voti_$tab where id_cons='$id_cons' group by id_sez "; 409 409 $res = $dbi->prepare("$sql"); 410 410 $res->execute(); … … 412 412 if ($circo){ 413 413 $sql="select t1.* from ".$prefix."_ele_voti_gruppo as t1, ".$prefix."_ele_gruppo as t2 where t1.id_gruppo=t2.id_gruppo and t1.id_cons='$id_cons' and t2.id_circ=$id_circ group by t1.id_sez "; 414 $res = $dbi->prepare("$sql");415 $res->execute();414 $res = $dbi->prepare("$sql"); 415 $res->execute(); 416 416 417 417 $sql="select sum(t1.voti) from ".$prefix."_ele_voti_gruppo as t1, ".$prefix."_ele_gruppo as t2 where t1.id_gruppo=t2.id_gruppo and t1.id_cons='$id_cons' and t2.id_circ=$id_circ"; 418 $restotv = $dbi->prepare("$sql");419 $restotv->execute();418 $restotv = $dbi->prepare("$sql"); 419 $restotv->execute(); 420 420 421 421 $circond="and id_circ=$id_circ";$circondt1="and t1.id_circ=$id_circ"; … … 476 476 left join ".$prefix."_ele_voti_$tab as t2 on (t1.id_gruppo=t2.id_gruppo) 477 477 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1 478 group by t 2.id_gruppo478 group by t1.id_gruppo, t1.num_gruppo, t1.descrizione 479 479 order by somma desc"; 480 480 $cosa='id_gruppo'; … … 751 751 left join ".$prefix.$scelta." 752 752 where t1.id_cons='$id_cons' $circos 753 group by t3.id_cand 754 755 order by somma desc 756 757 "; 758 $res = $dbi->prepare("$sql"); 759 $res->execute(); 753 group by t1.id_lista, t1.id_cand, t1.nome, t1.cognome 754 order by somma desc"; 755 $res = $dbi->prepare("$sql"); 756 $res->execute(); 760 757 761 758 $n_candi=$res->rowCount(); -
trunk/client/temi/Futura2/function_theme.php
r362 r364 39 39 40 40 41 $sql="select t1. *from ".$prefix."_ele_voti_".$tab." as t1 left join ".$prefix."_ele_$tab as t2 on t1.id_$tab=t2.id_$tab where t1.id_cons='$id_cons' $circos group by t1.id_sez ";42 43 41 $sql="select t1.id_sez from ".$prefix."_ele_voti_".$tab." as t1 left join ".$prefix."_ele_$tab as t2 on t1.id_$tab=t2.id_$tab where t1.id_cons='$id_cons' $circos group by t1.id_sez "; 42 $res = $dbi->prepare("$sql"); 43 $res->execute(); 44 44 if($res) 45 45 $numero=$res->rowCount(); … … 47 47 $numero=1; 48 48 $sql="select t1.* from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' $circos"; 49 50 49 $res = $dbi->prepare("$sql"); 50 $res->execute(); 51 51 $sezioni=$res->rowCount(); 52 52 if ($numero!=0){ … … 187 187 if ($genere==4 or $visgralista){$tab="ele_voti_lista";} 188 188 if ($votog){$tab="ele_voti_lista";} 189 $sql="select *from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez ";190 191 189 $sql="select id_sez from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez "; 190 $res = $dbi->prepare("$sql"); 191 $res->execute(); 192 192 if ($circo){ 193 193 $sql="select t1.* from ".$prefix."_ele_voti_gruppo as t1, ".$prefix."_ele_gruppo as t2 where t1.id_gruppo=t2.id_gruppo and t1.id_cons='$id_cons' and t2.id_circ=$id_circ group by t1.id_sez "; … … 248 248 left join ".$prefix."_$tab as t2 on (t1.id_gruppo=t2.id_gruppo) 249 249 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1 250 group by t 2.id_gruppo250 group by t1.id_gruppo, t1.num_gruppo, t1.descrizione 251 251 order by somma desc"; 252 252 $cosa='id_gruppo'; … … 474 474 if ($circo) $circos = "and id_circ=$id_circ" ; else $circos=''; 475 475 if ($genere==0) $tab="ref"; else $tab="gruppo"; 476 $sql="select *from ".$prefix."_ele_voti_".$tab." where id_cons='$id_cons' $circos group by id_sez ";477 478 476 $sql="select id_sez from ".$prefix."_ele_voti_".$tab." where id_cons='$id_cons' $circos group by id_sez "; 477 $res = $dbi->prepare("$sql"); 478 $res->execute(); 479 479 $numero=$res->rowCount(); 480 480 $sql="select * from ".$prefix."_ele_sezioni where id_cons='$id_cons' $circos "; 481 482 481 $res = $dbi->prepare("$sql"); 482 $res->execute(); 483 483 $sezioni=$res->rowCount(); 484 484 //$res = mysql_query("select chiusa from ".$prefix."_ele_cons_comuni where id_cons='$id_cons' $circos ",$dbi); … … 606 606 left join ".$prefix.$scelta." 607 607 where t1.id_cons='$id_cons' 608 group by t2.id_cand 609 610 order by somma desc 611 612 "; 608 group by t1.id_lista, t1.id_cand, t1.nome, t1.cognome 609 order by somma desc"; 613 610 $res = $dbi->prepare("$sql"); 614 611 $res->execute(); … … 679 676 680 677 // numero sezioni 681 $sql="select t3. *from ".$prefix."_ele_voti_".$tab." 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.id_sez ";678 $sql="select t3.id_sez from ".$prefix."_ele_voti_".$tab." 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.id_sez "; 682 679 $sez_num = $dbi->prepare("$sql"); 683 680 $sez_num->execute(); … … 1135 1132 1136 1133 1137 $sql="select t3. * 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' and t3.data='$data' and t3.orario='$orario'group by t3.id_sez ";1134 $sql="select t3.id_sez 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' and t3.data='$data' and t3.orario='$orario' group by t3.id_sez "; 1138 1135 $res1 = $dbi->prepare("$sql"); 1139 1136 $res1->execute(); … … 1215 1212 if ($genere==0) $tab="ref"; 1216 1213 1217 $sql="select t3. *from ".$prefix."_ele_voti_".$tab." 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.id_sez ";1214 $sql="select t3.id_sez from ".$prefix."_ele_voti_".$tab." 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.id_sez "; 1218 1215 $res = $dbi->prepare("$sql"); 1219 1216 $res->execute(); -
trunk/client/versione.php
r363 r364 1 1 <?php 2 2 3 $versione = "3.0 rev 36 3";3 $versione = "3.0 rev 364"; 4 4 $version_number = $versione; 5 $datarel = " 28marzo 2022";5 $datarel = "30 marzo 2022"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7
Note:
See TracChangeset
for help on using the changeset viewer.