»

Var_Name =array ("ServerName","ServerAdmin","DirectoryIndex","AddHandler server-parsed","ServerSignature","Listen"); $apache->Var_Text =array ( "".$US['aconfig-sname']."","".$US['aconfig-wemail']."","".$US['aconfig-difiles']."", "".$US['aconfig-ssi']."","".$US['aconfig-ssig']."","".$US['aconfig-listen'].""); $apache->Var_Help =array ( "http://httpd.apache.org/docs/mod/core.html#servername", "http://httpd.apache.org/docs/mod/core.html#serveradmin", "http://httpd.apache.org/docs/mod/mod_dir.html#directoryindex", "http://httpd.apache.org/docs/mod/mod_include.html", "http://httpd.apache.org/docs/mod/core.html#serversignature", "http://httpd.apache.org/docs/2.0/bind.html"); // import_request_variables("gP", "st"); $step=$HTTP_POST_VARS['Submit']; if ($step == "next") { echo "

".$US['aconfig-text-0']."

"; } else { if ($step == "Save") { $apache->replace_values ($HTTP_POST_VARS); echo "

".$US['aconfig-text-1']."

"; } ?>

"; $apache->echo_values (); ?>

".$US['aconfig-module']."

"; } else { echo "

".$US['aconfig-cgi']."

"; } } //-------------------------------------------------------------------- class Config { var $contents; var $name; var $comments; var $Var_Name; var $Var_Text; var $Var_Help; var $classnum; function Config ($file_name, $comments) { $this->comments=$comments; $this->name=$file_name; $fd = fopen ($this->name, "r"); $this->contents = fread ($fd, filesize ($file_name)); fclose ($fd); $this->classnumber=$GLOBALS["$Configclassnumber"]=$GLOBALS["$Configclassnumber"]+1; } function f_write () { $fd = fopen ($this->name, "w"); $ok = fwrite ($fd, $this->contents); fclose ($fd); } function echo_values () { include "includes/lang/".file_get_contents("includes/.lang").".php"; echo ""; $item=0; foreach ($this->Var_Name as $loop){ $Var_ID="C".$this->classnumber."i".$item; $Var_Name=$this->Var_Name[$item]; $Var_Text=$this->Var_Text[$item]; $Var_Help=$this->Var_Help[$item]; $comments=$this->comments; preg_match("/\n\s*$Var_Name\s+([^$comments^\n]+)/i", $this->contents, $tag); echo " "; echo ""; $item=$item+1; } echo "

$Var_Text:

"; if ($Var_Help != "") {echo "".$US['aconfig-help']."";}; echo "

"; echo "
"; } function replace_values ($HTTP_POST_VARS) { $item=0; foreach ($this->Var_Name as $loop){ $Var_ID="C".$this->classnumber."i".$item; $data=$HTTP_POST_VARS[$Var_ID]; $comments=$this->comments; $this->contents=preg_replace("/\n(\s*$loop)\s+([^$comments]+)/i", "\n\\1 $data\n\n", $this->contents, 1); $item=$item+1; } $this->f_write (); } } ?>