|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/libexec/webmin/squid/ |
Upload File : |
#!/usr/bin/perl
# cachemgr.cgi
# Run the squid cachemgr.cgi program
require './squid-lib.pl';
$access{'cms'} || &error($text{'cach_ecannot'});
($mgr) = glob($config{'cachemgr_path'});
&same_file($0, $mgr) && &error($text{'cach_esame'});
if (&has_command($mgr)) {
$| = 1;
if ($ENV{'REQUEST_METHOD'} eq 'POST') {
# Deal with POST data
&read_fully(STDIN, \$post, $ENV{'CONTENT_LENGTH'});
$temp = &transname();
open(TEMP, ">$temp");
print TEMP $post;
close(TEMP);
open(MGR, "$mgr ".join(" ", @ARGV)." <$temp |");
}
else {
open(MGR, "$mgr ".join(" ", @ARGV)." |");
}
while(<MGR>) {
print;
}
close(MGR);
unlink($temp) if ($temp);
}
else {
&ui_print_header(undef, $text{'cach_err'}, "");
print &text('cach_nfound',$mgr,$module_name);
print "\n<p>\n";
}
&ui_print_footer("", $text{'cach_return'});