Browse Source

Merge branch 'Internal'

seavenois 9 years ago
parent
commit
f8f2da4b4c

+ 1 - 1
www-admin/actividades/add/add.php

@@ -121,7 +121,7 @@
 		
 		//Insert into database and get id
 		mysqli_query($con, "INSERT INTO activity (permalink, date, title_es, title_eu, title_en, text_es, text_eu, text_en, price, inscription, max_people, user, visible, comments, city) VALUES('$permalink', $date, '$title_es', '$title_eu', '$title_en', '$text_es', '$text_eu', '$text_en', $price, $inscription, $people, $user, $visible, $comments, '$city');");
-		$q = mysqli_query($con, "SELECT id FROM activity WHERE permalink = '$permalink' ORDER BY time DESC LIMIT 1;");
+		$q = mysqli_query($con, "SELECT id FROM activity WHERE permalink = '$permalink' ORDER BY dtime DESC LIMIT 1;");
 		$r = mysqli_fetch_array($q);
 		$id = $r['id'];
 		

+ 47 - 32
www-admin/actividades/add/index.php

@@ -27,33 +27,46 @@
 		<?php include('../../toolbar.php'); ?>
 		<div id='content'>
 			<div class="section">
-				<h3>Nueva actividad</h3>
-				<form action="add.php" maxlength="120" method="post" enctype="multipart/form-data" onsubmit="return validateActivity();">
-					<span class="tab_selector pointer" id="tab_selector_es" onClick="showTab('es');">Castellano</span>
-					<span class="tab_selector tab_selector_hidden pointer" id="tab_selector_eu" onClick="showTab('eu');">Euskera</span>
-					<span class="tab_selector tab_selector_hidden pointer" id="tab_selector_en" onClick="showTab('en');">Ingles</span>
-					<br/>
-					<div class="section tab_content" id="tab_content_es">
-						<input type="text" id="title_es" name="title_es" placeholder="Titulo (castellano)"/><br/><br/>
-						<textarea name="text_es" id="text_es" placeholder="Texto (castellano)"></textarea>
-						<script>
-							CKEDITOR.replace('text_es');
-						</script>
-					</div>
-					<div class="section tab_content section tab_content_hidden" id="tab_content_eu">
-						<input type="text" id="title_eu" name="title_eu" placeholder="Titulo (euskera)"/><br/><br/>
-						<textarea name="text_eu" id="text_eu" placeholder="Texto (euskera)"></textarea>
-						<script>
-							CKEDITOR.replace('text_eu');
-						</script>
-					</div>
-					<div class="section tab_content section tab_content_hidden" id="tab_content_en">
-						<input type="text" id="title_en" name="title_en" placeholder="Titulo (ingles)"/><br/><br/>
-						<textarea name="text_en" id="text_en" placeholder="Texto (ingles)"></textarea>
-						<script>
-							CKEDITOR.replace('text_en');
-						</script>
-					</div>
+				<h3 class="section_title">Nueva actividad</h3>
+				<form action="/actividades/add/add.php" maxlength="120" method="post" enctype="multipart/form-data" onsubmit="return validateActivity();">
+					<div class="entry">
+						<div id="lang_tabs">
+							<table>
+								<tr>
+									<td class="pointer lang_tabs_active" id="lang_tab_es" onclick="showLanguage('es');">
+										Castellano
+									</td>
+									<td class="pointer" id="lang_tab_eu" onclick="showLanguage('eu');">
+										Euskera
+									</td>
+									<td class="pointer" id="lang_tab_en" onclick="showLanguage('en');">
+										Ingl&eacute;s
+									</td>
+								</tr>
+							</table>
+						</div>
+						<div id="content_lang_es">
+							<input type="text" id="title_es" name="title_es" placeholder="Titulo"/><br/><br/>
+							<textarea name="text_es" id="text_es" placeholder="Texto"></textarea>
+							<script>
+								CKEDITOR.replace('text_es');
+							</script>
+						</div>
+						<div id="content_lang_eu" style="display:none;">
+							<input type="text" id="title_eu" name="title_eu" placeholder="Titulu"/><br/><br/>
+							<textarea name="text_eu" id="text_eu" placeholder="Textua"></textarea>
+							<script>
+								CKEDITOR.replace('text_eu');
+							</script>
+						</div>
+						<div id="content_lang_en" style="display:none;">
+							<input type="text" id="title_en" name="title_en" placeholder="Title"/><br/><br/>
+							<textarea name="text_en" id="text_en" placeholder="Content"></textarea>
+							<script>
+								CKEDITOR.replace('text_en');
+							</script>
+						</div>
+					</div> <!--Entry-->
 					<div class="entry" id="activity_images">
 						<h4>Detalles</h4>
 						Ciudad:<input type="text" name="city" length="30" value="Vitoria-Gasteiz"/><br/><br/>
@@ -66,9 +79,8 @@
 						<input type="text" length="2" name="minute" placeholder="mm"/>-->
 						<br/><br/>Precio (en blanco si es gratuita):
 						<input type="text" length="4" name="price" placeholder="eur"/>
-						<br/><label><input type="checkbox" name="inscription" checked/>Se requiere inscripcion</label>
-						<br/>Numero de plazas (en blanco para ilimitadas): <input type="text" length="4" name="people" placeholder="#"/>
-						
+						<br/><br/><label><input type="checkbox" name="inscription" checked/>Se requiere inscripcion</label>
+						<br/><br/>Numero de plazas (en blanco para ilimitadas): <input type="text" length="4" name="people" placeholder="#"/>
 						
 						<h4>Imagenes</h4>
 						<ul>
@@ -104,8 +116,11 @@
 						<label><input type="checkbox" name="comments" checked/>Permitir comentarios</label><br/><br/>
 						<label><input type="checkbox" name="admin"/>Publicar como Gasteizko Margolariak en lugar de mi nombre</label>
 						<br/><br/><br/><br/>
-						<input type="button" value="Previsualizar" onClick="alert(validateActivity());"/> <!--TODO-->
-						<input type="submit" value="Publicar"/>
+						<div id="button_container">
+							<input type="button" value="Previsualizar" onClick="alert(validateActivity());"/> <!--TODO-->
+							</br>
+							<input type="submit" value="Publicar"/>
+						</div>
 					</div>
 				</form>
 			</div>

+ 65 - 42
www-admin/actividades/add/itinerary.php

@@ -37,50 +37,73 @@
 		<?php include('../../toolbar.php'); ?>
 		<div id='content'>
 			<div class='section'>
+				<h3 class="section_title">Modificar itinerario</h3>
 				<form action='additinerary.php' method='post'>
