[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"\>";
|
---|
| 30 | if ($blocco=='1') echo "<td><div class=\"sx\">";
|
---|
| 31 | //"<td class=\"td-640\">";
|
---|
| 32 | else echo "<td>";
|
---|
| 33 |
|
---|
| 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 |
|
---|
| 97 | $result = mysql_query("select mid, title, preamble, content,editimage from ".$prefix."_ele_link where id_cons='$id_cons' order by mid ", $dbi);
|
---|
| 98 | if (mysql_num_rows($result) == 0) {
|
---|
| 99 | echo "</td></tr></table>";
|
---|
| 100 | echo "</div></td><td>";
|
---|
| 101 | //echo "</td><td valign=\"top\" width=\"640\" bgcolor=\"#ffffff\">";
|
---|
| 102 | return;
|
---|
| 103 | } else {
|
---|
| 104 | echo "<h5>"._LINK."</h5><p>";
|
---|
| 105 | while (list($mid, $title, $preamble,$content, $editimage) = mysql_fetch_row($result)) {
|
---|
| 106 | if ($title != "" && $content != "") {
|
---|
| 107 | $content = stripslashes($content);
|
---|
| 108 | $content = substr($content,0,45);
|
---|
| 109 | echo "<b><a href=\"$preamble\">
|
---|
| 110 | $title</a></b><br />
|
---|
| 111 |
|
---|
| 112 | $content<br/>";
|
---|
| 113 | }
|
---|
| 114 | }
|
---|
| 115 | //echo "</p>";
|
---|
| 116 | }
|
---|
| 117 |
|
---|
| 118 |
|
---|
| 119 | echo "</td></tr></table>";
|
---|
| 120 |
|
---|
| 121 | echo "</div></td>";
|
---|
| 122 |
|
---|
| 123 | echo "<td>";
|
---|
| 124 |
|
---|
| 125 |
|
---|
| 126 | }
|
---|
| 127 |
|
---|
| 128 |
|
---|
| 129 |
|
---|
| 130 |
|
---|
| 131 |
|
---|
| 132 |
|
---|
| 133 |
|
---|
| 134 | ?>
|
---|