- Timestamp:
- Oct 4, 2024, 12:14:01 PM (6 weeks ago)
- Location:
- trunk
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/admin.php
r424 r426 149 149 catch(PDOException $e) 150 150 { 151 echo $sql ."<br>" . $e->getMessage();die();151 echo "<br>" . $e->getMessage();die(); 152 152 } 153 153 $sql = "use $dbname"; … … 292 292 $sth->execute(); 293 293 } 294 /* $sth = $dbi->prepare("select aggiornamento from ".$prefix."_config");295 $sth->execute();296 list($agg)=$sth->fetch(PDO::FETCH_NUM);297 $_SESSION['aggiornamento']=$agg;*/298 ###########299 $righe='';300 if(phpversion()<5.6) $host="http://80.211.143.127";301 else $host="https://trac.eleonline.it";302 $headers=get_headers("$host/ele3/changeset/");303 $testurl=strlen($headers[0])>0?true:false;304 if(!$testurl){305 $newrev=0;306 }else{307 $file = file("$host/ele3/changeset/");308 $cntFile = count($file);309 $fine=0;310 $currentLine=0;311 312 foreach ($file as $line_num => $line) {313 if(strpos($line,'<title>') ) {$fine=1; continue;}314 if ($fine){315 $newrev=(int) filter_var($line, FILTER_SANITIZE_NUMBER_INT);316 break;317 }318 }319 }320 294 include('versione.php'); 321 $myrev=intval(substr($versione,-4,4));322 # $_SESSION['aggiornamento']=$agg;323 $_SESSION['localrev']=$myrev;324 $_SESSION['remoterev']=$newrev;325 unset($file);326 # if($agg) include('aggiornamento.php');327 #die("local: ".$_SESSION['localrev'].$_SESSION['remoterev']);328 295 } 329 296 if(!isset($_SESSION['BASE'])) $_SESSION['BASE']=substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['REQUEST_URI'], "/")-16); … … 509 476 $ref=$ref."&language=$language"; 510 477 $ref.="&msglogout=$msglogout"; 511 #$_SESSION=array(); 512 if (session_status() == PHP_SESSION_ACTIVE) 513 session_destroy(); 514 session_cache_expire (0); 478 $_SESSION=array(); 479 480 session_regenerate_id(); 481 session_write_close(); 482 session_cache_expire (0); 515 483 Header($ref); 516 484 -
trunk/admin/modules/Elezioni/aggiornamento.php
r424 r426 150 150 echo "<form name=\"conferma\" action=\"admin.php\"><input type=\"hidden\" name=\"errmex\" value=\"1\"><input type=\"hidden\" name=\"op\" value=\"aggiorna\">"; 151 151 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"><input type=\"hidden\" name=\"procedi\" value=\"1\">"; 152 echo "<br><table align=\"center\"><tr><td><h3>Procedo con verifica e aggiornamento del solo db (all'ultima versione scaricata)?< /h3></td><td><input type=\"submit\" name=\"vai\" value=\""._OK."\"></td></tr></table></form>";152 echo "<br><table align=\"center\"><tr><td><h3>Procedo con verifica e aggiornamento del solo db (all'ultima versione scaricata)?<br><i>E' consigliato procedere solo dopo aver prodotto una copia di backup</i></h3></td><td><input type=\"submit\" name=\"vai\" value=\""._OK."\"></td></tr></table></form>"; 153 153 }else{ 154 154 aggiornadb(); … … 160 160 if(phpversion()<5.6) $host="http://80.211.143.127"; 161 161 else $host="https://trac.eleonline.it"; 162 163 $headers=get_headers("$host/ele3/changeset/"); 164 165 $testurl=strlen($headers[0])>0?true:false; 166 if($testurl){ 167 $file = file("$host/ele3/changeset/"); 168 $cntFile = count($file); 169 $fine=0; 170 $currentLine=0; 171 foreach ($file as $line_num => $line) { 172 if(strpos($line,'<title>') ) {$fine=1; continue;} 173 if ($fine){ 174 $newrev=(int) filter_var($line, FILTER_SANITIZE_NUMBER_INT); 175 $_SESSION['remoterev']=$newrev; 176 break; 177 } 178 } 179 unset($file); 162 ###################### 163 $rev=0; 164 if ($stream = fopen('http://mail.eleonline.it/version/risposta.php', 'r')) { 165 $rev= stream_get_contents($stream, 4); 166 fclose($stream); 167 168 $newrev=(int) filter_var($rev, FILTER_SANITIZE_NUMBER_INT); 169 $_SESSION['remoterev']=$newrev; 180 170 }else{ 181 171 $errmex=2; … … 183 173 } 184 174 #$newrev=$_SESSION['remoterev']; 185 $myrev=$_SESSION['localrev']; 175 #$myrev=$_SESSION['localrev']; 176 include('versione.php'); 177 $myrev=intval(substr($versione,-4,4)); 178 $_SESSION['localrev']=$myrev; 179 186 180 if (isset($_SESSION['forzadb'])) $myrev=378; 187 181 if($newrev<=$myrev) { … … 213 207 { 214 208 echo '<p class="title"><a href="'. $item->link .'">' . $item->title . "</a></p>"; 215 #$str=preg_replace("--", "<br>--", $item->description );216 209 $str=preg_replace('/\s\--/','<br>--',$item->description); 217 #$str=preg_replace("[^A-Za-z0-9\-]", "<br>", $item->description ); 218 # $str=preg_replace('/\s\`echo "\040"`/','<br>--',$item->description); 219 # $str=htmlentities($item->description); 220 echo "<p class='desc'>" . $str . "</p>"; 210 echo "<p class='desc'>" . $str . "</p>"; 221 211 } 222 212 echo "</div>"; … … 228 218 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"><input type=\"hidden\" name=\"procedi\" value=\"1\">"; 229 219 echo "<br><table align=\"center\"><tr><td><h3>Procedo con l'aggiornamento?</h3></td><td><input type=\"submit\" name=\"vai\" value=\""._OK."\"></td></tr></table></form>"; 230 /* echo "<br><textarea name=\"log\" rows=\"15\" cols=\"150\">";231 foreach ($file as $line_num => $line) echo "$line";232 233 echo "</textarea>";234 ############Ã */235 220 $filename = "$host/ele3/changeset?format=zip&new=$newrev&new_path=%2F&old=$myrev&old_path=%2F"; 236 221 -
trunk/admin/modules/Elezioni/ele.php
r424 r426 66 66 function ele() { 67 67 68 global $espandi, $aid, $bgcolor1, $bgcolor2,$bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons, $id_cons_gen,$tipo_cons,$genere,$op,$id_comune,$perms,$id_cons,$votog,$votol,$votoc,$votocirc,$tema,$fascia,$limite,$BACKUP ;68 global $espandi, $aid, $bgcolor1, $bgcolor2,$bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons, $id_cons_gen,$tipo_cons,$genere,$op,$id_comune,$perms,$id_cons,$votog,$votol,$votoc,$votocirc,$tema,$fascia,$limite,$BACKUP,$versione; 69 69 70 70 include ("header.php"); … … 177 177 echo "<hr>"; 178 178 } 179 $newrev=$_SESSION['remoterev']; 179 if(isset($_SESSION['remoterev'])) { 180 $newrev=$_SESSION['remoterev']; 181 } else { 182 $rev=0; 183 if ($stream = fopen('http://mail.eleonline.it/version/risposta.php', 'r')) { 184 $rev= stream_get_contents($stream, 4); 185 fclose($stream); 186 } 187 $newrev=(int) filter_var($rev, FILTER_SANITIZE_NUMBER_INT); 188 $_SESSION['remoterev']=$newrev; 189 $myrev=intval(substr($versione,-4,4)); 190 $_SESSION['localrev']=$myrev; 191 192 193 } 180 194 $myrev=$_SESSION['localrev']; 181 195 if($newrev==$myrev or $newrev==0) echo "<a href=\"admin.php?op=aggiorna&id_cons_gen=$id_cons_gen\">$bullet"._AGGIORNA."</a><br>"; … … 314 328 } 315 329 316 317 330 ?> -
trunk/admin/variabili.php
r424 r426 9 9 # $CLIENT = Indirizzo del client di produzione, esempio: 'https://www.eleonline.it/client' 10 10 $CLIENT=''; 11 12 # $contr_agg se =0 non effettua il controllo della presenza di nuovi aggiornamenti nella fase di accesso alla procedura da parte dell'amministratore. 13 # il controllo viene comunque eseguito se si seleziona la funzione di menu: Aggiornamento 14 # Evita il rellentamento in accesso per l'amministratore ma non si ha la visualizzazione in grassetto della voce Aggiornamento 15 $contr_agg=1; 11 16 12 17 #numero di liste e gruppi visualizzati nella pagina -
trunk/admin/versione.php
r425 r426 1 1 <?php 2 2 3 $versione = "3.0 rev 42 5";3 $versione = "3.0 rev 426"; 4 4 $version_number = $versione; 5 $datarel = " 20 giugno2024";5 $datarel = "04 ottobre 2024"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7 -
trunk/client/temi/Futura2/function_theme.php
r419 r426 191 191 $res->execute(); 192 192 if ($circo){ 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 ";193 $sql="select t1.id_sez 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 "; 194 194 $res = $dbi->prepare("$sql"); 195 195 $res->execute(); … … 216 216 if ($genere!=0){ 217 217 // tot voti 218 if (!$circo) 218 if (!$circo) { 219 219 $sql="select sum(voti) from ".$prefix."_$tab where id_cons=$id_cons "; 220 if ($votog) 220 $restotv = $dbi->prepare("$sql"); 221 $restotv->execute(); 222 } 223 if ($votog) { 221 224 $sql="select sum(voti) from ".$prefix."_ele_voti_lista where id_cons=$id_cons "; 222 $restotv = $dbi->prepare("$sql"); 223 $restotv->execute(); 225 $restotv = $dbi->prepare("$sql"); 226 $restotv->execute(); 227 } 224 228 list($tot) = $restotv->fetch(PDO::FETCH_NUM); 225 229 … … 237 241 and t2.id_lista=t3.id_lista 238 242 and t1.id_gruppo=t3.id_gruppo 239 group by t1.id_gruppo 243 group by t1.id_gruppo, t1.num_gruppo, t1.descrizione 240 244 order by somma desc"; 241 245 $cosa='id_gruppo'; … … 466 470 function graf_liste_mob(){ 467 471 468 global $id_cons,$id_cons_gen,$prefix,$dbi,$min,$offset,$op,$tipo_cons,$prev,$next,$votog,$votol,$circo,$genere,$id_comune,$colortheme ;472 global $id_cons,$id_cons_gen,$prefix,$dbi,$min,$offset,$op,$tipo_cons,$prev,$next,$votog,$votol,$circo,$genere,$id_comune,$colortheme,$id_circ; 469 473 470 474 $offset=10000; 471 475 if (!isset($min)) $min=0; 472 476 473 // numero sezioni scrutinate sul gruppo 474 if ($circo) $circos = "and id_circ=$id_circ" ; else $circos=''; 475 if ($genere==0) $tab="ref"; else $tab="gruppo"; 477 // numero sezioni scrutinate 478 if ($genere==0) $tab="ref"; else $tab="lista"; 479 if ($circo and $id_circ) 480 { 481 $circos = "and id_$tab in (select id_$tab from soraldo_ele_$tab where id_circ=$id_circ)" ; 482 $circos2 = "and id_sede in (select id_sede from soraldo_ele_sede where id_circ=$id_circ)"; 483 $circos3 = "and id_circ=$id_circ"; 484 } 485 else {$circos=''; $circos2='';$circos3 = '';} 476 486 $sql="select id_sez from ".$prefix."_ele_voti_".$tab." where id_cons='$id_cons' $circos group by id_sez "; 477 487 $res = $dbi->prepare("$sql"); 478 488 $res->execute(); 479 489 $numero=$res->rowCount(); 480 $sql="select * from ".$prefix."_ele_sezioni where id_cons='$id_cons' $circos ";490 $sql="select * from ".$prefix."_ele_sezioni where id_cons='$id_cons' $circos2 "; 481 491 $res = $dbi->prepare("$sql"); 482 492 $res->execute(); … … 496 506 497 507 // tot liste 498 $sql="SELECT * FROM ".$prefix."_ele_lista where id_cons='$id_cons' ";508 $sql="SELECT * FROM ".$prefix."_ele_lista where id_cons='$id_cons' $circos3 "; 499 509 $res = $dbi->prepare("$sql"); 500 510 $res->execute(); … … 502 512 503 513 // tot voti liste 504 $sql="select sum(voti) from ".$prefix."_ele_voti_lista where id_cons='$id_cons' ";514 $sql="select sum(voti) from ".$prefix."_ele_voti_lista where id_cons='$id_cons' $circos"; 505 515 $res_lista_tutti = $dbi->prepare("$sql"); 506 516 $res_lista_tutti->execute(); 507 517 list($voti_lista_tutti) = $res_lista_tutti->fetch(PDO::FETCH_NUM); 508 518 509 $sql="select id_cons ,id_lista ,id_gruppo, num_lista, descrizione from ".$prefix."_ele_lista where id_cons='$id_cons' ORDER BY num_lista LIMIT $min,$offset";519 $sql="select id_cons ,id_lista ,id_gruppo, num_lista, descrizione from ".$prefix."_ele_lista where id_cons='$id_cons' $circos3 ORDER BY num_lista LIMIT $min,$offset"; 510 520 $result = $dbi->prepare("$sql"); 511 521 $result->execute(); … … 562 572 563 573 function graf_candidato_mob(){ 564 global $dbi,$bgcolor1, $bgcolor5,$bgcolor5, $prefix, $offset, $min,$descr_cons, $id_cons,$tipo_cons,$copy,$id_comune,$id_istat,$genere,$votog,$votol,$votoc,$circo,$siteistat ;574 global $dbi,$bgcolor1, $bgcolor5,$bgcolor5, $prefix, $offset, $min,$descr_cons, $id_cons,$tipo_cons,$copy,$id_comune,$id_istat,$genere,$votog,$votol,$votoc,$circo,$siteistat,$id_circ; 565 575 if ($siteistat==$id_comune) $logo='1'; else $logo=''; // logo per il comune 566 576 $bgcolor1=""; 577 if($circo) 578 $circos="and id_cand in (select id_cand from ".$prefix."_ele_candidati where id_lista in (select id_lista from ".$prefix."_ele_lista where id_circ=$id_circ))"; 579 else 580 $circos=''; 567 581 568 582 $tab="ele_voti_candidati"; 569 583 570 $sql="select id_sez from ".$prefix."_ele_voti_candidati where id_cons='$id_cons' group by id_sez ";571 584 $sql="select id_sez from ".$prefix."_ele_voti_candidati where id_cons='$id_cons' $circos group by id_sez "; 585 $res = $dbi->prepare("$sql"); 572 586 $res->execute(); 573 587 $numero=$res->rowCount(); 574 $sql="select * from ".$prefix."_ele_sezioni where id_cons='$id_cons'"; 588 if($circo) 589 $circos="and id_sede in (select id_sede from ".$prefix."_ele_sede where id_circ=$id_circ)"; 590 else 591 $circos=''; 592 593 $sql="select * from ".$prefix."_ele_sezioni where id_cons='$id_cons' $circos"; 575 594 $res = $dbi->prepare("$sql"); 576 595 $res->execute(); … … 587 606 588 607 // tot voti 608 if($circo) 609 $circos="and id_cand in (select id_cand from ".$prefix."_ele_candidati where id_lista in (select id_lista from ".$prefix."_ele_lista where id_circ=$id_circ))"; 610 else 611 $circos=''; 589 612 $sql=" 590 select sum(voti) from ".$prefix."_ele_voti_candidati where id_cons=$id_cons ";613 select sum(voti) from ".$prefix."_ele_voti_candidati where id_cons=$id_cons $circos"; 591 614 $res = $dbi->prepare("$sql"); 592 615 $res->execute(); … … 601 624 } 602 625 $i=0; 603 $sql="select t1.id_lista, t1.id_cand, t1.nome , t1.cognome, sum(t2.voti) as somma 604 from ".$prefix."_ele_candidati as t1 605 left join ".$prefix."_ele_voti_candidati as t2 on (t1.id_cand=t2.id_cand) 606 left join ".$prefix.$scelta." 607 where t1.id_cons='$id_cons' 608 group by t1.id_lista, t1.id_cand, t1.nome, t1.cognome 609 order by somma desc"; 610 $res = $dbi->prepare("$sql"); 611 $res->execute(); 612 $n_candi=$res->rowCount(); 613 614 while (list($id_lista,$id_cand,$nome,$cognome,$voti) = $res->fetch(PDO::FETCH_NUM)){ 615 $candidato[$i]=$cognome; 616 $pro[$i]=number_format($voti*100/$tot,2); 617 // sviluppo tabella dati 618 $e=$i+1; 619 echo "<li><table style=\"text-align:left;border : 1px solid Black;width:100%;\">"; // inizio tabella dati 620 echo "<tr><td>".$e."°</td><td><b><img alt=\"$nome $cognome\" src=\"modules.php?name=Elezioni&file=foto&id_lista=$id_lista\" align=\"middle\" width=\"30\"></b></td> 621 <td width=\"70%\" bgcolor=\"$bgcolor1\"><b>$nome $cognome</b><br/> 622 "._VOTI.": <b>$voti </b> 623 ( <span style=\"color:#ff0000;\">$pro[$i]%</span> )</td></tr>"; 624 echo "</table></li>"; // fine tabella dati 625 /* tolto il conteggio 626 if ($e=='5000' || $e==$n_candi){ 627 628 629 630 631 632 //include("footer.php"); 633 exit; 634 } 635 636 */ 637 638 $i++; 639 640 641 642 626 if($circo) 627 $circos="and id_circ=$id_circ"; 628 else 629 $circos=''; 630 $sql="select t1.id_lista, t1.id_cand, t1.nome , t1.cognome, sum(t2.voti) as somma 631 from ".$prefix."_ele_candidati as t1 632 left join ".$prefix."_ele_voti_candidati as t2 on (t1.id_cand=t2.id_cand) 633 left join ".$prefix.$scelta." 634 where t1.id_cons='$id_cons' $circos 635 group by t1.id_lista, t1.id_cand, t1.nome, t1.cognome 636 order by somma desc"; 637 $res = $dbi->prepare("$sql"); 638 $res->execute(); 639 $n_candi=$res->rowCount(); 640 641 while (list($id_lista,$id_cand,$nome,$cognome,$voti) = $res->fetch(PDO::FETCH_NUM)){ 642 $candidato[$i]=$cognome; 643 $pro[$i]=number_format($voti*100/$tot,2); 644 // sviluppo tabella dati 645 $e=$i+1; 646 echo "<li><table style=\"text-align:left;border : 1px solid Black;width:100%;\">"; // inizio tabella dati 647 echo "<tr><td>".$e."°</td><td><b><img alt=\"$nome $cognome\" src=\"modules.php?name=Elezioni&file=foto&id_lista=$id_lista\" align=\"middle\" width=\"30\"></b></td> 648 <td width=\"70%\" bgcolor=\"$bgcolor1\"><b>$nome $cognome</b><br/> 649 "._VOTI.": <b>$voti </b> 650 ( <span style=\"color:#ff0000;\">$pro[$i]%</span> )</td></tr>"; 651 echo "</table></li>"; // fine tabella dati 652 /* tolto il conteggio 653 if ($e=='5000' || $e==$n_candi){ 654 655 656 657 658 659 //include("footer.php"); 660 exit; 643 661 } 644 645 } 662 663 */ 664 665 $i++; 666 667 668 669 670 } 671 672 } 646 673 647 674 } … … 1096 1123 if (isset($circo) and $circo) $circos="and t2.id_circ='$id_circ'"; 1097 1124 else $circos=''; 1098 $circos='';1099 1125 // numero sezioni scrutinate 1100 $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' ";1126 $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"; 1101 1127 $res2 = $dbi->prepare("$sql"); 1102 1128 $res2->execute(); 1103 1129 $sezioni=$res2->rowCount(); 1104 $sql="select orario,data from ".$prefix."_ele_voti_parziale where id_cons='$id_cons' order by data desc,orario desc limit 1";1130 $sql="select orario,data from ".$prefix."_ele_voti_parziale where id_cons='$id_cons' order by data desc,orario desc limit 0,1"; 1105 1131 $res = $dbi->prepare("$sql"); 1106 1132 $res->execute(); … … 1110 1136 list ($anno,$mese,$giorno)=explode('-',$data); 1111 1137 $tot_v_m=0;$tot_v_d=0;$tot_t=0; 1112 $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 $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' $circos group by t3.id_sez "; 1113 1139 $res1 = $dbi->prepare("$sql"); 1114 1140 $res1->execute(); … … 1120 1146 $res1->execute(); 1121 1147 while(list($voti_t, $num_gruppo,$id_gruppo) = $res1->fetch(PDO::FETCH_NUM)) { 1122 $query="select sum(t3.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' and t3.data='$data' and t3.orario='$orario' $circos"; 1148 $query="select sum(t3.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' and t3.data='$data' and t3.orario='$orario' $circos"; 1123 1149 if ($genere==0){$query.=" and t3.id_gruppo=$id_gruppo";} 1124 1150 $res_aff = $dbi->prepare("$query"); … … 1126 1152 $voti_numero=$res_aff->rowCount(); 1127 1153 # $query="select sum(t1.maschi+t1.femmine) 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' "; 1128 $query="SELECT sum(maschi+femmine) FROM ".$prefix."_ele_sezioni as t1, ".$prefix."_ele_sede as t2 where t1.id_cons='$id_cons' and t1.id_sede=t2.id_sede ";1154 $query="SELECT sum(maschi+femmine) FROM ".$prefix."_ele_sezioni as t1, ".$prefix."_ele_sede as t2 where t1.id_cons='$id_cons' and t1.id_sede=t2.id_sede $circos"; 1129 1155 //if ($genere==0){$query.=" and t3.id_gruppo=$id_gruppo";} 1130 1156 $tot=''; … … 1185 1211 if (isset($circo) and $circo) $circos="and t2.id_circ='$id_circ'"; 1186 1212 else $circos=''; 1187 $circos='';1213 # $circos=''; 1188 1214 //if ($genere==0) $tab="ref";elseif($genere=='4' || $votog) $tab="lista"; 1189 1215 if($genere=='4' || $votog) $tab="lista"; -
trunk/client/temi/Futura2/index.php
r407 r426 30 30 #################################### 31 31 32 global $op,$tema,$dbi,$nometema,$file,$bgcolor,$sitename,$prefix,$blocco,$lang,$siteistat,$id_cons_gen,$descr_cons,$minsez,$offsetsez,$multicomune,$id_comune,$multicomune,$rss,$colortheme,$descr_com ;32 global $op,$tema,$dbi,$nometema,$file,$bgcolor,$sitename,$prefix,$blocco,$lang,$siteistat,$id_cons_gen,$descr_cons,$minsez,$offsetsez,$multicomune,$id_comune,$multicomune,$rss,$colortheme,$descr_com,$circo,$id_circ; 33 33 34 34 include("temi/$tema/function_theme.php"); … … 80 80 echo ' <div data-role="navbar"> 81 81 <ul> 82 <li><a href="modules.php?id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' ?" data-icon="home" data-theme="'.$colortheme.'" '.$active_home.' >Home</a></li>83 <li><a href="modules.php?op=informazioni&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-icon="file" data-theme="'.$colortheme.'" '.$active_info.' >Info</a></li>84 <li><a href="modules.php?op=risultati&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-icon="list" data-theme="'.$colortheme.'" '.$active_ris.' >Risultati</a></li>85 <li><a href="modules.php?op=grafica_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' "" data-icon="th-large" data-theme="'.$colortheme.'" '.$active_graf.'>Grafica</a></li>86 <li><a href="modules.php?op=conf_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-icon="cogs" data-theme="'.$colortheme.'" '.$active_conf.' >Opzioni</a></li>82 <li><a href="modules.php?id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'?" data-icon="home" data-theme="'.$colortheme.'" '.$active_home.' >Home</a></li> 83 <li><a href="modules.php?op=informazioni&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-icon="file" data-theme="'.$colortheme.'" '.$active_info.' >Info</a></li> 84 <li><a href="modules.php?op=risultati&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-icon="list" data-theme="'.$colortheme.'" '.$active_ris.' >Risultati</a></li> 85 <li><a href="modules.php?op=grafica_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'"" data-icon="th-large" data-theme="'.$colortheme.'" '.$active_graf.'>Grafica</a></li> 86 <li><a href="modules.php?op=conf_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-icon="cogs" data-theme="'.$colortheme.'" '.$active_conf.' >Opzioni</a></li> 87 87 </ul> 88 88 </div> … … 109 109 <input type=\"hidden\" name=\"prima\" value=\"1\" /> 110 110 <select name=\"id_cons_gen\" id=\"select-choice-a\" 111 onchange=\"javascript:top.location.href='modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune& file=index&id_cons_gen='+this.options[this.options.selectedIndex].value\">";111 onchange=\"javascript:top.location.href='modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&id:circ=$id_circ&file=index&id_cons_gen='+this.options[this.options.selectedIndex].value\">"; 112 112 113 113 while(list($id,$descrizione) = $res->fetch(PDO::FETCH_NUM)) { … … 117 117 } 118 118 119 echo '</select></label></form> 119 echo '</select></label>'; 120 ##### 121 if($circo) 122 { 123 $sql="SELECT t1.id_circ,t1.descrizione FROM ".$prefix."_ele_circoscrizione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons=t2.id_cons and t2.id_cons_gen=$id_cons_gen and t2.id_comune='$id_comune' order by t1.num_circ"; 124 $rescirc = $dbi->prepare("$sql"); 125 $rescirc->execute(); 126 $esistecirc=$rescirc->rowCount(); 127 echo "<label forcirc=\"circoscrizione\"> 128 <select name=\"id_circ\" id=\"select-choice-b\" 129 onchange=\"javascript:top.location.href='modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id_cons_gen&id_circ='+this.options[this.options.selectedIndex].value\">"; 130 while(list($idc,$desc_circ) = $rescirc->fetch(PDO::FETCH_NUM)) { 131 # $descrizione=substr(str_replace("+"," ",$descrizione),0,30); 132 $sel = ($idc == $id_circ) ? "selected=\"selected\"":""; 133 echo "<option style=\"font-size:12px;\" value=\"$idc\" $sel >$desc_circ</option>"; 134 } 135 echo '</select></label>'; 136 } 137 ##### 138 echo '</form> 120 139 121 140 </div>'; … … 151 170 152 171 function footer_mon(){ 153 global $id_comune,$id_cons_gen,$tema,$colortheme,$rss,$prefix,$dbi ;172 global $id_comune,$id_cons_gen,$tema,$colortheme,$rss,$prefix,$dbi,$id_circ; 154 173 155 174 $sql="SELECT tema FROM `".$prefix."_config`"; … … 166 185 if($tema=="Futura2") 167 186 //echo'<a href="backtoapp.html" data-rel="external" data-ajax="false">Chiudi</a>'; // per l'app precedente non piu usata 168 echo ' <a href="modules.php?name=Elezioni&tema='.$deftema.'&nocell=1&op=gruppo&id_cons_gen='.$id_cons_gen.' " data-rel="external" data-ajax="false" >Versione Desktop</a>';187 echo ' <a href="modules.php?name=Elezioni&tema='.$deftema.'&nocell=1&op=gruppo&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-rel="external" data-ajax="false" >Versione Desktop</a>'; 169 188 else 170 189 echo ' <a href="modules.php?name=Elezioni&tema=facebook&desktop=1&op=gruppo" data-rel="external" data-ajax="false" >Versione Desktop</a>'; … … 182 201 ############################ menu home page 183 202 function home(){ 184 global $id_comune,$id_cons_gen,$tema,$colortheme ;203 global $id_comune,$id_cons_gen,$tema,$colortheme,$id_circ; 185 204 //include("temi/$tema/config.php"); 186 205 187 206 echo '<div data-role="content" data-theme="a"> 188 <a href="modules.php?op=informazioni&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Informazioni Elettorali</a>189 <!-- <a href="modules.php?op=affluenze&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="heart">Ultima Affluenza</a> -->190 <a href="modules.php?op=risultati&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Risultati Elettorali</a>207 <a href="modules.php?op=informazioni&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Informazioni Elettorali</a> 208 <!-- <a href="modules.php?op=affluenze&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="heart">Ultima Affluenza</a> --> 209 <a href="modules.php?op=risultati&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Risultati Elettorali</a> 191 210 </div>'; 192 211 echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">'; … … 203 222 ############################### menu informazioni 204 223 function info(){ 205 global $id_comune,$id_cons_gen,$colortheme ;224 global $id_comune,$id_cons_gen,$colortheme,$id_circ; 206 225 echo ' 207 226 <div data-role="content" data-theme="a"> 208 <a href="modules.php?op=dati_generali&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">227 <a href="modules.php?op=dati_generali&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right"> 209 228 Dati Generali</a> 210 <a href="modules.php?op=come_si_vota&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">229 <a href="modules.php?op=come_si_vota&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right"> 211 230 Come si Vota</a> 212 <a href="modules.php?op=numeri_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">231 <a href="modules.php?op=numeri_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right"> 213 232 Numeri Utili</a> 214 <a href="modules.php?op=servizi_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">233 <a href="modules.php?op=servizi_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right"> 215 234 Servizi Utili</a> 216 235 </div> … … 221 240 ####################################### menu risultati 222 241 function risultati(){ 223 global $id_comune,$id_cons_gen,$genere,$tipo_cons,$colortheme,$votoc ;242 global $id_comune,$id_cons_gen,$genere,$tipo_cons,$colortheme,$votoc,$id_circ; 224 243 echo '<div data-role="content" data-theme="'.$colortheme.'"> 225 <a href="modules.php?op=affluenze_all&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Affluenze</a>226 <a href="modules.php?op=votanti_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Votanti</a>227 <a href="modules.php?op=gruppo_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._GRUPPO.'</a>';244 <a href="modules.php?op=affluenze_all&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Affluenze</a> 245 <a href="modules.php?op=votanti_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Votanti</a> 246 <a href="modules.php?op=gruppo_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._GRUPPO.'</a>'; 228 247 229 248 if($genere==3 OR $genere==5) 230 echo '<a href="modules.php?op=liste_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._LISTA.'</a>';249 echo '<a href="modules.php?op=liste_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._LISTA.'</a>'; 231 250 if(($genere==3 OR $genere==5) and !$votoc) 232 echo '<a href="modules.php?op=candidato_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._CANDIDATO.'</a>';251 echo '<a href="modules.php?op=candidato_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._CANDIDATO.'</a>'; 233 252 234 253 … … 240 259 ####################################### menu grafica 241 260 function grafica_mob(){ 242 global $id_comune,$id_cons_gen,$genere,$tipo_cons,$colortheme ;261 global $id_comune,$id_cons_gen,$genere,$tipo_cons,$colortheme,$id_circ; 243 262 echo '<div data-role="content" data-theme="'.$colortheme.'"> 244 263 245 <a href="modules.php?op=grafsezione&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Elenco Sezioni scrutinate</a>246 247 <a href="modules.php?op=affluenze&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Grafica Affluenze</a>248 <a href="modules.php?op=grafvotanti_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.' " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Grafica Votanti</a>';264 <a href="modules.php?op=grafsezione&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Elenco Sezioni scrutinate</a> 265 266 <a href="modules.php?op=affluenze&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Grafica Affluenze</a> 267 <a href="modules.php?op=grafvotanti_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Grafica Votanti</a>'; 249 268 /* 250 269 <a href="modules.php?op=grafgruppo&grafica=0&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._GRUPPO.'</a>'; … … 269 288 # affluenza unica x grafica 270 289 function affluenze(){ 271 global $tema; 290 global $tema; 272 291 affluenza_unica(); 273 292 grafica_mob(); -
trunk/client/versione.php
r425 r426 1 1 <?php 2 2 3 $versione = "3.0 rev 42 5";3 $versione = "3.0 rev 426"; 4 4 $version_number = $versione; 5 $datarel = " 20 giugno2024";5 $datarel = "04 ottobre 2024"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7
Note:
See TracChangeset
for help on using the changeset viewer.