source: trunk/admin/temi/facebook/index.php@ 299

Last change on this file since 299 was 299, checked in by roby, 5 years ago
File size: 3.1 KB
Line 
1<?php
2/*
3Gestione del tema
4==================
5Files:
6header.html = testata
7footer.html = piede
8bloccogen.html = blocco laterale generale
9bloccocons.html = blocco laterale consultazione
10bloccoref.html = blocco laterale referendum
11
12*/
13
14// tema
15//$bgcolor="#b0b0b0";
16$nometema=$tema;
17
18function testata(){
19global $nometema,$file,$bgcolor,$sitename,$dbi,$prefix,$blocco,$lang;
20echo "<div id=\"container\" >";
21if ($file=="index") menu();
22
23
24
25
26
27
28echo "<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>";
33echo "<td>";
34
35
36}
37
38function piede(){
39global $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."\";";
44eval($thefile);
45print $r_file;
46if($blocco==1){
47
48 blocco();
49
50 echo "</td></tr></table>";
51 echo "</div>"; #container
52}
53}
54
55
56function blocco(){
57
58global $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\">";
61echo "</div></td><td valign=\"top\" class=\"td-149\"><div class=\"sidebar\">";
62echo "<a href=\"modules.php?name=$name&amp;op=$op&amp;id_comune=$id_comune&amp;id_cons=$id_cons&amp;id_cons_gen=$id_cons_gen&amp;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."\";";
73eval($thefile);
74print $r_file;
75
76// Blocco consultazioni
77if ($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."\";";
82eval($thefile);
83print $r_file;
84}else{
85if ($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."\";";
91eval($thefile);
92print $r_file;
93}
94}
95// Blocco link
96
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) {
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>";
108 foreach($row as $row2) {
109 list($mid, $title,$preamble,$content,$editimage) = explode($row2);
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
123echo "</td></tr></table>";
124
125echo "</div></td>";
126
127echo "<td>";
128
129
130}
131
132
133
134
135
136
137
138?>
Note: See TracBrowser for help on using the repository browser.