forked from projectsend/projectsend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail-preview.php
More file actions
33 lines (26 loc) · 792 Bytes
/
email-preview.php
File metadata and controls
33 lines (26 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Show a preview of the currently selected e-mail template
*
* @package ProjectSend
* @subpackage Options
*/
$allowed_levels = array(9);
require_once('sys.includes.php');
$page_title = __('E-mail templates','cftp_admin') . ': ' . __('Preview','cftp_admin');
$active_nav = 'options';
/** Do a couple of functions that are in header.php */
/** Check for an active session or cookie */
check_for_session();
can_see_content($allowed_levels);
/** Get the preview type */
$type = $_GET['t'];
/** Generate the preview using the email sending class */
$preview = new PSend_Email();
$preview_arguments = array(
'preview' => true,
'type' => $type,
);
$preview_results = $preview->psend_send_email($preview_arguments);
echo $preview_results;
ob_end_flush();