Skip to content

Commit

Permalink
Merge pull request #46 from VSLCatena/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Kipjr authored Jun 9, 2024
2 parents d0568e9 + 19b98a0 commit 4f26b3d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ services:
hostname: pma
image: ghcr.io/linuxserver/phpmyadmin
profiles:
- debug
- dev
environment:
PMA_HOST: '${DB_HOST:-db}'
PMA_USER: root
PMA_PASSWORD: '${DB_ROOT_PASSWORD:-db}'
TZ: Europe/Amsterdam
ports:
- '4081:80'
volumes:
- 'pmadata:/config'
restart: unless-stopped
networks:
- net
Expand Down Expand Up @@ -67,3 +69,5 @@ networks:
volumes:
dbdata:
driver: local
pmadata:
driver: local
1 change: 1 addition & 0 deletions src/html/bar/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
ini_set('display_errors', 1);

require_once '../core.php';
header('Content-Type: application/json');
$data = [];

// Grab all categories
Expand Down
11 changes: 10 additions & 1 deletion src/html/prices.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

require_once 'core.php';
header('Content-Type: application/json');
$timeframe = 10 * 60;

// fetch all settings
$query = $pdo->query('SELECT * FROM settings');
$settings = [];

foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$settings[$row['setting']] = $row['value'];
}

$timeframe = $settings['time_round'] * 60; // quotient of unix timestamp (10 minutes * 60 seconds in a minute)

function roundTo5s($num)
{
Expand Down

0 comments on commit 4f26b3d

Please sign in to comment.