website rev 677
Move archives.php to scripts/
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Nov 07 14:20:27 2010 +0100 (2010-11-07) |
parents | 1c5da484bc31 |
children | f105ba41dc02 |
files | archives.php de/mailing-list.html en/mailing-list.html es/mailing-list.html fr/mailing-list.html pt/mailing-list.html scripts/archives.php |
line diff
1.1 --- a/archives.php Fri Nov 05 17:56:14 2010 +0000 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,103 +0,0 @@ 1.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 1.5 -<html xmlns="http://www.w3.org/1999/xhtml"> 1.6 -<head> 1.7 - <title>lists.tuxfamily.org/slitaz mailing list</title> 1.8 - <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 1.9 - <link rel="stylesheet" type="text/css" href="slitaz.css" /> 1.10 - <style type="text/css"> 1.11 - table { 1.12 - border: 1px solid #000000; 1.13 - width: variable; 1.14 - border-collapse: collapse; 1.15 - margin: 2px 2px; 1.16 - } 1.17 - td { 1.18 - border: 1px dotted #6495ed; 1.19 - width: variable; 1.20 - padding: 2px; 1.21 - } 1.22 - .rowodd { 1.23 - background-color: #ffffff; 1.24 - } 1.25 - .roweven { 1.26 - background-color: #e1ffe1; /* the tower */ 1.27 - } 1.28 - th { 1.29 - border: 1px solid #000000; 1.30 - width: variable; 1.31 - padding: 4px; 1.32 - } 1.33 - .alignright { 1.34 - text-align: right; 1.35 - } 1.36 - </style> 1.37 -</head> 1.38 -<body> 1.39 -<?php 1.40 - 1.41 -function translate($word) 1.42 -{ 1.43 - if (isset($_GET['lang'])) switch ($_GET['lang']) { 1.44 - case "de" : 1.45 - switch ($word) { 1.46 - case "Archives" : return "Archiv"; 1.47 - case "Archive" : return "Archiv"; 1.48 - case "View by" : return "Ansicht von"; 1.49 - case "Number" : return "Zahl"; 1.50 - case "Total size": return "Gesamtgr\ö\ße"; 1.51 - case " or " : return " oder "; 1.52 - case "Date" : return "datum"; 1.53 - } 1.54 - break; 1.55 - case "es" : 1.56 - switch ($word) { 1.57 - case "Archives" : return "Archivos"; 1.58 - case "Archive" : return "Archivo"; 1.59 - case "View by" : return "Vista"; 1.60 - case "Number" : return "n\úmero"; 1.61 - case "Total size": return "Tama\ño total"; 1.62 - case "Thread" : return "hilo"; 1.63 - case " or " : return " o "; 1.64 - case "Date" : return "Fecha"; 1.65 - } 1.66 - break; 1.67 - case "fr" : 1.68 - switch ($word) { 1.69 - case "View by" : return "Tri\é par"; 1.70 - case "Number" : return "Nombre"; 1.71 - case "Total size": return "Volume"; 1.72 - case "Thread" : return "Sujet"; 1.73 - case " or " : return " ou "; 1.74 - } 1.75 - break; 1.76 - case "pt" : 1.77 - switch ($word) { 1.78 - case "Archives" : return "Arquivos"; 1.79 - case "Archive" : return "Arquivo"; 1.80 - case "View by" : return "Exibir por"; 1.81 - case "Number" : return "n\úmero"; 1.82 - case "Total size": return "O tamanho total"; 1.83 - case "Thread" : return "T\ópico"; 1.84 - case " or " : return " ou "; 1.85 - case "Date" : return "Data"; 1.86 - } 1.87 - break; 1.88 - } 1.89 - return $word; 1.90 -} 1.91 - 1.92 -echo '<h4>'.translate("Archives").' 2007-'.date('Y')."</h4>\n"; 1.93 - 1.94 -$url = "http://listengine.tuxfamily.org/lists.tuxfamily.org/slitaz/"; 1.95 - 1.96 -$script = "-e '/<table>/,/<\/table>/!d' "; 1.97 -$script .= "-e 's|html\"|html\" target=\"_blank\"|g' "; 1.98 -$script .= "-e 's|href=\"|href=\"$url|g' "; 1.99 -foreach (array("Archive","View by","Number","Total size", 1.100 - "Thread"," or ","Date") as $word) { 1.101 - $script .= "-e 's|".$word."|".translate($word)."|' "; 1.102 -} 1.103 -system("wget -q -O - $url | sed $script"); 1.104 -?> 1.105 -</body> 1.106 -</html>
2.1 --- a/de/mailing-list.html Fri Nov 05 17:56:14 2010 +0000 2.2 +++ b/de/mailing-list.html Sun Nov 07 14:20:27 2010 +0100 2.3 @@ -179,7 +179,7 @@ 2.4 </p> 2.5 2.6 <div> 2.7 -<object type="text/html" width="100%" height="345" data="../archives.php?lang=de"> 2.8 +<object type="text/html" width="100%" height="345" data="../scripts/archives.php?lang=de"> 2.9 </object> 2.10 </div> 2.11
3.1 --- a/en/mailing-list.html Fri Nov 05 17:56:14 2010 +0000 3.2 +++ b/en/mailing-list.html Sun Nov 07 14:20:27 2010 +0100 3.3 @@ -189,7 +189,7 @@ 3.4 </p> 3.5 3.6 <div> 3.7 -<object type="text/html" width="100%" height="345" data="../archives.php"> 3.8 +<object type="text/html" width="100%" height="345" data="../scripts/archives.php"> 3.9 </object> 3.10 </div> 3.11
4.1 --- a/es/mailing-list.html Fri Nov 05 17:56:14 2010 +0000 4.2 +++ b/es/mailing-list.html Sun Nov 07 14:20:27 2010 +0100 4.3 @@ -180,7 +180,7 @@ 4.4 </p> 4.5 4.6 <div> 4.7 -<object type="text/html" width="100%" height="345" data="../archives.php?lang=es"> 4.8 +<object type="text/html" width="100%" height="345" data="../scripts/archives.php?lang=es"> 4.9 </object> 4.10 </div> 4.11
5.1 --- a/fr/mailing-list.html Fri Nov 05 17:56:14 2010 +0000 5.2 +++ b/fr/mailing-list.html Sun Nov 07 14:20:27 2010 +0100 5.3 @@ -198,7 +198,7 @@ 5.4 </p> 5.5 5.6 <div> 5.7 -<object type="text/html" width="100%" height="345" data="../archives.php?lang=fr"> 5.8 +<object type="text/html" width="100%" height="345" data="../scripts/archives.php?lang=fr"> 5.9 </object> 5.10 </div> 5.11
6.1 --- a/pt/mailing-list.html Fri Nov 05 17:56:14 2010 +0000 6.2 +++ b/pt/mailing-list.html Sun Nov 07 14:20:27 2010 +0100 6.3 @@ -192,7 +192,7 @@ 6.4 </p> 6.5 6.6 <div> 6.7 -<object type="text/html" width="100%" height="345" data="../archives.php?lang=pt"> 6.8 +<object type="text/html" width="100%" height="345" data="../scripts/archives.php?lang=pt"> 6.9 </object> 6.10 </div> 6.11
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/scripts/archives.php Sun Nov 07 14:20:27 2010 +0100 7.3 @@ -0,0 +1,103 @@ 7.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 7.5 +<html xmlns="http://www.w3.org/1999/xhtml"> 7.6 +<head> 7.7 + <title>lists.tuxfamily.org/slitaz mailing list</title> 7.8 + <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 7.9 + <link rel="stylesheet" type="text/css" href="slitaz.css" /> 7.10 + <style type="text/css"> 7.11 + table { 7.12 + border: 1px solid #000000; 7.13 + width: variable; 7.14 + border-collapse: collapse; 7.15 + margin: 2px 2px; 7.16 + } 7.17 + td { 7.18 + border: 1px dotted #6495ed; 7.19 + width: variable; 7.20 + padding: 2px; 7.21 + } 7.22 + .rowodd { 7.23 + background-color: #ffffff; 7.24 + } 7.25 + .roweven { 7.26 + background-color: #e1ffe1; /* the tower */ 7.27 + } 7.28 + th { 7.29 + border: 1px solid #000000; 7.30 + width: variable; 7.31 + padding: 4px; 7.32 + } 7.33 + .alignright { 7.34 + text-align: right; 7.35 + } 7.36 + </style> 7.37 +</head> 7.38 +<body> 7.39 +<?php 7.40 + 7.41 +function translate($word) 7.42 +{ 7.43 + if (isset($_GET['lang'])) switch ($_GET['lang']) { 7.44 + case "de" : 7.45 + switch ($word) { 7.46 + case "Archives" : return "Archiv"; 7.47 + case "Archive" : return "Archiv"; 7.48 + case "View by" : return "Ansicht von"; 7.49 + case "Number" : return "Zahl"; 7.50 + case "Total size": return "Gesamtgr\ö\ße"; 7.51 + case " or " : return " oder "; 7.52 + case "Date" : return "datum"; 7.53 + } 7.54 + break; 7.55 + case "es" : 7.56 + switch ($word) { 7.57 + case "Archives" : return "Archivos"; 7.58 + case "Archive" : return "Archivo"; 7.59 + case "View by" : return "Vista"; 7.60 + case "Number" : return "n\úmero"; 7.61 + case "Total size": return "Tama\ño total"; 7.62 + case "Thread" : return "hilo"; 7.63 + case " or " : return " o "; 7.64 + case "Date" : return "Fecha"; 7.65 + } 7.66 + break; 7.67 + case "fr" : 7.68 + switch ($word) { 7.69 + case "View by" : return "Tri\é par"; 7.70 + case "Number" : return "Nombre"; 7.71 + case "Total size": return "Volume"; 7.72 + case "Thread" : return "Sujet"; 7.73 + case " or " : return " ou "; 7.74 + } 7.75 + break; 7.76 + case "pt" : 7.77 + switch ($word) { 7.78 + case "Archives" : return "Arquivos"; 7.79 + case "Archive" : return "Arquivo"; 7.80 + case "View by" : return "Exibir por"; 7.81 + case "Number" : return "n\úmero"; 7.82 + case "Total size": return "O tamanho total"; 7.83 + case "Thread" : return "T\ópico"; 7.84 + case " or " : return " ou "; 7.85 + case "Date" : return "Data"; 7.86 + } 7.87 + break; 7.88 + } 7.89 + return $word; 7.90 +} 7.91 + 7.92 +echo '<h4>'.translate("Archives").' 2007-'.date('Y')."</h4>\n"; 7.93 + 7.94 +$url = "http://listengine.tuxfamily.org/lists.tuxfamily.org/slitaz/"; 7.95 + 7.96 +$script = "-e '/<table>/,/<\/table>/!d' "; 7.97 +$script .= "-e 's|html\"|html\" target=\"_blank\"|g' "; 7.98 +$script .= "-e 's|href=\"|href=\"$url|g' "; 7.99 +foreach (array("Archive","View by","Number","Total size", 7.100 + "Thread"," or ","Date") as $word) { 7.101 + $script .= "-e 's|".$word."|".translate($word)."|' "; 7.102 +} 7.103 +system("wget -q -O - $url | sed $script"); 7.104 +?> 7.105 +</body> 7.106 +</html>