$delItem_vig = str_replace($myAdmin->suffixeVignettes . $num . $delItem_extension, $myAdmin->suffixeVignettes . $num . $delItem_extension, $delItem_vig); if (file_exists($delItem_vig)) { unlink($delItem_vig); } } } } // suppression d'un fichier // Get started looking for files if (!file_exists($path)) { $res = mkdir($path); chmod($path, octdec($thisSite->DROITS_DOSSIER_ECRITURE)); } $file_list = new File_List(); if (strlen($search) > 2) { $listing = $file_list->getListing($path, File_List::TYPE_BOTH, $order_by, $order_dir, 0, 1000, $displaySizes); } else { $listing = $file_list->getListing($path, File_List::TYPE_BOTH, $order_by, $order_dir, $start, $limit, $displaySizes); } // preparation template $smarty->assign("field", $field); $smarty->assign("startFolder", $startFolder); $smarty->assign("from", $from); $smarty->assign("CKEditor", $CKEditor); $smarty->assign("CKEditorFuncNum", $CKEditorFuncNum); $smarty->assign("tmfield", $tmfield); $smarty->assign("path", $path); $smarty->assign("order_by", $order_by); $smarty->assign("order_dir", $order_dir); $smarty->assign("start", $start); $smarty->assign("limit", $limit);
// // $Id:$ // // The Class File location require_once 'file_list.class.php'; // Look for GET parameters that affect the display of files $path = isset($_GET['path']) ? $_GET['path'] : '../'; $order_by = isset($_GET['order']) ? $_GET['order'] : File_List::KEY_NAME; $order_dir = isset($_GET['dir']) ? $_GET['dir'] : File_List::ASC; $start = isset($_GET['start']) ? $_GET['start'] : 0; $limit = isset($_GET['limit']) ? $_GET['limit'] : 10; // Very important to sanitize the Path for security //$path = sanitizePath($path); // Get started looking for files $file_list = new File_List(); $listing = $file_list->getListing($path, File_List::TYPE_BOTH, $order_by, $order_dir, $start, $limit); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;"> <title>File List Class Full Example</title> <link rel="stylesheet" type="text/css" href="outils/filelistclass/stylex.css" /> </head> <body> <?php // Show a messge when there are no items in the top folder if (!$file_list->getLastItemCount() && !$file_list->getLastError() && !$path) { ?> <p align="center">This example requires that you add files to the subdirectory "files". Once you've done that, they will be listed<br />