$smarty->assign("order_by", $order_by); $smarty->assign("order_dir", $order_dir); $smarty->assign("start", $start); $smarty->assign("limit", $limit); $smarty->assign("vignettes", $vignettes); $smarty->assign("displayMode", $displayMode); $smarty->assign("displaySizes", $displaySizes); $smarty->assign("fileNotUsed", $fileNotUsed); $smarty->assign("extensionsAuthorized", $extensionsAuthorized); $smarty->assign("uploadOK", $uploadOK); $smarty->assign("dimMax", $dimMax); $smarty->assign("dimThumbs", $dimThumbs); //Breadcrumbs $smarty->assign("racine_start", $racine_start); $smarty->assign("racine", $racine); $smarty->assign("getLastError", $file_list->getLastError()); $short_path = str_replace($racine_start, "", $path); $path_items = explode('/', $short_path); $current_path = $racine_start; $path_items_filtred = array(); foreach ($path_items as $folder) { if ($folder == ".." || $folder == "." || $folder == "") { continue; } $current_path .= $folder . "/"; $path_items_filtred[$current_path] = htmlspecialchars($folder); } $smarty->assign("path_items_filtred", $path_items_filtred); $smarty->assign("search", $search); // file table $smarty->assign("getOrderLink_KEY_NAME", getOrderLink(File_List::KEY_NAME));
// 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 /> below and you can play with the example. Add more than <?php print $limit; ?> files to see some pagination.</p> <?php } ?> <!-- Begin Breadcrumbs --> <div id="breadcrumbs"> <?php if ($file_list->getLastError()) { print '<p align="center" style="color:#f00;">' . $file_list->getLastError() . '</p>';