2022-04-27 16:59:31 +00:00
|
|
|
<?php // Preamble
|
2011-12-11 09:19:48 +00:00
|
|
|
$program = addSlashes ($_REQUEST['program']);
|
2001-01-09 22:33:05 +00:00
|
|
|
$pageName = "CVAR Documentation for " . $program;
|
2007-03-18 04:34:44 +00:00
|
|
|
require "parts/preamble.php"; // Load most of document
|
2001-01-09 19:49:31 +00:00
|
|
|
|
|
|
|
have ('cvar');
|
|
|
|
|
|
|
|
function printRow ($flags, $name, $description)
|
|
|
|
{
|
2001-11-06 09:43:55 +00:00
|
|
|
echo '<TR vAlign="top"><TD>' . $flags . '</TD><TD>' . $name . '</TD><TD>' . $description . '</TD></TR>';
|
2001-01-09 19:49:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function printArray ($cvar_list, $program)
|
|
|
|
{
|
|
|
|
tableBoxHeader ('black', tableHeadColor);
|
|
|
|
tableTitle ("cvars available in " . $program, 3, tableHeadColor);
|
|
|
|
|
|
|
|
printRow ('flags', 'name', 'description');
|
|
|
|
|
|
|
|
while (list (, $cvar) = each ($cvar_list)) {
|
|
|
|
$flags = str_replace (' ', ' ', substr ($cvar, 0, 4));
|
|
|
|
$pos = strpos ($cvar, ':');
|
|
|
|
$name = trim (substr ($cvar, 5, $pos - 6));
|
|
|
|
$description = trim (substr ($cvar, $pos + 1));
|
|
|
|
printRow ($flags, $name, $description);
|
|
|
|
}
|
|
|
|
|
|
|
|
tableBoxFooter ();
|
|
|
|
}
|
|
|
|
|
|
|
|
function printCvarlist ($program)
|
|
|
|
{
|
|
|
|
$cvar_list = file ('doc/' . $program . '-cvar.txt');
|
|
|
|
printArray ($cvar_list, $program);
|
|
|
|
}
|
|
|
|
|
2001-01-09 20:19:24 +00:00
|
|
|
if (strchr ($program, '.') || strchr ($program, '/') || !is_file ('doc/' . $program . '-cvar.txt')) {
|
|
|
|
echo 'no such program.';
|
|
|
|
} else {
|
|
|
|
tableBoxHeader ('black', tableHeadColor);
|
|
|
|
tableTitle ("cvar flags", 2, tableHeadColor);
|
|
|
|
echo '<TR><TD>r</TD><TD>read only. Must be set on command line or in the config file.</TD></TR>';
|
|
|
|
echo '<TR><TD>*</TD><TD>Archived. Will be saved to config.cfg.</TD></TR>';
|
|
|
|
echo '<TR><TD>u</TD><TD>Userinfo. Changes will be sent to the server.</TD></TR>';
|
|
|
|
echo '<TR><TD>s</TD><TD>Serverinfo. Changes will be sent to the clients.</TD></TR>';
|
|
|
|
tableBoxFooter ();
|
|
|
|
echo '<P></P>';
|
|
|
|
printCvarlist ($program);
|
2001-01-09 19:49:31 +00:00
|
|
|
}
|
|
|
|
?>
|