Compare commits
32 Commits
Author | SHA1 | Date |
---|---|---|
|
793600ccb9 | |
|
ac42b6f591 | |
|
fa581f8fb7 | |
|
54678bc329 | |
|
6400854316 | |
|
462e7a45b8 | |
|
fa61eecb15 | |
|
2eb18f0e84 | |
|
d8a756e68a | |
|
e32815dde0 | |
|
825b84ddc8 | |
|
13a2f2482a | |
|
acb314f9fe | |
|
01a497a780 | |
|
cd83494654 | |
|
6596e97889 | |
|
7e5e68dc23 | |
|
08f69dcf05 | |
|
b9d7ac69f5 | |
|
05672680e4 | |
|
d5a628a200 | |
|
714800b5c0 | |
|
fefba65e25 | |
|
dc5d074690 | |
|
91fdba99b2 | |
|
4a9ee48705 | |
|
a4e644261a | |
|
38e15c8cf6 | |
|
2496d3fc93 | |
|
e85e9c577f | |
|
3b3a5c205a | |
|
18e215c92f |
51
CHANGELOG.md
51
CHANGELOG.md
|
@ -7,10 +7,47 @@ All notable changes to this project will be documented in this file.
|
|||
## Unreleased
|
||||
|
||||
#### Links
|
||||
- upstream: https://code.lindeas.com/lindeas/jilo-web
|
||||
- codeberg: https://codeberg.org/lindeas/jilo-web
|
||||
- github: https://github.com/lindeas/jilo-web
|
||||
- gitlab: https://gitlab.com/lindeas/jilo-web
|
||||
- upstream: https://code.lindeas.com/lindeas/jilo-web/compare/v0.1.1...HEAD
|
||||
- codeberg: https://codeberg.org/lindeas/jilo-web/compare/v0.1.1...HEAD
|
||||
- github: https://github.com/lindeas/jilo-web/compare/v0.1.1...HEAD
|
||||
- gitlab: https://gitlab.com/lindeas/jilo-web/-/compare/v0.1.1...HEAD
|
||||
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
|
||||
---
|
||||
|
||||
## 0.1.1 - 2024-07-25
|
||||
|
||||
#### Links
|
||||
- upstream: https://code.lindeas.com/lindeas/jilo-web/compare/v0.1...v0.1.1
|
||||
- codeberg: https://codeberg.org/lindeas/jilo-web/compare/v0.1...v0.1.1
|
||||
- github: https://github.com/lindeas/jilo-web/compare/v0.1...v0.1.1
|
||||
- gitlab: https://gitlab.com/lindeas/jilo-web/-/compare/v0.1...v0.1.1
|
||||
|
||||
### Added
|
||||
- Added duration calculation in conferences listing
|
||||
- Added manual install script
|
||||
- Added DEB and RPM build files
|
||||
- Added Bootstrap (licensed under MIT)
|
||||
|
||||
### Changed
|
||||
- Changed the layout with bootstrap CSS classes
|
||||
|
||||
### Fixed
|
||||
|
||||
---
|
||||
|
||||
## 0.1 - 2024-07-08
|
||||
|
||||
#### Links
|
||||
- upstream: https://code.lindeas.com/lindeas/jilo-web/releases/tag/v0.1
|
||||
- codeberg: https://codeberg.org/lindeas/jilo-web/releases/tag/v0.1
|
||||
- github: https://github.com/lindeas/jilo-web/releases/tag/v0.1
|
||||
- gitlab: https://gitlab.com/lindeas/jilo-web/-/releases/v0.1
|
||||
|
||||
### Added
|
||||
- Initial version
|
||||
|
@ -23,9 +60,3 @@ All notable changes to this project will be documented in this file.
|
|||
- Added demo installation on https://work.lindeas.com/jilo-web-demo/
|
||||
- Added participant search page
|
||||
- Added component events search page
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
|
||||
---
|
||||
|
|
49
README.md
49
README.md
|
@ -1,25 +1,64 @@
|
|||
# Jilo Web
|
||||
|
||||
Jilo Web is a PHP web interface to Jilo (JItsi Logs Observer).
|
||||
## overview
|
||||
|
||||
Jilo Web is a PHP web interface to **[Jilo](https://work.lindeas.com/redirect.php?url=jilo)** (JItsi Logs Observer).
|
||||
|
||||
To have a working installation, in addition to the code here you need a jilo database file, generated by Jilo.
|
||||
|
||||
The webpage for this project is https://lindeas.com/jilo. There you will find information about both Jilo and Jilo Web.
|
||||
|
||||
The main git repo of **Jilo Web** is:
|
||||
- https://code.lindeas.com/lindeas/jilo-web
|
||||
|
||||
It is mirrored at:
|
||||
- https://codeberg.org/lindeas/jilo-web
|
||||
- https://github.com/lindeas/jilo-web
|
||||
- https://gitlab.com/lindeas/jilo-web
|
||||
|
||||
You can use any of these git repos to get the program.
|
||||
|
||||
You are welcome to send feedback with issues, comments and pull requests to a git mirror you prefer.
|
||||
|
||||
## demo
|
||||
|
||||
To see a demo install, go to https://work.lindeas.com/jilo-web-demo/
|
||||
|
||||
## version
|
||||
|
||||
Current version: **0.1.1** released on **2024-07-25**
|
||||
|
||||
## license
|
||||
|
||||
This project is licensed under the GNU General Public License version 2 (GPL-2.0). See LICENSE file.
|
||||
|
||||
Bootstrap is used in this project and is licensed under the MIT License. See bootstrap-license file
|
||||
|
||||
## 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
|
||||
|
||||
## installation
|
||||
|
||||
You can install it in the following ways:
|
||||
|
||||
- download the latest release from the **"Releases"** section here
|
||||
- clone the **git repo**:
|
||||
```bash
|
||||
git clone https://github.com/lindeas/jilo-web.git
|
||||
cd jilo
|
||||
```
|
||||
- DEB and RPM packages are planned, but still unavailable
|
||||
|
||||
## config
|
||||
|
||||
- edit index.php and set the system path to the jilo-web.conf.php
|
||||
- edit jilo-web.conf.php and set all the variables correctly
|
||||
|
||||
- "database" is the sqlite db file for jilo-web itself, create it with `cat jilo-web.schema | sqlite3 jilo-web.db`
|
||||
|
||||
- "jilo_database" is the sqlite db file for jilo, with data from the Jitsi logs
|
||||
|
||||
## database
|
||||
|
||||
The database is an SQLite file. You also need the sqlite db from jilo (mysql/mariadb support is planned, but still unavailable).
|
||||
|
|
2
TODO.md
2
TODO.md
|
@ -8,7 +8,7 @@
|
|||
|
||||
- major refactoring after v0.1
|
||||
|
||||
- - add bootstrap template
|
||||
- - ~~add bootstrap template~~
|
||||
|
||||
- - clean up the code to follow model-view--controller style
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2024 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,7 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName $DOMAIN
|
||||
DocumentRoot $INSTALL_DIR
|
||||
|
||||
CustomLog \${APACHE_LOG_DIR}/jilo-web_access.log combined
|
||||
ErrorLog \${APACHE_LOG_DIR}/jilo-web_error.log
|
||||
</VirtualHost>
|
15
config.nginx
15
config.nginx
|
@ -0,0 +1,15 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name $DOMAIN;
|
||||
|
||||
root $INSTALL_DIR;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.php?\$args;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
142
install.sh
142
install.sh
|
@ -1,3 +1,143 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo 'todo install script'
|
||||
# first we check the privileges, we need root or sudo
|
||||
if [ "$EUID" -ne 0 ] && [ -z "$SUDO_USER" ]; then
|
||||
echo "This script needs administrative privileges. Either run as root or with sudo."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION=`grep version jilo-web.conf.php | cut -d "'" -f 4`
|
||||
|
||||
# main install function
|
||||
function install() {
|
||||
|
||||
# enter domain
|
||||
read -p "Domain name for the web service [localhost]: " DOMAIN
|
||||
DOMAIN=${DOMAIN:-localhost}
|
||||
|
||||
# enter folder
|
||||
read -p "Web subfolder [jilo-web]: " WEB_DIR
|
||||
WEB_DIR=${WEB_DIR:-jilo-web}
|
||||
|
||||
INSTALL_DIR="/opt/jilo-web/public_html"
|
||||
DOC_DIR="/opt/jilo-web/doc"
|
||||
ETC_DIR="/opt/jilo-web/etc"
|
||||
|
||||
mkdir -p $INSTALL_DIR
|
||||
cp -r ./public_html/* $INSTALL_DIR
|
||||
|
||||
mkdir -p $DOC_DIR
|
||||
cp CHANGELOG.md $DOC_DIR
|
||||
cp LICENSE $DOC_DIR
|
||||
cp README.md $DOC_DIR
|
||||
cp TODO.md $DOC_DIR
|
||||
cp config.apache $DOC_DIR
|
||||
cp config.nginx $DOC_DIR
|
||||
|
||||
mkdir -p $ETC_DIR
|
||||
cp jilo-web.conf.php $ETC_DIR
|
||||
cp jilo-web.schema $ETC_DIR
|
||||
|
||||
#FIXME
|
||||
#mkdir -p "jilo-web-$VERSION/usr/share/man/man8"
|
||||
#cp ../man-jilo-web.8 "jilo-web-$VERSION/usr/share/man/man8/jilo-web.8"
|
||||
|
||||
# we need a webserver, check for Apache and Nginx
|
||||
WEB_SERVER=""
|
||||
|
||||
# install and enable apache vhost
|
||||
if dpkg-query -W -f='${status}' apache2 2>/dev/null | grep -q "ok installed"; then
|
||||
WEB_SERVER="apache2"
|
||||
cp "${DOC_DIR}/config.apache" /etc/apache2/sites-available/jilo-web.conf
|
||||
sed -i -e "s/\$DOMAIN/$DOMAIN/g" /etc/apache2/sites-available/jilo-web.conf
|
||||
# there is '/' in INSTALL_DIR, we use '%'
|
||||
sed -i -e "s%\$INSTALL_DIR%$INSTALL_DIR%g" /etc/apache2/sites-available/jilo-web.conf
|
||||
a2ensite jilo-web.conf
|
||||
/etc/init.d/apache2 reload
|
||||
|
||||
# install and enable nginx vhost
|
||||
elif dpkg-query -W -f='${status}' nginx 2>/dev/null | grep -q "ok installed"; then
|
||||
WEB_SERVER="nginx"
|
||||
cp "${DOC_DIR}/config.nginx" /etc/nginx/sites-available/jilo-web
|
||||
sed -i -e "s/\$DOMAIN/$DOMAIN/g" /etc/nginx/sites-available/jilo-web
|
||||
# there is '/' in INSTALL_DIR, we use '%'
|
||||
sed -i -e "s%\$INSTALL_DIR%$INSTALL_DIR%g" /etc/nginx/sites-available/jilo-web
|
||||
ln -s /etc/nginx/sites-available/jilo-web /etc/nginx/sites-enabled/
|
||||
/etc/init.d/nginx reload
|
||||
else
|
||||
echo "Nginx or Apache is needed, please install one of them first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# permissions for web folder
|
||||
chown -R www-data:www-data "$INSTALL_DIR"
|
||||
chmod -R ug+rw "$INSTALL_DIR"
|
||||
|
||||
# etc configs (we use % because the variables contain paths with "/")
|
||||
sed -i -e "s%\('domain'[[:space:]]*=>[[:space:]]*'\)[^']*\('.*\)%\1$DOMAIN\2%g" "$ETC_DIR/jilo-web.conf.php"
|
||||
sed -i -e "s%\('folder'[[:space:]]*=>[[:space:]]*'\)[^']*\('.*\)%\1$WEB_DIR\2%g" "$ETC_DIR/jilo-web.conf.php"
|
||||
sed -i -e "s%\('database'[[:space:]]*=>[[:space:]]*'\)[^']*\('.*\)%\1$ETC_DIR\/jilo-web.db\2%g" "$ETC_DIR/jilo-web.conf.php"
|
||||
sed -i -e "s%\('jilo_database'[[:space:]]*=>[[:space:]]*'\)[^']*\('.*\)%\1$ETC_DIR\/jilo.db\2%g" "$ETC_DIR/jilo-web.conf.php"
|
||||
|
||||
echo 'Install finished.'
|
||||
}
|
||||
|
||||
|
||||
help="Jilo-Web deployment script
|
||||
Usage:
|
||||
$0 [OPTION]
|
||||
Options:
|
||||
--install|-i - install Jilo-Web
|
||||
--help|-h - show this help message
|
||||
--version|-v - show version"
|
||||
|
||||
version="version $VERSION"
|
||||
|
||||
|
||||
# called with an option
|
||||
if [[ $1 ]]; then
|
||||
case $1 in
|
||||
-i | --install)
|
||||
install
|
||||
exit 0
|
||||
;;
|
||||
-h | --help)
|
||||
echo -e "$help"
|
||||
exit 0
|
||||
;;
|
||||
-v | --version)
|
||||
echo -e "$version"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option: $1" >&2
|
||||
echo -e "$help"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# called without any options, ask how to proceed
|
||||
else
|
||||
read -p "Choose an option, blank for \"install\" [install | help | version]: " OPTION
|
||||
OPTION=${OPTION:-install}
|
||||
|
||||
case $OPTION in
|
||||
install)
|
||||
install
|
||||
exit 0
|
||||
;;
|
||||
help)
|
||||
echo -e "$help"
|
||||
exit 0
|
||||
;;
|
||||
version)
|
||||
echo -e "$version"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option: $1" >&2
|
||||
echo -e "$help"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
|
@ -5,6 +5,7 @@ $config = [
|
|||
'folder' => '/jilo-web/',
|
||||
'database' => '/home/yasen/work/code/git/lindeas-code/jilo-web/jilo-web.db',
|
||||
'jilo_database' => '/home/yasen/work/code/git/lindeas-code/jilo/jilo.db',
|
||||
'version' => '0.1.1',
|
||||
];
|
||||
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
VERSION=$1
|
||||
|
||||
mkdir -p deb-package
|
||||
cd deb-package
|
||||
|
||||
mkdir -p "jilo-web-$VERSION/DEBIAN"
|
||||
cp ../deb-control "jilo-web-$VERSION/DEBIAN/control"
|
||||
cp ../deb-postinst "jilo-web-$VERSION/DEBIAN/postinst"
|
||||
cp ../deb-postrm "jilo-web-$VERSION/DEBIAN/postrm"
|
||||
cp ../deb-templates "jilo-web-$VERSION/DEBIAN/templates"
|
||||
|
||||
mkdir -p "jilo-web-$VERSION/etc/jilo-web"
|
||||
cp ../../jilo-web.conf.php "jilo-web-$VERSION/etc/jilo-web/jilo-web.conf.php"
|
||||
cp ../../jilo-web.schema "jilo-web-$VERSION/etc/jilo-web/jilo-web.schema"
|
||||
|
||||
mkdir -p "jilo-web-$VERSION/usr/share/jilo-web"
|
||||
cp -r ../../public_html/* "jilo-web-$VERSION/usr/share/jilo-web"
|
||||
|
||||
mkdir -p "jilo-web-$VERSION/usr/share/doc/jilo-web"
|
||||
cp ../deb-README.debian "jilo-web-$VERSION/usr/share/doc/jilo-web/"
|
||||
cp ../../CHANGELOG.md "jilo-web-$VERSION/usr/share/doc/jilo-web/"
|
||||
cp ../../LICENSE "jilo-web-$VERSION/usr/share/doc/jilo-web/"
|
||||
cp ../../README.md "jilo-web-$VERSION/usr/share/doc/jilo-web/"
|
||||
cp ../../TODO.md "jilo-web-$VERSION/usr/share/doc/jilo-web/"
|
||||
cp ../../config.apache "jilo-web-$VERSION/usr/share/doc/jilo-web/"
|
||||
cp ../../config.nginx "jilo-web-$VERSION/usr/share/doc/jilo-web/"
|
||||
|
||||
mkdir -p "jilo-web-$VERSION/usr/share/man/man8"
|
||||
cp ../man-jilo-web.8 "jilo-web-$VERSION/usr/share/man/man8/jilo-web.8"
|
||||
|
||||
dpkg-deb --build "jilo-web-$VERSION"
|
||||
|
||||
rm -rf "jilo-web-$VERSION/"
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
VERSION=$1
|
||||
RELEASE=1
|
||||
|
||||
mkdir -p rpm-package/SOURCES rpm-package/SPECS
|
||||
cd rpm-package
|
||||
|
||||
PACKAGE_DIR="jilo-web-$VERSION"
|
||||
|
||||
mkdir -p "$PACKAGE_DIR"
|
||||
mkdir -p "$PACKAGE_DIR/public_html"
|
||||
|
||||
cp ../rpm-jilo-web.spec SPECS/jilo-web.spec
|
||||
cp ../../jilo-web.conf.php "$PACKAGE_DIR/"
|
||||
cp ../../jilo-web.schema "$PACKAGE_DIR/"
|
||||
cp -r ../../public_html/* "$PACKAGE_DIR/public_html/"
|
||||
cp ../../CHANGELOG.md "$PACKAGE_DIR/"
|
||||
cp ../../LICENSE "$PACKAGE_DIR/"
|
||||
cp ../../README.md "$PACKAGE_DIR/"
|
||||
cp ../../TODO.md "$PACKAGE_DIR/"
|
||||
cp ../../config.apache "$PACKAGE_DIR/"
|
||||
cp ../../config.nginx "$PACKAGE_DIR/"
|
||||
cp ../man-jilo-web.8 "$PACKAGE_DIR/"
|
||||
|
||||
tar -czf "jilo-web-$VERSION.tar.gz" "$PACKAGE_DIR"
|
||||
mv "jilo-web-$VERSION.tar.gz" SOURCES/
|
||||
|
||||
rpmbuild --define "_topdir $(pwd)" --define "VERSION $VERSION" --define "RELEASE $RELEASE" -ba SPECS/jilo-web.spec
|
||||
|
||||
rm -rf "$PACKAGE_DIR"
|
|
@ -0,0 +1,7 @@
|
|||
Jilo-Web for Debian
|
||||
-------------------
|
||||
|
||||
This is a PHP frontend to Jilo (JItsi Logs Observer). It needs access to
|
||||
the database, generated by the 'jilo' program.
|
||||
|
||||
-- Yasen Pramatarov <Yasen@lindeas.com> Tue, 9 Jul 2024 19:02:00 +0300
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
db_input medium jilo-web/domain || true
|
||||
db_input medium jilo-web/folder || true
|
||||
db_go
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,12 @@
|
|||
Package: jilo-web
|
||||
Version: 0.1.1
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Maintainer: Yasen Pramatarov <yasen@lindeas.com>
|
||||
Description: Jitsi logs web observer
|
||||
PHP web interface to Jilo (JItsi Logs Observer)
|
||||
To use this you need a webserver with php and sqlite support, and you need a database previously
|
||||
generated by 'jilo'
|
||||
Homepage: https://lindeas.com/jilo
|
||||
Depends: nginx|apache2, php, php-db, php-sqlite3, debconf (>=0.5) | debconf-2.0
|
|
@ -0,0 +1,90 @@
|
|||
#!/bin/bash
|
||||
# postinst script for jilo-web
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
||||
# loading debconf
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
# get the domain and web folder
|
||||
db_get jilo-web/domain
|
||||
if [ -z "$RET" ] ; then
|
||||
db_get jilo-web/domain "localhost"
|
||||
db_input critical jilo-web/domain || true
|
||||
db_go
|
||||
db_get jilo-web/domain
|
||||
fi
|
||||
DOMAIN=$(echo "$RET" | xargs echo -n)
|
||||
|
||||
# FIXME use this for subfolder install, if given
|
||||
db_get jilo-web/folder
|
||||
if [ -z "$RET" ] ; then
|
||||
db_get jilo-web/folder "jilo-web"
|
||||
db_input critical jilo-web/folder || true
|
||||
db_go
|
||||
db_get jilo-web/folder
|
||||
fi
|
||||
WEB_DIR=$(echo "$RET" | xargs echo -n)
|
||||
|
||||
INSTALL_DIR="/usr/share/jilo-web"
|
||||
DOC_DIR="/usr/share/doc/jilo-web"
|
||||
|
||||
# store the info for later reconfiguration
|
||||
db_set jilo-web/domain $DOMAIN
|
||||
db_set jilo-web/folder $WEB_DIR
|
||||
|
||||
# we need a webserver, check for Apache and Nginx
|
||||
WEB_SERVER=""
|
||||
|
||||
# install and enable apache vhost
|
||||
if dpkg-query -W -f='${status}' apache2 2>/dev/null | grep -q "ok installed"; then
|
||||
WEB_SERVER="apache2"
|
||||
cp "${DOC_DIR}/config.apache" /etc/apache2/sites-available/jilo-web.conf
|
||||
sed -i -e "s/\$DOMAIN/$DOMAIN/g" /etc/apache2/sites-available/jilo-web.conf
|
||||
# there is '/' in INSTALL_DIR, we use '%'
|
||||
sed -i -e "s%\$INSTALL_DIR%$INSTALL_DIR%g" /etc/apache2/sites-available/jilo-web.conf
|
||||
a2ensite jilo-web.conf
|
||||
/etc/init.d/apache2 reload
|
||||
|
||||
# install and enable nginx vhost
|
||||
elif dpkg-query -W -f='${status}' nginx 2>/dev/null | grep -q "ok installed"; then
|
||||
WEB_SERVER="nginx"
|
||||
cp "${DOC_DIR}/config.nginx" /etc/nginx/sites-available/jilo-web
|
||||
sed -i -e "s/\$DOMAIN/$DOMAIN/g" /etc/nginx/sites-available/jilo-web
|
||||
# there is '/' in INSTALL_DIR, we use '%'
|
||||
sed -i -e "s%\$INSTALL_DIR%$INSTALL_DIR%g" /etc/nginx/sites-available/jilo-web
|
||||
ln -s /etc/nginx/sites-available/jilo-web /etc/nginx/sites-enabled/
|
||||
/etc/init.d/nginx reload
|
||||
else
|
||||
echo "Nginx or Apache is needed, please install one of them first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# permissions for web folder
|
||||
chown -R www-data:www-data "$INSTALL_DIR"
|
||||
chmod -R ug+rw "$INSTALL_DIR"
|
||||
|
||||
# stopping debconf
|
||||
db_stop
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
# postrm script for jilo-web
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
rm /etc/nginx/sites-enabled/jilo-web
|
||||
rm /etc/nginx/sites-available/jilo-web
|
||||
|
||||
echo PURGE | debconf-communicate jilo-web
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,9 @@
|
|||
Template: jilo-web/domain
|
||||
Type: string
|
||||
Default: localhost
|
||||
Description: Please enter the domain name for the Jilo-web app.
|
||||
|
||||
Template: jilo-web/folder
|
||||
Type: string
|
||||
Default: jilo-web
|
||||
Description: Please enter the web folder for Jilo-web.
|
|
@ -0,0 +1,23 @@
|
|||
.TH JILO-WEB "8" "July 2024" "jilo-web 0.1.1"
|
||||
.SH NAME
|
||||
jilo-web \- PHP frontent to jilo (jitsi logs observer) database.
|
||||
.SH DESCRIPTION
|
||||
.B jilo-web
|
||||
is a PHP app for searching through a jilo database.
|
||||
|
||||
You need a jilo database to have this package working. You can create the jilo database with the program 'jilo'.
|
||||
|
||||
.SH CONFIGURATION
|
||||
The configuration file is /etc/jilo-web/jilo-web.conf.php.
|
||||
|
||||
.SH AUTHOR
|
||||
Written and maintained by Yasen Pramatarov <yasen@lindeas.com>
|
||||
|
||||
.SH HOMEPAGE
|
||||
https://lindeas.com/jilo
|
||||
|
||||
.SH VERSION
|
||||
0.1.1
|
||||
|
||||
.SH SEE ALSO
|
||||
jilo(8), jilo-cli(8)
|
|
@ -0,0 +1,60 @@
|
|||
Name: jilo-web
|
||||
Version: 0.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Jitsi logs web observer
|
||||
|
||||
License: GPLv2
|
||||
URL: https://lindeas.com/jilo
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
%define sourcedir %{_builddir}/%{name}-%{version}
|
||||
|
||||
BuildArch: noarch
|
||||
Requires: (nginx or apache2)
|
||||
Requires: php
|
||||
Requires: php-db
|
||||
Requires: php-sqlite3
|
||||
|
||||
%description
|
||||
PHP web interface to Jilo (JItsi Logs Observer)
|
||||
To use this you need a webserver with php and sqlite support, and you need a database previously
|
||||
generated by 'jilo'
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%install
|
||||
# directories
|
||||
mkdir -p %{buildroot}/etc/jilo-web
|
||||
mkdir -p %{buildroot}/usr/share/%{name}
|
||||
mkdir -p %{buildroot}/usr/share/doc/%{name}
|
||||
mkdir -p %{buildroot}/usr/share/man/man8
|
||||
|
||||
# then copy the files
|
||||
cp %{sourcedir}/jilo-web.conf.php %{buildroot}/etc/%{name}/jilo-web.conf.php
|
||||
cp %{sourcedir}/jilo-web.schema %{buildroot}/etc/%{name}/jilo-web.schema
|
||||
cp %{sourcedir}/public_html/* %{buildroot}/usr/share/%{name}
|
||||
cp %{sourcedir}/CHANGELOG.md %{buildroot}/usr/share/doc/%{name}/
|
||||
cp %{sourcedir}/LICENSE %{buildroot}/usr/share/doc/%{name}/
|
||||
cp %{sourcedir}/README.md %{buildroot}/usr/share/doc/%{name}/
|
||||
cp %{sourcedir}/TODO.md %{buildroot}/usr/share/doc/%{name}/
|
||||
cp %{sourcedir}/config.apache %{buildroot}/usr/share/doc/%{name}/
|
||||
cp %{sourcedir}/config.nginx %{buildroot}/usr/share/doc/%{name}/
|
||||
cp %{sourcedir}/man-jilo.8 %{buildroot}/usr/share/man/man8/%{name}.8
|
||||
|
||||
%files
|
||||
/etc/jilo-web/jilo-web.conf.php
|
||||
/etc/jilo-web/jilo-web.schema
|
||||
/usr/share/doc/%{name}/CHANGELOG.md
|
||||
/usr/share/doc/%{name}/LICENSE
|
||||
/usr/share/doc/%{name}/README.md
|
||||
/usr/share/doc/%{name}/TODO.md
|
||||
/usr/share/doc/%{name}/config.apache
|
||||
/usr/share/doc/%{name}/config.nginx
|
||||
/usr/share/man/man8/%{name}.8.gz
|
||||
|
||||
%changelog
|
||||
* Thu Jul 25 2024 Yasen Pramatarov <yasen@lindeas.com> 0.1.1
|
||||
- Build of upstream v0.1.1
|
||||
* Wed Jul 12 2024 Yasen Pramatarov <yasen@lindeas.com> 0.1
|
||||
- Initial build
|
|
@ -14,14 +14,14 @@ SELECT DISTINCT
|
|||
WHERE
|
||||
ce.conference_id = c.conference_id
|
||||
AND
|
||||
ce.conference_event = 'conference expired')
|
||||
ce.conference_event = 'conference created')
|
||||
AS start,
|
||||
(SELECT ce.time
|
||||
FROM conference_events ce
|
||||
WHERE
|
||||
ce.conference_id = c.conference_id
|
||||
AND
|
||||
ce.conference_event = 'conference created')
|
||||
ce.conference_event = 'conference expired')
|
||||
AS end,
|
||||
c.conference_id,
|
||||
c.conference_name,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* License: GPLv2
|
||||
* Project URL: https://lindeas.com/jilo
|
||||
* Year: 2024
|
||||
* Version: 0.1
|
||||
* Version: 0.1.1
|
||||
*/
|
||||
|
||||
// error reporting, comment out in production
|
||||
|
|
|
@ -103,39 +103,45 @@ try {
|
|||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($components['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($components['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope=\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($components['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'component ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=components&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=components&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'component') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=components&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=components&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching Jitsi component events found.</p>';
|
||||
echo '<p class="m-3">No matching Jitsi component events found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
|
|
@ -99,22 +99,27 @@ if (isset($conference_id)) {
|
|||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($conferences['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($conferences['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope=\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($conferences['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
$stats_id = false;
|
||||
$participant_ip = false;
|
||||
if ($row['event'] === 'stats_id') $stats_id = true;
|
||||
|
@ -122,24 +127,25 @@ if (isset($conference_id)) {
|
|||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'conference ID' && $column === $conference_id) {
|
||||
echo "\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
echo "\t\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
} elseif ($key === 'conference name') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($stats_id && $key === 'parameter') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($participant_ip && $key === 'parameter') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&ip=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&ip=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching conferences found.</p>';
|
||||
echo '<p class="m-3">No matching conferences found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
@ -195,22 +201,27 @@ if (isset($conference_id)) {
|
|||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($conferences['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($conferences['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope=\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($conferences['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
$stats_id = false;
|
||||
$participant_ip = false;
|
||||
if ($row['event'] === 'stats_id') $stats_id = true;
|
||||
|
@ -218,26 +229,27 @@ if (isset($conference_id)) {
|
|||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'conference name' && $column === $conference_name) {
|
||||
echo "\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
echo "\t\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
} elseif ($key === 'conference ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'participant ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($stats_id && $key === 'parameter') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($participant_ip && $key === 'parameter') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&ip=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&ip=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching conferences found.</p>';
|
||||
echo '<p class="m-3">No matching conferences found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
@ -256,11 +268,19 @@ if (isset($conference_id)) {
|
|||
|
||||
foreach ($search as $item) {
|
||||
extract($item);
|
||||
|
||||
// we don't have duration field, so we calculate it
|
||||
if (!empty($start) && !empty($end)) {
|
||||
$duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start)));
|
||||
} else {
|
||||
$duration = '';
|
||||
}
|
||||
$conference_record = array(
|
||||
// assign title to the field in the array record
|
||||
'component' => $jitsi_component,
|
||||
'start' => $start,
|
||||
'end' => $end,
|
||||
'duration' => $duration,
|
||||
'conference ID' => $conference_id,
|
||||
'conference name' => $conference_name,
|
||||
'participants' => $participants,
|
||||
|
@ -292,39 +312,45 @@ if (isset($conference_id)) {
|
|||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($conferences['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($conferences['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope=\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($conferences['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'conference ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'conference name') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching conferences found.</p>';
|
||||
echo '<p class="m-3">No matching conferences found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
|
|
@ -34,11 +34,19 @@ try {
|
|||
|
||||
foreach ($search as $item) {
|
||||
extract($item);
|
||||
|
||||
// we don't have duration field, so we calculate it
|
||||
if (!empty($start) && !empty($end)) {
|
||||
$duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start)));
|
||||
} else {
|
||||
$duration = '';
|
||||
}
|
||||
$conference_record = array(
|
||||
// assign title to the field in the array record
|
||||
'component' => $jitsi_component,
|
||||
'start' => $start,
|
||||
'end' => $end,
|
||||
'duration' => $duration,
|
||||
'conference ID' => $conference_id,
|
||||
'conference name' => $conference_name,
|
||||
'participants' => $participants,
|
||||
|
@ -57,60 +65,64 @@ try {
|
|||
}
|
||||
|
||||
// display the result
|
||||
echo "<div class=\"widget\">";
|
||||
echo "<a style=\"text-decoration: none;\" data-toggle=\"collapse\" href=\"#collapseLastDays\" role=\"button\" aria-expanded=\"true\" aria-controls=\"collapseLastDays\">";
|
||||
echo "<div class=\"card bg-light card-body\">Conferences for the last 2 days</div></a>";
|
||||
|
||||
echo "<div class=\"collapse show\" id=\"collapseLastDays\">";
|
||||
|
||||
echo "<div class=\"results-header\">\n";
|
||||
echo "<div class=\"results-message\">Conferences for the last 2 days";
|
||||
if ($time_range_specified) {
|
||||
echo "<br />for the time period <strong>$from_time - $until_time</strong>";
|
||||
echo "<p class=\"m-3\">time period: <strong>$from_time - $until_time</strong></p>";
|
||||
}
|
||||
echo "</div>\n\n";
|
||||
|
||||
//// filters - time selection and sorting dropdowns
|
||||
//include 'templates/results-filter.php';
|
||||
|
||||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($conferences['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"thead-dark\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($conferences['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope=\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($conferences['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'conference ID' && $column === $conference_id) {
|
||||
echo "\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
echo "\t\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
} elseif ($key === 'conference name') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching conferences found.</p>';
|
||||
echo '<p class="m-3">No matching conferences found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
echo "<br />";
|
||||
|
||||
// last 10 conferences
|
||||
try {
|
||||
|
@ -133,11 +145,19 @@ try {
|
|||
$i = 0;
|
||||
foreach ($search as $item) {
|
||||
extract($item);
|
||||
|
||||
// we don't have duration field, so we calculate it
|
||||
if (!empty($start) && !empty($end)) {
|
||||
$duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start)));
|
||||
} else {
|
||||
$duration = '';
|
||||
}
|
||||
$conference_record = array(
|
||||
// assign title to the field in the array record
|
||||
'component' => $jitsi_component,
|
||||
'start' => $start,
|
||||
'end' => $end,
|
||||
'duration' => $duration,
|
||||
'conference ID' => $conference_id,
|
||||
'conference name' => $conference_name,
|
||||
'participants' => $participants,
|
||||
|
@ -160,54 +180,58 @@ try {
|
|||
}
|
||||
|
||||
// display the result
|
||||
echo "<div class=\"widget\">";
|
||||
echo "<a style=\"text-decoration: none;\" data-toggle=\"collapse\" href=\"#collapseLastConferences\" role=\"button\" aria-expanded=\"true\" aria-controls=\"collapseLastConferences\">";
|
||||
echo "<div class=\"card bg-light card-body\">The last $conference_number conferences</div></a>";
|
||||
|
||||
echo "<div class=\"collapse show\" id=\"collapseLastConferences\">";
|
||||
|
||||
echo "<div class=\"results-header\">\n";
|
||||
echo "<div class=\"results-message\">The last $conference_number conferences";
|
||||
if ($time_range_specified) {
|
||||
echo "<br />for the time period <strong>$from_time - $until_time</strong>";
|
||||
}
|
||||
echo "</div>\n\n";
|
||||
|
||||
//// filters - time selection and sorting dropdowns
|
||||
//include 'templates/results-filter.php';
|
||||
|
||||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($conferences['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($conferences['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope=\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($conferences['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'conference ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'conference name') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching conferences found.</p>';
|
||||
echo '<p class="m-3">No matching conferences found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
|
|
@ -103,22 +103,27 @@ if (isset($participant_id)) {
|
|||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($conferences['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($conferences['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope=\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($conferences['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
$stats_id = false;
|
||||
$participant_ip = false;
|
||||
if ($row['event'] === 'stats_id') $stats_id = true;
|
||||
|
@ -126,26 +131,27 @@ if (isset($participant_id)) {
|
|||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'participant ID' && $column === $participant_id) {
|
||||
echo "\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
echo "\t\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
} elseif ($key === 'conference ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'conference name') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($stats_id && $key === 'parameter') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($participant_ip && $key === 'parameter') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&ip=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&ip=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching conferences found.</p>';
|
||||
echo '<p class="m-3">No matching conferences found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
@ -201,43 +207,49 @@ if (isset($participant_id)) {
|
|||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($conferences['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($conferences['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope-\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($conferences['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'parameter' && $column === $participant_name) {
|
||||
echo "\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
echo "\t\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
} elseif ($key === 'conference ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'conference name') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'participant ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching conferences found.</p>';
|
||||
echo '<p class="m-3">No matching conferences found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
@ -293,43 +305,49 @@ if (isset($participant_id)) {
|
|||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($conferences['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($conferences['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th scope=\"col\">" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($conferences['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'parameter' && $column === $participant_ip) {
|
||||
echo "\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
echo "\t\t\t\t<td><strong>" . htmlspecialchars($column ?? '') . "</strong></td>\n";
|
||||
} elseif ($key === 'conference ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'conference name') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&name=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'participant ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching conferences found.</p>';
|
||||
echo '<p class="m-3">No matching conferences found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
@ -379,39 +397,45 @@ if (isset($participant_id)) {
|
|||
echo "</div>\n\n";
|
||||
|
||||
// results table
|
||||
echo "<div class=\"results\">\n";
|
||||
echo "<div class=\"mb-5\">\n";
|
||||
|
||||
if (!empty($participants['records'])) {
|
||||
|
||||
echo "\t<table>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t<table class=\"table table-striped table-hover table-bordered\">\n";
|
||||
|
||||
echo "\t\t<thead class=\"table-secondary\">\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
|
||||
// table headers
|
||||
foreach (array_keys($participants['records'][0]) as $header) {
|
||||
echo "\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
echo "\t\t\t\t<th>" . htmlspecialchars($header) . "</th>\n";
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
echo "\t\t</thead>\n";
|
||||
|
||||
echo "\t\t<tbody>\n";
|
||||
|
||||
//table rows
|
||||
foreach ($participants['records'] as $row) {
|
||||
echo "\t\t<tr>\n";
|
||||
echo "\t\t\t<tr>\n";
|
||||
// sometimes $column is empty, we make it '' then
|
||||
foreach ($row as $key => $column) {
|
||||
if ($key === 'participant ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=participants&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=participants&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} elseif ($key === 'conference ID') {
|
||||
echo "\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
echo "\t\t\t\t<td><a href=\"$app_root?page=conferences&id=" . htmlspecialchars($column ?? '') . "\">" . htmlspecialchars($column ?? '') . "</a></td>\n";
|
||||
} else {
|
||||
echo "\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
echo "\t\t\t\t<td>" . htmlspecialchars($column ?? '') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "\t\t</tr>\n";
|
||||
echo "\t\t\t</tr>\n";
|
||||
}
|
||||
|
||||
echo "\t\t</tbody>\n";
|
||||
echo "\t</table>\n";
|
||||
|
||||
} else {
|
||||
echo '<p>No matching participants found.</p>';
|
||||
echo '<p class="m-3">No matching participants found.</p>';
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
color: white;
|
||||
}
|
||||
|
||||
/*
|
||||
.results {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
@ -100,7 +101,7 @@
|
|||
.results p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
.results-header {
|
||||
display: flex;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
|
||||
<div id="footer">Jilo Web 0.1 ©2024 - web interface for <a href="https://lindeas.com/jilo">Jilo</a></div>
|
||||
<div id="footer">Jilo Web <?= $config['version'] ?> ©2024 - web interface for <a href="https://lindeas.com/jilo">Jilo</a></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
|
||||
<h2>Login</h2>
|
||||
<h2>Login</h2>
|
||||
|
||||
<div class="login-form">
|
||||
<form method="POST" action="?page=login">
|
||||
<input type="text" name="username" placeholder="Username" required />
|
||||
<br />
|
||||
<input type="password" name="password" placeholder="Password" required />
|
||||
<br />
|
||||
<label for="remember_me">
|
||||
<input type="checkbox" id="remember_me" name="remember_me" />
|
||||
remember me
|
||||
</label>
|
||||
<br />
|
||||
<input type="submit" value="Login" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="login-form">
|
||||
<form method="POST" action="?page=login">
|
||||
<input type="text" name="username" placeholder="Username" required />
|
||||
<br />
|
||||
<input type="password" name="password" placeholder="Password" required />
|
||||
<br />
|
||||
<label for="remember_me">
|
||||
<input type="checkbox" id="remember_me" name="remember_me" />
|
||||
remember me
|
||||
</label>
|
||||
<br />
|
||||
<input type="submit" value="Login" />
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
<h2>Register</h2>
|
||||
<h2>Register</h2>
|
||||
|
||||
<div class="register-form">
|
||||
<form method="POST" action="?page=register">
|
||||
<input type="text" name="username" placeholder="Username" required />
|
||||
<br />
|
||||
<input type="password" name="password" placeholder="Password" required />
|
||||
<br />
|
||||
<input type="submit" value="Register" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="register-form">
|
||||
<form method="POST" action="?page=register">
|
||||
<input type="text" name="username" placeholder="Username" required />
|
||||
<br />
|
||||
<input type="password" name="password" placeholder="Password" required />
|
||||
<br />
|
||||
<input type="submit" value="Register" />
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="static/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="static/all.css">
|
||||
<script src="static/bootstrap.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||
<title>Jilo Web</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
<div class="container-fluid">
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
|
||||
<div class="menu-container">
|
||||
<ul class="menu-left">
|
||||
<li><a href="index.php">home</a></li>
|
||||
<div class="menu-container">
|
||||
<ul class="menu-left">
|
||||
<li><a href="index.php">home</a></li>
|
||||
<?php if ( isset($_SESSION['username']) ) { ?>
|
||||
<li><a href="?page=config">config</a></li>
|
||||
<li><a href="?page=conferences">conferences</a></li>
|
||||
<li><a href="?page=participants">participants</a></li>
|
||||
<li><a href="?page=components">components</a></li>
|
||||
<li><a href="?page=config">config</a></li>
|
||||
<li><a href="?page=conferences">conferences</a></li>
|
||||
<li><a href="?page=participants">participants</a></li>
|
||||
<li><a href="?page=components">components</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<ul class="menu-right">
|
||||
<ul class="menu-right">
|
||||
<?php if ( isset($_SESSION['username']) ) { ?>
|
||||
<li><a href="?page=profile"><?= $user ?></a></li>
|
||||
<li><a href="?page=logout">logout</a></li>
|
||||
<li><a href="?page=profile"><?= $user ?></a></li>
|
||||
<li><a href="?page=logout">logout</a></li>
|
||||
<?php } else { ?>
|
||||
<li><a href="?page=login">login</a></li>
|
||||
<li><a href="?page=register">register</a></li>
|
||||
<li><a href="?page=login">login</a></li>
|
||||
<li><a href="?page=register">register</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
<?php if (isset($error)) { ?>
|
||||
<div class="error">
|
||||
<?php echo $error; ?>
|
||||
</div>
|
||||
<div class="error">
|
||||
<?php echo $error; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($notice)) { ?>
|
||||
<div class="notice">
|
||||
<?php echo $notice; ?>
|
||||
</div>
|
||||
<div class="notice">
|
||||
<?php echo $notice; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
|
@ -1,38 +1,44 @@
|
|||
|
||||
<div class="results-filter">
|
||||
<div class="results-filter">
|
||||
|
||||
<form method="POST" id="filter_form" action="?page=<?= $page ?>">
|
||||
<form method="POST" id="filter_form" action="?page=<?= $page ?>">
|
||||
|
||||
<label for="from_time">from</label>
|
||||
<input type="date" id="from_time" name="from_time"<?php if (isset($_REQUEST['from_time'])) echo " value=\"" . $_REQUEST['from_time'] . "\"" ?> />
|
||||
<label for="from_time">from</label>
|
||||
<input type="date" id="from_time" name="from_time"<?php if (isset($_REQUEST['from_time'])) echo " value=\"" . $_REQUEST['from_time'] . "\"" ?> />
|
||||
|
||||
<label for="until_time">until</label>
|
||||
<input type="date" id="until_time" name="until_time"<?php if (isset($_REQUEST['until_time'])) echo " value=\"" . $_REQUEST['until_time'] . "\"" ?> />
|
||||
<label for="until_time">until</label>
|
||||
<input type="date" id="until_time" name="until_time"<?php if (isset($_REQUEST['until_time'])) echo " value=\"" . $_REQUEST['until_time'] . "\"" ?> />
|
||||
|
||||
<input type="text" name="id" placeholder="ID"<?php if (isset($_REQUEST['id'])) echo " value=\"" . $_REQUEST['id'] . "\"" ?> />
|
||||
<input type="text" name="id" placeholder="ID"<?php if (isset($_REQUEST['id'])) echo " value=\"" . $_REQUEST['id'] . "\"" ?> />
|
||||
|
||||
<input type="text" name="name" placeholder="name"<?php if (isset($_REQUEST['name'])) echo " value=\"" . $_REQUEST['name'] . "\"" ?> />
|
||||
<input type="text" name="name" placeholder="name"<?php if (isset($_REQUEST['name'])) echo " value=\"" . $_REQUEST['name'] . "\"" ?> />
|
||||
|
||||
<?php if ($page == 'participants') { ?>
|
||||
<input type="text" name="ip" placeholder="ip address"<?php if (isset($_REQUEST['ip'])) echo " value=\"" . $_REQUEST['ip'] . "\"" ?> maxlength="15" size="15" />
|
||||
<input type="text" name="ip" placeholder="ip address"<?php if (isset($_REQUEST['ip'])) echo " value=\"" . $_REQUEST['ip'] . "\"" ?> maxlength="15" size="15" />
|
||||
<?php } ?>
|
||||
|
||||
<button type="button" onclick="clearFilter()">clear</button>
|
||||
<br />
|
||||
|
||||
<input type="submit" value="search" />
|
||||
<div class="float-end pt-3">
|
||||
|
||||
</form>
|
||||
<input type="button" onclick="clearFilter()" value="clear" />
|
||||
|
||||
<script>
|
||||
function clearFilter() {
|
||||
document.getElementById("filter_form").reset();
|
||||
const filterFields = document.querySelectorAll("#filter_form input");
|
||||
filterFields.forEach(input => {
|
||||
if (input.type === 'text' ||input.type === 'date') {
|
||||
input.value = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<input type="submit" value="search" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function clearFilter() {
|
||||
document.getElementById("filter_form").reset();
|
||||
const filterFields = document.querySelectorAll("#filter_form input");
|
||||
filterFields.forEach(input => {
|
||||
if (input.type === 'text' ||input.type === 'date') {
|
||||
input.value = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue