Skip to content
Snippets Groups Projects
Commit c92f2c17 authored by Eric Laufer's avatar Eric Laufer
Browse files

Multi Konten Verwaltung

Mit der Verwaltung könnt Ihr alle Multikonten einer UID wieder löschen.
parent 224c10bc
Branches
No related merge requests found
<?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&ouml;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;
}
}
?>
\ No newline at end of file
<?php
$Class = Classloader('multiKonten',true);
$Class->DeleteMultiKonto($_POST);
?>
\ No newline at end of file
......@@ -248,7 +248,8 @@ INSERT INTO `vms_menu_admin` (`id`, `uid`, `link`, `name`, `ordnung`, `box`) VAL
(35, 0, 'kjkjg', 'dggfo', 0.00, 0),
(37, 0, 'kjkjg', 'dggfo', 0.00, 0),
(39, 0, '', '', 0.00, 0),
(40, 0, 'inaktiv', 'Inaktivensuche', 12.00, 4);
(40, 0, 'inaktiv', 'Inaktivensuche', 12.00, 4),
(41, 0, 'interfacedaten/multi_konten', 'Multi Konten', 0.00, 4);
CREATE TABLE `vms_menu_user` (
`id` int(11) NOT NULL,
......@@ -505,7 +506,9 @@ INSERT INTO `vms_run_inc` (`id`, `name`, `value`, `datei`, `beschreibung`, `bere
(75, 'updaten_betreiberdaten', 'Updaten', 'setting/schnitt_update.php', '', 1),
(76, 'veri', 'Verifizieren', 'konto/ver.php', 'Verfizierung externes Konto', 0),
(77, 'manuelle_buchung', 'Buchen', 'user/buchung.php', 'Manuelle Kontobuchung', 1),
(78, 'refback_save', 'Save', 'konto/refback.php', 'Speichern des Refbacks', 0);
(78, 'refback_save', 'Save', 'konto/refback.php', 'Speichern des Refbacks', 0),
(79, 'berechtigungAdmin', 'Speichern', 'user/AdminRechte.php', 'Seitenberechtigung im Adminbereich speichern', 1),
(80, 'MultiDelete', 'Löschen', 'multi_konto/del.php', 'Löschen von Multi Konten Bindungen', 1);
CREATE TABLE `vms_schnittstelle` (
`name` text NOT NULL,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment