Location: PHPKode > scripts > File Editor > index.php
<?php
session_start();
include "file-editor-class.php";
$continut='<h1 style="margin-top:0px;margin-bottom:5px;">Edit files</h1>'.$_SESSION['mesaj_eroare_de_afisat'];
$_SESSION['mesaj_eroare_de_afisat']="";//this is the error message

$folder="test_folder"; //folder name

$style=array("style" => "color: blue; font-size:12px;"); //style of listed files
$extensions=array("html", "txt"); //allowed extensions, * for all

$form=array("name"=>"formname", "action" => "do.php?act=salvare_fisier"); //textarea form settings
$style_textarea=array("name" => "text_content", "rows" => "20", "cols"=>"85"); //textarea settings
$output_it=TRUE; 



$files= new  file_editor();
//settings
$files -> set_style($style, "index.php", "file"); //fileedit.php - the file where the class is used | file = the filename ($_GET)variable
$files -> only_these_ext($extensions); //default extensions (must be array) are htm, html
//settings


$continut.= $files -> set_folder($folder,"select"); //$folder = name of the folder, "select" = display the content of the folder in a select box - also available: text_only, link, list, list_link 
$continut.= $files -> textarea_settings($form, $style_textarea, $output_it); //

echo $continut;
?>
Return current item: File Editor