mirror of
https://github.com/rekryt/iplist.git
synced 2025-10-12 16:39:35 +03:00
feat: add light version
This commit is contained in:
@@ -16,8 +16,12 @@ class MainController extends AbstractIPListController {
|
||||
public function getBody(): string {
|
||||
$url = parse_url($this->request->getUri());
|
||||
$path = str_replace('..', '', $url['path']);
|
||||
$path = PATH_ROOT . '/public/' . $path;
|
||||
|
||||
if ($path === '/index') {
|
||||
return $this->renderTemplate('index');
|
||||
}
|
||||
|
||||
$path = PATH_ROOT . '/public/' . $path;
|
||||
foreach ([$path, $path . 'index.html', $path . '.html', $path . '/index.html'] as $filePath) {
|
||||
if (isFile($filePath)) {
|
||||
return $this->output($filePath);
|
||||
|
@@ -628,7 +628,7 @@ use OpenCCK\App\Controller\MainController;
|
||||
<div class="github">
|
||||
<iframe src="https://ghbtns.com/github-btn.html?user=rekryt&repo=iplist&type=star&count=true&size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
|
||||
</div>
|
||||
<form action="" method="get" class="main-form">
|
||||
<form action="/" method="get" class="main-form">
|
||||
<section class="main-section">
|
||||
<label class="main-formItem">
|
||||
Format:
|
||||
|
Reference in New Issue
Block a user