-->-->-->-->-->-->-->-->-->-->-->-->--> $bNewFile = false; $sFilePath = ''; $sFileContents = ''; $aaTextLines = ''; $sFilePath = $_GET['file']; if (substr($sFilePath, 0, 1) != "/") { $sFilePath = "/$sFilePath"; } if (!strstr($sFilePath, "/usr50/home/retrovox")) { $sFilePath = "/usr50/home/retrovox".$sFilePath; } $sFilePathEncoded = htmlspecialchars($sFilePath); $sFilePathUrlEncoded = htmlspecialchars(urlencode($sFilePath)); $sWebFilePathEncoded = htmlspecialchars(str_replace("public_html", "", $sFilePath)); $iEditorColumns = $_GET['cols']; $iEditorRows = $_GET['rows']; $bStripSlashes = $_GET['stripslash']; if ($iEditorColumns == '') { $iEditorColumns = 80; } if ($iEditorRows == '') { $iEditorRows = 20; } if ($sFilePath == '/usr50/home/retrovox') { echo " Retrovox Notepad, (No file name specified)

No file name specified

You did not specify any file to be edited


Try Again "; //-- is this possible return; } //-- if no file specified if (is_dir($sFilePath)) { if (substr($sFilePath, -1) != "/") { $sFilePath = "$sFilePath/"; } echo " Retrovox Notepad, (The path is a directory)

The path is a directory

The file-name
  $sFilePathEncoded
which you just specified is a directory (folder). The Retrovox Notepad system is for editing text files located on the server.


  1. Re-enter the file name
  2. Select a file in the directory (folder):
    1. "; //-- Not supported in php 4 //foreach (glob("$sFilePath*") as $sMemberFileName) $aaFiles = ''; $dh = opendir($sFilePath); while (false !== ($sMemberFileName = readdir($dh))) { $aaFiles[] = $sMemberFileName; } sort($aaFiles); reset($aaFiles); foreach ($aaFiles as $sMemberFileName) { echo "
    2. $sFilePath$sMemberFileName
    3. \n"; } echo "
"; return; } //-- if file is a directory if (!is_writable($sFilePath)) { echo " Retrovox Notepad, (File is not writable)

The file is not writable

The file-name [$sFilePathEncoded] which you just specified has its permissions set so that is cannot be edited (updated or modified in any way). You can overcome this problem by typing

            chmod a+w $sFilePath
          
when you are logged into the retrovox server. This sometimes works. However, the web-server (Apache) runs as the user 'nobody' which seems to cause some permissions headaches. You can also try copying the old file to a new one.


  1. Re-enter the file name
  2. Copy the file
"; return; } //-- if file not writeable if (file_exists($sFilePath)) { $aaTextLines = file($sFilePath); $sFileContents = implode('', $aaTextLines); $bNewFile = false; } else { $bNewFile = true; } if ($bStripSlashes != '') { $sEditorContents = stripslashes(htmlspecialchars($sFileContents)); } else { $sEditorContents = htmlspecialchars($sFileContents); } //--<--<--<--<--<--<--<--<--<--<--<--<--<--< ?> Retrovox Notepad
The Retrovox Notepad

Copy the Current File | Select a Different File
Editing file:

Copy the Current File | Select a Different File