mod_log_agent.pl

来自「Unix下基于Web的管理工具」· PL 代码 · 共 34 行

PL
34
字号
# mod_log_agent.pl# Defines editors for logging user agentssub mod_log_agent_directives{$rv = [ [ 'AgentLog', 0, 3, 'virtual' ] ];return &make_directives($rv, $_[0], "mod_log_agent");}sub edit_AgentLog{local($rv);$rv = sprintf "<input type=radio name=AgentLog_mode value=0 %s> Default\n",       $_[0] ? "" : "checked";$rv .= sprintf "<input type=radio name=AgentLog_mode value=1 %s> File..",	 $_[0] && $_[0]->{'value'} !~ /^\|/ ? "checked" : "";$rv .= sprintf "<input type=radio name=AgentLog_mode value=2 %s> Program..",	 $_[0]->{'value'} =~ /^\|/ ? "checked" : "";$rv .= sprintf "<input name=AgentLog size=20 value=\"%s\">\n",        $_[0]->{'value'} =~ /^\|(.*)$/ ? $1 : $_[0]->{'value'};return (1, "Browser log file", $rv); }sub save_AgentLog{if ($in{'AgentLog_mode'} == 0) { return ( [ ] ); }$in{'AgentLog'} =~ /^\S+$/ ||	&error("$in{'AgentLog'} is not a valid agent log filename");if ($in{'AgentLog_mode'} == 1) { return ( [ $in{'AgentLog'} ] ); }else { return ( [ "|$in{'AgentLog'}" ] ); }}1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?