Просмотр исходного кода

Changes in administration pages

seavenois 10 лет назад
Родитель
Сommit
4fa7f74111

+ 5 - 4
www-admin/actividades/translate/translate.php

@@ -20,7 +20,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>A&ntilde;adir itinerario a <?php echo $r['title_es']; ?> - Administraci&oacute;n</title>
+		<title>Traducir <?php echo $r['title_es']; ?> - Administraci&oacute;n</title>
 		<!-- CSS files -->
 		<link rel="stylesheet" type="text/css" href="/css/ui.css"/>
 		<link rel="stylesheet" type="text/css" href="/css/actividades.css"/>
@@ -30,6 +30,7 @@
 		<!-- Script files -->
 		<script type="text/javascript" src="script.js"></script>
 		<script type="text/javascript" src="/script/ui.js"></script>
+		<script src="../../ckeditor/ckeditor.js"></script>
 	</head>
 	<body>
 		<?php include('../../toolbar.php'); ?>
@@ -63,14 +64,14 @@
 					echo "</div></td>\n";
 					
 					echo "<td class='translate_language'><div class='entry translation'>\n";
-					echo "<h3>Ingl&eacute;s</h4>\n<div class='translate_row_title'><span class='bold'>T&iacute;tulo: </span><input type='text' name='title_en' required value='$r[title_en]'/></div>\n";
-					echo "<div class='translate_row_description'><span class='bold'>Descripci&oacute;n</span><br/><textarea  name='text_en' required>$r[text_en]</textarea></div>\n";
+					echo "<h3>Ingl&eacute;s</h4><div class='translate_row_title'>\n<span class='bold'>T&iacute;tulo: </span><input required type='text' name='title_en' required value='$r[title_en]'/></div>\n";
+					echo "<div class='translate_row_description'><span class='bold'>Descripci&oacute;n</span><br/><textarea name='text_en' required>$r[text_en]</textarea></div>\n";
 					echo "<script>CKEDITOR.replace('text_en');</script>\n";
 					if (strlen($r['after_es']) > 0){
 						echo "<div class='translate_row_after'><span class='bold'>Texto para despu&eacute;s</span><br/><textarea name='after_en' required>$r[after_en]</textarea></div>\n";
 						echo "<script>CKEDITOR.replace('after_en');</script>\n";
 					}
-					$q_i = mysqli_query($con, "SELECT id, name_es, name_en, name_eu, description_es, description_en, description_eu, date_format(start, '%H:%i') AS start FROM activity_itinerary WHERE activity = $r[id];");
+					$q_i = mysqli_query($con, "SELECT id, name_es, name_en, name_en, description_es, description_en, description_en, date_format(start, '%H:%i') AS start FROM activity_itinerary WHERE activity = $r[id];");
 					if (mysqli_num_rows($q_i) > 0){
 						echo "<div class='translate_row_itinerary'><span class='bold'>Itinerario<br/></span><table id='table_translate_itinerary'>\n";
 						while ($r_i = mysqli_fetch_array($q_i)){

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

@@ -1,7 +1,7 @@
 <?php
 	$http_host = $_SERVER['HTTP_HOST'];
 	include("../../functions.php");
-	$con = startdb();
+	$con = startdb('rw');
 	if (!checkSession($con)){
 		header("Location: /index.php");
 		exit (-1);

+ 15 - 4
www-admin/blog/add/index.php

@@ -1,3 +1,13 @@
+<?php
+	$http_host = $_SERVER['HTTP_HOST'];
+	include("../../functions.php");
+	$con = startdb();
+	if (!checkSession($con)){
+		header("Location: /index.php");
+		exit (-1);
+	}
+	else{
+?>
 <html>
 	<head>
 		<meta content="text/html; charset=windows-1252" http-equiv="content-type"/>
@@ -6,9 +16,6 @@
 		<!-- CSS files -->
 		<link rel="stylesheet" type="text/css" href="/css/ui.css"/>
 		<link rel="stylesheet" type="text/css" href="/css/blog.css"/>
-		<!-- Script files -->
-		<script type="text/javascript" src="script.js"></script>
-		<script type="text/javascript" src="/script/ui.js"></script>
 		<!-- CSS for mobile version -->
 		<link rel="stylesheet" type="text/css" media="(max-width : 990px)" href="/css/m/ui.css"/>
 		<link rel="stylesheet" type="text/css" media="(max-width : 990px)" href="/css/m/blog.css"/>
@@ -84,4 +91,8 @@
 			</form>
 		</div>
 	</body>
-</html>
+</html>
+
+<?php
+	}
+?>

+ 1 - 0
www-admin/blog/delete/delete.php

@@ -13,3 +13,4 @@
 		mysqli_query($con, "DELETE FROM post WHERE id = $id;");
 		version();
 	}
+?>

+ 3 - 3
www-admin/css/actividades.css

@@ -136,7 +136,7 @@ div.translate_row_title{
 }
 
 div.translate_row_description{
-	height:		25em;
+	height:		28em;
 	overflow: 	auto;
 }
 
@@ -151,7 +151,7 @@ div.translate_row_description textarea{
 }
 
 div.translate_row_after{
-	height:		25em;
+	height:		28em;
 	overflow: 	auto;
 }
 
@@ -242,4 +242,4 @@ table#itinerary tr.itinerary_row td.text textarea{
 	min-width:	15em;
 	height:		7em;
 	resize:		none;
-}
+}

