Newer
Older
private $db;
function __construct(){
global $datenbank;
$this->db = $datenbank;
}
public function Auflisten(){
$aus = '
<table class="table" id="UserBuchung">
<thead>
<tr>
<th>#</th>
<th>User</th>
<th>Datum</th>
<th>Zeit</th>
<th>Buchungs-ID</th>
<th>Buchungsmenge</th>
<th>Verwendungszweck</th>
<th>Buchung Eroflgreich</th>
</tr>
</thead>
<tbody>';
foreach($this->db->get_results("SELECT * FROM ". PREFIX . BUCH ." ORDER BY id DESC ") AS $res){
if($res->buchung_ok == 1){
$ok = '<img src="https://img.icons8.com/material/24/000000/checked.png" style="color:green;">';
}else{
$ok = '<img src="https://img.icons8.com/material/24/000000/close-window.png" style="color:red">';
}
$aus .= '
<tr>
<td>'. $res->id .'</td>
<td>'. $res->uid .'</td>
<td>'. date("d.m.Y",$res->buchungszeit) .'</td>
<td>'. date("H:i",$res->buchungszeit) .'</td>
<td>'. $res->buchungs_id .'</td>
<td>'. number_format($res->buchungsmenge,2,',','.') .'</td>
<td>'. $res->verwendungszweck .'</td>
<td>'. $ok .'</td>
</tr>
';