-					<input type='hidden' name='activity' value='<?php echo $id; ?>'/>
-					<table id='itinerary'>
-					<?php
-						$q_place = mysqli_query($con, "SELECT id, name_es FROM place ORDER BY name_es;");
-						$i = 0;
-						for ($i = 0; $i < 50; $i ++){
-							echo "<tr id='itinerary_row_$i' class='itinerary_row'>\n";
-							echo "<td class='itinerary_cell time'>\n";
-							echo "<h4>Hora y lugar</h4><table>\n";
-							echo "<tr><td>Inicio*</td><td><input type='number' maxlength='2' name='sh_$i' id='sh_$i' onChange='showNextRow($i);'/></td><td>: <input type='number' maxlength='2' name='sm_$i' id='sm_$i' onChange='showNextRow($i);'/><td/></tr>\n";
-							echo "<tr><td>Final</td><td><input type='number' maxlength='2' name='eh_$i' id='eh_$i' onChange='showNextRow($i);'/></td><td>: <input type='number' maxlength='2' name='em_$i' id='em_$i' onChange='showNextRow($i);'/><td/></tr>\n";
-							echo "</table>\n";
-							echo "Lugar*: <select name='place_$i' id='place_$i' onChange='showNextRow($i);'>\n";
-							echo "<option value='-1'>SELECCIONA</option>\n";
-							mysqli_data_seek($q_place, 0);
-							while ($r_place = mysqli_fetch_array($q_place)){
-								echo "<option value='$r_place[id]'>$r_place[name_es]</option>\n";
+					<div class="entry">
+						<input type='hidden' name='activity' value='<?php echo $id; ?>'/>
+						<table id='itinerary'>
+						<?php
+							$q_place = mysqli_query($con, "SELECT id, name_es FROM place ORDER BY name_es;");
+							$i = 0;
+							for ($i = 0; $i < 50; $i ++){
+								echo "<tr id='itinerary_row_$i' class='itinerary_row'>\n";
+								echo "<td class='itinerary_cell time'>\n";
+								echo "<h4>Hora y lugar</h4>\n";
+								echo "Inicio*:&nbsp<input type='number' maxlength='2' name='sh_$i' id='sh_$i' onChange='showNextRow($i);'/>:<input type='number' maxlength='2' name='sm_$i' id='sm_$i' onChange='showNextRow($i);'/>\n";
+								echo "<br/>Final:&nbsp<input type='number' maxlength='2' name='eh_$i' id='eh_$i' onChange='showNextRow($i);'/>:<input type='number' maxlength='2' name='em_$i' id='em_$i' onChange='showNextRow($i);'/>\n";
+								echo "<br/><br/>\n";
+								echo "Lugar*: <select name='place_$i' id='place_$i' onChange='showNextRow($i);'>\n";
+								echo "<option value='-1'>SELECCIONA</option>\n";
+								mysqli_data_seek($q_place, 0);
+								while ($r_place = mysqli_fetch_array($q_place)){
+									echo "<option value='$r_place[id]'>$r_place[name_es]</option>\n";
+								}
+								echo "</select><br/>\n";
+								echo "<span id='add_place' class='pointer' onClick='addPlace($i);'>A&ntilde;adir nuevo lugar</span>\n";
+								echo "</td>\n";
+								echo "<td class='itinerary_cell itinerary_cell_content'>\n";
+							?>
+							<div id='lang_tabs'>
+	                                                        <table>
+               		                                                <tr>
+                               		                                        <td class="pointer lang_tabs_active" id="lang_tab_es" onclick="showLanguage('es');">
+                                               		                                Castellano
+                                                               		        </td>
+	                                                                        <td class="pointer" id="lang_tab_eu" onclick="showLanguage('eu');">
+               		                                                                Euskera
+                               		                                        </td>
+                                               		                        <td class="pointer" id="lang_tab_en" onclick="showLanguage('en');">
+                                                               		                Ingl&eacute;s
+                                                                       		</td>
+                       			                                 </tr>
+                                               		        </table>
+		                                                </div>
+	               		                                <div id="content_lang_es">
+									<h4>T&iacute;tulo</h4>
+									<input type='text' name='title_es_<?php echo($i); ?>' id='title_es_<?php echo($i); ?>' onKeyUp='showNextRow(<?php echo($i); ?>'/>
+									<h4>Texto</h4>
+									<textarea name='text_es_<?php echo($i); ?>' id='text_es_<?php echo($i); ?>' onKeyUp='showNextRow(<?php echo($i); ?>);'/></textarea>
+								</div>
+								<div id="content_lang_eu" style="display:none;">
+                                                                        <h4>Titulo</h4>
+                                                                        <input type='text' name='title_eu_<?php echo($i); ?>' id='title_eu_<?php echo($i); ?>' onKeyUp='showNextRow(<?php echo($i); ?>'/>
+                                                                        <h4>Textua</h4>
+                                                                        <textarea name='text_eu_<?php echo($i); ?>' id='text_eu_<?php echo($i); ?>' onKeyUp='showNextRow(<?php echo($i); ?>);'/></textarea>
+                                                                </div>
+								<div id="content_lang_en" style="display:none;">
+                                                                        <h4>Title</h4>
+                                                                        <input type='text' name='title_en_<?php echo($i); ?>' id='title_en_<?php echo($i); ?>' onKeyUp='showNextRow(<?php echo($i); ?>'/>
+                                                                        <h4>Content</h4>
+                                                                        <textarea name='text_en_<?php echo($i); ?>' id='text_en_<?php echo($i); ?>' onKeyUp='showNextRow(<?php echo($i); ?>);'/></textarea>
+                                                                </div>
+								<?php
+									echo("</td>\n");
+									echo("</tr>\n");
 							}
-							echo "</select><br/>\n";
-							echo "<span id='add_place' class='pointer' onClick='addPlace($i);'>A&ntilde;adir nuevo lugar</span>\n";
-							
-							echo "</td>\n";
-							echo "<td class='itinerary_cell title'>\n";
-							echo "<h4>T&iacute;tulo</h4><table>\n";
-							echo "<tr><td>Castellano*</td><td><input type='text' name='title_es_$i' id='title_es_$i' onKeyUp='showNextRow($i);'/></td></tr>\n";
-							echo "<tr><td>Ingl&eacute;s</td><td><input type='text' name='title_en_$i' id='title_en_$i' onKeyUp='showNextRow($i);'/></td></tr>\n";
-							echo "<tr><td>Euskera</td><td><input type='text' name='title_eu_$i' id='title_eu_$i' onKeyUp='showNextRow($i);'/></td></tr>\n";
-							echo "</table>\n";
-							echo "</td>\n";
-							echo "<td class='itinerary_cell text'>\n";
-							echo "<h4>Texto castellano*</h4><textarea name='text_es_$i' id='text_es_$i' onKeyUp='showNextRow($i);'/></textarea>\n";
-							echo "</td>\n";
-							echo "<td class='itinerary_cell text'>\n";
-							echo "<h4>Texto ingl&eacute;s</h4><textarea name='text_en_$i' id='text_en_$i' onKeyUp='showNextRow($i);'/></textarea>\n";
-							echo "</td>\n";
-							echo "<td class='itinerary_cell text'>\n";
-							echo "<h4>Texto euskera</h4><textarea name='text_eu_$i' id='text_eu_$i' onKeyUp='showNextRow($i);'/></textarea>\n";
-							echo "</td>\n";
-							echo "</tr>\n";
-						}
-					?>
-				</table>
-				<input type='submit' value='Guardar'/>
+						?>
+					</table>
+					<input type='submit' id="save_itinerary"  value='Guardar'/>
+				</div> <!--Entry-->
 			</form>
 		</div>
 	</body>

+ 20 - 7
www-admin/actividades/index.php

@@ -27,7 +27,7 @@
 		<?php include('../toolbar.php'); ?>
 		<div id='content'>
 			<div class="section">
-				<h3>Actividades - <a href="/actividades/add/">Anadir nueva</a></h3>
+				<h3 class="section_title">Actividades - <a href="/actividades/add/">Anadir nueva</a></h3>
 				<div class="entry">
 					<table id='activity_list'>
 						<tr>
@@ -40,8 +40,10 @@
 						<?php
 							$q = mysqli_query($con, "SELECT id, DATE_FORMAT(date, '%b %d, %Y') AS dat, title_es, title_eu, title_en, text_es, text_eu, text_en, user, visible, comments, DATE_FORMAT(dtime, '%b %d, %Y %H:%i:%s') AS ptime FROM activity ORDER BY date DESC;");
 							while ($r = mysqli_fetch_array($q)){
-								echo "<tr>\n<td class='activity_column_title'>" . cutText($r['title_es'], 35, '', '') . "<br/>$r[dat]</td>\n<td class='activity_column_text'>" . cutText($r['text_es'], 80, '', '') . "\n";
+								echo "<tr>\n<td class='activity_column_title'>" . cutText($r['title_es'], 35, '', '') . "<br/>$r[dat]</td>";
+								echo "<td class='activity_column_text'>" . str_replace('<br/>', ' ', cutText($r['text_es'], 60, '', '')) . "\n";
 								
+								//Images
 								$q_image = mysqli_query($con, "SELECT image FROM activity_image WHERE activity = $r[id] ORDER BY idx;");
 								if (mysqli_num_rows($q_image) > 0){
 									echo "<br/>";
@@ -49,11 +51,23 @@
 										echo "<img src='http://$default_host/img/actividades/miniature/$r_image[image]'\>\n";
 								}
 								
+								//Itinerary
+								$q_itinerary = mysqli_query($con, "SELECT count(id) AS count FROM activity_itinerary WHERE activity = $r[id]");
+								$r_itinerary = mysqli_fetch_array($q_itinerary);
+								if ($r_itinerary['count'] == 0){
+									echo("<ul><li>Sin itinerario.</li></ul>");
+								}
+								elseif ($r_itinerary['count'] == 1){
+									echo("<ul><li>1 entrada de itinerario.</li></ul>");
+								}
+								else{
+									echo("<ul><li>$r_itinerary[count] entradas de itinerario.</li></ul>");
+								}
+								
 								echo "</td>\n";
 								$q_user = mysqli_query($con, "SELECT username FROM user WHERE id = $r[user];");
 								$r_user = mysqli_fetch_array($q_user);
 								echo "<td class='activity_column_details'>$r[ptime]<br/>Por $r_user[username]<br/>Comentarios:";
-								// TODO: itinerary?
 								if ($r['comments'] == 1){
 									$q_comments = mysqli_query($con, "SELECT id FROM activity_comment WHERE activity = $r[id];");
 									echo "Si (" . mysqli_num_rows($q_comments) . ")";
@@ -61,7 +75,7 @@
 								else
 									echo "No";
 								echo "<br/>Visible: ";
-								if ($row['visible'] == 1)
+								if ($r['visible'] == 1)
 									echo "Si";
 								else
 									echo "No";
@@ -70,14 +84,13 @@
 									echo "No";
 								else
 									echo "Si";
-								echo "<br/>Ingles: ";
+								echo "<br/>Ingl&eacute;s: ";
 									if (strlen($r['text_en']) == 0 || $r['text_en'] == $r['text_es'])
 									echo "No";
 								else
 									echo "Si";
-								echo "\n</td>\n<td class='activity_column_action'>\n<form action='/activity/edit/edit.php?p=$r[id]'>\n<input type='submit' value='Editar'/>\n</form>\n";
+								echo "\n</td>\n<td class='activity_column_action'>\n<form action='/activity/edit/edit.php?p=$r[id]'>\n<input type='submit' value='Editar / Traducir'/>\n</form>\n";
 								echo "<input type='button' onClick='delete_activity($r[id], \"$r[title_es]\");' value='Borrar'/>";
-								echo "<form action='/activity/translate/translate.php'>\n<input type='hidden' name='id' value='$r[id]'/><input type='submit' value='Traducir'/>\n</form>";
 								echo "<form action='/activity/moderate/moderate.php?p=$r[id]'>\n<input type='submit' value='Moderar comentarios'/>\n</form>";
 								echo "</td>\n</tr>";
 							}

+ 8 - 1
www-admin/actividades/moderate/index.php

@@ -11,7 +11,7 @@
 	<head>
 		<meta content="text/html; charset=windows-1252" http-equiv="content-type"/>
 		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
-		<title>Nuevo post - Administracion</title>
+		<title>Moderar comentarios - Administracion</title>
 		<!-- CSS files -->
 		<link rel="stylesheet" type="text/css" href="/css/ui.css"/>
 		<link rel="stylesheet" type="text/css" href="/css/blog.css"/>
@@ -23,6 +23,13 @@
 		<script type="text/javascript" src="/script/ui.js"></script>
 	</head>
 	<body>
+		<?php include('../../toolbar.php'); ?>
+                <div id='content'>
+                        <div class="section">
+                                <h3 class="section_title">Moderar comentarios</h3>
+                                <h4 span class="TODO">En construcci&oacute;n</h4>
+                        </div>
+                </div>
 	</body>
 </html>
 

+ 45 - 28
www-admin/blog/add/index.php

@@ -28,34 +28,48 @@
 		<?php include('../../toolbar.php'); ?>
 		<div id='content'>
 			<div class="section">
-				<h3>Nuevo post</h3>
+				<h3 class="section_title">Nuevo post</h3>
 				<form action="add.php" maxlength="120" method="post" enctype="multipart/form-data" onsubmit="return validate_post();">
-					<div class="entry blog_add_language">
-						<h4>Castellano (obligatorio)</h4>
-						<input type="text" id="title_es" name="title_es" placeholder="Titulo"/><br/><br/>
-						<textarea name="text_es" id="text_es" placeholder="Texto"></textarea>
-						<script>
-							CKEDITOR.replace('text_es');
-						</script>
-					</div>
-					<div class="entry blog_add_language">
-						<h4>Euskera (opcional)</h4>
-						<input type="text" name="title_eu" id="title_eu" placeholder="Titulo"><br/><br/>
-						<textarea name="text_eu" id="text_eu" placeholder="Texto"></textarea>
-						<script>
-							CKEDITOR.replace('text_eu');
-						</script>
-					</div>
-					<div class="entry blog_add_language">
-						<h4>Ingles (opcional)</h4>
-						<input type="text" name="title_en" id="title_en" placeholder="Titulo"><br><br/>
-						<textarea name="text_en" id="text_en" placeholder="Texto"></textarea>
-						<script>
-							CKEDITOR.replace('text_en');
-						</script>
-					</div>
+					<div class="entry">
+						<div id="lang_tabs">
+							<table>
+								<tr>
+									<td class="pointer lang_tabs_active" id="lang_tab_es" onclick="showLanguage('es');">
+										Castellano
+									</td>
+									<td class="pointer" id="lang_tab_eu" onclick="showLanguage('eu');">
+										Euskera
+									</td>
+									<td class="pointer" id="lang_tab_en" onclick="showLanguage('en');">
+										Ingl&eacute;s
+									</td>
+								</tr>
+							</table>
+						</div>
+						<div id="content_lang_es" class="blog_add_language">
+							<input type="text" id="title_es" name="title_es" placeholder="Titulo"/><br/><br/>
+							<textarea name="text_es" id="text_es" placeholder="Texto"></textarea>
+							<script>
+								CKEDITOR.replace('text_es');
+							</script>
+						</div>
+						<div id="content_lang_eu" class="blog_add_language" style="display:none;">
+							<input type="text" name="title_eu" id="title_eu" placeholder="Titulu"><br/><br/>
+							<textarea name="text_eu" id="text_eu" placeholder="Textua"></textarea>
+							<script>
+								CKEDITOR.replace('text_eu');
+							</script>
+						</div>
+						<div id="content_lang_en" class="blog_add_language" style="display:none;">
+							<input type="text" name="title_en" id="title_en" placeholder="Titlu"><br><br/>
+							<textarea name="text_en" id="text_en" placeholder="Content"></textarea>
+							<script>
+								CKEDITOR.replace('text_en');
+							</script>
+						</div>
+					</div> <!--Entry-->
 					<div class="entry" id="images">
-						<h4>Imagenes</h4>
+						<h4>Im&aacute;genes</h4>
 						<ul>
 							<li>
 								Principal (Aparecera sobre el texto y en las previsualizaciones)<br/>
@@ -87,8 +101,11 @@
 						<label><input type="checkbox" name="comments" checked/>Permitir comentarios</label><br/><br/>
 						<label><input type="checkbox" name="admin"/>Publicar como Gasteizko Margolariak en lugar de mi nombre</label>
 						<br/><br/><br/><br/>
-						<input type="button" value="Previsualizar" onClick="alert(validate_post());"/> <!--TODO-->
-						<input type="submit" value="Publicar"/>
+						<div id="add_button_container">
+							<input type="button" value="Previsualizar" onClick="alert(validate_post());"/> <!--TODO-->
+							<br/>
+							<input type="submit" value="Publicar"/>
+						</div>
 					</div>
 				</form>
 			</div>

+ 53 - 36
www-admin/blog/edit/index.php

@@ -56,37 +56,51 @@
 		<?php include('../../toolbar.php'); ?>
 		<div id='content'>
 			<div class="section">
-				<h3>Editar post</h3>
+				<h3 class="section_title">Editar post</h3>
 				<form action="edit.php" maxlength="120" method="post" enctype="multipart/form-data" onsubmit="return validate_post();">
 					<?php
 						echo "<input type='hidden' name='id' value='$id'/>\n";
 					?>
-					<div class="entry blog_add_language">
-						<h4>Castellano (obligatorio)</h4>
-						<input type="text" id="title_es" name="title_es" placeholder="Titulo" value="<?php echo $title_es;?>"/><br/><br/>
-						<textarea name="text_es" id="text_es" placeholder="Texto"><?php echo $text_es;?></textarea>
-						<script>
-							CKEDITOR.replace('text_es');
-						</script>
-					</div>
-					<div class="entry blog_add_language">
-						<h4>Euskera (opcional)</h4>
-						<input type="text" name="title_eu" id="title_eu" placeholder="Titulo" value="<?php echo $title_eu;?>"/><br/><br/>
-						<textarea name="text_eu" id="text_eu" placeholder="Texto"><?php echo $text_eu;?></textarea>
-						<script>
-							CKEDITOR.replace('text_eu');
-						</script>
-					</div>
-					<div class="entry blog_add_language">
-						<h4>Ingles (opcional)</h4>
-						<input type="text" name="title_en" id="title_en" placeholder="Titulo" value="<?php echo $title_en;?>"/><br><br/>
-						<textarea name="text_en" id="text_en" placeholder="Texto"><?php echo $text_en;?></textarea>
-						<script>
-							CKEDITOR.replace('text_es');
-						</script>
-					</div>
+					<div class="entry">
+						<div id="lang_tabs">
+							<table>
+								<tr>
+									<td class="pointer lang_tabs_active" id="lang_tab_es" onclick="showLanguage('es');">
+										Castellano
+									</td>
+									<td class="pointer" id="lang_tab_eu" onclick="showLanguage('eu');">
+										Euskera
+									</td>
+									<td class="pointer" id="lang_tab_en" onclick="showLanguage('en');">
+										Ingl&eacute;s
+									</td>
+								</tr>
+							</table>
+						</div>
+						<div id="content_lang_es" class="blog_add_language">
+							<input type="text" id="title_es" name="title_es" placeholder="Titulo" value="<?php echo $title_es;?>"/><br/><br/>
+							<textarea name="text_es" id="text_es" placeholder="Texto"><?php echo $text_es;?></textarea>
+							<script>
+								CKEDITOR.replace('text_es');
+							</script>
+						</div>
+						<div id="content_lang_eu" class="blog_add_language" style="display:none;">
+							<input type="text" name="title_eu" id="title_eu" placeholder="Titulu" value="<?php echo $title_eu;?>"/><br/><br/>
+							<textarea name="text_eu" id="text_eu" placeholder="Textua"><?php echo $text_eu;?></textarea>
+							<script>
+								CKEDITOR.replace('text_eu');
+							</script>
+						</div>
+						<div id="content_lang_en" class="blog_add_language" style="display:none;">
+							<input type="text" name="title_en" id="title_en" placeholder="Title" value="<?php echo $title_en;?>"/><br><br/>
+							<textarea name="text_en" id="text_en" placeholder="Content"><?php echo $text_en;?></textarea>
+							<script>
+								CKEDITOR.replace('text_es');
+							</script>
+						</div>
+					</div> <!--Entry-->
 					<div class="entry" id="images">
-						<h4>Imagenes</h4>
+						<h4>Im&aacute;genes</h4>
 						<ul>
 							<li>
 								Principal (Aparecera sobre el texto y en las previsualizaciones)<br/>
@@ -95,12 +109,12 @@
 										$q_img = mysqli_query($con, "SELECT image FROM post_image WHERE post = $id AND idx = 0");
 										if (mysqli_num_rows($q_img) == 0){
 											echo "<img class='image_upload_preview' id='image_preview_0' src='/img/misc/alpha.png'/>\n";
-											echo "<input type='button' style='diplay:none;' onClick='delete_image(0, image_preview_0, this);' value='Eliminar'";
+											echo "<input type='button' style='display:none;' onClick='delete_image(0, image_preview_0, this);' value='Eliminar'";
 										}
 										else{
 											$r_img = mysqli_fetch_array($q_img);
 											echo "<img class='image_upload_preview' style='display:block;' id='image_preview_0' src='http://$default_host/img/blog/miniature/$r_img[image]'/>\n";
-											echo "<input type='button' style='diplay:block;' onClick='delete_image(0, image_preview_0, this);' value='Eliminar'";
+											echo "<input type='button' style='display:block;' onClick='delete_image(0, image_preview_0, this);' value='Eliminar'";
 										}
 									?>
 									<br/><br/>
@@ -115,12 +129,12 @@
 										$q_img = mysqli_query($con, "SELECT image FROM post_image WHERE post = $id AND idx = 1");
 										if (mysqli_num_rows($q_img) == 0){
 											echo "<img class='image_upload_preview' id='image_preview_1' src='/img/misc/alpha.png'/>\n";
-											echo "<input type='button' style='diplay:none;' onClick='delete_image(1, image_preview_1, this);' value='Eliminar'";
+											echo "<input type='button' style='display:none;' onClick='delete_image(1, image_preview_1, this);' value='Eliminar'";
 										}
 										else{
 											$r_img = mysqli_fetch_array($q_img);
 											echo "<img class='image_upload_preview' style='display:block;' id='image_preview_1' src='http://$default_host/img/blog/miniature/$r_img[image]'/>\n";
-											echo "<input type='button' style='diplay:block;' onClick='delete_image(1, image_preview_1, this);' value='Eliminar'";
+											echo "<input type='button' style='display:block;' onClick='delete_image(1, image_preview_1, this);' value='Eliminar'";
 										}
 									?>
 									<br/><br/>
@@ -132,12 +146,12 @@
 										$q_img = mysqli_query($con, "SELECT image FROM post_image WHERE post = $id AND idx = 2");
 										if (mysqli_num_rows($q_img) == 0){
 											echo "<img class='image_upload_preview' id='image_preview_2' src='/img/misc/alpha.png'/>\n";
-											echo "<input type='button' style='diplay:none;' onClick='delete_image(2, image_preview_2, this);' value='Eliminar'";
+											echo "<input type='button' style='display:none;' onClick='delete_image(2, image_preview_2, this);' value='Eliminar'";
 										}
 										else{
 											$r_img = mysqli_fetch_array($q_img);
 											echo "<img class='image_upload_preview' style='display:block;' id='image_preview_2' src='http://$default_host/img/blog/miniature/$r_img[image]'/>\n";
-											echo "<input type='button' style='diplay:block;' onClick='delete_image(2, image_preview_2, this);' value='Eliminar'";
+											echo "<input type='button' style='display:block;' onClick='delete_image(2, image_preview_2, this);' value='Eliminar'";
 										}
 									?>
 									<br/><br/>
@@ -149,12 +163,12 @@
 										$q_img = mysqli_query($con, "SELECT image FROM post_image WHERE post = $id AND idx = 3");
 										if (mysqli_num_rows($q_img) == 0){
 											echo "<img class='image_upload_preview' id='image_preview_3' src='/img/misc/alpha.png'/>\n";
-											echo "<input type='button' style='diplay:none;' onClick='delete_image(3, image_preview_3, this);' value='Eliminar'";
+											echo "<input type='button' style='display:none;' onClick='delete_image(3, image_preview_3, this);' value='Eliminar'";
 										}
 										else{
 											$r_img = mysqli_fetch_array($q_img);
 											echo "<img class='image_upload_preview' style='display:block;' id='image_preview_3' src='http://$default_host/img/blog/miniature/$r_img[image]'/>\n";
-											echo "<input type='button' style='diplay:block;' onClick='delete_image(3, image_preview_3, this);' value='Eliminar'";
+											echo "<input type='button' style='display:block;' onClick='delete_image(3, image_preview_3, this);' value='Eliminar'";
 										}
 									?>
 									<br/><br/>
@@ -169,8 +183,11 @@
 						<label><input type="checkbox" name="visible" <?php if ($r['visible'] == 1) echo 'checked'; ?>/>Post visible</label><br/><br/>
 						<label><input type="checkbox" name="comments" <?php if ($r['comments'] == 1) echo 'checked'; ?>/>Permitir comentarios</label><br/><br/>
 						<br/><br/><br/><br/>
-						<input type="button" value="Previsualizar" onClick="alert(validate_post());"/> <!--TODO-->
-						<input type="submit" value="Publicar"/>
+						<div id="add_button_container">
+							<input type="button" value="Previsualizar" onClick="alert(validate_post());"/> <!--TODO-->
+							<br/>
+							<input type="submit" value="Publicar"/>
+						</div>
 					</div>
 				</form>
 			</div>

+ 5 - 5
www-admin/blog/index.php

@@ -28,7 +28,7 @@
 		<?php include('../toolbar.php'); ?>
 		<div id='content'>
 			<div class="section">
-				<h3>Entradas del blog - <a href="/blog/add/">Anadir nueva</a></h3>
+				<h3 class="section_title">Entradas del blog - <a href="/blog/add/">A&ntilde;adir nueva</a></h3>
 				<div class="entry">
 					<table id='blog_post_list'>
 						<tr>
@@ -39,9 +39,10 @@
 							<th>Accion</th>
 						</tr>
 						<?php
-							$query = mysqli_query($con, "SELECT id, title_es, title_eu, title_en, text_es, text_eu, text_en, user, visible, comments, DATE_FORMAT(dtime, '%b %d, %Y %H:%i:%s') AS ptime FROM post ORDER BY id DESC;");
+							$query = mysqli_query($con, "SELECT id, title_es, title_eu, title_en, text_es, text_eu, text_en, user, visible, comments, DATE_FORMAT(dtime, '%b %d, %Y %H:%i:%s') AS ptime, permalink FROM post ORDER BY id DESC;");
 							while ($r = mysqli_fetch_array($query)){
-								echo "<tr>\n<td class='blog_column_title'>" . cutText($r['title_es'], 35, '', '') . "</td>\n<td class='blog_column_text'>" . cutText($r['text_es'], 80, '', '') . "\n";
+								echo "<tr>\n<td class='blog_column_title'><a href='https://margolariak.com/blog/$r[permalink]'>" . cutText($r['title_es'], 35, '', '') . "</a></td>";
+								echo "<td class='blog_column_text'>" . str_replace('<br/>', ' ', cutText($r['text_es'], 60, '', '')) . "\n";
 								
 								$q_image = mysqli_query($con, "SELECT image FROM post_image WHERE post = $r[id] ORDER BY idx;");
 								if (mysqli_num_rows($q_image) > 0){
@@ -90,9 +91,8 @@
 								echo "Ingl&eacute;s: " . intval($translated_en * 100 / $total) . "%<br/>Euskera: " . intval($translated_eu * 100 / $total) . "%\n";
 								
 								
-								echo "\n</td>\n<td class='blog_column_action'>\n<form method='get' action='http://$http_host/blog/edit/index.php'>\n<input type='submit' value='Editar'/>\n<input type='hidden' name='p' value='$r[id]'/></form>\n";
+								echo "\n</td>\n<td class='blog_column_action'>\n<form method='get' action='http://$http_host/blog/edit/index.php'>\n<input type='submit' value='Editar / Traducir'/>\n<input type='hidden' name='p' value='$r[id]'/></form>\n";
 								echo "<input type='button' onClick='delete_post($r[id], \"$r[title_es]\");' value='Borrar'/>";
-								echo "<form action='/blog/translate/translate.php'>\n<input type='hidden' name='id' value='$r[id]'/><input type='submit' value='Traducir'/>\n</form>";
 								echo "<form action='/blog/moderate/moderate.php?p=$r[id]'>\n<input type='submit' value='Moderar comentarios'/>\n</form>";
 								echo "</td>\n</tr>";
 							}

+ 8 - 1
www-admin/blog/moderate/index.php

@@ -12,7 +12,7 @@
 	<head>
 		<meta content="text/html; charset=windows-1252" http-equiv="content-type"/>
 		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
-		<title>Nuevo post - Administracion</title>
+		<title>Moderar comentarios - Administracion</title>
 		<!-- CSS files -->
 		<link rel="stylesheet" type="text/css" href="/css/ui.css"/>
 		<link rel="stylesheet" type="text/css" href="/css/blog.css"/>
@@ -24,5 +24,12 @@
 		<script type="text/javascript" src="/script/ui.js"></script>
 	</head>
 	<body>
+	<?php include('../../toolbar.php'); ?>
+                <div id='content'>
+                        <div class="section">
+                                <h3 class="section_title">Moderar comentarios</h3>
+				<h4 span class="TODO">En construcci&oacute;n</h4>
+			</div>
+		</div>
 	</body>
 </html>

+ 60 - 71
www-admin/css/actividades.css

@@ -1,68 +1,21 @@
 /* /actividades/add/index.php */
 
-span.tab_selector{
-	z-index:					1;
-	position:					relative;
-	margin-bottom:				0;
-	margin-right:				1em;
-	margin-left:				1em;
-	border-top:					0.1em solid #000000;
-	border-left:				0.1em solid #000000;
-	border-right:				0.1em solid #000000;
-	border-top-right-radius:	0.3em;
-	border-top-left-radius:		0.3em;
-	padding:					0.5em 0.5em 0.1em 0.5em;
-	background-color:			#cccccc;
-	font-weight:				bold;
-}
-
-span#tab_selector_es{
-	z-index:	3;
-}
-
-span#tab_selector_en{
-	color:			#8899bb;
-}
-
-span#tab_selector_eu{
-	color:			#8899bb;
-}
-
-span.tab_selector_hidden{
-	border-bottom:	0.1em solid #000000;
-}
-
-div.tab_content{
-	z-index:			2;
-	position:			relative;
-	display:			inline-block;
-	vertical-align:		top;
-	margin-top:			-0.1em;
-	background-color:	#cccccc;
-	width:				30%;
-	min-width:			25em;
-	text-align:			center;
-}
-
-div.tab_content input[type="text"]{
-	width:		90%;
+input[type="text"]{
+	width:	100%;
 }
 
-div.tab_content textarea{
-	width:		90%;
-	height:		25em;
-	resize: 	none;
+textarea{
+	width:		100%;
+	height:		20em;
 }
 
 div.tab_content_hidden{
 	display:	none;
 }
 
-div#activity_images{
-	display:		inline-block;
-	width:			40%;
-	min-width:		20em;
-	vertical-align:	top;
+div#activity_images input[name="city"]{
+        width:  	100%;
+	max-width:	15em;
 }
 
 div#activity_images input[name="day"]{
@@ -103,13 +56,17 @@ img.image_upload_preview{
 	vertical-align:	middle;
 }
 
-div#activity_options{
-	width:			15%;
-	min-width:		14em;
-	display:		inline-block;
-	vertical-align:	top;
+/* Buttons */
+div#button_container{
+        text-align:     center;
 }
 
