* SPDX-License-Identifier: AGPL-3.0-only ************************************/ /* crmv@153002 */ global $current_user, $theme; $templateid = intval($_REQUEST['templateid']); $module = $_REQUEST['formodule']; $record = $_REQUEST['forrecord']; if ($templateid > 0) { $body = ''; if (is_admin($current_user) || isPermitted($module,'DetailView', $record) == 'yes') { $res = $adb->pquery("select body from ".$table_prefix."_emailtemplates where templateid=?", array($templateid)); if ($res && $adb->num_rows($res) > 0) { $body = $adb->query_result_no_html($res, 0, 'body'); } } echo "\n\n"; echo "
"; echo $body."\n"; echo "
"; echo ""; die(); }