[TAG] Linux FTP servers for uploads
Rick Moen
rick at linuxmafia.com
Mon May 10 23:54:14 MSD 2004
Quoting Jay R. Ashworth (jra at baylink.com):
> BTW, you have a broken link in the footnotes of
> http://linuxmafia.com/faq/Network_Other/ftp-daemons.html, pointing to
> http://linuxmafia.com/~rick/faq/#djb, which appears to have been caught
> in a re-org. I was diasppointed; I love to hear a good DJB-is-a-moron
> rant.
Fixed. Thanks. Revised link is
http://linuxmafia.com/~rick/faq/index.php?page=warez#djb
The former "rants" page at http://linuxmafia.com/~rick/faq/ grew by
degrees to ghastly length, and also its circa-1995 HTML was looking
pretty dingy, so, some months ago, I re-did the whole thing in PHP with
cascading style sheets, breaking it down by category. It'll never win
any webmaster awards, but looks a lot better.
Also, the PHP "require" directive in PHP _is_ a lifesaver. Here's the
entire index.php source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>But That's Just My Opinion. I Could Be Wrong.</title>
<link rel="stylesheet" type="text/css" href="rants.css">
</head>
<body>
<div id="content">
<p><em>The most recent version of these essays can be found at <a href="
http://linuxmafia.com/~rick/faq/">http://linuxmafia.com/~rick/faq/</a>.</em></p>
<h1><a name="top">Rick's Rants</a></h1>
<p align="center">("That's what
you get for swimming in the shallow end of the gene
pool.")</p>
<?
require("navbar.inc");
?>
<br>
<p><em>Economy of expression</em> is a good thing.
So, rather than have to repeat myself continually,
I'm posting my top rants here, for ready reference.
Many of you (readers) will be visiting today because
I pointedly referred you to the "#"-tagged URL of
some particular item, below.</p>
<br>
<br>
<?
require("toc.inc");
require("body.inc");
require("foot.inc");
?>
</div>
</body>
</html>
Most of the logic's in the three *.inc include files, each of which is
basically a big case statement. Neat! Dead-simple to maintain, and
absolutely no need to fix the same thing in multiple files.
Here's toc.inc (table of contents):
<div id="topcontent">
<h2>Table o' Contents</h2>
<ul>
<?
If ($page == "")
{
include("toc-modems.inc");
}
elseif ($page == modems)
{
include("toc-modems.inc");
}
else
{
print("<li><a href=\"index.php?page=modems\">Modems</a> . . .");
}
if ($page == hardware)
{
include("toc-hardware.inc");
}
else
{
print("<li><a href=\"index.php?page=hardware\">Hardware</a> . . .");
}
if ($page == kicking)
{
include("toc-kicking.inc");
}
else
{
print("<li><a href=\"index.php?page=kicking\">Linux Tire-Kicking</a> . . .");
}
if ($page == virus)
{
include("toc-virus.inc");
}
else
{
print("<li><a href=\"index.php?page=virus\">Virus</a> . . .");
}
if ($page == warez)
{
include("toc-warez.inc");
}
else
{
print("<li><a href=\"index.php?page=warez\">Proprietary Warez</a> . . .");
}
if ($page == maclinux)
{
include("toc-maclinux.inc");
}
else
{
print("<li><a href=\"index.php?page=maclinux\">MacLinux</a> . . .");
}
If ($page == crybaby)
{
include("toc-crybaby.inc");
}
else
{
print("<li><a href=\"index.php?page=crybaby\">Crybaby</a> . . .");
}
if ($page == netiquette)
{
include("toc-netiquette.inc");
}
else
{
print("<li><a href=\"index.php?page=netiquette\">Netiquette</a> . . .");
}
if ($page == misc)
{
include("toc-misc.inc");
}
else
{
print("<li><a href=\"index.php?page=misc\">Miscellany</a> . . .");
}
?>
</ul>
</div>
More information about the TAG
mailing list