$file_hash = hacklogdm_admin::get_file_hash($file_path . $file); } break; // use server file // use server file case 0: $file = addslashes(trim(hacklogdm_admin::post('file'))); $file = hacklogdm_admin::download_rename_file($file_path, $file); $file_size = filesize($file_path . $file); $file_hash = hacklogdm_admin::get_file_hash($file_path . $file); break; // upload local file // upload local file case 1: //do edit upload $data = hacklogdm_admin::upload_local_file(hacklogdm_admin::post('file_upload_to'), 1); if (!$data) { $die = 1; } else { $file_name = $data['file_name']; $file = $data['file']; $file_size = $data['file_size']; $file_hash = $data['file_hash']; } break; // use remote file // use remote file case 2: $file = addslashes(trim(hacklogdm_admin::post('file_remote'))); if (!hacklogdm::is_remote_file($file)) { hacklogdm_admin::add_error(__('Error: Please give me a valid URL.', hacklogdm::textdomain));