break; // upload local file to server // upload local file to server case 1: $data = hacklogdm_admin::upload_local_file(hacklogdm_admin::post('file_upload_to')); break; // add remote file // add remote file case 2: $data = hacklogdm_admin::add_remote_file(addslashes(trim(hacklogdm_admin::post('file_remote'))), hacklogdm_admin::post('file_save_to'), hacklogdm_admin::post('save_to_local')); break; } //end inner switch (add file ) if (!$data) { $die = 1; } else { // duplicated file check if (hacklogdm_admin::check_duplicate_file(hacklogdm_admin::post('file_type'), $data['file'], $data['file_hash'])) { $die = 1; } } if (!$die) { $do_tab = 0; $current_file_base_name = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : $_SERVER['PHP_SELF']; if (basename($current_file_base_name) == 'download-upload-or-add.php') { $do_tab = 1; } hacklogdm_admin::add_new_file($data, $do_tab); } } hacklogdm_admin::show_message_or_error();