Updated the LaTeX header for letters
[civicrm-core.git] / extern / open.php
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/Type.php';
6 require_once 'CRM/Utils/Rule.php';
7 require_once 'CRM/Utils/Request.php';
8
9 CRM_Core_Config::singleton();
10 $queue_id = CRM_Utils_Request::retrieveValue('q', 'Positive', NULL, FALSE, 'GET');
11 if (!$queue_id) {
12 echo "Missing input parameters\n";
13 exit();
14 }
15
16 require_once 'CRM/Mailing/Event/BAO/Opened.php';
17 CRM_Mailing_Event_BAO_Opened::open($queue_id);
18
19 $filename = "../i/tracker.gif";
20
21 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
22 header('Content-Description: File Transfer');
23 header('Content-type: image/gif');
24 header('Content-Length: ' . filesize($filename));
25
26 header('Content-Disposition: inline; filename=tracker.gif');
27
28 readfile($filename);
29
30 exit();