website diff cn/doc/index.php @ rev 1084
Update relnotes links (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 27 09:56:28 2012 +0200 (2012-07-27) |
parents | 2624878c24e8 |
children | 9ed0bfb74392 |
line diff
1.1 --- a/cn/doc/index.php Fri Jul 27 09:10:17 2012 +0200 1.2 +++ b/cn/doc/index.php Fri Jul 27 09:56:28 2012 +0200 1.3 @@ -65,10 +65,22 @@ 1.4 </p> 1.5 1.6 <ul> 1.7 - <li><a href="/en/doc/releases/4.0/relnotes.en.html">SliTaz GNU/Linux 4.0 - 发行笔记</a></li> 1.8 - <li><a href="releases/3.0/relnotes.cn.html">SliTaz GNU/Linux 3.0 - 发行笔记</a></li> 1.9 - <li><a href="/en/doc/releases/2.0/relnotes.en.html">SliTaz GNU/Linux 2.0 - 发行笔记</a></li> 1.10 - <li><a href="/en/doc/releases/1.0/relnotes.en.html">SliTaz GNU/Linux 1.0 - 发行笔记</a></li> 1.11 +<?php 1.12 + $relnotes = array(); 1.13 + for ($release = 1;; $release++) { 1.14 + $file = "releases/".$release.".0/relnotes.cn.html"; 1.15 + if (!file_exists($file)) { 1.16 + $file = "../../en/doc/releases/".$release.".0/relnotes.en.html"; 1.17 + if (!file_exists($file)) 1.18 + break; 1.19 + } 1.20 + array_unshift($relnotes, array("release" => $release.".0", "file" => $file)); 1.21 + } 1.22 + foreach ($relnotes as $release) { 1.23 + print " <li><a href=\"".$release["file"]."\">SliTaz GNU/Linux ".$release["release"]." -\n"; 1.24 + print " 发行笔记</a></li>\n"; 1.25 + } 1.26 +?> 1.27 </ul> 1.28 1.29 <!-- End of content -->