+div#button_container input{
+        width:  30%;
+        margin: 0.5em auto 0.5em auto;
+}
+
+
 /* Translate page */
 
 div#translation_instructions{
@@ -198,8 +155,9 @@ div.translate_row_itinerary table td textarea{
 
 /* /actividades/add/itinerary.php */
 table#itinerary{
+	margin:			1em;
 	border-collapse:	collapse; 
-	border:				0.1em solid #000000;
+	border:			0.1em solid #000000;
 }
 
 table#itinerary tr.itinerary_row{
@@ -214,13 +172,23 @@ table#itinerary tr#itinerary_row_0{
 }
 
 table#itinerary tr.itinerary_row td.itinerary_cell{
-	border:	0.1em solid #000000;
+	border:		0.1em solid #000000;
+	padding:	0.5em;
+}
+
+table#itinerary tr.itinerary_row td.itinerary_cell_content{
+        width:	100%;
 }
 
 table#itinerary tr.itinerary_row td.itinerary_cell h4{
 	margin:	0.3em;
 }
 
+table#itinerary tr.itinerary_row td.time{
+        min-width:  11em;
+}
+
+
 table#itinerary tr.itinerary_row td.time input{
 	width:	3em;
 }
@@ -243,18 +211,22 @@ table#itinerary tr.itinerary_row td.time span:hover{
 	text-decoration:	underline;
 }
 
