= 0) { return $tense = 'just now'; } elseif ($difference > 0) { $tense = 'ago'; } else { $tense = 'later'; } for ($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) { $difference /= $lengths[$j]; } $difference = round($difference); $period = $periods[$j] . ($difference >1 ? 's' :''); return "{$difference} {$period} {$tense} "; } if (count(array_keys($_GET)) < 2) { header("Location: /") and die; } $projects = array_map(function ($id) { return json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/fetcher/projects/" . $id), true); }, array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/fetcher/projects"), function ($i) { return str_ends_with($i, ".json"); })); $projectsList = array_map(function ($project) { return $project['id']; }, $projects); $sel = trim(array_keys($_GET)[0]); if (!in_array($sel, $projectsList)) { header("Location: /") and die; } $project = array_filter($projects, function ($i) use ($sel) { return $i['id'] === $sel; }); sort($project); $project = $project[0]; $branchList = array_map(function ($i) { return $i['id']; }, $project['channels']); $selb = trim(array_keys($_GET)[1]); if (!in_array($selb, $branchList)) { header("Location: /") and die; } $channel = array_filter($project['channels'], function ($i) use ($selb) { return $i['id'] === $selb; }); sort($channel); $channel = $channel[0]; ?> <?= $channel['slug'] ?> | <?= $project['name'] ?> | Minteck Download Center

← Go back to projects list ← Go back to channels list

Minteck Download Center

|

# · deployed · file