website annotate archives.php @ rev 669
Move year to slitaz.css
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 30 21:52:02 2010 +0200 (2010-10-30) |
parents | 27decd422c8d |
children |
rev | line source |
---|---|
pascal@656 | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
pascal@656 | 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
pascal@656 | 3 <head> |
pascal@656 | 4 <title>lists.tuxfamily.org/slitaz mailing list</title> |
pascal@656 | 5 <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
pascal@656 | 6 <link rel="stylesheet" type="text/css" href="slitaz.css" /> |
pascal@656 | 7 <style type="text/css"> |
pascal@656 | 8 table { |
pascal@656 | 9 border: 1px solid #000000; |
pascal@656 | 10 width: variable; |
pascal@656 | 11 border-collapse: collapse; |
pascal@656 | 12 margin: 2px 2px; |
pascal@656 | 13 } |
pascal@656 | 14 td { |
pascal@656 | 15 border: 1px dotted #6495ed; |
pascal@656 | 16 width: variable; |
pascal@656 | 17 padding: 2px; |
pascal@656 | 18 } |
pascal@656 | 19 .rowodd { |
pascal@656 | 20 background-color: #ffffff; |
pascal@656 | 21 } |
pascal@656 | 22 .roweven { |
pascal@656 | 23 background-color: #e1ffe1; /* the tower */ |
pascal@656 | 24 } |
pascal@656 | 25 th { |
pascal@656 | 26 border: 1px solid #000000; |
pascal@656 | 27 width: variable; |
pascal@656 | 28 padding: 4px; |
pascal@656 | 29 } |
pascal@656 | 30 .alignright { |
pascal@656 | 31 text-align: right; |
pascal@656 | 32 } |
pascal@656 | 33 </style> |
pascal@656 | 34 </head> |
pascal@656 | 35 <body> |
pascal@659 | 36 <?php |
pascal@659 | 37 |
pascal@659 | 38 function translate($word) |
pascal@659 | 39 { |
pascal@659 | 40 if (isset($_GET['lang'])) switch ($_GET['lang']) { |
pascal@659 | 41 case "de" : |
pascal@659 | 42 switch ($word) { |
pascal@659 | 43 case "Archives" : return "Archiv"; |
pascal@659 | 44 case "Archive" : return "Archiv"; |
pascal@659 | 45 case "View by" : return "Ansicht von"; |
pascal@659 | 46 case "Number" : return "Zahl"; |
pascal@659 | 47 case "Total size": return "Gesamtgr\ö\ße"; |
pascal@659 | 48 case " or " : return " oder "; |
pascal@659 | 49 case "Date" : return "datum"; |
pascal@659 | 50 } |
pascal@659 | 51 break; |
pascal@659 | 52 case "es" : |
pascal@659 | 53 switch ($word) { |
pascal@659 | 54 case "Archives" : return "Archivos"; |
pascal@659 | 55 case "Archive" : return "Archivo"; |
pascal@659 | 56 case "View by" : return "Vista"; |
pascal@659 | 57 case "Number" : return "n\úmero"; |
pascal@659 | 58 case "Total size": return "Tama\ño total"; |
pascal@659 | 59 case "Thread" : return "hilo"; |
pascal@659 | 60 case " or " : return " o "; |
pascal@659 | 61 case "Date" : return "Fecha"; |
pascal@659 | 62 } |
pascal@659 | 63 break; |
pascal@659 | 64 case "fr" : |
pascal@659 | 65 switch ($word) { |
pascal@669 | 66 case "View by" : return "Tri\é par"; |
pascal@659 | 67 case "Number" : return "Nombre"; |
pascal@659 | 68 case "Total size": return "Volume"; |
pascal@659 | 69 case "Thread" : return "Sujet"; |
pascal@659 | 70 case " or " : return " ou "; |
pascal@659 | 71 } |
pascal@659 | 72 break; |
pascal@659 | 73 case "pt" : |
pascal@659 | 74 switch ($word) { |
pascal@659 | 75 case "Archives" : return "Arquivos"; |
pascal@659 | 76 case "Archive" : return "Arquivo"; |
pascal@659 | 77 case "View by" : return "Exibir por"; |
pascal@659 | 78 case "Number" : return "n\úmero"; |
pascal@659 | 79 case "Total size": return "O tamanho total"; |
pascal@659 | 80 case "Thread" : return "T\ópico"; |
pascal@659 | 81 case " or " : return " ou "; |
pascal@659 | 82 case "Date" : return "Data"; |
pascal@659 | 83 } |
pascal@659 | 84 break; |
pascal@659 | 85 } |
pascal@659 | 86 return $word; |
pascal@659 | 87 } |
pascal@659 | 88 |
pascal@659 | 89 echo '<h4>'.translate("Archives").' 2007-'.date('Y')."</h4>\n"; |
pascal@659 | 90 |
pascal@656 | 91 $url = "http://listengine.tuxfamily.org/lists.tuxfamily.org/slitaz/"; |
pascal@659 | 92 |
pascal@656 | 93 $script = "-e '/<table>/,/<\/table>/!d' "; |
pascal@656 | 94 $script .= "-e 's|html\"|html\" target=\"_blank\"|g' "; |
pascal@656 | 95 $script .= "-e 's|href=\"|href=\"$url|g' "; |
pascal@659 | 96 foreach (array("Archive","View by","Number","Total size", |
pascal@659 | 97 "Thread"," or ","Date") as $word) { |
pascal@659 | 98 $script .= "-e 's|".$word."|".translate($word)."|' "; |
pascal@659 | 99 } |
pascal@656 | 100 system("wget -q -O - $url | sed $script"); |
pascal@656 | 101 ?> |
pascal@656 | 102 </body> |
pascal@656 | 103 </html> |