-table#itinerary tr.itinerary_row td.title input{
-	min-width:	3em;
-}
-
 table#itinerary tr.itinerary_row td.text textarea{
 	min-width:	15em;
 	height:		7em;
 	resize:		none;
 }
 
+input#save_itinerary{
+	width:	30%;
+	margin:	1em 30% 1em 30%;
+}
+
+/* Activity list */
+
 table#activity_list{
 	border-collapse:	collapse;
+	margin:				0.5em;
 }
 
 table#activity_list td, th{
@@ -263,7 +235,7 @@ table#activity_list td, th{
 }
 
 table#activity_list th{
-	background-color:	#999999;
+	background-color:	#66aaff;
 }
 
 table#activity_list td.activity_column_title{
@@ -274,14 +246,25 @@ table#activity_list td.activity_column_text{
 	width:	25%;
 }
 
+table#activity_list td.activity_column_text ul{
+	margin:		0;
+}
+
+table#activity_list td.activity_column_text li{
+	margin:		0.5em 0.1em 0 0.2em;
+	font-size:	80%;
+	font-style:	italic;
+}
+
 table#activity_list td.activity_column_text img{
-	max-width:	6em;
-	max-height:	4em;
+	max-width:	5em;
+	max-height:	2em;
 	border:		0.1em solid black;
