Go to Admin CP. " . $folder . "\n"; } else { if($act == 'nothing'){ echo "<--- please choose something from the left"; } if ($act == 'view') { $files = glob($folder . "*" . $file_ext); if (count($files) == 0) { $content .= "There are no " . $file_ext . " files in the folder " . $folder . "\n"; } else { $content .= "\n"; $content .= "\n"; $content .= "
\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; foreach ($files as $file) { $content .= "\n"; $filesizes += filesize($file); } $content .= "\n"; $content .= "\n"; $content .= "
File NameFile OptionsFile Size
" . str_replace($folder, null, $file) . "• Edit
• View
• Delete
" . filesize($file) . " bytes
Total Files: " . count($files) . "Total File Sizes: " . number_format($filesizes) . " bytes


Other Options:
• Create a New File
\n"; $content .= "
\n"; } } if ($act == 'edit') { $file = $_GET['file']; if (file_exists($folder . $file)) { if (!$_POST['submit']) { if (is_readable($folder . $file)) { $fg = file_get_contents($folder . $file); echo "
\n"; echo "
\n"; echo "\n"; echo "

\n"; echo "\n"; }else { echo "The file is not readable, please check the permissions of the file!\n"; } }else { $contents = $_POST['contents']; if(!$contents){ echo "Please enter something for the file contents!\n"; }else { if(!is_writable($folder . $file)){ echo "The file is not writable, please check the permissions of the file!\n"; }else { $f = @fopen($folder . $file, "w"); fwrite($f, $contents); fclose($f); $content .= "". $file ." has been successfully updated, click here to continue updating, or click here to edit a different file!\n"; } } } } } if($act == 'new'){ if(!$_POST['submit']){ $content .= "
\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "
File Namedo not include ".$file_ext."
\n"; }else { $filename = urlencode($_POST['filename']); if(!$filename){ $content .= "You did not supply a filename!\n"; }else { $file = $folder . $filename . $file_ext; if(file_exists($file)){ $content .= "This file already exists!\n"; }else { $f = fopen($file, "w"); if(!$f){ $content .= "The file could not be created, please check your folder permissions!\n"; }else { $content .= "The file ". str_replace($folder, null, $file) ." has been created! Click here to view your files!\n"; } fclose($f); } } } } if($act == 'delete'){ $file = $_GET['file']; if(file_exists($folder . $file)){ unlink($folder . $file); $content .= "The file ".$file." has been deleted! Click here to view your files!\n"; }else { $content .= "This file does not exist!\n"; } } } } else { $content .= $folder . " is not a real folder!\n"; } if (!empty($content)) { ?> SANTA FE Storage :: Admin :: File Editor