website annotate lib/archives.php @ rev 1094

Edit on index.php 10-12-12 1:57:42
author Adnan Sinanovic <sinanovicha@gmail.com>
date Fri Oct 12 13:58:07 2012 +0000 (2012-10-12)
parents da1ede84974f
children 9ed0bfb74392
rev   line source
pankso@751 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
pankso@751 2 <html xmlns="http://www.w3.org/1999/xhtml">
pankso@751 3 <head>
pankso@751 4 <title>lists.tuxfamily.org/slitaz mailing list</title>
pankso@751 5 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
pankso@751 6 <!-- link rel="stylesheet" type="text/css" href="/slitaz.css" / -->
pankso@751 7 <style type="text/css">
pankso@751 8 body {
pankso@751 9 background: #ffffff;
pankso@751 10 color: black;
pankso@751 11 font: 13px sans-serif, vernada, arial;
pankso@751 12 margin: 0;
pankso@751 13 #border-top: 34px solid #f1f1f1;
pankso@751 14 }
pankso@751 15 table {
pankso@751 16 border: 1px solid #000000;
pankso@751 17 width: variable;
pankso@751 18 border-collapse: collapse;
pankso@751 19 margin: 2px 2px;
pankso@751 20 }
pankso@751 21 td {
pankso@751 22 border: 1px dotted #6495ed;
pankso@751 23 width: variable;
pankso@751 24 padding: 2px;
pankso@751 25 }
pankso@751 26 .rowodd {
pankso@751 27 background-color: #ffffff;
pankso@751 28 }
pankso@751 29 .roweven {
pankso@751 30 background-color: #e1ffe1; /* the tower */
pankso@751 31 }
pascal@872 32 .odd {
pascal@872 33 background-color: #ffffff;
pascal@872 34 }
pascal@872 35 .even {
pascal@872 36 background-color: #e1ffe1; /* the tower */
pascal@872 37 }
pankso@751 38 th {
pankso@751 39 border: 1px solid #000000;
pankso@751 40 width: variable;
pankso@751 41 padding: 4px;
pankso@751 42 }
pankso@751 43 .alignright {
pankso@751 44 text-align: right;
pankso@751 45 }
pankso@751 46 </style>
pankso@751 47 </head>
pankso@751 48 <body>
pankso@751 49 <?php
pankso@751 50
pankso@751 51 function translate($word)
pankso@751 52 {
pankso@751 53 if (isset($_GET['lang'])) switch ($_GET['lang']) {
pankso@751 54 case "de" :
pankso@751 55 switch ($word) {
pankso@751 56 case "Archives" : return "Archiv";
pankso@751 57 case "Archive" : return "Archiv";
pankso@751 58 case "View by" : return "Ansicht von";
pascal@872 59 case "Messages count":
pankso@751 60 case "Number" : return "Zahl";
pankso@751 61 case "Total size": return "Gesamtgr\&ouml;\&szlig;e";
pankso@751 62 case " or " : return " oder ";
pascal@872 63 case "Month/Year":
pankso@751 64 case "Date" : return "datum";
pankso@751 65 }
pankso@751 66 break;
pankso@751 67 case "es" :
pankso@751 68 switch ($word) {
pankso@751 69 case "Archives" : return "Archivos";
pankso@751 70 case "Archive" : return "Archivo";
pankso@751 71 case "View by" : return "Vista";
pascal@872 72 case "Messages count":
pankso@751 73 case "Number" : return "n\&uacute;mero";
pankso@751 74 case "Total size": return "Tama\&ntilde;o total";
pankso@751 75 case "Thread" : return "hilo";
pankso@751 76 case " or " : return " o ";
pascal@872 77 case "Month/Year":
al@983 78 case "Date" : return "Fecha";
pankso@751 79 }
pankso@751 80 break;
pankso@751 81 case "fr" :
pankso@751 82 switch ($word) {
pankso@751 83 case "View by" : return "Tri\&eacute; par";
pascal@872 84 case "Messages count":
pankso@751 85 case "Number" : return "Nombre";
pankso@751 86 case "Total size": return "Volume";
pankso@751 87 case "Thread" : return "Sujet";
pankso@751 88 case " or " : return " ou ";
pascal@872 89 case "Month/Year": return "Date";
pankso@751 90 }
pankso@751 91 break;
pankso@751 92 case "pt" :
pankso@751 93 switch ($word) {
pankso@751 94 case "Archives" : return "Arquivos";
pankso@751 95 case "Archive" : return "Arquivo";
pankso@751 96 case "View by" : return "Exibir por";
pascal@872 97 case "Messages count":
pankso@751 98 case "Number" : return "n\&uacute;mero";
pankso@751 99 case "Total size": return "O tamanho total";
pankso@751 100 case "Thread" : return "T\&oacute;pico";
pankso@751 101 case " or " : return " ou ";
pascal@872 102 case "Month/Year":
pankso@751 103 case "Date" : return "Data";
pankso@751 104 }
pankso@751 105 break;
al@970 106 case "ru" :
al@970 107 switch ($word) {
al@982 108 case "Archives" : return "Архивы";
al@982 109 case "Archive" : return "Архив";
al@982 110 case "Month/Year" : return "Год-месяц";
al@982 111 case "View by" : return "Смотреть по";
al@982 112 case "Thread" : return "теме";
al@982 113 case " or " : return " или ";
al@982 114 case "Date" : return "дате";
al@982 115 case "Messages count": return "Сообщений";
al@982 116 case "Total size" : return "Размер";
al@982 117 case "Number" : return "номер";
al@970 118 }
al@970 119 break;
pascal@872 120 default:
pascal@872 121 switch ($word) {
pascal@872 122 case "Messages count": return "Number";
pascal@872 123 case "Month/Year": return "Date";
pascal@872 124 }
pascal@872 125 break;
pankso@751 126 }
pankso@751 127 return $word;
pankso@751 128 }
pankso@751 129
pankso@751 130 echo '<h4>'.translate("Archives").' 2007-'.date('Y')."</h4>\n";
pankso@751 131
pankso@751 132 $url = "http://listengine.tuxfamily.org/lists.tuxfamily.org/slitaz/";
pankso@751 133
pascal@872 134 $script = "-e '/<table/,/<\/table>/!d' ";
pankso@751 135 $script .= "-e 's|html\"|html\" target=\"_blank\"|g' ";
pankso@751 136 $script .= "-e 's|href=\"|href=\"$url|g' ";
pankso@751 137 foreach (array("Archive","View by","Number","Total size",
pascal@872 138 "Messages count", "Month/Year",
pankso@751 139 "Thread"," or ","Date") as $word) {
pankso@751 140 $script .= "-e 's|".$word."|".translate($word)."|' ";
pankso@751 141 }
pankso@751 142 system("wget -q -O - $url | sed $script");
pankso@751 143 ?>
pankso@751 144 </body>
pankso@751 145 </html>