-	margin:		0.1em;
+	margin:		0.05em;
 }
 
 table#activity_list td.activity_column_details{
+	font-size:	80%;
 	width:		10%;
 	text-align:	center;
 }
@@ -296,11 +279,17 @@ table#activity_list td.activity_column_action{
 	text-align:	center;
 }
 
+table#activity_list td.activity_column_action input{
+	margin: 	0.05em;
+	padding:	0.06em;
+	font-size:	70%
+}
+
 table#activity_list form{
 	margin:	0;
 }
 
-table#activity_list input[type="button"], input[type="submit"]{
+table#activity_list td.activity_column_action input[type="button"], input[type="submit"]{
 	width:			90%;
 	margin-top:		0.2em;
 	margin-bottom:	0.2em;

+ 28 - 24
www-admin/css/blog.css

@@ -1,27 +1,11 @@
 /* /blog/add/index.php */
 
-div.blog_add_language{
-	width:			31%;
-	display:		inline-block;
-	vertical-align:	top;
-}
-
-div#images{
-	display:		inline-block;
-	vertical-align:	top;
-	width:			60%;
-}
-
-div#settings{
-	display:		inline-block;
-	vertical-align:	top;
-	width:			35%;
-}
-
+/* Post title */
 input[type=text]{
 	width:	100%;
 }
 
