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