[2] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | Gestione del tema
|
---|
| 4 | ==================
|
---|
| 5 | Files:
|
---|
| 6 | header.html = testata
|
---|
| 7 | footer.html = piede
|
---|
| 8 | bloccogen.html = blocco laterale generale
|
---|
| 9 | bloccocons.html = blocco laterale consultazione
|
---|
| 10 | bloccoref.html = blocco laterale referendum
|
---|
| 11 |
|
---|
| 12 | */
|
---|
| 13 |
|
---|
| 14 | // tema
|
---|
| 15 | //$bgcolor="#b0b0b0";
|
---|
| 16 | $nometema=$tema;
|
---|
| 17 |
|
---|
| 18 | function testata(){
|
---|
| 19 | global $nometema,$file,$bgcolor,$sitename,$dbi,$prefix,$blocco,$lang;
|
---|
| 20 | echo "<div id=\"container\" >";
|
---|
| 21 | if ($file=="index") menu();
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 |
|
---|
| 28 | echo "<table class=\"table-main\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
|
---|
| 29 | //echo "<div class=\"sx"\>";
|
---|
[80] | 30 | ##if ($blocco=='1') echo "<td><div class=\"sx\">";
|
---|
[2] | 31 | //"<td class=\"td-640\">";
|
---|
[80] | 32 | ##else echo "<td>";
|
---|
| 33 | echo "<td>";
|
---|
[2] | 34 |
|
---|
| 35 |
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | function piede(){
|
---|
| 39 | global $nometema,$blocco,$lang;
|
---|
| 40 | $tmpl_file = "temi/language/$lang/footer.html";
|
---|
| 41 | $thefile = implode("", file($tmpl_file));
|
---|
| 42 | $thefile = addslashes($thefile);
|
---|
| 43 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 44 | eval($thefile);
|
---|
| 45 | print $r_file;
|
---|
| 46 | if($blocco==1){
|
---|
| 47 |
|
---|
| 48 | blocco();
|
---|
| 49 |
|
---|
| 50 | echo "</td></tr></table>";
|
---|
| 51 | echo "</div>"; #container
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 |
|
---|
| 56 | function blocco(){
|
---|
| 57 |
|
---|
| 58 | 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;
|
---|
| 59 |
|
---|
| 60 | //echo "</div></td><td valign=\"top\" class=\"td-149\"><div id=\"dx\">";
|
---|
| 61 | echo "</div></td><td valign=\"top\" class=\"td-149\"><div class=\"sidebar\">";
|
---|
| 62 | 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>";
|
---|
| 63 |
|
---|
| 64 |
|
---|
| 65 |
|
---|
| 66 | // Blocco generale
|
---|
| 67 | //if ($id_cons_gen){
|
---|
| 68 |
|
---|
| 69 | $tmpl_file = "temi/language/$lang/bloccogen.html";
|
---|
| 70 | $thefile = implode("", file($tmpl_file));
|
---|
| 71 | $thefile = addslashes($thefile);
|
---|
| 72 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 73 | eval($thefile);
|
---|
| 74 | print $r_file;
|
---|
| 75 |
|
---|
| 76 | // Blocco consultazioni
|
---|
| 77 | if ($genere>2){
|
---|
| 78 | $tmpl_file = "temi/language/$lang/bloccocand.html";
|
---|
| 79 | $thefile = implode("", file($tmpl_file));
|
---|
| 80 | $thefile = addslashes($thefile);
|
---|
| 81 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 82 | eval($thefile);
|
---|
| 83 | print $r_file;
|
---|
| 84 | }else{
|
---|
| 85 | if ($genere==0){
|
---|
| 86 | //Blocco Referendum
|
---|
| 87 | $tmpl_file = "temi/language/$lang/bloccoref.html";
|
---|
| 88 | $thefile = implode("", file($tmpl_file));
|
---|
| 89 | $thefile = addslashes($thefile);
|
---|
| 90 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
| 91 | eval($thefile);
|
---|
| 92 | print $r_file;
|
---|
| 93 | }
|
---|
| 94 | }
|
---|
| 95 | // Blocco link
|
---|
| 96 |
|
---|
[257] | 97 | $sql="select mid, title, preamble, content,editimage from ".$prefix."_ele_link where id_cons='$id_cons' order by mid";
|
---|
| 98 | $sth = $dbi->prepare("$sql");
|
---|
| 99 | $sth->execute();
|
---|
| 100 | $row = $sth->fetchAll();
|
---|
| 101 | if ($sth->rowCount() == 0) {
|
---|
[2] | 102 | echo "</td></tr></table>";
|
---|
| 103 | echo "</div></td><td>";
|
---|
| 104 | //echo "</td><td valign=\"top\" width=\"640\" bgcolor=\"#ffffff\">";
|
---|
| 105 | return;
|
---|
| 106 | } else {
|
---|
| 107 | echo "<h5>"._LINK."</h5><p>";
|
---|
[257] | 108 | foreach($row as $row2) {
|
---|
[299] | 109 | list($mid, $title,$preamble,$content,$editimage) = explode($row2);
|
---|
[2] | 110 | if ($title != "" && $content != "") {
|
---|
| 111 | $content = stripslashes($content);
|
---|
| 112 | $content = substr($content,0,45);
|
---|
| 113 | echo "<b><a href=\"$preamble\">
|
---|
| 114 | $title</a></b><br />
|
---|
| 115 |
|
---|
| 116 | $content<br/>";
|
---|
| 117 | }
|
---|
| 118 | }
|
---|
| 119 | //echo "</p>";
|
---|
| 120 | }
|
---|
| 121 |
|
---|
| 122 |
|
---|
| 123 | echo "</td></tr></table>";
|
---|
| 124 |
|
---|
| 125 | echo "</div></td>";
|
---|
| 126 |
|
---|
| 127 | echo "<td>";
|
---|
| 128 |
|
---|
| 129 |
|
---|
| 130 | }
|
---|
| 131 |
|
---|
| 132 |
|
---|
| 133 |
|
---|
| 134 |
|
---|
| 135 |
|
---|
| 136 |
|
---|
| 137 |
|
---|
| 138 | ?>
|
---|