/
funzioni.php
154 lines (133 loc) · 5.54 KB
/
funzioni.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php
/*Codice della mappa dei LUG italiani
Copyright (C) 2010-2012 Italian Linux Society - http://www.linux.it
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/
?>
<?php
# l'array utilizza come chiave la richiesta in input
# (utilizzata anche per identificare il file da leggere)
# e come valore la stringa da visualizzare
$elenco_regioni = array (
"abruzzo" => "Abruzzo",
"basilicata" => "Basilicata",
"calabria" => "Calabria",
"campania" => "Campania",
"emilia" => "Emilia Romagna",
"emilia-romagna" => "Emilia Romagna",
"friuli" => "Friuli Venezia Giulia",
"friuli-venezia-giulia" => "Friuli Venezia Giulia",
"lazio" => "Lazio",
"liguria" => "Liguria",
"lombardia" => "Lombardia",
"marche" => "Marche",
"molise" => "Molise",
"piemonte" => "Piemonte",
"puglia" => "Puglia",
"sardegna" => "Sardegna",
"sicilia" => "Sicilia",
"toscana" => "Toscana",
"trentino" => "Trentino Alto Adige",
"trentino-alto-adige" => "Trentino Alto Adige",
"umbria" => "Umbria",
"valle" => "Valle d'Aosta",
"valle-daosta" => "Valle d'Aosta",
"veneto" => "Veneto",
"Italia" => "Italia"
);
function lugheader ($title, $extracss = null, $extrajs = null) {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="italian" />
<meta name="robots" content="noarchive" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans|Nobile|Nobile:b" />
<link href="/css/main.css" rel="stylesheet" type="text/css" />
<?php
if ($extracss != null)
foreach ($extracss as $e) {
?>
<link href="<?php echo $e; ?>" rel="stylesheet" type="text/css" />
<?php
}
if ($extrajs != null)
foreach ($extrajs as $e) {
?>
<script type="text/javascript" src="<?php echo $e; ?>"></script>
<?php
}
?>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{lang: 'it'}
</script>
<title><?php echo $title; ?></title>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3626063-13']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<!-- <a href="http://lugmap.linux.it/css/contact.php">select</a> -->
<body>
<div id="header">
<img src="/immagini/logo.png" width="66" height="79" alt="" />
<div id="maintitle">LugMap</div>
<div id="payoff">La mappa dei Linux Users Groups italiani</div>
<div class="menu">
<a class="generalink" href="/">LugMap</a>
<a class="generalink" href="/partecipa/">Partecipa</a>
<a class="generalink" href="/guida/">Guida</a>
<a class="generalink" href="/contatti/">Contatti</a>
<p class="social">
<!-- Icone prese da http://kooc.co.uk/need-some-up-to-date-social-media-icons -->
<a href="http://twitter.com/#!/LugMap"><img src="/immagini/twitter.png"></a>
<a href="https://github.com/Gelma/LugMap/commits/master.atom"><img src="/immagini/rss.png"></a>
<a href="https://www.facebook.com/groups/284932411527993/"><img src="/immagini/facebook.png"></a>
<a href="https://github.com/Gelma/LugMap"><img src="/immagini/github.png"></a>
</p>
</div>
</div>
<?php
}
function lugfooter () {
?>
<div id="footer">
</div>
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://pergamena.lugbs.linux.it/" : "http://pergamena.lugbs.linux.it/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://pergamena.lugbs.linux.it/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</body>
</html>
<?php
}
function ultimo_aggiornamento () {
?>
<a href="http://github.com/Gelma/LugMap/commits/lugmap.linux.it">» Aggiornato al <?php print file_get_contents('../.ultimo_commit') ?> </a><br />
<a href="mailto:andrea.gelmini@lugbs.linux.it,bob4job@gmail.com?subject=LugMap: segnalazione aggiornamento/errore/refuso">» Segnala </a>
<?php
}
?>