- Timestamp:
- Jun 13, 2024, 7:18:22 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/admin.php
r416 r424 39 39 $_COOKIE = $HTTP_COOKIE_VARS; 40 40 } 41 if(isset($HTTP_SESSION_VARS)) { 42 $_SESSION = $HTTP_SESSION_VARS; 43 } 41 44 42 } 45 43 … … 120 118 #session_start();//MODIFICHE PER GESTIONE SESSIONI 121 119 // gestione sessione 120 if (!isset($_SESSION)) 121 { 122 session_start(); 123 }else session_regenerate_id(); 122 124 $a = session_id(); 123 125 if(empty($a)) session_start(); 124 126 #echo "SID: ".SID."<br>session_id(): ".session_id()."<br>COOKIE: ".$_COOKIE["PHPSESSID"]; 127 125 128 126 129 if (file_exists("config.php")){ … … 134 137 die("<html><body><div style=\"text-align:center\"><br /><br /><img src=\"modules/Elezioni/images/logo.jpg\" alt=\"Eleonline\" title=\"Eleonline\"><br /><br /><strong>Sembra che <a href='http://www.eleonline.it' title='Eleonline'>Eleonline</a> non sia stato ancora installato.<br /><br />Puoi procedere <a href='../install/index.php'>cliccando qui</a> per iniziare l'installazione</strong></div></body></html>"); 135 138 } 136 139 require_once('variabili.php'); 137 140 $dsn = "mysql:host=$dbhost"; 138 141 $opt = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_EMULATE_PREPARES => false); … … 266 269 $_SESSION['bgcolor2']='#c5c5c5'; 267 270 if (!isset($op)) $op='consultazione'; 268 session_regenerate_id();269 271 } 270 272 } … … 326 328 } 327 329 if(!isset($_SESSION['BASE'])) $_SESSION['BASE']=substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['REQUEST_URI'], "/")-16); 328 if(!isset($language) ) $language=$_SESSION['lang'];330 if(!isset($language) and isset($_SESSION['lang'])) $language=$_SESSION['lang']; else $language='it'; 329 331 if (! isset($_SESSION['lang'])) $_SESSION['lang']=$language; 330 332 $currentlang=strlen($_SESSION['lang'])==2 ? $_SESSION['lang']: $language; … … 341 343 else { 342 344 # $oggi=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-3,date("Y"))); 343 $sql="select t1.id_cons_gen from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and date_add(t1.data_fine, interval 3 day)>CURDATE() and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and permessi>0) limit 0,1";# TEST: and id_sez>0345 $sql="select t1.id_cons_gen from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and date_add(t1.data_fine, interval $giorniaut day)>CURDATE() and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and permessi>0) limit 0,1";# TEST: and id_sez>0 344 346 $rese = $dbi->prepare("$sql"); 345 347 $rese->execute(); … … 371 373 /*********************************************************/ 372 374 function ChiSei($idcg){ 373 global $dbi, $msglogout, $id_cons_gen ;375 global $dbi, $msglogout, $id_cons_gen,$giorniaut; 374 376 375 377 $aid=$_SESSION['aid']; … … 383 385 $sth->execute(); 384 386 $row = $sth->fetch(PDO::FETCH_BOTH); 385 387 if($row){ 386 388 $adminsuper=$row[0]; 387 389 $admincomune=$row[1]; 388 $oper=$row[2]; 390 $oper=$row[2]; 391 }else{ 392 $adminsuper=0; 393 $admincomune=0; 394 $oper=1; 395 } 389 396 if ($adminsuper==1) 390 397 return 256; … … 395 402 else { 396 403 # $oggi=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-3,date("Y"))); 397 $sql="select t1.id_cons, t1.id_cons_gen from ".$prefix."_ele_cons_comune as t1, ".$prefix."_ele_consultazione as t2 where t1.id_cons_gen=t2.id_cons_gen and t1.chiusa='0' and t1.id_comune='$id_comune' and date_add(t2.data_fine, interval 3day)>CURDATE()";404 $sql="select t1.id_cons, t1.id_cons_gen from ".$prefix."_ele_cons_comune as t1, ".$prefix."_ele_consultazione as t2 where t1.id_cons_gen=t2.id_cons_gen and t1.chiusa='0' and t1.id_comune='$id_comune' and date_add(t2.data_fine, interval $giorniaut day)>CURDATE()"; 398 405 $sth = $dbi->prepare("$sql"); 399 406 $sth->execute(); … … 486 493 487 494 global $siteistat,$perms,$msglogout; 495 if (!isset($_SESSION)) 496 { 497 session_start(); 498 } 488 499 $language=$_SESSION['lang']; 489 500 $ref="Location: admin.php?"; … … 498 509 $ref=$ref."&language=$language"; 499 510 $ref.="&msglogout=$msglogout"; 500 $_SESSION=array(); 501 session_unset();502 session_destroy();511 #$_SESSION=array(); 512 if (session_status() == PHP_SESSION_ACTIVE) 513 session_destroy(); 503 514 session_cache_expire (0); 504 515 Header($ref); … … 508 519 #include("modules/Elezioni/language/lang-".$_SESSION['lang'].".php"); 509 520 #die( "$sql <br> TEST id_cons_gen:$id_cons_gen:".$_SESSION['id_cons_gen']); 510 if(isset($id_cons_gen) and isset($id_comune)){ 521 if(isset($id_cons_gen) and isset($id_comune)){ 511 522 if(!isset($id_cons)){ 512 523 # $sql = "SELECT t2.id_cons FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_cons_gen='$id_cons_gen' and t2.id_comune='$id_comune'"; … … 520 531 } 521 532 if(isset($id_cons)) { 522 $sql="SELECT id_sez FROM ".$prefix."_ele_operatori where id_sez>0 and aid='$aid' and id_comune=$id_comune ";533 $sql="SELECT id_sez FROM ".$prefix."_ele_operatori where id_sez>0 and aid='$aid' and id_comune=$id_comune and id_cons=$id_cons"; 523 534 try { 524 535 $resmod = $dbi->prepare("$sql"); … … 544 555 } 545 556 } 546 $perms=ChiSei($id_cons_gen); 557 $perms=ChiSei($id_cons_gen); 547 558 if($perms==0) {logout();} 548 559 } … … 723 734 include("modules/Elezioni/ele_riepilogovoti.php"); 724 735 break; 736 case "aggcons": 737 include("modules/Elezioni/ele_restorebackup.php"); 738 break; 725 739 case "logout": 726 740 logout(); -
trunk/admin/header.php
r369 r424 33 33 $lang=$_SESSION['lang']; 34 34 } 35 elseif ( strlen($_SESSION['lang'])==2) $lang=$_SESSION['lang'];35 elseif (isset($_SESSION['lang']) and strlen($_SESSION['lang'])==2) $lang=$_SESSION['lang']; 36 36 else {$lang=$language; $_SESSION['lang']=$lang;} 37 37 include_once("modules/Elezioni/language/lang-$lang.php"); -
trunk/admin/inc/sql/db.sql
r358 r424 24 24 id_conf,descrizione,limite,consin,infpremio,supsbarramento,suppremio,listinfsbar,listinfconta,listsupconta,supminpremio,infminpremio,infdisgiunto,supdisgiunto,votolista,inffisso,supfisso,fascia_capoluogo 25 25 [_ele_cons_comune] 26 id_cons,chiusa,id_comune,id_cons_gen,id_conf,preferita,preferenze,id_fascia,vismf,solo_gruppo,disgiunto 26 id_cons,chiusa,id_comune,id_cons_gen,id_conf,preferita,preferenze,id_fascia,vismf,solo_gruppo,disgiunto,proiezione 27 27 [_ele_consultazione] 28 28 id_cons_gen,descrizione,data_inizio,data_fine,tipo_cons -
trunk/admin/modules/Elezioni/aggiornadb.php
r423 r424 114 114 if(controllo($prefix.'_authors','admincomune',++$num)) 115 115 { 116 $sql="UPDATE `".$prefix."_authors` SET `admin op` = '1', `adminsuper` = '0',`admincomune` = '0' WHERE `".$prefix."_authors`.`aid` != 'admin' AND `".$prefix."_authors`.`adminsuper` != '1'";116 $sql="UPDATE `".$prefix."_authors` SET `adminsuper` = '0',`admincomune` = '0' WHERE `".$prefix."_authors`.`aid` != 'admin' AND `".$prefix."_authors`.`adminsuper` != '1'"; 117 117 $ret=aggiorna($sql,$dbi,'',$num); 118 118 $sql="UPDATE `".$prefix."_authors` SET `adminop` = '0', `adminsuper` = '0',`admincomune` = '1' WHERE `".$prefix."_authors`.`aid` = 'admin' and `".$prefix."_authors`.`adminsuper` != '1'"; -
trunk/admin/modules/Elezioni/aggiornamento.php
r412 r424 185 185 $myrev=$_SESSION['localrev']; 186 186 if (isset($_SESSION['forzadb'])) $myrev=378; 187 if($newrev ==$myrev) {187 if($newrev<=$myrev) { 188 188 $errmex=1; 189 189 Header("Location: admin.php?op=aggiorna&id_cons_gen=$id_cons_gen&errmex=$errmex"); exit; -
trunk/admin/modules/Elezioni/controllo_votanti.php
r344 r424 131 131 if($tot_u) $perc_u=number_format($votiu*100/$tot_u,2); 132 132 if($tot_d) $perc_d=number_format($votid*100/$tot_d,2); 133 $perc_c=number_format($somma*100/$tot_compl,2);133 if($tot_compl) $perc_c=number_format($somma*100/$tot_compl,2); 134 134 } 135 135 else -
trunk/admin/modules/Elezioni/ele.php
r403 r424 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 ;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; 69 69 70 70 include ("header.php"); … … 162 162 if ($perms>128) { 163 163 164 165 164 # <a href=\"admin.php?op=inscollegi&id_cons_gen=$id_cons_gen\">$bullet"._COLLEGI."</a><br> 166 165 167 echo "166 echo " 168 167 <tr align=\"left\" bgcolor=\"$bgcolor1\"> 169 168 <td valign=\"top\" align=\"center\" bgcolor=\"#000000\" rowspan=\"3\"><font face=\"Arial,Helvetica\" size=-1><font color=\"#ffffff\"><b>"._SUPER." 170 171 </b></font></font> 172 173 </td> 174 <td valign=\"top\" align=\"left\" width=\"150\"> 175 176 177 <a href=\"admin.php?op=configurazione&id_cons_gen=$id_cons_gen\">$bullet"._CONFIGURAZIONE."</a><br>"; 178 if($op=="configurazione" || $op=="widget" || $op=="plugin"){ 179 echo " - <a href=\"admin.php?op=widget&id_cons_gen=$id_cons_gen\"> "._WIDGET."</a>"; 180 echo "<br> - "._PLUGINS.""; 181 echo "<hr>"; 182 } 183 $newrev=$_SESSION['remoterev']; 184 $myrev=$_SESSION['localrev']; 185 if($newrev==$myrev or $newrev==0) echo "<a href=\"admin.php?op=aggiorna&id_cons_gen=$id_cons_gen\">$bullet"._AGGIORNA."</a><br>"; 186 else echo "<a href=\"admin.php?op=aggiorna&id_cons_gen=$id_cons_gen\">$bullet_red<b>"._AGGIORNA."</b></a><br>"; 187 echo "<a href=\"admin.php?op=confconsiglio&id_cons_gen=$id_cons_gen\">$bullet"._CONFCONS."</a> 188 </td></tr><tr align=\"left\" bgcolor=\"$bgcolor1\"><td> 189 <a href=\"admin.php?op=inscomuni&id_cons_gen=$id_cons_gen\">$bullet"._DEFCOMUNE."</a><br> 190 <a href=\"admin.php?op=oper_admin&id_cons_gen=$id_cons_gen\">$bullet"._AMMINISTRATORI."</a> 191 </td></tr><tr align=\"left\" bgcolor=\"$bgcolor1\"><td> 192 <a href=\"admin.php?op=consultazione&id_cons_gen=$id_cons_gen\">$bullet"._CONSULTAZIONE_ADM."</a><br>"; 193 echo "<a href=\"admin.php?op=rec_add_aff&id_cons_gen=$id_cons_gen\">$bullet"._AFFLUENZE."</a><br> 194 <a href=\"admin.php?op=associazioni&id_cons_gen=$id_cons_gen\">$bullet"._INSCOMUNE."</a> 195 </td></tr>"; 196 # <br><a href=\"http://www.eleonline.it/portal/segnala.php?tmp=test123\" target=\"_blank\">$bullet_red <b>"._SEGNALA."</b></a> 197 198 # <a href=\"admin.php?op=backup&id_cons_gen=$id_cons_gen\">$bullet"._BACKUP."</a><br> 199 # <a href=\"admin.php?op=restore&id_cons_gen=$id_cons_gen\">$bullet"._RESTORE."</a> 200 201 } 169 </b></font></font> 170 </td>"; 171 if(!$BACKUP){ 172 echo "<td valign=\"top\" align=\"left\" width=\"150\">"; 173 echo "<a href=\"admin.php?op=configurazione&id_cons_gen=$id_cons_gen\">$bullet"._CONFIGURAZIONE."</a><br>"; 174 if($op=="configurazione" || $op=="widget" || $op=="plugin"){ 175 echo " - <a href=\"admin.php?op=widget&id_cons_gen=$id_cons_gen\"> "._WIDGET."</a>"; 176 echo "<br> - "._PLUGINS.""; 177 echo "<hr>"; 178 } 179 $newrev=$_SESSION['remoterev']; 180 $myrev=$_SESSION['localrev']; 181 if($newrev==$myrev or $newrev==0) echo "<a href=\"admin.php?op=aggiorna&id_cons_gen=$id_cons_gen\">$bullet"._AGGIORNA."</a><br>"; 182 else echo "<a href=\"admin.php?op=aggiorna&id_cons_gen=$id_cons_gen\">$bullet_red<b>"._AGGIORNA."</b></a><br>"; 183 echo "<a href=\"admin.php?op=confconsiglio&id_cons_gen=$id_cons_gen\">$bullet"._CONFCONS."</a> 184 </td></tr><tr align=\"left\" bgcolor=\"$bgcolor1\"><td> 185 <a href=\"admin.php?op=inscomuni&id_cons_gen=$id_cons_gen\">$bullet"._DEFCOMUNE."</a><br> 186 <a href=\"admin.php?op=oper_admin&id_cons_gen=$id_cons_gen\">$bullet"._AMMINISTRATORI."</a> 187 </td></tr><tr align=\"left\" bgcolor=\"$bgcolor1\"><td> 188 <a href=\"admin.php?op=consultazione&id_cons_gen=$id_cons_gen\">$bullet"._CONSULTAZIONE_ADM."</a><br>"; 189 echo "<a href=\"admin.php?op=rec_add_aff&id_cons_gen=$id_cons_gen\">$bullet"._AFFLUENZE."</a><br> 190 <a href=\"admin.php?op=associazioni&id_cons_gen=$id_cons_gen\">$bullet"._INSCOMUNE."</a>"; 191 }else{ 192 echo "</tr><tr align=\"left\" bgcolor=\"$bgcolor1\"><td valign=\"top\" align=\"left\" width=\"150\" rowspan=\"2\">"; 193 echo "<a href=\"admin.php?op=aggcons&id_cons_gen=$id_cons_gen\">$bullet"._AGGDATI."</a>"; 194 echo "</td></tr><tr><td>"; 195 } 196 echo "</td></tr>"; 197 # <br><a href=\"http://www.eleonline.it/portal/segnala.php?tmp=test123\" target=\"_blank\">$bullet_red <b>"._SEGNALA."</b></a> 198 199 # <a href=\"admin.php?op=backup&id_cons_gen=$id_cons_gen\">$bullet"._BACKUP."</a><br> 200 201 } 202 202 // Amministrazione locale solo superuser e adminuser 203 if ($perms>16 and ! $espandi ) {203 if ($perms>16 and ! $espandi and !$BACKUP) { 204 204 echo " 205 205 <tr bgcolor=\"$bgcolor1\"> … … 267 267 <td valign=\"top\" width=\"150\">"; 268 268 if ($op!='consultazione' and $perms>0 and $nrcirco and ($nrlista or $nrgruppo) and ! $espandi) { 269 echo "<a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&do=spoglio\">$bullet "._GEST." "._SPOGLIO."</a><br>";269 if(!$BACKUP) echo "<a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&do=spoglio\">$bullet "._GEST." "._SPOGLIO."</a><br>"; 270 270 if ($nraff) { 271 271 echo "<a href=\"admin.php?op=controllo_votanti&id_cons_gen=$id_cons_gen\">$bullet "._STATO." "._AFFLUENZE."</a><br>"; -
trunk/admin/modules/Elezioni/ele_cons_comuni.php
r344 r424 149 149 function cons_comuni($ok, $id_cons2,$do, $duplica,$elettori) 150 150 { 151 global $prefix, $dbi,$id_comune,$id_cons_gen,$perms,$predefinita ;151 global $prefix, $dbi,$id_comune,$id_cons_gen,$perms,$predefinita,$chiusa; 152 152 if ($perms>32) { 153 153 $sql="select id_cons from ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen' and id_comune=$id_comune"; … … 236 236 $result->execute(); 237 237 }else{ 238 $sql="update ".$prefix."_ele_cons_comune set chiusa='$chiusa' WHERE id_cons 2='$id_cons2'";238 $sql="update ".$prefix."_ele_cons_comune set chiusa='$chiusa' WHERE id_cons='$id_cons2'"; 239 239 $result = $dbi->prepare("$sql"); 240 240 $result->execute(); -
trunk/admin/modules/Elezioni/ele_controlli.php
r422 r424 308 308 $res->execute(); 309 309 list($prefs,$disg,$solog,$fascia,$id_conf)=$res->fetch(PDO::FETCH_NUM); 310 $sql="SELECT supdisgiunto FROM ".$prefix."_ele_conf where id_conf='$id_conf'"; 310 $sql="SELECT supdisgiunto FROM ".$prefix."_ele_conf where id_conf='$id_conf'"; 311 311 $res = $dbi->prepare("$sql"); 312 312 $res->execute(); … … 361 361 $res = $dbi->prepare("$sql"); 362 362 $res->execute(); 363 list($votiv,$validil,$contestatil,$nullil,$solo g,$solol) = $res->fetch(PDO::FETCH_NUM);363 list($votiv,$validil,$contestatil,$nullil,$solovg,$solol) = $res->fetch(PDO::FETCH_NUM); 364 364 $vl=0; 365 365 $tvl=0; … … 391 391 $tnl+=$nl; 392 392 if(($votig+$svl)!=($votil+$svg+$nl) and (!$supdis and !$disg)) 393 { $err=1; $tipo='lista'; break; }393 { $err=1; $tipo='lista'; break; } 394 394 } 395 395 $totg+=($votig+$svl);$totl+=($votil+$svg+$nl); #$svl da ele_voti_gruppo e $solog da ele_sezioni 396 396 397 397 } 398 if(($totg )!=($totl+$nullil+$contestatil) or $totsg!=$solog)399 { $err=1; $tipo='lista';}398 if(($totg+$totsg)!=($totl+$nullil+$contestatil+$solovg) or ($totsg!=$solovg and $solog)) 399 {$err=1; $tipo='lista';} 400 400 401 401 }else{ 402 402 #inserire controllo per consultazioni con voto alle liste ma senza voto di gruppo 403 403 } 404 if (!$totsg) $totsg=$solo g;404 if (!$totsg) $totsg=$solovg; 405 405 if (($totlis!=$validil or $validil+$contestatil+$nullil+$totsg!=$votiv) and ($validil+$contestatil+$nullil+$solol>0 or $tvl>0)) {$err=1;$tipo='lista';} 406 if(($solo g && !$disg && ($tnl!=$nullil && $disg)) || $totsl!=$solol || ($totsg!=$solog)) {$err=1;$tipo='lista';}406 if(($solovg && !$disg && ($tnl!=$nullil && $disg)) || $totsl!=$solol || ($totsg!=$solovg)) {$err=1;$tipo='lista';} 407 407 } 408 408 } -
trunk/admin/modules/Elezioni/ele_gruppo.php
r395 r424 14 14 15 15 // Offset - visualizza il numero di elementi per pagina 16 $offset=5;16 if(isset($offsetgruppi) and $offsetgruppi>0) $offset=$offsetgruppi; else $offset=5; 17 17 global $dbi; 18 18 $aid=$_SESSION['aid']; -
trunk/admin/modules/Elezioni/ele_riepilogovoti.php
r364 r424 67 67 68 68 ################# calcolo voti di lista espressi 69 $sql="select sum(validi_lista),sum(nulli+bianchi+voti_nulli+contestati+solo_gruppo),sum(voti_nulli_lista),sum(contestati_lista) from ".$prefix."_ele_sezioni where id_cons='$id_cons'";69 $sql="select sum(validi_lista),sum(nulli+bianchi+voti_nulli+contestati+solo_gruppo),sum(voti_nulli_lista),sum(contestati_lista),sum(solo_gruppo) from ".$prefix."_ele_sezioni where id_cons='$id_cons'"; 70 70 $resperc = $dbi->prepare("$sql"); 71 71 $resperc->execute(); 72 list($scruvalidi,$scrunulli,$nullista,$contlista )=$resperc->fetch(PDO::FETCH_NUM);72 list($scruvalidi,$scrunulli,$nullista,$contlista,$sgs)=$resperc->fetch(PDO::FETCH_NUM); 73 73 74 74 if($totschede) … … 96 96 list($num_gruppo,$descrg)=$resg2->fetch(PDO::FETCH_NUM); 97 97 98 echo "<tr style=\"border-top: 2px solid;\"><td rowspan=\"$numliste\">$descrg</td><td rowspan=\"$numliste\" align=\"right\"><h2>".number_format($votigruppo,0,',','.')."</h2></td><td rowspan=\"$numliste\" align=\"right\"><h2>".number_format($sologruppo,0,',','.')."</h2></td>"; 98 echo "<tr style=\"border-top: 2px solid;\"><td rowspan=\"$numliste\">$descrg</td><td rowspan=\"$numliste\" align=\"right\"><h2>".number_format($votigruppo,0,',','.')."</h2></td><td rowspan=\"$numliste\" align=\"right\"><h2>"; 99 if($sologruppo) echo number_format($sologruppo,0,',','.'); 100 echo "</h2></td>"; 99 101 $currlst=0; 100 102 while (list($id_lista,$num_lista,$descrl)=$resl->fetch(PDO::FETCH_NUM)) … … 110 112 if(!$currlst) echo "<td></td><td></td></tr>"; 111 113 } 114 if(!$totsg)$totsg=$sgs; 112 115 echo "<tr style=\"border-top: 2px solid;\"><td rowspan=\"3\"><b>Totale</b></td><td rowspan=\"3\" align=\"right\"><h1>".number_format($totg,0,',','.')."</h1></td><td rowspan=\"3\" align=\"right\"><h1>".number_format($totsg,0,',','.')."</h1></td><td align=\"right\"><b>Validi di lista</b></td><td align=\"right\"><h1>".number_format($totl,0,',','.')."</h1></td></tr><tr><td align=\"right\"><b>Nulli di lista</b></td><td align=\"right\"><h1>".number_format($nullista,0,',','.')."</h1></td></tr><tr><td align=\"right\"><b>Contestati di lista</b></td><td align=\"right\"><h1>".number_format($contlista,0,',','.')."</h1></td></tr>"; 113 116 echo "</table></br>"; -
trunk/admin/modules/Elezioni/ele_spoglio.php
r422 r424 278 278 echo "<input type=\"hidden\" id=\"pag\" name=\"pag\" value=\"admin.php?id_cons_gen=$id_cons_gen&op=$op&id_sez=$id_sez&id_circ=$id_circ&id_sede=$id_sede&do=spoglio&ops=3&id_lista=\">"; 279 279 echo "<select id=\"id_lista\" name=\"id_lista\" onChange=\"vai_lista('id_lista');\">"; 280 if ($id_lista){ 280 if ($id_lista){ #TEST spostare la valorizzazione di $ele_lista 281 281 echo "<option value=\"0\">"._VOTI_LISTA; 282 282 $ele_lista=" and t1.id_lista='$id_lista' "; … … 498 498 499 499 500 if($id_lista) $sql="select t1.* from ".$prefix."_ele_candidati as t1 left join ".$prefix."_ele_lista as t2 on (t1.id_lista=t2.id_lista) WHERE t1.id_cons=$id_cons and t1.id_cons=t2.id_cons $ele_lista $circoORDER BY t2.num_lista,t1.num_cand";501 else $sql="select 0,'$id_cons',t1.id_lista,'','','','','',0 from ".$prefix."_ele_candidati as t1 left join ".$prefix."_ele_lista as t2 on (t1.id_lista=t2.id_lista) WHERE t1.id_cons=$id_cons and t1.id_cons=t2.id_cons $ ele_lista $circoORDER BY t2.num_lista";500 if($id_lista) $sql="select t1.* from ".$prefix."_ele_candidati as t1 left join ".$prefix."_ele_lista as t2 on (t1.id_lista=t2.id_lista) WHERE t1.id_cons=$id_cons and t1.id_cons=t2.id_cons $ele_lista ORDER BY t2.num_lista,t1.num_cand"; 501 else $sql="select 0,'$id_cons',t1.id_lista,'','','','','',0 from ".$prefix."_ele_candidati as t1 left join ".$prefix."_ele_lista as t2 on (t1.id_lista=t2.id_lista) WHERE t1.id_cons=$id_cons and t1.id_cons=t2.id_cons $circo $ele_lista ORDER BY t2.num_lista"; 502 502 $result = $dbi->prepare("$sql"); 503 503 $result->execute(); -
trunk/admin/modules/Elezioni/language/lang-it.php
r407 r424 219 219 define("_SPUNTAELIMINA","Metti la spunta per abilitare la cancellazione dei dati (solo voti e votanti):"); 220 220 define("_DATI","i dati dello spoglio"); 221 define("_AGGDATI","Aggiorna i dati"); 221 222 define("_SPUNTALABEL1","Abilita la cancellazione"); 222 223 define("_SPUNTALABEL2","Cancella anche candidati e struttura"); -
trunk/admin/modules/Elezioni/query.sql
r406 r424 1 1 <?php 2 2 3 3 if (!defined('ADMIN_FILE')) { … … 96 96 function elenco_cons() 97 97 { 98 global $perms,$dbi,$prefix,$currentlang,$aid,$id_comune ;98 global $perms,$dbi,$prefix,$currentlang,$aid,$id_comune,$giorniaut; 99 99 100 100 if ($perms<64) { 101 $sql="select t2.id_cons,t1.descrizione,t4.genere,t1.id_cons_gen,t2.chiusa from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2, ".$prefix."_ele_tipo as t4 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and t1.tipo_cons=t4.tipo_cons and date_add(t1.data_fine, interval 3day)>CURDATE() and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and permessi>0)";101 $sql="select t2.id_cons,t1.descrizione,t4.genere,t1.id_cons_gen,t2.chiusa from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2, ".$prefix."_ele_tipo as t4 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and t1.tipo_cons=t4.tipo_cons and date_add(t1.data_fine, interval $giorniaut day)>CURDATE() and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and permessi>0)"; 102 102 } 103 103 elseif ($perms<128) { -
trunk/admin/modules/Elezioni/restore.php
r383 r424 15 15 $perms=ChiSei(0); 16 16 if ($perms!=256) die("Non hai i permessi per effettuare questa operazione!"); 17 17 global $LINK,$fileback; 18 18 $param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST; 19 19 if (isset($param['datafile'])) $datafile=addslashes($param['datafile']); else $datafile=''; … … 22 22 ele(); 23 23 if (isset($_FILES['datafile']['tmp_name'])) $updfile=$_FILES['datafile']['tmp_name']; else $updfile=''; 24 if (!is_uploaded_file($updfile) )24 if (!is_uploaded_file($updfile) and $LINK=='') 25 25 # if (!is_uploaded_file($_FILES['datafile']['tmp_name'])) 26 26 # if (file_exists($datafile)) … … 33 33 echo "<td align=\"center\"><input type=\"submit\" name=\"add\" value=\""._OK."\"></td></tr></table></form>"; 34 34 //////////////////////////// 35 }else{$datafile=$_FILES['datafile']['tmp_name']; 35 }else{ 36 if($LINK=='') 37 $datafile=$_FILES['datafile']['tmp_name']; 38 else 39 $datafile=$fileback; 36 40 $arrFile = file($datafile); 37 41 $handle = fopen($datafile, "r"); … … 123 127 } else $errore=1; 124 128 fclose($handle); 125 die("finito");129 echo "<center><h2>Aggiornamento del ".date('d/m/Y H:i')." terminato</h2></center>"; 126 130 } 127 if (isset($errore)) 128 if ($errore) die( _MEX_RESTORE_FAILED); 129 else die( _MEX_RESTORE_OK ); 131 if (isset($errore) and $errore) echo _MEX_RESTORE_FAILED; 132 130 133 echo"</td></tr></table>"; 131 134 include("footer.php"); -
trunk/admin/versione.php
r423 r424 1 1 <?php 2 2 3 $versione = "3.0 rev 42 3";3 $versione = "3.0 rev 424"; 4 4 $version_number = $versione; 5 $datarel = " 05giugno 2024";5 $datarel = "13 giugno 2024"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7 -
trunk/client/modules.php
r408 r424 122 122 } 123 123 124 125 126 127 124 require_once('variabili.php'); 125 $param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST; 126 if (isset($param['id_comune'])) $id_comune=intval($param['id_comune']); #else $id_comune=$siteistat; 127 if (isset($param['id_cons_gen'])) $id_cons_gen=intval($param['id_cons_gen']); 128 128 129 129 # carica i parametri di default sulla tabella -
trunk/client/modules/Elezioni/candidato.php
r400 r424 12 12 /*****************************************************/ 13 13 function candidato() { 14 global $tipo_cons, $prefix, $dbi, $offset, $min, $id_cons_gen, $id_cons,$file,$genere,$prev,$next,$lettera,$ltr,$ordine,$id_comune,$id_circ,$id_lista,$votog,$circo,$num ;14 global $tipo_cons, $prefix, $dbi, $offset, $min, $id_cons_gen, $id_cons,$file,$genere,$prev,$next,$lettera,$ltr,$ordine,$id_comune,$id_circ,$id_lista,$votog,$circo,$num,$datigenvis; 15 15 16 16 17 17 18 $offset= 15;18 $offset=$datigenvis; 19 19 if ($circo==1) $offset=1000; 20 20 if (!isset($min)) $min=0; -
trunk/client/modules/Elezioni/consiglieri.php
r420 r424 132 132 elseif ($numgruppo>0){ 133 133 $sqllis = "SELECT t1.id_lista,t1.num_lista,t1.descrizione,t1.id_gruppo from ".$prefix."_ele_lista as t1, ".$prefix."_ele_gruppo as t2 where t1.id_cons='$id_cons' and t1.id_gruppo=t2.id_gruppo and t2.num_gruppo not in (".$_SESSION['ballo1'].",".$_SESSION['ballo2'].")"; 134 $res_lis = $dbi->prepare("$sqllis"); 135 $res_lis->execute(); 136 134 $res_lis = $dbi->prepare("$sqllis"); 135 $res_lis->execute(); 137 136 $yy=$res_lis->rowCount(); 138 $sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_cons='$id_cons'"; 139 $res_voti = $dbi->prepare("$sql"); 140 $res_voti->execute(); 141 142 list($validilista) = $res_voti->fetch(PDO::FETCH_NUM); 137 $sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_cons='$id_cons'"; 138 $res_voti = $dbi->prepare("$sql"); 139 $res_voti->execute(); 140 list($validilista) = $res_voti->fetch(PDO::FETCH_NUM); 143 141 if ($yy){ 144 while(list($id_lista,$num_lista,$descr,$pgrup) = $res_lis->fetch(PDO::FETCH_NUM)) { 145 $sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_lista='$id_lista'"; 146 $res_voti = $dbi->prepare("$sql"); 147 $res_voti->execute(); 148 149 list($votilista) = $res_voti->fetch(PDO::FETCH_NUM); 150 if(!isset($voti[$pgrup])) $voti[$pgrup]=0; 151 $voti[$pgrup]+=$votilista; 152 } 153 foreach ($voti as $key=>$val){if($val<($validilista*3/100)) unset($voti[$key]);} ################################################## 142 while(list($id_lista,$num_lista,$descr,$pgrup) = $res_lis->fetch(PDO::FETCH_NUM)) { 143 $sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_lista='$id_lista'"; 144 $res_voti = $dbi->prepare("$sql"); 145 $res_voti->execute(); 146 list($votilista) = $res_voti->fetch(PDO::FETCH_NUM); 147 if(!isset($voti[$pgrup])) $voti[$pgrup]=0; 148 $voti[$pgrup]+=$votilista; 149 } 150 $togli=array(); 151 foreach ($voti as $key=>$val){ 152 if($val<($validilista*3/100)) 153 $togli[]=$key; 154 } 155 foreach($togli as $key=>$val) 156 unset($voti[$val]); ################################################## 154 157 $res_lis = $dbi->prepare("$sqllis"); 155 158 $res_lis->execute(); … … 161 164 echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"/></td>"; 162 165 163 echo "<td><b>".$_SESSION['grp1']."</b></td>";166 echo "<td><b>".$_SESSION['grp1']."</b></td>"; 164 167 echo "<td><b>".$_SESSION['grp2']."</b></td>"; 165 168 echo "<td><b>"._NONCOLLE."</b></td></tr>"; -
trunk/client/modules/Elezioni/gruppo.php
r392 r424 91 91 global $prefix, $dbi, $descr_cons, $id_cons, $id_cons_gen,$tipo_cons,$votog,$votol,$votoc,$circo, $genere,$id_gruppo,$id_lista,$bgcolor1,$bgcolor2,$id_comune,$descr_comune,$id_circ; 92 92 global $id_comune,$id_cons_gen,$op,$minsez,$id_lista,$id_circ,$csv,$min,$orienta,$formato,$dettnulli,$disgiunto, 93 $orvert,$grupposg,$offset,$offsetsez,$perc,$info,$files,$nomefile ;93 $orvert,$grupposg,$offset,$offsetsez,$perc,$info,$files,$nomefile,$numcandvis,$numsezvis; 94 94 $nomefile=""; 95 95 #Denominazione pagine … … 158 158 159 159 $voticompl=0; 160 if (!($offset)) $offset= 25;160 if (!($offset)) $offset=$numcandvis; 161 161 if (!($min)) $min=1; 162 if (!($offsetsez)) $offsetsez= 22;162 if (!($offsetsez)) $offsetsez=$numsezvis; 163 163 if (!($minsez)) $minsez=1; 164 164 if ($min>$offset) { -
trunk/client/modules/Elezioni/index.php
r418 r424 200 200 *************************/ 201 201 function menu() { 202 global $hondt,$lang,$multicomune, $tema, $op, $prefix, $dbi, $offset, $min,$descr_cons,$info,$dati, $votog,$votol,$votoc,$circo, $id_cons,$tipo_cons,$genere,$ descr_cons,$id_cons_gen,$id_comune,$id_circ,$minsez,$offsetsez, $limite,$hondt,$tema_on,$js,$visgralista;202 global $hondt,$lang,$multicomune, $tema, $op, $prefix, $dbi, $offset, $min,$descr_cons,$info,$dati, $votog,$votol,$votoc,$circo, $id_cons,$tipo_cons,$genere,$id_cons_gen,$id_comune,$id_circ,$minsez,$offsetsez, $limite,$tema_on,$js,$visgralista; 203 203 204 204 $tema=htmlentities($tema); //xss … … 453 453 function sezione() { 454 454 global $admin, $prefix, $dbi, $offset, $min,$votog,$circo, $id_cons_gen,$id_circ,$descr_circ,$id_cons,$file,$prev,$next,$id_comune,$googlemaps; 455 global $descr_com,$cap ;455 global $descr_com,$cap,$datigenvis; 456 456 if(!isset($_GET['id_circ'])) unset($id_circ); 457 457 dati(); … … 475 475 } 476 476 477 $offset= 15;477 $offset=$datigenvis; 478 478 if (!isset($min)) $min=0; 479 479 if (!isset($id_circ)) $id_circ=0; … … 610 610 611 611 function gruppo() { 612 global $fascia, $limite, $admin, $prefix, $dbi, $offset, $min, $id_cons_gen,$genere, $id_cons,$tipo_cons,$file,$prev,$next,$id_circ,$id_comune,$descr_circ,$id_sez,$votog,$votol,$circo,$limite ;612 global $fascia, $limite, $admin, $prefix, $dbi, $offset, $min, $id_cons_gen,$genere, $id_cons,$tipo_cons,$file,$prev,$next,$id_circ,$id_comune,$descr_circ,$id_sez,$votog,$votol,$circo,$limite,$datigenvis; 613 613 //dati(); 614 614 // definizione variabile per button 'ok' nei form … … 704 704 705 705 706 $offset= 15;706 $offset=$datigenvis; 707 707 if (!isset($min)) $min=0; 708 708 $go="gruppo"; -
trunk/client/temi/altro/style.css
r384 r424 506 506 } 507 507 508 .bggray a{ 509 color:#ffffff; 510 text-decoration: underline; 511 } 512 .bggray a:hover{ 513 text-decoration: underline; 514 /*color:#FFFFFF;*/ 515 } 516 .bggray a:visited{ 517 color:#ffffff; 518 text-decoration: underline; 519 520 } 521 508 522 .bggray2 { 509 523 background: #A8C4E1; -
trunk/client/temi/bsitalia/layout/styles/style.css
r407 r424 658 658 text-align: center; 659 659 } 660 660 .bggray a:link { 661 text-decoration: underline; 662 color: #660033; 663 background-color: #d2d2d2; 664 } 665 .bggray a:visited { 666 text-decoration: underline; 667 color: #660000; 668 background-color: #d2d2d2; 669 } 670 .bggray a:hover { 671 color: #CC2222; 672 text-decoration: underline; 673 background-color: #d2d2d2; 674 } 661 675 .bggray2 { 662 676 BACKGROUND: #EFEFEF; … … 672 686 text-align: left; 673 687 } 674 688 .bggray3 a:link { 689 text-decoration: underline; 690 color: #660033; 691 background-color: #EFEFEF; 692 } 693 .bggray3 a:visited { 694 text-decoration: underline; 695 color: #660000; 696 background-color: #EFEFEF; 697 } 698 .bggray3 a:hover { 699 color: #CC2222; 700 text-decoration: underline; 701 background-color: #EFEFEF; 702 } 675 703 .normale { 676 704 BACKGROUND: none; -
trunk/client/temi/bsitalia/style.css
r416 r424 1 1 a:link { 2 text-decoration: none;2 text-decoration: underline; 3 3 color: #660033; 4 background-color: d2d2d2; 4 5 } 5 6 a:visited { 6 text-decoration: none;7 text-decoration: underline; 7 8 color: #660000; 9 background-color: d2d2d2; 8 10 } 9 11 a:hover { 10 12 color: #CC2222; 13 text-decoration: underline; 11 14 } 12 15 body , html { -
trunk/client/versione.php
r423 r424 1 1 <?php 2 2 3 $versione = "3.0 rev 42 3";3 $versione = "3.0 rev 424"; 4 4 $version_number = $versione; 5 $datarel = " 05giugno 2024";5 $datarel = "13 giugno 2024"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7
Note:
See TracChangeset
for help on using the changeset viewer.