Use phpliteadmin for configuration

This commit is contained in:
Florine W. Dekker 2021-03-22 20:17:58 +01:00
parent 80e64a13d8
commit 74bef7543a
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
4 changed files with 6196 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
## Custom
.links.db
phpliteadmin.config.php

View File

@ -1,2 +1,10 @@
# fwdkr.co
Redirection software
## Requirements
PHP 7.3+
## Installation
Copy these files into the desired directory.
Create a database `.links.db` with the necessary tables.
You may override settings from `phpliteadmin.php` in the file `phpliteadmin.config.php`.

View File

@ -3,6 +3,12 @@ include("render.php");
$path = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
if ($path == "/admin") {
$_SERVER["PHP_SELF"] = $path;
include("phpliteadmin.php");
exit();
}
$db = new SQLite3(".links.db", SQLITE3_OPEN_READWRITE);
$stmt = $db->prepare("SELECT * FROM links WHERE path = :path;");

6181
phpliteadmin.php Normal file

File diff suppressed because it is too large Load Diff