#!/usr/local/bin/perl
# index_run.cgi
# Allows running of a new command

require './proc-lib.pl';
if (!$access{'run'}) {
	&redirect("index_tree.cgi");
	}
use Config;
&header($text{'index_title'}, "", "run", !$no_module_config, 1);
print "<hr>\n";
&ReadParse();
&index_links("run");

print "<form action=run.cgi method=post>\n";
print "<table>\n";
print "<tr> <td>",&hlink("<b>$text{'run_command'}</b>","cmd"),"</td>\n";
print "<td><input name=cmd size=40>\n";
print "<input type=submit value=\"$text{'run_submit'}\"></td> </tr>\n";

print "<tr> <td>",&hlink("<b>$text{'run_mode'}</b>","mode"),"</td>\n";
print "<td><input type=radio name=mode value=1> $text{'run_bg'}\n";
print "<input type=radio name=mode value=0 checked> $text{'run_fg'}</td>\n";
print "</tr>\n";

print "<tr> <td valign=top>",
      &hlink("<b>$text{'run_input'}</b>","input"),"</td>\n";
print "<td><textarea name=input rows=5 cols=30></textarea></td> </tr>\n";
print "</table></form>\n";

print "<hr>\n";
&footer("/", $text{'index'});
