mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-25 14:10:28 +01:00
module_creator addmessage()
This commit is contained in:
parent
52b64ef8bc
commit
765e2ba217
@ -84,11 +84,9 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||
}
|
||||
|
||||
public function PLACEHOLDER_DELETE() {
|
||||
$id = (int) $this->app->Secure->GetGET('id');
|
||||
|
||||
$id = (int) $this->app->Secure->GetGET('id');
|
||||
$this->app->DB->Delete("DELETE FROM `PLACEHOLDER_MODULENAME` WHERE `id` = '{$id}'");
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gelöscht.</div>");
|
||||
|
||||
$this->app->Tpl->addMessage('error', 'Der Eintrag wurde gelöscht');
|
||||
$this->PLACEHOLDER_LIST();
|
||||
}
|
||||
|
||||
@ -156,23 +154,26 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
|
||||
header("Location: index.php?module=PLACEHOLDER_MODULENAME&action=list&msg=$msg");
|
||||
} else {
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich übernommen.</div>");
|
||||
$this->app->Tpl->addMessage('success', 'Die Einstellungen wurden erfolgreich übernommen.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Load values again from database
|
||||
$dropnbox = "PLACEHOLDER_DROPNBOX";
|
||||
$result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id");
|
||||
if ($id != 'NULL') {
|
||||
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||
}
|
||||
$dropnbox = "PLACEHOLDER_DROPNBOX";
|
||||
$result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id");
|
||||
|
||||
if (!empty($result)) {
|
||||
$PLACEHOLDER_MODULENAME_from_db = $result[0];
|
||||
} else {
|
||||
return;
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||
}
|
||||
|
||||
if (!empty($result)) {
|
||||
$PLACEHOLDER_MODULENAME_from_db = $result[0];
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user