if (file_exists(_EXT_PATH . '/include/' . strtolower(basename($action)) . '.php')) { require_once _EXT_PATH . '/include/' . strtolower(basename($action)) . '.php'; } $classname = 'ext_' . $action; if (class_exists(strtolower($classname)) && is_callable(array($classname, 'execaction'))) { $handler = new $classname(); $handler->execAction($dir, $item); } else { switch ($action) { // Execute actions, which are not in class file //------------------------------------------------------------------------------ // COPY/MOVE FILE(S)/DIR(S) case "copy": case "move": require_once _EXT_PATH . "/include/copy_move.php"; copy_move_items($dir); break; //------------------------------------------------------------------------------ // SEARCH FOR FILE(S)/DIR(S) //------------------------------------------------------------------------------ // SEARCH FOR FILE(S)/DIR(S) case "search": require_once _EXT_PATH . "/include/search.php"; search_items($dir); break; //------------------------------------------------------------------------------ // USER-ADMINISTRATION //------------------------------------------------------------------------------ // USER-ADMINISTRATION case "admin": require_once _EXT_PATH . "/include/admin.php";
//------------------------------------------------------------------------------ // DELETE FILE(S)/DIR(S) //------------------------------------------------------------------------------ // DELETE FILE(S)/DIR(S) case "delete": require "./.include/fun_del.php"; del_items($GLOBALS["dir"]); break; //------------------------------------------------------------------------------ // COPY/MOVE FILE(S)/DIR(S) //------------------------------------------------------------------------------ // COPY/MOVE FILE(S)/DIR(S) case "copy": case "move": require "./.include/fun_copy_move.php"; copy_move_items($GLOBALS["dir"]); break; //------------------------------------------------------------------------------ // DOWNLOAD FILE //------------------------------------------------------------------------------ // DOWNLOAD FILE case "download": ob_start(); // prevent unwanted output require "./.include/fun_down.php"; ob_end_clean(); // get rid of cached unwanted output download_item($GLOBALS["dir"], $GLOBALS["item"]); ob_start(false); // prevent unwanted output exit;
case "edit": require "./_include/edit_editarea.php"; edit_file($current_dir, $GLOBALS["item"]); break; // DELETE FILE(S)/DIR(S) // DELETE FILE(S)/DIR(S) case "delete": require "./_include/del.php"; del_items($current_dir); break; // COPY/MOVE FILE(S)/DIR(S) // COPY/MOVE FILE(S)/DIR(S) case "copy": case "move": require "./_include/copy_move.php"; copy_move_items($current_dir); break; // DOWNLOAD FILE // DOWNLOAD FILE case "download": ob_start(); // prevent unwanted output require "./_include/down.php"; ob_end_clean(); // get rid of cached unwanted output global $item; _debug("download item: {$current_dir}/{$item}"); if ($item == '') { show_error($GLOBALS["error_msg"]["miscselitems"]); } download_item($current_dir, $item);