home *** CD-ROM | disk | FTP | other *** search
- #!perl/bin/perl.exe
-
- print "Content-type: text/html\n\n";
-
- require "../inc/config.inc.cgi";
- require "../lang/$lang/conf.cgi";
-
- $FORM{'act'} = '';
-
- &parseform();
-
- if ($FORM{'act'}eq'-- Ok --'){
- print "<link rel=stylesheet href=../css/style.css><title>$httpdtitle</title>";
- &action;
- }else{
- &entry;
- }
- exit;
-
-
- sub parseform() {
- if($ENV{'REQUEST_METHOD'} eq 'GET'){
- $buffer=$ENV{'QUERY_STRING'};
- }elsif($ENV{'REQUEST_METHOD'} eq 'POST'){
- read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});}
- @pairs = split(/&/, $buffer);
- foreach $pair (@pairs) {
- ($name, $value) = split(/=/, $pair);
- $value =~ tr/+/ /;
- $value =~s/%([a-fA-F0-9][a-fA-F0-9])/pack("c",hex($1))/eg;
- $FORM{$name} = $value;}
- }
-
-
- sub entry {
-
- open (CONF,"< $httpdconf") or print "<b>$httpdconf</b> $cant_be_op<br>";
- @data=<CONF>;
- foreach $d (@data){
- if ($d =~ m~ServerName (.*)~g) {$servername = $1;}
- if ($d =~ m~Listen (.*)~g) {$listen = $1;}
- if ($d =~ m~ServerAdmin (.*)~g) {$serveradmin = $1;}
- if ($d =~ m~LogLevel (.*)~g) {$loglevel = $1;}
- if ($d =~ m~ServerTokens (.*)~g) {$servertokens = $1;}
- if ($d =~ m~ServerSignature (.*)~g) {$serversignature = $1;}
- if ($d =~ m~DirectoryIndex (.*)~g) {$directoryindex = $1;}
- if ($d =~ m~ThreadsPerChild (.*)~g) {$threadsperchild = $1;}
- if ($d =~ m~HostnameLookups (.*)~g) {$hostnamelookups = $1;}
- if ($d =~ m~IndexOptions (.*)~g) {$indexoptions = $1;}
-
- if ($d =~ m/^Include conf\/mods\/php_handler.conf/) {$php = "checked";}
- if ($d =~ m/^Include conf\/mods\/perl.conf/) {$perl = "checked";}
- if ($d =~ m/^Include conf\/mods\/python.conf/) {$python = "checked";}
- if ($d =~ m/^Include conf\/mods\/php_cgi.conf/) {$phpcgi = "checked";}
- if ($d =~ m/^Include conf\/mods\/asp.conf/) {$asp = "checked";}
- if ($d =~ m/^LoadModule ssl_module modules\/mod_ssl.so/) {$ssl = "checked";}
- if ($d =~ m/^LoadModule status_module modules\/mod_status.so/) {$status = "checked";}
- if ($d =~ m/^LoadModule security_module modules\/mod_security.dll/) {$security = "checked";}
- if ($d =~ m/^Include conf\/mods\/proxy.conf/) {$proxy = "checked";}
- if ($d =~ m/^Include conf\/mods\/mod_gzip.conf/) {$gzip = "checked";}
- if ($d =~ m/^LoadModule rewrite_module modules\/mod_rewrite.so/) {$rewrite = "checked";}
-
- }
- close (CONF) or die "$died_wc $httpdconf $with_error( $! )";
-
-
- print "<link rel=stylesheet href=../css/style.css>
- <title>$httpdtitle</title><body class=\"bodymain\"><center>
- <p class=manipheadtitle>$httpdtitle: $httpdcnf</p>
- <span class=tdinfored>$infohead</span><br>";
-
- print "<form name=form1 action=$ENV{SCRIPT_NAME} method=post><br>
- <table width=\"75%\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\" class=\"maniptab\" bgcolor=\"#F5F5F5\">
- <tr><td colspan=\"3\"><span class=\"manipactiv\">$srvmod_extens</span></td></tr>
- <tr>
- <td class=\"manipcheckbox\"><input type=checkbox name=php value=on $php></input>$act_php</td>
- <td class=\"manipcheckbox\"><input type=checkbox name=perl value=on $perl></input>$act_perl</td>
- <td class=\"manipcheckbox\"><input type=checkbox name=python value=on $python></input>$act_python</td></tr>
- <tr>
- <td class=\"manipcheckbox\"><input type=checkbox name=phpcgi value=on $phpcgi></input>$act_phpcgi</td>
- <td class=\"manipcheckbox\"><input type=checkbox name=asp value=on $asp></input>$act_asp</td>
- <td class=\"manipcheckbox\"><input type=checkbox name=ssl value=on $ssl></input>$act_ssl</td></tr>
- <tr><td colspan=\"3\"><span class=\"manipactiv\">$srvmod_mods</span></td></tr>
- <tr>
- <td class=\"manipcheckbox\"><input type=checkbox name=status value=on $status></input>$act_modstatus</td>
- <td class=\"manipcheckbox\"><input type=checkbox name=proxy value=on $proxy></input>$act_modproxy</td>
- <td class=\"manipcheckbox\"><input type=checkbox name=security value=on $security></input>$act_modsecurity</td></tr>
- <tr>
- <td class=\"manipcheckbox\"><input type=checkbox name=gzip value=on $gzip></input>$act_modgzip</td>
- <td class=\"manipcheckbox\"><input type=checkbox name=rewrite value=on $rewrite></input>$act_modrewrite</td>
- <td class=\"manipcheckbox\"> </td></tr>
- </table>
-
- <table width=\"75%\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\" class=\"maniptab\">
- <tr>
- <td class=\"tdinfored\">$php_mod_or_cgi</td>
- </tr>
- </table><br><br>
-
- <table width=\"75%\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\" class=\"maniptab\">
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $sr_name<br><span class=\"maniptext\">$descr_sr</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=servername value=$servername></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $lst_to<br><span class=\"maniptext\">$descr_lst</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=listen value=$listen></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $sr_adm<br><span class=\"maniptext\">$descr_sr_adm</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=serveradmin value=$serveradmin></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $logl<br><span class=\"maniptext\">$descr_logl</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=loglevel value=$loglevel></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $sr_tok<br><span class=\"maniptext\">$descr_sr_tok</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=servertokens value=$servertokens></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $sr_sig<br><span class=\"maniptext\">$descr_sr_sig</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=serversignature value=$serversignature></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $sr_docind<br><span class=\"maniptext\">$descr_docind</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=directoryindex value=\"$directoryindex\"></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $sr_tpc<br><span class=\"maniptext\">$descr_sr_tpc</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=threadsperchild value=$threadsperchild></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $sr_hnl<br><span class=\"maniptext\">$descr_sr_hnl</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=hostnamelookups value=$hostnamelookups></input></td></tr>
- <tr><td class=\"maniptitle\"><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> $sr_indopt<br><span class=\"maniptext\">$descr_sr_indopt</span></td></tr>
- <tr><td><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=indexoptions value=\"$indexoptions\"></input></td></tr>
- </table>
- <br><br><input class=submit type=submit name=act value=\"-- Ok --\"></input></form>";
- }
-
-
- sub action {
-
- open (CONF,"< $httpdconf") or print "$error <b>$httpdconf</b> $cant_be_op<br>";
- @data=<CONF>;
- foreach $d (@data){
- if ($d =~ m~ServerName (.*)~g) {$servername = $1;}
- if ($d =~ m~Listen (.*)~g) {$listen = $1;}
- if ($d =~ m~ServerAdmin (.*)~g) {$serveradmin = $1;}
- if ($d =~ m~LogLevel (.*)~g) {$loglevel = $1;}
- if ($d =~ m~ServerTokens (.*)~g) {$servertokens = $1;}
- if ($d =~ m~ServerSignature (.*)~g) {$serversignature = $1;}
- if ($d =~ m~DirectoryIndex (.*)~g) {$directoryindex = $1;}
- if ($d =~ m~ThreadsPerChild (.*)~g) {$threadsperchild = $1;}
- if ($d =~ m~HostnameLookups (.*)~g) {$hostnamelookups = $1;}
- if ($d =~ m~IndexOptions (.*)~g) {$indexoptions = $1;}
- print CONF $d;
- }
- close (CONF) or die "$died_wc $httpdconf $with_error( $! )";
-
- $servername1 = $FORM{'servername'};
- $listen1 = $FORM{'listen'};
- $serveradmin1 = $FORM{'serveradmin'};
- $loglevel1 = $FORM{'loglevel'};
- $servertokens1 = $FORM{'servertokens'};
- $serversignature1 = $FORM{'serversignature'};
- $directoryindex1 = $FORM{'directoryindex'};
- $threadsperchild1 = $FORM{'threadsperchild'};
- $hostnamelookups1 = $FORM{'hostnamelookups'};
- $indexoptions1 = $FORM{'indexoptions'};
-
- if ($FORM{'php'} eq "on"){$php="on";}else{$php="off"}
- if ($FORM{'perl'} eq "on"){$perl="on";}else{$perl="off"}
- if ($FORM{'python'} eq "on"){$python="on";}else{$python="off"}
- if ($FORM{'phpcgi'} eq "on"){$phpcgi="on";}else{$phpcgi="off"}
- if ($FORM{'asp'} eq "on"){$asp="on";}else{$asp="off"}
- if ($FORM{'ssl'} eq "on"){$ssl="on";}else{$ssl="off"}
- if ($FORM{'status'} eq "on"){$status="on";}else{$status="off"}
- if ($FORM{'proxy'} eq "on"){$proxy="on";}else{$proxy="off"}
- if ($FORM{'security'} eq "on"){$security="on";}else{$security="off"}
- if ($FORM{'gzip'} eq "on"){$gzip="on";}else{$gzip="off"}
- if ($FORM{'rewrite'} eq "on"){$rewrite="on";}else{$rewrite="off"}
-
- open (CONF,"+< $httpdconf") or print "<b>$httpdconf</b> $cant_be_op<br>";
- @data=<CONF>;
- truncate (CONF,0) or die "$died_wt $httpdconf $with_error( $! )";
- close (CONF) or die "$died_wc $httpdconf $with_error( $! )";
- open (CONF,"+< $httpdconf") or print "<b>$httpdconf</b> $cant_be_op<br>";
-
- foreach $d (@data){
- $d =~ s~ServerName $servername~ServerName $servername1~g;
- $d =~ s~Listen $listen~Listen $listen1~g;
- $d =~ s~ServerAdmin $serveradmin~ServerAdmin $serveradmin1~g;
- $d =~ s~LogLevel $loglevel~LogLevel $loglevel1~g;
- $d =~ s~ServerTokens $servertokens~ServerTokens $servertokens1~g;
- $d =~ s~ServerSignature $serversignature~ServerSignature $serversignature1~g;
- $d =~ s~DirectoryIndex $directoryindex~DirectoryIndex $directoryindex1~g;
- $d =~ s~ThreadsPerChild $threadsperchild~ThreadsPerChild $threadsperchild1~g;
- $d =~ s~HostnameLookups $hostnamelookups~HostnameLookups $hostnamelookups1~g;
- $d =~ s~IndexOptions $indexoptions~IndexOptions $indexoptions1~g;
-
- if ($php eq "on"){$d =~ s/^#Include conf\/mods\/php_handler.conf/Include conf\/mods\/php_handler.conf/g;}
- if ($php eq "off"){$d =~ s/^Include conf\/mods\/php_handler.conf/#Include conf\/mods\/php_handler.conf/g;}
- if ($perl eq "on"){$d =~ s/^#Include conf\/mods\/perl.conf/Include conf\/mods\/perl.conf/g;}
- if ($perl eq "off"){$d =~ s/^Include conf\/mods\/perl.conf/#Include conf\/mods\/perl.conf/g;}
- if ($python eq "on"){$d =~ s/^#Include conf\/mods\/python.conf/Include conf\/mods\/python.conf/g;}
- if ($python eq "off"){$d =~ s/^Include conf\/mods\/python.conf/#Include conf\/mods\/python.conf/g;}
- if ($phpcgi eq "on"){$d =~ s/^#Include conf\/mods\/php_cgi.conf/Include conf\/mods\/php_cgi.conf/g;}
- if ($phpcgi eq "off"){$d =~ s/^Include conf\/mods\/php_cgi.conf/#Include conf\/mods\/php_cgi.conf/g;}
- if ($ssl eq "on"){$d =~ s/^#LoadModule ssl_module/LoadModule ssl_module/g;}
- if ($ssl eq "off"){$d =~ s/^LoadModule ssl_module/#LoadModule ssl_module/g;}
- if ($asp eq "on"){$d =~ s/^#Include conf\/mods\/asp.conf/Include conf\/mods\/asp.conf/g;}
- if ($asp eq "off"){$d =~ s/^Include conf\/mods\/asp.conf/#Include conf\/mods\/asp.conf/g;}
- if ($status eq "on"){$d =~ s/^#LoadModule status_module/LoadModule status_module/g;}
- if ($status eq "off"){$d =~ s/^LoadModule status_module/#LoadModule status_module/g;}
- if ($security eq "on"){$d =~ s/^#LoadModule security_module/LoadModule security_module/g;}
- if ($security eq "off"){$d =~ s/^LoadModule security_module/#LoadModule security_module/g;}
- if ($proxy eq "on"){$d =~ s/^#Include conf\/mods\/proxy.conf/Include conf\/mods\/proxy.conf/g;}
- if ($proxy eq "off"){$d =~ s/^Include conf\/mods\/proxy.conf/#Include conf\/mods\/proxy.conf/g;}
- if ($gzip eq "on"){$d =~ s/^#Include conf\/mods\/mod_gzip.conf/Include conf\/mods\/mod_gzip.conf/g;}
- if ($gzip eq "off"){$d =~ s/^Include conf\/mods\/mod_gzip.conf/#Include conf\/mods\/mod_gzip.conf/g;}
- if ($rewrite eq "on"){$d =~ s/^#LoadModule rewrite_module/LoadModule rewrite_module/g;}
- if ($rewrite eq "off"){$d =~ s/^LoadModule rewrite_module/#LoadModule rewrite_module/g;}
-
- print CONF $d;
- }
- close (CONF) or die "$died_wc $httpdconf $with_error( $! )";
-
- print "<center><p class=manipheadtitle>$after_restart</p><br>";
- print "<table width=\"75%\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\" class=\"maniptab\" bgcolor=\"#F5F5F5\">
- <tr><td colspan=\"3\" class=\"manipactiv\">$srvmod_extens</td></tr>
- <tr><td class=\"maniptitle\">$php_act <span class=\"maniptitlered\">$php</span></td>
- <td class=\"maniptitle\">$perl_act <span class=\"maniptitlered\">$perl</span></td>
- <td class=\"maniptitle\">$python_act <span class=\"maniptitlered\">$python</span></td></tr>
- <tr><td class=\"maniptitle\">$phpcgi_act <span class=\"maniptitlered\">$phpcgi</span></td>
- <td class=\"maniptitle\">$asp_act <span class=\"maniptitlered\">$asp</span></td>
- <td class=\"maniptitle\">$ssl_act <span class=\"maniptitlered\">$ssl</span></td></tr>
- <tr><td colspan=\"3\" class=\"manipactiv\">$srvmod_mods</td></tr>
- <tr><td class=\"maniptitle\">$mod_status_act <span class=\"maniptitlered\">$status</span></td>
- <td class=\"maniptitle\">$mod_proxy_act <span class=\"maniptitlered\">$proxy</span></td>
- <td class=\"maniptitle\">$mod_security_act <span class=\"maniptitlered\">$security</span></td></tr>
- <tr><td class=\"maniptitle\">$mod_gzip_act <span class=\"maniptitlered\">$gzip</span></td>
- <td class=\"maniptitle\">$mod_rewrite_act <span class=\"maniptitlered\">$rewrite</span></td>
- <td class=\"maniptitle\"> </td></tr>
- </table><br>";
-
- print "<table width=\"75%\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\" class=\"maniptab\">
- <tr><td class=\"tdinfo\">$sol_srpo<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=servername value=$servername1></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_lst<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=listen value=$listen1></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_sradm<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=serveradmin value=$serveradmin1></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_logl<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=loglevel value=$loglevel1></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_srtok<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=servertokens value=$servertokens1></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_srsig<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=serversignature value=$serversignature1></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_docind<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=directoryindex value=\"$directoryindex1\"></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_tpc<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=threadsperchild value=$threadsperchild1></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_hnl<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=hostnamelookups value=$hostnamelookups1></input></td></tr>
- <tr><td class=\"tdinfo\">$sol_indopt<br><input class=\"manipinput\" type=text size=\"75\" maxlength=\"100\" name=indexoptions value=\"$indexoptions1\"></input></td></tr>
- </table><br>";
-
- print "<table width=\"75%\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\" class=\"maniptab\" bgcolor=\"#F5F5F5\">";
- print "<tr><td class=\"maniptext\"><div align=\"justify\"><b>$httpdcnf</b> $was_edt_succ $if_srn_edt</div></td></tr>";
- print "<tr><td><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> <a href=httpd.ssl.cgi target=_self>$man_sslcnf</a></td></tr>";
- print "<tr><td><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> <a href=manipulation.php target=_self>$click_stst</a></td></tr>";
- print "<tr><td><img src=\"../gfx/fwd.png\" width=\"12\" height=\"11\" border=\"0\" alt=\"\"> <a href=javascript:history.go(-1)>$back</a></td></tr></table>";
- }
- exit;