feat: added Sessionstart to header; changed navlinks in header; rework registration of services; created employee list with refund; created function for getting avatar and insert entry; changed data fetch for user; new style added
This commit is contained in:
51
personal.php
Normal file
51
personal.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
session_start();
|
||||
require 'config.php';
|
||||
require 'db.php';
|
||||
|
||||
if ($dbhandle->connect_error) {
|
||||
die("Verbindung fehlgeschlagen: " . $dbhandle->connect_error);
|
||||
}
|
||||
|
||||
// Query
|
||||
$sql = "SELECT clientname, SUM(preis) AS gesamt_einnahmen, ROUND(SUM(preis) * 0.1, 2) AS abschlag
|
||||
FROM contracts
|
||||
GROUP BY clientname
|
||||
ORDER BY gesamt_einnahmen DESC";
|
||||
|
||||
$result = $dbhandle->query($sql);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Übersicht</title>
|
||||
<style>
|
||||
table { border-collapse: collapse; width: 80%; margin: auto; }
|
||||
th, td { border: 1px solid #ddd; padding: 8px; text-align: center; }
|
||||
th { background-color: #4CAF50; color: white; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php include "header.php"?>
|
||||
<h1 style="text-align:center;">Übersicht der Einnahmen</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Dienstnummer + Name</th>
|
||||
<th>Gesamteinnahmen (€)</th>
|
||||
<th>10 % Abschlag (€)</th>
|
||||
</tr>
|
||||
<?php while($row = $result->fetch_assoc()): ?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($row['clientname']); ?></td>
|
||||
<td><?php echo number_format($row['gesamt_einnahmen'], 2, ',', '.'); ?> €</td>
|
||||
<td><?php echo number_format($row['abschlag'], 2, ',', '.'); ?> €</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
$dbhandle->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user