add command docs and update cvar docs for qf-server and qf-client-x11 for

beta7. Others will be forthcoming.
This commit is contained in:
Bill Currie 2001-02-06 19:21:47 +00:00
parent 45d2135875
commit 24d0b67b09
2 changed files with 82 additions and 4 deletions

62
cmd.php Normal file
View file

@ -0,0 +1,62 @@
<? // Preamble>
$pageName = "CVAR Documentation for " . $program;
$focused = "none"; // Dock icon name to gets a border
require("parts/preamble.php"); // Load most of document
?>
<?
have ('cmd');
function printRow ($name, $description)
{
echo '<TR><TD>' . $name . '</TD><TD>' . $description . '</TD></TR>';
}
function printArray ($cmd_list, $program)
{
tableBoxHeader ('black', tableHeadColor);
tableTitle ("cmds available in " . $program, 2, tableHeadColor);
printRow ('name', 'description');
$description = '';
while (list (, $cmd) = each ($cmd_list)) {
$pos = strpos ($cmd, ' :');
if ($pos > 0) {
if ($description) {
printRow ($name, $description);
$description = '';
}
$name = trim (substr ($cmd, 0, $pos - 1));
} else {
if ($description) {
$description = $description . '<BR>' . trim ($cmd);
} else {
$description = trim ($cmd);
}
}
}
if ($description) {
printRow ($name, $description);
$description = '';
}
tableBoxFooter ();
}
function printCmdlist ($program)
{
$cmd_list = file ('doc/' . $program . '-cmd.txt');
printArray ($cmd_list, $program);
}
if (strchr ($program, '.') || strchr ($program, '/') || !is_file ('doc/' . $program . '-cmd.txt')) {
echo 'no such program.';
} else {
printCmdlist ($program);
}
?>
<?
require("parts/postamble.php"); // Finish this sucker up
?>

View file

@ -4,10 +4,8 @@
require("parts/preamble.php"); // Load most of document require("parts/preamble.php"); // Load most of document
?> ?>
<P>cvar documentation</P>
<UL>
<? <?
$cvar_doc_list = array ( $program_list = array (
"qf-client-3dfx", "qf-client-3dfx",
"qf-client-ggi", "qf-client-ggi",
"qf-client-glx", "qf-client-glx",
@ -19,7 +17,12 @@
"qf-client-x11", "qf-client-x11",
"qf-server" "qf-server"
); );
while (list (, $cdl) = each ($cvar_doc_list)) { ?>
<P>cvar documentation</P>
<UL>
<?
reset ($program_list);
while (list (, $cdl) = each ($program_list)) {
if (is_file ('doc/' . $cdl . '-cvar.txt')) { if (is_file ('doc/' . $cdl . '-cvar.txt')) {
echo '<LI>'; echo '<LI>';
echo '<A href="cvar.php?program=' . $cdl . '">' . $cdl . '</A>'; echo '<A href="cvar.php?program=' . $cdl . '">' . $cdl . '</A>';
@ -28,6 +31,19 @@
} }
?> ?>
</UL> </UL>
<P>command documentation</P>
<UL>
<?
reset ($program_list);
while (list (, $cdl) = each ($program_list)) {
if (is_file ('doc/' . $cdl . '-cmd.txt')) {
echo '<LI>';
echo '<A href="cmd.php?program=' . $cdl . '">' . $cdl . '</A>';
echo '</LI>';
}
}
?>
</UL>
<? <?
require("parts/postamble.php"); // Finish this sucker up require("parts/postamble.php"); // Finish this sucker up