diff options
Diffstat (limited to 'template.email.php')
| -rw-r--r-- | template.email.php | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/template.email.php b/template.email.php new file mode 100644 index 0000000..9c76425 --- /dev/null +++ b/template.email.php @@ -0,0 +1,63 @@ +<?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. + */ +?> +<?php +/* vim: set ts=4 sw=4 et : */ + +require_once __DIR__ . "/check_auth.php"; +require_once __DIR__ . "/../includes/common.php"; +session_write_close(); +require_once __DIR__ . "/lookup.php"; +require_once __DIR__ . "/lookup_more.php"; + +(function () use ($mysqli) { + global $eventID; + + $sql = " +SELECT + email_templates.id AS ID, + email_templates.*, + email_templates_fav.tid AS etfav +FROM email_templates +LEFT JOIN email_templates_fav ON email_templates.id = email_templates_fav.tid AND email_templates_fav.userid = ? +WHERE email_templates.id=? +"; + $stmt = $mysqli->prepare($sql); + $stmt->bind_param('ii', $_SESSION['auth_userid'], $_GET['id']); + $stmt->execute(); + $r = $stmt->get_result(); + $l = $r->fetch_object(); + + $_title = 'E-Mail-Template: "<span class="pii">' . $l->name . '</span>" (ID ' . $l->ID . ')'; + include_once __DIR__ . "/header.php"; +?> + +<h1 style="display: inline-block;"><?=$_title?></h1> + +<?php + $id = "emailtemplate"; + $def = [ + [4, '=3name~Name', '_ts'], + [6, '+active~Aktiv', '+etfav~pers. Favorit <small>(' . $_SESSION['auth_user'] . ')</small>', '=4tags'], + ['from', 'cc', 'bcc'], + ['%subject'], + ['*text'], + ]; + $entrytable = "email_templates"; + + include __DIR__ . '/autoform.php'; + $stmt->reset(); +})(); + +include_once __DIR__ . "/footer.php"; +?> |
