demoqueue - Switch from `runAllViaWeb()` to `runAllInteractive()`
[civicrm-core.git] / extern / open.php
CommitLineData
6a488035
TO
1<?php
2require_once '../civicrm.config.php';
3require_once 'CRM/Core/Config.php';
4require_once 'CRM/Core/Error.php';
f3e9be3d
SL
5require_once 'CRM/Utils/Type.php';
6require_once 'CRM/Utils/Rule.php';
7require_once 'CRM/Utils/Request.php';
6a488035 8
d523d24a 9CRM_Core_Config::singleton();
f3e9be3d 10$queue_id = CRM_Utils_Request::retrieveValue('q', 'Positive', NULL, FALSE, 'GET');
6a488035
TO
11if (!$queue_id) {
12 echo "Missing input parameters\n";
13 exit();
14}
15
16require_once 'CRM/Mailing/Event/BAO/Opened.php';
17CRM_Mailing_Event_BAO_Opened::open($queue_id);
18
19$filename = "../i/tracker.gif";
20
21header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
22header('Content-Description: File Transfer');
23header('Content-type: image/gif');
24header('Content-Length: ' . filesize($filename));
25
26header('Content-Disposition: inline; filename=tracker.gif');
27
28readfile($filename);
29
30exit();