[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 |
|
---|
| 63 | $res = mysql_query("SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ", $dbi);
|
---|
| 64 | list($descr_com) = mysql_fetch_row($res);
|
---|
| 65 |
|
---|
| 66 |
|
---|
| 67 | // logo
|
---|
| 68 | echo '
|
---|
| 69 | <div id="header">
|
---|
| 70 | <div>
|
---|
| 71 | <h1>';
|
---|
[139] | 72 | echo "<a href=\"modules.php?name=Elezioni\"> $descr_com</a>";
|
---|
[2] | 73 | echo '</a></h1>
|
---|
| 74 | <b>consultazioni elettorali on line </b> <a href="http://www.eleonline.it"> <i>by l.apolito e r.gigli</i></a>
|
---|
| 75 | <br/>
|
---|
| 76 | <div id="bottoni"> ';
|
---|
| 77 | language();
|
---|
| 78 | flash();
|
---|
[60] | 79 | # noblocco();
|
---|
[2] | 80 | tour();
|
---|
| 81 | echo ' </div>
|
---|
| 82 |
|
---|
| 83 | </div>
|
---|
| 84 | </div>
|
---|
| 85 |
|
---|
| 86 | ';
|
---|
| 87 |
|
---|
| 88 | // menu
|
---|
| 89 | echo '<div id="menu"><br/>';
|
---|
| 90 | if ($file=="index") menu();
|
---|
| 91 |
|
---|
| 92 | echo "</div>";
|
---|
| 93 |
|
---|
| 94 | echo '
|
---|
| 95 | <div id="page">
|
---|
| 96 | <div class="table-main">';
|
---|
| 97 |
|
---|
| 98 | if($blocco==1) echo '<div id="content">';
|
---|
| 99 |
|
---|
| 100 | }
|
---|
| 101 | ##################################
|
---|
| 102 | function piede(){
|
---|
| 103 | ##################################
|
---|
| 104 | global $nometema,$blocco,$lang;
|
---|
| 105 | //echo "<div></div>";
|
---|
| 106 |
|
---|
| 107 |
|
---|
| 108 | // carica i blocchi
|
---|
[60] | 109 | if($blocco==1) {blocco();
|
---|
[2] | 110 | echo "</div></div>";
|
---|
| 111 | // carica il file foooter
|
---|
| 112 | $tmpl_file = "temi/language/$lang/footer.html";
|
---|
| 113 | $thefile = implode("", file($tmpl_file));
|
---|
| 114 | $thefile = addslashes($thefile);
|
---|
| 115 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 116 | eval($thefile);
|
---|
| 117 | print $r_file;
|
---|
| 118 | die();
|
---|
| 119 | }
|
---|
[60] | 120 | }
|
---|
[2] | 121 | ####################################
|
---|
| 122 | function blocco(){
|
---|
| 123 | ####################################
|
---|
| 124 | 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;
|
---|
| 125 |
|
---|
| 126 | if ($blocco==1) echo "</div><div class=\"td-149\">";
|
---|
| 127 |
|
---|
| 128 | 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>";
|
---|
| 129 |
|
---|
| 130 |
|
---|
| 131 |
|
---|
| 132 | // Blocco generale
|
---|
| 133 |
|
---|
[61] | 134 | if(file_exists("temi/language/$lang/bloccogen.html")){
|
---|
[2] | 135 | $tmpl_file = "temi/language/$lang/bloccogen.html";
|
---|
| 136 | $thefile = implode("", file($tmpl_file));
|
---|
| 137 | $thefile = addslashes($thefile);
|
---|
| 138 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 139 | eval($thefile);
|
---|
| 140 | print $r_file;
|
---|
[60] | 141 | }
|
---|
[2] | 142 | caricablocchi();
|
---|
| 143 |
|
---|
| 144 | // Blocco consultazioni
|
---|
| 145 | if ($genere>2){
|
---|
| 146 | $tmpl_file = "temi/language/$lang/bloccocand.html";
|
---|
| 147 | $thefile = implode("", file($tmpl_file));
|
---|
| 148 | $thefile = addslashes($thefile);
|
---|
| 149 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 150 | eval($thefile);
|
---|
| 151 | print $r_file;
|
---|
| 152 | }else{
|
---|
| 153 | if ($genere==0){
|
---|
| 154 | //Blocco Referendum
|
---|
| 155 | $tmpl_file = "temi/language/$lang/bloccoref.html";
|
---|
| 156 | $thefile = implode("", file($tmpl_file));
|
---|
| 157 | $thefile = addslashes($thefile);
|
---|
| 158 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 159 | eval($thefile);
|
---|
| 160 | print $r_file;
|
---|
| 161 | }
|
---|
| 162 | }
|
---|
| 163 | // Blocco link
|
---|
| 164 |
|
---|
| 165 | $result = mysql_query("select mid, title, preamble, content,editimage from ".$prefix."_ele_link where id_cons='$id_cons' order by mid ", $dbi);
|
---|
| 166 | if (mysql_num_rows($result) == 0) {
|
---|
| 167 | //echo "</div></td></tr></table>";
|
---|
| 168 |
|
---|
| 169 |
|
---|
| 170 |
|
---|
| 171 | } else {
|
---|
| 172 | echo "<h5>"._LINK."</h5><p>";
|
---|
| 173 | while (list($mid, $title, $preamble,$content, $editimage) = mysql_fetch_row($result)) {
|
---|
| 174 | if ($title != "" && $content != "") {
|
---|
| 175 | $content = stripslashes($content);
|
---|
| 176 | $content = substr($content,0,45);
|
---|
| 177 | echo "<b><a href=\"$preamble\">
|
---|
| 178 | $title</a></b><br />
|
---|
| 179 |
|
---|
| 180 | $content<br/>";
|
---|
| 181 | }
|
---|
| 182 | }
|
---|
| 183 |
|
---|
| 184 | }
|
---|
| 185 |
|
---|
| 186 |
|
---|
| 187 | ######## footer ######################################
|
---|
| 188 |
|
---|
| 189 | echo "<h5>Note</h5>
|
---|
| 190 | <h6><a href=\"modules.php?name=Elezioni&file=index&op=contatti\"> Contatti</a> </h6>";
|
---|
| 191 |
|
---|
| 192 | include_once("versione.php");
|
---|
| 193 |
|
---|
| 194 | echo "<br />[<a href=\"http://www.eleonline.it\"><b>Eleonline $versione</b></a> - "._GESRIS." ]
|
---|
| 195 | ";
|
---|
| 196 | echo '<br/><br/>
|
---|
| 197 |
|
---|
| 198 | <!-- w3c -->
|
---|
| 199 | <div class="w3cbutton3">
|
---|
| 200 | <a href="http://www.w3.org/WAI/WCAG1AA-Conformance" title="pagina di spiegazione degli standard">
|
---|
| 201 | <span class="w3c">W3C</span>
|
---|
| 202 | <span class="spec">WAI-<span class="specRed">AA</span></span>
|
---|
| 203 | </a>
|
---|
| 204 | </div>
|
---|
| 205 | <div class="w3cbutton3">
|
---|
| 206 | <a href="http://jigsaw.w3.org/css-validator/" title="Validatore css">
|
---|
| 207 | <span class="w3c">W3C</span>
|
---|
| 208 | <span class="spec">CSS</span>
|
---|
| 209 | </a>
|
---|
| 210 | </div>
|
---|
| 211 | <div class="w3cbutton3">
|
---|
| 212 | <a href="http://validator.w3.org/" title="Validatore XHTML ">
|
---|
| 213 | <span class="w3c">W3C</span>
|
---|
| 214 | <span class="spec">XHTML 1.0</span>
|
---|
| 215 | </a>
|
---|
| 216 | </div>';
|
---|
| 217 |
|
---|
| 218 | echo "
|
---|
| 219 | </div>";
|
---|
| 220 |
|
---|
| 221 |
|
---|
| 222 | }
|
---|
| 223 |
|
---|
| 224 | include("temi/tour/button.php");
|
---|
| 225 | //if (isset($_SESSION['ruota'])){ echo "<div style:\"margin auto; text-align:center\">Eleonline</div>";}
|
---|
| 226 | ?>
|
---|