+/* Post text */ 
 textarea{
 	width:	100%;
 	height:	20em;
@@ -41,10 +25,22 @@ img.image_upload_preview{
 	height:		5em;
 }
 
-/* /blog/inex.php */
+/* Buttons */
+div#add_button_container{
+	text-align:	center;
+}
+
+div#add_button_container input{
+	width:	30%;
+	margin:	0.5em auto 0.5em auto;	
+}
+
+
+/* /blog/index.php */
 
 table#blog_post_list{
-	border-collapse: collapse;
+	border-collapse:	collapse;
+	margin:				0.5em;
 }
 
 table#blog_post_list td, th{
@@ -53,7 +49,7 @@ table#blog_post_list td, th{
 }
 
 table#blog_post_list th{
-	background-color:	#999999;
+	background-color:	#66aaff;
 }
 
 table#blog_post_list td.blog_column_title{
@@ -65,13 +61,14 @@ table#blog_post_list td.blog_column_text{
 }
 
 table#blog_post_list td.blog_column_text img{
-	max-width:	6em;
-	max-height:	4em;
+	max-width:	5em;
+	max-height:	2em;
 	border:		0.1em solid black;
-	margin:		0.1em;
+	margin:		0.05em;
 }
 
 table#blog_post_list td.blog_column_details{
+	font-size:	80%;
 	width:		10%;
 	text-align:	center;
 }
@@ -86,6 +83,13 @@ table#blog_post_list td.blog_column_action{
 	text-align:	center;
 }
 
+table#blog_post_list td.blog_column_action input{
+	margin: 	0.05em;
+	padding:	0.06em;
+	font-size:	70%
+}
+
+
 table#blog_post_list form{
 	margin:	0;
 }

+ 240 - 0
www-admin/css/m/ui.css

@@ -0,0 +1,240 @@
+/******************************************
+* Hide elements intended for desktop and  *
+* show elements for mobile.               *
+******************************************/
+.mobile{
+	display:	initial;
+}
+
+.desktop{
+	display:	none !important;
+}
+
+
+/******************************************
+* Styles for the site header that is      *
+* always visible.                         *
+******************************************/
+
+/* Header top container */
+div#header_m{
+	width:		100%;
+	margin:		0;
+	padding:	0;
+	transition:	max-height 0.9s ease-in-out;
+}
+
+/* Main image of the header, contains the logo */
+div#header_m img#mobile_logo{
+	float:			left;
+	width:			4em;
+	margin-right:	-4em;
+	-webkit-filter:	drop-shadow(0 0 0.2em #336);
+	filter:			url(#drop-shadow);
+	filter:			drop-shadow(0 0 0.2em #336);
+	-ms-filter:		"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#444')";
+	filter:			"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#444')";
+	border:			0.05em solid #000011;
+	border-radius:	100%;
+}
+
+div#header_menu_m div{
+	padding-top:		0.6em;
+	font-weight:		bold;
+	text-align:			center;
+	background-color:	#aaaaaa;
+	border:				1px solid #000000;
+}
+
+div#header_menu_m div#header_m_slider{
+	display:			none;
+	background-color:	#0078ff;
+}
+
+div#header_menu_m div#header_m_slider img{
+	height: 1em;
+	width:	1em;
+	margin: auto;
+}
+
+div#header_menu_m div#header_m_title{
+	vertical-align:		middle;
+	color:				#ffffff;
+	max-height:			3.5em;
+	padding-top:		0.75em;
+	transition:			max-height 0.3s ease-in-out;
+	overflow:			hidden;
+	padding:			0;
+	background-color:	#0078ff
+}
+
+div#header_menu_m div#header_m_title span {
+	display:	block;
+	margin:		0.4em;
+}
+
+div#header_menu_m div#header_m_title span img{
+	vertical-align:	middle;
+}
+
+div#header_menu_m div#header_m_title img{
+	height: 1.9em;
+	width:	1.9em;
+	float:	center;
+}
+
+div#header_menu_m div.header_m_link{
+/* 	display:			none; */
+	max-height:			0;
+	padding:			0;
+	border:				0;
+	overflow:			hidden;
+	transition:			max-height 0.3s ease-in-out;
+	background-color:	#0078ff;
+}
+
+div#header_menu_m div.header_m_link a{
+	color:			#ffffff;
+	text-shadow:	0 0 0.5em #444444;
+	display:		block;
+	width:			100%;
+	height:			2.8em;
+}
+
+/******************************************
+* Styles for the site footer that is      *
+* always visible.                         *
+******************************************/
+
+/* Table containing the footer elemnts */
+div#footer div#footer_table{
+	display:	block;
+}
+
+div#footer div#footer_table div.tr{
+	display:	block;
+}
+
+/* Each main section of the footer */
+div#footer div#footer_table div.td{
+	width:			100%;
+	display:		block;
+	text-align:		center;
+	margin-bottom:	1em;
+	margin:			0;
+	padding:		0;
+}
+
+/* Images for language selection */
+img.lang{
+	height:			1.5em;
+	margin:			0.5em 1em 0.5em 1em;
+	border-radius:	0.2em;
+	border:			0.1em solid #222222;
+	box-shadow:		0 0 0.3em #333333;
+}
+
+img.lang:hover{
+ 	box-shadow:		0 0 0.3em #333333; /*NONE*/
+}
+
+/* Mobile app link image in the footer */
+img.app{
+	height:			1.5em;
+	margin:			0.5em 1em 0.5em 1em;
+	border-radius:	0.2em;
+	border:			0.1em solid #222222;
+	box-shadow:		0 0 0.3em #333333;
+}
+
+img.app:hover{
+	box-shadow:	0 0 0.5em #666666; /*NONE*/
+}
+
+/* Each of the social links in the footer */
+img.footer_social_icon{
+	height:			3em;
+	margin:			0.25em;
+}
+
+img.footer_social_icon:hover{
+	-webkit-filter:	drop-shadow(0 0 0.2em #444444);/*NONE*/
+	filter:			drop-shadow(0 0 0.2em #444444);/*NONE*/
+}
+
+
+/******************************************
+* Styles for the main block that compose  *
+* the site. Most of the pages share the   *
+* same structure.
+******************************************/
+
+/* Content */
+div#content{
+	margin:		auto;
+	width:		95%;
+	max-width:	initial;
+	min-width:	initial;
+}
+
+/******************************************
+* Styles for the ad window.               *
+******************************************/
+div#ad{
+	width:		70%;
+	position:	fixed;
+	bottom:		-25em;
+	left:		15%;
+	right:		15%
+}
+
+div#ad h3{
+	margin-top:	0.3em;
+}
+
+div#ad div#ad_details{
+	font-size:		90%;
+	margin:			0.3em;
+}
+
+div#ad div#ad_details img{
+	height:			1.2em;
+	width:			1.2em;
+	margin: 		0 0.5em 0 0.5em;
+}
+
+div#ad div.entry div#ad_image_container{
+	max-height:	9.5em;
+	margin:		0.5em 0.6em 0.5em 0.6em;
+	text-align:	center;
+}
+
+div#ad div.entry a{
+	font-size:		100%;
+}
+
+/******************************************
+* Styles for the annoying cookie popup.   *
+******************************************/
+div#cookie_popup{
+	font-size:					80%;
+	color:						#dddddd;
+	text-align:					center;
+	position:					fixed;
+	background-color:			#4c9ed8;
+	border:						0.5em solid #265774;
+	padding:					1em 4em 1em 4em;
+	left:						0em;
+	right:						0em;
+	bottom:						0em;
+	-ms-transform:				rotate(0deg); /* IE 9 */
+	-ms-transform-origin:		0% 0%; /* IE 9 */
+	-webkit-transform:			rotate(00deg); /* Chrome, Safari, Opera */
+	-webkit-transform-origin:	0% 0%; /* Chrome, Safari, Opera */
+	-moz-transform:				rotate(00deg); 
+	-moz-transform-origin:		0% 0%; /* Chrome, Safari, Opera */
+	transform:					rotate(00deg);
+	transform-origin:			0% 0%;
+	box-shadow:					0 0 3em #265774;
+	transition:					bottom .5s ease-in-out;
+}

