diff --git a/.gitignore b/.gitignore index 4c2e4d1..c09d55f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.log *.log.* jilo.db -jilo-web.db packaging/deb-package/ packaging/rpm-package/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f626ce..af090e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ All notable changes to this project will be documented in this file. - Added jvb health-check scheduled and stopped events - Added "no operational bridges" and "no bridge available" events - Added "jitsi-component" service level events search in jilo-cli -- Added initial version of jilo-web, PHP web interface to jilo +- Added initial version of jilo-web, PHP web interface to jilo (then moved to own repo) ### Changed diff --git a/jilo-web/README.md b/jilo-web/README.md deleted file mode 100644 index cb40253..0000000 --- a/jilo-web/README.md +++ /dev/null @@ -1,13 +0,0 @@ -requirements - -- web server (deb: apache | nginx) - -- php support in the web server (deb: php-fpm | libapache2-mod-php) - -- pdo and pdo_sqlite support in php (deb: php-db, php-sqlite3) uncomment in php.ini: ;extension=pdo_sqlite - -TODO - -- jilo-web.db outside web root - -- jilo-web.db writable by web server user diff --git a/jilo-web/config.apache b/jilo-web/config.apache deleted file mode 100644 index e69de29..0000000 diff --git a/jilo-web/config.nginx b/jilo-web/config.nginx deleted file mode 100644 index e69de29..0000000 diff --git a/jilo-web/install.sh b/jilo-web/install.sh deleted file mode 100755 index e0389f5..0000000 --- a/jilo-web/install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -echo 'todo install script' diff --git a/jilo-web/jilo-web.conf b/jilo-web/jilo-web.conf deleted file mode 100644 index e69de29..0000000 diff --git a/jilo-web/jilo-web.schema b/jilo-web/jilo-web.schema deleted file mode 100644 index d932839..0000000 --- a/jilo-web/jilo-web.schema +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE users ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - username TEXT NOT NULL UNIQUE, - password TEXT NOT NULL -); diff --git a/jilo-web/public_html/classes/database.php b/jilo-web/public_html/classes/database.php deleted file mode 100644 index 065902f..0000000 --- a/jilo-web/public_html/classes/database.php +++ /dev/null @@ -1,25 +0,0 @@ -pdo = new PDO("sqlite:" . $dbFile); - $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - } catch (PDOException $e) { - throw new Exception('DB connection failed: ' . $e->getMessage()); - } - } - - public function getConnection() { - return $this->pdo; - } - -} - -?> diff --git a/jilo-web/public_html/classes/user.php b/jilo-web/public_html/classes/user.php deleted file mode 100644 index 4debec9..0000000 --- a/jilo-web/public_html/classes/user.php +++ /dev/null @@ -1,37 +0,0 @@ -db = $database->getConnection(); - } - - public function register($username, $password) { - $hashedPassword = password_hash($password, PASSWORD_DEFAULT); - $query = $this->db->prepare("INSERT INTO users (username, password) VALUES (:username, :password)"); - $query->bindParam(':username', $username); - $query->bindParam(':password', $hashedPassword); - - return $query->execute(); - } - - public function login($username, $password) { - $query = $this->db->prepare("SELECT * FROM users WHERE username = :username"); - $query->bindParam(':username', $username); - $query->execute(); - - $user = $query->fetch(PDO::FETCH_ASSOC); - if ( $user && password_verify($password, $user['password'])) { - session_start(); - $_SESSION['user_id'] = $user['id']; - $_SESSION['username'] = $user['username']; - return true; - } else { - return false; - } - } - -} - -?> diff --git a/jilo-web/public_html/index.php b/jilo-web/public_html/index.php deleted file mode 100644 index 295a788..0000000 --- a/jilo-web/public_html/index.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/jilo-web/public_html/login.php b/jilo-web/public_html/login.php deleted file mode 100644 index 410769a..0000000 --- a/jilo-web/public_html/login.php +++ /dev/null @@ -1,30 +0,0 @@ -login($username, $password) ) { - echo "Login successful."; - } else { - echo "Login failed."; - } - } -} catch (Exception $e) { - $error = $e->getMessage(); -} - -include 'templates/header.php'; -include 'templates/form-login.php'; -include 'templates/footer.php'; - -?> - diff --git a/jilo-web/public_html/logout.php b/jilo-web/public_html/logout.php deleted file mode 100644 index 9bde4b1..0000000 --- a/jilo-web/public_html/logout.php +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/jilo-web/public_html/register.php b/jilo-web/public_html/register.php deleted file mode 100644 index 54a8fab..0000000 --- a/jilo-web/public_html/register.php +++ /dev/null @@ -1,29 +0,0 @@ -register($username, $password) ) { - echo "Registration successful."; - } else { - echo "Registration failed."; - } - } -} catch (Exception $e) { - $error = $e->getMessage(); -} - -include 'templates/header.php'; -include 'templates/form-register.php'; -include 'templates/footer.php'; - -?> diff --git a/jilo-web/public_html/templates/all.css b/jilo-web/public_html/templates/all.css deleted file mode 100644 index e1565bf..0000000 --- a/jilo-web/public_html/templates/all.css +++ /dev/null @@ -1,25 +0,0 @@ - -ul.menu { - list-style-type: none; - margin: 0; - margin-bottom: 10px; - padding: 0; - overflow: hidden; - background-color: #333; -} - -ul.menu li { - float: right; -} - -ul.menu li a { - display: block; - color: white; - text-align: center; - padding: 14px 16px; - text-decoration: none; -} - -ul.menu li a:hover { - background-color: #111; -} diff --git a/jilo-web/public_html/templates/body.php b/jilo-web/public_html/templates/body.php deleted file mode 100644 index 7ccbe49..0000000 --- a/jilo-web/public_html/templates/body.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/jilo-web/public_html/templates/footer.php b/jilo-web/public_html/templates/footer.php deleted file mode 100644 index 1f7ef79..0000000 --- a/jilo-web/public_html/templates/footer.php +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/jilo-web/public_html/templates/form-login.php b/jilo-web/public_html/templates/form-login.php deleted file mode 100644 index 5e5cbe3..0000000 --- a/jilo-web/public_html/templates/form-login.php +++ /dev/null @@ -1,7 +0,0 @@ - - -
- - - -
diff --git a/jilo-web/public_html/templates/form-register.php b/jilo-web/public_html/templates/form-register.php deleted file mode 100644 index 3a2a4b6..0000000 --- a/jilo-web/public_html/templates/form-register.php +++ /dev/null @@ -1,7 +0,0 @@ - - -
- - - -
diff --git a/jilo-web/public_html/templates/header.php b/jilo-web/public_html/templates/header.php deleted file mode 100644 index c67d13a..0000000 --- a/jilo-web/public_html/templates/header.php +++ /dev/null @@ -1,38 +0,0 @@ -Error: $error

"; -} - -?> - - - - - - Jilo Web - - - - -