⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reconfig_form.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# reconfig_form.cgi# Displays a list of supported modules, and allows the user to pick which# ones are installed in apacherequire './apache-lib.pl';&ReadParse();$access{'global'}==1 || &error($text{'reconfig_ecannot'});&header($text{'reconfig_title'}, "");print "<hr>\n";# build list of modules compiled into apache($ver, $mods) = &httpd_info($config{'httpd_path'});if (!$ver) {	print &text('reconfig_ever', "<tt>$config{'httpd_path'}</tt>",		    "/config.cgi?$module_name"),"<p>\n";	print "<hr>\n";	&footer("/", $text{'index'});	exit;	}foreach $m (@$mods) {	if (-r "$m.pl") { $inst{$m}++; }	}# build list of dynamically loaded modules$conf = &get_config();foreach $l (&find_directive_struct("LoadModule", $conf)) {	if ($l->{'words'}->[1] =~ /(mod_\S+)\.so/ && -r "$1.pl") {		$inst{$1}++;		}	elsif ($l->{'words'}->[1] =~ /lib([^\/\s]+)\.so/ && -r "mod_$1.pl") {		$inst{"mod_$1"}++;		}	}# build list of supported modulespush(@mods, "core");opendir(DIR, ".");foreach $f (readdir(DIR)) {	if ($f =~ /^(mod_\S+)\.pl$/) { push(@mods, $1); }	}closedir(DIR);if (!$in{'vol'}) {	print $text{'reconfig_desc1'};	}else {	print $text{'reconfig_desc2'};	}print "<p> <form action=reconfig.cgi>\n";print "<input type=hidden name=size value=$in{'size'}>\n";print "<input type=hidden name=ver value=\"$ver\">\n";print "<table width=100%>\n";for($i=0; $i<@mods; $i++) {	if ($i%4 == 0) { print "<tr>\n"; }	print "<td><input type=checkbox name=mods value=$mods[$i] ",	      ($inst{$mods[$i]} ? "checked" : ""),"> $mods[$i]</td>\n";	if ($i%4 == 3) { print "</tr>\n"; }	}print "</table>\n";print "<input type=submit value=\"$text{'reconfig_ok'}\"></form>\n";print "<hr>\n";if ($in{'vol'}) { &footer("", $text{'index_return'}); }else { &footer("/", $text{'index'}); }

⌨️ 快捷键说明

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