addSearchKeyword('recursive', @$_GET['search_recursively']); $search->addSearchKeyword('mtime_from', @$_GET['search_mtime_from']); $search->addSearchKeyword('mtime_to', @$_GET['search_mtime_to']); $search->addSearchKeyword('size_from', @$_GET['search_size_from']); $search->addSearchKeyword('size_to', @$_GET['search_size_to']); $search->addSearchKeyword('recursive', @$_GET['search_recursively']); $search->addSearchKeyword('name', @$_GET['search_name']); $search->doSearch(); $fileList = $search->getFoundFiles(); $folderInfo = $search->getRootFolderInfo(); }else { include_once(CLASS_MANAGER); include_once(CLASS_SESSION_ACTION); $sessionAction = new SessionAction(); include_once(DIR_AJAX_INC . "class.manager.php"); $manager = new manager(); $manager->setSessionAction($sessionAction); $fileList = $manager->getFileList(); $folderInfo = $manager->getFolderInfo(); } $pagination->setUrl(CONFIG_URL_FILEnIMAGE_MANAGER); }else { include_once(CLASS_PAGINATION); $pagination = new pagination(false); } $pagination->setTotal(sizeof($fileList)); $pagination->setFirstText(PAGINATION_FIRST); $pagination->setPreviousText(PAGINATION_PREVIOUS); $pagination->setNextText(PAGINATION_NEXT); $pagination->setLastText(PAGINATION_LAST); $pagination->setLimit(!empty($_GET['limit'])?(int)($_GET['limit']):CONFIG_DEFAULT_PAGINATION_LIMIT); echo $pagination->getPaginationHTML(); echo "\n"; if (!empty($_GET['view'])) { switch($_GET['view']) { case 'detail': case 'thumbnail': case 'text': $view = $_GET['view']; break; default: $view = CONFIG_DEFAULT_VIEW; } }else { $view = CONFIG_DEFAULT_VIEW; } switch($view) { case 'text': //list file name only include_once(DIR_AJAX_ROOT . '_ajax_get_text_listing.php'); break; case 'thumbnail': //list file with thumbnail include_once(DIR_AJAX_ROOT . '_ajax_get_thumbnail_listing.php'); break; case 'detail': default: include_once(DIR_AJAX_ROOT . '_ajax_get_details_listing.php'); } ?>