Changeset 364
- Timestamp:
- Mar 30, 2022, 2:56:01 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/aggiornadb.php
r363 r364 201 201 $ret=aggiorna($sql,$dbi,'',$num); 202 202 }else{ 203 $sql="ALTER TABLE `".$prefix."_ele_sezioni` CHANGE `colore` `colore` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULLDEFAULT '#FAFAD2'";203 $sql="ALTER TABLE `".$prefix."_ele_sezioni` CHANGE `colore` `colore` VARCHAR(50) DEFAULT '#FAFAD2'"; 204 204 $ret=aggiorna($sql,$dbi,'',$num); 205 205 } echo "<br>"; -
trunk/admin/modules/Elezioni/controllo_voti.php
r344 r364 88 88 if ($genere>0) { //se non e' un referendum 89 89 if (!($genere==4) and $pag==0){ //se non e' una lista uninominale ed e' la prima pagina 90 $tab="SELECT 0,t2.id_sez,t2.num_sez,t2.validi,'0',t2.validi,t2.nulli,t2.bianchi,t2.contestati, t4.id_circ,t2.id_sede,'0',t2.voti_nulli,t2.validi_lista,t2.voti_nulli_lista,t2.contestati_lista,t2.solo_gruppo,t2.solo_lista FROM ".$prefix."_ele_sezioni as t2 left join ".$prefix."_ele_sede as t4 on (t2.id_sede=t4.id_sede) where t2.id_cons='$id_cons' and t2.validi+t2.nulli+t2.bianchi+t2.contestati>0 group by t2.id_sez order by t2.num_sez"; 91 90 $tab="SELECT 0,t2.id_sez,t2.num_sez,t2.validi,'0',t2.validi,t2.nulli,t2.bianchi,t2.contestati, t4.id_circ,t2.id_sede,'0',t2.voti_nulli,t2.validi_lista,t2.voti_nulli_lista,t2.contestati_lista,t2.solo_gruppo,t2.solo_lista FROM ".$prefix."_ele_sezioni as t2 left join ".$prefix."_ele_sede as t4 on (t2.id_sede=t4.id_sede) where t2.id_cons='$id_cons' and t2.validi+t2.nulli+t2.bianchi+t2.contestati>0 order by t2.num_sez"; 92 91 }else{ // e' una lista uninominale o la seconda pagina 93 92 $tab="SELECT '0',t1.id_sez,t1.num_sez,sum(t2.voti),t1.solo_gruppo,t1.validi,t1.nulli,t1.bianchi,t1.contestati, t4.id_circ,t1.id_sede,'0',t1.voti_nulli,t1.validi_lista,t1.voti_nulli_lista,t1.contestati_lista,t1.solo_gruppo,t1.solo_lista 94 93 FROM ".$prefix."_ele_sezioni as t1 left join ".$prefix.$tab3." as t2 on (t1.id_sez=t2.id_sez) 95 94 left join ".$prefix."_ele_sede as t4 on (t1.id_sede=t4.id_sede) 96 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons group by t 2.id_sez order by t1.num_sez";95 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons group by t1.id_sez,t1.num_sez,t1.solo_gruppo,t1.validi,t1.nulli,t1.bianchi,t1.contestati, t4.id_circ,t1.id_sede,t1.voti_nulli,t1.validi_lista,t1.voti_nulli_lista,t1.contestati_lista,t1.solo_gruppo,t1.solo_lista order by t1.num_sez"; 97 96 } 98 97 $riga1="<tr><td>\n<table border=\"0\" width=\"100%\" bgcolor=\"$bgcolor1\" ><tr><td align=\"center\">"._SEZSCR." "._CONSULTAZIONE."</td></tr></table></td></tr>\n"; -
trunk/admin/modules/Elezioni/ele_gruppo.php
r344 r364 231 231 $res = $dbi->prepare("$sql"); 232 232 $res->execute(); 233 if (!$res ult) return;233 if (!$res) return; 234 234 Header("Location: admin.php?op=gruppo&id_cons_gen=$id_cons_gen&id_circ=$id_circ&min=$min"); 235 235 } -
trunk/admin/modules/Elezioni/ele_riepilogovoti.php
r362 r364 86 86 { 87 87 $totg+=$votigruppo; $totsg+=$sologruppo; 88 $sql="SELECT id_lista,num_lista,descrizione FROM ".$prefix."_ele_lista where id_cons='$id_cons' and id_gruppo='$id_gruppo' group by id_lista order by num_lista";88 $sql="SELECT id_lista,num_lista,descrizione FROM ".$prefix."_ele_lista where id_cons='$id_cons' and id_gruppo='$id_gruppo' order by num_lista"; 89 89 $resl = $dbi->prepare("$sql"); 90 90 $resl->execute(); -
trunk/admin/modules/Elezioni/ele_spoglio.php
r362 r364 403 403 $resgs->execute(); 404 404 list($vsg3)=$resgs->fetch(PDO::FETCH_NUM); 405 if($sgs3!=$vsg3 )405 if($sgs3!=$vsg3 and $flagsg) 406 406 echo "<table class=\"table-menu\" style=\"width: 50%;\"><tr><td style=\"background-color: rgb(255, 0, 0); color: black; text-align: center\"><img src=\"modules/Elezioni/images/alert.gif\" align=\"middle\" alt=\"\"><br/><b> ATTENZIONE!<BR/>I voti al solo gruppo: $sgs3 non corrispondono a quelli inseriti nella scheda dei gruppi $vsg3 </b><br></td></tr></table>"; 407 407 -
trunk/admin/modules/Elezioni/scarica.php
r360 r364 51 51 }elseif ($fase=='1'){ 52 52 $urlrem="$indirizzoweb/file.php?fase=1"; 53 $rem_cons="<script type=\"text/javascript\" src=\"$urlrem\" crossorigin=\"anonymous\"></script>";53 $rem_cons="<script type=\"text/javascript\" src=\"$urlrem\"></script>"; 54 54 echo "<form name=\"import\" action=\"admin.php\">"; 55 55 echo "<table border=\"0\" width=\"100%\"><tr bgcolor=\"$bgcolor2\">"; -
trunk/admin/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 -
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 -
trunk/install/install2.php
r253 r364 460 460 461 461 <tr><td width="150">Abilita il formato Flash?</td><td> 462 <select name="flash"><option value="1" selected>SI</option><option value="0">NO</option></select></td>463 <td>L'abilitazione del Flash permette di avere grafici in movimento. Se disabilitato egrafici saranno statici</td>462 <select name="flash"><option value="1">SI</option><option value="0" selected>NO</option></select></td> 463 <td>L'abilitazione del Flash permette di avere grafici in movimento. Se disabilitato i grafici saranno statici</td> 464 464 465 465 </tr>
Note:
See TracChangeset
for help on using the changeset viewer.