Commit 15d04d18 authored by Sam Hocevar's avatar Sam Hocevar

* removed rewrite.php3, added footer.php3.

  * removed some rewrite rules and absolute paths.
  * appropriately changed web pages.
parent a7dea694
......@@ -16,16 +16,6 @@ RewriteRule ^packages(.*)$ /pub/vlc$1 [R=permanent,L]
RewriteRule ^screenshots(.*)$ /vlc/screenshots$1 [R=permanent,L]
RewriteRule ^team.html /team/index.html [R=permanent,L]
#
# The core engine
#
# directory/ -> directory/index.html
RewriteRule ^(.*)/$ /include/rewrite.php3?dir=$1&page=index&%{QUERY_STRING} [L]
# toto.html -> include/rewrite.php3?page=toto
RewriteRule ^([^/]+)\.html$ /include/rewrite.php3?page=$1&%{QUERY_STRING} [L]
# directory/toto.html -> include/rewrite.php3?dir=directory&page=toto
RewriteRule ^(.*)/([^/]+)\.html$ /include/rewrite.php3?dir=$1&page=$2&%{QUERY_STRING} [L]
#
# MIME Types
AddType application/octet-stream .dmg
......
<?
$title = "404 forbidden";
require("header.php3");
?>
<h1>403 forbidden</h1>
<p> Nice try :-) </p>
<? require("footer.php3"); ?>
<?
$title = "404 not found";
require("header.php3");
?>
<h1>404 not found</h1>
<p>Please check your links, or contact <a href="mailto:info@videolan.org">the
VideoLAN team</a> if you think there should be something here. </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - Contact us";
$lang = "en";
$date = "28 Septembre 2001";
require("header.php3");
?>
<h1>Contacting the VideoLAN team</h1>
......@@ -25,3 +26,5 @@
<p>If you want to contact the French team, about partnerships
for example, write to <a href="mailto:videolan@videolan.org">
videolan@videolan.org</a>.</p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - Contribute to the project";
$lang = "en";
$date = "24 July 2002";
require("header.php3");
?>
<h1>How can I contribute to the VideoLAN project ?</h1>
......@@ -192,3 +193,5 @@ move faster, we welcome donations.
</p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - CVS repository";
$lang = "en";
$date = "5 October 2001";
require("header.php3");
?>
<h1>CVS repository</h1>
......@@ -64,3 +65,5 @@ href="/pub/videolan/vlc/snapshots/">daily VLC CVS snapshots</a>. </p>
repository when you have shown your skills and ability to write good
patches :) </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - Documentation";
$lang = "en";
$date = "40 October 2002";
require("header.php3");
?>
<h1>User documentation</h1>
......@@ -123,3 +124,4 @@
</table>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - Thank you for your donation";
$lang = "en";
$date = "06 July 2002";
require("header.php3");
?>
<p>
......@@ -26,3 +27,5 @@ contact VideoLAN's Treasurer, write a mail to Alexis de Lattre (<a
href="mailto:treasurer@videolan.org">treasurer@videolan.org</a>).
</p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "Le projet VideoLAN à l'ECP";
$lang = "fr";
$date = "12 octobre 2002";
require("header.php3");
?>
<h1>Le projet VideoLAN à l'ECP</h1>
......@@ -27,3 +28,4 @@
<h2>Planning</h2>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - the events";
$lang = "en";
$date = "6 April 2002";
require("header.php3");
?>
<h1>The events in the VideoLAN project</h1>
......@@ -83,3 +84,5 @@ and streaming.</p>
<h2>April 2001 - VideoLAN at the OpenSource days in Lyon</h2>
<p><a href="20010407/index.html">Slides of the presentation (in french)</a></p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - list of CSS-free DVDs";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>List of CSS-free DVDs</h1>
......@@ -216,3 +217,5 @@ be added to the first list when we are able to confirm. </p>
<?
pg_close ($base);
?>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - ChangeLog for ".ereg_replace("^.*/([^/]+)/*$","\\1",$dir);
$lang = "en";
$date = "12 April 2001";
require("header.php3");
?>
<h1>Changelog for <tt><? print ereg_replace("^.*/([^/]+)/*$","\\1",$dir); ?></tt></h1>
......@@ -102,3 +103,4 @@
?>
<? require("footer.php3"); ?>
<?
if($date=="") {
$date = date("d-m-Y",filemtime($page));
} else {
$date .= " (last modified: ".date("d M Y",filemtime($page)).")";
}
/* bottom of the page */
bottom($title, $lang, $date);
stopmenu($title);
stophtml();
?>
......@@ -41,6 +41,15 @@ function starthtml($title) { ?>
<link rel="stylesheet" type="text/css" href="/main.css" />
</head>
<body>
<table width="100%" cellspacing="3" cellpadding="0"><tr>
<td style="background-color: #ffaaaa;" width="17%" align="center">Home</td>
<td style="background-color: #ffcccc;" width="16%" align="center">VLC Media Player</td>
<td style="background-color: #ffaaaa;" width="17%" align="center">Streaming</td>
<td style="background-color: #ffaaaa;" width="17%" align="center">Documentation</td>
<td style="background-color: #ffaaaa;" width="16%" align="center">Support</td>
<td style="background-color: #aaffaa;" width="17%" align="center">Developers</td>
</tr></table>
<? }
function menu_vlc() { ?>
......@@ -233,5 +242,23 @@ function stopmenu() { ?>
</html>
<? }
/*
* the real code
*/
$lang=""; $date=""; $title="";
if($mirror)
{
header("Location: http://$mirror/$page.html");
die();
}
/* default language and date */
if($lang=="") { $lang = "en"; }
/* render the page */
starthtml(ereg_replace("<[^>]*>","",$title));
startmenu($title);
?>
<?
$include = "/var/www/www.videolan.org/include/";
$htdocs = "/var/www/www.videolan.org/";
$lang=""; $date=""; $title="";
/* redirect user to the actual page */
/* if($redirect) {
$query = ereg_replace("page=[^&]*&*","",$query);
$query = ereg_replace("dir=[^&]*&*","",$query);
$query = ereg_replace("\\?*&*$","",$query);
header("Location: http://sam.zoy.org$query");
die();
} */
if($mirror)
{
header("Location: http://$mirror/$page.html");
die();
}
/* presuppose the page can be accessed and it is not a directory index */
$access = 1;
$index = 0;
/* tidy directory and file name */
$dir = ereg_replace("%2[Ff]","/",urlencode($dir));
$dir = ereg_replace("/+","/","/".$dir."/");
$page = ereg_replace("/","",urlencode($page)).".html";
/* get rid of script kiddies wannabe */
do {
$olddir = $dir;
$dir = ereg_replace("/[^/]*/\\.\\./","/",$dir);
} while ($dir != $olddir);
if(ereg("/\\.\\./", "/".$dir."/")) {
$dir = "/";
$access = 0;
}
/* go to the directory if it exists, otherwise send a 403 */
if(filetype($htdocs.$dir) == "dir") {
chdir($htdocs.$dir);
} else {
$access = 0;
}
/* if the file doesn't exist, send a 404 */
if(!file_exists($page)) {
if($page == "index.html" && $access) {
$index = 1;
} else {
Header("HTTP/1.1 404 Not Found");
chdir($htdocs);
$page = "404.html";
}
}
/* manage the 403 */
if(!$access) {
Header("HTTP/1.1 403 Forbidden");
chdir($htdocs);
$page = "403.html";
}
if($index) {
$lang = "en";
$date .= "last modification: ".date("d M Y",filemtime("."));
$title = "Index of <code>".htmlentities($dir)."</code>";
} else {
/* read the commands in the file between <? and ?> */
$fd = fopen($page,"r");
$line = fgets($fd,1023);
/* if the page is already HTMLized, include() it */
if(eregi("<.*html",$line)) {
include($page);
die();
}
if("<?" == substr($line,0,2)) {
do {
$line=fgets($fd,1023);
eval($line);
}
while((substr($line,0,2) != "?>") && ($line != ""));
}
fclose($fd);
}
/* load common functions */
include($include."/header.php3");
/* default language and date */
if($lang=="") { $lang = "en"; }
/* render the page */
starthtml(ereg_replace("<[^>]*>","",$title));
startmenu($title);
/* if it is a directory index, print it ; otherwise, include the page */
if($index) {
?><h1><?echo $title;?></h1>
<ul><li><a href="../"><em>parent directory</em></a></li><?
/* Create a sorted array */
$listing=array(); $handle=opendir('.');
while ($file = htmlentities(readdir($handle))) {
if ($file != "." && $file != "..") {
$listing[]=$file;
}
}
closedir($handle); sort($listing); reset($listing);
while ($file = current($listing)) {
?><li><code><a href="<?echo $file;?>"><?echo $file;?></a></code></li><?
next($listing);
}
?></ul><?
} else {
/* We cannot use require() since $page may be non-existant */
include($page);
}
if($date=="") {
$date = date("d-m-Y",filemtime($page));
} else {
$date .= " (last modified: ".date("d M Y",filemtime($page)).")";
}
/* bottom of the page */
bottom($title, $lang, $date);
stopmenu($title);
stophtml();
?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - TODO list";
$lang = "en";
$date = "1 May 2001";
require("header.php3");
?>
<h1>TODO list</h1>
......@@ -245,3 +246,4 @@ urgency("Critical");?>. </p>
<? stats( "Easy" ); ?></td>
</tr></table>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - OpenSource Video streaming solution for every OS !";
$lang = "en";
$date = "06 April 2002";
require("header.php3");
?>
<table border="0" cellspacing="10">
......@@ -106,3 +107,5 @@ page</a> for more information.</p>
<h2>News</h2>
<? shownews("full",5); ?>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - introduction";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>Introduction to VideoLAN</h1>
......@@ -100,3 +101,5 @@ You can download in French and in PDF format our official brochures:</p>
<li>a page on the <a href="/images/diff.pdf">Network solution</a>,</li>
<li>and a page on the <a href="/images/comm.pdf">users of VideoLAN and its futur projects</a>.</li>
</ul>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - links";
$lang = "en";
$date = "14 Octobre 2001";
require("header.php3");
?>
<h1>Links</h1>
......@@ -81,3 +82,5 @@
href="http://www.tldp.org/HOWTO/Multicast-HOWTO.html">
Multicast HOWTO</a> </li>
</ul>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - mailing-lists";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>VideoLAN mailing-lists</h1>
......@@ -71,3 +72,5 @@ subscription or unsubscription.</p>
<p>Our mailing-list manager is called Ecartis.
Experienced users can issue their commands to
<a href="mailto:ecartis@videolan.org">ecartis@videolan.org</a>.</p>
<? require("footer.php3"); ?>
<?
require("header.php3");
require("footer.php3");
?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - news";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>VideoLAN news archive</h1>
......@@ -11,3 +12,5 @@
shownews("full",0);
?>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - our partners";
$lang = "en";
$date = "5 February 2002";
require("header.php3");
?>
<h1>VideoLAN's partners</h1>
......@@ -152,3 +153,5 @@ sides : </p>
</tr>
</table>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - mailing-lists subscription";
$lang = "en";
$date = "30 March 2001";
require("header.php3");
?>
<?
......@@ -94,3 +95,5 @@
}
?>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "the VideoLAN team";
$lang = "en";
$date = "7 April 2002";
require("header.php3");
?>
<h1>the VideoLAN team</h1>
......@@ -139,3 +140,5 @@ VideoLAN</a>.
<p>Laurent Aimar, Nicolas de Rotalier, Zhe Han, Simon Latapie, Julien
Leproust, Arnaud Meltz, Loïc Minier, Eric Petit and Arnaud Schauly.</p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - Tests sur la Residence de l'Ecole Centrale !";
$lang = "fr";
$date = "26 Mai 2002";
require("header.php3");
?>
<h1> VideoLAN - Tests de diffusion sur la Rez </h1>
......@@ -240,3 +241,4 @@ es sous Windows.</p>
<p> Un channel <code>#videolan</code> est disponible sur le serveur IRC
<code>irc.2-h.org</code>.</p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - vlc on BeOS";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>vlc on BeOS</h1>
......@@ -40,3 +41,4 @@ try to crack the disc key. It can sometimes take up to 10 minutes. This
problem should be solved when we find a better way to crack the key.
</p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - vlc on BSD";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>vlc on BSD (FreeBSD, OpenBSD, NetBSD, BSD/OS)</h1>
......@@ -46,3 +47,4 @@ straightforward. </p>
href="ftp://ftp.to.gd-es.com/pub/BSDI/libdvd.tar.bz2"><code>ftp://ftp.to.gd-es.com/pub/BSDI/libdvd.tar.bz2</code></a>.
</p> -->
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN Client - Developers reference";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>Developers documentation</h1>
......@@ -52,3 +53,4 @@ possible. You can also ask questions in the development mailing-list
IRC (<code>#videolan</code>, <code>irc.videolan.org</code> or any OPN
server) if you want to help us but don't know where to start. </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - user documentation";
$lang = "en";
$date = "14 October 2001";
require("header.php3");
?>
<h1>User documentation</h1>
......@@ -63,3 +64,5 @@
<p> You can join the <code>#videolan</code> channel on
<code>irc.videolan.org</code> or on any other OPN IRC server and meet
the developers there.</p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN Client - download";
$lang = "en";
$date = "16 April 2001";
require("header.php3");
?>
<? function pkgitem($version,$name) { ?><li><a href="/pub/videolan/vlc/<? echo $version."/".$name; ?>"><code><? echo $name; ?></code></a></li><? } ?>
......@@ -214,3 +215,4 @@ FTP site. </p>
<p> Many thanks to Yves Duret for the Mandrake packages. </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - vlc on iPAQ Familiar Linux";
$lang = "en";
$date = "21 November 2002";
require("header.php3");
?>
<h1>VLC on iPAQ Familiar Linux</h1>
......@@ -70,3 +71,5 @@ The following screenshot are from Familiar Linux interface which supports GTK+ a
</tr></tbody></table>
</p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - MPEG and DVD for every OS, free !";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>VideoLAN Client - a cross-platform multimedia player</h1>
......@@ -85,3 +86,5 @@ multicasted on an IPv4 or IPv6 network.</p>
</tr>
</table>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - vlc on Linux";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>vlc on Linux</h1>
......@@ -38,3 +39,4 @@ see how the port is going along. </p>
<p> GNU/Linux is our main development platform, so the Linux port will
always be the most complete. </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - vlc on MacOS X";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>VLC on MacOS X</h1>
......@@ -54,3 +55,4 @@ to build the main vlc application. </p>
<p> Starting from VLC 0.2.90, a binary distribution is also available
is the <a href="download.html"> download section</a>. </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - vlc on QNX RTOS";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>vlc on QNX RTOS</h1>
......@@ -34,3 +35,4 @@ see how the port is going along. </p>
<p> The native video output is pretty slow. </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - screenshots";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>Screenshots</h1>
......@@ -107,3 +108,4 @@ href="http://www.linuxvideo.org/oms/oms-screenshotbig.jpeg">here</a>.
<p> For very old screenshots, you can <a href="/screenshots/">browse</a>
the screenshot directory. </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - vlc on Solaris";
$lang = "en";
$date = "14 February 2001";
require("header.php3");
?>
<h1>vlc on Solaris</h1>
......@@ -34,3 +35,4 @@ see how the port is going along. </p>
<p> (none) </p>
<? require("footer.php3"); ?>
......@@ -2,6 +2,7 @@
$title = "VideoLAN - vlc on Windows";
$lang = "en";
$date = "14 October 2001";
require("header.php3");
?>
<h1>vlc on Windows</h1>
......@@ -58,3 +59,4 @@ The directx development package on <a href="dx7headers.tgz">dx7headers.tgz</a>.
and it eats much less CPU than the <i>Windows Media Player</i> on a MPEG or DivX
file.</p>
<? require("footer.php3"); ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment