find($userid, \App\Models\User::$commonFields); if (empty($userInfo)) { stderr('Error', "User not exists."); } $pageTitle = $userInfo->username . ' - H&R'; stdhead($pageTitle); print("
" . implode(' | ', $headerFilters) . "
"); $q = htmlspecialchars($_GET['q'] ?? ''); $filterForm = << FORM; begin_main_frame("", true); print $filterForm; $baseQuery = \App\Models\HitAndRun::query()->where('uid', $userid)->where('status', $status); $rescount = (clone $baseQuery)->count(); list($pagertop, $pagerbottom, $limit, $offset, $pageSize) = pager(50, $rescount, sprintf('?%s&', $queryString)); print("| {$lang_myhr['th_hr_id']} | {$lang_myhr['th_torrent_name']} | {$lang_myhr['th_uploaded']} | {$lang_myhr['th_downloaded']} | {$lang_myhr['th_share_ratio']} | {$lang_myhr['th_seed_time_required']} | {$lang_myhr['th_completed_at']} | {$lang_myhr['th_ttl']} | {$lang_myhr['th_comment']} | {$lang_functions['std_action']} | '; if ($row->uid == $CURUSER['id'] && in_array($row->status, \App\Models\HitAndRun::CAN_PARDON_STATUS)) { $hasActionRemove = true; $columnAction .= sprintf('', $lang_myhr['action_remove'], $row->id); } $columnAction .= ' | '; print("
| " . $row->id . " | " . optional($row->torrent)->name . " | " . mksize($row->snatch->uploaded) . " | " . mksize($row->snatch->downloaded) . " | " . get_hr_ratio($row->snatch->uploaded, $row->snatch->downloaded) . " | " . $row->seedTimeRequired . " | " . format_datetime($row->snatch->completedat) . " | " . $row->inspectTimeLeft . " | " . nl2br(trim($row->comment)) . " | {$columnAction}