//By default this script will allow you to edit all the files in $filedir that //have extensions in the valid_ext array and are writable. It also allows you //to edit all the files that are writable and have valid extensions in the sub //folders of $filedir. In other words, it recursively searches for files you //can edit in $filedir. If you wish to change this behavior, so that it only //stays in $filedir and doesn't drill down to any of its subdirs,--search for //$filelist = directoryToArray($filedir, true); and change true to false. //YOU MUST CHANGE THIS VARIABLE!! Specify the full path to the directory of //files you wish to be able to edit. NO TRAILING SLASH. $filedir = "/home/harriman/public_html"; //Valid Extension array. //The array below lists the extensions files must have in order to //show up in the selection drop down box of fileed.php. NOTE: In order for you //to be able to edit a file it must have an extension in the array below and //must be writable (chmoded 666). It must also be in the $filedir folder or //in a subfolder in the $filedir folder. All folders that the script must //transverse in order to reach your file must be chmoded at least 555. To //add a new extenstion to this array do the following: //1. Copy the bottom valid_ext line. Insert a new line below it // (hit enter). Paste the line you copied. //2. Increase [x] by one. //3. Change the text inside the quotes to the extension you want to allow. // Case must match exactly. //4. Save your changes. $valid_ext[0] = "TXT"; $valid_ext[1] = "txt"; $valid_ext[2] = "htm"; $valid_ext[3] = "HTM"; $valid_ext[4] = "html"; $valid_ext[5] = "HTML"; $valid_ext[6] = "shtm"; $valid_ext[7] = "SHTM"; $valid_ext[8] = "shtml"; $valid_ext[9] = "SHTML"; $valid_ext[10] = "pl"; $valid_ext[11] = "PL"; $valid_ext[12] = "cgi"; $valid_ext[13] = "CGI"; $valid_ext[14] = "CSS"; $valid_ext[15] = "css"; $valid_ext[16] = "conf"; $valid_ext[17] = "CONF"; $valid_ext[18] = "ASP"; $valid_ext[19] = "asp"; $valid_ext[20] = "JSP"; $valid_ext[21] = "jsp"; $valid_ext[22] = "js"; $valid_ext[23] = "JS"; $valid_ext[24] = "php"; $valid_ext[25] = "PHP"; $valid_ext[26] = "php3"; $valid_ext[27] = "PHP3"; $valid_ext[28] = "PHTML"; $valid_ext[29] = "phtml"; $valid_ext[30] = "ini"; $valid_ext[31] = "INI"; $valid_ext[32] = "cfm"; $valid_ext[33] = "CFM"; $valid_ext[34] = "inc"; $valid_ext[35] = "INC"; //That should cover what most people use! I hope anyhow :) //Password authentication for editing sensitive files $password_enabled = 'true'; //Change to 'true' to enable passwords $password = 'password'; //If you enable passwords, change this! if($password_enabled == 'true'){ session_start(); //Enable cookies //If neither password nor cookie is present if($_POST['password']!= $password && $_SESSION['password'] != $password){ print '
Could not open directory!!
Permissions Problem??
Could not open file!!
Permissions Problem??
File saved.
Click here to go back to the editor.
File NOT saved!!
Permissions Problem??
Click here to go back to the editor.
File NOT saved!!
Permissions Problem??