Use phpliteadmin for configuration
This commit is contained in:
parent
80e64a13d8
commit
74bef7543a
|
@ -1,2 +1,3 @@
|
|||
## Custom
|
||||
.links.db
|
||||
phpliteadmin.config.php
|
||||
|
|
|
@ -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`.
|
||||
|
|
|
@ -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;");
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue