Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
class multiKonten{
private $db;
private $gconfig;
private $error = 0;
private $meldung;
private $typen = array();
private $post = array();
public function __construct(){
global $datenbank,$grundconfig;
$this->db = $datenbank;
$this->gconfig = $grundconfig;
}
private function make_array($post){
foreach($post AS $key => $value){
if($key != '' && $key != 'run' && $value != ''){
$this->post[$this->db->escape($key)] = $this->db->escape($value);
}
}
}
public function DeleteMultiKonto($post){
$this->make_array($post);
if($this->db->delete(PREFIX . MULTI, $this->post) == true){
$this->meldung = MULTIT['DEL']['TRUE'];
}else{
$this->error = 1;
$this->meldung = $this->meldung = MULTIT['DEL']['FALSE'];
}
meldung($this->error,$this->meldung);
}
private function SelectTypen(){
return $this->db->get_results("SELECT schnittstelle FROM ". PREFIX . SCHNITT ." ");
}
private function SetHead(){
$aus = '<tr>
<th>UID</th>';
foreach($this->SelectTypen() AS $res){
$this->typen[] = $res->schnittstelle;
$aus .= '<th>'. $res->schnittstelle .'</th>';
}
$aus .= '<th></th></tr>';
return $aus;
}
private function SetArrayUID(){
$aus = array();
foreach($this->db->get_results("SELECT * FROM ". PREFIX . MK ." ORDER BY uid ASC") AS $res){
if(!is_array($aus[$res->uid])) $aus[$res->uid] = array();
$aus[$res->uid][$res->waehrung] = $res->kontoid;
}
return $aus;
}
private function SetForm($uid){
return '
<td>
<form method="post" action="">
<input type="hidden" name="uid" value="'. $uid .'">
<input type="submit" name="run[MultiDelete]" value="Löschen" class="btn btn-danger btn-sm">
</form>
</td>
';
}
public function ListeMultiKonten(){
$aus = array("head" => $this->SetHead(), "body" => '');
$uid = $this->db->get_results("SELECT uid FROM ". PREFIX . MK ." GROUP BY uid ");
$i = 1;
$array = $this->SetArrayUID();
foreach($array AS $key => $value){
$aus['body'] .= '
<tr>
<td>< href="?page=/usersystem/details&uid='. $key .'">'. $key .'</a></td>';
foreach($this->typen AS $none => $typ){
if(isset($value[$typ])){ $string = $value[$typ];}else{ $string = 'nicht vorhanden';}
$aus['body'] .= '
<td>'. $string .'</td>
';
}
$aus['body'] .= $this->SetForm($key) .'
</tr>
';
}
return $aus;
}
}
?>