+ 161 - 59
www-admin/css/ui.css

@@ -1,59 +1,106 @@
-.stroke{
-	text-decoration:	line-through;
+/******************************************
+* Hide elements intended for mobile.      *
+******************************************/
+.mobile{
+	display:	none;
 }
 
-.underline{
+/******************************************
+* Fonts used across the page              *
+******************************************/
+
+/* Glogal font */
+@font-face{
+	font-family:	font;
+	src:			url('/font/FreeSans.ttf')
+}
+
+
+/******************************************
+* Styles for html tags, without id or     *
+* class.                                  *
+******************************************/
+
+/* Links */
+a{
+	color:				#4c9ed9;
+	text-decoration:	none;
+	transition:			all .2s ease-in-out;
+}
+
+a:hover{
+	color:				#347;
+	text-shadow:		0 0 0.4em #265885;
 	text-decoration:	underline;
 }
 
-.bold{
-	font-weight:	bold;
+/* Fake links */
+.fake_a{
+	color:				#4c9ed9;
+	text-decoration:	none;
+	transition:			all .2s ease-in-out;
 }
 
-.italic{
-	font-style:	italic;
+.fake_a:hover{
+	color:				#347;
+	text-shadow:		0 0 0.4em #265885;
+	text-decoration:	underline;
 }
 
-input[type="text"], input[type="number"], input[type="date"], input[type="password"]{
-	border-radius:		0.5em;
-	height:				2em;
-	border:				0.4em solid #9cd3d9;
-	color:				#cccccc;
-	background-color:	#223344;
+/* Body */
+body{
+	font-family:		font;
+	margin:				0;
+	/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#b5d3e5+0,e5f4ff+10,e5f4ff+90,b5d3e5+100 */
+	background: #b5d3e5; /* Old browsers */
+	background: -moz-linear-gradient(left, #b5d3e5 0%, #e5f4ff 10%, #e5f4ff 90%, #b5d3e5 100%); /* FF3.6-15 */
+	background: -webkit-linear-gradient(left, #b5d3e5 0%,#e5f4ff 10%,#e5f4ff 90%,#b5d3e5 100%); /* Chrome10-25,Safari5.1-6 */
+	background: linear-gradient(to right, #b5d3e5 0%,#e5f4ff 10%,#e5f4ff 90%,#b5d3e5 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
+	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b5d3e5', endColorstr='#b5d3e5',GradientType=1 ); /* IE6-9 */
+
+}
+
+/* WARNING: If styles change dhere, make changes on commment scripts */
+input[type="text"], input[type="number"], input[type="date"]{
+	border-radius:		0.3em;
+	height:				1.5em;
+	border:				0.2em solid #0078ff;
+	color:				#002255;
+	background-color:	#ccddff;
+	margin:				0.1em;
 }
 
-input[type="button"], input[type="submit"], select{
-	border-radius:		0.5em;
-	height:				2.5em;
-	border:				0.4em solid #9cd3d9;
+input[type="button"], input[type="submit"], input[type="password"], input[type="file"], select{
+	border-radius:		0.3em;
+	height:				2em;
+	border:				0.2em solid #0078ff;
 	font-weight:		bold;
 	color:				#ffffff;
-	background-color:	#335577;
+	background-color:	#124567;
 	cursor:				pointer;
+	margin:				0.1em;
+	letter-spacing: 	0.1em;
 }
 
 textarea{
-	border-radius:		0.5em;
+	border-radius:		0.3em;
 	min-height:			2em;
 	max-height:			15em;
-	border:				0.4em solid #9cd3d9;
-	color:				#bbbbbb;
-	background-color:	#223344;
+	border:				0.2em solid #0078ff;
+	color:				#002255;
+	background-color:	#ccddff;
 	resize:				vertical;
+	margin:				0.1em;
 }
 
-/* Links */
-a{
-	color:				#4c9ed9;
-	text-decoration:	none;
-	transition:			all .2s ease-in-out;
+li{
+	list-style-image:	url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAG0lEQVQImWNgIBqU//+PWwKGcUoQVECanVgAAJSsH/KywgEfAAAAAElFTkSuQmCC');
 }
 
-a:hover{
-	color:				#347;
-	text-shadow:		0 0 0.4em #265885;
-	text-decoration:	underline;
-}
+/******************************************
+* Common elements present across the      *
+* whle site.                              *
+******************************************/
 
 /* Icon for slider sections */
 img.slid{
@@ -70,64 +117,86 @@ img.slid{
 	cursor:	pointer;
 }
 
+/* Elemnts not to be displayed */
+.hidden{
+	display:	none;
+}
 
-/* Body */
-body{
-	font-family:		font;
-	margin:				0;
-	/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#b5d3e5+0,e5f4ff+10,e5f4ff+90,b5d3e5+100 */
-	background: #b5d3e5; /* Old browsers */
-	background: -moz-linear-gradient(left, #b5d3e5 0%, #e5f4ff 10%, #e5f4ff 90%, #b5d3e5 100%); /* FF3.6-15 */
-	background: -webkit-linear-gradient(left, #b5d3e5 0%,#e5f4ff 10%,#e5f4ff 90%,#b5d3e5 100%); /* Chrome10-25,Safari5.1-6 */
-	background: linear-gradient(to right, #b5d3e5 0%,#e5f4ff 10%,#e5f4ff 90%,#b5d3e5 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b5d3e5', endColorstr='#b5d3e5',GradientType=1 ); /* IE6-9 */
+/* Elements with an italic font */
+.italic{
+	font-style:	italic;
+}
+
+/*Elements with a bold font*/
+.bold{
+	font-weight:	bold;
+}
+
+/*Stroked elements*/
+.stroke{
+	text-decoration:	line-through;
+}
+
+/*Underlined elements*/
+.underline{
+	text-decoration:	underline;
 }
 
+
 /* Content */
 div#content{
 	margin:		3em auto auto auto;
 	width:		90%;
 	max-width:	80em;
+	min-width:	60em;
 }
 
 /* Sections */
 div.section{
-	background-color:	#9bc1da;
-	padding:			0.1em 0.3em 0.1em 0.1em;
-	border:				0.2em solid #9cd3d9;
+	border-left:		0.1em solid #000011;
+	border-right:		0.1em solid #000011;
+	border-bottom:		0.1em solid #000011;
+	border-radius:		1em;
+	padding:			0 0 0.5em 0;
+	background-color:	#98c8ff;
+	-webkit-filter:		drop-shadow(0 0 0.4em #000011);
+	filter:				drop-shadow(0 0 0.4em #000011);
+    -ms-filter:			"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#000011')";
+    filter:				"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#000011')";
 }
 
 /* Title for each section */
 div.section .section_title{
-	font-size:	130%;
-	font-style:	bold;
-	margin-top:	0.5em;
+	font-size:					120%;
+	font-style:					bold;
+	color:						#ffffff;
+	background-color:			#0078ff;
+	padding:					0.5em 2em 0.1em 1.5em;
+	border-top-left-radius:		0.7em;
+	border-top-right-radius:	0.7em;
+	border:						0.1em solid #000011;
+	margin:						0;
 }
 
 /* Entries */
-div.entry{
+.entry{
 	background-color:	#ffffff;
 	padding:			0.2em;
 	margin:				0.4em;
-	border:				0.2em solid #9cd3d9;
+	border:				0.1em solid #6D6990;
+	border-radius:		0.3em;
 	box-shadow:			inset 0 0 0.2em #dde;
 	transition:			all .3s ease-in-out;
 }
 
-td.entry{
-	background-color:	#ffffff;
-	padding:			0.2em;
-	margin:				0.4em;
-	border:				0.2em solid #9cd3d9;
-	box-shadow:			inset 0 0 0.2em #dde;
-	transition:			all .3s ease-in-out;
-}
 
+/******************************************
+* Main toolbar.                           *
+******************************************/
 div#member_action input{
 	margin:	0.5em 2em 0.5em 2em;
 }
 
-/* Toolbar styles */
 div#toolbar{
 	background-color:	#000000;
 	margin:				0;
@@ -167,6 +236,9 @@ div#toolbar td a{
 	transition:			all .3s ease-in-out;
 }
 
+/******************************************
+* Secondary toolbars.                     *
+******************************************/
 div.secondary_toolbar{
 	background-color:	#333333;
 	margin:				0;
@@ -201,6 +273,9 @@ div.secondary_toolbar td a:hover{
 	text-decoration:	none;
 }
 
+/******************************************
+* Translation elements.                   *
+******************************************/
 table.translation_table{
 	border-collapse:	collapse;
 }
@@ -214,3 +289,30 @@ table.translation_table th{
 table.translation_table td{
 	border:	1px solid #000000;
 }
+
+
+/******************************************
+* Language selectors                      *
+******************************************/
+
+div#lang_tabs{
+	margin-top:	2em;
+	margin-bottom:	2em;
+}
+
+div#lang_tabs table{
+	width:	100%;
+}
+
+div#lang_tabs td{
+	color:		#555555;
+	font-weight:	bold;
+	width:		33%;
+	border:		0.1em solid black;
+	margin:		0;
+}
+
+div#lang_tabs td.lang_tabs_active{
+	color:		#0078ff;
+	border-bottom:	0.1em solid #ffffff;
+}

+ 7 - 11
www-admin/main.php

@@ -30,26 +30,22 @@
 				<div class='section_row'>
 					<div class='section_cell'>
 						<div class='section'>
-							<h3>Blog</h3>
+							<h3 class='section_title'>Blog</h3>
 							<div class='entry'>
 								<ul>
 									<li><a href='/blog/add/'>Nuevo post</a></li>
 									<li><a href='/blog/'>Gestionar posts</a></li>
-									<li><a href='/blog/moderate/'>Moderar comentarios</a></li>
-									<li><a href='/blog/translate/'>Traducir posts</a></li>
 								</ul>
 							</div>
 						</div>
 					</div>
 					<div class='section_cell'>
 						<div class='section'>
-							<h3>Actividades</h3>
+							<h3 class='section_title'>Actividades</h3>
 							<div class='entry'>
 								<ul>
 									<li><a href='/actividades/add/'>Nueva actividad</a></li>
 									<li><a href='/actividades/'>Gestionar actividades</a></li>
-									<li><a href='/actividades/moderate/'>Moderar comentarios</a></li>
-									<li><a href='/actividades/translate/'>Traducir actividades</a></li>
 								</ul>
 							</div>
 						</div>
@@ -58,7 +54,7 @@
 				<div class='section_row'>
 					<div class='section_cell'>
 						<div class='section'>
-							<h3>Galeria</h3>
+							<h3 class='section_title'>Galeria</h3>
 							<div class='entry'>
 								<ul>
 									<li><a href='/galeria/add/'>Crear album</a></li>
@@ -72,7 +68,7 @@
 					</div>
 					<div class='section_cell'>
 						<div class='section'>
-							<h3>Fiestas</h3>
+							<h3 class='section_title'>Fiestas</h3>
 							<div class='entry'>
 								<ul>
 									<li><a href='/lablanca/'>Preparar las fiestas</a></li>
@@ -86,7 +82,7 @@
 				<div class='section_row'>
 					<div class='section_cell'>
 						<div class='section'>
-							<h3>Miembros</h3>
+							<h3 class='section_title'>Miembros</h3>
 							<div class='entry'>
 								<ul>
 									<li><a href='/miembros/'>Consultar y buscar</a></li>
@@ -98,7 +94,7 @@
 					</div>
 					<div class='section_cell'>
 						<div class='section'>
-							<h3>Estadisticas</h3>
+							<h3 class='section_title'>Estadisticas</h3>
 							<div class='entry'>
 								<ul>
 									<li><a href='/estadisticas/web.php'>Estadisticas Web</a></li>
@@ -112,7 +108,7 @@
 				<div class='section_row'>
 					<div class='section_cell'>
 						<div class='section'>
-							<h3>Ajustes</h3>
+							<h3 class='section_title'>Ajustes</h3>
 							<div class='entry'>
 								<ul>
 									<li><a href=''>Cambiar ajustes</a></li>

+ 31 - 1
www-admin/script/ui.js

@@ -14,4 +14,34 @@ function showToolbar(toolbar, from){
 		document.getElementById('toolbar_' + toolbar).style.display = 'block';
 		from.style.backgroundColor = '#333333';
 	}
-}
+}
+
+
+function showLanguage(lang){
+	switch (lang){
+		case 'es':
+			document.getElementById('content_lang_es').style.display = 'block';
+			document.getElementById('content_lang_eu').style.display = 'none';
+			document.getElementById('content_lang_en').style.display = 'none';
+			document.getElementById('lang_tab_es').classList.add("lang_tabs_active");
+			document.getElementById('lang_tab_eu').classList.remove("lang_tabs_active");
+			document.getElementById('lang_tab_en').classList.remove("lang_tabs_active");
+			break;
+		case 'eu':
+                        document.getElementById('content_lang_es').style.display = 'none';
+                        document.getElementById('content_lang_eu').style.display = 'block';
+                        document.getElementById('content_lang_en').style.display = 'none';
+                        document.getElementById('lang_tab_es').classList.remove("lang_tabs_active");
+                        document.getElementById('lang_tab_eu').classList.add("lang_tabs_active");
+                        document.getElementById('lang_tab_en').classList.remove("lang_tabs_active");
+                        break;
+		case 'en':
+                        document.getElementById('content_lang_es').style.display = 'none';
+                        document.getElementById('content_lang_eu').style.display = 'none';
+                        document.getElementById('content_lang_en').style.display = 'block';
+                        document.getElementById('lang_tab_es').classList.remove("lang_tabs_active");
+                        document.getElementById('lang_tab_eu').classList.remove("lang_tabs_active");
+                        document.getElementById('lang_tab_en').classList.add("lang_tabs_active");
+	}
+}
+

+ 0 - 12
www-admin/toolbar.php

@@ -40,12 +40,6 @@
 			<td>
 				<a href="http://<?php echo $http_host; ?>/blog/">Gestionar posts</a>
 			</td>
-			<td>
-				<a href="http://<?php echo $http_host; ?>/blog/moderate/">Moderar comentarios</a>
-			</td>
-			<td>
-				<a href="http://<?php echo $http_host; ?>/blog/translate/">Traducir posts</a>
-			</td>
 		</tr>
 	</table>
 </div>
@@ -58,12 +52,6 @@
 			<td>
 				<a href="http://<?php echo $http_host; ?>/actividades/">Gestionar actividades</a>
 			</td>
-			<td>
-				<a href="http://<?php echo $http_host; ?>/actividades/moderate/">Moderar comentarios</a>
-			</td>
-			<td>
-				<a href="http://<?php echo $http_host; ?>/actividades/translate/">Traducir actividades</a>
-			</td>
 		</tr>
 	</table>
 </div>

+ 23 - 13
www/css/ui.css

@@ -132,6 +132,16 @@ img.slid{
 	font-weight:	bold;
 }
 
+/*Stroked elements*/
+.stroke{
+	text-decoration:	line-through;
+}
+
+/*Underlined elements*/
+.underline{
+	text-decoration:	underline;
+}
+
 
 /******************************************
 * Styles for the site header that is      *
@@ -404,23 +414,23 @@ div.section{
 	border-radius:		1em;
 	padding:			0 0 0.5em 0;
 	background-color:	#98c8ff;
-	-webkit-filter:	drop-shadow(0 0 0.4em #000011);
-	filter:			drop-shadow(0 0 0.4em #000011);
-    -ms-filter:		"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#000011')";
-    filter:			"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#000011')";
+	-webkit-filter:		drop-shadow(0 0 0.4em #000011);
+	filter:				drop-shadow(0 0 0.4em #000011);
+    -ms-filter:			"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#000011')";
+    filter:				"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#000011')";
 }
 
 /* Title for each section */
-.section_title{
-	font-size:	120%;
-	font-style:	bold;
-	color:		#ffffff;
-	background-color:	#0078ff;
-	padding:			0.5em 2em 0.1em 1.5em;
-	border-top-left-radius:	0.7em;
+div.section .section_title{
+	font-size:					120%;
+	font-style:					bold;
+	color:						#ffffff;
+	background-color:			#0078ff;
+	padding:					0.5em 2em 0.1em 1.5em;
+	border-top-left-radius:		0.7em;
 	border-top-right-radius:	0.7em;
-	border:		0.1em solid #000011;
-	margin:				0;
+	border:						0.1em solid #000011;
+	margin:						0;
 }
 
 div.section a.go_to_section{