+ 2 - 2
www-admin/css/blog.css

@@ -131,7 +131,7 @@ div.translate_row_title{
 }
 
 div.translate_row_description{
-	height:		12em;
+	max-height:	20em;
 	overflow: 	auto;
 }
 
@@ -143,4 +143,4 @@ div.translate_row_description textarea{
 	width:	100%;
 	height:	80%;
     resize:	none;
-}
+}

+ 62 - 168
www-admin/css/ui.css

@@ -14,35 +14,55 @@
 	font-style:	italic;
 }
 
-input[type=button] {
-    font-weight: bold;
-    color: #cccccc;
-    background-color: #555555;
-    border: 0.143em solid #bbbbbb;
-    border-radius: 0.429em;
-    padding: 0.5em;
-    text-shadow: 0 0 0.75em #000000;
-    cursor: pointer;
+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;
+}
+
+input[type="button"], input[type="submit"], select{
+	border-radius:		0.5em;
+	height:				2.5em;
+	border:				0.4em solid #9cd3d9;
+	font-weight:		bold;
+	color:				#ffffff;
+	background-color:	#335577;
+	cursor:				pointer;
+}
+
+textarea{
+	border-radius:		0.5em;
+	min-height:			2em;
+	max-height:			15em;
+	border:				0.4em solid #9cd3d9;
+	color:				#bbbbbb;
+	background-color:	#223344;
+	resize:				vertical;
 }
 
 /* Links */
 a{
-	color:				#6040a8;
-	text-shadow:		0 0 0.5em #7799ff;
+	color:				#4c9ed9;
 	text-decoration:	none;
-	transition:			all .3s ease-in-out;
+	transition:			all .2s ease-in-out;
 }
 
 a:hover{
-	color:				#301075;
-	text-shadow:		0 0 0.4em #ffffff;
+	color:				#347;
+	text-shadow:		0 0 0.4em #265885;
 	text-decoration:	underline;
 }
 
 /* Icon for slider sections */
 img.slid{
-	height:	1em;
-	width:	1em;
+	height:			0.9em;
+	width:			0.9em;
+	padding:		0.1em;
+	cursor:			pointer;
+	vertical-align:	middle;
+	transition:		opacity 0.5s ease-in-out;
 }
 
 /* Elements that should have the cursor as pointer */
