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

Last change on this file since 216 was 80, checked in by roby, 14 years ago

client - correzione per consultazione predefinita
admin - eliminati altri notice, modificata la funzione di visualizzazione della barra di elenco delle sezioni, aggiunti help per Scarica liste e Importa liste, corrette alcune incompatibilità con xhtml

File size: 3.0 KB
RevLine 
[2]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"\>";
[80]30##if ($blocco=='1') echo "<td><div class=\"sx\">";
[2]31//"<td class=\"td-640\">";
[80]32##else echo "<td>";
33echo "<td>";
[2]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$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
119echo "</td></tr></table>";
120
121echo "</div></td>";
122
123echo "<td>";
124
125
126}
127
128
129
130
131
132
133
134?>
Note: See TracBrowser for help on using the repository browser.