Testsystem kenntlich gemacht
This commit is contained in:
parent
6a1d2e888a
commit
7f2f35b7de
@ -1,14 +1,10 @@
|
||||
<?php
|
||||
//$host = 'server';
|
||||
//$db = 'haushaltsbuch';
|
||||
$host = getenv('POSTGRES_HOST');
|
||||
$db = getenv('POSTGRES_DB');
|
||||
$user = getenv('POSTGRES_APPUSER');
|
||||
$pass = getenv('POSTGRES_APPPASSWORD');
|
||||
//$port = "5432";
|
||||
$port = getenv('POSTGRES_PORT');
|
||||
|
||||
|
||||
try {
|
||||
$dsn = "pgsql:host=$host;port=$port;dbname=$db;";
|
||||
$pdo = new PDO($dsn, $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/includes/db_connect.php';
|
||||
$system = getenv('POSTGRES_SYSTEM') ?? 'test';
|
||||
|
||||
$stmt = $pdo->query("SELECT k.id,
|
||||
k.bezeichnung,
|
||||
@ -38,6 +39,11 @@
|
||||
|
||||
<body>
|
||||
<div class="header">
|
||||
<?php
|
||||
if($system == 'test') {
|
||||
echo '<h2 class="restguthaben">Testsystem</h2>';
|
||||
}
|
||||
?>
|
||||
<h2 class="restguthaben">
|
||||
Restguthaben <?= htmlspecialchars($monat)?>: <?= htmlspecialchars($restguthaben ?? '0') ?> €
|
||||
</h2>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/includes/db_connect.php';
|
||||
$system = getenv('POSTGRES_SYSTEM') ?? 'test';
|
||||
|
||||
$konto_id = $_GET['id'];
|
||||
|
||||
@ -61,6 +62,11 @@
|
||||
id="konto_navigationLinks">
|
||||
Neue Kontobewegung
|
||||
</a>
|
||||
<?php
|
||||
if($system == 'test') {
|
||||
echo '<h2 class="restguthaben">Testsystem</h2>';
|
||||
}
|
||||
?>
|
||||
<h2 class="kontoübersicht" id="h2_kontoübersicht">
|
||||
<?= htmlspecialchars($konto_bezeichnung) ?>: <?= htmlspecialchars(number_format($konto_kontostand, 2, ",", ".")) ?> €
|
||||
</h2>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user