Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | require_once '../civicrm.config.php'; | |
3 | require_once 'CRM/Core/Config.php'; | |
4 | require_once 'CRM/Core/Error.php'; | |
5 | require_once 'CRM/Utils/Array.php'; | |
6 | ||
7 | $config = CRM_Core_Config::singleton(); | |
8 | $queue_id = CRM_Utils_Array::value('q', $_GET); | |
9 | if (!$queue_id) { | |
10 | echo "Missing input parameters\n"; | |
11 | exit(); | |
12 | } | |
13 | ||
14 | require_once 'CRM/Mailing/Event/BAO/Opened.php'; | |
15 | CRM_Mailing_Event_BAO_Opened::open($queue_id); | |
16 | ||
17 | $filename = "../i/tracker.gif"; | |
18 | ||
19 | header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); | |
20 | header('Content-Description: File Transfer'); | |
21 | header('Content-type: image/gif'); | |
22 | header('Content-Length: ' . filesize($filename)); | |
23 | ||
24 | header('Content-Disposition: inline; filename=tracker.gif'); | |
25 | ||
26 | readfile($filename); | |
27 | ||
28 | exit(); |