MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b1705/absoluteresultstechnologies.net/public_html/winaram/
File Upload :
Current < : /hermes/bosweb/b1705/absoluteresultstechnologies.net/public_html/winaram/rebateCertificateImage.php

<?php
	session_start();
	header("Content-Type: image/jpeg");
	
	
// NEW voucher routine
	$voucher = ($_SESSION['registerEmail']['dealerInfo'][$_SESSION['registerEmail']['info']['dealer']]['voucher']);

	if($voucher == "default")
	$couponName = 'images/certificates/rebateCertificate.jpg';
		
	else
	$couponName = 'images/certificates/rebateCertificate-' . $voucher .  '.jpg';
// END: Voucher routine


	
	$fontfile = "arial.ttf";
	
	$x = 42;
	$y = 360;
	
	$img = imagecreatefromjpeg($couponName);
	
	$textcolor = imagecolorallocate($img, 0, 0, 0);
	imagettftext ( $img, 14, 0, $x, $y, $textcolor,$fontfile, trim($_SESSION['registerEmail']['info']['firstname'] . ' ' . $_SESSION['registerEmail']['info']['lastname']));	
	//imagettftext ( $img, 11, 0, $x, $y + 15, $textcolor,$fontfile, 'Expires on July 31, 2011');	
	
	$x = 460;
	$y = 35;
	
// NO ATTACHMENT (voucher)
	if(in_array($_SESSION['registerEmail']['info']['dealer'],array('oconnor','camrose')))
	{}
	else {
$textcolor = imagecolorallocate($img, 255, 255, 255);
	imagettftext ( $img, 18, 0, $x, $y, $textcolor,$fontfile, $_SESSION['registerEmail']['dealerInfo'][$_SESSION['registerEmail']['info']['dealer']]['name']);	
	$split = explode('<br>',$_SESSION['registerEmail']['dealerInfo'][$_SESSION['registerEmail']['info']['dealer']]['address']);
	$i = 1;
	foreach($split as $line)
	{
		imagettftext ( $img, 12, 0, $x, $y + ($i*15), $textcolor,$fontfile, $line);	
		$i++;
	}
	
	imagejpeg($img);

}

?>