<?php

	### Code by Steve Curry 

	### to generate a dynamic image for 

	### result to be displayed in the email.

	### Argument requirement (Percentage)

	$im = imagecreatefrompng("images/email/graph-bg.png");

	$green = imagecolorallocate($im, 134, 178, 0);

	$per = $_GET['percentage'];

	if (empty($per))

		$per = 0;

	else

		$per = intval(round($per));

	

	$percentage = ($per * 3);

	

	imagefilledrectangle ($im,   0,  1, $percentage, 29, $green);

	header('Content-Type: image/png');

	imagepng($im);

	imagedestroy($im);

?>