home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / admin / editor.inc.php < prev    next >
Encoding:
PHP Script  |  2004-06-02  |  3.3 KB  |  82 lines

  1. <?php
  2.  
  3.   /* let's make it talk more than just one language */
  4.     include ("./config.inc.php");
  5.     include ("../lang/".$lang."/editor.php");
  6.  
  7. $WINDIR = $_SERVER["WINDIR"];
  8. $uri = $_SERVER["PHP_SELF"];
  9. $date = date("Ymd0000");
  10. $realdate = date("Y.m.d");
  11.  
  12. preg_match ("/^.*?@(.*)$/",$_SERVER["SERVER_ADMIN"],$domain);
  13. $curdomain = $domain[1];
  14.  
  15. # All available *.conf-files @ {AP2CONFDIR} except CCs
  16. //$tswcgi = array ("$desc_edt_tswcgi","$tsw_inst_path\Apache2\conf\httpd.cgi.conf");
  17. $tswhandler = array ("$desc_edt_tswhan", "$tsw_inst_path\Apache2\conf\httpd.conf");
  18. $sslconf = array ("$desc_edt_sslcnf","$tsw_inst_path\Apache2\conf\mods\ssl.conf");
  19. $vhconf = array ("$desc_edt_vhost","$tsw_inst_path\Apache2\conf\virtualHost.conf");
  20. $aspconf = array ("$desc_edt_asp","$tsw_inst_path\Apache2\conf\mods\asp.conf");
  21. $perlconf = array ("$desc_edt_perl","$tsw_inst_path\Apache2\conf\mods\mod_perl.conf");
  22. $proxyconf = array ("$desc_edt_proxy","$tsw_inst_path\Apache2\conf\mods\proxy.conf");
  23. $secuconf = array ("$desc_edt_secu","$tsw_inst_path\Apache2\conf\mods\security.conf");
  24. $pythonconf = array ("$desc_edt_python","$tsw_inst_path\Apache2\conf\mods\psp.conf");
  25. $gzipconf = array ("$desc_edt_gzip","$tsw_inst_path\Apache2\conf\mods\mod_gzip.conf");
  26.  
  27. $mysqlini = array ("$desc_edt_myini","$tsw_inst_path\DB\MySQL4\conf\my.ini");
  28.  
  29. # Available notes-files
  30. $priv1 = array ("$desc_note1","$tsw_inst_path\Apache2\admin\priv\\note1.txt");
  31. $priv2 = array ("$desc_note2","$tsw_inst_path\Apache2\admin\priv\\note2.txt");
  32. $priv3 = array ("$desc_note3","$tsw_inst_path\Apache2\admin\priv\\note3.txt");
  33.  
  34. # All available *.conf-files outside {AP2CONFDIR} and application-conf's
  35. $phpHini = array ("$desc_edt_phpHini","$tsw_inst_path\Apache2\conf\php.ini");
  36. $phpCini = array ("$desc_edt_phpCini","$WINDIR\php.ini");
  37. $pmaconf = array ("$desc_edt_pma","$tsw_inst_path\Apache2\admin\\tools\pma\config.inc.php");
  38. $ibwaconf = array ("$desc_edt_ibwa","$tsw_inst_path\Apache2\admin\\tools\ibwa\inc\configuration.inc.php");
  39. $hamipac = array ("$desc_edt_hamster","$tsw_inst_path\Mail\IPAccess.hst");
  40. $fbgconf = array ("$desc_edt_firebird","$tsw_inst_path\DB\FireBird\firebird.conf");
  41.  
  42. #only required if Register globals is off
  43. if($_GET['load']){ $load=$_GET['load']; }
  44. if($_GET['feed']){ $feed=$_GET['feed']; }
  45.  
  46. $mesage = ${$load}[0];
  47. $path = ${$load}[1];
  48. $file = $path;
  49. $feed = stripslashes($feed);
  50.  
  51. if($_GET['action'] == "write"){
  52. $mesg = "<br>$write2file <b>$file</b> </span><br>";
  53. write_file($feed,$file);
  54. }
  55.  
  56. $fhr = fopen("$file", "r");
  57. $data = fread($fhr,filesize($file));
  58. fclose ($fhr);
  59.  
  60. function write_file($feed,$file){
  61.     $fhw = fopen("$file", "w");
  62.     $ok = fwrite ($fhw,"$feed");
  63.     fclose ($fhw);
  64. }
  65.  
  66. ?>
  67.  
  68. <html>
  69. <title>Editing : <?php echo $mesage; ?></title>
  70. <link rel=stylesheet href=../../css/style.css>
  71. <center>
  72. <p class=manipheadtitle><font size=5><?php echo $mesage; ?></font></p>
  73. <?php echo $allow_edt; ?><br>
  74. <?php echo $u_r_edt; ?> <b><?php echo $file; ?></b><br> <?php echo $mesg; ?></span><br>
  75.  
  76. <form name="form" method="post" action="<?php echo "{$uri}?load={$load}&action=write"; ?>">
  77. <textarea class=input name="feed" cols="100" rows="25" wrap="OFF"><?php echo $data; ?></textarea>
  78. <br><br><?php echo "<input class=submit type=\"submit\" value=\"".$w2f_submit."\">"; ?>
  79. </form>
  80.  
  81. </center>
  82. </html>