better sanity checking

This commit is contained in:
Bill Currie 2001-01-09 20:19:24 +00:00
parent c7aedc8017
commit 3494001aba

View file

@ -36,19 +36,19 @@
printArray ($cvar_list, $program);
}
if (strchr ($program, '.') || strchr ($program, '/')) {
echo 'Go away.';
return;
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);
}
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);
?>
<?