[2] | 1 | <?php
|
---|
| 2 | /************************************************************************/
|
---|
| 3 | /* Eleonline - Raccolta e diffusione dei dati elettorali */
|
---|
| 4 | /* by Luciano Apolito & Roberto Gigli */
|
---|
| 5 | /* http://www.eleonline.it */
|
---|
| 6 | /* info@eleonline.it luciano@aniene.net rgigli@libero.it */
|
---|
| 7 | /************************************************************************/
|
---|
| 8 | /* tema tour per far girare le pagine in automatico */
|
---|
| 9 | /* le pagine vanno messe nel file config,php */
|
---|
[212] | 10 | global $tour;
|
---|
| 11 | if (file_exists("temi/tour/config.php")) {
|
---|
| 12 | include_once 'temi/tour/config.php';
|
---|
| 13 | }
|
---|
[2] | 14 |
|
---|
[212] | 15 | if(!isset($lista_ruota)){
|
---|
[58] | 16 | $lista_ruota=array( 'affluenze_graf',
|
---|
| 17 | 'graf_votanti',
|
---|
[206] | 18 | 'graf_gruppo',
|
---|
| 19 | 'graf_lista'
|
---|
[58] | 20 | );
|
---|
[212] | 21 | }
|
---|
[60] | 22 | $blocco=0;
|
---|
[58] | 23 |
|
---|
[2] | 24 | $param=strip_tags(strtolower($_SERVER['REQUEST_METHOD'])) == 'get' ? $_GET : $_POST;
|
---|
| 25 |
|
---|
| 26 | ####################################
|
---|
| 27 | // rotazione pagina
|
---|
| 28 | // bottone file button.php
|
---|
| 29 | ####################################
|
---|
| 30 |
|
---|
| 31 | if (isset($param['tour'])){
|
---|
| 32 | $tour=$param['tour'];
|
---|
| 33 | $_SESSION['newtour']="$tour";
|
---|
| 34 | }
|
---|
| 35 | if (isset($_SESSION['newtour'])) $tour=$_SESSION['newtour'];
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | if($tour=='1'){
|
---|
| 39 |
|
---|
| 40 | $max_ruota=count($lista_ruota)-1;
|
---|
| 41 | if (isset($_SESSION['ruota'])) { $ruota=$_SESSION['ruota'];}
|
---|
| 42 | else {$ruota=0;$_SESSION['ruota']=0;}
|
---|
| 43 | if ($ruota>=$max_ruota) {$ruota=0;}
|
---|
| 44 | else {$ruota++;}
|
---|
| 45 | $_SESSION['ruota']=$ruota;
|
---|
| 46 | $op=$lista_ruota[$ruota];
|
---|
| 47 | }else{
|
---|
| 48 | if (isset($_SESSION['ruota'])) unset($_SESSION['ruota']);
|
---|
| 49 | }
|
---|
| 50 | //fine rotazione pagine
|
---|
| 51 | $nometema=$tema;
|
---|
| 52 | if (isset($_SESSION['ruota'])){ include("temi/$tema/button.php");tour();
|
---|
| 53 | echo "<span class=\"piccolo\"> eleonline by l.apolito & r.gigli - www.eleonline.it</span>";} #bottone stop
|
---|
| 54 |
|
---|
| 55 |
|
---|
| 56 | ####################################
|
---|
| 57 | function testata(){
|
---|
| 58 | ####################################
|
---|
| 59 |
|
---|
| 60 | global $nometema,$file,$bgcolor,$sitename,$dbi,$prefix,$blocco,$lang,$siteistat;
|
---|
| 61 | if (isset($param['id_comune'])) $id_comune=intval($param['id_comune']); else $id_comune=$siteistat;
|
---|
| 62 |
|
---|
[282] | 63 | $sql="SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ";
|
---|
| 64 | $res = $dbi->prepare("$sql");
|
---|
| 65 | $res->execute();
|
---|
| 66 | list($descr_com) = $res->fetch(PDO::FETCH_NUM);
|
---|
[2] | 67 |
|
---|
| 68 |
|
---|
| 69 | // logo
|
---|
| 70 | echo '
|
---|
| 71 | <div id="header">
|
---|
| 72 | <div>
|
---|
| 73 | <h1>';
|
---|
[139] | 74 | echo "<a href=\"modules.php?name=Elezioni\"> $descr_com</a>";
|
---|
[352] | 75 | echo '</h1>
|
---|
[2] | 76 | <b>consultazioni elettorali on line </b> <a href="http://www.eleonline.it"> <i>by l.apolito e r.gigli</i></a>
|
---|
| 77 | <br/>
|
---|
| 78 | <div id="bottoni"> ';
|
---|
| 79 | language();
|
---|
| 80 | flash();
|
---|
[60] | 81 | # noblocco();
|
---|
[2] | 82 | tour();
|
---|
| 83 | echo ' </div>
|
---|
| 84 |
|
---|
| 85 | </div>
|
---|
| 86 | </div>
|
---|
| 87 |
|
---|
| 88 | ';
|
---|
| 89 |
|
---|
| 90 | // menu
|
---|
| 91 | echo '<div id="menu"><br/>';
|
---|
| 92 | if ($file=="index") menu();
|
---|
| 93 |
|
---|
| 94 | echo "</div>";
|
---|
| 95 |
|
---|
| 96 | echo '
|
---|
| 97 | <div id="page">
|
---|
| 98 | <div class="table-main">';
|
---|
| 99 |
|
---|
| 100 | if($blocco==1) echo '<div id="content">';
|
---|
| 101 |
|
---|
| 102 | }
|
---|
| 103 | ##################################
|
---|
| 104 | function piede(){
|
---|
| 105 | ##################################
|
---|
| 106 | global $nometema,$blocco,$lang;
|
---|
| 107 | //echo "<div></div>";
|
---|
| 108 |
|
---|
| 109 |
|
---|
| 110 | // carica i blocchi
|
---|
[60] | 111 | if($blocco==1) {blocco();
|
---|
[2] | 112 | echo "</div></div>";
|
---|
| 113 | // carica il file foooter
|
---|
| 114 | $tmpl_file = "temi/language/$lang/footer.html";
|
---|
| 115 | $thefile = implode("", file($tmpl_file));
|
---|
| 116 | $thefile = addslashes($thefile);
|
---|
| 117 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 118 | eval($thefile);
|
---|
| 119 | print $r_file;
|
---|
| 120 | die();
|
---|
| 121 | }
|
---|
[60] | 122 | }
|
---|
[2] | 123 | ####################################
|
---|
| 124 | function blocco(){
|
---|
| 125 | ####################################
|
---|
| 126 | global $name,$blocco,$bgcolor, $nometema,$id_comune,$tipo_cons,$id_cons_gen,$id_cons,$prefix,$dbi, $votog,$votol,$votoc,$circo,$genere,$lang,$op,$id_circ;
|
---|
| 127 |
|
---|
| 128 | if ($blocco==1) echo "</div><div class=\"td-149\">";
|
---|
| 129 |
|
---|
| 130 | echo "<a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&block=0\"><img class=\"noblocco\" src=\"modules/Elezioni/images/close.gif\" alt=\"NoBlocco\" title=\"NoBlocco\" /></a>";
|
---|
| 131 |
|
---|
| 132 |
|
---|
| 133 |
|
---|
| 134 | // Blocco generale
|
---|
| 135 |
|
---|
[61] | 136 | if(file_exists("temi/language/$lang/bloccogen.html")){
|
---|
[2] | 137 | $tmpl_file = "temi/language/$lang/bloccogen.html";
|
---|
| 138 | $thefile = implode("", file($tmpl_file));
|
---|
| 139 | $thefile = addslashes($thefile);
|
---|
| 140 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 141 | eval($thefile);
|
---|
| 142 | print $r_file;
|
---|
[60] | 143 | }
|
---|
[2] | 144 | caricablocchi();
|
---|
| 145 |
|
---|
| 146 | // Blocco consultazioni
|
---|
| 147 | if ($genere>2){
|
---|
| 148 | $tmpl_file = "temi/language/$lang/bloccocand.html";
|
---|
| 149 | $thefile = implode("", file($tmpl_file));
|
---|
| 150 | $thefile = addslashes($thefile);
|
---|
| 151 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 152 | eval($thefile);
|
---|
| 153 | print $r_file;
|
---|
| 154 | }else{
|
---|
| 155 | if ($genere==0){
|
---|
| 156 | //Blocco Referendum
|
---|
| 157 | $tmpl_file = "temi/language/$lang/bloccoref.html";
|
---|
| 158 | $thefile = implode("", file($tmpl_file));
|
---|
| 159 | $thefile = addslashes($thefile);
|
---|
| 160 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 161 | eval($thefile);
|
---|
| 162 | print $r_file;
|
---|
| 163 | }
|
---|
| 164 | }
|
---|
| 165 | // Blocco link
|
---|
| 166 |
|
---|
[282] | 167 | $sql="select mid, title, preamble, content,editimage from ".$prefix."_ele_link where id_cons='$id_cons' order by mid ";
|
---|
| 168 | $result = $dbi->prepare("$sql");
|
---|
| 169 | $result->execute();
|
---|
| 170 | if ($result->rowCount() == 0) {
|
---|
[2] | 171 | //echo "</div></td></tr></table>";
|
---|
| 172 |
|
---|
| 173 |
|
---|
| 174 |
|
---|
| 175 | } else {
|
---|
| 176 | echo "<h5>"._LINK."</h5><p>";
|
---|
[282] | 177 | while (list($mid, $title, $preamble,$content, $editimage) = $result->fetch(PDO::FETCH_NUM)) {
|
---|
[2] | 178 | if ($title != "" && $content != "") {
|
---|
| 179 | $content = stripslashes($content);
|
---|
| 180 | $content = substr($content,0,45);
|
---|
| 181 | echo "<b><a href=\"$preamble\">
|
---|
| 182 | $title</a></b><br />
|
---|
| 183 |
|
---|
| 184 | $content<br/>";
|
---|
| 185 | }
|
---|
| 186 | }
|
---|
| 187 |
|
---|
| 188 | }
|
---|
| 189 |
|
---|
| 190 |
|
---|
| 191 | ######## footer ######################################
|
---|
| 192 |
|
---|
| 193 | echo "<h5>Note</h5>
|
---|
| 194 | <h6><a href=\"modules.php?name=Elezioni&file=index&op=contatti\"> Contatti</a> </h6>";
|
---|
| 195 |
|
---|
| 196 | include_once("versione.php");
|
---|
| 197 |
|
---|
| 198 | echo "<br />[<a href=\"http://www.eleonline.it\"><b>Eleonline $versione</b></a> - "._GESRIS." ]
|
---|
| 199 | ";
|
---|
| 200 | echo '<br/><br/>
|
---|
| 201 |
|
---|
| 202 | <!-- w3c -->
|
---|
| 203 | <div class="w3cbutton3">
|
---|
| 204 | <a href="http://www.w3.org/WAI/WCAG1AA-Conformance" title="pagina di spiegazione degli standard">
|
---|
| 205 | <span class="w3c">W3C</span>
|
---|
| 206 | <span class="spec">WAI-<span class="specRed">AA</span></span>
|
---|
| 207 | </a>
|
---|
| 208 | </div>
|
---|
| 209 | <div class="w3cbutton3">
|
---|
| 210 | <a href="http://jigsaw.w3.org/css-validator/" title="Validatore css">
|
---|
| 211 | <span class="w3c">W3C</span>
|
---|
| 212 | <span class="spec">CSS</span>
|
---|
| 213 | </a>
|
---|
| 214 | </div>
|
---|
| 215 | <div class="w3cbutton3">
|
---|
| 216 | <a href="http://validator.w3.org/" title="Validatore XHTML ">
|
---|
| 217 | <span class="w3c">W3C</span>
|
---|
| 218 | <span class="spec">XHTML 1.0</span>
|
---|
| 219 | </a>
|
---|
| 220 | </div>';
|
---|
| 221 |
|
---|
| 222 | echo "
|
---|
| 223 | </div>";
|
---|
| 224 |
|
---|
| 225 |
|
---|
| 226 | }
|
---|
| 227 |
|
---|
| 228 | include("temi/tour/button.php");
|
---|
| 229 | //if (isset($_SESSION['ruota'])){ echo "<div style:\"margin auto; text-align:center\">Eleonline</div>";}
|
---|
| 230 | ?>
|
---|