@@ -53,144 +73,14 @@ img.slid{
 
 /* Body */
 body{
-	color:		#000000;
-	margin:		0;
-	/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#95f78a+0,ffffff+100 */
-	background: #95f78a; /* Old browsers */
-	background: -moz-linear-gradient(top, #95f78a 0%, #ffffff 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#95f78a), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #95f78a 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #95f78a 0%,#ffffff 100%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(top, #95f78a 0%,#ffffff 100%); /* IE10+ */
-	background: linear-gradient(to bottom, #95f78a 0%,#ffffff 100%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#95f78a', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
-}
-
-/* Header  */
-div#header{
-	margin:				-1em auto 1em auto;
-	padding:			1em	0 0 0;
-	width:				95%;
-	max-width:			80em;
-	background-color:	#aaaaaa;
-	border-radius:		0 0 1em 1em;
-	border:				1px solid #333333;
-	box-shadow:			0 0 2em #555555;
-}
-
-/* Main image of the header, contains the logo */
-div#header img{
-	display:		inline-block;
-	width:			10%;
-	margin:			0;
-	padding:		1%;
-	vertical-align:	middle;
-	-webkit-filter:	drop-shadow(0 0 0.6em #000000);
-    filter:			url(#drop-shadow);
-    -ms-filter:		"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#444')";
-    filter:			"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#444')";
-}
-
-/* Section of the header containing links to sections */
-div#header_menu{
-	display:			inline-block;
-	vertical-align:		middle;
-	width:				85%;
-	background-color:	#ccffcc;
-	border-radius:		0.5em;
-	border:				0.2em solid #99cc99;
-}
-
-/* Table with the links to the sections */
-div#header_menu table{
-	display:			table;
-	margin:				auto 0 auto 0;
- 	width:				100%;
-	border-collapse:	collapse;
-    border-spacing:		0;
-}
-
-div#header_menu table tbody{
-	width:	100%;
-}
-div#header_menu table tbody tr{
-	width:	100%;
-}
-
-/* containers of the section links */
-div#header_menu table td{
-	width:		12%;
-	text-align:	center;
-	transition:	all .3s ease-in-out;
-}
-
-div#header_menu table td:hover{
-	background-color:	#88aa88;
-}
-
-div#header_menu table a{
-	display:		inline-block;
-	font-weight:	bold;
-	font-size:		115%;
-	width:			100%;
-	padding-top:	0.8em;
-	padding-bottom:	0.8em;
-}
-
-/* Footer */
-div#footer{
-	width:	100%;
-}
-
-div#footer table{
-	width:	100%;
-}
-
-div#footer table td{
-	width:		33%;
-	text-align:	center;
-}
-
-/* Content of the page */
-div#content{
-	width:	90%;
-	margin-left:	auto;
-	margin-right:	auto;
-}
-
-/* Images for language selection */
-img.lang{
-	height:			1em;
-	margin:			0.5em;
-	border-radius:	0.2em;
-	border:			0.15em solid #222222;
-	cursor:			pointer;
-	box-shadow:		0 0 1em #333333;
-}
-
-/* App link image in the footer */
-img.app{
-	height:			3em;
-	margin:			0.5em;
-	border-radius:	0.4em;
-	border:			0.15em solid #aaaaaa;
-	cursor:			pointer;
-	box-shadow:		0 0 0.5em #666666;
-}
-
-/* Each of the social links in the footer */
-img.footer_social_icon{
-	height:			2.4em;
-	margin:			0.15em;
-	transition:		all .3s ease-in-out;
-	-webkit-filter:	drop-shadow(0 0 0.2em #444444);
-    filter:			url(#drop-shadow);
-    -ms-filter:		"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#444')";
-    filter:			"progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#444')";
-}
-
-img.footer_social_icon:hover{
-	-webkit-filter:	drop-shadow(0 0 0.4em #444444);
+	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 */
 }
 
 /* Content */
@@ -202,31 +92,35 @@ div#content{
 
 /* Sections */
 div.section{
-	background-color:	#999999;
-	border-radius:		0.2em;
-	padding:			0.4em;
-	border:				0.1em solid #333333;
-	box-shadow:			0 0 1em #555555;
+	background-color:	#9bc1da;
+	padding:			0.1em 0.3em 0.1em 0.1em;
+	border:				0.2em solid #9cd3d9;
 }
 
 /* Title for each section */
-.section_title{
+div.section .section_title{
+	font-size:	130%;
 	font-style:	bold;
+	margin-top:	0.5em;
 }
 
 /* Entries */
 div.entry{
-	background-color:	#cccccc;
-	border-radius:		0.2em;
-	padding:			0.4em;
-	margin:				0.2em;
-	border:				0.1em solid #333333;
-	box-shadow:			0 0 1em #222222;
+	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;
 }
 
-div.entry:hover{
-	background-color:	#dddddd;
+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;
 }
 
 div#member_action input{

+ 2 - 2
www-admin/toolbar.php

@@ -44,7 +44,7 @@
 				<a href="http://<?php echo $http_host; ?>/blog/moderate/">Moderar comentarios</a>
 			</td>
 			<td>
-				<a href="http://<?php echo $http_host; ?>/blog/translata/">Traducir posts</a>
+				<a href="http://<?php echo $http_host; ?>/blog/translate/">Traducir posts</a>
 			</td>
 		</tr>
 	</table>
@@ -144,4 +144,4 @@
 			</td>
 		</tr>
 	</table>
-</div>
+</div>

+ 1 - 1
www/blog/post.php

@@ -11,7 +11,7 @@
 	
 	// Get current post id. Redirect if inexistent or invisible
 	$perm = mysqli_real_escape_string($con, $_GET['perm']);
-	$q = mysqli_query($con, "SELECT id, permalink, title_$lang AS title, text_$lang AS text, DATE_FORMAT(dtime, '%Y-%m-%dT%T') AS isodate, DATE_FORMAT(dtime,'%b %d, %Y') as dtime, comments FROM post WHERE permalink = '$perm' AND visible = 1;");
+	$q = mysqli_query($con, "SELECT id, permalink, title_$lang AS title, text_$lang AS text, DATE_FORMAT(dtime, '%Y-%m-%dT%T') AS isodate, DATE_FORMAT(dtime,'%b %d, %Y T%T') as dtime, comments FROM post WHERE permalink = '$perm' AND visible = 1;");
 	if (mysqli_num_rows($q) == 0){
 		header("Location: http://$http_host/blog/");
 		exit(-1);

+ 0 - 5
www/css/ui.css

@@ -42,7 +42,6 @@
 /* Links */
 a{
 	color:				#4c9ed9;
-/* 	text-shadow:		0 0 0.0em #7799ff; */
 	text-decoration:	none;
 	transition:			all .2s ease-in-out;
 }
@@ -391,13 +390,9 @@ div#content{
 
 /* Sections */
 div.section{
-/* 	background-color:	#7cbed9; */
 	background-color:	#9bc1da;
-/* 	border-radius:		0 0 0.6em 0.6em; */
 	padding:			0.1em 0.3em 0.1em 0.1em;
 	border:				0.2em solid #9cd3d9;
-/* 	border-top:			0.3em solid #003; */
-/* 	box-shadow:			0 0 0.3em #dde; */
 }
 
 /* Title for each section */