A quick and dirty visitor registration system to use on some sort of tablet at the reception desk.
This thing is written in HTML, CSS, and PHP with the mysqli extension.
You’ll be greeted by a choice between employee or visitor.
At the employees page, employees can indicate whether they’re present or not.
They can tap the Yes/No button, and it’ll change to Yes or No immediately.
This assumes everyone at the organization is a grown up.
Before entering the employees page, you must type in a PIN code.
Visitors are able to enter their name, and get registered.
Unless your organization is Hotel California, visitors can actually leave.
Receptionists can administer visitors and employees on the /reception page.
Rename .env.dist to .env to create the configuration file.
In .env, change the MariaDB password called changeme.
In .env you can set the name of the logo you wish to replace the placeholder with. You’ll have to name, create, and insert the logo yourself in the public folder.
As a guideline, the height shouldn’t be higher than 220 pixels, no wider than 100 pixels, and the background should be transparent.
In .env you can set the e-mail address where users can come in contact with your organization’s data protection officer for GDPR related questions and/or “purge me from your memories and databanks” requests.
If your organization doesn’t have a data protection officer yet, you’re all going to EU jail, where you’ll be tortured to death by woodworking activities, conjugal visits by hired service people, and cake baking.
Before entering the Employee page, you’ll be greated with a numpad to enter a PIN code.
In .env, you can change the PIN code.
The receptionist can visit the /reception page to see current visitors.
It’s set to be secured to internal networks only. Just add another IP address in reception/.htaccess if you’re hosting this internet facing.
So if your buildings’ external IP address is 130.89.16.82, just add
Require ip 130.89.16.82
between the RequireAny tag.
You can either use Docker or Classic LAMP.
Which one will you choose?
Just run
docker compose up
mate.
Git clone in your webserver folder and create a database.
You’re going to need:
For example, on Debian, you install those like this:
apt install -y apache2 php composer mariadb-server mariadb-client libapache2-mod-php php-mysql git && mysql_secure_installation
Install dotenv by doing
composer install
sudo mysql < ./init.sql
sudo mysql < echo "USE mysql; UPDATE user SET PASSWORD = PASSWORD('$MARIADB_PASSWORD') WHERE user = 'qdvr' AND host = '%'; FLUSH PRIVILEGES;"
Files in the public directory are public facing.
Edit your Apache config to reflect that situation.
Make damn sure no one can see the .env file but you.
You can use something else than Apache, but it’ll mean you’ll have to secure /reception some other way.
PHP 5 and PHP 7 could probably work fine too, haven’t tested that.
MySQL or Oracle Database will probably work fine.
You could probably easily convert the database to PostgreSQL, Microsoft SQL, IBM Db2, etc. since it’s not that complicated of structure. There aren’t even foreign keys or procedures.
There’s no reason why BSD or Windows wouldn’t work, I just don’t personally use those platforms for hosting usually.
Don’t use Internet Explorer, idiot.
Just make some pull request, and I’ll probably hit the “Merge” button.
Or create an issue and roast this project and/or me as harshly as you can.
This project is licensed under The Unlicense - see the LICENSE file for details.