Procházet zdrojové kódy

Merge branch 'Internal_Stats' into Internal

Iñigo Valentin před 9 roky
rodič
revize
d9922c8a1f

+ 60 - 0
README.es-ES.md

@@ -0,0 +1,60 @@
+---
+[Information in english](README.md) 
+[Informazioa euskaraz](README.es-EU.md)
+---
+
+# Web Gasteizko Margolariak #
+
+Código fuente de el sitio web de [Gasteizko Margolariak](https://margolariak.com/)
+
+Diseñado sobre Apache+MySQL+PHP.
+
+### Página pública ###
+
+La parte disponible al público es ligera, respetuosa con la privacidad del usuario e incluye:
+
+* Un blog de noticias en el que los usuarios pueden comentar.
+* Una galeria de imágenes con la que los usuarios pueden contribuir.
+* Informacion sobre las próximas actividades.
+* Reseñas de actividades pasadas.
+* Durante las Fiestas, informacion sobre las actividades y el programa de la cuadrilla.
+* Durante las Fiestass, información sobre los precios y las ofertas.
+* Localización en tiempo real de Gasteizko Margolariak.
+* Informacion sobre la cuadrilla.
+* Publicidad personaliza, no intrusiva, de los patrocinadores.
+* Una API para sincronizar aplicaciones propias o de terceros.
+* Recolección respetuosa de estadísticas.
+* Vanity URLs.
+
+
+### Página privada ###
+
+La parte privada del portal, reservada para administradores. Protegida por contraseña.
+
+Por ahora, incluye:
+
+* Un formulario para publicar, editar, borrar y traducir entradas del blog.
+* Un formulario para publicar, editar, borrar y traducir actividades.
+* Gestión de socios.
+* Formulario para confeccionar el programa de Fiestas.
+* Registro de actividad.
+
+Funcionalidades previstas:
+
+* Gestión de cuentas de usuario.
+* Gestión de la galería.
+* Visor de estadísticas.
+* Ajustes del sitio.
+* Borradores.
+* Otros.
+
+
+### Sobre este proyecto ###
+
+Se incluye el código fuente para la parte privada y la pública, así como scripts para construir la base de datos.
+
+
+### Aplicaciones ###
+
+* Tienes un iPhone? [Estamos en ellos!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakIOSApp) 
+* Android? [Lo tenemos!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakApp)

+ 60 - 0
README.es-EU.md

@@ -0,0 +1,60 @@
+---
+[Informacion en castellano](README.es-ES.md) 
+[Information in english](README.md)
+---
+
+# Web Gasteizko Margolariak #
+
+Código fuente de el sitio web de [Gasteizko Margolariak](https://margolariak.com/)
+
+Diseñado sobre Apache+MySQL+PHP.
+
+### Página pública ###
+
+La parte disponible al público es ligera, respetuosa con la privacidad del usuario e incluye:
+
+* Un blog de noticias en el que los usuarios pueden comentar.
+* Una galeria de imágenes con la que los usuarios pueden contribuir.
+* Informacion sobre las próximas actividades.
+* Reseñas de actividades pasadas.
+* Durante las Fiestas, informacion sobre las actividades y el programa de la cuadrilla.
+* Durante las Fiestass, información sobre los precios y las ofertas.
+* Localización en tiempo real de Gasteizko Margolariak.
+* Informacion sobre la cuadrilla.
+* Publicidad personaliza, no intrusiva, de los patrocinadores.
+* Una API para sincronizar aplicaciones propias o de terceros.
+* Recolección respetuosa de estadísticas.
+* Vanity URLs.
+
+
+### Página privada ###
+
+La parte privada del portal, reservada para administradores. Protegida por contraseña.
+
+Por ahora, incluye:
+
+* Un formulario para publicar, editar, borrar y traducir entradas del blog.
+* Un formulario para publicar, editar, borrar y traducir actividades.
+* Gestión de socios.
+* Formulario para confeccionar el programa de Fiestas.
+* Registro de actividad.
+
+Funcionalidades previstas:
+
+* Gestión de cuentas de usuario.
+* Gestión de la galería.
+* Visor de estadísticas.
+* Ajustes del sitio.
+* Borradores.
+* Otros.
+
+
+### Sobre este proyecto ###
+
+Se incluye el código fuente para la parte privada y la pública, así como scripts para construir la base de datos.
+
+
+### Aplicaciones ###
+
+* Tienes un iPhone? [Estamos en ellos!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakIOSApp) 
+* Android? [Lo tenemos!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakApp)

+ 14 - 7
README.md

@@ -1,11 +1,10 @@
-Gasteizko Margolariak Web
-===
+# Gasteizko Margolariak Web #
 
-Source code of the <a href="http://margolariak.com/">Gasteizko Margolariak</a> Web Portal.
+Source code of the [Gasteizko Margolariak](https://margolariak.com/) Web Portal.
 
 Website designed to work over Apache+MySQL+PHP.
 
-###Public page###
+### Public page ###
 
 The public page is available for anyone to visit, is respectfull with the privacy of the user, lightweight, and it includes:
 
@@ -18,12 +17,12 @@ The public page is available for anyone to visit, is respectfull with the privac
 * Real time location of Gasteizko Margolariak.
 * Information and the History of Gasteizko Margolariak.
 * Custom-made, non intrusive, privacy-awatre advertisment of collaborators.
-* An API to sync the <a href="https://github.com/GasteizkoMargolariak/GasteizkoMargolariakApp">App</a>.
+* An API to sync apps.
 * A respectfull statistics counter.
 * Vanity URLs.
 
 
-###Private page###
+### Private pag e###
 
 The private page includes a private area for the directives of Gasteizko Margolariak. It is designed to be served on a different port and is password protected.
 
@@ -44,6 +43,14 @@ In the future, more functionalities will be added:
 * Drafts.
 * Many more.
 
-###About this project###
+
+### About this project ###
 
 This projets includes the source for both the public and private page, as well as the files required to build the database. Apache configuration is left as an exercice to the reader.
+
+
+### On other devices ###
+
+* Got an iPhone? [We are working on it!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakIOSApp) 
+* Android? [Got you covered!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakApp)
+

+ 4 - 2
www/.htaccess

@@ -30,6 +30,8 @@ RewriteRule ^blog/([0-9]+)/$ /blog/index.php?o=$1 [NC]
 
 RewriteRule ^lablanca/([0-9]+)$ /lablanca/index.php?year=$1 [NC]
 
+RewriteRule ^archivo/([A-Z\-a-z0-9]{3,}+)$ /archivo/index.php?file=$1 [NC]
+RewriteRule ^archivo/([A-Z\-a-z0-9]{3,}+)/$ /archivo/index.php?file=$1 [NC]
 
 RewriteRule ^actividades/search/([A-Za-z0-9]+)/([A-Za-z0-9]+)$ /actividades/buscar.php?where=$1&query=$2 [NC]
 RewriteRule ^actividades/search/([A-Za-z0-9]+)/([A-Za-z0-9]+)/$ /actividades/buscar.php?where=$1&query=$2 [NC]
@@ -54,8 +56,8 @@ RewriteRule ^API/V([{0-9}]+)/help/([A-Z\-a-z0-9{3,}]+)$ /API/V$1/help/$2.php [NC
 RewriteRule ^API/V([{0-9}]+)/help/([A-Z\-a-z0-9{3,}]+)/$ /API/V$1/help/$2.php [L,NC]
 
 #Force https TODO
-#RewriteCond %{HTTPS} !=on
-#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
+RewriteCond %{HTTPS} !=on
+RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
 
 # BEGIN Cache-Control Headers
 <IfModule mod_expires.c>

+ 2 - 2
www/API/v1/sync.php

@@ -151,7 +151,7 @@
 				$tables = [ 'festival', 'festival_day', 'festival_event', 'festival_event_image', 'festival_offer', 'place', 'people' ];
 				break;
 			case SEC_ALL:
-				$tables = [ 'activity', 'activity_itinerary', 'activity_comment', 'activity_image', 'activity_tag', 'album', 'photo', 'festival', 'festival_day', 'festival_event', 'festival_event_image', 'festival_offer', 'photo_album', 'place', 'post', 'post_comment', 'post_image', 'post_tag', 'settings', 'sponsor' ];
+				$tables = [ 'activity', 'activity_itinerary', 'activity_comment', 'activity_image', 'activity_tag', 'album', 'photo', 'festival', 'festival_day', 'festival_event', 'festival_event_image', 'festival_offer', 'photo_album', 'place', 'people', 'post', 'post_comment', 'post_image', 'post_tag', 'settings', 'sponsor' ];
 				break;
 			default:
 				//'Bad request' staus code
@@ -229,7 +229,7 @@
 			//Other cases: 
 			default:
 				//If the table is a public one and has not been listed above, all of its fields are public.
-				if (in_array($table, ['activity_image', 'activity_itinerary', 'activity_tag', 'festival', 'festival_day', 'festival_event', 'festival_event_image', 'festival_offer', 'photo_album', 'place', 'post_image', 'post_tag'])){
+				if (in_array($table, ['activity_image', 'activity_itinerary', 'activity_tag', 'festival', 'festival_day', 'festival_event', 'festival_event_image', 'festival_offer', 'photo_album', 'place', 'people', 'post_image', 'post_tag'])){
 					$q = mysqli_query($con, "SELECT * FROM $table;");
 				}
 				//If forbidden table

+ 3 - 0
www/archivo/index.php

@@ -0,0 +1,3 @@
+< 
+	header("Location: /archivo" . $_GET['file']);
+??php>

+ 11 - 1
www/ayuda/index.php

@@ -17,7 +17,7 @@
 		<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
 		<meta charset="utf-8"/>
 		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
-		<title><?php echo $lng['us_title'];?> - Gasteizko Margolariak</title>
+		<title><?php echo $lng['footer_help'];?> - Gasteizko Margolariak</title>
 		<link rel="shortcut icon" href="<?php echo "$proto$http_host/img/logo/favicon.ico";?>">
 		<!-- CSS files -->
 		<style>
@@ -138,6 +138,16 @@
 					</div>
 				</div>
 			</div>
+			<div class="content_row">
+				<div class="content_cell">
+					<div class="section" id="section_ads">
+						<h3 class="section_title"><?php echo $lng['help_ad_title']; ?></h3>
+						<div class="entry">
+							<?php echo $lng['help_ad']; ?>
+						</div>
+					</div>
+				</div>
+			</div>
 		</div>
 		<?php
 			include("../footer.php");

+ 71 - 15
www/css/index.css

@@ -1,5 +1,7 @@
+/* Location section */
+
 /* Festival section */
-table.festival_section_table{
+/*div#festivals{
 	width:	100%;
 }
 
@@ -20,37 +22,91 @@ table.festival_section_table tr td div.entry{
 }
 
 table.festival_section_table tr td div#festivals_summary{
-/* 	min-height:		15em; */
+ 	min-height:		15em;
 }
 
-table.festival_section_table tr td div#festivals_summary img{
+table.festival_section_table tr td div#festivals_summary img{*/
+div#festivals div#festivals_summary img{
 	display:		inline-block;
 	max-width:		40%;
 	max-height:		15em;
 	vertical-align:	top;
-	float:			left;
+	wfloat:			left;
 	margin-right:	2em;
 }
 
-table.festival_section_table tr td div#festival_entry_map{
-	text-align:	center;
+div#festivals #festivals_summary_text{
+	display:	inline-block;
+	max-width:	50%;
+}
+
+div#festivals div#festivals_schedule_table{
+	display:	table;
+	width:		100%;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row{
+	display:	table-row;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell{
+	display:	table-cell;
+	width:		50%;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div#festivals_gm{
+	margin: 0.4em 0.2em 0.4em 0.4em;
 }
 
-div.festival_event{
-	margin-left:	1.5em;
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div#festivals_city{
+	margin: 0.4em 0.4em 0.4em 0.2em;
 }
 
-table.festival_section_table tr td div#festival_entry_map h3{
-	text-align:	left;
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div.festival_event{
+	margin:			1em;
+	padding:		0.3em 0.3em 0.3em 0.5em;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div.festival_event h4{
+	margin:			1em 0.2em 0.2em 0em;
+	font-weight:	bold;
+	color:			#444444;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div.festival_event div.schedule_content{
+	border-left:	0.1em dotted black;
+	margin-left:	0.5em;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div.festival_event span.title{
+	font-weight:	bold;
+	font-size:		120%;
+	color:			#275573;
+	margin:			1em 0.5em 0.7em 0.2em;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div.festival_event p.description{
+	margin:	0.2em 1em 1em 1em;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div.festival_event table.location{
+	margin:		0.3em 1em 0.3em 1.6em;
+	font-size:	90%;
+	color:		#222222;
+}
+
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div.festival_event table.location img{
+	max-width:	1.3em;
+	max-hieght:	1.5em;
 }
 
-table.festival_section_table tr td div#festival_entry_map iframe{
-	width:		80%;
-	margin:		auto;
-	min-height:	15em;
-	max-height:	20em;
+div#festivals div#festivals_schedule_table div#festivals_schedule_row div.festivals_schedule_cell div.festival_event table.location span.address{
+	font-size:	80%;
+	font-style:	italic;
+	color:		#444444;
 }
 
+
 table.festival_section_table tr td div.festival_schedule span.title{
 	font-weight:	bold;
 /* 	font-size:		105%; */

+ 57 - 19
www/css/lablanca.css

@@ -46,7 +46,32 @@ div.horiz p{
 	vertical-align:	top;
 }
 
+div#past_festivals ul li{
+	margin:	0.5em;
+}
+
+
 /* fiestas.php */
+div#festivals_image_top_container{
+	display:	block;
+	text-align:	center;
+	margin:		0.5em auto 0.5em auto;
+}
+
+div#festivals_image_top_container div#festivals_image_container{
+	display:		inline-block;
+	border:			0.1em solid #001133;
+	border-radius:	1em;
+	box-shadow:		0 0 1em #111122;
+	margin:			0.8em auto 0.8em auto;
+}
+
+div#festivals_image_top_container div#festivals_image_container img#festivals_image{
+	border-radius:	1em;
+	max-width:		60em;
+	max-height:		20em;
+}
+
 div#schedule{
 	display:		inline-block;
 	vertical-align:	top;
@@ -74,7 +99,7 @@ table.schedule td{
 	vertical-align:	top;
 	padding-left:	0.5em;
 	padding-right:	0.5em;
-	padding-bottom:	0.6em;
+	padding-bottom:	1em;
 }
 
 table.schedule td span.time{
@@ -83,49 +108,47 @@ table.schedule td span.time{
 
 table.schedule td span.title{
 	font-weight:	bold;
+	font-style:		italic;
+	font-size:		110%;
+	color:			#001133;
+	margin:			0 0.5em 0.5em 0.3em;
+	letter-spacing:	0.05em;
 }
 
-table.schedule td span.description{
-	font-size:		90%;
-	font-style:		italic;
-	margin-left:	1.2em;
+table.schedule td div.description{
+	margin:	0.3em 2em 0.5em 1.2em;
+	color:	#222222;
 }
 
 table.schedule td.timeline{
 	width:				0.06em;
-	padding:			0;
-	background-color:	#000000;
+	padding:			0 0 1em 0;
+	border-left:		dotted #333333 0.1em;
 	padding-left:		0;
 	padding-right:		0;
 	
 }
 
-
-
 table.schedule td.timeline img.timeline_dot{
 	width:			1em;
 	height:			1em;
-	margin-left:	-0.44em;
-	margin-right:	-0.44em;
-	margin-top:		0.3em;
+	margin-left:	-0.47em;
+	margin-right:	-0.41em;
+	margin-top:		0.2em;
 }
 
-table.schedule table.location{
+table.schedule div.location{
 	font-size:			80%;
 	border-collapse:	collapse;
 	margin-left:		2em;
 }
 
-table.schedule table.location td{
-	padding:	0.2em;
-}
-
-table.schedule table.location img{
+table.schedule div.location img{
 	max-height:		1.3em;
 	vertical-align:	middle;
 }
 
-table.schedule table.location span.address{
+table.schedule div.location span.address{
 	font-style:	italic;
 }
 
@@ -163,6 +186,12 @@ div#prices table#table_days td{
 	padding:	0.5em 2em 0.5em 2em; 
 }
 
+div#prices table#table_days td.price{
+	color:			#001133;
+	font-weight:	bold;
+	font-size:		110%;
+}
+
 div#prices td.price{
 	min-width:	4em;
 	text-align:	right;
@@ -178,10 +207,19 @@ div#prices table#table_offers td{
 	border-top:	0.2em solid #aaaaaa;
 }
 
+div#prices table#table_offers td.price{
+	min-width:		4em;
+	text-align:		right;
+	color:			#001133;
+	font-weight:	bold;
+	font-size:		110%;
+}
+
 div#prices table#table_offers p.description{
 	margin:		0.2em 0.2em 0.5em 2em;
 	font-size:	90%;
 	font-style:	italic;
+	color:		#444444;
 }
 
 

+ 7 - 1
www/css/m/lablanca.css

@@ -22,6 +22,12 @@ div#content_table div.content_tr div#content_td_prices{
 	width:		100%;
 }
 
+div#festivals_image_top_container div#festivals_image_container img#festivals_image{
+	border-radius:	0.5em;
+	max-width:		initial;
+	max-height:		15em;
+}
+
 div#schedule{
 	display:		block;
 	margin-right:	0em;
@@ -29,4 +35,4 @@ div#schedule{
 
 div#prices{
 	display:		block;
-}
+}

+ 10 - 0
www/css/ui.css

@@ -567,3 +567,13 @@ div#ad div.entry a img#ad_pinpoint{
 	vertical-align:	middle;
 	max-height:		0.8em;
 }
+
+div#ad div#ad_policy{
+	text-align:	right;
+	margin:		0;
+	padding:	1.5em 1em 0.5em 0.5em;
+	font-size:	85%;
+	position:	absolute;
+	bottom:		1em;
+	right:		1em;
+}

+ 66 - 4
www/functions.php

@@ -323,7 +323,7 @@
 	* contributes with Gasteizko Margolariak.           *
         ****************************************************/
 	function ad($con, $lang, $lng){
-	$id = -1;
+		$id = -1;
 		//If the user hasn't still see an add on this session
 		if (isset($_SESSION['ad']) == false){
 			//25% chance of seeing an add
@@ -366,6 +366,10 @@
 				if(strlen($r["address"]) > 0){
 					echo("<br/><br/><a target='_blank' href='https://www.google.es/maps/@$r[lat],$r[lon],14z'><img id='ad_pinpoint' src='/img/misc/pinpoint.png'\>$r[address]</a>\n");
 				}
+				echo("<br/><br/><br class='mobile'/><br class='mobile'/>");
+				echo("<div id='ad_policy'>\n");
+				echo("<a target='_blank' href='$proto$http_host/ayuda/#section_ads'>" . $lng['help_ad_title'] . "</a>\n");
+				echo("</div>\n");
 				echo("</div>\n");
 				echo("</div>\n");
 				echo("<script type='text/javascript'>showAd();</script>\n");
@@ -431,10 +435,25 @@
 		$bot_kw[20] = 'commerce';
 		$bot_kw[21] = 'html';
 		$bot_kw[22] = 'fetch';
-		
+		$bot_kw[23] = 'google';
+		$bot_kw[24] = 'facebook';
+		$bot_kw[25] = 'whatsapp';
+		$bot_kw[26] = 'pinterest';
+		$bot_kw[27] = 'scrapy';
+		$bot_kw[28] = 'libwww';
+		$bot_kw[29] = 'java standard library';
+		$bot_kw[30] = 'default browser';
+		$bot_kw[31] = 'twingly recon';
+		$bot_kw[32] = 'siteexplorer';
+		$bot_kw[33] = 'yandex';
+		$bot_kw[34] = 'wotbox';
+		$bot_kw[35] = 'apache synapse';
+		$bot_kw[36] = 'catexplorador';
+		$bot_kw[37] = 'internet archive';
+
 		$i = 0;
 		while ($i < sizeof($bot_kw)) {
-			if (strpos(strtolower($uagent), $bot_kw[$i]) !== false){
+			if (strpos(strtolower($uagent), $bot_kw[$i]) !== false || strpos(strtolower($browser), $bot_kw[$i]) !== false){
 				mysqli_close($con);
 				return;
 			}
@@ -458,10 +477,53 @@
 		}
 		
 		if (is_array($ad_static)){
-			foreach ($ad_static as &$sponsor) {
+			foreach ($ad_static as $sponsor) {
 				mysqli_query($con, "UPDATE sponsor SET print_static = print_static + 1 WHERE id = $sponsor;");
 			}
 		}
 	}
+
+	function recalculateStats($day = null){
+		$con = startdb('rw');
+
+		// Visit count
+		$s = "SELECT date(dtime) AS day, count(stat_visit.id) AS visit FROM stat_view, stat_visit where stat_visit.id = stat_view.visit";
+		if (day != null){
+			$s = $s . " AND date(dtime) = str_to_date('$day', '%Y-%m-%d')";
+		}
+		$s = $s . " GROUP BY date(dtime);";
+		$q = mysqli_query($con, $s);
+		while ($r = mysqli_fetch-array($q)){
+			$q_check = mysqli_query("SELECT date FROM stat_daily_visit WHERE day = str_to_date('$day', '%Y-%m-%d')");
+			if (mysqli_num_rows($q_check) > 0){
+				// Update
+				mysqli_query($con, "UPDATE stat_daily_visit SET visit = $r[visit] WHERE day = str_to_date('$day', '%Y-%m-%d')");
+			}
+			else{
+				// Insert
+				mysqli_query($con, "INSERT INTO stat_daily_visit (day, visit) VALUES (str_to_date('$day', '%Y-%m-%d'), $r[visit])");
+			}
+		}
+
+		// Visit count by os and browser.
+		$s = "SELECT date(dtime) AS day, os, browser, count(stat_visit.id) AS visit FROM stat_view, stat_visit where stat_visit.id = stat_view.visit";
+		if (day != null){
+			$s = $s . " AND date(dtime) = str_to_date('$day', '%Y-%m-%d')";
+		}
+		$s = $s . " GROUP BY date(dtime), os, browser;";
+		$q = mysqli_query($con, $s);
+		while ($r = mysqli_fetch-array($q)){
+			$q_check = mysqli_query("SELECT date FROM stat_daily_visit_browser WHERE day = str_to_date('$day', '%Y-%m-%d') AND os = $r[os] AND browser = $r[browser]");
+			if (mysqli_num_rows($q_check) > 0){
+				// Update
+				mysqli_query($con, "UPDATE stat_daily_visit_browser SET visit = $r[visit] WHERE day = str_to_date('$day', '%Y-%m-%d') AND os = $r[os] AND browser = $r[browser]");
+			}
+			else{
+				// Insert
+				mysqli_query($con, "INSERT INTO stat_daily_visit_browser (day, os, browser, visit) VALUES (str_to_date('$day', '%Y-%m-%d'), $r[os], $[browser], $r[visit])");
+			}
+		}
+		
+	}
 ?>
 	

+ 299 - 188
www/index.php

@@ -23,21 +23,21 @@
 		<link rel="shortcut icon" href="<?php echo "$proto$http_host/img/logo/favicon.ico";?>">
 		<!-- CSS files -->
 		<style>
-			<?php 
+<?php 
 				include("css/ui.css"); 
 				include("css/index.css");
-			?>
+?>
 		</style>
 		<!-- CSS for mobile version -->
 		<style media="(max-width : 990px)">
-			<?php 
+<?php 
 				include("css/m/ui.css"); 
 				include("css/m/index.css");
-			?>
+?>
 		</style>
 		<!-- Script files -->
 		<script type="text/javascript">
-			<?php include("script/ui.js"); ?>
+<?php include("script/ui.js"); ?>
 		</script>
 		<!-- Meta tags -->
 		<link rel="canonical" href="<?php echo "$proto$http_host"; ?>"/>
@@ -59,188 +59,299 @@
 		<meta name="robots" content="index follow"/>
 	</head>
 	<body>
-		<?php include("header.php"); ?>
+<?php include("header.php"); ?>
 		<div id="content">
-			<?php
+
+<?php		
+				//Location section
+				$q_location = mysqli_query($con, "SELECT lat, lon FROM location WHERE action = 'report' AND dtime > NOW() - INTERVAL 30 MINUTE ORDER BY dtime DESC LIMIT 1;");
+				if (mysqli_num_rows($q_location) > 0){
+					$r_location = mysqli_fetch_array($q_location);
+?>
+					<div class='section' id='location'>
+					<h3 class='section_title'><?=$lng[index_festivals_location]?></h3>
+						<div class='entry' id='map'>
+							<iframe src='https://www.google.com/maps/embed/v1/place?key=AIzaSyCZHP7t2on_G3eyyoCTfhGAlDx1mJnX7iI&q=<?=$r_location[lat]?>,<?=$r_location[lon]?>' allowfullscreen></iframe>
+						</div>
+					</div>
+<?php
+				}
+
 				//Festivals section
 				$year = date("Y");
 				$q_settings = mysqli_query($con, "SELECT value FROM settings WHERE name = 'festivals';");
 				$r_settings = mysqli_fetch_array($q_settings);
 				$festivals = $r_settings['value'];
 				if ($festivals == 1){
-					echo "<div class='section' id='festivales' itemscope itemtype='$protoschema.org/Event'>\n";
-					echo "<meta itemprop='inLanguage' content='$lang'/>\n";
-					echo "<meta itemprop='name' content='$lng[index_festivals_header] $year'/>\n";
-					echo "<meta itemprop='description' content='$lng[index_festivals_header] $year'/>\n";
-					echo "<meta itemprop='startDate' content='$year-08-04'/>\n";
-					echo "<meta itemprop='endDate' content='$year-08-09'/>\n";
-					echo "<meta itemprop='url' content='$proto$http_host/lablanca/'/>\n";
-					echo("<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'><meta itemprop='address' itemprop='name' content='Vitoria-Gasteiz'/></span>\n");
-					echo "<h3 class='section_title'>$lng[index_festivals_header] $year</h3>\n";
-					echo "<table class='festival_section_table'><tr>\n";
-					
-					//Summary
-					$q_festivals = mysqli_query($con, "SELECT text_$lang AS text, summary_$lang AS summary, img FROM festival WHERE year = $year;");
-					if(mysqli_num_rows($q_festivals)){
-						echo "<td><div class='entry' id='festivals_summary'>\n";
-						$r_festivals = mysqli_fetch_array($q_festivals);
-						if ($r_festivals['img'] != ''){
-							echo "<meta itemprop='image' content='$proto$http_host/img/fiestas/$r_festivals[img]'/>\n";
-							echo "<img id='festivals_image' alt=' ' src='$proto$http_host/img/fiestas/$r_festivals[img]'/>\n";
-						}
-						if ($r_festivals['summary'] != ''){
-							echo "<span class='entry_title' id='festivals_summary_text'><br/>$r_festivals[summary]</span>\n";
-							echo "<br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$proto$http_host/lablanca/'>$lng[index_festivals_link]</a>\n";
-						}
-						else{
-							echo "<span id='festivals_summary_text'><br/>" . cutText($r_festivals['text'], 300, "$lng[index_read_more]", "$proto$http_host/lablanca/") . "</span>\n";
-							//echo "<br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$proto$http_host/lablanca/'>$lng[index_festivals_link]</a>\n";
-						}
-						echo "</div></td>\n";
-					}
-					
-					
-					//Location
-					$q_location = mysqli_query($con, "SELECT lat, lon FROM location WHERE action = 'report' AND dtime > NOW() - INTERVAL 30 MINUTE ORDER BY dtime DESC LIMIT 1;");
-					if (mysqli_num_rows($q_location) > 0){
-						$r_location = mysqli_fetch_array($q_location);
-						echo "<td><div class='entry' id='festival_entry_map'>\n";
-						echo "<h3 class='entry_title'>$lng[index_festivals_location]</h3>\n";
-						echo "<iframe src='https://www.google.com/maps/embed/v1/place?key=AIzaSyCZHP7t2on_G3eyyoCTfhGAlDx1mJnX7iI&q=$r_location[lat],$r_location[lon]' allowfullscreen></iframe>\n";
-						echo "</div>\n";
-					}
-					
-					echo "</tr></table>\n";
-					echo "<table class='festival_section_table'><tr>\n";
-					
-					//GM schedule
-					$q_sch_curr = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() - INTERVAL 45 MINUTE AND start < NOW() + INTERVAL 30 MINUTE ORDER BY start LIMIT 1;");
-					$q_sch_next = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() AND start < NOW() + INTERVAL 240 MINUTE ORDER BY start LIMIT 1;");
-					if (mysqli_num_rows($q_sch_curr) > 0 || mysqli_num_rows($q_sch_next) > 0){
-						echo "<td><div class='entry festival_schedule'>\n";
-						echo "<h3 class='entry_title'>$lng[index_festivals_gm_schedule]</h3>\n";
+?>
+					<div class='section' id='festivals' itemscope itemtype='http://schema.org/Event'>
+						<meta itemprop='inLanguage' content='<?=$lang?>'/>
+						<meta itemprop='name' content='<?=$lng['index_festivals_header']?> <?=$year?>'/>
+						<meta itemprop='description' content='<?=$lng['index_festivals_header']?> <?=$year?>'/>
+						<meta itemprop='startDate' content='<?=$year?>-08-04'/>
+						<meta itemprop='endDate' content='<?=$year?>-08-09'/>
+						<meta itemprop='url' content='<?=$proto?><?=$http_host?>/lablanca/'/>
+						<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'><meta itemprop='address' itemprop='name' content='Vitoria-Gasteiz'/></span>
+						<h3 class='section_title'><?=$lng['index_festivals_header']?> <?=$year?></h3>
+						<div class='entry' id='festivals_summary'>
+<?php
 					
-						if (mysqli_num_rows($q_sch_curr) > 0){
-							$r_sch_curr = mysqli_fetch_array($q_sch_curr);
-							echo "<div id='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_now]</h4>\n";
-							echo "<meta itemprop='inLanguage' content='$lang'/>\n";
-							echo "<meta itemprop='name' content='$r_sch_curr[title]'/>\n";
-							echo "<meta itemprop='startDate' content='$r_sch_curr[isostart]'/>\n";
-							if (strlen($r_sch_curr['isoend']) > 0){
-								echo "<meta itemprop='endDate' content='$r_sch_curr[isoend]'/>\n";
-							}
-							echo("<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'><meta itemprop='address' content='Vitoria-Gasteiz'/><span>\n");
-							echo "<span class='title'>$r_sch_curr[title]\n</span>";
-							if (strlen($r_sch_curr["description"]) > 0 && $r_sch_curr["description"] != $r_sch_curr["title"]){
-								echo "<br/><span class='description'>$r_sch_curr[description]</span>\n";
-								echo "<meta itemprop='description' content='$r_sch_curr[description]'/>\n";
-							}
-							echo "<table class='location'><tr>\n";
-							echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch_curr[lat],$r_sch_curr[lon]+(My+Point)&z=14&ll=$r_sch_curr[lat],$r_sch_curr[lon]'><img alt=' ' src='$proto$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
-							//If name and address are the same, show only name
-							if ($r_sch_curr['place'] == $r_sch_curr['address']){
-								echo "<td>$r_sch_curr[place]</td></tr></table>\n";
-							}
-							else{
-								echo "<td>$r_sch_curr[place] <span class='address'>- $r_sch_curr[address]</span></td></tr></table>\n";
-							}
-							echo "</div\n>";
-						}
-						
-						if (mysqli_num_rows($q_sch_next) > 0){
-							$r_sch_next = mysqli_fetch_array($q_sch_next);
-							echo "<div id='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_next]</h4>\n";
-							echo "<meta itemprop='inLanguage' content='$lang'/>\n";
-							echo "<meta itemprop='name' content='$r_sch_next[title]'/>\n";
-							echo "<meta itemprop='startDate' content='$r_sch_next[isostart]'/>\n";
-							if (strlen($r_sch_curr['isoend']) > 0){
-								echo "<meta itemprop='endDate' content='$r_sch_next[isoend]'/>\n";
-							}
-							echo("<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'><meta itemprop='address' itemprop='name'>Vitoria-Gasteiz</meta></span>\n");
-							echo "<span class='title'>$r_sch_next[title] - $r_sch_next[st]\n</span>";
-							if (strlen($r_sch_next["description"]) > 0 && $r_sch_next["description"] != $r_sch_next["title"]){
-								echo "<br/><span class='description'>$r_sch_next[description]</span>\n";
-								echo "<meta itemprop='description' content='$r_sch_next[description]'/>\n";
-							}
-							echo "<table class='location'><tr>\n";
-							echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch_next[lat],$r_sch_next[lon]+(My+Point)&z=14&ll=$r_sch_next[lat],$r_sch_next[lon]'><img alt=' ' src='$proto$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
-							//If name and address are the same, show only name
-							if ($r_sch_next['place'] == $r_sch_next['address']){
-								echo "<td>$r_sch_next[place]</td></tr></table>\n";
-							}
-							else{
-								echo "<td>$r_sch_next[place] <span class='address'>- $r_sch_next[address]</span></td></tr></table>\n";
+							//Summary
+							$q_festivals = mysqli_query($con, "SELECT text_$lang AS text, summary_$lang AS summary, img FROM festival WHERE year = $year;");
+							if(mysqli_num_rows($q_festivals)){
+								$r_festivals = mysqli_fetch_array($q_festivals);
+								if ($r_festivals['img'] != ''){
+									echo("<meta itemprop='image' content='$proto$http_host/img/fiestas/$r_festivals[img]'/>\n");
+									echo("<img id='festivals_image' alt=' ' src='$proto$http_host/img/fiestas/$r_festivals[img]'/>\n");
+								}
+								if ($r_festivals['summary'] != ''){
+									echo "<span class='entry_title' id='festivals_summary_text'><br/>$r_festivals[summary]</span>\n";
+									echo "<br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$proto$http_host/lablanca/'>$lng[index_festivals_link]</a>\n";
+								}
+								else{
+									echo "<span id='festivals_summary_text'><br/>" . cutText($r_festivals['text'], 300, "$lng[index_read_more]", "$proto$http_host/lablanca/") . "</span>\n";
+								}
 							}
-							echo "</div\n>";
-						}
-						echo "</div></td>\n"; //close gm schedule entry;
-					}
+?>
+						</div> <!--festivals_summary - entry-->
+						<div id='festivals_schedule_table'>
+							<div id='festivals_schedule_row'>
+								<div class='festivals_schedule_cell'>
+<?php
+									//GM schedule
+									$q_sch_curr = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() - INTERVAL 45 MINUTE AND start < NOW() + INTERVAL 30 MINUTE ORDER BY start LIMIT 1;");
+									$q_sch_next = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() AND start < NOW() + INTERVAL 240 MINUTE ORDER BY start LIMIT 1;");
+
+									if (mysqli_num_rows($q_sch_curr) > 0 || mysqli_num_rows($q_sch_next) > 0){
+										echo("<div class='entry festival_schedule' id='festivals_gm'>\n");
+										echo("<h3 class='entry_title'>$lng[index_festivals_gm_schedule]</h3>\n");
 										
-					//city schedule
-					$q_sch_curr = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 0 AND start > NOW() - INTERVAL 45 MINUTE AND start < NOW() + INTERVAL 30 MINUTE ORDER BY start LIMIT 1;");
-					$q_sch_next = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 0 AND start > NOW() AND start < NOW() + INTERVAL 240 MINUTE ORDER BY start LIMIT 1;");
-					if (mysqli_num_rows($q_sch_curr) > 0 || mysqli_num_rows($q_sch_next) > 0){
-						echo "<td><div class='entry festival_schedule' >\n";
-						echo "<h3 class='entry_title'>$lng[index_festivals_city_schedule]</h3>\n";
-					
-						if (mysqli_num_rows($q_sch_curr) > 0){
-							$r_sch_curr = mysqli_fetch_array($q_sch_curr);
-							echo "<div class='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_now]</h4>\n";
-							echo "<meta itemprop='inLanguage' content='$lang'/>\n";
-							echo "<meta itemprop='name' content='$r_sch_curr[title]'/>\n";
-							echo "<meta itemprop='startDate' content='$r_sch_curr[isostart]'/>\n";
-							if (strlen($r_sch_curr['isoend']) > 0){
-								echo "<meta itemprop='endDate' content='$r_sch_curr[isoend]'/>\n";
-							}
-							echo("<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'><meta itemprop='address' itemprop='name'>Vitoria-Gasteiz</meta></span>\n");
-							echo "<span class='title'>$r_sch_curr[title]\n</span>";
-							if (strlen($r_sch_curr["description"]) > 0 && $r_sch_curr["description"] != $r_sch_curr["title"]){
-								echo "<br/><span class='description'>$r_sch_curr[description]</span>\n";
-								echo "<meta itemprop='description' content='$r_sch_curr[description]'/>\n";
-							}
-							echo "<table class='location'><tr>\n";
-							echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch_curr[lat],$r_sch_curr[lon]+(My+Point)&z=14&ll=$r_sch_curr[lat],$r_sch_curr[lon]'><img alt=' ' src='$proto$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
-							//If name and address are the same, show only name
-							if ($r_sch_curr['place'] == $r_sch_curr['address']){
-								echo "<td>$r_sch_curr[place]</td></tr></table>\n";
-							}
-							else{
-								echo "<td>$r_sch_curr[place] <span class='address'>- $r_sch_curr[address]</span></td></tr></table>\n";
-							}
-							echo "</div\n>";
-						}
+										if (mysqli_num_rows($q_sch_curr) > 0){
+											$r_sch_curr = mysqli_fetch_array($q_sch_curr);
+?>
+											<div class='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'>
+												<h4><?=$lng[index_festivals_schedule_now]?></h4>
+												<meta itemprop='inLanguage' content='<?=$lang?>'/>
+												<meta itemprop='name' content='<?=$r_sch_curr['title']?>'/>
+												<meta itemprop='startDate' content='<?=$r_sch_curr['isostart']?>'/>
+												<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'>
+													<meta itemprop='address' content='Vitoria-Gasteiz'/>
+												</span>
+<?php
+												if (strlen($r_sch_curr['isoend']) > 0){
+													echo("<meta itemprop='endDate' content='$r_sch_curr[isoend]'/>\n");
+												}
+?>
+												<div class='schedule_content'>
+													<span class='title'><?=$r_sch_curr['title']?></span>
+<?php
+													if (strlen($r_sch_curr["description"]) > 0 && $r_sch_curr["description"] != $r_sch_curr["title"]){
+														echo("<br/><p class='description'>$r_sch_curr[description]</p>\n");
+														echo("<meta itemprop='description' content='$r_sch_curr[description]'/>\n");
+													}
+?>
+													<table class='location'>
+														<tr>
+															<td>
+																<a target='_blank' href='http://maps.google.com/maps?q=<?=$r_sch_curr[lat]?>,<?=$r_sch_curr[lon]?>+(My+Point)&z=14&ll=<?=$r_sch_curr[lat]?>,<?=$r_sch_curr[lon]?>'>
+																	<img alt=' ' src='<?=$proto?><?=$http_host?>/img/misc/pinpoint.png'/>
+																</a>
+															</td>
+															<td>
+<?php
+																//If name and address are the same, show only name
+																if ($r_sch_curr['place'] == $r_sch_curr['address']){
+																	echo("$r_sch_curr[place]\n");
+																}
+																else{
+																	echo("$r_sch_curr[place] <br/><span class='address'> $r_sch_curr[address]</span>\n");
+																}
+?>
+															</td>
+														</tr>
+													</table>
+												</div> <!--.schedule_content  -->
+											</div> <!-- festival-event -->
+<?php
+										} // if (mysqli_num_rows($q_sch_curr) > 0)
+										if (mysqli_num_rows($q_sch_next) > 0){
+											$r_sch_next = mysqli_fetch_array($q_sch_next);
+?>
+											
+											<div class='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'>
+												<h4><?=$lng['index_festivals_schedule_next']?></h4>
+												<meta itemprop='inLanguage' content='<?=$lang?>'/>
+												<meta itemprop='name' content='<?=$r_sch_next['title']?>'/>
+												<meta itemprop='startDate' content='<?=$r_sch_next['isostart']?>'/>
+												<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'>
+													<meta itemprop='address' itemprop='name'>Vitoria-Gasteiz</meta>
+												</span>
+<?php
+												if (strlen($r_sch_curr['isoend']) > 0){
+													echo("<meta itemprop='endDate' content='$r_sch_next[isoend]'/>\n");
+												}
+?>
+												<div class='schedule_content'>
+													<span class='title'><?=$r_sch_next['title']?> - <?=$r_sch_next['st']?></span>
+<?php
+													if (strlen($r_sch_next["description"]) > 0 && $r_sch_next["description"] != $r_sch_next["title"]){
+														echo("<br/><p class='description'>$r_sch_next[description]</p>\n");
+														echo("<meta itemprclass='entry'op='description' content='$r_sch_next[description]'/>\n");
+													}
+?>
+													<table class='location'>
+														<tr>
+															<td>
+																<a target='_blank' href='http://maps.google.com/maps?q=<?=$r_sch_next[lat]?>,<?=$r_sch_next[lon]?>+(My+Point)&z=14&ll=<?=$r_sch_next[lat]?>,<?=$r_sch_next[lon]?>'>
+																	<img alt=' ' src='<?=$proto?><?=$http_host?>/img/misc/pinpoint.png'/>
+																</a>
+															</td>
+															<td>
+<?php
+																//If name and address are the same, show only name
+																if ($r_sch_next['place'] == $r_sch_next['address']){
+																	echo("$r_sch_next[place]\n");
+																}
+																else{
+																	echo("$r_sch_next[place] </br><span class='address'> $r_sch_next[address]</span>\n");
+																}
+?>
+															</td>
+														</tr>
+													</table>
+												</div> <!--.schedule_content  -->
+											</div> <!-- festival-event -->
+<?php
+										}
+?>
+										</div> <!--festivals_gm-->
+<?php
+									} // if (mysqli_num_rows($q_sch_curr) > 0 || ysqli_num_rows($q_sch_next) > 0)
+?>
+								</div> <!-- festivals_schedule_cell -->
+								<div class='festivals_schedule_cell'>
+<?php
+												
+									//City schedule
+									$q_sch_curr = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 0 AND start > NOW() - INTERVAL 45 MINUTE AND start < NOW() + INTERVAL 30 MINUTE ORDER BY start LIMIT 1;");
+									$q_sch_next = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 0 AND start > NOW() AND start < NOW() + INTERVAL 240 MINUTE ORDER BY start LIMIT 1;");
+									if (mysqli_num_rows($q_sch_curr) > 0 || mysqli_num_rows($q_sch_next) > 0){
+										echo "<div class='entry festival_schedule' id='festivals_city'>\n";
+										
+										echo "<h3 class='entry_title'>$lng[index_festivals_city_schedule]</h3>\n";
+									
+										if (mysqli_num_rows($q_sch_curr) > 0){
+											$r_sch_curr = mysqli_fetch_array($q_sch_curr);
+?>
+											<div class='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'>
+												<h4><?=$lng['index_festivals_schedule_now']?></h4>
+												<meta itemprop='inLanguage' content='<?=$lang?>'/>
+												<meta itemprop='name' content='<?=$r_sch_curr['title']?>'/>
+												<meta itemprop='startDate' content='<?=$r_sch_curr['isostart']?>'/>
+												<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'>
+													<meta itemprop='address' itemprop='name'>Vitoria-Gasteiz</meta>
+												</span>
+<?php
+												if (strlen($r_sch_curr['isoend']) > 0){
+													echo("<meta itemprop='endDate' content='$r_sch_curr[isoend]'/>\n");
+												}
+?>
+												<div class='schedule_content'>
+													<span class='title'><?=$r_sch_curr['title']?></span>
+<?php
+
+													if (strlen($r_sch_curr["description"]) > 0 && $r_sch_curr["description"] != $r_sch_curr["title"]){
+														echo("<br/><p class='description'>$r_sch_curr[description]</p>\n");
+														echo("<meta itemprop='description' content='$r_sch_curr[description]'/>\n");
+													}
+?>
+													<table class='location'>
+														<tr>
+															<td>
+																<a target='_blank' href='http://maps.google.com/maps?q=<?=$r_sch_curr[lat]?>,<?=$r_sch_curr[lon]?>+(My+Point)&z=14&ll=<?=$r_sch_curr[lat]?>,<?=$r_sch_curr[lon]?>'>
+																	<img alt=' ' src='<?=$proto?><?=$http_host?>/img/misc/pinpoint.png'/>
+																</a>
+															</td>
+															<td>
+<?php
+																//If name and address are the same, show only name
+																if ($r_sch_curr['place'] == $r_sch_curr['address']){
+																	echo("$r_sch_curr[place]\n");
+																}
+																else{
+																	echo("$r_sch_curr[place] <br/><span class='address'> $r_sch_curr[address]</span>\n");
+																}
+?>
+															</td>
+														</tr>
+													</table>
+												</div> <!--.schedule_content  -->
+											</div> <!-- festival-event -->
+<?php
+										}
+
+										
+										if (mysqli_num_rows($q_sch_next) > 0){
+											$r_sch_next = mysqli_fetch_array($q_sch_next);
+?>
+											<div class='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'>
+												<h4><?=$lng['index_festivals_schedule_next']?></h4>
+												<meta itemprop='inLanguage' content='<?=$lang?>'/>
+												<meta itemprop='name' content='<?=$r_sch_next['title']?>'/>
+												<meta itemprop='startDate' content='<?=$r_sch_next['isostart']?>'/>
+												<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'>
+													<meta itemprop='address' itemprop='name'>Vitoria-Gasteiz</meta>
+												</span>
+<?php
+												if (strlen($r_sch_curr['isoend']) > 0){
+													echo "<meta itemprop='endDate' content='$r_sch_next[isoend]'/>\n";
+												}
+?>
+												<div class='schedule_content'>
+													<span class='title'><?=$r_sch_next['title']?> - <?=$r_sch_next['st']?></span>
+<?php
+													if (strlen($r_sch_next["description"]) > 0 && $r_sch_next["description"] != $r_sch_next["title"]){
+														echo "<br/><p class='description'>$r_sch_next[description]</p>\n";
+														echo "<meta itemprop='description' content='$r_sch_next[description]'/>\n";
+													}
+?>
+													<table class='location'>
+														<tr>
+															<td>
+																<a target='_blank' href='http://maps.google.com/maps?q=<?=$r_sch_next[lat]?>,<?=$r_sch_next[lon]?>+(My+Point)&z=14&ll=<?=$r_sch_next[lat]?>,<?=$r_sch_next[lon]?>'>
+																	<img alt=' ' src='<?=$proto?><?=$http_host?>/img/misc/pinpoint.png'/>
+																</a>
+															</td>
+															<td>
+<?php
+																//If name and address are the same, show only name
+																if ($r_sch_next['place'] == $r_sch_next['address']){
+																	echo("$r_sch_next[place]\n");
+																}
+																else{
+																	echo("$r_sch_next[place] <br/><span class='address'> $r_sch_next[address]</span>\n");
+																}
+?>
+															</td>
+														</tr>
+													</table>
+												</div> <!--.schedule_content  -->
+											</div> <!-- festival-event -->
+<?php
+										}
+?>
+										</div> <!--festivals_schedule-->
+<?php
+									}
+?>
+								</div> <!-- festivals_schedule_cell -->
+							</div> <!-- festivals_schedule_row -->
+						</div> <!-- festivals_schedule_table -->
+						<a class='go_to_section' href='<?=$proto?><?=$http_host?>/lablanca/'><?=$lng['index_festivals_link']?></a>
+						<br/>
 						
-						if (mysqli_num_rows($q_sch_next) > 0){
-							$r_sch_next = mysqli_fetch_array($q_sch_next);
-							echo "<div class='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_next]</h4>\n";
-							echo "<meta itemprop='inLanguage' content='$lang'/>\n";
-							echo "<meta itemprop='name' content='$r_sch_next[title]'/>\n";
-							echo "<meta itemprop='startDate' content='$r_sch_next[isostart]'/>\n";
-							if (strlen($r_sch_curr['isoend']) > 0){
-								echo "<meta itemprop='endDate' content='$r_sch_next[isoend]'/>\n";
-							}
-							echo("<span class='hidden' itemprop='location' itemscope itemtype='http://schema.org/Place'><meta itemprop='address' itemprop='name'>Vitoria-Gasteiz</meta></span>\n");
-							echo "<span class='title'>$r_sch_next[title] - ($r_sch_next[st])\n</span>";
-							if (strlen($r_sch_next["description"]) > 0 && $r_sch_next["description"] != $r_sch_next["title"]){
-								echo "<br/><span class='description'>$r_sch_next[description]</span>\n";
-								echo "<meta itemprop='description' content='$r_sch_next[description]'/>\n";
-							}
-							echo "<table class='location'><tr>\n";
-							echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch_next[lat],$r_sch_next[lon]+(My+Point)&z=14&ll=$r_sch_next[lat],$r_sch_next[lon]'><img alt=' ' src='$proto$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
-							//If name and address are the same, show only name
-							if ($r_sch_next['place'] == $r_sch_next['address']){
-								echo "<td>$r_sch_next[place]</td></tr></table>\n";
-							}
-							else{
-								echo "<td>$r_sch_next[place] <span class='address'>- $r_sch_next[address]</span></td></tr></table>\n";
-							}
-							echo "</div\n>";
-						}
-						echo "</div></td>\n"; //close city schedule entry;
-					}
-					echo "</tr></table>\n";
-					echo "<a class='go_to_section' href='$proto$http_host/lablanca/'>$lng[index_festivals_link]</a><br/>\n";
-					echo "</div>\n";
+					</div> <!-- festivals - section-->
+<?php
 				}
 			
 				//Upcaming activity section
@@ -315,7 +426,7 @@
 					echo "<a class='go_to_section' href='$proto$http_host/actividades/'>$lng[index_upcoming_activity_see_all]</a><br/>\n";
 					echo "</div>\n";//Section
 				}
-			?>
+?>
 			<div class='section' itemscope itemtype='http://schema.org/Organization'>
 				<meta itemprop='url' content='<?php echo("$proto$http_host"); ?>'/>
 				<h3 class='section_title' itemprop='name'><?php echo($lng['index_us']); ?></h3>
@@ -330,7 +441,7 @@
 				<div class='content_row'>
 					<div class='content_cell' id='cell_posts'>
 						<div class='section' id='latest_posts'>
-							<?php
+		<?php
 								echo "<h3 class='section_title'>$lng[index_latest_posts]</h3>\n";
 								$q_post = mysqli_query($con, "SELECT id, permalink, title_$lang AS title, text_$lang AS text, dtime, DATE_FORMAT(dtime, '%Y-%m-%dT%T') AS isodate FROM post WHERE visible = 1 ORDER BY dtime DESC LIMIT 2;");
 								if (mysqli_num_rows($q_post) == 0){
@@ -365,12 +476,12 @@
 									}
 								echo "<a class='go_to_section' href='$proto$http_host/blog/'>$lng[index_see_all_posts]</a><br/>\n";
 								}
-							?>
+		?>
 						</div>
 					</div>
 					<div class='content_cell' id='cell_photos'>
 						<div class='section' id='latest_photos'>
-							<?php
+		<?php
 								echo "<h3 class='section_title'>$lng[index_latest_photos]</h3>\n";
 								$q_photos = mysqli_query($con, "SELECT id, file, title_$lang AS title, DATE_FORMAT(uploaded, '%Y-%m-%d') AS isodate FROM photo ORDER BY uploaded DESC LIMIT 6;");
 								//TODO WHERE approved = 1
@@ -399,12 +510,12 @@
 									echo "</div>\n";
 									echo "<a class='go_to_section' href='$proto$http_host/galeria/'>$lng[index_see_all_photos]</a><br/>\n";
 								}
-							?>
+		?>
 						</div>
 					</div>
 				</div>
 			</div>
-			<?php
+<?php
 				if ($upcoming_activity_shown == false){
 					$q_activity = mysqli_query($con, "SELECT id, permalink, date, DATE_FORMAT(date, '%Y-%m-%d') AS isodate, title_$lang AS title, text_$lang AS text, after_$lang AS after, price, inscription, people, max_people, city FROM activity WHERE visible = 1 ORDER BY date DESC LIMIT 2;");
 					if (mysqli_num_rows($q_activity) > 0){
@@ -455,23 +566,23 @@
 				}
 				//Festivals section (if no festivals shown on top)
 				if ($festivals == 0){
-					?>
+?>
 						<div class='section'>
 							<h3 class='section_title'><?php echo($lng['index_festivals_header']); ?></h3>
 							<div class='entry'>
-							<?php echo (cutText($lng['lablanca_no_content'] . '<br/>' . $lng['lablanca_no_content_2'], 300, "$lng[index_read_more]", "$proto$http_host/lablanca/")); ?>
+		<?php echo (cutText($lng['lablanca_no_content'] . '<br/>' . $lng['lablanca_no_content_2'], 300, "$lng[index_read_more]", "$proto$http_host/lablanca/")); ?>
 							</div>
 						</div>
-					<?php
+<?php
 				}
-			?>
+?>
 		</div>
-		<?php
+<?php
 
 			//Footer
 			include("footer.php");
 			$ad = ad($con, $lang, $lng); 
 			stats($ad, $ad_static, "index", "");
-		?>
+?>
 	</body>
 </html>

+ 64 - 46
www/lablanca/fiestas.php

@@ -1,64 +1,82 @@
 <div class='section'>
-	<h3 class='section_title'><?php echo str_replace('#', $year, $lng['lablanca_title']);?></h3>
+	<h3 class='section_title'><?=str_replace('#', $year, $lng['lablanca_title'])?></h3>
 	<div class='entry'>
-	<?php
-		//Some text for the festivals
-		$q_f = mysqli_query($con, "SELECT * FROM festival WHERE year = $year");
-		if (mysqli_num_rows($q_f) > 0){
-			$r_f = mysqli_fetch_array($q_f);
-			if (strlen($r_f['img']) > 0){
-				echo "<img id='festivals_image' src='$proto$http_host/img/festival/$r_f[img]'>\n";
-			}
-			echo $r_f["text_$lang"] . "\n";
+<?php
+	//Some text for the festivals
+	$q_f = mysqli_query($con, "SELECT * FROM festival WHERE year = $year");
+	if (mysqli_num_rows($q_f) > 0){
+		$r_f = mysqli_fetch_array($q_f);
+		if (strlen($r_f['img']) > 0){
+			echo("<div id='festivals_image_top_container'><div id='festivals_image_container'><img id='festivals_image' src='$proto$http_host/img/fiestas/preview/$r_f[img]'/></div></div><br/>\n");
 		}
-	?>
+		echo $r_f["text_$lang"] . "\n";
+	}
+?>
 	</div>
 </div>
 <div id='content_table'>
 	<div class='content_tr'>
 		<div class='content_td' id='content_td_schedule'>
 			<div class='section' id='schedule'>
-				<h3 class='section_title'><?php echo $lng['lablanca_schedule']; ?></h3>
-					<?php
-						$q_days = mysqli_query($con, "SELECT id, date, DATE_FORMAT(date, '%Y-%m-%d') AS isodate, name_$lang AS name FROM festival_day WHERE year(date) = $year ORDER BY date");
-						while ($r_days = mysqli_fetch_array($q_days)){
-							echo "<div class='entry'>\n";
-							echo "<div onClick='expandDay($r_days[id]);' class='day_title pointer'>\n";
-							echo "<h4><img class='slid' src='$proto$http_host/img/misc/slid-right.png' id='slid_day_$r_days[id]'/>\n";
-							echo formatFestivalDate($r_days['date']) . " - $r_days[name]</h4>\n";
-							echo "</div>\n";
-							echo "<div class='day_schedule' id='day_schedule_$r_days[id]'>\n";
+				<h3 class='section_title'><?=$lng['lablanca_schedule']?></h3>
+<?php
+				$q_days = mysqli_query($con, "SELECT id, date, DATE_FORMAT(date, '%Y-%m-%d') AS isodate, name_$lang AS name FROM festival_day WHERE year(date) = $year ORDER BY date");
+				while ($r_days = mysqli_fetch_array($q_days)){
+?>
+					<div class='entry'>
+						<div onClick='expandDay(<?=$r_days['id']?>);' class='day_title pointer'>
+							<h4>
+								<img class='slid' src='<?=$server?>/img/misc/slid-right.png' id='slid_day_<?=$r_days['id']?>'/>
+								<?=formatFestivalDate($r_days['date'])?> - <?=$r_days['name']?>
+							</h4>
+						</div>
+						<div class='day_schedule' id='day_schedule_<?=$r_days['id']?>'>
+<?php
 							$q_sch = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > str_to_date(addtime('$r_days[isodate] 00:00:00', '08:00:00'), '%Y-%m-%d %T') AND start < str_to_date(addtime('$r_days[isodate] 00:00:00', '32:00:00'), '%Y-%m-%d %T') ORDER BY start;");
 							if (mysqli_num_rows($q_sch) > 0){
-								echo "<table class='schedule'>\n";
+								echo("<table class='schedule'>\n");
 								while ($r_sch = mysqli_fetch_array($q_sch)){
-									echo "<tr><td><span class='time'>$r_sch[st]</span></td><td class='timeline'><img class='timeline_dot' alt=' ' src='$proto$http_host/img/misc/schedule-point.png'/></td>\n";
-									echo "<td><span class='title'>$r_sch[title]\n";
-									//if (strlen($r_sch['end']) > 0){
-									//	echo " ($r_sch[st] - $r_sch[end])\n";
-									//}
-									echo "</span>\n";
-									if (strlen($r_sch["description"]) > 0 && $r_sch["description"] != $r_sch["title"]){
-										echo "<br/><span class='description'>$r_sch[description]</span>\n";
-									}
-									echo "<table class='location'><tr>\n";
-									//TODO: td for image, if any
-									echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch[lat],$r_sch[lon]+(My+Point)&z=14&ll=$r_sch[lat],$r_sch[lon]'><img alt=' ' src='$proto$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
-									//If name and address are the same, show only name
-									if ($r_sch['place'] == $r_sch['address']){
-										echo "<td>$r_sch[place]</td></tr></table>\n";
-									}
-									else{
-										echo "<td>$r_sch[place] <span class='address'>- $r_sch[address]</span></td></tr></table>\n";
-									}
-									echo "</td></tr>\n";
+?>
+									<tr>
+										<td>
+											<span class='time'><?=$r_sch['st']?></span>
+										</td>
+										<td class='timeline'>
+											<img class='timeline_dot' alt=' ' src='<?=$server?>/img/misc/schedule-point.png'/>
+										</td>
+										<td>
+											<span class='title'><?=$r_sch['title']?></span>
+<?php
+											if (strlen($r_sch["description"]) > 0 && $r_sch["description"] != $r_sch["title"]){
+												echo("<br/><div class='description'>$r_sch[description]</div>\n");
+											}
+?>
+											<div class='location'>
+												<a target='_blank' href='http://maps.google.com/maps?q=<?=$r_sch['lat']?>,<?=$r_sch['lon']?>+(My+Point)&z=14&ll=<?=$r_sch['lat']?>,<?=$r_sch['lon']?>'>
+													<img alt=' ' src='<?=$server?>/img/misc/pinpoint.png'/>
+<?php
+													//If name and address are the same, show only name
+													if ($r_sch['place'] == $r_sch['address']){
+														echo("$r_sch[place]\n");
+													}
+													else{
+														echo("$r_sch[place] <span class='address'>- $r_sch[address]</span>\n");
+													}
+?>
+												</a>
+											</div>
+										</td>
+									</tr>
+<?php
 								}
 								echo "</table>\n";
 							}
-							echo "</div>\n";
-							echo "</div>\n";
-						}
-					?>
+?>
+						</div>
+					</div>
+<?php
+				} // while ($r_days = mysqli_fetch_array($q_days))
+?>
 			</div>
 		</div>
 		<div class='content_td' id='content_td_prices'>

+ 2 - 0
www/lablanca/index.php

@@ -3,6 +3,8 @@
 	include("../functions.php");
 	$con = startdb();
 	$proto = getProtocol();
+	$http_host = $_SERVER['HTTP_HOST'];
+	$server = "$proto" . "$http_host";
 	
 	//Language
 	$lang = selectLanguage();

+ 3 - 1
www/lang/lang_en.php

@@ -215,7 +215,9 @@
 	$lng['help_privacy'] = 'Navegar por internet hoy en d&iacute; se ha vuelto algo complicado, en lo que aprivacidad se refiere: practicamente cada p&aacute;gina que visitamos intenta obtener todos los datos posibles sobre nosotros para utilizarlos en marketing, data mining...<br/> <br/>En Gasteizko Margolariak queremos construir un sitio limpio y seguro, en el que nuestros visitantes puedan estar a gusto.<br/><br/> Por eso, queremos explicarte toda la informaci&oacute;n que recogemos sobre t&iacute; y lo que hacemos con ello.<br/><ul><li><span style="font-weight:bold;">Direcci&oacute; IP</span>: Cuando nos visitas, almacenamos tu direcci&oacute;n IP, junto con la hora de conexi&oacute;. Esto no nos permite identificarte como persona, pero nos es muy &uacute;til para saber cuantas personas distintas nos visitan.</li><li><span style="font-weight:bold;">Fotograf&iacute;as y comentarios</span>: Cuanquier visitante puede subir fotograf&iacute;as a esta web o comentar en la mayor&iacute;a de entradas. Para hacerlo, solo requerimos un nombre, y no tenemos ningun problema en que uses pseud&oacute;nimos o nombres falsos. Cuando comentes o subas im&aacute;genes tambi&eacute;n registramos tu direcci&oacute;n IP.</li><li><span style="font-weight:bold;">Datos de los socios</span>: Independientemente de los datos recogidos por este sitio web, en Gasteizko Margolariak mantenemos una base de datos sobre las personas que alguna vez han participado en alguna actividad con nosotros. Si es tu caso, y quieres que los eliminemos, no tiene m&aacute;s que escribirnos a <a target="_blank" href="mailto:gasteizkomargolariak@gmail.com">gasteizkomargolariak@gmail.com</a>. Sin rencores.';
 	$lng['help_cookie_title'] = 'Pol&iacute;tca de cookies';
 	$lng['help_cookie'] = '¡Cookies! Est&aacute;n por todas partes. Sabemos que nadie suele leerse estos avisos sobre ellas, as&iacute; que ya que estas leyendo este, vamos a intentar hacerlo f&aacute;cil.<br/><br/>Una cookie es un peque&ntilde;o archivo de texto que puede quedar guardado en tu ordenador cuando visitas una web. Estos archivos son benignos, en el sentido de que no afectan al funcionamiento de tu ordenador, pero pueden ser utiles para los desarrolladores de p&aacute;ginas web para diversas cosas, como recordar tus preferencias entre visitas (como en nuestro caso) o identificarte y trazar tus movimientos por Internet (no es nuestro caso).<br/><br/>Aprovechando que aqu&iacute; utilizamos verdaderamente pocas, te contamos para que.<br/><ul><li><span style="font-weight:bold;">Idioma</span>: Utilizamos una cookie para recordar el idioma en el que quieres ver la p&aacute;gina. Si la estas viendo en castellano, el &uacute;nico texto que contendr&aacute; sera &quot;es&quot;. Bastante inofensivo, ¿verdad?</li><li><span style="font-weight:bold;">Aviso de cookies</span>: Ir&oacute;nicamente, tenemos que usar una cookie para evitar que el aviso sobre cookies que estamos obligados a mostrarte cuando nos visitas por primera vez te moleste solo esa primera vez. Esta es mas simple aun que la anterior, y es una cookie vacia, sin ningun tipo de texto.</li><li><span style="font-weight:bold;">Cookies de Google</span>: Esto tiene m&aacute;s miga. Durante las fiestas de Vitoria, esta p&aacute;gina muestra mapas de Google. Es posible (y casi seguro) que estos mapas inserten cookies propias sobre las que no tenemos ning&uacute;n control. Sorry.</li></ul>';
-	
+	$lng['help_ad_title'] = 'Advertisment policy';
+	$lng['help_ad'] = 'TODO';
+
 	//Ads
 	$lng['ad_title'] = 'Advertisment';
 	

+ 2 - 0
www/lang/lang_es.php

@@ -215,6 +215,8 @@
 	$lng['help_privacy'] = 'Navegar por Internet hoy en d&iacute;a se ha vuelto algo complicado, en lo que a privacidad se refiere: practicamente cada p&aacute;gina que visitamos intenta obtener todos los datos posibles sobre nosotros para utilizarlos en marketing, data mining...<br/> <br/>En Gasteizko Margolariak queremos construir un sitio limpio y seguro, en el que nuestros visitantes puedan estar a gusto.<br/><br/> Por eso, queremos explicarte toda la informaci&oacute;n que recogemos sobre t&iacute; y lo que hacemos con ella.<br/><ul><li><span style="font-weight:bold;">Direcci&oacute;n IP</span>: Cuando nos visitas, almacenamos tu direcci&oacute;n IP, junto con la hora de conexi&oacute;n. Esto no nos permite identificarte como persona, pero nos es muy &uacute;til para saber cuantas personas distintas nos visitan.</li><li><span style="font-weight:bold;">Fotograf&iacute;as y comentarios</span>: Cuanquier visitante puede subir fotograf&iacute;as a esta web o comentar en la mayor&iacute;a de entradas. Para hacerlo, solo requerimos un nombre, y no tenemos ningun problema en que uses pseud&oacute;nimos o nombres falsos. Cuando comentes o subas im&aacute;genes tambi&eacute;n registramos tu direcci&oacute;n IP.</li><li><span style="font-weight:bold;">Datos de los socios</span>: Independientemente de los datos recogidos por este sitio web, en Gasteizko Margolariak mantenemos una base de datos sobre las personas que alguna vez han participado en alguna actividad con nosotros. Si es tu caso, y quieres que los eliminemos, no tiene m&aacute;s que escribirnos a <a target="_blank" href="mailto:gasteizkomargolariak@gmail.com">gasteizkomargolariak@gmail.com</a>. Sin rencores.';
 	$lng['help_cookie_title'] = 'Pol&iacute;tica de cookies';
 	$lng['help_cookie'] = '¡Cookies! Est&aacute;n por todas partes. Sabemos que nadie suele leerse estos avisos sobre ellas, as&iacute; que ya que estas leyendo este, vamos a intentar hacerlo f&aacute;cil.<br/><br/>Una cookie es un peque&ntilde;o archivo de texto que puede quedar guardado en tu ordenador cuando visitas una web. Estos archivos son benignos, en el sentido de que no afectan al funcionamiento de tu ordenador, pero pueden ser utiles para los desarrolladores de p&aacute;ginas web para diversas cosas, como recordar tus preferencias entre visitas (como en nuestro caso) o identificarte y trazar tus movimientos por Internet (no es nuestro caso).<br/><br/>Aprovechando que aqu&iacute; utilizamos verdaderamente pocas, te contamos para qu&eacute;.<br/><ul><li><span style="font-weight:bold;">Idioma</span>: Utilizamos una cookie para recordar el idioma en el que quieres ver la p&aacute;gina. Si la estas viendo en castellano, el &uacute;nico texto que contendr&aacute; sera &quot;es&quot;. Bastante inofensivo, ¿verdad?</li><li><span style="font-weight:bold;">Aviso de cookies</span>: Ir&oacute;nicamente, tenemos que usar una cookie para evitar que el aviso sobre cookies que estamos obligados a mostrarte cuando nos visitas por primera vez te moleste solo esa primera vez. Esta es m&aacute;s simple a&uacute;n que la anterior: es una cookie vac&iacute;a, sin ning&uacute;n tipo de texto.</li><li><span style="font-weight:bold;">Cookies de Google</span>: Esto tiene m&aacute;s miga. Durante las fiestas de Vitoria, esta p&aacute;gina muestra mapas de Google. Es posible (y casi seguro) que estos mapas inserten cookies propias sobre las que no tenemos ning&uacute;n control. Sorry.</li></ul>';
+	$lng['help_ad_title'] = 'Pol&iacute;tica de anuncios';
+	$lng['help_ad'] = 'En esta p&aacute encontrar&aacute;s anuncios. Son un poco diferentes de los que seguramente est&eacute;s acostumbrado a ver por Internet, y esperamos que no te resulten tan molestos como suelen serlo.<br/><ul><li>No ofrecemos un espacio de publicidad que cualquier empresa puede alquilar. Nuestros anuncios son de empresas y organizaciones que conocemos, con las que trabajamos, y de cuya calidad y fiabilidad podemos responder. Los anuncios los dise&ntilde;amos uno a uno entre la empresa y nosotros. De esta forma, podemos estar seguros de de mostrar una publicidad honesta y segura.<br/></li><li>Garantizamos que al hacer click en la publicidad de este sitio, ser&aacute;s redireccionado a la p&aacute;gina oficial de la empresa anunciada. Si la empresa no tuviera una web propia, accederias a una p&aacute;gina segura con informaci&oacute; de la misma. Nosotros mismos configuramos los enlaces y comprobamos que sean v&aacute;lidos y seguros.<br/></li><li>No queremos ser pesados, as&iacute; que no te ense&ntilde;aremos m&aacute;s de un anuncio cada vez que entres en la p&aacute;gina. Si en alg&uacute;n momento quieres saber m&aacute;s sobre nuestros patrocinadores, tienes una lista al final de la p&aacute;gina.<br/></li><li>No tenemos ingresos por publicidad. No recibimos dinero cada vez que ves o haces click en un anuncio. Si ves anunciada una empresa en esta p&aacute;gina, es por que ha colaborado con nosotros de alguna manera, como ayudando a organizar alguna actividad, cediendo material... Por eso, puedes estar seguro de que est&aacute;s viendo el anuncio de una empresa que ofrece productos que conocemos y por los que apostamos.<br/></li><li>No te rastreamos. Sabemos cuantas veces se ha visto un anuncio y cuantas veces se ha hecho click sobre el, pero no sabemos ni cuando, ni qui&eacute;n. No guardamos (ni, por supuesto, enviamos a nadie) ningun tipo de informaci&oacute;n personal relacionada con la publicidad.<br/></li></ul><br/>';
 	
 	//Ads
 	$lng['ad_title'] = 'Publicidad';

+ 2 - 0
www/lang/lang_eu.php

@@ -215,6 +215,8 @@
 	$lng['help_privacy'] = 'Navegar por internet hoy en d&iacute; se ha vuelto algo complicado, en lo que aprivacidad se refiere: practicamente cada p&aacute;gina que visitamos intenta obtener todos los datos posibles sobre nosotros para utilizarlos en marketing, data mining...<br/> <br/>En Gasteizko Margolariak queremos construir un sitio limpio y seguro, en el que nuestros visitantes puedan estar a gusto.<br/><br/> Por eso, queremos explicarte toda la informaci&oacute;n que recogemos sobre t&iacute; y lo que hacemos con ello.<br/><ul><li><span style="font-weight:bold;">Direcci&oacute; IP</span>: Cuando nos visitas, almacenamos tu direcci&oacute;n IP, junto con la hora de conexi&oacute;. Esto no nos permite identificarte como persona, pero nos es muy &uacute;til para saber cuantas personas distintas nos visitan.</li><li><span style="font-weight:bold;">Fotograf&iacute;as y comentarios</span>: Cuanquier visitante puede subir fotograf&iacute;as a esta web o comentar en la mayor&iacute;a de entradas. Para hacerlo, solo requerimos un nombre, y no tenemos ningun problema en que uses pseud&oacute;nimos o nombres falsos. Cuando comentes o subas im&aacute;genes tambi&eacute;n registramos tu direcci&oacute;n IP.</li><li><span style="font-weight:bold;">Datos de los socios</span>: Independientemente de los datos recogidos por este sitio web, en Gasteizko Margolariak mantenemos una base de datos sobre las personas que alguna vez han participado en alguna actividad con nosotros. Si es tu caso, y quieres que los eliminemos, no tiene m&aacute;s que escribirnos a <a target="_blank" href="mailto:gasteizkomargolariak@gmail.com">gasteizkomargolariak@gmail.com</a>. Sin rencores.';
 	$lng['help_cookie_title'] = 'Cookie politika';
 	$lng['help_cookie'] = '¡Cookies! Est&aacute;n por todas partes. Sabemos que nadie suele leerse estos avisos sobre ellas, as&iacute; que ya que estas leyendo este, vamos a intentar hacerlo f&aacute;cil.<br/><br/>Una cookie es un peque&ntilde;o archivo de texto que puede quedar guardado en tu ordenador cuando visitas una web. Estos archivos son benignos, en el sentido de que no afectan al funcionamiento de tu ordenador, pero pueden ser utiles para los desarrolladores de p&aacute;ginas web para diversas cosas, como recordar tus preferencias entre visitas (como en nuestro caso) o identificarte y trazar tus movimientos por Internet (no es nuestro caso).<br/><br/>Aprovechando que aqu&iacute; utilizamos verdaderamente pocas, te contamos para que.<br/><ul><li><span style="font-weight:bold;">Idioma</span>: Utilizamos una cookie para recordar el idioma en el que quieres ver la p&aacute;gina. Si la estas viendo en castellano, el &uacute;nico texto que contendr&aacute; sera &quot;es&quot;. Bastante inofensivo, ¿verdad?</li><li><span style="font-weight:bold;">Aviso de cookies</span>: Ir&oacute;nicamente, tenemos que usar una cookie para evitar que el aviso sobre cookies que estamos obligados a mostrarte cuando nos visitas por primera vez te moleste solo esa primera vez. Esta es mas simple aun que la anterior, y es una cookie vacia, sin ningun tipo de texto.</li><li><span style="font-weight:bold;">Cookies de Google</span>: Esto tiene m&aacute;s miga. Durante las fiestas de Vitoria, esta p&aacute;gina muestra mapas de Google. Es posible (y casi seguro) que estos mapas inserten cookies propias sobre las que no tenemos ning&uacute;n control. Sorry.</li></ul>';
+	$lng['help_ad_title'] = 'Pol^iacute;tica de anuncios';
+	$lng['help_ad'] = 'TODO';
 	
 	//Ads
 	$lng['ad_title'] = 'Publizitatea';