-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewemail.php
39 lines (37 loc) · 1.27 KB
/
viewemail.php
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
34
35
36
37
38
39
<?php
/*
* @ PHP 7.2
* @ Decoder version : 1.0.0.4
* @ Release on : 09/06/2021
* @ Website : http://EasyToYou.eu
*/
define("CLIENTAREA", true);
require "init.php";
$whmcs = App::self();
$emailId = (int) $whmcs->get_req_var("id");
$ca = new WHMCS\ClientArea();
$ca->setPageTitle(Lang::trans("clientareaemails"));
$ca->addToBreadCrumb("index.php", $whmcs->get_lang("globalsystemname"));
$ca->addToBreadCrumb("viewemail.php?id=" . (int) $emailId . "#", Lang::trans("clientareaemails"));
$ca->initPage();
$ca->requireLogin();
checkContactPermission("emails");
$data = WHMCS\Mail\Log::ofClient(Auth::client()->id)->where("id", $emailId)->first();
if (!$data) {
exit("Invalid Access Attempt");
}
$date = $data->getRawAttribute("date");
$subject = $data->subject;
$message = $data->message;
$attachments = $data->attachments;
$date = fromMySQLDate($date, true, true);
$ca->assign("date", WHMCS\Input\Sanitize::makeSafeForOutput($date));
$ca->assign("subject", WHMCS\Input\Sanitize::makeSafeForOutput($subject));
$message = WHMCS\Input\Sanitize::maskEmailVerificationId($message);
$ca->assign("message", $message);
$ca->assign("attachments", $attachments);
$ca->setTemplate("viewemail");
$ca->disableHeaderFooterOutput();
$ca->addOutputHookFunction("ClientAreaPageViewEmail");
$ca->output();
?>