summaryrefslogtreecommitdiff
path: root/templates.email.php
diff options
context:
space:
mode:
authorNiklas Olmes <niklas@olmes.de>2026-04-24 19:30:00 +0200
committerNiklas Olmes <niklas@olmes.de>2026-04-24 19:30:00 +0200
commitcdea8caa5617f0cb77bcbc9803759abd2df50644 (patch)
tree2f7f1bd3af3b2396baf5403ad1a7ad00bcb7fae9 /templates.email.php
stipcrmHEADmain
Diffstat (limited to 'templates.email.php')
-rw-r--r--templates.email.php72
1 files changed, 72 insertions, 0 deletions
diff --git a/templates.email.php b/templates.email.php
new file mode 100644
index 0000000..6ab8e31
--- /dev/null
+++ b/templates.email.php
@@ -0,0 +1,72 @@
+<?php
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+?>
+<?
+/* vim: set ts=4 sw=4 et : */
+
+$_title = 'E-Mail-Templates';
+
+require_once __DIR__ . "/check_auth.php";
+require_once __DIR__ . "/header.php";
+require_once __DIR__ . "/../includes/common.php";
+
+doTitle();
+
+(function () {
+ $id = "emailtemplates";
+ $sql = "
+SELECT id AS ETID, name, ts, active, tags, `from`, subject, text
+FROM email_templates
+";
+ $getthdef = true;
+ $idcell = "ETID";
+ $idcellreal = "id";
+ $entrytable = 'email_templates';
+ $types = [
+ 'active' => 'checkbox'
+ ];
+ $editable = [
+ 'active',
+ 'name',
+ 'from',
+ 'tags',
+ ];
+ $checkboxes = true;
+
+ $bottom = <<<EOD
+<div class="admin_actionsbelow">
+ Ausgewählte
+ <button class="medium" style="background: darkorange;" onclick="return delET();"><i class="fas fa-trash-alt"></i> entfernen</button>
+</div>
+EOD;
+
+ include __DIR__ . '/autotable.php';
+?>
+<script>
+function delET() {
+ $.ajaxSetup({async:false});
+ $.ajax({
+ type: 'POST',
+ url: '/db/main/delet.php',
+ data: {
+ 'ids': getIDs_<?=$id?>()
+ }
+ });
+ window.location.reload();
+ return false;
+}
+</script>
+<?
+})();
+
+include_once __DIR__ . "/footer.php";