$file = hacklogdm_admin::post('old_file'); if (hacklogdm::is_remote_file($file)) { $file_size = hacklogdm_admin::remote_filesize($file); $file_hash = 'N/A'; } else { $file_size = filesize($file_path . $file); $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;