Author: toff
Date: 2004-08-22 06:11:05 +0400 (Sun, 22 Aug 2004)
New Revision: 490
Modified:
trunk/packs.matroska.org/data/index.php.en
trunk/packs.matroska.org/data/links.txt
Log:
Added filesize array and some helper function used to display stats
Modified: trunk/packs.matroska.org/data/index.php.en
===================================================================
--- trunk/packs.matroska.org/data/index.php.en 2004-08-22 00:51:45 UTC (rev 489)
+++ trunk/packs.matroska.org/data/index.php.en 2004-08-22 02:11:05 UTC (rev 490)
@@ -30,10 +30,10 @@
<div id="content">
<h2><strong>Matroska Pack Full v<? echo $latest; ?></strong></h2>
- <a href="/latest/Matroska_Pack_Full.exe" target="_self">Download</a> (3.37 MB / 3'416'305 Bytes) - <a href="/<?php echo $latest; ?>/Matroska_Pack_Full.exe">permalink</a><br/>
+ <a href="/latest/Matroska_Pack_Full.exe" target="_self">Download</a> (<? printFileSize($latest,"Matroska_Pack_Full"); ?>) - <a href="/<?php echo $latest; ?>/Matroska_Pack_Full.exe">permalink</a><br/>
<div class="tiny">Downloads so far:
- <!-- counter --> <? echo ($download[$latest]["Matroska_Pack_Full"] + $download["1.0.2"]["Matroska_Pack_Full"]); ?>
- since 1st April 2004</div>
+ <!-- counter --> <? echo totalCount("Matroska_Pack_Full"); ?>
+ since 1st April 2004 (this version only: <? echo $download[$latest]["Matroska_Pack_Full"]?>)</div>
<p>The famous full pack will not only allow playing matroska media files (.mkv and .mka), but it will also allow playback
of most modern video formats on any DirectShow player, even with WMP 6.4/7/8/9
@@ -62,10 +62,10 @@
<br/>
<h2><strong>Matroska Pack Lite v<? echo $latest; ?></strong></h2>
- <a href="/latest/Matroska_Pack_Lite.exe" target="_self">Download</a> (0.75 MB / 768'931 Bytes) - <a href="/<?php echo $latest; ?>/Matroska_Pack_Lite.exe">permalink</a><br/>
+ <a href="/latest/Matroska_Pack_Lite.exe" target="_self">Download</a> (<? printFileSize($latest,"Matroska_Pack_Lite"); ?>) - <a href="/<?php echo $latest; ?>/Matroska_Pack_Lite.exe">permalink</a><br/>
<div class="tiny">Downloads so far:
- <!-- counter --> <? echo ($download[$latest]["Matroska_Pack_Lite"] + $download["1.0.2"]["Matroska_Pack_Lite"]); ?>
- since 1st April 2004</div>
+ <!-- counter --> <? echo totalCount("Matroska_Pack_Lite"); ?>
+ since 1st April 2004 (this version only: <? echo $download[$latest]["Matroska_Pack_Lite"]?>)</div>
<p>Reduced to the max, this pack contains only the very <strong>basic stuff needed to play matroska
files</strong> with Vorbis audio and Subtitles on DirectShow players, so in
@@ -77,10 +77,10 @@
<br/>
<h2><strong>Matroska Pack MPEG4 v<? echo $latest; ?></strong></h2>
- <a href="/latest/Matroska_Pack_MPEG4.exe" target="_self">Download</a> (2.18 MB / 2'235'499 Bytes) - <a href="/<?php echo $latest; ?>/Matroska_Pack_MPEG4.exe">permalink</a><br/>
+ <a href="/latest/Matroska_Pack_MPEG4.exe" target="_self">Download</a> (<? printFileSize($latest,"Matroska_Pack_MPEG4"); ?>) - <a href="/<?php echo $latest; ?>/Matroska_Pack_MPEG4.exe">permalink</a><br/>
<div class="tiny">Downloads so far:
- <!-- counter --> <? echo ($download[$latest]["Matroska_Pack_MPEG4"] + $download["1.0.2"]["Matroska_Pack_MPEG4"]); ?>
- since 1st April 2004</div>
+ <!-- counter --> <? echo totalCount("Matroska_Pack_MPEG4"); ?>
+ since 1st April 2004 (this version only: <? echo $download[$latest]["Matroska_Pack_MPEG4"]?>)</div>
<p>This pack is based on the full pack, but has all the stuff removed which is not necessary for playback
of a typical DivX/XviD MKV file, delivering decoders for</p><ul>
@@ -98,8 +98,25 @@
<h1>You can also download older versions:</h1>
<ul>
+<?
+ foreach($links as $versionKey => $versionArray) {
+ if ($versionKey <> $latest) {
+ echo "<li>v$versionKey : <ul>";
+ foreach($versionArray as $linkKey => $linkValue) {
+ echo "<li><a href=\"/$versionKey/".$linkKey.".exe\">".str_replace('_', ' ', $linkKey)."</a> (";
+ printFileSizeShort($versionKey,$linkKey);
+ echo ", " . $download[$versionKey][$linkKey] . " downloads)</li>";
+ }
+ echo "</ul></li>";
+ }
+ }
+?>
+
+<!--
<li>v1.0.2 : <a href="/1.0.2/Matroska_Pack_Full.exe">Full</a>, <a href="/1.0.2/Matroska_Pack_MPEG4.exe">MPEG4</a>, <a href="/1.0.2/Matroska_Pack_Lite.exe">Lite</a>, </li>
<li>v1.0.1 : <a href="/1.0.1/Matroska_Pack_Full.exe">Full</a>, <a href="/1.0.1/Matroska_Pack_MPEG4.exe">MPEG4</a>, <a href="/1.0.1/Matroska_Pack_RealMedia.exe">RealVideo/RealAudio</a>, </li>
+-->
+
</ul>
</div>
</body>
Modified: trunk/packs.matroska.org/data/links.txt
===================================================================
--- trunk/packs.matroska.org/data/links.txt 2004-08-22 00:51:45 UTC (rev 489)
+++ trunk/packs.matroska.org/data/links.txt 2004-08-22 02:11:05 UTC (rev 490)
@@ -1,19 +1,61 @@
-<?php
+<?php
+
+$latest = "1.0.3";
+$stable = "1.0.2";
-$latest = "1.0.3";
-$stable = "1.0.2";
+// ----- 1.0.3 -----
+
+$links["1.0.3"]["Matroska_Pack_Full"] = "http://packs.matroska.org/packs/Matroska_Pack_Full_v1.0.3.exe";
+$links["1.0.3"]["Matroska_Pack_Lite"] = "http://packs.matroska.org/packs/Matroska_Pack_Lite_v1.0.3.exe";
+$links["1.0.3"]["Matroska_Pack_MPEG4"] = "http://packs.matroska.org/packs/Matroska_Pack_MPEG4_v1.0.3.exe";
+
+$filesize["1.0.3"]["Matroska_Pack_Full"] = 3416305;
+$filesize["1.0.3"]["Matroska_Pack_Lite"] = 768931;
+$filesize["1.0.3"]["Matroska_Pack_MPEG4"] = 2235499;
-$links["1.0.3"]["Matroska_Pack_Full"] = "http://packs.matroska.org/packs/Matroska_Pack_Full_v1.0.3.exe";
-$links["1.0.3"]["Matroska_Pack_Lite"] = "http://packs.matroska.org/packs/Matroska_Pack_Lite_v1.0.3.exe";
-$links["1.0.3"]["Matroska_Pack_MPEG4"] = "http://packs.matroska.org/packs/Matroska_Pack_MPEG4_v1.0.3.exe";
+// ----- 1.0.2 -----
+
+$links["1.0.2"]["Matroska_Pack_Full"] = "http://christian.hj.wiesner.bei.t-online.de/packs/Matroska_Pack_Full_v1.0.2.exe";
+$links["1.0.2"]["Matroska_Pack_Lite"] = "http://christian.hj.wiesner.bei.t-online.de/packs/Matroska_Pack_Lite_v1.0.2.exe";
+$links["1.0.2"]["Matroska_Pack_MPEG4"] = "http://matroska.free.fr/packs/Matroska_Pack_MPEG4_v1.0.2.exe";
-$links["1.0.2"]["Matroska_Pack_Full"] = "http://christian.hj.wiesner.bei.t-online.de/packs/Matroska_Pack_Full_v1.0.2.exe";
-$links["1.0.2"]["Matroska_Pack_Lite"] = "http://christian.hj.wiesner.bei.t-online.de/packs/Matroska_Pack_Lite_v1.0.2.exe";
-$links["1.0.2"]["Matroska_Pack_MPEG4"] = "http://matroska.free.fr/packs/Matroska_Pack_MPEG4_v1.0.2.exe";
+$filesize["1.0.2"]["Matroska_Pack_Full"] = 2637117;
+$filesize["1.0.2"]["Matroska_Pack_Lite"] = 749170;
+$filesize["1.0.2"]["Matroska_Pack_MPEG4"] = 1498652;
-$links["1.0.1"]["Matroska_Pack_Full"] = "/packs/Matroska_Pack_Full_v1.0.1.exe";
-$links["1.0.1"]["Matroska_Pack_MPEG4"] = "/packs/Matroska_Pack_MPEG4_v1.0.1.exe";
-$links["1.0.1"]["Matroska_Pack_RealMedia"] = "/packs/Matroska_Pack_RealMedia_v1.0.1.exe";
+// ----- 1.0.1 -----
+
+$links["1.0.1"]["Matroska_Pack_Full"] = "/packs/Matroska_Pack_Full_v1.0.1.exe";
+$links["1.0.1"]["Matroska_Pack_MPEG4"] = "/packs/Matroska_Pack_MPEG4_v1.0.1.exe";
+$links["1.0.1"]["Matroska_Pack_RealMedia"] = "/packs/Matroska_Pack_RealMedia_v1.0.1.exe";
+$filesize["1.0.1"]["Matroska_Pack_Full"] = 1745724;
+$filesize["1.0.1"]["Matroska_Pack_MPEG4"] = 1442829;
+$filesize["1.0.1"]["Matroska_Pack_RealMedia"] = 984972;
-?>
+// ----- Some helper functions -----
+
+ function totalCount($packname) {
+ global $download;
+
+ $total = 0;
+ foreach ($download as $packversionstat) {
+ $total += $packversionstat[$packname];
+ }
+ return $total;
+ }
+
+ function printFileSizeShort($packversion,$packname) {
+ global $filesize;
+ echo round($filesize[$packversion][$packname] / 1024 / 1024, 2) . " MB";
+ }
+
+ function printFileSize($packversion,$packname) {
+ global $filesize;
+
+ echo round($filesize[$packversion][$packname] / 1024 / 1024, 2) . " MB";
+ echo " / ";
+ echo number_format($filesize[$packversion][$packname], 0, '.', '\'') . " Bytes";
+ }
+
+?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.