blob: 5e93946444142209381d6c7e9b96df801371f790 (
plain)
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
/**
* Copyright (c) 2005 bitweaver.org
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
* created 2005/12/10
*
* @package newsletters
* @author spider <spider@steelsun.com>
*/
/**
* Initialization
*/
require_once( '../bit_setup_inc.php' );
include_once( NEWSLETTERS_PKG_PATH.'BitMailer.php' );
if( isset( $_REQUEST["sub"] ) || $gBitUser->isRegistered() ) {
if( isset( $_REQUEST["sub"] ) && strlen( $_REQUEST["sub"] ) == 32 && ($subInfo = BitMailer::lookupSubscription( array( 'url_code' => $_REQUEST["sub"] ) )) ) {
BitMailer::trackMail( $subInfo['url_code'] );
}
}
// open the file in a binary mode
$trackImage = $gBitSystem->getConfig( 'newsletter_tracking_image', NEWSLETTERS_PKG_PATH.'images/track.gif' );
if( $fp = fopen( $trackImage, 'rb') ) {
// send the right headers
header( "Content-Type: image/png" );
header( "Content-Length: " . filesize( $trackImage ) );
// dump the picture and stop the script
fpassthru( $fp );
}
exit;
?>
|